UNPKG

tressi

Version:

Deterministic load testing for API performance validation.

834 lines 336 kB
import"./chunk-I4MTPUBM.js";var Xe=Object.defineProperty,Ne=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Ft=(b,t,e)=>t in b?Xe(b,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):b[t]=e,Y=(b,t)=>{for(var e in t||(t={}))Re.call(t,e)&&Ft(b,e,t[e]);if(me)for(var e of me(t))Ye.call(t,e)&&Ft(b,e,t[e]);return b},O=(b,t)=>Ne(b,Pe(t)),P=(b,t,e)=>Ft(b,typeof t!="symbol"?t+"":t,e);var M=class{static isSSR(){return typeof window>"u"||typeof document>"u"}static isBrowser(){return!this.isSSR()}static hasAPI(t){return this.isSSR()?!1:typeof window[t]<"u"}static getApex(){return typeof window<"u"&&window.Apex?window.Apex:typeof global<"u"&&global.Apex?global.Apex:{}}},bt=class b{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new Xt,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){let e=this.children.indexOf(t);e!==-1&&this.children.splice(e,1)}t.parentNode=this,this.children.push(t)}return t}removeChild(t){let e=this.children.indexOf(t);return e!==-1&&(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){let i=this.children.indexOf(t);i!==-1&&this.children.splice(i,1)}let s=this.children.indexOf(e);return s!==-1&&(t.parentNode=this,this.children.splice(s,0,t)),t}cloneNode(t=!1){let e=new b(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((s,i)=>{e.attributes.set(i,s)}),Object.assign(e.style,this.style),t&&this.children.forEach(s=>{s.cloneNode&&e.appendChild(s.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((s,i)=>{t+=` ${i}="${s}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${t}/>`;let e=this.children.map(s=>s.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}},Xt=class{constructor(){this.classes=new Set}add(...t){t.forEach(e=>this.classes.add(e))}remove(...t){t.forEach(e=>this.classes.delete(e))}contains(t){return this.classes.has(t)}toggle(t,e){return e===!0?(this.classes.add(t),!0):e===!1?(this.classes.delete(t),!1):this.classes.has(t)?(this.classes.delete(t),!1):(this.classes.add(t),!0)}toString(){return Array.from(this.classes).join(" ")}},Nt=class{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new bt(e,t)}createTextNode(t){let e={nodeName:"#text",nodeType:3,textContent:t,toString(){return 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){return t.toString?t.toString():""}}}createDOMParser(){return{parseFromString(t,e){let s=new bt("root");return s.innerHTML=t,{documentElement:s}}}}},G=null,st=null,it=null,F=class{static init(){M.isSSR()&&!G&&(G=new Nt)}static createElement(t){return M.isSSR()?(G||this.init(),G.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return M.isSSR()?(G||this.init(),G.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return M.isSSR()?(G||this.init(),G.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return M.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return M.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return M.isSSR()?{}:window.getComputedStyle(t)}static getBoundingClientRect(t){return M.isSSR()?(G||this.init(),G.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return M.isSSR()?(G||this.init(),st||(st=G.createXMLSerializer()),st):(st||(st=new XMLSerializer),st)}static getDOMParser(){return M.isSSR()?(G||this.init(),it||(it=G.createDOMParser()),it):(it||(it=new DOMParser),it)}static addWindowEventListener(t,e,s){M.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){M.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return M.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){M.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return t?M.isSSR()?t._ssrMode===!0||t.nodeName!==void 0:t.getRootNode?t.getRootNode({composed:!0})===document||t.isConnected:!1:!1}static getWindow(){return M.isBrowser()?window:null}static getDocument(){return M.isBrowser()?document:null}static _getShim(){return G}static _resetShim(){G=null,st=null,it=null}},A=class nt{static isObject(t){return t&&typeof t=="object"&&!Array.isArray(t)}static is(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}static isSafari(){return M.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){let 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(t,e){let s=[];return t.map(i=>{s.push(nt.extend(e,i))}),t=s,t}static monthMod(t){return t%12}static clone(t,e=new WeakMap,s=!1){if(t===null||typeof t!="object")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 a=0;a<t.length;a++)i[a]=this.clone(t[a],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(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=this.clone(t[a],e,!1))}return i}static shallowClone(t){return t===null||typeof t!="object"?t:Array.isArray(t)?t.slice():Object.assign({},t)}static shallowEqual(t,e){if(t===e)return!0;if(!t||!e)return!1;if(typeof t!="object"||typeof e!="object")return t===e;let s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;for(let a of s)if(t[a]!==e[a])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 typeof t=="number"||t===null?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(t){if(!t||!t.getRootNode)return!1;let e=t.getRootNode();return e&&e!==document&&nt.is("ShadowRoot",e)}static getShadowRootHost(t){return nt.isInShadowDOM(t)&&t.getRootNode().host||null}static getDimensions(t){if(!t)return[0,0];if(M.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e=t.getRootNode&&t.getRootNode();if(e&&e!==document&&e.host){let r=e.host.getBoundingClientRect();return[r.width,r.height]}let i;try{i=getComputedStyle(t,null)}catch{return[t.clientWidth||0,t.clientHeight||0]}let a=t.clientHeight,o=t.clientWidth;return a-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),o-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),[o,a]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(M.isSSR())return F.getBoundingClientRect(t);let 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((e,s)=>(Array.isArray(s)&&(s=s.reduce((i,a)=>i.length>a.length?i:a)),e.length>s.length?e:s),0)}static hexToRgba(t="#999999",e=.6){t.substring(0,1)!=="#"&&(t="#999999");let s=t.replace("#",""),i=s.match(new RegExp("(.{"+s.length/3+"})","g"))||[];for(let a=0;a<i.length;a++)i[a]=parseInt(i[a].length===1?i[a]+i[a]:i[a],16);return typeof e<"u"&&i.push(e),"rgba("+i.join(",")+")"}static getOpacityFromRGBA(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}static rgb2hex(t){return t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),t&&t.length===4?"#"+("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){let s=e.split(","),i=t<0?0:255,a=t<0?t*-1:t,o=parseInt(s[0].slice(4),10),r=parseInt(s[1],10),l=parseInt(s[2],10);return"rgb("+(Math.round((i-o)*a)+o)+","+(Math.round((i-r)*a)+r)+","+(Math.round((i-l)*a)+l)+")"}shadeHexColor(t,e){let s=parseInt(e.slice(1),16),i=t<0?0:255,a=t<0?t*-1:t,o=s>>16,r=s>>8&255,l=s&255;return"#"+(16777216+(Math.round((i-o)*a)+o)*65536+(Math.round((i-r)*a)+r)*256+(Math.round((i-l)*a)+l)).toString(16).slice(1)}shadeColor(t,e){return nt.isColorHex(e)?this.shadeHexColor(t,e):this.shadeRGBColor(t,e)}static isColorHex(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}static isCSSVariable(t){if(typeof t!="string")return!1;let e=t.trim();return e.startsWith("var(")&&e.endsWith(")")}static getThemeColor(t){if(!nt.isCSSVariable(t)||M.isSSR())return t;let e=document.createElement("div");e.style.cssText="position:fixed; left: -9999px; visibility:hidden;",e.style.color=t,document.body.appendChild(e);let s;try{s=window.getComputedStyle(e).color}finally{e.parentNode&&e.parentNode.removeChild(e)}return s}static applyOpacityToColor(t,e){let s=Number(e);if(!Number.isFinite(s))return t;if(s<=0)return"transparent";if(s>=1)return t;let i=Math.round(s*100);return`color-mix(in srgb, ${t} ${i}%, transparent)`}static getPolygonPos(t,e){let s=[],i=Math.PI*2/e;for(let a=0;a<e;a++){let o={};o.x=t*Math.sin(a*i),o.y=-t*Math.cos(a*i),s.push(o)}return s}static polarToCartesian(t,e,s,i){let 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 i=s-t.length+1;for(;i--;)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(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t.style.key=e[s])}static preciseAddition(t,e){let 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(M.isSSR())return!1;let t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0?parseInt(t.substring(e+5,t.indexOf(".",e)),10):!1}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;){let a=e;e=t%e,t=a}return t/i}static getPrimeFactors(t){let e=[],s=2;for(;t>=2;)t%s==0?(e.push(s),t=t/s):s++;return e}static mod(t,e,s=7){let 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),t%e/i}},B=class{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 typeof t=="number"?!1:!isNaN(this.parseDate(t))}getTimeStamp(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}getDate(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}parseDate(t){let 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){let s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...s.months],o=["",...s.shortMonths],r=["",...s.days],l=["",...s.shortDays];function c(C,_=2){let D=C+"";for(;D.length<_;)D="0"+D;return D}let n=i?t.getUTCFullYear():t.getFullYear();e=e.replace(/(^|[^\\])yyyy+/g,"$1"+n),e=e.replace(/(^|[^\\])yy/g,"$1"+n.toString().substr(2,2)),e=e.replace(/(^|[^\\])y/g,"$1"+n);let h=(i?t.getUTCMonth():t.getMonth())+1;e=e.replace(/(^|[^\\])MMMM+/g,"$1"+a[0]),e=e.replace(/(^|[^\\])MMM/g,"$1"+o[0]),e=e.replace(/(^|[^\\])MM/g,"$1"+c(h)),e=e.replace(/(^|[^\\])M/g,"$1"+h);let d=i?t.getUTCDate():t.getDate();e=e.replace(/(^|[^\\])dddd+/g,"$1"+r[0]),e=e.replace(/(^|[^\\])ddd/g,"$1"+l[0]),e=e.replace(/(^|[^\\])dd/g,"$1"+c(d)),e=e.replace(/(^|[^\\])d/g,"$1"+d);let g=i?t.getUTCHours():t.getHours();e=e.replace(/(^|[^\\])HH+/g,"$1"+c(g)),e=e.replace(/(^|[^\\])H/g,"$1"+g);let f=g>12?g-12:g===0?12:g;e=e.replace(/(^|[^\\])hh+/g,"$1"+c(f)),e=e.replace(/(^|[^\\])h/g,"$1"+f);let p=i?t.getUTCMinutes():t.getMinutes();e=e.replace(/(^|[^\\])mm+/g,"$1"+c(p)),e=e.replace(/(^|[^\\])m/g,"$1"+p);let u=i?t.getUTCSeconds():t.getSeconds();e=e.replace(/(^|[^\\])ss+/g,"$1"+c(u)),e=e.replace(/(^|[^\\])s/g,"$1"+u);let m=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+c(m,3)),m=Math.round(m/10),e=e.replace(/(^|[^\\])ff/g,"$1"+c(m)),m=Math.round(m/10),e=e.replace(/(^|[^\\])f/g,"$1"+m);let x=g<12?"AM":"PM";e=e.replace(/(^|[^\\])TT+/g,"$1"+x),e=e.replace(/(^|[^\\])T/g,"$1"+x.charAt(0));let y=x.toLowerCase();e=e.replace(/(^|[^\\])tt+/g,"$1"+y),e=e.replace(/(^|[^\\])t/g,"$1"+y.charAt(0));let w=-t.getTimezoneOffset(),S=i||!w?"Z":w>0?"+":"-";if(!i){w=Math.abs(w);let C=Math.floor(w/60),_=w%60;S+=c(C)+":"+c(_)}e=e.replace(/(^|[^\\])K/g,"$1"+S);let v=(i?t.getUTCDay():t.getDay())+1;return e=e.replace(new RegExp(r[0],"g"),r[v]),e=e.replace(new RegExp(l[0],"g"),l[v]),e=e.replace(new RegExp(a[0],"g"),a[h]),e=e.replace(new RegExp(o[0],"g"),o[h]),e=e.replace(/\\(.)/g,"$1"),e}getTimeUnitsfromTimestamp(t,e){let s=this.w;s.config.xaxis.min!==void 0&&(t=s.config.xaxis.min),s.config.xaxis.max!==void 0&&(e=s.config.xaxis.max);let i=this.getDate(t),a=this.getDate(e),o=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),r=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(o[6],10),maxMillisecond:parseInt(r[6],10),minSecond:parseInt(o[5],10),maxSecond:parseInt(r[5],10),minMinute:parseInt(o[4],10),maxMinute:parseInt(r[4],10),minHour:parseInt(o[3],10),maxHour:parseInt(r[3],10),minDate:parseInt(o[2],10),maxDate:parseInt(r[2],10),minMonth:parseInt(o[1],10)-1,maxMonth:parseInt(r[1],10)-1,minYear:parseInt(o[0],10),maxYear:parseInt(r[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=A.monthMod(t),!0){case this.months30.indexOf(t)>-1:t===2&&(this.isLeapYear(e)?s=29:s=28);break;case this.months31.indexOf(t)>-1:s=31;break;default:s=31;break}return s}},at=class{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,s,i){let a=this.w;if(a.config.xaxis.type==="datetime"&&a.config.xaxis.labels.formatter===void 0&&a.config.tooltip.x.formatter===void 0){let o=new B(this.w);return o.formatDate(o.getDate(e),a.config.tooltip.x.format)}return t(e,s,i)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(e=>e):t}defaultYFormatter(t,e){let s=this.w;if(A.isNumber(t))if(s.globals.yValueDecimal!==0)t=t.toFixed(e.decimalsInFloat!==void 0?e.decimalsInFloat:s.globals.yValueDecimal);else{let i=t.toFixed(0);t=Number(i)===t?i:t.toFixed(1)}return t}setLabelFormatters(){let t=this.w,e=t.formatters;return e.xaxisTooltipFormatter=s=>this.defaultGeneralFormatter(s),e.ttKeyFormatter=s=>this.defaultGeneralFormatter(s),e.ttZFormatter=s=>s,e.legendFormatter=s=>this.defaultGeneralFormatter(s),t.config.xaxis.labels.formatter!==void 0?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=s=>{if(A.isNumber(s)){if(!t.config.xaxis.convertedCatToNumeric&&t.config.xaxis.type==="numeric"){if(A.isNumber(t.config.xaxis.decimalsInFloat))return s.toFixed(t.config.xaxis.decimalsInFloat);{let i=t.globals.maxX-t.globals.minX;return i>0&&i<100?s.toFixed(1):s.toFixed(0)}}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?s.toFixed(1):s.toFixed(0)}return s},typeof t.config.tooltip.x.formatter=="function"?e.ttKeyFormatter=t.config.tooltip.x.formatter:e.ttKeyFormatter=e.xLabelFormatter,typeof t.config.xaxis.tooltip.formatter=="function"&&(e.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||t.config.tooltip.y.formatter!==void 0)&&(e.ttVal=t.config.tooltip.y),t.config.tooltip.z.formatter!==void 0&&(e.ttZFormatter=t.config.tooltip.z.formatter),t.config.legend.formatter!==void 0&&(e.legendFormatter=t.config.legend.formatter),e.yLabelFormatters=[],t.config.yaxis.forEach((s,i)=>{s.labels.formatter!==void 0?e.yLabelFormatters[i]=s.labels.formatter:e.yLabelFormatters[i]=a=>t.globals.xyCharts?Array.isArray(a)?a.map(o=>this.defaultYFormatter(o,s)):this.defaultYFormatter(a,s):a}),t.globals}heatmapLabelFormatters(){let t=this.w;if(t.config.chart.type==="heatmap"){t.globals.yAxisScale[0].result=t.seriesData.seriesNames.slice();let e=t.seriesData.seriesNames.reduce((s,i)=>s.length>i.length?s:i,0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}},Mt=({isTimeline:b,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a})=>{var o;let r=a.rangeData.seriesRangeStart[t][e],l=a.rangeData.seriesRangeEnd[t][e],c=a.labelData.labels[e],n=a.config.series[t].name?a.config.series[t].name:"",h=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,g={w:a,seriesIndex:t,dataPointIndex:e,start:r,end:l};typeof d=="function"&&(n=d(n,g)),(o=a.config.series[t].data[e])!=null&&o.x&&(c=a.config.series[t].data[e].x),b||a.config.xaxis.type==="datetime"&&(c=new at(a).xLabelFormat(a.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new B(a).formatDate,w:a})),typeof h=="function"&&(c=h(c,g)),Number.isFinite(s)&&Number.isFinite(i)&&(r=s,l=i);let f="",p="",u=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type==="datetime"){let m=new B(a);f=m.formatDate(m.getDate(r),a.config.tooltip.x.format),p=m.formatDate(m.getDate(l),a.config.tooltip.x.format)}else f=r,p=l;else f=a.config.tooltip.x.formatter(r),p=a.config.tooltip.x.formatter(l);return{start:r,end:l,startVal:f,endVal:p,ylabel:c,color:u,seriesName:n}},Et=b=>{let{color:t,seriesName:e,ylabel:s,start:i,end:a,seriesIndex:o,dataPointIndex:r}=b,l=b.w.globals.tooltip.tooltipLabels.getFormatters(o);i=l.yLbFormatter(i),a=l.yLbFormatter(a);let c=l.yLbFormatter(b.w.seriesData.series[o][r]),n="",h=`<span class="value start-value">
  ${i}
  </span> <span class="separator">-</span> <span class="value end-value">
  ${a}
  </span>`;return b.w.globals.comboCharts?b.w.config.series[o].type==="rangeArea"||b.w.config.series[o].type==="rangeBar"?n=h:n=`<span>${c}</span>`:n=h,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+t+'">'+(e||"")+'</span></div><div> <span class="category">'+s+": </span> "+n+" </div></div>"},rt=class{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();let e={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}};return A.extend(t,e)}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){let s=e.w.config.series[e.seriesIndex].name;return t!==null?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(),O(Y({},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}}})}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}}}}rangeBar(){let t=s=>{let{color:i,seriesName:a,ylabel:o,startVal:r,endVal:l}=Mt(O(Y({},s),{isTimeline:!0}));return Et(O(Y({},s),{color:i,seriesName:a,ylabel:o,start:r,end:l}))},e=s=>{let{color:i,seriesName:a,ylabel:o,start:r,end:l}=Mt(s);return Et(O(Y({},s),{color:i,seriesName:a,ylabel:o,start:r,end:l}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(s,{seriesIndex:i,dataPointIndex:a,w:o}){let r=()=>{let l=o.rangeData.seriesRangeStart[i][a];return o.rangeData.seriesRangeEnd[i][a]-l};return o.globals.comboCharts?o.config.series[i].type==="rangeBar"||o.config.series[i].type==="rangeArea"?r():s:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom(s){return s.w.config.plotOptions&&s.w.config.plotOptions.bar&&s.w.config.plotOptions.bar.horizontal?t(s):e(s)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return(e=t.plotOptions.bar)!=null&&e.barHeight||(t.plotOptions.bar.barHeight=2),(s=t.plotOptions.bar)!=null&&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(){let t=e=>{let{color:s,seriesName:i,ylabel:a,start:o,end:r}=Mt(e);return Et(O(Y({},e),{color:s,seriesName:i,ylabel:a,start:o,end:r}))};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(e){return t(e)}}}}brush(t){let e={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return A.extend(t,e)}stacked100(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;let e=t.dataLabels.formatter;return t.yaxis.forEach((i,a)=>{t.yaxis[a].min=0,t.yaxis[a].max=100}),t.chart.type==="bar"&&(t.dataLabels.formatter=e||function(i){return typeof i=="number"?i&&i.toFixed(0)+"%":i}),t}stackedBars(){let t=this.bar();return O(Y({},t),{plotOptions:O(Y({},t.plotOptions),{bar:O(Y({},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(a){return A.isNumber(a)?Math.floor(a):a};let s=t.xaxis.labels.formatter,i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(a=>Array.isArray(a)?a:String(a))),i&&i.length&&(t.xaxis.labels.formatter=function(a){return A.isNumber(a)?s(i[Math.floor(a)-1]):s(a)}),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){return 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){return 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){return 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}},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){let o=t.candleData.seriesCandleO[e][s],r=t.candleData.seriesCandleH[e][s],l=t.candleData.seriesCandleM[e][s],c=t.candleData.seriesCandleL[e][s],n=t.candleData.seriesCandleC[e][s],h=t.config.series[e];return h.type&&h.type!==a?`<div class="apexcharts-custom-tooltip">
          ${h.name?h.name:"series-"+(e+1)}: <strong>${t.seriesData.series[e][s]}</strong>
        </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div>${i[0]}: <span class="value">`+o+`</span></div><div>${i[1]}: <span class="value">`+r+"</span></div>"+(l?`<div>${i[2]}: <span class="value">`+l+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+c+`</span></div><div>${i[4]}: <span class="value">`+n+"</span></div></div>"}},He="en",Be={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"}},_e={name:He,options:Be},J=class{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,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:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[_e],defaultLocale:"en",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,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},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!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,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},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},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},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,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",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){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter(t){return t.globals.seriesTotals.reduce((e,s)=>e+s,0)/t.seriesData.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},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){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter(t){return t.globals.seriesTotals.reduce((e,s)=>e+s,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){return t!==null?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:[],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",verticalAlign:"middle",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,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter(t){return 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 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",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:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}},ot=class{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,o,r,l,c,n,h;let d=this.opts,g=new J,f=new rt(d);this.chartType=d.chart.type,d=this.extendYAxis(d),d=this.extendAnnotations(d);let p=g.init(),u={};if(d&&typeof d=="object"){let x={};["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(d.chart.type)!==-1?x=f[d.chart.type]():x=f.line(),(s=(e=d.plotOptions)==null?void 0:e.bar)!=null&&s.isFunnel&&(x=f.funnel()),d.chart.stacked&&d.chart.type==="bar"&&(x=f.stackedBars()),(i=d.chart.brush)!=null&&i.enabled&&(x=f.brush(x)),(o=(a=d.plotOptions)==null?void 0:a.line)!=null&&o.isSlopeChart&&(x=f.slope()),d.chart.stacked&&d.chart.stackType==="100%"&&(d=f.stacked100(d)),(l=(r=d.plotOptions)==null?void 0:r.bar)!=null&&l.isDumbbell&&(d=f.dumbbell(d)),this.checkForDarkTheme(M.getApex()),this.checkForDarkTheme(d),d.xaxis=d.xaxis||M.getApex().xaxis||{},t||(d.xaxis.convertedCatToNumeric=!1),d=this.checkForCatToNumericXAxis(this.chartType,x,d),((c=d.chart.sparkline)!=null&&c.enabled||(h=(n=M.getApex().chart)==null?void 0:n.sparkline)!=null&&h.enabled)&&(x=f.sparkline(x)),u=A.extend(p,x)}let m=A.extend(u,M.getApex());return p=A.extend(m,d),p=this.handleUserInputErrors(p),p}checkForCatToNumericXAxis(t,e,s){var i,a;let o=new rt(s),r=(t==="bar"||t==="boxPlot")&&((a=(i=s.plotOptions)==null?void 0:i.bar)==null?void 0:a.horizontal),l=t==="pie"||t==="polarArea"||t==="donut"||t==="radar"||t==="radialBar"||t==="heatmap",c=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",n=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return!r&&!l&&c&&n!=="between"&&(s=o.convertCatToNumeric(s)),s}extendYAxis(t,e){let s=new J;(typeof t.yaxis>"u"||!t.yaxis||Array.isArray(t.yaxis)&&t.yaxis.length===0)&&(t.yaxis={});let i=M.getApex();t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=A.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[A.extend(s.yAxis,t.yaxis)]:t.yaxis=A.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(r=>{r.logarithmic&&(a=!0)});let o=t.series;return e&&!o&&(o=e.config.series),a&&o.length!==t.yaxis.length&&o.length&&(t.yaxis=o.map((r,l)=>{if(r.name||(o[l].name=`series-${l+1}`),t.yaxis[l])return t.yaxis[l].seriesName=o[l].name,t.yaxis[l];{let c=A.extend(s.yAxis,t.yaxis[0]);return c.show=!1,c}})),a&&o.length>1&&o.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}extendAnnotations(t){return typeof t.annotations>"u"&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t),t}extendYAxisAnnotations(t){let e=new J;return t.annotations.yaxis=A.extendArray(typeof t.annotations.yaxis<"u"?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){let e=new J;return t.annotations.xaxis=A.extendArray(typeof t.annotations.xaxis<"u"?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){let e=new J;return t.annotations.points=A.extendArray(typeof t.annotations.points<"u"?t.annotations.points:[],e.pointAnnotation),t}checkForDarkTheme(t){t.theme&&t.theme.mode==="dark"&&(t.tooltip||(t.tooltip={}),t.tooltip.theme!=="light"&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}handleUserInputErrors(t){let 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(e.chart.type==="bar"&&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(e.chart.type==="bar"||e.chart.type==="rangeBar")&&e.tooltip.shared&&e.xaxis.crosshairs.width==="barWidth"&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),(e.chart.type==="candlestick"||e.chart.type==="boxPlot")&&e.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${e.chart.type} chart is not supported.`),e.yaxis[0].reversed=!1),e}},Le=1.618,Te=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],Pt=[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],yt=class{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.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.lastDrawnDataLabelsIndexes=[],t.textRectsCache=new Map,t.domCache=new Map,t.dimensionCache={},t.cachedSelectors={},t.seriesNS||this._attachNamespaces(t)}_attachNamespaces(t){let e=(r,l,c=l)=>{Object.defineProperty(r,c,{get(){return t[l]},set(n){t[l]=n},enumerable:!0,configurable:!0})},s={};e(s,"series","data");for(let r 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,r);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,configurable:!0});let i={};for(let r 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,r);Object.defineProperty(t,"axes",{value:i,writable:!1,enumerable:!1,configurable:!0});let a={};for(let r 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,r);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});let o={};for(let r of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(o,r);Object.defineProperty(t,"cache",{value:o,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:Le,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:[],svgWidth:0,svgHeight:0,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:Te,niceScaleDefaultTicks:Pt,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(t){let e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=A.extend({},t),e.initialSeries=A.clone(t.series),e.lastXAxis=A.clone(e.initialConfig.xaxis),e.lastYAxis=A.clone(e.initialConfig.yaxis),e}},Rt=class{constructor(t){this.opts=t}init(){let t=new ot(this.opts).init({responsiveOverride:!1}),e=new yt().init(t),s={config:t,globals:e,dom:{},interact:{zoomEnabled:t.chart.toolbar.autoSelected==="zoom"&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:t.chart.toolbar.autoSelected==="pan"&&t.chart.toolbar.tools.pan,selectionEnabled:t.chart.toolbar.autoSelected==="selection"&&t.chart.toolbar.tools.selection,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:M.isBrowser()?"ontouchstart"in window||navigator.maxTouchPoints>0:!1},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:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},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(){return s.dom},set(i){s.dom=i},enumerable:!1,configurable:!0});for(let i of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,i,{get(){return s.formatters[i]},set(a){s.formatters[i]=a},enumerable:!1,configurable:!0});for(let i of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","lastWheelExecution","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,i,{get(){return s.interact[i]},set(a){s.interact[i]=a},enumerable:!1,configurable:!0});for(let i of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords"])Object.defineProperty(e,i,{get(){return s.layout[i]},set(a){s.layout[i]=a},enumerable:!1,configurable:!0});for(let i of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,i,{get(){return s.seriesData[i]},set(a){s.seriesData[i]=a},enumerable:!1,configurable:!0});for(let i of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,i,{get(){return s.axisFlags[i]},set(a){s.axisFlags[i]=a},enumerable:!1,configurable:!0});for(let i of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,i,{get(){return s.labelData[i]},set(a){s.labelData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,i,{get(){return s.rangeData[i]},set(a){s.rangeData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,i,{get(){return s.candleData[i]},set(a){s.candleData[i]=a},enumerable:!1,configurable:!0});return s}},q=class{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=0,a=0;return e===void 0&&(e="line"),t.length&&typeof t[0].type<"u"&&t.forEach(o=>{(o.type==="bar"||o.type==="column"||o.type==="candlestick"||o.type==="boxPlot")&&i++,typeof o.type<"u"&&o.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){let e=this.w,s=[];if(e.seriesData.series.length===0)return s;for(let i=0;i<e.seriesData.series[e.globals.maxValsInArrayIndex].length;i++){let a=0;for(let o=0;o<e.seriesData.series.length;o++)typeof e.seriesData.series[o][i]<"u"&&t.indexOf(o)===-1&&(a+=e.seriesData.series[o][i]);s.push(a)}return s}getSeriesTotalByIndex(t=null){return t===null?this.w.config.series.reduce((e,s)=>e+s,0):this.w.seriesData.series[t].reduce((e,s)=>e+s,0)}getStackedSeriesTotalsByGroups(){let t=this.w,e=[];return t.labelData.seriesGroups.forEach(s=>{let i=[];t.config.series.forEach((o,r)=>{s.indexOf(t.seriesData.seriesNames[r])>-1&&i.push(r)});let a=t.seriesData.series.map((o,r)=>i.indexOf(r)===-1?r:-1).filter(o=>o!==-1);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){let t=this.w.globals,e=this.w.config,s=[],i=[],a=[],o=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(c=>Array.isArray(c.seriesName));e.series.forEach((c,n)=>{a.push(n),i.push(null)}),e.yaxis.forEach((c,n)=>{s[n]=[]});let r=[];e.yaxis.forEach((c,n)=>{let h=!1;if(c.seriesName){let d=[];Array.isArray(c.seriesName)?d=c.seriesName:d.push(c.seriesName),d.forEach(g=>{e.series.forEach((f,p)=>{if(f.name===g){let u=p;n===p||o?!o||a.indexOf(p)>-1?s[n].push([n,p]):console.warn("Series '"+f.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(s[p].push([p,n]),u=n),h=!0,u=a.indexOf(u),u!==-1&&a.splice(u,1)}})})}h||r.push(n)}),s=s.map(c=>{let n=[];return c.forEach(h=>{i[h[1]]=h[0],n.push(h[1])}),n});let l=e.yaxis.length-1;for(let c=0;c<r.length&&(l=r[c],s[l]=[],a);c++){let n=a[0];a.shift(),s[l].push(n),i[n]=l}a.forEach(c=>{s[l].push(c),i[c]=l}),t.seriesYAxisMap=s.map(c=>c),t.seriesYAxisReverseMap=i.map(c=>c),t.seriesYAxisMap.forEach((c,n)=>{c.forEach(h=>{if(e.series[h]&&e.series[h].group===void 0){let d=e.series[h];d.group="apexcharts-axis-".concat(n.toString())}})})}isSeriesNull(t=null){let e=[];return t===null?e=this.w.config.series.filter(s=>s!==null):e=this.w.config.series[t].data.filter(s=>s!==null),e.length===0}seriesHaveSameValues(t){return this.w.seriesData.series[t].every((e,s,i)=>e===i[0])}getCategoryLabels(t){let e=this.w,s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(i=>e.config.xaxis.labels.formatter(i-e.globals.minX+1))),s}getLargestSeries(){let t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){let t=this.w,e=0;return t.globals.markers.size.forEach(s=>{e=Math.max(e,s)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(s=>{e=Math.max(e,s.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(){let t=this.w;t.globals.seriesTotals=t.seriesData.series.map(e=>{let s=0;if(Array.isArray(e))for(let i=0;i<e.length;i++)s+=e[i];else s+=e;return s})}getSeriesTotalsXRange(t,e){let s=this.w;return s.seriesData.series.map((a,o)=>{let r=0;for(let l=0;l<a.length;l++)s.seriesData.seriesX[o][l]>t&&s.seriesData.seriesX[o][l]<e&&(r+=a[l]);return r})}getPercentSeries(){let t=this.w;t.globals.seriesPercent=t.seriesData.series.map(e=>{let s=[];if(Array.isArray(e))for(let i=0;i<e.length;i++){let a=t.seriesData.stackedSeriesTotals[i],o=0;a&&(o=100*e[i]/a),s.push(o)}else{let i=t.globals.seriesTotals.reduce((o,r)=>o+r,0),a=100*e/i;s.push(a)}return s})}getCalculatedRatios(){let t=this.w,e=t.globals,s=[],i=0,a=0,o=0,r=0,l=[],c=.1,n=0;if(e.yRange=[],e.isMultipleYAxis)for(let h=0;h<e.minYArr.length;h++)e.yRange.push(Math.abs(e.minYArr[h]-e.maxYArr[h])),l.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 h=0;h<e.yRange.length;h++)s.push(e.yRange[h]/this.w.layout.gridHeight);if(a=e.xRange/this.w.layout.gridWidth,i=e.yRange/this.w.layout.gridWidth,o=e.xRange/this.w.layout.gridHeight,r=e.zRange/this.w.layout.gridHeight*16,r||(r=1),e.minY!==Number.MIN_VALUE&&Math.abs(e.minY)!==0){let h=e;h.hasNegs=!0}if(t.globals.seriesYAxisReverseMap.length>0){let h=(d,g)=>{let f=t.config.yaxis[t.globals.seriesYAxisReverseMap[g]],p=d<0?-1:1;return d=Math.abs(d),f.logarithmic&&(d=this.getBaseLog(f.logBase,d)),-p*d/s[g]};if(e.isMultipleYAxis){l=[];for(let d=0;d<s.length;d++)l.push(h(e.minYArr[d],d))}else l=[],l.push(h(e.minY,0)),e.minY!==Number.MIN_VALUE&&Math.abs(e.minY)!==0&&(c=-e.minY/i,n=e.minX/a)}else l=[],l.push(0),c=0,n=0;return{yRatio:s,invertedYRatio:i,zRatio:r,xRatio:a,invertedXRatio:o,baseLineInvertedY:c,baseLineY:l,baseLineX:n}}getLogSeries(t){let e=this.w;return e.globals.seriesLog=t.map((s,i)=>{let a=e.globals.seriesYAxisReverseMap[i];return e.config.yaxis[a]&&e.config.yaxis[a].logarithmic?s.map(o=>o===null?null:this.getLogVal(e.config.yaxis[a].logBase,o,i)):s}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(t===null)return null;let 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;let i=this.w,a=i.globals.minYArr[s]===0?-1:this.getBaseLog(t,i.globals.minYArr[s]),r=(i.globals.maxYArr[s]===0?0:this.getBaseLog(t,i.globals.maxYArr[s]))-a;return e<1?e/r:(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){let e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((a,o)=>{let r=e.globals.seriesYAxisReverseMap[o];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let l=-Number.MAX_VALUE,c=Number.MIN_VALUE,n=1;return s.seriesLog.forEach((h,d)=>{h.forEach(g=>{e.config.yaxis[d]&&e.config.yaxis[d].logarithmic&&(l=Math.max(g,l),c=Math.min(g,c))})}),n=Math.pow(s.yRange[o],Math.abs(c-l)/s.yRange[o]),i.yLogRatio[o]=n/this.w.layout.gridHeight,n}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return e?.yaxis&&(e=t.extendYAxis(e,s)),e?.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(i=e?.annotations)!=null&&i.xaxis&&(e=t.extendXAxisAnnotations(e)),(a=e?.annotations)!=null&&a.points&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,s,i){let a=this.w,o=[];return t.series.length>0&&e.forEach(r=>{let l=[],c=[];t.i.forEach((n,h)=>{a.config.series[n].group===r&&(l.push(t.series[h]),c.push(n))}),l.length>0&&o.push(i.draw(l,s,c))}),o}},ht=class{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()})}animateRect(t,e,s,i,a){t.attr(e).animate(i).attr(s).after(()=>a())}animatePathsGradually(t){let{el:e,realIndex:s,j:i,fill:a,pathFrom:o,pathTo:r,speed:l,delay:c}=t,n=this,h=this.w,d=0;h.config.chart.animations.animateGradually.enabled&&(d=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&h.config.chart.type!=="bar"&&(d=0),n.morphSVG(e,s,i,h.config.chart.type==="line"&&!h.globals.comboCharts?"stroke":a,o,r,l,c*d)}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{let e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(t){let e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),typeof e.config.chart.events.animationEnd=="function"&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}morphSVG(t,e,s,i,a,o,r,l){let c=this.w;a||(a=t.attr("pathFrom")),o||(o=t.attr("pathTo"));let n=()=>(c.config.chart.type==="radar"&&(r=1),`M 0 ${c.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=n()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=n()),c.globals.shouldAnimate||(r=1),t.plot(a).animate(1,l).plot(a).animate(r,l).plot(o).after(()=>{A.isNumber(s)?s===c.seriesData.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&this.animationCompleted(t):i!=="none"&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.seriesData.series.length-1||c.globals.comboCharts)&&this.animationCompleted(t),this.showDelayedElements()})}},Z=class{constructor(t){this.w=t}getDefaultFilter(t,e){let 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,o;let r=this.w;if(t.unfilter&&t.unfilter(!0),s==="none"){this.getDefaultFilter(t,e);return}let l=r.config.chart.dropShadow,c=s==="lighten"?2:.3;t.filterWith&&(t.filterWith(n=>{n.colorMatrix({type:"matrix",values:`
            ${c} 0 0 0 0
            0 ${c} 0 0 0
            0 0 ${c} 0 0
            0 0 0 1 0
          `,in:"SourceGraphic",result:"brightness"}),l.enabled&&this.addShadow(n,e,l,"brightness")}),l.noUserSpaceOnUse||(a=(i=t.filterer())==null?void 0:i.node)==null||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((o=t.filterer())==null?void 0:o.node))}addShadow(t,e,s,i){var a;let o=this.w,{blur:r,top:l,left:c,color:n,opacity:h}=s;if(n=Array.isArray(n)?n[e]:n,((a=o.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.length)>0&&o.config.chart.dropShadow.enabledOnSeries.indexOf(e)===-1)return t;t.offset({in:i,dx:c,dy:l,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:r,result:"blur"}),t.flood({"flood-color":n,"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,o,r,l;let c=this.w;return t.unfilter&&t.unfilter(!0),A.isMsEdge()&&c.config.chart.type==="radialBar"||((i=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:i.length)>0&&((a=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.indexOf(s))===-1||t.filterWith&&(t.filterWith(n=>{this.addShadow(n,s,e,"SourceGraphic")}),e.noUserSpaceOnUse||(r=(o=t.filterer())==null?void 0:o.node)==null||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((l=t.filterer())==null?void 0:l.node)),t}setSelectionFilter(t,e,s){let i=this.w;if(typeof i.interact.selectedDataPoints[e]<"u"&&i.interact.selectedDataPoints[e].indexOf(s)>-1){t.node.setAttribute("selected",!0);let a=i.config.states.active.filter;a!=="none"&&this.applyFilter(t,e,a.type)}}_scaleFilterSize(t){if(!t)return;(s=>{for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&t.setAttribute(i,s[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}},L=class b{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){t.indexOf("NaN")>-1&&(t="");function s(D,k,N){var E=k.x-D.x,T=k.y-D.y,X=Math.sqrt(E*E+T*T);return i(D,k,Math.min(1,N/X))}function i(D,k,N){return{x:D.x+(k.x-D.x)*N,y:D.y+(k.y-D.y)*N}}function a(D,k){D.length>2&&(D[D.length-2]=k.x,D[D.length-1]=k.y)}function o(D){return{x:parseFloat(D[D.length-2]),y:parseFloat(D[D.length-1])}}var r=t.split(/[,\s]/).reduce(function(D,k){var N=k.match(/^([a-zA-Z])(.+)/);return N?(D.push(N[1]),D.push(N[2])):D.push(k),D},[]),l=r.reduce(function(D,k){return parseFloat(k)==k&&D.length?D[D.length-1].push(k):D.push([k]),D},[]),c=[];if(l.length>1){var n=o(l[0]),h=null;l[l.length-1][0]=="Z"&&l[0].length>2&&(h=["L",n.x,n.y],l[l.length-1]=h),c.push(l[0]);for(var d=1;d<l.length;d++){var g=c[c.length-1],f=l[d],p=f==h?l[1]:l[d+1];if(p&&g&&g.length>2&&f[0]=="L"&&p.length>2&&p[0]=="L"){var u=o(g),m=o(f),x=o(p),y,w;y=s(m,u,e),w=s(m,x,e),a(f,y),f.origPoint=m,c.push(f);var S=i(y,m,.5),v=i(m,w,.5),C=["C",S.x,S.y,v.x,v.y,w.x,w.y];C.origPoint=m,c.push(C)}else c.push(f)}if(h){var _=o(c[c.length-1]);c.push(["Z"]),a(c[0],_)}}else c=l;return c.reduce(function(D,k){return D+k.join(" ")+" "},"")}drawLine(t,e,s,i,a="#a8a8a8",o=0,r=null,l="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":o,"stroke-width":r,"stroke-linecap":l})}drawRect(t=0,e=0,s=0,i=0,a=0,o="#fefefe",r=1,l=null,c=null,n=0){let d=this.w.dom.Paper.rect();return d.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,rx:a,ry:a,opacity:r,"stroke-width":l!==null?l:0,stroke:c!==null?c:"none","stroke-dasharray":n}),d.node.setAttribute("fill",o),d}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){let s=this.w;t<0&&(t=0);let i=s.dom.Paper.circle(t*2);return e!==null&&i.attr(e),i}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,fillOpacity:a=1,strokeOpacity:o=1,classes:r,strokeLinecap:l=null,strokeDashArray:c=0}){let n=this.w;return l===null&&(l=n.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${n.layout.gridHeight}`),n.dom.Paper.path(t).attr({fill:i,"fill-opacity":a,stroke:e,"stroke-opacity":o,"stroke-linecap":l,"stroke-width":s,"stroke-dasharray":c,class:r})}group(t=null){let s=this.w.dom.Paper.group();return t!==null&&s.attr(t),s}move(t,e){return["M",t,e].join(" ")}line(t,e,s=null){return s==="H"?[" H",t].join(" "):s==="V"?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,s,i,a,o){return["C",t,e,s,i,a,o].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,o,r,l=!1){let c="A";return l&&(c="a"),[c,t,e,s,i,a,o,r].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,stroke:a,strokeWidth:o,strokeLinecap:r,fill:l,animationDelay:c,initialSpeed:n,dataChangeSpeed:h,className:d,chartType:g,shouldClipToGrid:f=!0,bindEventsOnPaths:p=!0,drawShadow:u=!0}){let m=this.w,x=new Z(this.w),y=new ht(this.w,void 0),w=this.w.config.chart.animations.enabled,S=w&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0")&&i){let E=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);E&&(s=s.replace(/^M\s+0\s+0/,E[0]))}let v,C=!!(w&&!m.globals.resized||S&&m.globals.dataChanged&&m.globals.shouldAnimate);C?v=s:(v=i,m.globals.animationEnded=!0);let _=m.config.stroke.dashArray,D=0;Array.isArray(_)?D=_[e]:D=m.config.stroke.dashArray;let k=this.drawPath({d:v,stroke:a,strokeWidth:o,fill:l,fillOpacity:1,classes:d,strokeLinecap:r,strokeDashArray:D});k.attr("index",e),f&&(g==="bar"&&!m.globals.isBarHorizontal||m.globals.comboCharts?k.attr({"clip-path":`url(#gridRectBarMask${m.globals.cuid})`}):k.attr({"clip-path":`url(#gridRectMask${m.globals.cuid})`})),m.config.chart.dropShadow.enabled&&u&&x.dropShadow(k,m.config.chart.dropShadow,e),p&&(k.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,k)),k.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,k)),k.node.addEventListener("mousedown",this.pathMouseDown.bind(this,k))),k.attr({pathTo:i,pathFrom:s});let N={el:k,j:t,realIndex:e,pathFrom:s,pathTo:i,fill:l,strokeWidth:o,delay:c};return w&&!m.globals.resized&&!m.globals.dataChanged?y.animatePathsGradually(O(Y({},N),{speed:n})):(m.globals.resized||!m.globals.dataChanged)&&y.showDelayedElements(),m.globals.dataChanged&&S&&C&&y.animatePathsGradually(O(Y({},N),{speed:h})),k}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,l=>{t==="horizontalLines"?l.line(0,0,s,0).stroke({color:i,width:a+1}):t==="verticalLines"?l.line(0,0,0,e).stroke({color:i,width:a+1}):t==="slantedLines"?l.line(0,0,e,s).stroke({color:i,width:a}):t==="squares"?l.rect(e,s).fill("none").stroke({color:i,width:a}):t==="circles"&&l.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,o=null,r=null,l=[],c=0){let n=this.w,h;e.length<9&&e.indexOf("#")===0&&(e=A.hexToRgba(e,i)),s.length<9&&s.indexOf("#")===0&&(s=A.hexToRgba(s,a));let d=0,g=1,f=1,p=null;r!==null&&(d=typeof r[0]<"u"?r[0]/100:0,g=typeof r[1]<"u"?r[1]/100:1,f=typeof r[2]<"u"?r[2]/100:1,p=typeof r[3]<"u"?r[3]/100:null);let u=n.config.chart.type==="donut"||n.config.chart.type==="pie"||n.config.chart.type==="polarArea"||n.config.chart.type==="bubble";if(!l||l.length===0?h=n.dom.Paper.gradient(u?"radial":"linear",m=>{m.stop(d,e,i),m.stop(g,s,a),m.stop(f,s,a),p!==null&&m.stop(p,e,i)}):h=n.dom.Paper.gradient(u?"radial":"linear",m=>{(Array.isArray(l[c])?l[c]:l).forEach(y=>{m.stop(y.offset/100,y.color,y.opacity)})}),!u)t==="vertical"?h.from(0,0).to(0,1):t==="diagonal"?h.from(0,0).to(1,1):t==="horizontal"?h.from(0,1).to(1,1):t==="diagonal2"&&h.from(1,0).to(0,1);else{let m=n.layout.gridWidth/2,x=n.layout.gridHeight/2;n.config.chart.type!=="bubble"?h.attr({gradientUnits:"userSpaceOnUse",cx:m,cy:x,r:o}):h.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}return h}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){let a=this.getTextRects(t,s,i,""),o=a.width/t.length,r=Math.floor(e/o);return e<a.width?t.slice(0,r-3)+"...":t}drawText({x:t,y:e,text:s,textAnchor:i,fontSize:a,fontFamily:o,fontWeight:r,foreColor:l,opacity:c,maxWidth:n,cssClass:h="",isPlainText:d=!0,dominantBaseline:g="auto"}){let f=this.w;typeof s>"u"&&(s="");let p=s;i||(i="start"),(!l||!l.length)&&(l=f.config.chart.foreColor),o=o||f.config.chart.fontFamily,a=a||"11px",r=r||"regular";let u={maxWidth:n,fontSize:a,fontFamily:o},m;return Array.isArray(s)?m=f.dom.Paper.text(x=>{for(let y=0;y<s.length;y++)p=s[y],n&&(p=this.getTextBasedOnMaxWidth(Y({text:s[y]},u))),y===0?x.tspan(p):x.tspan(p).newLine()}):(n&&(p=this.getTextBasedOnMaxWidth(Y({text:s},u))),m=d?f.dom.Paper.plain(s):f.dom.Paper.text(x=>x.tspan(p))),m.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":g,"font-size":a,"font-family":o,"font-weight":r,fill:l,class:"apexcharts-text "+h}),m.node.style.fontFamily=o,m.node.style.opacity=c,m}getMarkerPath(t,e,s,i){let a="";switch(s){case"cross":i=i/1.4,a=`M ${t-i} ${e-i} L ${t+i} ${e+i}  M ${t-i} ${e+i} L ${t+i} ${e-i}`;break;case"plus":i=i/1.12,a=`M ${t-i} ${e} L ${t+i} ${e}  M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let o=5;i=i*1.15,s==="sparkle"&&(i=i/1.1,o=4);let r=Math.PI/o;for(let l=0;l<=2*o;l++){let c=l*r,n=l%2===0?i:i/2,h=t+n*Math.sin(c),d=e-n*Math.cos(c);a+=(l===0?"M":"L")+h+","+d}a+="Z";break}case"triangle":a=`M ${t} ${e-i} 
             L ${t+i} ${e+i} 
             L ${t-i} ${e+i} 
             Z`;break;case"square":case"rect":i=i/1.125,a=`M ${t-i} ${e-i} 
           L ${t+i} ${e-i} 
           L ${t+i} ${e+i} 
           L ${t-i} ${e+i} 
           Z`;break;case"diamond":i=i*1.05,a=`M ${t} ${e-i} 
             L ${t+i} ${e} 
             L ${t} ${e+i} 
             L ${t-i} ${e} 
            Z`;break;case"line":i=i/1.1,a=`M ${t-i} ${e} 
           L ${t+i} ${e}`;break;default:i=i*2,a=`M ${t}, ${e} 
           m -${i/2}, 0 
           a ${i/2},${i/2} 0 1,0 ${i},0 
           a ${i/2},${i/2} 0 1,0 -${i},0`;break}return a}drawMarkerShape(t,e,s,i,a){let o=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 o.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),o}drawMarker(t,e,s){t=t||0;let i=s.pSize||0;return A.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,s?.shape,i,Y(Y({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;let a=this.w,o=new Z(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),l=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(!(isNaN(r)||isNaN(l))&&(typeof a.config.chart.events.dataPointMouseEnter=="function"&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:r,dataPointIndex:l,w:a}),b._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:l,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice)){let c=a.config.states.hover.filter;o.applyFilter(t,r,c.type)}}pathMouseLeave(t,e){var s,i;let a=this.w,o=new Z(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),l=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);isNaN(r)||isNaN(l)||(typeof a.config.chart.events.dataPointMouseLeave=="function"&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:r,dataPointIndex:l,w:a}),b._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:l,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&a.config.states.hover.filter.type!=="none"&&o.getDefaultFilter(t,r))}pathMouseDown(t,e){var s,i;let a=this.w,o=new Z(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),l=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(isNaN(r)||isNaN(l))return;let c="false";if(t.node.getAttribute("selected")==="true"){t.node.setAttribute("selected","false");let n=a.interact.selectedDataPoints[r].indexOf(l);n>-1&&a.interact.selectedDataPoints[r].splice(n,1)}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0){a.interact.selectedDataPoints=[];let n=a.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=a.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),d=g=>{Array.prototype.forEach.call(g,f=>{f.node.setAttribute("selected","false"),o.getDefaultFilter(f,r)})};d(n),d(h)}t.node.setAttribute("selected","true"),c="true",typeof a.interact.selectedDataPoints[r]>"u"&&(a.interact.selectedDataPoints[r]=[]),a.interact.selectedDataPoints[r].push(l)}if(c==="true"){let n=a.config.states.active.filter;if(n!=="none")o.applyFilter(t,r,n.type);else if(a.config.states.hover.filter!=="none"&&!a.interact.isTouchDevice){let h=a.config.states.hover.filter;o.applyFilter(t,r,h.type)}}else if(a.config.states.active.filter.type!=="none")if(a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice){let n=a.config.states.hover.filter;o.applyFilter(t,r,n.type)}else o.getDefaultFilter(t,r);typeof a.config.chart.events.dataPointSelection=="function"&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:l,w:a}),e&&b._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:l,w:a}])}rotateAroundCenter(t){let e={};t&&typeof t.getBBox=="function"&&(e=t.getBBox());let s=e.x+e.width/2,i=e.y+e.height/2;return{x:s,y:i}}setupEventDelegation(t,e){let s=null;t.node.addEventListener("mouseover",i=>{let a=b._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?b._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",i=>{let a=b._findDelegateTarget(i.target,t.node,e);a&&a.instance&&this.pathMouseDown(a.instance,i)})}static _fireEvent(t,e,s){let i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;let a=i[e];for(let o=0;o<a.length;o++)a[o].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(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])}getTextRects(t,e,s,i,a=!0){let o=this.w,r=[t,e,s,i,a].join("\0"),l=o.globals.textRectsCache;if(l&&l.has(r))return l.get(r);let c=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,foreColor:"#fff",opacity:0});i&&c.attr("transform",i),o.dom.Paper.add(c);let n=c.bbox();a||(n=c.node.getBoundingClientRect()),c.remove();let h={width:n.width,height:n.height};return l&&l.set(r,h),h}placeTextWithEllipsis(t,e,s){if(typeof t.getComputedTextLength=="function"&&(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){t.textContent=e.substring(0,i)+"...";return}t.textContent="."}}},H="http://www.w3.org/2000/svg",j=class b{constructor(t,e){typeof t=="object"?(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)}},ct=class b{constructor(t,e,s,i,a,o){this.a=t??1,this.b=e??0,this.c=s??0,this.d=i??1,this.e=a??0,this.f=o??0}rotate(t){let e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new b(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new b(t,0,0,e??t,0,0))}multiply(t){return new b(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 j(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}},be=class{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}},wt=class{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){let e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),o=i>a?i:a,r=t.image,l=0,c=0;typeof t.width>"u"&&typeof t.height>"u"?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(l=s.fill.image.width+1,c=s.fill.image.height):(l=o+1,c=o):(l=t.width,c=t.height);let n=F.createElementNS(H,"pattern");L.setAttrs(n,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:l+"px",height:c+"px"});let h=F.createElementNS(H,"image");n.appendChild(h);let d=M.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(d.xlink,"href",r),L.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:c+"px"}),h.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(n)}getSeriesIndex(t){let e=this.w,s=e.config.chart.type;return(s==="bar"||s==="rangeBar")&&e.config.plotOptions.bar.distributed||s==="heatmap"||s==="treemap"?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}computeColorStops(t,e){let s=this.w,i=null,a=null;for(let c of t)c>=e.threshold?(i===null||c>i)&&(i=c):(a===null||c<a)&&(a=c);i===null&&(i=e.threshold),a===null&&(a=e.threshold);let o=i-e.threshold+(e.threshold-a);o===0&&(o=1);let l=100-(e.threshold-a)/o*100;return l=Math.max(0,Math.min(l,100)),[{offset:l,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;let o=this.w;this.opts=t;let r=this.w.config,l,c,n;this.seriesIndex=this.getSeriesIndex(t);let h=r.plotOptions.line.colors.colorAboveThreshold&&r.plotOptions.line.colors.colorBelowThreshold,g=this.getFillColors()[this.seriesIndex];o.seriesData.seriesColors[this.seriesIndex]!==void 0&&(g=o.seriesData.seriesColors[this.seriesIndex]),typeof g=="function"&&(g=g({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:o}));let f=t.fillType?t.fillType:this.getFillType(this.seriesIndex),p=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity,u=f==="gradient"||h;t.color&&(g=t.color);let m=o.config.series[this.seriesIndex];(s=(e=m?.data)==null?void 0:e[t.dataPointIndex])!=null&&s.fillColor&&(g=(a=(i=m?.data)==null?void 0:i[t.dataPointIndex])==null?void 0:a.fillColor),g||(g="#fff",console.warn("undefined color - ApexCharts")),t.opacity!==void 0&&t.opacity!==null&&(p=t.opacity);let x=g;A.isCSSVariable(g)?x=A.applyOpacityToColor(g,p):g.indexOf("rgb")===-1?g.indexOf("#")===-1?x=g:g.length<9&&(x=A.hexToRgba(g,p)):g.indexOf("rgba")>-1?p=A.getOpacityFromRGBA(g):x=A.hexToRgba(A.rgb2hex(g),p);let y=A.isCSSVariable(g)?A.getThemeColor(g):g;if(f==="pattern"&&(c=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:c,fillColor:y,defaultColor:x})),u){let w=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[],S=r.fill.gradient.type;h&&(w[this.seriesIndex]=this.computeColorStops(o.seriesData.series[this.seriesIndex],r.plotOptions.line.colors),S="vertical"),n=this.handleGradientFill({type:S,fillConfig:t.fillConfig,fillColor:y,fillOpacity:p,colorStops:w,i:this.seriesIndex})}if(f==="image"){let w=r.fill.image.src,S=t.patternID?t.patternID:"",v=`pattern${o.globals.cuid}${t.seriesNumber+1}${S}`;this.patternIDs.indexOf(v)===-1&&(this.clippedImgArea({opacity:p,image:Array.isArray(w)?t.seriesNumber<w.length?w[t.seriesNumber]:w[0]:w,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:v}),this.patternIDs.push(v)),l=`url(#${v})`}else u?l=n:f==="pattern"?l=c:l=x;return t.solid&&(l=x),l}getFillType(t){let e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}getFillColors(){let t=this.w,e=t.config,s=this.opts,i=[];return t.globals.comboCharts?t.config.series[this.seriesIndex].type==="line"?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):e.chart.type==="line"?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),typeof s.fillColors<"u"&&(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);let o=this.opts,r=new L(this.w),l=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,c=s;return Array.isArray(a.pattern.style)?typeof a.pattern.style[o.seriesNumber]<"u"?e=r.drawPattern(a.pattern.style[o.seriesNumber],a.pattern.width,a.pattern.height,c,l):e=i:e=r.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,c,l),e}handleGradientFill({type:t,fillColor:e,fillOpacity:s,fillConfig:i,colorStops:a,i:o}){let r=this.w.config.fill;i&&(r=Y(Y({},r),i));let l=this.opts,c=new L(this.w),n=new A;t=t||r.gradient.type;let h=e,d,g=r.gradient.opacityFrom===void 0?s:Array.isArray(r.gradient.opacityFrom)?r.gradient.opacityFrom[o]:r.gradient.opacityFrom;h.indexOf("rgba")>-1&&(g=A.getOpacityFromRGBA(h));let f=r.gradient.opacityTo===void 0?s:Array.isArray(r.gradient.opacityTo)?r.gradient.opacityTo[o]:r.gradient.opacityTo;if(r.gradient.gradientToColors===void 0||r.gradient.gradientToColors.length===0)r.gradient.shade==="dark"?d=n.shadeColor(parseFloat(r.gradient.shadeIntensity)*-1,e.indexOf("rgb")>-1?A.rgb2hex(e):e):d=n.shadeColor(parseFloat(r.gradient.shadeIntensity),e.indexOf("rgb")>-1?A.rgb2hex(e):e);else if(r.gradient.gradientToColors[l.seriesNumber]){let p=r.gradient.gradientToColors[l.seriesNumber];d=p,p.indexOf("rgba")>-1&&(f=A.getOpacityFromRGBA(p))}else d=e;if(r.gradient.gradientFrom&&(h=r.gradient.gradientFrom),r.gradient.gradientTo&&(d=r.gradient.gradientTo),r.gradient.inverseColors){let p=h;h=d,d=p}return h.indexOf("rgb")>-1&&(h=A.rgb2hex(h)),d.indexOf("rgb")>-1&&(d=A.rgb2hex(d)),c.drawGradient(t,h,d,g,f,l.size,r.gradient.stops,a,o)}},dt=class{constructor(t,e){this.w=t,this.ctx=e,this._filters=new Z(this.w),this._graphics=new L(this.w,this.ctx)}setGlobalMarkerSize(){let 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++)typeof t.globals.markers.size[e]>"u"&&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:o=!1}){let r=this.w,l=e,c=t,n=null,h=new L(this.w),d=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(c.x))for(let g=0;g<c.x.length;g++){let f,p=s,u=!A.isNumber(c.y[g]);r.globals.markers.largestSize===0&&r.globals.hasNullValues&&r.seriesData.series[l][s+1]!==null&&!o&&(u=!0),s===1&&g===0&&(p=0),s===1&&g===1&&(p=1);let m="apexcharts-marker";if((r.config.chart.type==="line"||r.config.chart.type==="area")&&!r.globals.comboCharts&&!r.config.tooltip.intersect&&(m+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[e]>0:r.config.markers.size>0)||a||d){u||(m+=` w${A.randomId()}`);let y=this.getMarkerConfig({cssClass:m,seriesIndex:e,dataPointIndex:p}),w=r.config.series[l];w.data[p]&&(w.data[p].fillColor&&(y.pointFillColor=w.data[p].fillColor),w.data[p].strokeColor&&(y.pointStrokeColor=w.data[p].strokeColor)),typeof i<"u"&&(y.pSize=i),(c.x[g]<-r.globals.markers.largestSize||c.x[g]>r.layout.gridWidth+r.globals.markers.largestSize||c.y[g]<-r.globals.markers.largestSize||c.y[g]>r.layout.gridHeight+r.globals.markers.largestSize)&&(y.pSize=0),u||((r.globals.markers.size[e]>0||a||d)&&!n&&(n=h.group({class:a||d?"":"apexcharts-series-markers"}),n.attr("clip-path",`url(#gridRectMarkerMask${r.globals.cuid})`),this.setupMarkerDelegation(n)),f=h.drawMarker(c.x[g],c.y[g],y),f.attr("rel",p),f.attr("j",p),f.attr("index",e),f.node.setAttribute("default-marker-size",y.pSize),this._filters.setSelectionFilter(f,e,p),n&&n.add(f))}else typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([c.x[g],c.y[g]])}return n}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth:o=null}){let r=this.w,l=this.getMarkerStyle(e),c=a===null?r.globals.markers.size[e]:a,n=r.config.markers;return s!==null&&n.discrete.length&&n.discrete.map(h=>{h.seriesIndex===e&&h.dataPointIndex===s&&(l.pointStrokeColor=h.strokeColor,l.pointFillColor=h.fillColor,c=h.size,l.pointShape=h.shape)}),{pSize:i===null?c:i,pRadius:i!==null?i:n.radius,pointStrokeWidth:o!==null?o:Array.isArray(n.strokeWidth)?n.strokeWidth[e]:n.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(n.shape)?n.shape[e]:n.shape),class:t,pointStrokeOpacity:Array.isArray(n.strokeOpacity)?n.strokeOpacity[e]:n.strokeOpacity,pointStrokeDashArray:Array.isArray(n.strokeDashArray)?n.strokeDashArray[e]:n.strokeDashArray,pointFillOpacity:Array.isArray(n.fillOpacity)?n.fillOpacity[e]:n.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){let e=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{e.config.markers.onClick&&L._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}),t.node.addEventListener("dblclick",i=>{e.config.markers.onDblClick&&L._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}),t.node.addEventListener("touchstart",i=>{let a=L._findDelegateTarget(i.target,t.node,s);a&&a.instance&&this._graphics.pathMouseDown(a.instance,i)},{passive:!0})}addEvents(t){let 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){let e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors,a=Array.isArray(i)?i[t]:i,o=Array.isArray(s)?s[t]:s;return{pointStrokeColor:a,pointFillColor:o}}},Yt=class{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new ht(this.w),this.filters=new Z(this.w),this.fill=new wt(this.w),this.markers=new dt(this.w,this.ctx),this.graphics=new L(this.w)}draw(t,e,s){let i=this.w,a=this.graphics,o=s.realIndex,r=s.pointsPos,l=s.zRatio,c=s.elParent,n=a.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`});if(n.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(n),Array.isArray(r.x))for(let h=0;h<r.x.length;h++){let d=e+1,g=!0;e===0&&h===0&&(d=0),e===0&&h===1&&(d=1);let f=i.globals.markers.size[o];if(l!==1/0){let m=i.config.plotOptions.bubble;f=i.seriesData.seriesZ[o][d],m.zScaling&&(f/=l),m.minBubbleRadius&&f<m.minBubbleRadius&&(f=m.minBubbleRadius),m.maxBubbleRadius&&f>m.maxBubbleRadius&&(f=m.maxBubbleRadius)}let p=r.x[h],u=r.y[h];if(f=f||0,(u===null||typeof i.seriesData.series[o][d]>"u")&&(g=!1),g){let m=this.drawPoint(p,u,f,o,d,e);n.add(m)}c.add(n)}}drawPoint(t,e,s,i,a,o){let r=this.w,l=i,c=this.anim,n=this.filters,h=this.fill,d=this.markers,g=this.graphics,f=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:r.config.chart.type==="bubble"||r.globals.comboCharts&&r.config.series[i]&&r.config.series[i].type==="bubble"?s:null}),p=h.fillPath({seriesNumber:i,dataPointIndex:a,color:f.pointFillColor,patternUnits:"objectBoundingBox",value:r.seriesData.series[i][o]}),u=g.drawMarker(t,e,f),m=r.config.series[l];if(m.data[a]&&m.data[a].fillColor&&(p=m.data[a].fillColor),u.attr({fill:p}),r.config.chart.dropShadow.enabled){let x=r.config.chart.dropShadow;n.dropShadow(u,x,i)}if(this.initialAnim&&!r.globals.dataChanged&&!r.globals.resized){let x=r.config.chart.animations.speed;c.animateMarker(u,x,r.globals.easing,()=>{window.setTimeout(()=>{c.animationCompleted(u)},100)})}else r.globals.animationEnded=!0;return u.attr({rel:a,j:a,index:i,"default-marker-size":f.pSize}),n.setSelectionFilter(u,i,a),u.node.classList.add("apexcharts-marker"),u}centerTextInBubble(t){let e=this.w;return t=t+parseInt(e.config.dataLabels.style.fontSize,10)/4,{y:t}}},vt=class{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,o,r){let l=this.w,c=new L(this.w),n=!1,h=c.getTextRects(s,r),d=h.width,g=h.height;e<0&&(e=0),e>l.layout.gridHeight+g&&(e=l.layout.gridHeight+g/2),typeof l.globals.dataLabelsRects[i]>"u"&&(l.globals.dataLabelsRects[i]=[]),l.globals.dataLabelsRects[i].push({x:t,y:e,width:d,height:g});let f=l.globals.dataLabelsRects[i].length-2,p=typeof l.globals.lastDrawnDataLabelsIndexes[i]<"u"?l.globals.lastDrawnDataLabelsIndexes[i][l.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(typeof l.globals.dataLabelsRects[i][f]<"u"){let u=l.globals.dataLabelsRects[i][p];(t>u.x+u.width||e>u.y+u.height||e+g<u.y||t+d<u.x)&&(n=!0)}return(a===0||o)&&(n=!0),{x:t,y:e,textRects:h,drawnextLabel:n}}drawDataLabel({type:t,pos:e,i:s,j:i,isRangeStart:a,strokeWidth:o=2}){let r=this.w,l=new L(this.w),c=r.config.dataLabels,n=0,h=0,d=i,g=null;if(r.globals.collapsedSeriesIndices.indexOf(s)!==-1||!c.enabled||!Array.isArray(e.x))return g;g=l.group({class:"apexcharts-data-labels"});for(let p=0;p<e.x.length;p++)if(n=e.x[p]+c.offsetX,h=e.y[p]+c.offsetY+o,!isNaN(n)){i===1&&p===0&&(d=0),i===1&&p===1&&(d=1);let u=r.seriesData.series[s][d];t==="rangeArea"&&(a?u=r.rangeData.seriesRangeStart[s][d]:u=r.rangeData.seriesRangeEnd[s][d]);let m="",x=w=>r.config.dataLabels.formatter(w,{seriesIndex:s,dataPointIndex:d,w:r});r.config.chart.type==="bubble"?(u=r.seriesData.seriesZ[s][d],m=x(u),h=e.y[p],h=new Yt(this.w,this.ctx).centerTextInBubble(h).y):typeof u<"u"&&(m=x(u));let y=r.config.dataLabels.textAnchor;r.globals.isSlopeChart&&(d===0?y="end":d===r.config.series[s].data.length-1?y="start":y="middle"),this.plotDataLabelsText({x:n,y:h,text:m,i:s,j:d,parent:g,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:y})}return g}plotDataLabelsText(t){let e=this.w,s=new L(this.w),{x:i,y:a,i:o,j:r,text:l,textAnchor:c,fontSize:n,parent:h,dataLabelsConfig:d,color:g,alwaysDrawDataLabel:f,offsetCorrection:p,className:u}=t,m=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(o)<0)return m;let x={x:i,y:a,drawnextLabel:!0,textRects:null};p&&(x=this.dataLabelsCorrection(i,a,l,o,r,f,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=x.x,a=x.y),x.textRects&&(i<-20-x.textRects.width||i>e.layout.gridWidth+x.textRects.width+30)&&(l="");let y=e.globals.dataLabels.style.colors[o];((e.config.chart.type==="bar"||e.config.chart.type==="rangeBar")&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(y=e.globals.dataLabels.style.colors[r]),typeof y=="function"&&(y=y({series:e.seriesData.series,seriesIndex:o,dataPointIndex:r,w:e})),g&&(y=g);let w=d.offsetX,S=d.offsetY;if((e.config.chart.type==="bar"||e.config.chart.type==="rangeBar")&&(w=0,S=0),e.globals.isSlopeChart&&(r!==0&&(w=d.offsetX*-2+5),r!==0&&r!==e.config.series[o].data.length-1&&(w=0)),x.drawnextLabel){if(c==="middle"&&i===e.layout.gridWidth&&(c="end"),m=s.drawText({x:i+w,y:a+S,foreColor:y,textAnchor:c||d.textAnchor,text:l,fontSize:n||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),m.attr({class:u||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){let v=d.dropShadow;new Z(this.w).dropShadow(m,v)}h.add(m),typeof e.globals.lastDrawnDataLabelsIndexes[o]>"u"&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(r)}return m}addBackgroundToDataLabel(t,e){let s=this.w,i=s.config.dataLabels.background,a=i.padding,o=i.padding/2,r=e.width,l=e.height,n=new L(this.w).drawRect(e.x-a,e.y-o/2,r+a*2,l+o,i.borderRadius,s.config.chart.background==="transparent"||!s.config.chart.background?"#fff":s.config.chart.background,i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new Z(this.w).dropShadow(n,i.dropShadow),n}dataLabelsBackground(){var t;let e=this.w;if(e.config.chart.type==="bubble")return;let s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i<s.length;i++){let a=s[i],o=a.getBBox(),r=null;if(o.width&&o.height&&(r=this.addBackgroundToDataLabel(a,o)),r){(t=a.parentNode)==null||t.insertBefore(r.node,a);let l=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:l}):r.attr({fill:l}),a.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}bringForward(){let t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let i=0;i<e.length;i++)s&&s.insertBefore(e[i],s.nextSibling)}},ft=class{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?s():(t.globals.cachedSelectors||(t.globals.cachedSelectors={}),t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=s()),t.globals.cachedSelectors[e])}static getCachedDimension(t,e,s,i=1e3){if(!t||!t.globals)return s();t.globals.dimensionCache||(t.globals.dimensionCache={});let a=t.globals.dimensionCache[e],o=Date.now();if(a&&a.lastUpdate&&o-a.lastUpdate<i)return a.value;let r=s();return t.globals.dimensionCache[e]={value:r,lastUpdate:o},r}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?null:t.globals.domCache.get(e)||null}},Q=class{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s}getLabel(t,e,s,i,a=[],o="12px",r=!0){let l=this.w,c=typeof t[i]>"u"?"":t[i],n=c,h=l.formatters.xLabelFormatter,d=l.config.xaxis.labels.formatter,g=!1,f=new at(this.w),p=c;r&&(n=f.xLabelFormat(h,c,p,{i,dateFormatter:new B(this.w).formatDate,w:l}),d!==void 0&&(n=d(c,t[i],{i,dateFormatter:new B(this.w).formatDate,w:l})));let u=w=>{let S=null;return e.forEach(v=>{v.unit==="month"?S="year":v.unit==="day"?S="month":v.unit==="hour"?S="day":v.unit==="minute"&&(S="hour")}),S===w};e.length>0?(g=u(e[i].unit),s=e[i].position,n=e[i].value):l.config.xaxis.type==="datetime"&&d===void 0&&(n=""),typeof n>"u"&&(n=""),n=Array.isArray(n)?n:n.toString();let m=new L(this.w),x={};l.layout.rotateXLabels&&r?x=m.getTextRects(n,parseInt(o,10).toString(),null,`rotate(${l.config.xaxis.labels.rotate} 0 0)`,!1):x=m.getTextRects(n,parseInt(o,10).toString());let y=!l.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(n)&&(String(n)==="NaN"||a.indexOf(n)>=0&&y)&&(n=""),{x:s,text:n,textRect:x,isBold:g}}checkLabelBasedOnTickamount(t,e,s){let i=this.w,a=i.config.xaxis.tickAmount;if(a==="dataPoints"&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;let o=Math.round(s/(a+1));return t%o===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){let o=this.w;if(t===0&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){let r=a[a.length-1];if(o.config.xaxis.labels.trim&&o.config.xaxis.type!=="datetime")return e;e.x<r.textRect.width/(o.layout.rotateXLabels?Math.abs(o.config.xaxis.labels.rotate)/12:1.01)+r.x&&(e.text="")}return e}checkForReversedLabels(t,e){let s=this.w;return s.config.yaxis[t]&&s.config.yaxis[t].reversed&&e.reverse(),e}yAxisAllSeriesCollapsed(t){let e=this.w.globals;return!e.seriesYAxisMap[t].some(s=>e.collapsedSeriesIndices.indexOf(s)===-1)}translateYAxisIndex(t){let e=this.w,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(o=>Array.isArray(o.seriesName))?t:s.seriesYAxisReverseMap[t]}isYAxisHidden(t){let e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){let i=e.globals.seriesYAxisMap[t],a=new q(this.w);return i.every(o=>a.isSeriesNull(o))}return!1}getYAxisForeColor(t,e){var s;let i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&((s=this.theme)==null||s.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,s,i,a,o,r){let l=this.w,c=new L(this.w),n=l.layout.translateY+l.config.yaxis[a].labels.offsetY;if(l.globals.isBarHorizontal?n=0:l.config.chart.type==="heatmap"&&(n+=o/2),i.show&&e>0){l.config.yaxis[a].opposite===!0&&(t=t+i.width);for(let h=e;h>=0;h--){let d=c.drawLine(t+s.offsetX-i.width+i.offsetX,n+i.offsetY,t+s.offsetX+i.offsetX,n+i.offsetY,i.color);r.add(d),n+=o}}}},lt=class{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new Q(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=[],t.config.xaxis.position==="top"?this.offY=0:this.offY=t.layout.gridHeight,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&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(){let t=this.w,e=new L(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 o=0;o<this.xaxisLabels.length;o++)a.push(this.xaxisLabels[o]);if(this.drawXAxisLabelAndGroup(!0,e,i,a,t.axisFlags.isXNumeric,(o,r)=>r),t.labelData.hasXaxisGroups){let o=t.labelData.groups;a=[];for(let l=0;l<o.length;l++)a.push(o[l].title);let 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,(l,c)=>o[l].cols*c,r)}if(t.config.xaxis.title.text!==void 0){let o=e.group({class:"apexcharts-xaxis-title"}),r=e.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(t.config.xaxis.position==="bottom"?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});o.add(r),s.add(o)}if(t.config.xaxis.axisBorder.show){let o=t.globals.barPadForNumericAxis,r=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-o,this.offY,this.xaxisBorderWidth+o,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):s.add(r)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,o,r={}){let l=[],c=[],n=this.w,h=r.xaxisFontSize||this.xaxisFontSize,d=r.xaxisFontFamily||this.xaxisFontFamily,g=r.xaxisForeColors||this.xaxisForeColors,f=r.fontWeight||n.config.xaxis.labels.style.fontWeight,p=r.cssClass||n.config.xaxis.labels.style.cssClass,u,m=n.globals.padHorizontal,x=i.length,y=n.config.xaxis.type==="category"?n.globals.dataPoints:x;if(y===0&&x>y&&(y=x),a){let w=Math.max(Number(n.config.xaxis.tickAmount)||1,y>1?y-1:y);u=n.layout.gridWidth/Math.min(w,x-1),m=m+o(0,u)/2+n.config.xaxis.labels.offsetX}else u=n.layout.gridWidth/y,m=m+o(0,u)+n.config.xaxis.labels.offsetX;for(let w=0;w<=x-1;w++){let S=m-o(w,u)/2+n.config.xaxis.labels.offsetX;w===0&&x===1&&u/2===m&&y===1&&(S=n.layout.gridWidth/2);let v=this.axesUtils.getLabel(i,n.labelData.timescaleLabels,S,w,l,h,t),C=28;n.layout.rotateXLabels&&t&&(C=22),n.config.xaxis.title.text&&n.config.xaxis.position==="top"&&(C+=parseFloat(n.config.xaxis.title.style.fontSize)+2),t||(C=C+parseFloat(h)+(n.layout.xAxisLabelsHeight-n.layout.xAxisGroupLabelsHeight)+(n.layout.rotateXLabels?10:0)),typeof n.config.xaxis.tickAmount<"u"&&n.config.xaxis.tickAmount!=="dataPoints"&&n.config.xaxis.type!=="datetime"?v=this.axesUtils.checkLabelBasedOnTickamount(w,v,x):v=this.axesUtils.checkForOverflowingLabels(w,v,x,l,c);let D=()=>t&&n.config.xaxis.convertedCatToNumeric?g[n.globals.minX+w-1]:g[w];if(n.config.xaxis.labels.show){let k=e.drawText({x:v.x,y:this.offY+n.config.xaxis.labels.offsetY+C-(n.config.xaxis.position==="top"?n.layout.xAxisHeight+n.config.xaxis.axisTicks.height-2:0),text:v.text,textAnchor:"middle",fontWeight:v.isBold?600:f,fontSize:h,fontFamily:d,foreColor:Array.isArray(g)?D():g,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+p});if(s.add(k),k.on("click",N=>{if(typeof n.config.chart.events.xAxisLabelClick=="function"){let E=Object.assign({},n,{labelIndex:w});n.config.chart.events.xAxisLabelClick(N,this.ctx,E)}}),t){let N=F.createElementNS(H,"title");N.textContent=Array.isArray(v.text)?v.text.join(" "):v.text,k.node.appendChild(N),v.text!==""&&(l.push(v.text),c.push(v))}}w<x-1&&(m=m+o(w+1,u))}}drawXaxisInversed(t){let e=this.w,s=new L(this.w),i=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),o=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+i+", 0)"});a.add(o);let r=[];if(e.config.yaxis[t].show)for(let f=0;f<this.xaxisLabels.length;f++)r.push(this.xaxisLabels[f]);let l=e.layout.gridHeight/r.length,c=-(l/2.2),n=e.formatters.yLabelFormatters[0],h=e.config.yaxis[0].labels;if(h.show)for(let f=0;f<=r.length-1;f++){let p=typeof r[f]>"u"?"":r[f];p=n(p,{seriesIndex:t,dataPointIndex:f,w:e});let u=this.axesUtils.getYAxisForeColor(h.style.colors,t),m=()=>Array.isArray(u)?u[f]:u,x=0;Array.isArray(p)&&(x=p.length/2*parseInt(h.style.fontSize,10));let y=h.offsetX-15,w="end";this.yaxis.opposite&&(w="start"),e.config.yaxis[0].labels.align==="left"?(y=h.offsetX,w="start"):e.config.yaxis[0].labels.align==="center"?(y=h.offsetX,w="middle"):e.config.yaxis[0].labels.align==="right"&&(w="end");let S=s.drawText({x:y,y:c+l+h.offsetY-x,text:p,textAnchor:w,foreColor:m(),fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+h.style.cssClass,maxWidth:h.maxWidth});o.add(S),S.on("click",C=>{if(typeof e.config.chart.events.xAxisLabelClick=="function"){let _=Object.assign({},e,{labelIndex:f});e.config.chart.events.xAxisLabelClick(C,this.ctx,_)}});let v=F.createElementNS(H,"title");if(v.textContent=Array.isArray(p)?p.join(" "):p,S.node.appendChild(v),e.config.yaxis[t].labels.rotate!==0){let C=s.rotateAroundCenter(S.node);S.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${C.y})`)}c=c+l}if(e.config.yaxis[0].title.text!==void 0){let f=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),p=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});f.add(p),a.add(f)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);let g=e.config.xaxis.axisBorder;if(g.show){let f=s.drawLine(e.globals.padHorizontal+g.offsetX+d,1+g.offsetY,e.globals.padHorizontal+g.offsetX+d,e.layout.gridHeight+g.offsetY,g.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(f):a.add(f)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,r.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,l,a),a}drawXaxisTicks(t,e,s){let i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;let o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,i.config.xaxis.position==="top"&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){let l=new L(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(l),l.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){let t=this.w,e=[],s=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let a=0;a<s;a++)i=this.xaxisLabels[a].position,e.push(i);else{let a=s;for(let o=0;o<a;o++){let r=a;t.axisFlags.isXNumeric&&t.config.chart.type!=="bar"&&(r-=1),i=i+t.layout.gridWidth/r,e.push(i)}}return e}xAxisLabelCorrections(){var t,e,s;let i=this.w,a=new L(this.w),o=i.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),r=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),l=i.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),c=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.config.xaxis.labels.rotateAlways)for(let n=0;n<r.length;n++){let h=a.rotateAroundCenter(r[n]);h.y=h.y-1,h.x=h.x+1,r[n].setAttribute("transform",`rotate(${i.config.xaxis.labels.rotate} ${h.x} ${h.y})`),r[n].setAttribute("text-anchor","end"),o?.setAttribute("transform","translate(0, -10)");let d=r[n].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(d,g=>{a.placeTextWithEllipsis(g,g.textContent,i.layout.xAxisLabelsHeight-(i.config.legend.position==="bottom"?20:10))})}else{let n=i.layout.gridWidth/(i.labelData.labels.length+1);for(let h=0;h<r.length;h++){let d=r[h].childNodes;i.config.xaxis.labels.trim&&i.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(d,g=>{a.placeTextWithEllipsis(g,g.textContent,n)})}}if(l.length>0){let n=l[l.length-1].getBBox(),h=l[0].getBBox();n.x<-20&&((t=l[l.length-1].parentNode)==null||t.removeChild(l[l.length-1])),h.x+h.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&((e=l[0].parentNode)==null||e.removeChild(l[0]));for(let d=0;d<c.length;d++)a.placeTextWithEllipsis(c[d],(s=c[d].textContent)!=null?s:"",i.config.yaxis[0].labels.maxWidth-(i.config.yaxis[0].title.text?parseFloat(i.config.yaxis[0].title.style.fontSize)*2:0)-15)}}},At=class{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new Q(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){let e=this.w,s=new L(this.w);t||(t=s.group({class:"apexcharts-grid"}));let 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){let e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){let t=this.w,e=t.globals,s=new L(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=h=>{let d=F.createElementNS(H,"clipPath");return d.setAttribute("id",h),d};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 o=["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0,r=0,l=0;o&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),l=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+l+r+4,t.layout.gridHeight+i+4,0,"#fff");let c=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-c),-c,t.layout.gridWidth+Math.max(i+l+r+4,c*2),t.layout.gridHeight+c*2,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);let n=t.dom.elDefs.node;n.appendChild(t.dom.elGridRectMask),n.appendChild(t.dom.elGridRectBarMask),n.appendChild(t.dom.elGridRectMarkerMask),n.appendChild(t.dom.elForecastMask),n.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r}){let l=this.w;if(!(t===0&&l.globals.skipFirstTimelinelabel||t===o-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||l.config.chart.type==="radar")){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r});let n=0;if(l.labelData.hasXaxisGroups&&l.config.xaxis.tickPlacement==="between"){let d=l.labelData.groups;if(d){let g=0;for(let f=0;g<t&&f<d.length;f++)g+=d[f].cols;g===t&&(n=l.layout.xAxisLabelsHeight*.6)}}new lt(this.w,this.ctx).drawXaxisTicks(e,n,l.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r}){let l=this.w,c=r.node.classList.contains("apexcharts-gridlines-horizontal"),n=l.globals.barPadForNumericAxis,h=s===0&&a===0||e===0&&i===0||s===l.layout.gridHeight&&a===l.layout.gridHeight||l.globals.isBarHorizontal&&(t===0||t===o-1),g=new L(this.w).drawLine(e-(c?n:0),s,i+(c?n:0),a,l.config.grid.borderColor,l.config.grid.strokeDashArray);g.node.classList.add("apexcharts-gridline"),h&&l.config.grid.show?this.elGridBorders.add(g):r.add(g)}_drawGridBandRect({c:t,x1:e,y1:s,x2:i,y2:a,type:o}){let r=this.w,l=new L(this.w),c=r.globals.barPadForNumericAxis,n=r.config.grid[o].colors[t],h=l.drawRect(e-(o==="row"?c:0),s,i+(o==="row"?c*2:0),a,0,n,r.config.grid[o].opacity);this.elg.add(h),h.attr("clip-path",`url(#gridRectMask${r.globals.cuid})`),h.node.classList.add(`apexcharts-grid-${o}`)}_drawXYLines({xCount:t,tickAmount:e}){var s;let i=this.w,a=({xC:r,x1:l,y1:c,x2:n,y2:h})=>{for(let d=0;d<r;d++)l=this.xaxisLabels[d].position,n=this.xaxisLabels[d].position,this._drawGridLines({i:d,x1:l,y1:c,x2:n,y2:h,xCount:t,parent:this.elgridLinesV})},o=({xC:r,x1:l,y1:c,x2:n,y2:h})=>{for(let d=0;d<r+(i.axisFlags.isXNumeric?0:1);d++)d===0&&r===1&&i.globals.dataPoints===1&&(l=i.layout.gridWidth/2,n=l),this._drawGridLines({i:d,x1:l,y1:c,x2:n,y2:h,xCount:t,parent:this.elgridLinesV}),l+=i.layout.gridWidth/(i.axisFlags.isXNumeric?r-1:r),n=l};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){let r=i.globals.padHorizontal,l=0,c,n=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:t,x1:r,y1:l,x2:c,y2:n}):(i.axisFlags.isXNumeric&&(t=(s=i.globals.xAxisScale)==null?void 0:s.result.length),o({xC:t,x1:r,y1:l,x2:c,y2:n}))}if(i.config.grid.yaxis.lines.show){let l=0,c=0,n=i.layout.gridWidth,h=e+1;this.isRangeBar&&(h=i.labelData.labels.length);for(let d=0;d<h+(this.isRangeBar?1:0);d++)this._drawGridLine({i:d,xCount:h+(this.isRangeBar?1:0),x1:0,y1:l,x2:n,y2:c,parent:this.elgridLinesH}),l+=i.layout.gridHeight/(this.isRangeBar?h:e),c=l}}_drawInvertedXYLines({xCount:t}){let e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let s=e.globals.padHorizontal,i=0,a,o=e.layout.gridHeight;for(let r=0;r<t+1;r++)e.config.grid.xaxis.lines.show&&this._drawGridLine({i:r,xCount:t+1,x1:s,y1:i,x2:a,y2:o,parent:this.elgridLinesV}),new lt(this.w,this.ctx).drawXaxisTicks(s,0,e.dom.elGraphical),s+=e.layout.gridWidth/t,a=s}if(e.config.grid.yaxis.lines.show){let i=0,a=0,o=e.layout.gridWidth;for(let r=0;r<e.globals.dataPoints+1;r++)this._drawGridLine({i:r,xCount:e.globals.dataPoints+1,x1:0,y1:i,x2:o,y2:a,parent:this.elgridLinesH}),i+=e.layout.gridHeight/e.globals.dataPoints,a=i}}renderGrid(){var t,e,s;let i=this.w,a=i.globals,o=new L(this.w);this.elg=o.group({class:"apexcharts-grid"}),this.elgridLinesH=o.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=o.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=o.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 r=0;for(;r<a.seriesYAxisMap.length&&a.ignoreYAxisIndexes.includes(r);)r++;r===a.seriesYAxisMap.length&&(r=0);let l=a.yAxisScale[r].result.length-1,c;return!a.isBarHorizontal||this.isRangeBar?(c=this.xaxisLabels.length,this.isRangeBar&&(l=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(c=i.config.xaxis.tickAmount),((s=(e=(t=a.yAxisScale)==null?void 0:t[r])==null?void 0:e.result)==null?void 0:s.length)>0&&i.config.xaxis.type!=="datetime"&&(c=a.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:c,tickAmount:l})):(c=l,l=a.xTickAmount,this._drawInvertedXYLines({xCount:c,tickAmount:l})),this.drawGridBands(c,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/c}}drawGridBands(t,e){var s,i,a,o,r;let l=this.w,c=(n,h,d,g,f,p)=>{for(let u=0,m=0;u<h;u++,m++)m>=l.config.grid[n].colors.length&&(m=0),this._drawGridBandRect({c:m,x1:d,y1:g,x2:f,y2:p,type:n}),g+=l.layout.gridHeight/e};if(((s=l.config.grid.row.colors)==null?void 0:s.length)>0&&c("row",e,0,0,l.layout.gridWidth,l.layout.gridHeight/e),((i=l.config.grid.column.colors)==null?void 0:i.length)>0){let n=!l.globals.isBarHorizontal&&l.config.xaxis.tickPlacement==="on"&&(l.config.xaxis.type==="category"||l.config.xaxis.convertedCatToNumeric)?t-1:t;l.axisFlags.isXNumeric&&(n=((o=(a=l.globals.xAxisScale)==null?void 0:a.result.length)!=null?o:1)-1);let h=l.globals.padHorizontal,d=0,g=l.globals.padHorizontal+l.layout.gridWidth/n,f=l.layout.gridHeight;for(let p=0,u=0;p<t;p++,u++)u>=l.config.grid.column.colors.length&&(u=0),l.config.xaxis.type==="datetime"&&(h=this.xaxisLabels[p].position,g=(((r=this.xaxisLabels[p+1])==null?void 0:r.position)||l.layout.gridWidth)-this.xaxisLabels[p].position),this._drawGridBandRect({c:u,x1:h,y1:d,x2:g,y2:f,type:"column"}),h+=l.layout.gridWidth/n}}},Ht=class{constructor(t){this.w=t,this.coreUtils=new q(this.w)}niceScale(t,e,s=0){let a=this.w,o=a.globals,r,l,c,n;o.isBarHorizontal?(r=a.config.xaxis,l=Math.max((o.svgWidth-100)/25,2)):(r=a.config.yaxis[s],l=Math.max((o.svgHeight-100)/15,2)),A.isNumber(l)||(l=10),c=r.min!==void 0&&r.min!==null,n=r.max!==void 0&&r.min!==null;let h=r.stepSize!==void 0&&r.stepSize!==null,d=r.tickAmount!==void 0&&r.tickAmount!==null,g=d?r.tickAmount:Pt[Math.min(Math.round(l/2),Pt.length-1)];if(o.isMultipleYAxis&&!d&&o.multiAxisTickAmount>0&&(g=o.multiAxisTickAmount,d=!0),g==="dataPoints"?g=o.dataPoints-1:g=Math.abs(Math.round(g)),(t===Number.MIN_VALUE&&e===0||!A.isNumber(t)&&!A.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=A.isNumber(r.min)?r.min:0,e=A.isNumber(r.max)?r.max:t+g,o.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");let E=e;e=t,t=E}else t===e&&(t=t===0?0:t-1,e=e===0?2:e+1);let f=[];g<1&&(g=1);let p=g,u=Math.abs(e-t),m=.15;!c&&t>0&&t/u<m&&(t=0,c=!0),!n&&e<0&&-e/u<m&&(e=0,n=!0),u=Math.abs(e-t);let x=u/p,y=x,w=Math.floor(Math.log10(y)),S=Math.pow(10,w),v=Math.ceil(y/S);if(v=Te[o.yValueDecimal===0?0:1][v],y=v*S,x=y,o.isBarHorizontal&&r.stepSize&&r.type!=="datetime"?(x=r.stepSize,h=!0):h&&(x=r.stepSize),h&&r.forceNiceScale){let E=Math.floor(Math.log10(x));x*=Math.pow(10,w-E)}if(c&&n){let E=u/p;if(d)if(h)if(A.mod(u,x)!=0){let T=A.getGCD(x,E);E/T<10?x=T:x=E}else A.mod(x,E)==0?x=E:(E=x,d=!1);else x=E;else if(h)A.mod(u,x)==0?E=x:x=E;else if(A.mod(u,x)==0)E=x;else{p=Math.ceil(u/x),E=u/p;let T=A.getGCD(u,x);u/T<l&&(E=T),x=E}p=Math.round(u/x)}else{if(!c&&!n)if(o.isMultipleYAxis&&d){let E=x*Math.floor(t/x),T=E+x*p;T<e&&(x*=2),t=E,T=e,e=t+x*p,u=Math.abs(e-t),t>0&&t<Math.abs(T-e)&&(t=0,e=x*p),e<0&&-e<Math.abs(E-t)&&(e=0,t=-x*p)}else t=x*Math.floor(t/x),e=x*Math.ceil(e/x);else if(n)if(d)t=e-x*p;else{let E=t;t=x*Math.floor(t/x),Math.abs(e-t)/A.getGCD(u,x)>l&&(t=e-x*g,t+=x*Math.floor((E-t)/x))}else if(c)if(d)e=t+x*p;else{let E=e;e=x*Math.ceil(e/x),Math.abs(e-t)/A.getGCD(u,x)>l&&(e=t+x*g,e+=x*Math.ceil((E-e)/x))}u=Math.abs(e-t),x=A.getGCD(u,x),p=Math.round(u/x)}if(!d&&!(c||n)&&(p=Math.ceil((u-1e-11)/(x+1e-11)),p>16&&A.getPrimeFactors(p).length<2&&p++),!d&&r.forceNiceScale&&o.yValueDecimal===0&&p>u&&(p=u,x=Math.round(u/p)),p>l&&(!(d||h)||r.forceNiceScale)){let E=A.getPrimeFactors(p),T=E.length-1,X=p;t:for(var C=0;C<T;C++)for(var _=0;_<=T-C;_++){let R=Math.min(_+C,T),I=X,z=1;for(var D=_;D<=R;D++)z*=E[D];if(I/=z,I<l){X=I;break t}}X===p?x=u:x=u/X,p=Math.round(u/x)}o.isMultipleYAxis&&o.multiAxisTickAmount==0&&o.ignoreYAxisIndexes.indexOf(s)<0&&(o.multiAxisTickAmount=p);let k=t-x,N=x*1e-11;do k+=x,f.push(A.stripNumber(k,7));while(e-k>N);return{result:f,niceMin:f[0],niceMax:f[f.length-1]}}linearScale(t,e,s=10,i=0,a=void 0){let o=Math.abs(e-t),r=[];if(t===e)return r=[t],{result:r,niceMin:r[0],niceMax:r[r.length-1]};s=this._adjustTicksForSmallRange(s,i,o),s==="dataPoints"&&(s=this.w.globals.dataPoints-1);let l=s;a||(a=o/l);let c=2;if(a!==0&&isFinite(a)){let d=Math.floor(Math.log10(Math.abs(a))),g=Math.max(c,-d+c),f=Math.pow(10,g);a=Math.round((a+Number.EPSILON)*f)/f}let n=s===Number.MAX_VALUE?5:l;s===Number.MAX_VALUE&&(a=1);let h=t;for(;n>=0;)r.push(h),h=A.preciseAddition(h,a),n-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScaleNice(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));let i=[],a=Math.ceil(Math.log(e)/Math.log(s)+1),o=Math.floor(Math.log(t)/Math.log(s));for(let r=o;r<a;r++)i.push(Math.pow(s,r));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));let i=[],a=Math.log(e)/Math.log(s),o=Math.log(t)/Math.log(s),r=a-o,l=Math.round(r),c=r/l;for(let n=0,h=o;n<l;n++,h+=c)i.push(Math.pow(s,h));return i.push(Math.pow(s,a)),{result:i,niceMin:t,niceMax:e}}_adjustTicksForSmallRange(t,e,s){let i=t;if(typeof e<"u"&&this.w.config.yaxis[e].labels.formatter&&this.w.config.yaxis[e].tickAmount===void 0){let a=Number(this.w.config.yaxis[e].labels.formatter(1));A.isNumber(a)&&this.w.globals.yValueDecimal===0&&(i=Math.ceil(s))}return i<t?i:t}setYScaleForIndex(t,e,s){let i=this.w.globals,a=this.w.config,o=i.isBarHorizontal?a.xaxis:a.yaxis[t];typeof i.yAxisScale[t]>"u"&&(i.yAxisScale[t]=[]);let r=Math.abs(s-e);o.logarithmic&&r<=5&&(i.invalidLogScale=!0),o.logarithmic&&r>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,s,o.logBase):this.logarithmicScale(e,s,o.logBase)):s===-Number.MAX_VALUE||!A.isNumber(s)||e===Number.MAX_VALUE||!A.isNumber(e)?i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t):(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,s,t))}setXScale(t,e){let s=this.w,i=s.globals;if(e===-Number.MAX_VALUE||!A.isNumber(e))i.xAxisScale=this.linearScale(0,10,10);else{let a=i.xTickAmount;i.xAxisScale=this.linearScale(t,e,a,0,s.config.xaxis.max===void 0?s.config.xaxis.stepSize:void 0)}return i.xAxisScale}scaleMultipleYAxes(){let t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();let s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr;e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((o,r)=>{let l=[];if(o.forEach(c=>{var n;let h=(n=t.series[c])==null?void 0:n.group;l.indexOf(h)<0&&l.push(h)}),o.length>0){let c=Number.MAX_VALUE,n=-Number.MAX_VALUE,h=c,d=n,g,f;if(t.chart.stacked){let p=new Array(e.dataPoints).fill(0),u=[],m=[],x=[];l.forEach(()=>{u.push(p.map(()=>Number.MIN_VALUE)),m.push(p.map(()=>Number.MIN_VALUE)),x.push(p.map(()=>Number.MIN_VALUE))});for(let y=0;y<o.length;y++){!g&&t.series[o[y]].type&&(g=t.series[o[y]].type);let w=o[y];t.series[w].group?f=t.series[w].group:f="axis-".concat(r.toString()),!(e.collapsedSeriesIndices.indexOf(w)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(w)<0)||(e.allSeriesCollapsed=!1,l.forEach((v,C)=>{if(t.series[w].group===v)for(let _=0;_<this.w.seriesData.series[w].length;_++){let D=this.w.seriesData.series[w][_];D>=0?m[C][_]+=D:x[C][_]+=D,u[C][_]+=D,h=Math.min(h,D),d=Math.max(d,D)}})),(g==="bar"||g==="column")&&e.barGroups.push(f)}g||(g=t.chart.type),g==="bar"||g==="column"?l.forEach((y,w)=>{c=Math.min(c,Math.min.apply(null,x[w])),n=Math.max(n,Math.max.apply(null,m[w]))}):(l.forEach((y,w)=>{h=Math.min(h,Math.min.apply(null,u[w])),d=Math.max(d,Math.max.apply(null,u[w]))}),c=h,n=d),c===Number.MIN_VALUE&&n===Number.MIN_VALUE&&(n=-Number.MAX_VALUE)}else for(let p=0;p<o.length;p++){let u=o[p];c=Math.min(c,i[u]),n=Math.max(n,a[u]),!(e.collapsedSeriesIndices.indexOf(u)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(u)<0)||(e.allSeriesCollapsed=!1)}t.yaxis[r].min!==void 0&&(typeof t.yaxis[r].min=="function"?c=t.yaxis[r].min(c):c=t.yaxis[r].min),t.yaxis[r].max!==void 0&&(typeof t.yaxis[r].max=="function"?n=t.yaxis[r].max(n):n=t.yaxis[r].max),e.barGroups=e.barGroups.filter((p,u,m)=>m.indexOf(p)===u),this.setYScaleForIndex(r,c,n),o.forEach(p=>{i[p]=e.yAxisScale[r].niceMin,a[p]=e.yAxisScale[r].niceMax})}else this.setYScaleForIndex(r,0,-Number.MAX_VALUE)})}},gt=class{constructor(t){this.w=t,this.scales=new Ht(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,o,r,l,c;let n=this.w.config,h=this.w.globals,d=-Number.MAX_VALUE,g=Number.MIN_VALUE;i===null&&(i=t+1);let f=this.w.seriesData.series,p=f,u=f;n.chart.type==="candlestick"?(p=this.w.candleData.seriesCandleL,u=this.w.candleData.seriesCandleH):n.chart.type==="boxPlot"?(p=this.w.candleData.seriesCandleO,u=this.w.candleData.seriesCandleC):this.w.axisFlags.isRangeData&&(p=this.w.rangeData.seriesRangeStart,u=this.w.rangeData.seriesRangeEnd);let m=!1;if(this.w.seriesData.seriesX.length>=i){let x=(a=h.brushSource)==null?void 0:a.w.config.chart.brush;(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||x?.enabled&&x?.autoScaleYaxis)&&(m=!0)}for(let x=t;x<i;x++){h.dataPoints=Math.max(h.dataPoints,f[x].length);let y=n.series[x].type;this.w.labelData.categoryLabels.length&&(h.dataPoints=this.w.labelData.categoryLabels.filter(v=>typeof v<"u").length),this.w.labelData.labels.length&&n.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((v,C)=>v+C.length,0)!==0&&(h.dataPoints=Math.max(h.dataPoints,this.w.labelData.labels.length));let w=0,S=f[x].length-1;if(m){if(n.xaxis.min)for(;w<S&&this.w.seriesData.seriesX[x][w]<n.xaxis.min;w++);if(n.xaxis.max)for(;S>w&&this.w.seriesData.seriesX[x][S]>n.xaxis.max;S--);}for(let v=w;v<=S&&v<this.w.seriesData.series[x].length;v++){let C=f[x][v];if(C!==null&&A.isNumber(C)){switch(typeof((o=u[x])==null?void 0:o[v])<"u"&&(d=Math.max(d,u[x][v]),e=Math.min(e,u[x][v])),typeof((r=p[x])==null?void 0:r[v])<"u"&&(e=Math.min(e,p[x][v]),s=Math.max(s,p[x][v])),y){case"candlestick":typeof this.w.candleData.seriesCandleC[x][v]<"u"&&(d=Math.max(d,this.w.candleData.seriesCandleH[x][v]),e=Math.min(e,this.w.candleData.seriesCandleL[x][v]));break;case"boxPlot":typeof this.w.candleData.seriesCandleC[x][v]<"u"&&(d=Math.max(d,this.w.candleData.seriesCandleC[x][v]),e=Math.min(e,this.w.candleData.seriesCandleO[x][v]));break}y&&y!=="candlestick"&&y!=="boxPlot"&&y!=="rangeArea"&&y!=="rangeBar"&&(d=Math.max(d,this.w.seriesData.series[x][v]),e=Math.min(e,this.w.seriesData.series[x][v])),this.w.seriesData.seriesGoals[x]&&this.w.seriesData.seriesGoals[x][v]&&Array.isArray(this.w.seriesData.seriesGoals[x][v])&&this.w.seriesData.seriesGoals[x][v].forEach(_=>{d=Math.max(d,_.value),e=Math.min(e,_.value)}),s=d,C=A.noExponents(C),A.isFloat(C)&&(h.yValueDecimal=Math.max(h.yValueDecimal,C.toString().split(".")[1].length)),g>((l=p[x])==null?void 0:l[v])&&((c=p[x])==null?void 0:c[v])<0&&(g=p[x][v])}else h.hasNullValues=!0}(y==="bar"||y==="column")&&(g<0&&d<0&&(d=0,s=Math.max(s,0)),g===Number.MIN_VALUE&&(g=0,e=Math.min(e,0)))}return n.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&h.isBarHorizontal&&(g=e),n.chart.type==="bar"&&(g<0&&d<0&&(d=0),g===Number.MIN_VALUE&&(g=0)),{minY:g,maxY:d,lowestY:e,highestY:s}}setYRange(){let t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let s=Number.MAX_VALUE,i;if(t.isMultipleYAxis){s=Number.MAX_VALUE;for(let a=0;a<this.w.seriesData.series.length;a++)i=this.getMinYMaxY(a),t.minYArr[a]=i.lowestY,t.maxYArr[a]=i.highestY,s=Math.min(s,i.lowestY)}return i=this.getMinYMaxY(0,s,void 0,this.w.seriesData.series.length),e.chart.type==="bar"?(t.minY=i.minY,t.maxY=i.maxY):(t.minY=i.lowestY,t.maxY=i.highestY),s=i.lowestY,e.chart.stacked&&this._setStackedMinMax(),e.chart.type==="line"||e.chart.type==="area"||e.chart.type==="scatter"||e.chart.type==="candlestick"||e.chart.type==="boxPlot"||e.chart.type==="rangeBar"&&!t.isBarHorizontal?t.minY===Number.MIN_VALUE&&s!==-Number.MAX_VALUE&&s!==t.maxY&&(t.minY=s):t.minY=t.minY!==Number.MIN_VALUE?Math.min(i.minY,t.minY):i.minY,e.yaxis.forEach((a,o)=>{a.max!==void 0&&(typeof a.max=="number"?t.maxYArr[o]=a.max:typeof a.max=="function"&&(t.maxYArr[o]=a.max(t.isMultipleYAxis?t.maxYArr[o]:t.maxY)),t.maxY=t.maxYArr[o]),a.min!==void 0&&(typeof a.min=="number"?t.minYArr[o]=a.min:typeof a.min=="function"&&(t.minYArr[o]=a.min(t.isMultipleYAxis?t.minYArr[o]===Number.MIN_VALUE?0:t.minYArr[o]:t.minY)),t.minY=t.minYArr[o])}),t.isBarHorizontal&&["min","max"].forEach(o=>{e.xaxis[o]!==void 0&&typeof e.xaxis[o]=="number"&&(o==="min"?t.minY=e.xaxis[o]:t.maxY=e.xaxis[o])}),t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=s):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEach(a=>{let o=a;switch(o.type||e.chart.type){case"bar":case"column":t.barGroups.push(o.group);break;case"line":t.lineGroups.push(o.group);break;case"area":t.areaGroups.push(o.group);break}}),t.barGroups=t.barGroups.filter((a,o,r)=>r.indexOf(a)===o),t.lineGroups=t.lineGroups.filter((a,o,r)=>r.indexOf(a)===o),t.areaGroups=t.areaGroups.filter((a,o,r)=>r.indexOf(a)===o),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){let t=this.w.globals,e=this.w.config,s=e.xaxis.type==="numeric"||e.xaxis.type==="datetime"||e.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,i=()=>{for(let a=0;a<this.w.seriesData.series.length;a++)if(this.w.labelData.labels[a])for(let o=0;o<this.w.labelData.labels[a].length;o++)this.w.labelData.labels[a][o]!==null&&A.isNumber(this.w.labelData.labels[a][o])&&(t.maxX=Math.max(t.maxX,this.w.labelData.labels[a][o]),t.initialMaxX=Math.max(t.maxX,this.w.labelData.labels[a][o]),t.minX=Math.min(t.minX,this.w.labelData.labels[a][o]),t.initialMinX=Math.min(t.minX,this.w.labelData.labels[a][o]))};if(this.w.axisFlags.isXNumeric&&i(),this.w.axisFlags.noLabelsProvided&&e.xaxis.categories.length===0&&(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 a=10;if(e.xaxis.tickAmount===void 0)a=Math.round(t.svgWidth/150),e.xaxis.type==="numeric"&&t.dataPoints<30&&(a=t.dataPoints-1),a>t.dataPoints&&t.dataPoints!==0&&(a=t.dataPoints-1);else if(e.xaxis.tickAmount==="dataPoints"){if(this.w.seriesData.series.length>1&&(a=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){let o=Math.round(t.maxX-t.minX);o<30&&(a=o)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,e.xaxis.max!==void 0&&typeof e.xaxis.max=="number"&&(t.maxX=e.xaxis.max),e.xaxis.min!==void 0&&typeof e.xaxis.min=="number"&&(t.minX=e.xaxis.min),e.xaxis.range!==void 0&&(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){let o=[];for(let r=t.minX-1;r<t.maxX;r++)o.push(r+1);t.xAxisScale={result:o,niceMin:o[0],niceMax:o[o.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(0,a,a,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,a-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(){let t=this.w.globals;if(this.w.axisFlags.isDataXYZ){for(let e=0;e<this.w.seriesData.series.length;e++)if(typeof this.w.seriesData.seriesZ[e]<"u")for(let s=0;s<this.w.seriesData.seriesZ[e].length;s++)this.w.seriesData.seriesZ[e][s]!==null&&A.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(){let t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){let s=new B(this.w);if(e.xaxis.type==="datetime"){let 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();let 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(e.xaxis.type==="numeric"||e.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}_getMinXDiff(){let t=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach(e=>{if(e.length){e.length===1&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);let s=e.slice();s.sort((i,a)=>i-a),s.forEach((i,a)=>{if(a>0){let o=i-s[a-1];o>0&&(t.minXDiff=Math.min(o,t.minXDiff))}}),(t.dataPoints===1||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5)}})}_setStackedMinMax(){let 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(a=>a)]);let s={},i={};e.forEach(a=>{s[a]=[],i[a]=[],this.w.config.series.map((r,l)=>a.indexOf(this.w.seriesData.seriesNames[l])>-1?l:null).filter(r=>r!==null).forEach(r=>{var l,c,n,h;for(let d=0;d<this.w.seriesData.series[t.maxValsInArrayIndex].length;d++)typeof s[a][d]>"u"&&(s[a][d]=0,i[a][d]=0),(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||((c=(l=this.w.config.series)==null?void 0:l[r])==null?void 0:c.type)==="bar"||((h=(n=this.w.config.series)==null?void 0:n[r])==null?void 0:h.type)==="column"))&&this.w.seriesData.series[r][d]!==null&&A.isNumber(this.w.seriesData.series[r][d])&&(this.w.seriesData.series[r][d]>0?s[a][d]+=parseFloat(String(this.w.seriesData.series[r][d]))+1e-4:i[a][d]+=parseFloat(String(this.w.seriesData.series[r][d])))})}),Object.entries(s).forEach(([a])=>{s[a].forEach((o,r)=>{t.maxY=Math.max(t.maxY,s[a][r]),t.minY=Math.min(t.minY,i[a][r])})})}};function Bt(){return{palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800"],palette3:["#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B"],palette4:["#4ECDC4","#C7F464","#81D4FA","#FD6A6A","#546E7A"],palette5:["#2B908F","#F9A3A4","#90EE7E","#FA4443","#69D2E7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],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"]}}var pt=class{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=t.config.chart.type==="bar"&&t.config.plotOptions.bar.horizontal,this.xAxisoffX=t.config.xaxis.position==="bottom"?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Q(t,{theme:e,timeScale:s})}drawYaxis(t){let e=this.w,s=new L(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:o,fontWeight:r}=i,l=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return l;let c=s.group({class:"apexcharts-yaxis-texts-g"});l.add(c);let n=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/n,d=e.formatters.yLabelFormatters[t],g=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){let f=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?f=0:e.config.chart.type==="heatmap"&&(f-=h/2),f+=parseInt(a,10)/3;let p=null;for(let u=n;u>=0;u--){let m=d(g[u],u,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&e.config.yaxis.length!==0&&(x*=-1);let y=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),w=this.axesUtils.getYAxisForeColor(i.colors,t),S=Array.isArray(w)?w[u]:w,v=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(_=>_.textContent),C=s.drawText({x,y:f,text:v.includes(m)&&!e.config.yaxis[t].labels.showDuplicates?"":m,textAnchor:y,fontSize:a,fontFamily:o,fontWeight:r,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:S,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});c.add(C),this.addTooltip(C,m),p===null&&(p=C),e.config.yaxis[t].labels.rotate!==0&&this.rotateLabel(s,C,p,e.config.yaxis[t].labels.rotate),f+=h}}return this.addYAxisTitle(s,l,t),this.addAxisBorder(s,l,t,n,h),l}getTextAnchor(t,e){return t==="left"?"start":t==="center"?"middle":t==="right"?"end":e?"start":"end"}addTooltip(t,e){let s=F.createElementNS(H,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){let a=t.rotateAroundCenter(s.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${o.y})`)}addYAxisTitle(t,e,s){let i=this.w;if(i.config.yaxis[s].title.text!==void 0){let a=t.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,r=t.drawText({x:o,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(r),e.add(a)}}addAxisBorder(t,e,s,i,a){let o=this.w,r=o.config.yaxis[s].axisBorder,l=31+r.offsetX;if(o.config.yaxis[s].opposite&&(l=-31-r.offsetX),r.show){let c=t.drawLine(l,o.layout.translateY+r.offsetY-2,l,o.layout.gridHeight+o.layout.translateY+r.offsetY+2,r.color,0,r.width);e.add(c)}o.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(l,i,r,o.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){let e=this.w,s=new L(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 o=e.globals.yAxisScale[t].result.length-1,r=e.layout.gridWidth/o+.1,l=r+e.config.xaxis.labels.offsetX,c=e.formatters.xLabelFormatter,n=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),h=e.labelData.timescaleLabels;if(h.length>0&&(this.xaxisLabels=h.slice(),n=h.slice(),o=n.length),e.config.xaxis.labels.show)for(let d=h.length?0:o;h.length?d<h.length:d>=0;h.length?d++:d--){let g=c?.(n[d],d,e),f=e.layout.gridWidth+e.globals.padHorizontal-(l-r+e.config.xaxis.labels.offsetX);if(h.length){let u=this.axesUtils.getLabel(n,h,f,d,this.drawnLabels,this.xaxisFontSize);f=u.x,g=u.text,this.drawnLabels.push(u.text),d===0&&e.globals.skipFirstTimelinelabel&&(g=""),d===n.length-1&&e.globals.skipLastTimelinelabel&&(g="")}let p=s.drawText({x:f,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-(e.config.xaxis.position==="top"?e.layout.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:g,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,g),l+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){let e=this.w,s=new L(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;e.config.chart.type==="bar"&&e.axisFlags.isXNumeric&&(a-=15);let o=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(o):t.add(o)}}inversedYAxisTitleText(t){let e=this.w,s=new L(this.w);if(e.config.xaxis.title.text!==void 0){let 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){let s=this.w,i=new L(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),o=a?a.getBoundingClientRect():{width:0,height:0},r=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),l=r?r.getBoundingClientRect():{width:0,height:0};if(r){let c=this.xPaddingForYAxisTitle(t,o,l,e);r.setAttribute("x",String(c.xPos-(e?10:0)));let n=i.rotateAroundCenter(r);r.setAttribute("transform",`rotate(${e?s.config.yaxis[t].title.rotate*-1:s.config.yaxis[t].title.rotate} ${n.x} ${n.y})`)}}xPaddingForYAxisTitle(t,e,s,i){let a=this.w,o=0,r=10;return a.config.yaxis[t].title.text===void 0||t<0?{xPos:o,padd:0}:(i?o=e.width+a.config.yaxis[t].title.offsetX+s.width/2+r/2:(o=e.width*-1+a.config.yaxis[t].title.offsetX+r/2+s.width/2,a.globals.isBarHorizontal&&(r=25,o=e.width*-1-a.config.yaxis[t].title.offsetX-r)),{xPos:o,padd:r})}setYAxisXPosition(t,e){let s=this.w,i=0,a=0,o=18,r=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((l,c)=>{let n=s.globals.ignoreYAxisIndexes.includes(c)||!l.show||l.floating||t[c].width===0,h=t[c].width+e[c].width;l.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[c]=a-l.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+r,n||(r+=h+20),s.globals.translateYAxisX[c]=a-l.labels.offsetX+20):(i=s.layout.translateX-o,n||(o+=h+20),s.globals.translateYAxisX[c]=i+l.labels.offsetX)})}setYAxisTextAlignments(){let t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((s,i)=>{let a=t.config.yaxis[i];if(a&&!a.floating&&a.labels.align!==void 0){let o=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`),r=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),l=o.getBoundingClientRect();r.forEach(c=>{c.setAttribute("text-anchor",a.labels.align)}),a.labels.align==="left"&&!a.opposite?o.setAttribute("transform",`translate(-${l.width}, 0)`):a.labels.align==="center"?o.setAttribute("transform",`translate(${l.width/2*(a.opposite?1:-1)}, 0)`):a.labels.align==="right"&&a.opposite&&o.setAttribute("transform",`translate(${l.width}, 0)`)}})}},zt=class{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){let 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){let s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;let i=s.globals.events[t].indexOf(e);i!==-1&&s.globals.events[t].splice(i,1)}fireEvent(t,e){let s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;(!e||!e.length)&&(e=[]);let i=s.globals.events[t],a=i.length;for(let o=0;o<a;o++)i[o].apply(null,e)}setupEventHandlers(){let t=this.w,e=this.ctx,s=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(i=>{s?.addEventListener(i,a=>{let o=a.target.getAttribute("i")===null&&t.interact.capturedSeriesIndex!==-1?t.interact.capturedSeriesIndex:a.target.getAttribute("i"),r=a.target.getAttribute("j")===null&&t.interact.capturedDataPointIndex!==-1?t.interact.capturedDataPointIndex:a.target.getAttribute("j"),l=Object.assign({},t,{seriesIndex:t.globals.axisCharts?o:0,dataPointIndex:r});a.type==="keydown"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(a),typeof t.config.chart.events.keyDown=="function"&&t.config.chart.events.keyDown(a,e,l),e.ctx.events.fireEvent("keydown",[a,e,l])):a.type==="keyup"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(typeof t.config.chart.events.keyUp=="function"&&t.config.chart.events.keyUp(a,e,l),e.ctx.events.fireEvent("keyup",[a,e,l])):a.type==="mousemove"||a.type==="touchmove"?typeof t.config.chart.events.mouseMove=="function"&&t.config.chart.events.mouseMove(a,e,l):a.type==="mouseleave"||a.type==="touchleave"?typeof t.config.chart.events.mouseLeave=="function"&&t.config.chart.events.mouseLeave(a,e,l):(a.type==="mouseup"&&a.which===1||a.type==="touchend")&&(typeof t.config.chart.events.click=="function"&&t.config.chart.events.click(a,e,l),e.ctx.events.fireEvent("click",[a,e,l]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(i=>{t.dom.baseEl.addEventListener(i,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){let e=this.w,s=t.target.className;if(t.type==="click"){let i=e.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&s!=="apexcharts-menu-icon"&&i.classList.remove("apexcharts-menu-open")}e.interact.clientX=t.type==="touchmove"?t.touches[0].clientX:t.clientX,e.interact.clientY=t.type==="touchmove"?t.touches[0].clientY:t.clientY}},Ot=class{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales,s=M.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));let i=e.filter(a=>a.name===t)[0];if(i){let a=A.extend(_e,i);this.w.globals.locale=a.options}else throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options")}},It=class{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){let s=this.w.globals,i=this.w.config,a=new lt(this.w,this.ctx,e),o=new pt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&t!=="radar"){let r,l;s.isBarHorizontal?(l=o.drawYaxisInversed(0),r=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(r),this.w.dom.elGraphical.add(l)):(r=a.drawXaxis(),this.w.dom.elGraphical.add(r),i.yaxis.map((c,n)=>{if(s.ignoreYAxisIndexes.indexOf(n)===-1&&(l=o.drawYaxis(n),this.w.dom.Paper.add(l),this.w.config.grid.position==="back")){let h=this.w.dom.Paper.children()[1];h&&(h.remove(),this.w.dom.Paper.add(h))}}))}}},ut=class{constructor(t){this.w=t}drawXCrosshairs(){let t=this.w,e=new L(this.w),s=new Z(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,o=t.config.xaxis.crosshairs.fill.type,r=i.colorFrom,l=i.colorTo,c=i.opacityFrom,n=i.opacityTo,h=i.stops,d="none",g=a.enabled,f=a.left,p=a.top,u=a.blur,m=a.color,x=a.opacity,y=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){o==="gradient"&&(y=e.drawGradient("vertical",r,l,c,n,null,h,[]));let w=e.drawRect();t.config.xaxis.crosshairs.width===1&&(w=e.drawLine(0,0,0,0));let S=t.layout.gridHeight;(!A.isNumber(S)||S<0)&&(S=0);let v=t.config.xaxis.crosshairs.width;(!A.isNumber(v)||Number(v)<0)&&(v=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:S,width:v,height:S,fill:y,filter:d,"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}),g&&(w=s.dropShadow(w,{left:f,top:p,blur:u,color:m,opacity:x})),t.dom.elGraphical.add(w)}}drawYCrosshairs(){let t=this.w,e=new L(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){let o=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(o)}let 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)}},Wt=class{constructor(t){this.w=t}checkResponsiveConfig(t){let e=this.w,s=e.config;if(s.responsive.length===0)return;let i=s.responsive.slice();i.sort((r,l)=>r.breakpoint>l.breakpoint?1:l.breakpoint>r.breakpoint?-1:0).reverse();let a=new ot({}),o=(r={})=>{let l=i[0].breakpoint,c=M.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(c>l){let n=A.clone(e.globals.initialConfig);n.series=A.clone(e.config.series);let h=q.extendArrayProps(a,n,e);r=A.extend(h,r),r=A.extend(e.config,r),this.overrideResponsiveOptions(r)}else for(let n=0;n<i.length;n++)c<i[n].breakpoint&&(r=q.extendArrayProps(a,i[n].options,e),r=A.extend(e.config,r),this.overrideResponsiveOptions(r))};if(t){let r=q.extendArrayProps(a,t,e);r=A.extend(e.config,r),r=A.extend(r,t),o(r)}else o({})}overrideResponsiveOptions(t){let e=new ot(t).init({responsiveOverride:!0});this.w.config=e}},tt=class b{constructor(t,{toggleDataSeries:e=void 0,revertDefaultAxisMinMax:s=void 0,updateSeries:i=void 0}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){let t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){let 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='${A.escapeString(t)}']`)}isSeriesHidden(t){var e;let i=this.getSeriesByName(t),a=parseInt((e=i.getAttribute("data:realIndex"))!=null?e:"0",10);return{isHidden:i.classList.contains("apexcharts-series-collapsed"),realIndex:a}}addCollapsedClassToSeries(t,e){b.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){function i(a){for(let o=0;o<a.length;o++)a[o].index===s&&e.node.classList.add("apexcharts-series-collapsed")}i(t.globals.collapsedSeries),i(t.globals.ancillaryCollapsedSeries)}toggleSeries(t){var e;let s=this.isSeriesHidden(t);return(e=this._toggleDataSeries)==null||e.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(t){var e;let s=this.isSeriesHidden(t);s.isHidden&&((e=this._toggleDataSeries)==null||e.call(this,s.realIndex,!0))}hideSeries(t){var e;let s=this.isSeriesHidden(t);s.isHidden||(e=this._toggleDataSeries)==null||e.call(this,s.realIndex,!1)}resetSeries(t=!0,e=!0,s=!0){var i,a;let o=this.w;this.clearSeriesCache();let r=A.clone(o.globals.initialSeries);o.globals.previousPaths=[],s?(o.globals.collapsedSeries=[],o.globals.ancillaryCollapsedSeries=[],o.globals.collapsedSeriesIndices=[],o.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),o.config.series=r,t&&(e&&(o.interact.zoomed=!1,(i=this._revertDefaultAxisMinMax)==null||i.call(this)),(a=this._updateSeries)==null||a.call(this,r,o.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){let e=this.w;for(let s=0;s<t.length;s++)e.globals.collapsedSeriesIndices.indexOf(s)>-1&&(t[s].data=[]);return t}highlightSeries(t){var e;let s=this.w,i=this.getSeriesByName(t),a=parseInt((e=i?.getAttribute("data:realIndex"))!=null?e:"",10),o="highlightSeriesEls",r=s.globals.cachedSelectors[o];r||(r=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[o]=r);let l=null,c=null,n=null;if(s.globals.axisCharts||s.config.chart.type==="radialBar")if(s.globals.axisCharts){l=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),c=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);let h=s.globals.seriesYAxisReverseMap[a];n=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${h}']`)}else l=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else l=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let h=0;h<r.length;h++)r[h].classList.add(this.legendInactiveClass);if(l){if(!s.globals.axisCharts){let h=l.parentNode;h?.classList.remove(this.legendInactiveClass)}l.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass),n!==null&&n.classList.remove(this.legendInactiveClass)}else for(let h=0;h<r.length;h++)r[h].classList.remove(this.legendInactiveClass)}toggleSeriesOnHover(t,e){let s=this.w;e||(e=t.target);let i=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(t.type==="mousemove"){let a=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[a])}else if(t.type==="mouseout")for(let a=0;a<i.length;a++)i[a].classList.remove(this.legendInactiveClass)}highlightRangeInSeries(t,e){let s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=r=>{for(let l=0;l<i.length;l++){let c=i[l].classList[r];typeof c=="function"&&c.call(i[l].classList,this.legendInactiveClass)}},o=(r,l)=>{for(let c=0;c<i.length;c++){let n=Number(i[c].getAttribute("val"));n>=r.from&&(n<r.to||r.to===l&&n===l)&&i[c].classList.remove(this.legendInactiveClass)}};if(t.type==="mousemove"){let r=parseInt(e.getAttribute("rel"),10)-1;a("add");let l=s.config.plotOptions.heatmap.colorScale.ranges,c=l[r],n=l.reduce((h,d)=>Math.max(h,d.to),0);o(c,n)}else t.type==="mouseout"&&a("remove")}getActiveConfigSeriesIndex(t="asc",e=[]){let s=this.w,i=0;if(s.config.series.length>1){let a=s.config.series.map((o,r)=>{let l=()=>s.globals.comboCharts?e.length===0||e.length&&e.indexOf(s.config.series[r].type)>-1:!0;return o.data&&o.data.length>0&&s.globals.collapsedSeriesIndices.indexOf(r)===-1&&l()?r:-1});for(let o=t==="asc"?0:a.length-1;t==="asc"?o<a.length:o>=0;t==="asc"?o++:o--)if(a[o]!==-1){i=a[o];break}}return i}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((e,s)=>e.type==="bar"||e.type==="column"?s:-1).filter(e=>e!==-1):this.w.config.series.map((e,s)=>s)}getPreviousPaths(){var t,e,s,i;let a=this.w;a.globals.previousPaths=[];function o(n,h,d){let g=n[h].childNodes,f={type:d,paths:[],realIndex:n[h].getAttribute("data:realIndex")};for(let p=0;p<g.length;p++)if(g[p].hasAttribute("pathTo")){let u=g[p].getAttribute("pathTo");f.paths.push({d:u})}a.globals.previousPaths.push(f)}let r=n=>a.dom.baseEl.querySelectorAll(`.apexcharts-${n}-series .apexcharts-series`);["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(n=>{let h=r(n);for(let d=0;d<h.length;d++)o(h,d,n)});let c=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);if(c.length>0)for(let n=0;n<c.length;n++){let h=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${n}'] rect`),d=[];for(let g=0;g<h.length;g++){let f=u=>h[g].getAttribute(u),p={x:parseFloat((t=f("x"))!=null?t:"0"),y:parseFloat((e=f("y"))!=null?e:"0"),width:parseFloat((s=f("width"))!=null?s:"0"),height:parseFloat((i=f("height"))!=null?i:"0")};d.push({rect:p,color:h[g].getAttribute("color")})}a.globals.previousPaths.push(d)}a.globals.axisCharts||(a.globals.previousPaths=a.seriesData.series)}clearPreviousPaths(){let t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){let t=this.w,e=this,s=t.config.noData,i=new L(e.w),a=t.globals.svgWidth/2,o=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,s.align==="left"?(a=10,r="start"):s.align==="right"&&(a=t.globals.svgWidth-10,r="end"),s.verticalAlign==="top"?o=50:s.verticalAlign==="bottom"&&(o=t.globals.svgHeight-50),a=a+s.offsetX,o=o+parseInt(s.style.fontSize,10)+2+s.offsetY,s.text!==void 0&&s.text!==""){let l=i.drawText({x:a,y:o,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,foreColor:s.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(l)}}setNullSeriesToZeroValues(t){let e=this.w;for(let s=0;s<t.length;s++)if(t[s].length===0)for(let i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)t[s].push(0);return t}hasAllSeriesEqualX(){let t=!0,e=this.w,s=this.filteredSeriesX();for(let i=0;i<s.length-1;i++)if(s[i][0]!==s[i+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}filteredSeriesX(){return this.w.seriesData.seriesX.map(s=>s.length>0?s:[])}},Gt=class{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}checkHeatmapDistributed(){let{chart:t,plotOptions:e}=this.w.config;return t.type==="treemap"&&e.treemap&&e.treemap.distributed||t.type==="heatmap"&&e.heatmap&&e.heatmap.distributed}checkBarDistributed(){let{chart:t,plotOptions:e}=this.w.config;return e.bar&&e.bar.distributed&&(t.type==="bar"||t.type==="rangeBar")}init(){this.setDefaultColors()}setDefaultColors(){var t;let e=this.w,s=new A;e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`);let i=(t=e.config.theme.accessibility)==null?void 0:t.colorBlindMode;if(i){e.globals.colors=this.getColorBlindColors(i),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);let r=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],r),this.applyDataLabelsColors(r),this.applyRadarPolygonsColors(),this.applyMarkersColors(r),i==="highContrast"&&e.dom.elWrap.classList.add("apexcharts-high-contrast");return}let a=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(a),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));let o=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],o),this.applyDataLabelsColors(o),this.applyRadarPolygonsColors(),this.applyMarkersColors(o)}getColors(t){let e=this.w;return!t||t.length===0?this.predefined():Array.isArray(t)&&t.length>0&&typeof t[0]=="function"?(this.isColorFn=!0,e.config.series.map((s,i)=>{let a=t[i]||t[0];return typeof a=="function"?a({value:e.globals.axisCharts?e.seriesData.series[i][0]||0:e.seriesData.series[i],seriesIndex:i,dataPointIndex:i,w:this.w}):a})):t}applySeriesColors(t,e){t.forEach((s,i)=>{s&&(e[i]=s)})}getMonochromeColors(t,e,s){let{color:i,shadeIntensity:a,shadeTo:o}=t,r=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,l=1/(r/a),c=0;return Array.from({length:r},()=>{let n=o==="dark"?s.shadeColor(c*-1,i):s.shadeColor(c,i);return c+=l,n})}applyColorTypes(t,e){let s=this.w;t.forEach(i=>{s.globals[i].colors=s.config[i].colors===void 0?this.isColorFn?s.config.colors:e:s.config[i].colors.slice(),this.pushExtraColors(s.globals[i].colors)})}applyDataLabelsColors(t){let e=this.w;e.globals.dataLabels.style.colors=e.config.dataLabels.style.colors===void 0?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){let t=this.w;t.globals.radarPolygons.fill.colors=t.config.plotOptions.radar.polygons.fill.colors===void 0?[t.config.theme.mode==="dark"?"#343A3F":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}applyMarkersColors(t){let e=this.w;e.globals.markers.colors=e.config.markers.colors===void 0?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}pushExtraColors(t,e,s=null){let i=this.w,a=e||i.seriesData.series.length;if(s===null&&(s=this.isBarDistributed||this.isHeatmapDistributed||i.config.chart.type==="heatmap"&&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){let o=a-t.length;for(let r=0;r<o;r++)t.push(t[r])}}getColorBlindColors(t){let e=Bt();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||{};let e=t.theme.mode,s=e==="dark"?"palette4":e==="light"?"palette1":t.theme.palette||"palette1",i=e==="dark"?"#f6f7f8":e==="light"?"#373d3f":t.chart.foreColor||"#373d3f";return t.tooltip.theme=e||"light",t.chart.foreColor=i,t.theme.palette=s,t}predefined(){let t=this.w.config.theme.palette,e=Bt();return e[t]||e.palette1}},$t=class{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){let e=this.w,s=t==="title"?e.config.title:e.config.subtitle,i=e.globals.svgWidth/2,a=s.offsetY,o="middle";if(s.align==="left"?(i=10,o="start"):s.align==="right"&&(i=e.globals.svgWidth-10,o="end"),i=i+s.offsetX,a=a+parseInt(s.style.fontSize,10)+s.margin/2,s.text!==void 0){let l=new L(this.w).drawText({x:i,y:a,text:s.text,textAnchor:o,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});l.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(l)}}},Vt=class{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){let e=this.w,s=0,i=0,a=t==="title"?e.config.title.floating:e.config.subtitle.floating,o=e.dom.baseEl.querySelector(`.apexcharts-${t}-text`);if(o!==null&&!a){let r=o.getBoundingClientRect();s=r.width,i=e.globals.axisCharts?r.height+5:r.height}return{width:s,height:i}}getLegendsRect(){let t=this.w,e=t.dom.elLegendWrap;!t.config.legend.height&&(t.config.legend.position==="top"||t.config.legend.position==="bottom")&&e&&(e.style.maxHeight=t.globals.svgHeight/2+"px");let s=Object.assign({},A.getBoundingClientRect(e));return e!==null&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:s.x,y:s.y,height:s.height,width:s.height===0?0:s.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},(t.config.legend.position==="left"||t.config.legend.position==="right")&&this.dCtx.lgRect.width*1.5>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){let t=this.w,e=[];t.config.series.forEach((r,l)=>{r.data.forEach((c,n)=>{let d=(g=>t.config.dataLabels.formatter(g,{seriesIndex:l,dataPointIndex:n,w:t}))(t.seriesData.series[l][n]);e.push(d)})});let s=A.getLargestStringFromArr(e),i=new L(this.w),a=t.config.dataLabels.style,o=i.getTextRects(s,parseInt(a.fontSize).toString(),a.fontFamily);return{width:o.width*1.05,height:o.height}}getLargestStringFromMultiArr(t,e){let s=this.w,i=t;if(s.axisFlags.isMultiLineX){let a=e.map(l=>Array.isArray(l)?l.length:1),o=Math.max(...a),r=a.indexOf(o);i=e[r]}return i}},Ut=class{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){let t=this.w,e=t.labelData.labels.slice();t.config.xaxis.convertedCatToNumeric&&e.length===0&&(e=t.labelData.categoryLabels);let s;if(t.labelData.timescaleLabels.length>0){let i=this.getxAxisTimeScaleLabelsCoords();s={width:i.width,height:i.height},t.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=(t.config.legend.position==="left"||t.config.legend.position==="right")&&!t.config.legend.floating?this.dCtx.lgRect.width:0;let i=t.formatters.xLabelFormatter,a=A.getLargestStringFromArr(e),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,e);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((d,g)=>d.length>g.length?d:g,0),o=a);let r=new at(this.w),l=a;a=r.xLabelFormat(i,a,l,{i:void 0,dateFormatter:new B(this.w).formatDate,w:t}),o=r.xLabelFormat(i,o,l,{i:void 0,dateFormatter:new B(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&typeof a>"u"||String(a).trim()==="")&&(a="1",o=a);let c=new L(this.w),n=c.getTextRects(a,t.config.xaxis.labels.style.fontSize),h=n;if(a!==o&&(h=c.getTextRects(o,t.config.xaxis.labels.style.fontSize)),s={width:n.width>=h.width?n.width:h.width,height:n.height>=h.height?n.height:h.height},s.width*e.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&t.config.xaxis.labels.rotate!==0||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.layout.rotateXLabels=!0;let d=g=>c.getTextRects(g,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);n=d(a),a!==o&&(h=d(o)),s.height=(n.height>h.height?n.height:h.height)/1.5,s.width=n.width>h.width?n.width:h.width}}else t.layout.rotateXLabels=!1}return t.config.xaxis.labels.show||(s={width:0,height:0}),{width:s.width,height:s.height}}getxAxisGroupLabelsCoords(){var t;let e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};let s=((t=e.config.xaxis.group.style)==null?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,i=e.labelData.groups.map(h=>h.title),a,o=A.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,i),l=new L(this.w),c=l.getTextRects(o,s),n=c;return o!==r&&(n=l.getTextRects(r,s)),a={width:c.width>=n.width?c.width:n.width,height:c.height>=n.height?c.height:n.height},e.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){let t=this.w,e=0,s=0;if(t.config.xaxis.title.text!==void 0){let a=new L(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,s=a.height}return{width:e,height:s}}getxAxisTimeScaleLabelsCoords(){let t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();let e=this.dCtx.timescaleLabels.map(r=>r.value),s=e.reduce((r,l)=>typeof r>"u"?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):r.length>l.length?r:l,0),a=new L(this.w).getTextRects(s,t.config.xaxis.labels.style.fontSize);return a.width*1.05*e.length>t.layout.gridWidth&&t.config.xaxis.labels.rotate!==0&&(t.globals.overlappingXLabels=!0),a}additionalPaddingXLabels(t){let e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,o=t.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;let r=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,l=h=>s.collapsedSeriesIndices.indexOf(h)!==-1,c=h=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){let d=this.dCtx.timescaleLabels[0],f=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+o/1.75-this.dCtx.yAxisWidthRight,p=d.position-o/1.75+this.dCtx.yAxisWidthLeft,u=e.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;f>s.svgWidth-e.layout.translateX-u&&(s.skipLastTimelinelabel=!0),p<-((!h.show||h.floating)&&(i.chart.type==="bar"||i.chart.type==="candlestick"||i.chart.type==="rangeBar"||i.chart.type==="boxPlot")?o/1.75:10)&&(s.skipFirstTimelinelabel=!0)}else a==="datetime"?this.dCtx.gridPad.right<o&&!e.layout.rotateXLabels&&(s.skipLastTimelinelabel=!0):a!=="datetime"&&this.dCtx.gridPad.right<o/2-this.dCtx.yAxisWidthRight&&!e.layout.rotateXLabels&&!e.config.xaxis.labels.trim&&(this.dCtx.xPadRight=o/2+1)},n=(h,d)=>{i.yaxis.length>1&&l(d)||c(h)};i.yaxis.forEach((h,d)=>{r?(this.dCtx.gridPad.left<o&&(this.dCtx.xPadLeft=o/2+1),this.dCtx.xPadRight=o/2+1):n(h,d)})}},qt=class{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){let t=this.w,e=0,s=0,i=[],a=10,o=new Q(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return t.config.yaxis.map((r,l)=>{let c={seriesIndex:l,dataPointIndex:-1,w:t},n=t.globals.yAxisScale[l],h=0;if(!o.isYAxisHidden(l)&&r.labels.show&&r.labels.minWidth!==void 0&&(h=r.labels.minWidth),!o.isYAxisHidden(l)&&r.labels.show&&n.result.length){let d=t.formatters.yLabelFormatters[l],g=n.niceMin===Number.MIN_VALUE?0:n.niceMin,f=n.result.reduce((w,S)=>{var v,C;return((v=String(d(w,c)))==null?void 0:v.length)>((C=String(d(S,c)))==null?void 0:C.length)?w:S},g);f=d(f,c);let p=f;if((typeof f>"u"||f.length===0)&&(f=n.niceMax),String(f).length===1&&(f=f+".0",p=f),t.globals.isBarHorizontal){a=0;let w=t.labelData.labels.slice();f=A.getLargestStringFromArr(w),f=d(f,{seriesIndex:l,dataPointIndex:-1,w:t}),p=this.dCtx.dimHelpers.getLargestStringFromMultiArr(f,w)}let u=new L(this.w),m="rotate(".concat(r.labels.rotate," 0 0)"),x=u.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,m,!1),y=x;f!==p&&(y=u.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,m,!1)),i.push({width:(h>y.width||h>x.width?h:y.width>x.width?y.width:x.width)+a,height:y.height>x.height?y.height:x.height})}else i.push({width:e,height:s})}),i}getyAxisTitleCoords(){let t=this.w,e=[];return t.config.yaxis.map(s=>{if(s.show&&s.title.text!==void 0){let i=new L(this.w),a="rotate(".concat(s.title.rotate," 0 0)"),o=i.getTextRects(s.title.text,s.title.style.fontSize,s.title.style.fontFamily,a,!1);e.push({width:o.width,height:o.height})}else e.push({width:0,height:0})}),e}getTotalYAxisWidth(){let t=this.w,e=0,s=0,i=0,a=t.globals.yAxisScale.length>1?10:0,o=new Q(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),r=function(c){return t.globals.ignoreYAxisIndexes.indexOf(c)>-1},l=(c,n)=>{let h=t.config.yaxis[n].floating,d=0;c.width>0&&!h?(d=c.width+a,r(n)&&(d=d-c.width-a)):d=h||o.isYAxisHidden(n)?0:5,t.config.yaxis[n].opposite?i=i+d:s=s+d,e=e+d};return t.layout.yLabelsCoords.map((c,n)=>{l(c,n)}),t.layout.yTitleCoords.map((c,n)=>{l(c,n)}),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}},jt=class{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){let{w:e}=this,{config:s,globals:i}=e;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;let a=h=>["bar","rangeBar","candlestick","boxPlot"].includes(h),o=s.chart.type,r=0,l=a(o)?s.series.length:1;i.comboBarCount>0&&(l=i.comboBarCount),i.collapsedSeries.forEach(h=>{a(h.type)&&(l-=1)}),s.chart.stacked&&(l=1);let c=a(o)||i.comboBarCount>0,n=Math.abs(i.initialMaxX-i.initialMinX);if(c&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&l>0&&n!==0){n<=3&&(n=i.dataPoints);let h=n/t,d=i.minXDiff&&i.minXDiff/h>0?i.minXDiff/h:0;d>t/2&&(d/=2),r=d*parseInt(s.plotOptions.bar.columnWidth,10)/100,r<1&&(r=1),i.barPadForNumericAxis=r}return r}gridPadFortitleSubtitle(){let{w:t}=this,{globals:e}=t,s=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(r=>{t.config[r].text!==void 0?s+=t.config[r].margin:s+=this.dCtx.isSparkline||!e.axisCharts?0:5}),t.config.legend.show&&t.config.legend.position==="bottom"&&!t.config.legend.floating&&!e.axisCharts&&(s+=10);let a=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");t.layout.gridHeight-=a.height+o.height+s,t.layout.translateY+=a.height+o.height+s}setGridXPosForDualYAxis(t,e){let{w:s}=this,i=new Q(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((a,o)=>{s.globals.ignoreYAxisIndexes.indexOf(o)===-1&&!a.floating&&!i.isYAxisHidden(o)&&(a.opposite&&(s.layout.translateX-=e[o].width+t[o].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}},St=class{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 Vt(this),this.dimYAxis=new qt(this),this.dimXAxis=new Ut(this),this.dimGrid=new jt(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(){let t=this.w,e=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};let 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(([a,o])=>{this.gridPad[a]=Math.max(o,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;let i=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-i*2,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(){let 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((g,f)=>{t.layout.yLabelsCoords.push({width:s[f].width,index:f}),t.layout.yTitleCoords.push({width:i[f].width,index:f})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();let a=this.dimXAxis.getxAxisLabelsCoords(),o=this.dimXAxis.getxAxisGroupLabelsCoords(),r=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,r,o),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=-1*(parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5)),t.layout.translateXAxisY=t.layout.translateXAxisY+t.config.xaxis.labels.offsetY,t.layout.translateXAxisX=t.layout.translateXAxisX+t.config.xaxis.labels.offsetX;let l=this.yAxisWidth,c=this.xAxisHeight;t.layout.xAxisLabelsHeight=this.xAxisHeight-r.height,t.layout.xAxisGroupLabelsHeight=t.layout.xAxisLabelsHeight-a.height,t.layout.xAxisLabelsWidth=this.xAxisWidth,t.layout.xAxisHeight=this.xAxisHeight;let n=10;(t.config.chart.type==="radar"||this.isSparkline)&&(l=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||t.config.chart.type==="treemap")&&(l=0,c=0,n=0),!this.isSparkline&&t.config.chart.type!=="treemap"&&this.dimXAxis.additionalPaddingXLabels(a);let h=()=>{t.layout.translateX=l+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-this.lgRect.height-c-(!this.isSparkline&&t.config.chart.type!=="treemap"?t.layout.rotateXLabels?10:15:0),t.layout.gridWidth=e.svgWidth-l-this.datalabelsCoords.width*2};switch(t.config.xaxis.position==="top"&&(n=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=n,h();break;case"top":t.layout.translateY=this.lgRect.height+n,h();break;case"left":t.layout.translateY=n,t.layout.translateX=this.lgRect.width+l+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-c-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-l-this.datalabelsCoords.width*2;break;case"right":t.layout.translateY=n,t.layout.translateX=l+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-c-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-l-this.datalabelsCoords.width*2-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(i,s),new pt(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){let t=this.w,e=t.globals,s=t.config,i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);let a=s.chart.type==="pie"||s.chart.type==="polarArea"||s.chart.type==="donut"?"pie":"radialBar",o=s.plotOptions[a].offsetY,r=s.plotOptions[a].offsetX;if(!s.legend.show||s.legend.floating){t.layout.gridHeight=e.svgHeight;let l=t.dom.elWrap.getBoundingClientRect().width;t.layout.gridWidth=Math.min(l,t.layout.gridHeight),t.layout.translateY=o,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;return}switch(s.legend.position){case"bottom":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=o-10,t.layout.translateX=r+(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+o+10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"left":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i,t.layout.gridHeight=s.chart.height!=="auto"?e.svgHeight:t.layout.gridWidth,t.layout.translateY=o,t.layout.translateX=r+this.lgRect.width+i;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i-5,t.layout.gridHeight=s.chart.height!=="auto"?e.svgHeight:t.layout.gridWidth,t.layout.translateY=o,t.layout.translateX=r+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,s){let i=this.w,a=i.labelData.hasXaxisGroups?2:1,o=s.height+t.height+e.height,r=i.axisFlags.isMultiLineX?1.2:Le,l=i.layout.rotateXLabels?22:10,n=i.layout.rotateXLabels&&i.config.legend.position==="bottom"?10:0;this.xAxisHeight=o*r+a*l+n,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 h=0,d=0;i.config.yaxis.forEach(g=>{h+=g.labels.minWidth,d+=g.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>d&&(this.yAxisWidth=d)}},Me=1440,Zt=Me*60,ze=10/Zt,Kt=class{constructor(t,e){this.w=t,this.ctx=e,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){let s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],[];let i=new B(this.w),a=(e-t)/(1e3*Zt);this.determineInterval(a),s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<ze?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);let o=i.getTimeUnitsfromTimestamp(t,e),r=s.layout.gridWidth/a,l=r/24,c=l/60,n=c/60,h=Math.floor(a*24),d=Math.floor(a*Me),g=Math.floor(a*Zt),f=Math.floor(a),p=Math.floor(a/30),u=Math.floor(a/365),m={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},x=m.minMillisecond,y=m.minSecond,w=m.minMinute,S=m.minHour,v=m.minDate,C=m.minDate,_=m.minMonth,D=m.minYear,k={firstVal:m,currentMillisecond:x,currentSecond:y,currentMinute:w,currentHour:S,currentMonthDate:v,currentDate:C,currentMonth:_,currentYear:D,daysWidthOnXAxis:r,hoursWidthOnXAxis:l,minutesWidthOnXAxis:c,secondsWidthOnXAxis:n,numberOfSeconds:g,numberOfMinutes:d,numberOfHours:h,numberOfDays:f,numberOfMonths:p,numberOfYears:u};switch(this.tickInterval){case"years":{this.generateYearScale(k);break}case"months":case"half_year":{this.generateMonthScale(k);break}case"months_days":case"months_fortnight":case"days":case"week_days":{this.generateDayScale(k);break}case"hours":{this.generateHourScale(k);break}case"minutes_fives":case"minutes":this.generateMinuteScale(k);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(k);break}let N=this.timeScaleArray.map(T=>{let X={position:T.position,unit:T.unit,year:T.year,day:T.day?T.day:1,hour:T.hour?T.hour:0,month:T.month+1};return T.unit==="month"?O(Y({},X),{day:1,value:T.value+1}):T.unit==="day"||T.unit==="hour"?O(Y({},X),{value:T.value}):T.unit==="minute"?O(Y({},X),{value:T.value,minute:T.value}):T.unit==="second"?O(Y({},X),{value:T.value,minute:T.minute,second:T.second}):T});return N.filter(T=>{let X=1,R=Math.ceil(s.layout.gridWidth/120),I=T.value;s.config.xaxis.tickAmount!==void 0&&(R=s.config.xaxis.tickAmount),N.length>R&&(X=Math.floor(N.length/R));let z=!1,W=!1;switch(this.tickInterval){case"years":T.unit==="year"&&(z=!0);break;case"half_year":X=7,T.unit==="year"&&(z=!0);break;case"months":X=1,T.unit==="year"&&(z=!0);break;case"months_fortnight":X=15,(T.unit==="year"||T.unit==="month")&&(z=!0),I===30&&(W=!0);break;case"months_days":X=10,T.unit==="month"&&(z=!0),I===30&&(W=!0);break;case"week_days":X=8,T.unit==="month"&&(z=!0);break;case"days":X=1,T.unit==="month"&&(z=!0);break;case"hours":T.unit==="day"&&(z=!0);break;case"minutes_fives":I%5!==0&&(W=!0);break;case"seconds_tens":I%10!==0&&(W=!0);break;case"seconds_fives":I%5!==0&&(W=!0);break}if(this.tickInterval==="hours"||this.tickInterval==="minutes_fives"||this.tickInterval==="seconds_tens"||this.tickInterval==="seconds_fives"){if(!W)return!0}else if((I%X===0||z)&&!W)return!0})}recalcDimensionsBasedOnFormat(t){let e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();let o=new St(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(o.layout)}determineInterval(t){let e=t/365,s=t*24,i=s*60,a=i*60;switch(!0){case e>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case s>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case a>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds";break}}generateYearScale({firstVal:t,currentMonth:e,currentYear:s,daysWidthOnXAxis:i,numberOfYears:a}){let o=t.minYear,r=0,l=new B(this.w),c="year";if(t.minDate>1||t.minMonth>0){let d=l.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);r=(l.determineDaysOfYear(t.minYear)-d+1)*i,o=t.minYear+1,this.timeScaleArray.push({position:r,value:o,unit:c,year:o,month:1})}else t.minDate===1&&t.minMonth===0&&this.timeScaleArray.push({position:r,value:o,unit:c,year:s,month:A.monthMod(e+1)});let n=o,h=r;for(let d=0;d<a;d++)n++,h=l.determineDaysOfYear(n-1)*i+h,this.timeScaleArray.push({position:h,value:n,unit:c,year:n,month:1})}generateMonthScale({firstVal:t,currentMonthDate:e,currentMonth:s,currentYear:i,daysWidthOnXAxis:a,numberOfMonths:o}){let r=s,l=0,c=new B(this.w),n="month",h=0;if(t.minDate>1){l=(c.determineDaysOfMonths(s+1,t.minYear)-e+1)*a,r=A.monthMod(s+1);let p=i+h,u=A.monthMod(r),m=r;r===0&&(n="year",m=p,u=1,h+=1,p=p+h),this.timeScaleArray.push({position:l,value:m,unit:n,year:p,month:u})}else this.timeScaleArray.push({position:l,value:r,unit:n,year:i,month:A.monthMod(s)});let d=r+1,g=l;for(let f=0,p=1;f<o;f++,p++){d=A.monthMod(d),d===0?(n="year",h+=1):n="month";let u=this._getYear(i,d,h);g=c.determineDaysOfMonths(d,u)*a+g;let m=d===0?u:d;this.timeScaleArray.push({position:g,value:m,unit:n,year:u,month:d===0?1:d}),d++}}generateDayScale({firstVal:t,currentMonth:e,currentYear:s,hoursWidthOnXAxis:i,numberOfDays:a}){let o=new B(this.w),r="day",l=t.minDate+1,c=l,n=(m,x,y)=>{let w=o.determineDaysOfMonths(x+1,y);return m>w&&(x=x+1,c=1,r="month",f=x),x},h=24-t.minHour,d=0,g=h*i,f=l,p=n(c,e,s);t.minHour===0&&t.minDate===1?(g=0,f=A.monthMod(t.minMonth),r="month",c=t.minDate):t.minDate!==1&&t.minHour===0&&t.minMinute===0&&(g=0,l=t.minDate,c=l,f=l,p=n(c,e,s),f!==1&&(r="day")),this.timeScaleArray.push({position:g,value:f,unit:r,year:this._getYear(s,p,d),month:A.monthMod(p),day:c});let u=g;for(let m=0;m<a;m++){c+=1,r="day",p=n(c,p,this._getYear(s,p,d));let x=this._getYear(s,p,d);u=24*i+u;let y=c===1?A.monthMod(p):c;this.timeScaleArray.push({position:u,value:y,unit:r,year:x,month:A.monthMod(p),day:y})}}generateHourScale({firstVal:t,currentDate:e,currentMonth:s,currentYear:i,minutesWidthOnXAxis:a,numberOfHours:o}){let r=new B(this.w),l=0,c="hour",n=(w,S)=>{let v=r.determineDaysOfMonths(S+1,i);return w>v&&(u=1,S=S+1),{month:S,date:u}},h=(w,S)=>{let v=r.determineDaysOfMonths(S+1,i);return w>v&&(S=S+1),S},d=60-(t.minMinute+t.minSecond/60),g=d*a,f=t.minHour+1,p=f;d===60&&(g=0,f=t.minHour,p=f);let u=e;p>=24&&(p=0,u+=1,c="day",f=u);let x=n(u,s).month;x=h(u,x),c==="day"&&(f=u),this.timeScaleArray.push({position:g,value:f,unit:c,day:u,hour:p,year:i,month:A.monthMod(x)}),p++;let y=g;for(let w=0;w<o;w++){c="hour",p>=24&&(p=0,u+=1,c="day",x=n(u,x).month,x=h(u,x));let S=this._getYear(i,x,l);y=60*a+y;let v=p===0?u:p;this.timeScaleArray.push({position:y,value:v,unit:c,hour:p,day:u,year:S,month:A.monthMod(x)}),p++}}generateMinuteScale({currentMillisecond:t,currentSecond:e,currentMinute:s,currentHour:i,currentDate:a,currentMonth:o,currentYear:r,minutesWidthOnXAxis:l,secondsWidthOnXAxis:c,numberOfMinutes:n}){let h=new B(this.w),d=0,g="minute",p=(60-e-t/1e3)*c,u=s+1;e===0&&t===0&&(p=0,u=s);let m=a,x=o,y=r,w=i,S=p;for(let v=0;v<n;v++){if(u>=60&&(u=0,w+=1,w===24)){w=0,m+=1;let C=h.determineDaysOfMonths(x+1,this._getYear(y,x,d));m>C&&(m=1,x+=1)}this.timeScaleArray.push({position:S,value:u,unit:g,hour:w,minute:u,day:m,year:this._getYear(y,x,d),month:A.monthMod(x)}),S+=l,u++}}generateSecondScale({currentMillisecond:t,currentSecond:e,currentMinute:s,currentHour:i,currentDate:a,currentMonth:o,currentYear:r,secondsWidthOnXAxis:l,numberOfSeconds:c}){let h="second",g=(1e3-t)/1e3*l,f=e+1;t===0&&(g=0,f=e);let p=s,u=a,m=o,x=r,y=i,w=g;for(let S=0;S<c;S++)f>=60&&(p++,f=0,p>=60&&(y++,p=0,y===24&&(y=0))),this.timeScaleArray.push({position:w,value:f,unit:h,hour:y,minute:p,second:f,day:u,year:this._getYear(x,m,0),month:A.monthMod(m)}),w+=l,f++}createRawDateString(t,e){let s=t.year;return t.month===0&&(t.month=1),s+="-"+("0"+t.month.toString()).slice(-2),t.unit==="day"?s+="-"+("0"+e).slice(-2):s+="-"+("0"+(t.day?t.day:"1")).slice(-2),t.unit==="hour"?s+="T"+("0"+e).slice(-2):s+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),t.unit==="minute"?s+=":"+("0"+e).slice(-2):s+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),t.unit==="second"?s+=":"+("0"+e).slice(-2):s+=":00",this.utc&&(s+=".000Z"),s}formatDates(t){let e=this.w;return t.map(i=>{let a=i.value.toString(),o=new B(this.w),r=this.createRawDateString(i,a),l=o.getDate(o.parseDate(r));if(this.utc||(l=o.getDate(o.parseDateWithTimezone(r))),e.config.xaxis.labels.format===void 0){let c="dd MMM",n=e.config.xaxis.labels.datetimeFormatter;i.unit==="year"&&(c=n.year),i.unit==="month"&&(c=n.month),i.unit==="day"&&(c=n.day),i.unit==="hour"&&(c=n.hour),i.unit==="minute"&&(c=n.minute),i.unit==="second"&&(c=n.second),a=o.formatDate(l,c)}else a=o.formatDate(l,e.config.xaxis.labels.format);return{dateString:r,position:i.position,value:a,unit:i.unit,year:i.year,month:i.month}})}removeOverlappingTS(t){let e=new L(this.w),s=!1,i;t.length>0&&t[0].value&&t.every(r=>r.value.length===t[0].value.length)&&(s=!0,i=e.getTextRects(t[0].value,this.w.config.xaxis.labels.style.fontSize).width);let a=0,o=t.map((r,l)=>{if(l>0&&this.w.config.xaxis.labels.hideOverlappingLabels){let c=s?i:e.getTextRects(t[a].value,this.w.config.xaxis.labels.style.fontSize).width,n=t[a].position;return r.position>n+c+10?(a=l,r):null}else return r});return o=o.filter(r=>r!==null),o}_getYear(t,e,s){return t+Math.floor(e/12)+s}},Jt="__apexcharts_registry__";globalThis[Jt]||(globalThis[Jt]={});function Ee(){return globalThis[Jt]}function Oe(b){Object.assign(Ee(),b)}function U(b){let t=Ee()[b];if(!t)throw new Error(`ApexCharts: chart type "${b}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return t}var Qt=class{constructor(t,e,s){this.w=e,this.ctx=s,this.el=t}setupElements(){let{globals:t,config:e}=this.w,s=e.chart.type,i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"],a=[...i,"radar","heatmap","treemap"];t.axisCharts=a.includes(s),t.xyCharts=i.includes(s),t.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(s)&&e.plotOptions.bar.horizontal,t.chartClass=`.apexcharts${t.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=F.createElementNS("http://www.w3.org/1999/xhtml","div"),L.setAttrs(this.w.dom.elWrap,{id:t.chartClass.substring(1),class:`apexcharts-canvas ${t.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);let o=M.isBrowser()?window.SVG:global.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=e.theme.mode==="dark"&&!e.chart.background?"#343A3F":e.theme.mode==="light"&&!e.chart.background?"#fff":e.chart.background,this.setSVGDimensions(),this.w.dom.elLegendForeign=F.createElementNS(H,"foreignObject"),L.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=F.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){let r=this.getAccessibleChartLabel(),l=e.chart.accessibility.keyboard.enabled&&e.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:l,"aria-label":r}),e.chart.accessibility.description){let c=F.createElementNS(H,"desc");c.textContent=e.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(c,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){let{w:s,ctx:i}=this,{config:a,globals:o}=s,r={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},l=a.chart.type||"line",c=null,n=0;this.w.seriesData.series.forEach((x,y)=>{var w,S;let v=((w=t[y])==null?void 0:w.type)==="column"?"bar":((S=t[y])==null?void 0:S.type)||(l==="column"?"bar":l);r[v]?(v==="rangeArea"?(r[v].series.push(this.w.rangeData.seriesRangeStart[y]),r[v].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[y])):r[v].series.push(x),r[v].i.push(y),v==="bar"&&(s.globals.columnSeries=r.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(v)?c=v:console.warn(`You have specified an unrecognized series type (${v}).`),l!==v&&v!=="scatter"&&n++}),n>0&&(c&&console.warn(`Chart or series type ${c} cannot appear with other chart or series types.`),r.bar.series.length>0&&a.plotOptions.bar.horizontal&&(n-=r.bar.series.length,r.bar={series:[],i:[]},s.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=n>0);let d=r.line.series.length>0||r.area.series.length>0||r.scatter.series.length>0||r.bubble.series.length>0||r.rangeArea.series.length>0||!o.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(U("line"))(i.w,i,e):null,f=r.candlestick.series.length>0||r.boxPlot.series.length>0||!o.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(U("candlestick"))(i.w,i,e):null,p=!o.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=p?new(U("pie"))(i.w,i):null;let u=r.rangeBar.series.length>0||!o.comboCharts&&a.chart.type==="rangeBar";i.rangeBar=u?new(U("rangeBar"))(i.w,i,e):null;let m=[];if(o.comboCharts){let x=new q(this.w);if(r.area.series.length>0&&m.push(...x.drawSeriesByGroup(r.area,o.areaGroups,"area",d)),r.bar.series.length>0)if(a.chart.stacked){let y=new(U("barStacked"))(i.w,i,e);m.push(y.draw(r.bar.series,r.bar.i))}else i.bar=new(U("bar"))(i.w,i,e),m.push(i.bar.draw(r.bar.series,r.bar.i));if(r.rangeArea.series.length>0&&m.push(d.draw(r.rangeArea.series,"rangeArea",r.rangeArea.i,r.rangeArea.seriesRangeEnd)),r.line.series.length>0&&m.push(...x.drawSeriesByGroup(r.line,o.lineGroups,"line",d)),r.candlestick.series.length>0&&m.push(f.draw(r.candlestick.series,"candlestick",r.candlestick.i)),r.boxPlot.series.length>0&&m.push(f.draw(r.boxPlot.series,"boxPlot",r.boxPlot.i)),r.rangeBar.series.length>0&&m.push(i.rangeBar.draw(r.rangeBar.series,r.rangeBar.i)),r.scatter.series.length>0){let y=new(U("line"))(i.w,i,e,!0);m.push(y.draw(r.scatter.series,"scatter",r.scatter.i))}if(r.bubble.series.length>0){let y=new(U("line"))(i.w,i,e,!0);m.push(y.draw(r.bubble.series,"bubble",r.bubble.i))}}else{let x=a.chart.type;switch(x){case"line":m=d.draw(this.w.seriesData.series,"line");break;case"area":m=d.draw(this.w.seriesData.series,"area");break;case"bar":a.chart.stacked?m=new(U("barStacked"))(i.w,i,e).draw(this.w.seriesData.series):(i.bar=new(U("bar"))(i.w,i,e),m=i.bar.draw(this.w.seriesData.series));break;case"candlestick":m=f.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":m=f.draw(this.w.seriesData.series,x);break;case"rangeBar":m=i.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":m=d.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{m=new(U("heatmap"))(i.w,i,e).draw(this.w.seriesData.series);break}case"treemap":{m=new(U("treemap"))(i.w,i).draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":m=i.pie.draw(this.w.seriesData.series);break;case"radialBar":{m=new(U("radialBar"))(i.w,i).draw(this.w.seriesData.series);break}case"radar":{m=new(U("radar"))(i.w,i).draw(this.w.seriesData.series);break}default:m=d.draw(this.w.seriesData.series)}}return m}setSVGDimensions(){var t;let{globals:e,config:s}=this.w;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto";let i=s.chart.width,a=s.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let o=A.getDimensions(this.el),r=i.toString().split(/[0-9]+/g).pop();r==="%"?A.isNumber(o[0])&&(o[0].width===0&&(o=A.getDimensions(this.el.parentNode)),e.svgWidth=o[0]*parseInt(i,10)/100):(r==="px"||r==="")&&(e.svgWidth=parseInt(i,10));let l=String(a).toString().split(/[0-9]+/g).pop();if(a!=="auto"&&a!=="")if(l==="%"){let c=A.getDimensions(this.el.parentNode);e.svgHeight=c[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),L.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),l!=="%"&&M.isBrowser()){let c=s.chart.sparkline.enabled?0:e.axisCharts?s.chart.parentHeightOffset:0,n=this.w.dom.Paper.node;(t=n.parentNode)!=null&&t.parentNode&&(n.parentNode.parentNode.style.minHeight=`${e.svgHeight+c}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`}shiftGraphPosition(){let{globals:t}=this.w,{translateY:e,translateX:s}=t;L.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e;let{w:s}=this,i=0,a=s.config.chart.sparkline.enabled?1:15;a+=s.config.grid.padding.bottom,["top","bottom"].includes(s.config.legend.position)&&s.config.legend.show&&!s.config.legend.floating&&(i=((e=(t=this.ctx.legend)==null?void 0:t.legendHelpers.getLegendDimensions().clwh)!=null?e:0)+7);let o=s.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=s.globals.radialSize*2.05;if(o&&!s.config.chart.sparkline.enabled&&s.config.plotOptions.radialBar.startAngle!==0){let c=A.getBoundingClientRect(o);r=c.bottom;let n=c.bottom-c.top;r=Math.max(s.globals.radialSize*2.05,n)}let l=Math.ceil(r+this.w.layout.translateY+i+a);this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(l)),!(s.config.chart.height&&String(s.config.chart.height).includes("%"))&&(this.w.dom.elWrap.style.height=`${l}px`,L.setAttrs(this.w.dom.Paper.node,{height:l}),M.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${l}px`))}coreCalculations(){new gt(this.w).init()}resetGlobals(){let t=()=>this.w.config.series.map(()=>[]),e=new yt,{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):!1}xySettings(){let{w:t}=this,e=null;if(t.globals.axisCharts){if(t.config.xaxis.crosshairs.position==="back"&&new ut(this.w).drawXCrosshairs(),t.config.yaxis[0].crosshairs.position==="back"&&new ut(this.w).drawYCrosshairs(),t.config.xaxis.type==="datetime"&&t.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Kt(this.w,this.ctx);let i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new q(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(){let{ctx:t,w:e}=this;if(e.config.chart.brush.enabled&&typeof e.config.chart.events.selection!="function"){let s=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];s.forEach(i=>{let a=t.constructor.getChartByID(i);a.w.globals.brushSource=this.ctx,typeof a.w.config.chart.events.zoomed!="function"&&(a.w.config.chart.events.zoomed=()=>this.updateSourceChart(a)),typeof a.w.config.chart.events.scrolled!="function"&&(a.w.config.chart.events.scrolled=()=>this.updateSourceChart(a))}),e.config.chart.events.selection=(i,a)=>{s.forEach(o=>{t.constructor.getChartByID(o).ctx.updateHelpers._updateOptions({xaxis:{min:a.xaxis.min,max:a.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){let t=this.w,e=t.config,s="";if(e.chart.accessibility&&e.chart.accessibility.description)s=e.chart.accessibility.description;else if(e.title.text){let i=e.chart.type;s=`${e.title.text}. ${i} chart`,e.subtitle.text&&(s+=`. ${e.subtitle.text}`)}else{let i=e.chart.type,a=t.seriesData.series.length||(e.series?e.series.length:0);s=`${i} chart with ${a} data series`}return s}},Ct=class b{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 q(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){let t=this.w.config.series,e=new tt(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();let s=t[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&s.data[0]!==null&&typeof s.data[0]<"u"?s.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;let e=this.getFirstDataPoint();if(!e||typeof e.x>"u")return!1;let s=(t=this.w.config.series[this.activeSeriesIndex])==null?void 0:t.data;if(s){let i=a=>a&&typeof a.x<"u";for(let a=1;a<Math.min(3,s.length);a++)if(i(s[a])!==!0){console.warn(`ApexCharts: series data has mixed formats starting at index ${a}`);break}}return!0}isFormat2DArray(){let t=this.getFirstDataPoint();return t&&Array.isArray(t)}handleFormat2DArray(t,e){let s=this.w.config,i=t[e].data,a=s.chart.type==="boxPlot"||s.series[e].type==="boxPlot";for(let o=0;o<i.length;o++){let r=i[o],l=r[0],c=r[1],n=r[2];if(typeof c<"u"&&(Array.isArray(c)&&c.length===4&&!a?this.twoDSeries.push(A.parseNumber(c[3])):r.length>=5?this.twoDSeries.push(A.parseNumber(r[4])):this.twoDSeries.push(A.parseNumber(c)),this.w.axisFlags.dataFormatXNumeric=!0),s.xaxis.type==="datetime"){let h=new Date(l).getTime();this.twoDSeriesX.push(h)}else this.twoDSeriesX.push(l);typeof n<"u"&&(this.threeDSeries.push(n),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){let s=this.w.config,i=this.w.globals,a=new B(this.w),o=t[e].data,r=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);let l=t[r].data;for(let c=0;c<o.length;c++){let n=o[c];if(typeof n.y<"u"){let h=Array.isArray(n.y)?A.parseNumber(n.y[n.y.length-1]):A.parseNumber(n.y);this.twoDSeries.push(h)}typeof this.seriesGoals[e]>"u"&&(this.seriesGoals[e]=[]),typeof n.goals<"u"&&Array.isArray(n.goals)?this.seriesGoals[e].push(n.goals):this.seriesGoals[e].push(null),typeof n.z<"u"&&(this.threeDSeries.push(n.z),this.w.axisFlags.isDataXYZ=!0)}for(let c=0;c<l.length;c++){let h=l[c].x,d=typeof h=="string",g=Array.isArray(h),f=!g&&!!a.isValidDate(h);if(d||f)if(d||s.xaxis.convertedCatToNumeric){let p=i.isBarHorizontal&&this.w.axisFlags.isRangeData;s.xaxis.type==="datetime"&&!p?this.twoDSeriesX.push(a.parseDate(h)):(this.fallbackToCategory=!0,this.twoDSeriesX.push(h),!isNaN(h)&&this.w.config.xaxis.type!=="category"&&typeof h!="string"&&(this.w.axisFlags.isXNumeric=!0))}else s.xaxis.type==="datetime"?this.twoDSeriesX.push(a.parseDate(h.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(h)));else g?(this.fallbackToCategory=!0,this.twoDSeriesX.push(h)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(h))}}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]=s.start===void 0?[]:s.start,this.w.rangeData.seriesRangeEnd[e]=s.end===void 0?[]:s.end,this.w.rangeData.seriesRange[e]=s.rangeUniques,this.w.rangeData.seriesRange.forEach(i=>{i&&i.forEach(a=>{let o=a.y,r=o.length;if(!(r<=1))for(let l=0;l<r;l++){let c=o[l],n=c.y1,h=c.y2;for(let d=l+1;d<r;d++){let g=o[d],f=g.y1,p=g.y2;if(n<=p&&f<=h){let u=a;u.overlaps.add(c.rangeName),u.overlaps.add(g.rangeName)}}}})}),s}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,s}handleRangeDataFormat(t,e,s){let i=[],a=[],o=new Map,r=[];if(e[s].data.forEach(l=>{if(!o.has(l.x)){let c={x:l.x,overlaps:new Set,y:[]};o.set(l.x,c),r.push(c)}}),t==="array")for(let l=0;l<e[s].data.length;l++)Array.isArray(e[s].data[l])?(i.push(e[s].data[l][1][0]),a.push(e[s].data[l][1][1])):(i.push(e[s].data[l]),a.push(e[s].data[l]));else if(t==="xy")for(let l=0;l<e[s].data.length;l++){let c=Array.isArray(e[s].data[l].y),n=A.randomId(),h=e[s].data[l].x,d={y1:c?e[s].data[l].y[0]:e[s].data[l].y,y2:c?e[s].data[l].y[1]:e[s].data[l].y,rangeName:n};e[s].data[l].rangeName=n;let g=o.get(h);g&&g.y.push(d),i.push(d.y1),a.push(d.y2)}return{start:i,end:a,rangeUniques:r}}handleCandleStickBoxDataFormat(t,e,s){let i=this.w,a=i.config.chart.type==="boxPlot"||i.config.series[s].type==="boxPlot",o=[],r=[],l=[],c=[],n=[],h=e[s].data,d;t==="array"?a&&h[0].length===6||!a&&h[0].length===5?d=f=>f.slice(1):d=f=>Array.isArray(f[1])?f[1]:[]:d=g=>Array.isArray(g.y)?g.y:[];for(let g=0;g<h.length;g++){let f=d(h[g]);f&&f.length>=2&&(o.push(f[0]),r.push(f[1]),a?(l.push(f[2]),c.push(f[3]),n.push(f[4])):(c.push(f[2]),n.push(f[3])))}return{o,h:r,m:l,l:c,c:n}}parseDataAxisCharts(t){var e,s;let i=this.w.config,a=this.w.globals,o=new B(this.w),r=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();this.w.axisFlags.isRangeBar=i.chart.type==="rangeBar"&&a.isBarHorizontal,this.w.labelData.hasXaxisGroups=i.xaxis.type==="category"&&i.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=i.xaxis.group.groups),t.forEach((h,d)=>{h.name!==void 0?this.w.seriesData.seriesNames.push(h.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(d+1),10))}),this.coreUtils.setSeriesYAxisMappings();let l=[],c=[...new Set(i.series.map(h=>h.group))];i.series.forEach((h,d)=>{let g=c.indexOf(h.group);l[g]||(l[g]=[]),l[g].push(this.w.seriesData.seriesNames[d])}),this.w.labelData.seriesGroups=l;let n=()=>{for(let h=0;h<r.length;h++)if(typeof r[h]=="string")if(o.isValidDate(r[h]))this.twoDSeriesX.push(o.parseDate(r[h]));else throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");else this.twoDSeriesX.push(r[h])};for(let h=0;h<t.length;h++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],typeof t[h].data>"u"){console.error("It is a possibility that you may have not included 'data' property in series.");return}let d=i.chart.dataReducer;if(d?.enabled&&this.isMultiFormat()&&t[h].data.length>((e=d.threshold)!=null?e:500)&&(t[h]=O(Y({},t[h]),{data:b.lttbDownsample(t[h].data,(s=d.targetPoints)!=null?s:250)})),(i.chart.type==="rangeBar"||i.chart.type==="rangeArea"||t[h].type==="rangeBar"||t[h].type==="rangeArea")&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,h)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,h):this.isFormatXY()&&this.handleFormatXY(t,h),(i.chart.type==="candlestick"||t[h].type==="candlestick"||i.chart.type==="boxPlot"||t[h].type==="boxPlot")&&this.handleCandleStickBoxData(t,h),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,h===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{i.xaxis.type==="datetime"?(this.w.axisFlags.isXNumeric=!0,n(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):i.xaxis.type==="numeric"&&(this.w.axisFlags.isXNumeric=!0,r.length>0&&(this.twoDSeriesX=r,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);let g=t[h].data.map(f=>A.parseNumber(f));this.w.seriesData.series.push(g)}this.w.seriesData.seriesZ.push(this.threeDSeries),t[h].color!==void 0?this.w.seriesData.seriesColors.push(t[h].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(t){let e=this.w.config,s=Array.isArray(t)&&t.every(o=>typeof o=="number")&&e.labels.length>0,i=Array.isArray(t)&&t.some(o=>o&&typeof o=="object"&&o.data||o&&typeof o=="object"&&o.parsing);if(s&&i&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),s){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=e.labels.slice();for(let o=0;o<this.w.seriesData.series.length;o++)this.w.seriesData.seriesNames[o]===void 0&&this.w.seriesData.seriesNames.push("series-"+(o+1));return this.w}if(Array.isArray(t)&&t.every(o=>typeof o=="number")){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=[];for(let o=0;o<this.w.seriesData.series.length;o++)this.w.seriesData.seriesNames.push(e.labels[o]||`series-${o+1}`);return this.w}let a=this.extractPieDataFromSeries(t);this.w.seriesData.series=a.values,this.w.seriesData.seriesNames=a.labels,e.chart.type==="radialBar"&&(this.w.seriesData.series=this.w.seriesData.series.map(o=>{let r=A.parseNumber(o);return r>100&&console.warn(`ApexCharts: RadialBar value ${r} > 100, consider using percentage values (0-100)`),r}));for(let o=0;o<this.w.seriesData.series.length;o++)this.w.seriesData.seriesNames[o]===void 0&&this.w.seriesData.seriesNames.push("series-"+(o+1));return this.w}resetParsingFlags(){let t=this.w;t.axisFlags.dataWasParsed=!1,t.globals.originalSeries=null,t.config.series&&t.config.series.forEach(e=>{e.__apexParsed&&delete e.__apexParsed})}extractPieDataFromSeries(t){let e=[],s=[];if(!Array.isArray(t))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(t.length===0)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};let i=t[0];if(typeof i=="object"&&i!==null&&i.data)this.extractPieDataFromSeriesObjects(t,e,s);else return console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]};return{values:e,labels:s}}extractPieDataFromSeriesObjects(t,e,s){t.forEach((i,a)=>{if(!i.data||!Array.isArray(i.data)){console.warn(`ApexCharts: Series ${a} has no valid data array`);return}i.data.forEach(o=>{typeof o=="object"&&o!==null?o.x!==void 0&&o.y!==void 0?(s.push(String(o.x)),e.push(A.parseNumber(o.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",o):console.warn("ApexCharts: Expected object data point, got:",typeof o)})})}handleExternalLabelsData(t){let 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(i=>{i.forEach(a=>{this.w.labelData.labels.indexOf(a.x)<0&&a.x&&this.w.labelData.labels.push(a.x)})});let s=this.w.labelData.labels;if(s.length>0&&(typeof s[0]=="number"||typeof s[0]=="string"))this.w.labelData.labels=[...new Set(s)];else{let i=new Map;for(let a of s){let o=JSON.stringify(a);i.has(o)||i.set(o,a)}this.w.labelData.labels=Array.from(i.values())}}e.xaxis.convertedCatToNumeric&&(new rt(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t))}else this._generateExternalLabels(t)}_generateExternalLabels(t){let e=this.w.globals,s=this.w.config,i=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){let a=s.series.map(r=>{let l=new Map;for(let c of r.data)l.has(c.x)||l.set(c.x,c);return Array.from(l.values())}),o=a.reduce((r,l,c,n)=>n[r].length>l.length?r:c,0);for(let r=0;r<a[o].length;r++)i.push(r+1)}else for(let a=0;a<this.w.seriesData.series[e.maxValsInArrayIndex].length;a++)i.push(a+1);this.w.seriesData.seriesX=[];for(let a=0;a<t.length;a++)this.w.seriesData.seriesX.push(i);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(i.length===0){i=e.axisCharts?[]:this.w.seriesData.series.map((a,o)=>o+1);for(let a=0;a<t.length;a++)this.w.seriesData.seriesX.push(i)}this.w.labelData.labels=i,s.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=i.map(a=>s.xaxis.labels.formatter(a))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){let e=this.w.config,s=this.w.globals,i=e.parsing;if(this.w.axisFlags.dataWasParsed||!i&&!t.some(o=>o.parsing))return t;let a=t.map((o,r)=>{var l,c,n;if(!o.data||!Array.isArray(o.data)||o.data.length===0)return o;let h={x:((l=o.parsing)==null?void 0:l.x)||i?.x,y:((c=o.parsing)==null?void 0:c.y)||i?.y,z:((n=o.parsing)==null?void 0:n.z)||i?.z};if(!h.x&&!h.y)return o;let d=o.data[0];if(typeof d=="object"&&d!==null&&(Object.prototype.hasOwnProperty.call(d,"x")||Object.prototype.hasOwnProperty.call(d,"y"))||Array.isArray(d))return o;if(!h.x||!h.y||Array.isArray(h.y)&&h.y.length===0)return console.warn(`ApexCharts: Series ${r} has parsing config but missing x or y field specification`),o;let g=o.data.map((f,p)=>{if(typeof f!="object"||f===null)return console.warn(`ApexCharts: Series ${r}, data point ${p} is not an object, skipping parsing`),f;let u=this.getNestedValue(f,h.x),m,x;if(Array.isArray(h.y)){let w=h.y.map(S=>this.getNestedValue(f,S));this.w.config.chart.type==="bubble"?(w.length<2&&console.warn(`ApexCharts: series[${r}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(h.y)}`),m=w[0]):m=w}else m=this.getNestedValue(f,h.y);h.z&&(x=this.getNestedValue(f,h.z)),u===void 0&&console.warn(`ApexCharts: Series ${r}, data point ${p} missing field '${h.x}'`),m===void 0&&console.warn(`ApexCharts: Series ${r}, data point ${p} missing field '${h.y}'`);let y={x:u,y:m,z:void 0};if(this.w.config.chart.type==="bubble"&&Array.isArray(h.y)&&h.y.length===2){let w=this.getNestedValue(f,h.y[1]);w!==void 0&&(y.z=w)}return x!==void 0&&(y.z=x),y});return O(Y({},o),{data:g,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=A.clone(t)),a}getNestedValue(t,e){if(!t||typeof t!="object"||!e)return;if(e.indexOf(".")===-1)return t[e];let s=e.split("."),i=t;for(let a=0;a<s.length;a++){if(i==null||typeof i!="object")return;i=i[s[a]]}return i}parseData(t){let e=this.w,s=e.config,i=e.globals;if(t=this.parseRawDataIfNeeded(t),s.series=t,i.initialSeries=A.clone(t),this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),i.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),s.chart.stacked){let o=new tt(this.w);this.w.seriesData.series=o.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),i.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||s.xaxis.type==="numeric"&&s.labels.length===0&&s.xaxis.categories.length===0)&&this.handleExternalLabelsData(t);let a=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let o=0;o<a.length;o++)if(Array.isArray(a[o])){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:i.initialSeries,originalSeries:i.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},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 lttbDownsample(t,e){let s=t.length;if(e>=s||e<3)return t;let i=!Array.isArray(t[0]),a=i?n=>n.x:n=>n[0],o=i?n=>n.y:n=>n[1],r=[];r.push(t[0]);let l=(s-2)/(e-2),c=0;for(let n=0;n<e-2;n++){let h=Math.floor((n+1)*l)+1,d=Math.min(Math.floor((n+2)*l)+1,s),g=0,f=0,p=d-h;for(let v=h;v<d;v++)g+=a(t[v]),f+=o(t[v]);g/=p,f/=p;let u=Math.floor(n*l)+1,m=Math.min(Math.floor((n+1)*l)+1,s),x=a(t[c]),y=o(t[c]),w=-1,S=u;for(let v=u;v<m;v++){let C=Math.abs((x-g)*(o(t[v])-y)-(x-a(t[v]))*(f-y))*.5;C>w&&(w=C,S=v)}r.push(t[S]),c=S}return r.push(t[s-1]),r}excludeCollapsedSeriesInYAxis(){let t=this.w,e=[];t.globals.seriesYAxisMap.forEach((s,i)=>{let a=0;s.forEach(o=>{t.globals.collapsedSeriesIndices.indexOf(o)!==-1&&a++}),a>0&&a==s.length&&e.push(i)}),t.globals.ignoreYAxisIndexes=e.map(s=>s)}},te=class{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,s=!0,i=!0,a=!1){return new Promise(o=>{let r=[this.ctx];i&&(r=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(r=[this.ctx],this.w.globals.isExecCalled=!1),r.forEach((l,c)=>{let n=l.w;if(n.globals.shouldAnimate=s,e||(n.globals.resized=!0,n.globals.dataChanged=!0,s&&l.series.getPreviousPaths()),t&&typeof t=="object"&&(l.config=new ot(t),t=q.extendArrayProps(l.config,t,n),l.w.globals.chartID!==this.w.globals.chartID&&delete t.series,n.config=A.extend(n.config,t),a&&(n.globals.lastXAxis=t.xaxis?A.clone(t.xaxis):[],n.globals.lastYAxis=t.yaxis?A.clone(t.yaxis):[],n.globals.initialConfig=A.extend({},n.config),n.globals.initialSeries=A.clone(n.config.series),t.series))){for(let h=0;h<n.globals.collapsedSeriesIndices.length;h++){let d=n.config.series[n.globals.collapsedSeriesIndices[h]];n.globals.collapsedSeries[h].data=n.globals.axisCharts?d.data.slice():d}for(let h=0;h<n.globals.ancillaryCollapsedSeriesIndices.length;h++){let d=n.config.series[n.globals.ancillaryCollapsedSeriesIndices[h]];n.globals.ancillaryCollapsedSeries[h].data=n.globals.axisCharts?d.data.slice():d}l.series.emptyCollapsedSeries(n.config.series)}return l.update(t).then(()=>{c===r.length-1&&o(l)})})})}_updateSeries(t,e,s=!1){return new Promise(i=>{let a=this.w;a.globals.shouldAnimate=e,a.globals.dataChanged=!0,ft.invalidateSelectors(a),e&&this.ctx.series.getPreviousPaths();let o=a.config.series.length;this.ctx.data.resetParsingFlags();let r=this.ctx.data.parseData(t);return this.ctx._writeParsedSeriesData(r.seriesData),this.ctx._writeParsedRangeData(r.rangeData),this.ctx._writeParsedCandleData(r.candleData),this.ctx._writeParsedLabelData(r.labelData),this.ctx._writeParsedAxisFlags(r.axisFlags),s&&(a.globals.initialConfig&&(a.globals.initialConfig.series=A.clone(a.config.series)),a.globals.initialSeries=A.clone(a.config.series)),this._canUseFastPath(t,o,a)?this.ctx.fastUpdate(e).then(()=>{i(this.ctx)}):this.ctx.update().then(()=>{i(this.ctx)})})}_canUseFastPath(t,e,s){return!(!s.dom.elGraphical||!s.globals.axisCharts||t.length!==e||s.globals.collapsedSeries.length>0||s.globals.comboCharts)}_extendSeries(t,e){let s=this.w,i=s.config.series[e];return O(Y({},s.config.series[e]),{name:t.name?t.name:i?.name,color:t.color?t.color:i?.color,type:t.type?t.type:i?.type,group:t.group?t.group:i?.group,hidden:typeof t.hidden<"u"?t.hidden:i?.hidden,data:t.data?t.data:i?.data,zIndex:typeof t.zIndex<"u"?t.zIndex:e})}toggleDataPointSelection(t,e){let s=this.w,i=null,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}']`):typeof e>"u"&&(i=s.dom.Paper.findOne(`${a} path[j='${t}']`),(s.config.chart.type==="pie"||s.config.chart.type==="polarArea"||s.config.chart.type==="donut")&&this.ctx.pie.pieClicked(t)),i)new L(this.w).pathMouseDown(i,null);else return console.warn("toggleDataPointSelection: Element not found"),null;return i.node?i.node:null}forceXAxisUpdate(t){let e=this.w;return["min","max"].forEach(i=>{typeof t.xaxis[i]<"u"&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])}),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric&&(t=new rt(t).convertCatToNumericXaxis(t,this.ctx)),t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&t.chart.stackType==="100%"&&(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){let e=this.w,s=e.globals.lastXAxis,i=e.globals.lastYAxis;t&&t.xaxis&&(s=t.xaxis),t&&t.yaxis&&(i=t.yaxis);let a=s;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;let o=r=>{if(typeof i[r]<"u"){let l=i[r];e.config.yaxis[r].min=l.min,e.config.yaxis[r].max=l.max}};e.config.yaxis.map((r,l)=>{e.interact.zoomed||typeof i[l]<"u"?o(l):typeof this.ctx.opts.yaxis[l]<"u"&&(r.min=this.ctx.opts.yaxis[l].min,r.max=this.ctx.opts.yaxis[l].max)})}},kt=class{constructor(t){this.w=t.w,this.ttCtx=t}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,o;let r=this.w,l=e.getBoundingClientRect(),c=l.width,n=l.height,h=c/(r.globals.dataPoints-1),d=n/r.globals.dataPoints,g=this.hasBars();(r.globals.comboCharts||g)&&!r.config.xaxis.convertedCatToNumeric&&(h=c/r.globals.dataPoints);let f=s-l.left-r.globals.barPadForNumericAxis,p=i-l.top;f<0||p<0||f>c||p>n?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let m=Math.round(f/h),x=Math.floor(p/d);g&&!r.config.xaxis.convertedCatToNumeric&&(m=Math.ceil(f/h),m=m-1);let y=null,w=null,S=r.globals.seriesXvalues.map(C=>C.filter(_=>A.isNumber(_))),v=r.globals.seriesYvalues.map(C=>C.filter(_=>A.isNumber(_)));if(r.axisFlags.isXNumeric){let C=this.ttCtx.getElGrid();if(!C)return{hoverX:f,hoverY:p};let _=C.getBoundingClientRect(),D=f*(_.width/c),k=p*(_.height/n);w=this.closestInMultiArray(D,k,S,v),y=w.index,m=(a=w.j)!=null?a:0,y!==null&&r.globals.hasNullValues&&(S=r.globals.seriesXvalues[y],w=this.closestInArray(D,S),m=(o=w.j)!=null?o:0)}return r.interact.capturedSeriesIndex=y===null?-1:y,(!m||m<1)&&(m=0),r.globals.isBarHorizontal?r.interact.capturedDataPointIndex=x:r.interact.capturedDataPointIndex=m,{capturedSeries:y,j:r.globals.isBarHorizontal?x:m,hoverX:f,hoverY:p}}getFirstActiveXArray(t){let e=this.w,s=0,i=t.map((a,o)=>a.length>0?o:-1);for(let a=0;a<i.length;a++)if(i[a]!==-1&&e.globals.collapsedSeriesIndices.indexOf(a)===-1&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(a)===-1){s=i[a];break}return s}closestInMultiArray(t,e,s,i){let a=this.w,o=n=>a.globals.collapsedSeriesIndices.indexOf(n)===-1&&a.globals.ancillaryCollapsedSeriesIndices.indexOf(n)===-1,r=1/0,l=null,c=null;for(let n=0;n<s.length;n++){if(!o(n))continue;let h=s[n],d=i[n],g=Math.min(h.length,d.length);for(let f=0;f<g;f++){let p=h[f],u=t-p,m=Math.sqrt(u*u);if(!a.globals.allSeriesHasEqualX){let x=d[f],y=e-x;m=Math.sqrt(u*u+y*y)}m<r&&(r=m,l=n,c=f)}}return{index:l,j:c}}closestInArray(t,e){let s=e[0],i=null,a=Math.abs(t-s);for(let o=0;o<e.length;o++){let r=Math.abs(t-e[o]);r<a&&(a=r,i=o)}return{j:i}}isXoverlap(t){let e=this.w,s=[],i=e.seriesData.seriesX.filter(a=>typeof a[0]<"u");if(i.length>0)for(let a=0;a<i.length-1;a++)typeof i[a][t]<"u"&&typeof i[a+1][t]<"u"&&i[a][t]!==i[a+1][t]&&s.push("unEqual");return s.length===0}isInitialSeriesSameLen(){var t,e,s;let i=!0,a=((t=this.w.globals.initialSeries)==null?void 0:t.filter((o,r)=>{var l;return!((l=this.w.globals.collapsedSeriesIndices)!=null&&l.includes(r))}))||[];for(let o=0;o<a.length-1;o++){if(!((e=a[o])!=null&&e.data)||!((s=a[o+1])!=null&&s.data))return!0;if(a[o].data.length!==a[o+1].data.length){i=!1;break}}return i}getBarsHeight(t){return[...t].reduce((i,a)=>i+a.getBBox().height,0)}getElMarkers(t){return typeof t=="number"?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(i=>{let a=Number(i.getAttribute("data:realIndex"));return this.w.globals.collapsedSeriesIndices.indexOf(a)===-1})),e.sort((i,a)=>{var o=Number(i.getAttribute("data:realIndex")),r=Number(a.getAttribute("data:realIndex"));return r<o?1:r>o?-1:0});let s=[];return e.forEach(i=>{s.push(i.querySelector(".apexcharts-marker"))}),s}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){let s=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new L(this.w).getMarkerPath(s,i,a,e)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(t){let e=this.w,s=e.config.markers.hover.size;return s===void 0&&(s=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(t){let e=this.w,s=this.ttCtx;s.allTooltipSeriesGroups.length===0&&(s.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));let i=s.allTooltipSeriesGroups;for(let a=0;a<i.length;a++)t==="enable"?(i[a].classList.add("apexcharts-active"),i[a].style.display=e.config.tooltip.items.display):(i[a].classList.remove("apexcharts-active"),i[a].style.display="none")}},ee=class{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new kt(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:s=0,j:i=null,y1:a,y2:o,e:r}){let l=this.w;l.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:s,j:i,y1:a,y2:o,w:l}):this.toggleActiveInactiveSeries(t,s);let c=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:c,ttItems:e,shared:t,e:r});let n=this.ttCtx.getElTooltip();n&&(this.ttCtx.tooltipRect.ttWidth=n.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=n.getBoundingClientRect().height)}printLabels({i:t,j:e,values:s,ttItems:i,shared:a,e:o}){var r;let l=this.w,c,n=[],h=m=>l.seriesData.seriesGoals[m]&&l.seriesData.seriesGoals[m][e]&&Array.isArray(l.seriesData.seriesGoals[m][e]),{xVal:d,zVal:g,xAxisTTVal:f}=s,p="",u=l.globals.colors[t];e!==null&&l.config.plotOptions.bar.distributed&&(u=l.globals.colors[e]);for(let m=0,x=l.seriesData.series.length-1;m<l.seriesData.series.length;m++,x--){let y=this.getFormatters(t);p=this.getSeriesName({fn:y.yLbTitleFormatter,index:t,seriesIndex:t,j:e}),l.config.chart.type==="treemap"&&(p=y.yLbTitleFormatter(String(l.config.series[t].data[e].x),{series:l.seriesData.series,seriesIndex:t,dataPointIndex:e,w:l}));let w=l.config.tooltip.inverseOrder?x:m;if(l.globals.axisCharts){let S=v=>{var C,_,D,k;return l.axisFlags.isRangeData?y.yLbFormatter((_=(C=l.rangeData.seriesRangeStart)==null?void 0:C[v])==null?void 0:_[e],{series:l.rangeData.seriesRangeStart,seriesIndex:v,dataPointIndex:e,w:l})+" - "+y.yLbFormatter((k=(D=l.rangeData.seriesRangeEnd)==null?void 0:D[v])==null?void 0:k[e],{series:l.rangeData.seriesRangeEnd,seriesIndex:v,dataPointIndex:e,w:l}):y.yLbFormatter(l.seriesData.series[v][e],{series:l.seriesData.series,seriesIndex:v,dataPointIndex:e,w:l})};if(a)y=this.getFormatters(w),p=this.getSeriesName({fn:y.yLbTitleFormatter,index:w,seriesIndex:t,j:e}),u=l.globals.colors[w],c=S(w),h(w)&&(n=l.seriesData.seriesGoals[w][e].map(v=>({attrs:v,val:y.yLbFormatter(v.value,{seriesIndex:w,dataPointIndex:e,w:l})})));else{let v=(r=o?.target)==null?void 0:r.getAttribute("fill");v&&(v.indexOf("url")!==-1?v.indexOf("Pattern")!==-1&&(u=l.dom.baseEl.querySelector(v.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):u=v),c=S(t),h(t)&&Array.isArray(l.seriesData.seriesGoals[t][e])&&(n=l.seriesData.seriesGoals[t][e].map(C=>({attrs:C,val:y.yLbFormatter(C.value,{seriesIndex:t,dataPointIndex:e,w:l})})))}}e===null&&(c=y.yLbFormatter(l.seriesData.series[t],O(Y({},l),{seriesIndex:t,dataPointIndex:t}))),this.DOMHandling({i:t,t:w,j:e,ttItems:i,values:{val:c,goalVals:n,xVal:d,xAxisTTVal:f,zVal:g},seriesName:p,shared:a,pColor:u})}}getFormatters(t){let e=this.w,s=e.formatters.yLabelFormatters[t],i;return e.formatters.ttVal!==void 0?Array.isArray(e.formatters.ttVal)?(s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(s=e.formatters.ttVal.formatter,typeof e.formatters.ttVal.title.formatter=="function"&&(i=e.formatters.ttVal.title.formatter)):i=e.config.tooltip.y.title.formatter,typeof s!="function"&&(e.formatters.yLabelFormatters[0]?s=e.formatters.yLabelFormatters[0]:s=function(a){return a}),typeof i!="function"&&(i=function(a){return a?a+": ":""}),{yLbFormatter:s,yLbTitleFormatter:i}}getSeriesName({fn:t,index:e,seriesIndex:s,j:i}){let a=this.w;return t(String(a.seriesData.seriesNames[e]),{series:a.seriesData.series,seriesIndex:s,dataPointIndex:i,w:a})}DOMHandling({t,j:e,ttItems:s,values:i,seriesName:a,shared:o,pColor:r}){let l=this.w,c=this.ttCtx,{val:n,goalVals:h,xVal:d,xAxisTTVal:g,zVal:f}=i,p=null;p=s[t].children,l.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=r,p[0].style.display="none"),c.showTooltipTitle&&(c.tooltipTitle===null&&(c.tooltipTitle=l.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle&&(c.tooltipTitle.innerHTML=d)),c.isXAxisTooltipEnabled&&c.xaxisTooltipText&&(c.xaxisTooltipText.innerHTML=g!==""?g:d);let u=s[t].querySelector(".apexcharts-tooltip-text-y-label");u&&(u.innerHTML=a||"");let m=s[t].querySelector(".apexcharts-tooltip-text-y-value");m&&(m.innerHTML=typeof n<"u"?n:""),p[0]&&p[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(r=l.config.tooltip.marker.fillColors[t]),l.config.tooltip.fillSeriesColor?p[0].style.backgroundColor=r:p[0].style.color=r),l.config.tooltip.marker.show||(p[0].style.display="none");let x=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),y=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&l.seriesData.seriesGoals[t]){let w=()=>{let S="<div>",v="<div>";h.forEach(C=>{S+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${C.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${C.attrs.name}</div>`,v+=`<div>${C.val}</div>`}),x.innerHTML=S+"</div>",y.innerHTML=v+"</div>"};o?l.seriesData.seriesGoals[t][e]&&Array.isArray(l.seriesData.seriesGoals[t][e])?w():(x.innerHTML="",y.innerHTML=""):w()}else x.innerHTML="",y.innerHTML="";if(f!==null){let w=s[t].querySelector(".apexcharts-tooltip-text-z-label");w.innerHTML=l.config.tooltip.z.title;let S=s[t].querySelector(".apexcharts-tooltip-text-z-value");S.innerHTML=typeof f<"u"?f:""}if(o&&p[0]){if(l.config.tooltip.hideEmptySeries){let w=s[t].querySelector(".apexcharts-tooltip-marker"),S=s[t].querySelector(".apexcharts-tooltip-text");parseFloat(n)==0?(w.style.display="none",S.style.display="none"):(w.style.display="block",S.style.display="block")}typeof n>"u"||n===null||l.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||l.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(t)===-1?p[0].parentNode.style.display="none":p[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(t)===-1&&(p[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){let s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");let i=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(i){let a=i;a.classList.add("apexcharts-active"),a.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var s,i,a,o,r,l,c,n;let h=this.w,d=h.seriesData.seriesX.map(w=>w.length>0?w:[]),g="",f="",p=null,u=null,m={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},x=h.formatters.ttZFormatter;if(e===null)u=h.seriesData.series[t];else if(h.axisFlags.isXNumeric&&h.config.chart.type!=="treemap"){if(g=d[t][e],d[t].length===0){let w=this.tooltipUtil.getFirstActiveXArray(d);g=d[w][e]}}else new Ct(this.w).isFormatXY()?g=typeof h.config.series[t].data[e]<"u"?h.config.series[t].data[e].x:"":g=typeof h.labelData.labels[e]<"u"?h.labelData.labels[e]:"";let y=g;return h.axisFlags.isXNumeric&&h.config.xaxis.type==="datetime"?g=new at(this.w).xLabelFormat(h.formatters.ttKeyFormatter,y,y,{i:void 0,dateFormatter:new B(this.w).formatDate,w:this.w}):h.globals.isBarHorizontal?g=h.formatters.yLabelFormatters[0](y,m):g=(a=(i=(s=h.formatters).xLabelFormatter)==null?void 0:i.call(s,y,m))!=null?a:y,h.config.tooltip.x.formatter!==void 0&&(g=(l=(r=(o=h.formatters).ttKeyFormatter)==null?void 0:r.call(o,y,m))!=null?l:y),h.seriesData.seriesZ.length>0&&h.seriesData.seriesZ[t].length>0&&(p=x?.(h.seriesData.seriesZ[t][e],h)),typeof h.config.xaxis.tooltip.formatter=="function"?f=(n=(c=h.formatters).xaxisTooltipFormatter)==null?void 0:n.call(c,y,m):f=g,{val:Array.isArray(u)?u.join(" "):u,xVal:Array.isArray(g)?g.join(" "):g,xAxisTTVal:Array.isArray(f)?f.join(" "):f,zVal:p}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){let o=this.ttCtx.getElTooltip(),r=a.config.tooltip.custom;Array.isArray(r)&&r[t]&&(r=r[t]);let l=r({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});o&&(typeof l=="string"||typeof l=="number"?o.innerHTML=String(l):(l instanceof Element||typeof l.nodeName=="string")&&(o.innerHTML="",o.appendChild(l.cloneNode(!0))))}},Dt=class{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){let s=this.ttCtx,i=this.w,a=s.getElXCrosshairs(),o=t-s.xcrosshairsWidth/2,r=i.labelData.labels.slice().length;if(e!==null&&(o=i.layout.gridWidth/r*e),a!==null&&!i.globals.isBarHorizontal&&(a.setAttribute("x",String(o)),a.setAttribute("x1",String(o)),a.setAttribute("x2",String(o)),a.setAttribute("y2",String(i.layout.gridHeight)),a.classList.add("apexcharts-active")),o<0&&(o=0),o>i.layout.gridWidth&&(o=i.layout.gridWidth),s.isXAxisTooltipEnabled){let l=o;(i.config.xaxis.crosshairs.width==="tickWidth"||i.config.xaxis.crosshairs.width==="barWidth")&&(l=o+s.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}moveYCrosshairs(t){let e=this.ttCtx;e.ycrosshairs!==null&&L.setAttrs(e.ycrosshairs,{y1:t,y2:t}),e.ycrosshairsHidden!==null&&L.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){var e,s;let i=this.w,a=this.ttCtx;if(a.xaxisTooltip!==null&&a.xcrosshairsWidth!==0){a.xaxisTooltip.classList.add("apexcharts-active");let o=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+1+i.config.xaxis.offsetY,l=a.xaxisTooltip.getBoundingClientRect().width;if(t=t-l/2,!isNaN(t)){t=t+i.layout.translateX;let n=new L(this.w).getTextRects((s=(e=a.xaxisTooltipText)==null?void 0:e.innerHTML)!=null?s:"",i.config.xaxis.labels.style.fontSize);a.xaxisTooltipText&&(a.xaxisTooltipText.style.minWidth=n.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=o+"px"}}}moveYAxisTooltip(t){var e,s;let i=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);let o=parseInt((s=(e=a.ycrosshairsHidden)==null?void 0:e.getAttribute("y1"))!=null?s:"0",10),r=i.layout.translateY+o;if(a.yaxisTTEls){let l=a.yaxisTTEls[t].getBoundingClientRect(),c=l.height,n=i.globals.translateYAxisX[t]-2;i.config.yaxis[t].opposite&&(n=n-l.width),r=r-c/2,i.globals.ignoreYAxisIndexes.indexOf(t)===-1&&r>0&&r<i.layout.gridHeight?(a.yaxisTTEls[t].classList.add("apexcharts-active"),a.yaxisTTEls[t].style.top=r+"px",a.yaxisTTEls[t].style.left=n+i.config.yaxis[t].tooltip.offsetX+"px"):a.yaxisTTEls[t].classList.remove("apexcharts-active")}}moveTooltip(t,e,s=null){let i=this.w,a=this.ttCtx,o=a.getElTooltip(),r=a.tooltipRect,l=s!==null?parseFloat(String(s)):1,c=parseFloat(String(t))+l+5,n=parseFloat(String(e))+l/2;if(c>i.layout.gridWidth/2&&(c=c-r.ttWidth-l-10),c>i.layout.gridWidth-r.ttWidth-10&&(c=i.layout.gridWidth-r.ttWidth),c<-20&&(c=-20),i.config.tooltip.followCursor){let h=a.getElGrid();if(!h)return;let d=h.getBoundingClientRect();c=a.e.clientX-d.left,c>i.layout.gridWidth/2&&(c=c-a.tooltipRect.ttWidth),n=a.e.clientY+i.layout.translateY-d.top,n>i.layout.gridHeight/2&&(n=n-a.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||r.ttHeight/2+n>i.layout.gridHeight&&(n=i.layout.gridHeight-r.ttHeight+i.layout.translateY);isNaN(c)||(c=c+i.layout.translateX,o&&(o.style.left=c+"px",o.style.top=n+"px"))}moveMarkers(t,e){var s;let i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0){let o=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let r=0;r<o.length;r++)parseInt((s=o[r].getAttribute("rel"))!=null?s:"0",10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,o[r]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var s,i,a,o,r;let l=this.w,c=this.ttCtx,n=0,h=0,d=new L(this.w),g=l.globals.pointsArray,f=c.tooltipUtil.getHoverMarkerSize(e),p=l.config.series[e].type;if(p&&(p==="column"||p==="candlestick"||p==="boxPlot"))return;n=(i=(s=g[e])==null?void 0:s[t])==null?void 0:i[0],h=((o=(a=g[e])==null?void 0:a[t])==null?void 0:o[1])||0;let u=l.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(u&&h<l.layout.gridHeight&&h>0){let m=(r=u.getAttribute("shape"))!=null?r:"circle",x=d.getMarkerPath(n,h,m,f*1.5);u.setAttribute("d",x)}this.moveXCrosshairs(n),c.fixedTooltip||this.moveTooltip(n,h,f)}moveDynamicPointsOnHover(t){var e,s;let i=this.ttCtx,a=i.w,o=0,r=0,l=0,c=a.globals.pointsArray,n=new tt(this.w),h=new L(this.w);l=n.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);let d=i.tooltipUtil.getHoverMarkerSize(l);if((e=c[l])!=null&&e[t]&&(o=c[l][t][0],r=c[l][t][1]),isNaN(o))return;let g=i.tooltipUtil.getAllMarkers();if(g.length)for(let f=0;f<a.seriesData.series.length;f++){let p=c[f];if(a.globals.comboCharts&&typeof p>"u"&&g.splice(f,0,null),p&&p.length){let u=c[f][t][1],m;g[f].setAttribute("cx",o);let x=(s=g[f].getAttribute("shape"))!=null?s:"circle";if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){let y=t+a.seriesData.series[f].length;m=c[f][y][1];let w=Math.abs(u-m)/2;u=u-w}if(u!==null&&!isNaN(u)&&u<a.layout.gridHeight+d&&u+d>0){let y=h.getMarkerPath(o,u,x,d);g[f].setAttribute("d",y)}else g[f].setAttribute("d","")}}this.moveXCrosshairs(o),i.fixedTooltip||this.moveTooltip(o,r||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,a;let o=this.w,r=this.ttCtx,l=o.globals.columnSeries?o.globals.columnSeries.length:o.seriesData.series.length;o.config.chart.stacked&&(l=o.globals.barGroups.length);let c=l>=2&&l%2===0?Math.floor(l/2):Math.floor(l/2)+1;o.globals.isBarHorizontal&&(c=new tt(this.w).getActiveConfigSeriesIndex("desc")+1);let n=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${c}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[rel='${c}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${c}'] path[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${c}'] path[j='${t}']`);!n&&typeof e=="number"&&(n=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
        .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
        .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
        .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let h=n?parseFloat((s=n.getAttribute("cx"))!=null?s:"0"):0,d=n?parseFloat((i=n.getAttribute("cy"))!=null?i:"0"):0,g=n?parseFloat((a=n.getAttribute("barWidth"))!=null?a:"0"):0,f=r.getElGrid();if(!f)return;let p=f.getBoundingClientRect(),u=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));o.axisFlags.isXNumeric?(n&&!u&&(h=h-(l%2!==0?g/2:0)),n&&u&&(h=h-g/2)):o.globals.isBarHorizontal||(h=r.xAxisTicksPositions[t-1]+r.dataPointsDividedWidth/2,isNaN(h)&&(h=r.xAxisTicksPositions[t]-r.dataPointsDividedWidth/2)),o.globals.isBarHorizontal?d=d-r.tooltipRect.ttHeight:o.config.tooltip.followCursor?d=r.e.clientY-p.top-r.tooltipRect.ttHeight/2:d+r.tooltipRect.ttHeight+15>o.layout.gridHeight&&(d=o.layout.gridHeight),o.globals.isBarHorizontal||this.moveXCrosshairs(h),r.fixedTooltip||this.moveTooltip(h,d||o.layout.gridHeight)}},se=class{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new Dt(t)}drawDynamicPoints(){let t=this.w,e=new L(this.w),s=new dt(this.w,this.ctx),i=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&i.sort((a,o)=>parseFloat(a.getAttribute("data:realIndex"))-parseFloat(o.getAttribute("data:realIndex")));for(let a=0;a<i.length;a++){let o=i[a].querySelector(".apexcharts-series-markers-wrap");if(o!==null){let r=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;(t.config.chart.type==="line"||t.config.chart.type==="area")&&!t.globals.comboCharts&&!t.config.tooltip.intersect&&(r+=" no-pointer-events");let l=s.getMarkerConfig({cssClass:r,seriesIndex:Number(o.getAttribute("data:realIndex"))}),c=e.drawMarker(0,0,l);c.node.setAttribute("default-marker-size",0);let n=F.createElementNS(H,"g");n.classList.add("apexcharts-series-markers"),n.appendChild(c.node),o.appendChild(n)}}}enlargeCurrentPoint(t,e,s=null,i=null){let a=this.w;a.config.chart.type!=="bubble"&&this.newPointSize(t,e);let o=e.getAttribute("cx"),r=e.getAttribute("cy");if(s!==null&&i!==null&&(o=s,r=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if(a.config.chart.type==="radar"){let l=this.ttCtx.getElGrid();if(!l)return;let c=l.getBoundingClientRect();o=this.ttCtx.e.clientX-c.left}this.tooltipPosition.moveTooltip(o,r,a.config.markers.hover.size)}}enlargePoints(t){var e,s;let i=this.w,a=this,o=this.ttCtx,r=t,l=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),c=i.config.markers.hover.size;for(let n=0;n<l.length;n++){let h=l[n].getAttribute("rel"),d=l[n].getAttribute("index");if(c===void 0&&(c=i.globals.markers.size[d]+i.config.markers.hover.sizeOffset),r===parseInt(h??"0",10)){a.newPointSize(r,l[n]);let g=(e=l[n].getAttribute("cx"))!=null?e:"0",f=(s=l[n].getAttribute("cy"))!=null?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(g)),o.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(g),parseFloat(f),c)}else a.oldPointSize(l[n])}}newPointSize(t,e){let s=this.w,i=s.config.markers.hover.size,a=t===0?e.parentNode.firstChild:e.parentNode.lastChild;if(a.getAttribute("default-marker-size")!=="0"){let o=parseInt(a.getAttribute("index"),10);i===void 0&&(i=s.globals.markers.size[o]+s.config.markers.hover.sizeOffset),i<0&&(i=0);let r=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);e.setAttribute("d",r)}}oldPointSize(t){let e=parseFloat(t.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",s)}resetPointsSize(){var t;let s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let i=0;i<s.length;i++){let a=parseFloat((t=s[i].getAttribute("default-marker-size"))!=null?t:"0");if(A.isNumber(a)&&a>0){let o=this.ttCtx.tooltipUtil.getPathFromPoint(s[i],a);s[i].setAttribute("d",o)}else s[i].setAttribute("d","M0,0")}}},ie=class{constructor(t){this.w=t.w;let e=this.w;this.ttCtx=t,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.config.chart.type==="rangeBar"&&e.config.plotOptions.bar.rangeBarGroupRows}getAttr(t,e){var s;return parseFloat((s=t.target.getAttribute(e))!=null?s:"")}handleHeatTreeTooltip({e:t,opt:e,x:s,y:i,type:a}){var o,r;let l=this.ttCtx,c=this.w;if(t.target.classList.contains(`apexcharts-${a}-rect`)){let n=this.getAttr(t,"i"),h=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),g=this.getAttr(t,"cy"),f=this.getAttr(t,"width"),p=this.getAttr(t,"height");if(l.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:n,j:h,shared:!1,e:t}),c.interact.capturedSeriesIndex=n,c.interact.capturedDataPointIndex=h,s=d+l.tooltipRect.ttWidth/2+f,i=g+l.tooltipRect.ttHeight/2-p/2,l.tooltipPosition.moveXCrosshairs(d+f/2),s>c.layout.gridWidth/2&&(s=d-l.tooltipRect.ttWidth/2+f),l.w.config.tooltip.followCursor){let u=c.dom.elWrap.getBoundingClientRect();s=((o=c.interact.clientX)!=null?o:0)-u.left-(s>c.layout.gridWidth/2?l.tooltipRect.ttWidth:0),i=((r=c.interact.clientY)!=null?r:0)-u.top-(i>c.layout.gridHeight/2?l.tooltipRect.ttHeight:0)}}return{x:s,y:i}}handleMarkerTooltip({e:t,opt:e,x:s,y:i}){let a=this.w,o=this.ttCtx,r,l;if(t.target.classList.contains("apexcharts-marker")){let c=parseInt(e.paths.getAttribute("cx"),10),n=parseInt(e.paths.getAttribute("cy"),10),h=parseFloat(e.paths.getAttribute("val"));if(l=parseInt(e.paths.getAttribute("rel"),10),r=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,o.intersect){let d=A.findAncestor(e.paths,"apexcharts-series");d&&(r=parseInt(d.getAttribute("data:realIndex"),10))}if(o.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:l,shared:o.showOnIntersect?!1:a.config.tooltip.shared,e:t}),t.type==="mouseup"&&o.markerClick(t,r,l),a.interact.capturedSeriesIndex=r,a.interact.capturedDataPointIndex=l,s=c,i=n+a.layout.translateY-o.tooltipRect.ttHeight*1.4,o.w.config.tooltip.followCursor){let d=o.getElGrid();if(!d)return{x:s,y:i};let g=d.getBoundingClientRect();i=o.e.clientY+a.layout.translateY-g.top}h<0&&(i=n),o.marker.enlargeCurrentPoint(l,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){let s=this.w,i=this.ttCtx,a=i.getElTooltip(),o=0,r=0,l=0,c=0,n,h=this.getBarTooltipXY({e:t,opt:e});if(h.j===null&&h.barHeight===0&&h.barWidth===0)return;c=h.i;let d=h.j;s.interact.capturedSeriesIndex=c,s.interact.capturedDataPointIndex=d!==null?d:s.interact.capturedDataPointIndex,s.globals.isBarHorizontal&&i.tooltipUtil.hasBars()||!s.config.tooltip.shared?(r=h.x,l=h.y,n=Array.isArray(s.config.stroke.width)?s.config.stroke.width[c]:s.config.stroke.width,o=r):!s.globals.comboCharts&&!s.config.tooltip.shared&&(o=o/2),isNaN(l)&&(l=s.globals.svgHeight-i.tooltipRect.ttHeight),r+i.tooltipRect.ttWidth>s.layout.gridWidth?r=r-i.tooltipRect.ttWidth:r<0&&(r=0),!(i.w.config.tooltip.followCursor&&!i.getElGrid())&&(i.tooltip===null&&(i.tooltip=s.dom.baseEl.querySelector(".apexcharts-tooltip")),s.config.tooltip.shared||(s.globals.comboBarCount>0?i.tooltipPosition.moveXCrosshairs(o+n/2):i.tooltipPosition.moveXCrosshairs(o)),!i.fixedTooltip&&(!s.config.tooltip.shared||s.globals.isBarHorizontal&&i.tooltipUtil.hasBars())&&(l=l+s.layout.translateY-i.tooltipRect.ttHeight/2,a&&(a.style.left=r+s.layout.translateX+"px",a.style.top=l+"px")))}getBarTooltipXY({e:t,opt:e}){let s=this.w,i=null,a=this.ttCtx,o=0,r=0,l=0,c=0,n=0,h=t.target.classList;if(h.contains("apexcharts-bar-area")||h.contains("apexcharts-candlestick-area")||h.contains("apexcharts-boxPlot-area")||h.contains("apexcharts-rangebar-area")){let d=t.target,g=d.getBoundingClientRect(),f=e.elGrid.getBoundingClientRect(),p=g.height;n=g.height;let u=g.width,m=parseInt(d.getAttribute("cx"),10),x=parseInt(d.getAttribute("cy"),10);c=parseFloat(d.getAttribute("barWidth"));let y=t.type==="touchmove"?t.touches[0].clientX:t.clientX;i=parseInt(d.getAttribute("j"),10),o=parseInt(d.parentNode.getAttribute("rel"),10)-1;let w=d.getAttribute("data-range-y1"),S=d.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(d.parentNode.getAttribute("data:realIndex"),10));let v=_=>(s.axisFlags.isXNumeric?_=m-u/2:this.isVerticalGroupedRangeBar?_=m+u/2:_=m-a.dataPointsDividedWidth+u/2,_),C=()=>x-a.dataPointsDividedHeight+p/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:i,y1:w?parseInt(w,10):null,y2:S?parseInt(S,10):null,shared:a.showOnIntersect?!1:s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(r=y-f.left+15,l=C()):(r=v(r),l=t.clientY-f.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(r=m,a.xyRatios&&r<a.xyRatios.baseLineInvertedY&&(r=m-a.tooltipRect.ttWidth),l=C()):(r=v(r),l=x)}return{x:r,y:l,barHeight:n,barWidth:c,i:o,j:i}}},ae=class{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){let t=this.w,e=this.ttCtx,s=t.config.xaxis.position==="bottom";e.xaxisOffY=s?t.layout.gridHeight+1:-t.layout.xAxisHeight-t.config.xaxis.axisTicks.height+3;let i=s?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",a=t.dom.elWrap;e.isXAxisTooltipEnabled&&t.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(e.xaxisTooltip=F.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=F.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(){let t=this.w,e=this.ttCtx;for(let s=0;s<t.config.yaxis.length;s++){let i=t.config.yaxis[s].opposite||t.config.yaxis[s].crosshairs.opposite;e.yaxisOffX=i?t.layout.gridWidth+1:1;let a=i?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,o=t.dom.elWrap;t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip apexcharts-yaxistooltip-${s}`)===null&&(e.yaxisTooltip=F.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),o.appendChild(e.yaxisTooltip),s===0&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[s]=F.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;let s=this.w,i=this.ttCtx,a=i.getElXCrosshairs();if(i.xcrosshairsWidth=parseInt(s.config.xaxis.crosshairs.width,10),s.globals.comboCharts){let o=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(o!==null&&s.config.xaxis.crosshairs.width==="barWidth"){let r=parseFloat((e=o.getAttribute("barWidth"))!=null?e:"0");i.xcrosshairsWidth=r}else if(s.config.xaxis.crosshairs.width==="tickWidth"){let r=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/r}}else if(s.config.xaxis.crosshairs.width==="tickWidth"){let o=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/o}else if(s.config.xaxis.crosshairs.width==="barWidth"){let o=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(o!==null){let r=parseFloat((t=o.getAttribute("barWidth"))!=null?t:"0");i.xcrosshairsWidth=r}else i.xcrosshairsWidth=1}s.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),a!==null&&i.xcrosshairsWidth>0&&a.setAttribute("width",String(i.xcrosshairsWidth))}handleYCrosshair(){let 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){let i=this.ttCtx,a=this.w,o=a.globals,r=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&r.length>0){let l=a.formatters.yLabelFormatters[t],c=i.getElGrid();if(!c)return;let n=c.getBoundingClientRect(),h=r[0],d=0;s.yRatio.length>1&&(d=h);let g=(e-n.top)*s.yRatio[d],f=o.maxYArr[h]-o.minYArr[h],p=o.minYArr[h]+(f-g);a.config.yaxis[t].reversed&&(p=o.maxYArr[h]-(f-g)),i.tooltipPosition.moveYCrosshairs(e-n.top),i.yaxisTooltipText[t].innerHTML=l(p),i.tooltipPosition.moveYAxisTooltip(t)}}},re=class{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new kt(this),this.tooltipLabels=new ee(this),this.tooltipPosition=new Dt(this),this.marker=new se(this),this.intersect=new ie(this),this.axesTooltip=new ae(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(){let t=this.w,e=this.getElTooltip();e&&(this.updateDimensionCache(),typeof ResizeObserver<"u"&&!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(){let t=this.w,e=this.getElTooltip();if(!e)return;let s=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}getCachedDimensions(){let t=this.w;if(t.globals.dimensionCache.tooltip){let s=t.globals.dimensionCache.tooltip;if(Date.now()-s.lastUpdate<1e3)return{ttWidth:s.width,ttHeight:s.height}}this.updateDimensionCache();let 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){let e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map(a=>!!(a.show&&a.tooltip.enabled&&e.globals.axisCharts)),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);let s=F.createElementNS("http://www.w3.org/1999/xhtml","div");if(s.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&s.classList.add(e.config.tooltip.cssClass),s.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&(s.setAttribute("role","tooltip"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true"),s.setAttribute("aria-hidden","true")),e.dom.elWrap.appendChild(s),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();let a=new lt(this.w,this.ctx,void 0);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if((e.globals.comboCharts||this.tConfig.intersect||e.config.chart.type==="rangeBar")&&!this.tConfig.shared&&(this.showOnIntersect=!0),(e.config.markers.size===0||e.globals.markers.largestSize===0)&&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=F.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,s.appendChild(this.tooltipTitle));let i=e.seriesData.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(this.showOnIntersect?i=1:i=e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(i),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){let e=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a<t;a++){let o=F.createElementNS("http://www.w3.org/1999/xhtml","div");o.classList.add("apexcharts-tooltip-series-group",`apexcharts-tooltip-series-group-${a}`),o.style.order=String(e.config.tooltip.inverseOrder?t-a:a+1);let r=F.createElementNS("http://www.w3.org/1999/xhtml","span");r.classList.add("apexcharts-tooltip-marker"),e.config.tooltip.fillSeriesColor?r.style.backgroundColor=e.globals.colors[a]:r.style.color=e.globals.colors[a];let l=e.config.markers.shape,c=l;Array.isArray(l)&&(c=l[a]),r.setAttribute("shape",c),o.appendChild(r);let n=F.createElementNS("http://www.w3.org/1999/xhtml","div");n.classList.add("apexcharts-tooltip-text"),n.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,n.style.fontSize=this.tConfig.style.fontSize,["y","goals","z"].forEach(h=>{let d=F.createElementNS("http://www.w3.org/1999/xhtml","div");d.classList.add(`apexcharts-tooltip-${h}-group`);let g=F.createElementNS("http://www.w3.org/1999/xhtml","span");g.classList.add(`apexcharts-tooltip-text-${h}-label`),d.appendChild(g);let f=F.createElementNS("http://www.w3.org/1999/xhtml","span");f.classList.add(`apexcharts-tooltip-text-${h}-value`),d.appendChild(f),n.appendChild(d)}),o.appendChild(n),i.appendChild(o),s.push(o)}return s}addSVGEvents(){let t=this.w,e=t.config.chart.type,s=this.getElTooltip();if(!s)return;let i=e==="bar"||e==="candlestick"||e==="boxPlot"||e==="rangeBar",a=e==="area"||e==="line"||e==="scatter"||e==="bubble"||e==="radar",o=t.dom.Paper.node,r=this.getElGrid();r&&(this.seriesBound=r.getBoundingClientRect());let l=[],c=[],n={hoverArea:o,elGrid:r,tooltipEl:s,tooltipY:l,tooltipX:c,ttItems:this.ttItems},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-rangebar-area"):(e==="heatmap"||e==="treemap")&&(h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),h&&h.length))for(let g=0;g<h.length;g++)l.push(h[g].getAttribute("cy")),c.push(h[g].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],n);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect)this.addDatapointEventsListeners(n);else if(!t.globals.axisCharts||e==="heatmap"||e==="treemap"){let g=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(g,n)}if(this.showOnIntersect){let g=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");g.length>0&&this.addPathsEventListeners(g,n),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(n)}}drawFixedTooltipRect(){let t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};let s=e.getBoundingClientRect(),i=s.width+10,a=s.height+10,o=this.tConfig.fixed.offsetX,r=this.tConfig.fixed.offsetY,l=this.tConfig.fixed.position.toLowerCase();return l.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),l.indexOf("bottom")>-1&&(r=r+t.globals.svgHeight-a-10),e.style.left=o+"px",e.style.top=r+"px",{x:o,y:r,ttWidth:i,ttHeight:a}}addDatapointEventsListeners(t){let s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(s,t)}addPathsEventListeners(t,e){let s=this;for(let i=0;i<t.length;i++){let 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(r=>t[i].addEventListener(r,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){let i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-i))}seriesHover(t,e){this.lastHoverTime=Date.now();let s=[],i=this.w;i.config.chart.group&&(s=this.ctx.getGroupedCharts()),!(i.globals.axisCharts&&(i.globals.minX===-1/0&&i.globals.maxX===1/0||i.globals.dataPoints===0))&&(s.length?s.forEach(a=>{let o=this.getElTooltip(a),r={paths:t.paths,tooltipEl:o,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===this.w.globals.minX&&a.w.globals.maxX===this.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:s,e:i}){let a=t.w;if(!this.getElTooltip(t))return;let r=e.getCachedDimensions();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 tt(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;let i=this.w,a,o,r=e.elGrid.getBoundingClientRect(),l=t.type==="touchmove"?t.touches[0].clientX:t.clientX,c=t.type==="touchmove"?t.touches[0].clientY:t.clientY;if(this.clientY=c,this.clientX=l,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,c<r.top||c>r.top+r.height){this.handleMouseOut(e);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){let f=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(f)<0){this.handleMouseOut(e);return}}let n=this.getElTooltip();if(!n)return;let h=this.getElXCrosshairs(),d=[];i.config.chart.group&&(d=this.ctx.getSyncedCharts());let g=i.globals.xyCharts||i.config.chart.type==="bar"&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if(t.type==="mousemove"||t.type==="touchmove"||t.type==="mouseup"){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.seriesData.series.length)return;h!==null&&h.classList.add("apexcharts-active");let f=(s=this.yaxisTooltips)==null?void 0:s.filter(u=>u===!0),p=this.ycrosshairs;if(p!==null&&f?.length&&p.classList.add("apexcharts-active"),g&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(t,l,c,e);else if(i.config.chart.type==="heatmap"||i.config.chart.type==="treemap"){let u=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:o,type:i.config.chart.type});a=u.x,o=u.y,n.style.left=a+"px",n.style.top=o+"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:o});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let u=0;u<i.config.yaxis.length;u++)this.axesTooltip.drawYaxisTooltipText(u,c,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(t.type==="mouseout"||t.type==="touchend")&&this.handleMouseOut(e)}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:s}){var i,a,o,r;let l=this.w,c=e.paths.getAttribute("rel"),n=this.getElTooltip();if(!n)return;let h=l.dom.elWrap.getBoundingClientRect();if(t.type==="mousemove"||t.type==="touchmove"){l.dom.baseEl.classList.add("apexcharts-tooltip-active"),n.classList.add("apexcharts-active"),l.config.chart.accessibility.enabled&&l.config.chart.accessibility.announcements.enabled&&n.removeAttribute("aria-hidden"),this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(c,10)-1,shared:!1});let d,g,f=e.paths.querySelector("path[data\\:cx]")||e.paths;if(l.config.tooltip.intersect&&f.hasAttribute("data:cx")&&f.hasAttribute("data:cy")){let p=l.dom.Paper.node.getBoundingClientRect();d=p.left-h.left+parseFloat(f.getAttribute("data:cx"))-s.ttWidth/2,g=p.top-h.top+parseFloat(f.getAttribute("data:cy"))-s.ttHeight-10}else d=((i=l.interact.clientX)!=null?i:0)-h.left-s.ttWidth/2,g=((a=l.interact.clientY)!=null?a:0)-h.top-s.ttHeight-10;if(n.style.left=d+"px",n.style.top=g+"px",l.config.legend.tooltipHoverFormatter){let p=l.config.legend.tooltipHoverFormatter,u=c-1,m=(o=this.legendLabels)==null?void 0:o[u];if(!m)return;let x=m.getAttribute("data:default-text"),y=p(x,{seriesIndex:u,dataPointIndex:u,w:l});m.innerHTML=y}}else(t.type==="mouseout"||t.type==="touchend")&&(n.classList.remove("apexcharts-active"),l.dom.baseEl.classList.remove("apexcharts-tooltip-active"),l.config.legend.tooltipHoverFormatter&&((r=this.legendLabels)==null||r.forEach(d=>{let g=d.getAttribute("data:default-text");d.innerHTML=decodeURIComponent(g??"")})))}handleStickyTooltip(t,e,s,i){let a=this.w,o=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),r=o.j,l=o.capturedSeries;l!==null&&a.globals.collapsedSeriesIndices.includes(l??-1)&&(l=null);let c=i.elGrid.getBoundingClientRect();if(o.hoverX<0||o.hoverX>c.width){this.handleMouseOut(i);return}if(l!==null)this.handleStickyCapturedSeries(t,l??-1,i,r??0);else if(this.tooltipUtil.isXoverlap(r??0)||a.globals.isBarHorizontal){let n=a.seriesData.series.findIndex((h,d)=>!a.globals.collapsedSeriesIndices.includes(d));this.create(t,this,n,r??0,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){let a=this.w;if(!this.tConfig.shared&&a.seriesData.series[e][i]===null){this.handleMouseOut(s);return}if(typeof a.seriesData.series[e][i]<"u")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)){let o=a.seriesData.series.findIndex((r,l)=>!a.globals.collapsedSeriesIndices.includes(l));this.create(t,this,o,i,s.ttItems)}}deactivateHoverFilter(){let t=this.w,e=new L(this.w,this.ctx),s=t.dom.Paper.find(".apexcharts-bar-area");for(let i=0;i<s.length;i++)e.pathMouseLeave(s[i],void 0)}handleMouseOut(t){var e,s;let i=this.w,a=this.getElXCrosshairs();i.dom.baseEl.classList.remove("apexcharts-tooltip-active"),t.tooltipEl.classList.remove("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&t.tooltipEl.setAttribute("aria-hidden","true"),this.deactivateHoverFilter(),i.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),a!==null&&a.classList.remove("apexcharts-active");let o=this.ycrosshairs;if(o!==null&&o.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&((e=this.xaxisTooltip)==null||e.classList.remove("apexcharts-active")),this.yaxisTooltips&&this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);for(let r=0;r<this.yaxisTTEls.length;r++)this.yaxisTTEls[r].classList.remove("apexcharts-active")}i.config.legend.tooltipHoverFormatter&&((s=this.legendLabels)==null||s.forEach(r=>{let l=r.getAttribute("data:default-text");r.innerHTML=decodeURIComponent(l??"")}))}markerClick(t,e,s){let i=this.w;typeof i.config.chart.events.markerClick=="function"&&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}])}create(t,e,s,i,a,o=null){var r,l,c,n,h,d,g,f,p,u,m,x,y,w,S,v,C,_,D;let k=this.w,N=e;t.type==="mouseup"&&this.markerClick(t,s,i),o===null&&(o=this.tConfig.shared);let E=this.tooltipUtil.hasMarkers(s),T=this.tooltipUtil.getElBars(),X=()=>{k.globals.markers.largestSize>0?N.marker.enlargePoints(i):N.tooltipPosition.moveDynamicPointsOnHover(i)};if(k.config.legend.tooltipHoverFormatter){let z=k.config.legend.tooltipHoverFormatter,W=Array.from((r=this.legendLabels)!=null?r:[]);W.forEach(K=>{let V=K.getAttribute("data:default-text");K.innerHTML=decodeURIComponent(V??"")});for(let K=0;K<W.length;K++){let V=W[K],et=parseInt((l=V.getAttribute("i"))!=null?l:"",10),Tt=decodeURIComponent((c=V.getAttribute("data:default-text"))!=null?c:""),xe=z(Tt,{seriesIndex:o?et:s,dataPointIndex:i,w:k});if(o)V.innerHTML=k.globals.collapsedSeriesIndices.indexOf(et)<0?xe:Tt;else if(V.innerHTML=et===s?xe:Tt,s===et)break}}let R=k.rangeData,I=Y(Y({ttItems:a,i:s,j:i},((g=(d=(h=(n=R.seriesRange)==null?void 0:n[s])==null?void 0:h[i])==null?void 0:d.y[0])==null?void 0:g.y1)!==void 0&&{y1:(m=(u=(p=(f=R.seriesRange)==null?void 0:f[s])==null?void 0:p[i])==null?void 0:u.y[0])==null?void 0:m.y1}),((S=(w=(y=(x=R.seriesRange)==null?void 0:x[s])==null?void 0:y[i])==null?void 0:w.y[0])==null?void 0:S.y2)!==void 0&&{y2:(D=(_=(C=(v=R.seriesRange)==null?void 0:v[s])==null?void 0:C[i])==null?void 0:_.y[0])==null?void 0:D.y2});if(o){if(N.tooltipLabels.drawSeriesTexts(O(Y({},I),{shared:this.showOnIntersect?!1:this.tConfig.shared})),E)X();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...T]),this.barSeriesHeight>0)){let z=new L(this.w,this.ctx),W=k.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter(),N.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&X(),N.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let V=0;V<W.length;V++)z.pathMouseEnter(W[V],void 0)}}else N.tooltipLabels.drawSeriesTexts(Y({shared:!1},I)),this.tooltipUtil.hasBars()&&N.tooltipPosition.moveStickyTooltipOverBars(i,s),E&&N.tooltipPosition.moveMarkers(s,i)}},$=class b{constructor(t){this.node=t,t&&(t.instance=this),this._listeners=[],this._filter=null}attr(t,e){if(typeof t=="string"&&e===void 0)return this.node.getAttribute(t);let s=typeof t=="string"?{[t]:e}:t;for(let i in s){let a=s[i];a===null?this.node.removeAttribute(i):a!==void 0&&(typeof a=="number"&&isNaN(a)&&(a=0),this.node.setAttribute(i,a))}if(this.node.nodeName==="text"&&s.x!=null){let i=this.node.querySelectorAll("tspan[data-newline]");for(let a=0;a<i.length;a++)i[a].setAttribute("x",s.x)}return this}css(t){for(let e in t)this.node.style[e]=t[e];return this}fill(t){return typeof t=="object"?this.attr(t):this.attr("fill",t)}stroke(t){return typeof t=="object"?(t.color!==void 0&&this.attr("stroke",t.color),t.width!==void 0&&this.attr("stroke-width",t.width),t.dasharray!==void 0&&this.attr("stroke-dasharray",t.dasharray),t.linecap!==void 0&&this.attr("stroke-linecap",t.linecap),t.opacity!==void 0&&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(this.node.nodeName==="g"){let 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 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(e=>e.instance||new b(e))}findOne(t){let e=this.node.querySelector(t);return e?e.instance||new b(e):null}on(t,e){let 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)this._listeners.forEach(s=>{this.node.removeEventListener(s.eventType,s.handler)}),this._listeners=[];else if(t&&!e){let s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType===s?(this.node.removeEventListener(i.eventType,i.handler),!1):!0)}else{let s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType===s&&i.handler===e?(this.node.removeEventListener(i.eventType,i.handler),!1):!0)}return this}each(t,e){return Array.from(this.node.children).forEach(i=>{let a=i.instance||new b(i);t.call(a),e&&a.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=>t.nodeType===1).map(t=>t.instance||new b(t))}hide(){return this.node.style.display="none",this}show(){return this.node.style.display="",this}bbox(){if(typeof this.node.getBBox=="function")try{return this.node.getBBox()}catch{}return{x:0,y:0,width:0,height:0}}tspan(t){let e=F.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new b(e)}plot(t){return typeof t=="string"&&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}},Ie=0,oe=class extends ${constructor(t,e,s){let i=e==="radial"?"radialGradient":"linearGradient",a=F.createElementNS(H,i);super(a),this._id="SvgjsGradient"+ ++Ie,this.attr("id",this._id),typeof s=="function"&&s(new le(this));let o=t.node.querySelector("defs");o||(o=F.createElementNS(H,"defs"),t.node.appendChild(o)),o.appendChild(this.node)}stop(t,e,s){let i=F.createElementNS(H,"stop");return i.setAttribute("offset",t),i.setAttribute("stop-color",e),s!==void 0&&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()}},le=class{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}},We=0,ne=class extends ${constructor(t,e,s,i){let a=F.createElementNS(H,"pattern");if(super(a),this._id="SvgjsPattern"+ ++We,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),typeof i=="function"){let r=new xt(this.node);i(r)}let o=t.node.querySelector("defs");o||(o=F.createElementNS(H,"defs"),t.node.appendChild(o)),o.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},xt=class b extends ${line(t,e,s,i){let a=this._make("line");return t!==void 0&&a.attr({x1:t,y1:e,x2:s,y2:i}),a}rect(t,e){let s=this._make("rect");return t!==void 0&&s.attr({width:t,height:e}),s}circle(t){let e=this._make("circle");return t!==void 0&&e.attr({r:t/2,cx:t/2,cy:t/2}),e}path(t){let e=this._make("path");return t&&e.attr("d",t),e}polygon(t){let e=this._make("polygon");return t&&e.attr("points",t),e}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(t){let e=F.createElementNS(H,"text");e.textContent=t;let s=new $(e);return this.node.appendChild(e),s}text(t){let e=F.createElementNS(H,"text"),s=new $(e);return this.node.appendChild(e),typeof t=="function"&&t(new ce(e)),s}image(t,e){let s=F.createElementNS(H,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);let i=new $(s);if(this.node.appendChild(s),typeof e=="function"){let a=new Image;a.onload=function(){i.size(a.width,a.height),e.call(i,{width:a.width,height:a.height})},a.src=t}return i}gradient(t,e){return new oe(this,t,e)}pattern(t,e,s){return new ne(this,t,e,s)}_make(t){let e=F.createElementNS(H,t);return this.node.appendChild(e),new $(e)}_makeContainer(t){let e=F.createElementNS(H,t);return this.node.appendChild(e),new b(e)}},ce=class{constructor(t){this.textNode=t}tspan(t){let e=F.createElementNS(H,"tspan");return e.textContent=t,this.textNode.appendChild(e),new he(e,this.textNode)}},he=class{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}},Ge=0,de=class extends ${constructor(){let t=F.createElementNS(H,"filter");super(t),this._id="SvgjsFilter"+ ++Ge,this.attr("id",this._id)}size(t,e,s,i){return this.attr({width:t,height:e,x:s,y:i})}},fe=class{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){let e=F.createElementNS(H,"feMerge");return t.forEach(s=>{let i=F.createElementNS(H,"feMergeNode");i.setAttribute("in",s),e.appendChild(i)}),this.filter.node.appendChild(e),new $(e)}_primitive(t,e){let s=F.createElementNS(H,t);for(let i in e)s.setAttribute(i,e[i]);return this.filter.node.appendChild(s),new $(s)}};function $e(b){b.prototype.filterWith=function(t){let e=new de;this._filter=e;let s=this.node;for(;s&&s.nodeName!=="svg";)s=s.parentNode;if(s){let i=s.querySelector("defs");i||(i=F.createElementNS(H,"defs"),s.insertBefore(i,s.firstChild)),i.appendChild(e.node)}return t(new fe(e)),this.attr("filter","url(#"+e._id+")"),this},b.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},b.prototype.filterer=function(){return this._filter}}function ye(b){if(!b||typeof b!="string")return[["M",0,0]];let t=[],e=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,i,a=[],o=[];for(;(i=e.exec(b))!==null;)a.push(i[1]),o.push(i.index);for(let r=0;r<a.length;r++){let l=o[r]+a[r].length,c=r+1<o.length?o[r+1]:b.length,n=b.substring(l,c),h=[],d;for(s.lastIndex=0;(d=s.exec(n))!==null;)h.push(parseFloat(d[0]));let g=a[r].toUpperCase();if(g==="Z")t.push(["Z"]);else if(g==="M"||g==="L"||g==="T")for(let f=0;f<h.length;f+=2)t.push([g,h[f],h[f+1]]);else if(g==="H")for(let f=0;f<h.length;f++)t.push([g,h[f]]);else if(g==="V")for(let f=0;f<h.length;f++)t.push([g,h[f]]);else if(g==="C")for(let f=0;f<h.length;f+=6)t.push([g,h[f],h[f+1],h[f+2],h[f+3],h[f+4],h[f+5]]);else if(g==="S"||g==="Q")for(let f=0;f<h.length;f+=4)t.push([g,h[f],h[f+1],h[f+2],h[f+3]]);else if(g==="A")for(let f=0;f<h.length;f+=7)t.push([g,h[f],h[f+1],h[f+2],h[f+3],h[f+4],h[f+5],h[f+6]])}return t.length===0&&t.push(["M",0,0]),t}function we(b){let t=1/0,e=1/0,s=-1/0,i=-1/0;return b.forEach(a=>{for(let o=1;o<a.length;o+=2)if(o+1<=a.length){let r=a[o],l=a[o+1];typeof r=="number"&&typeof l=="number"&&(r<t&&(t=r),r>s&&(s=r),l<e&&(e=l),l>i&&(i=l))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:e,width:s-t,height:i-e}}function Ve(b){return b.map(t=>t.join(" ")).join(" ")}function ve(b){switch(b[0]){case"z":case"Z":b[0]="L",b[1]=this.start[0],b[2]=this.start[1];break;case"H":b[0]="L",b[2]=this.pos[1];break;case"V":b[0]="L",b[2]=b[1],b[1]=this.pos[0];break;case"T":b[0]="Q",b[3]=b[1],b[4]=b[2],b[1]=this.reflection[1],b[2]=this.reflection[0];break;case"S":b[0]="C",b[6]=b[4],b[5]=b[3],b[4]=b[2],b[3]=b[1],b[2]=this.reflection[1],b[1]=this.reflection[0];break}return b}function Ae(b){var t=b.length;return this.pos=[b[t-2],b[t-1]],"SCQT".indexOf(b[0])!=-1&&(this.reflection=[2*this.pos[0]-b[t-4],2*this.pos[1]-b[t-3]]),b}function Se(b){var t,e=[b];switch(b[0]){case"M":return this.pos=this.start=[b[1],b[2]],e;case"L":b[5]=b[3]=b[1],b[6]=b[4]=b[2],b[1]=this.pos[0],b[2]=this.pos[1];break;case"Q":b[6]=b[4],b[5]=b[3],b[4]=b[4]*1/3+b[2]*2/3,b[3]=b[3]*1/3+b[1]*2/3,b[2]=this.pos[1]*1/3+b[2]*2/3,b[1]=this.pos[0]*1/3+b[1]*2/3;break;case"A":e=Ue((t=this.pos)!=null?t:[],b),b=e[0];break}return b[0]="C",this.pos=[b[5],b[6]],this.reflection=[2*b[5]-b[3],2*b[6]-b[4]],e}function Ce(b,t){if(t===!1)return!1;for(var e=t,s=b.length;e<s;++e)if(b[e][0]=="M")return e;return!1}function Ue(b,t){var e=Math.abs(t[1]),s=Math.abs(t[2]),i=t[3]%360,a=t[4],o=t[5],r=t[6],l=t[7],c=new j(b[0],b[1]),n=new j(r,l),h,d,g,f,p,u,m,x,y,w,S,v,C,_,D,k,N,E,T,X,R,I,z=[],W,K,V,et;if(e===0||s===0||c.x===n.x&&c.y===n.y)return[["C",c.x,c.y,n.x,n.y,n.x,n.y]];for(h=new j((c.x-n.x)/2,(c.y-n.y)/2).transform(new ct(0,0,0,0,0,0).rotate(i)),d=h.x*h.x/(e*e)+h.y*h.y/(s*s),d>1&&(d=Math.sqrt(d),e=d*e,s=d*s),g=new ct(0,0,0,0,0,0).rotate(i).scale(1/e,1/s).rotate(-i),c=c.transform(g),n=n.transform(g),f=[n.x-c.x,n.y-c.y],u=f[0]*f[0]+f[1]*f[1],p=Math.sqrt(u),f[0]/=p,f[1]/=p,m=u<4?Math.sqrt(1-u/4):0,a===o&&(m*=-1),x=new j((n.x+c.x)/2+m*-f[1],(n.y+c.y)/2+m*f[0]),y=new j(c.x-x.x,c.y-x.y),w=new j(n.x-x.x,n.y-x.y),S=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(S*=-1),v=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(v*=-1),o&&S>v&&(v+=2*Math.PI),!o&&S<v&&(v-=2*Math.PI),_=Math.ceil(Math.abs(S-v)*2/Math.PI),k=[],N=S,C=(v-S)/_,D=4*Math.tan(C/4)/3,R=0;R<=_;R++)T=Math.cos(N),E=Math.sin(N),X=new j(x.x+T,x.y+E),k[R]=[new j(X.x+D*E,X.y-D*T),X,new j(X.x-D*E,X.y+D*T)],N+=C;for(k[0][0]=k[0][1].clone(),k[k.length-1][2]=k[k.length-1][1].clone(),g=new ct(0,0,0,0,0,0).rotate(i).scale(e,s).rotate(-i),R=0,I=k.length;R<I;R++)k[R][0]=k[R][0].transform(g),k[R][1]=k[R][1].transform(g),k[R][2]=k[R][2].transform(g);for(R=1,I=k.length;R<I;R++)X=k[R-1][2],W=X.x,K=X.y,X=k[R][0],V=X.x,et=X.y,X=k[R][1],r=X.x,l=X.y,z.push(["C",W,K,V,et,r,l]);return z}function qe(b,t,e,s,i,a){for(var o=b.slice(t,e||void 0),r=s.slice(i,a||void 0),l=0,c={pos:[0,0],start:[0,0]},n={pos:[0,0],start:[0,0]};o[l]=ve.call(c,o[l]),r[l]=ve.call(n,r[l]),o[l][0]!=r[l][0]||o[l][0]=="M"||o[l][0]=="A"&&(o[l][4]!=r[l][4]||o[l][5]!=r[l][5])?(Array.prototype.splice.apply(o,[l,1].concat(Se.call(c,o[l]))),Array.prototype.splice.apply(r,[l,1].concat(Se.call(n,r[l])))):(o[l]=Ae.call(c,o[l]),r[l]=Ae.call(n,r[l])),!(++l==o.length&&l==r.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==r.length&&r.push(["C",n.pos[0],n.pos[1],n.pos[0],n.pos[1],n.pos[0],n.pos[1]]);return{start:o,dest:r}}function je(b,t){for(var e=ye(b),s=ye(t),i=0,a=0,o=!1,r=!1,l;!(i===!1&&a===!1);){if(o=Ce(e,i===!1?!1:i+1),r=Ce(s,a===!1?!1:a+1),i===!1){let c=we(l.start);c.height==0||c.width==0?i=e.push(e[0])-1:i=e.push(["M",c.x+c.width/2,c.y+c.height/2])-1}if(a===!1){let c=we(l.dest);c.height==0||c.width==0?a=s.push(s[0])-1:a=s.push(["M",c.x+c.width/2,c.y+c.height/2])-1}l=qe(e,i,o,s,a,r),e=e.slice(0,i).concat(l.start,o===!1?[]:e.slice(o)),s=s.slice(0,a).concat(l.dest,r===!1?[]:s.slice(r)),i=o===!1?!1:i+l.start.length,a=r===!1?!1:a+l.dest.length}return{start:e,dest:s}}function Ze(b,t){var e=je(b,t),s=e.start,i=e.dest;return function(a){var o=s.map(function(r,l){return i[l].map(function(c,n){return n===0?c:r[n]+(i[l][n]-r[n])*a})});return Ve(o)}}function Ke(b){return-Math.cos(b*Math.PI)/2+.5}function ke(b){if(!b||typeof b!="string")return null;if(b[0]==="#"){let e=b.slice(1);e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let s=parseInt(e,16);return[s>>16&255,s>>8&255,s&255,1]}let t=b.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]!==void 0?+t[4]:1]:null}function Je(b,t,e){return`rgba(${Math.round(b[0]+(t[0]-b[0])*e)},${Math.round(b[1]+(t[1]-b[1])*e)},${Math.round(b[2]+(t[2]-b[2])*e)},${b[3]+(t[3]-b[3])*e})`}var ge=class b{constructor(t,e,s){this.el=t,this.duration=e??300,this.delay=s||0,this._attrTarget=null,this._plotTarget=null,this._afterCb=null,this._duringCb=null,this._next=null,this._root=null,this._scheduled=!1}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t){return this._plotTarget=t,this._schedule(),this}after(t){return this._afterCb=t,this._schedule(),this}during(t){return this._duringCb=t,this._schedule(),this}animate(t,e){let s=new b(this.el,t,e);return this._next=s,s._root=this._root||this,s}_schedule(){let t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){let t=[],e=this;for(;e;)t.push(e),e=e._next;let s=0;t.forEach(i=>{s+=i.delay,i._execute(s),s+=i.duration})}_execute(t){let e=this.el,s=this.duration;if(s<=1){let a=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotTarget),this._afterCb&&this._afterCb.call(e)};t>0?setTimeout(a,t):a();return}let i=()=>{let a={},o={},r={};if(this._attrTarget)for(let h of Object.keys(this._attrTarget)){let d=e.attr(h);a[h]=d;let g=ke(d),f=ke(String(this._attrTarget[h]));g&&f&&(o[h]=g,r[h]=f)}let l=null;if(this._plotTarget){let h=e.attr("d")||"";try{l=Ze(h,this._plotTarget)}catch{l=null}}let c=performance.now(),n=h=>{let d=h-c,g=Math.min(d/s,1),f=Ke(g);if(this._attrTarget)if(g>=1)e.attr(this._attrTarget);else{let p={};for(let u of Object.keys(this._attrTarget))if(o[u]&&r[u])p[u]=Je(o[u],r[u],f);else{let m=parseFloat(a[u]),x=parseFloat(this._attrTarget[u]);!isNaN(m)&&!isNaN(x)&&(p[u]=m+(x-m)*f)}e.attr(p)}l&&g<1&&e.attr("d",l(f)),this._duringCb&&this._duringCb(f),g<1?F.requestAnimationFrame(n):(this._plotTarget&&e.attr("d",this._plotTarget),this._afterCb&&this._afterCb.call(e))};F.requestAnimationFrame(n)};t>0?setTimeout(i,t):i()}};function Qe(b){b.prototype.animate=function(t,e){return new ge(this,t,e)}}function ts(b){b.prototype.draggable=function(t){if(t===!1)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;let e=this,s=t||{},i=a=>{if(a.button&&a.button!==0)return;a.stopPropagation();let r=a.type==="touchstart"?a.touches[0]:a,l=e.node,c=parseFloat(l.getAttribute("x"))||0,n=parseFloat(l.getAttribute("y"))||0,h=r.clientX,d=r.clientY,g=l.ownerSVGElement,f=null;g&&(f=g.getScreenCTM());let p=m=>{let x=m.type==="touchmove"?m.touches[0]:m,y=x.clientX-h,w=x.clientY-d;f&&(y=y/f.a,w=w/f.d);let S=c+y,v=n+w,C=parseFloat(l.getAttribute("width"))||0,_=parseFloat(l.getAttribute("height"))||0;s.minX!==void 0&&S<s.minX&&(S=s.minX),s.minY!==void 0&&v<s.minY&&(v=s.minY),s.maxX!==void 0&&S+C>s.maxX&&(S=s.maxX-C),s.maxY!==void 0&&v+_>s.maxY&&(v=s.maxY-_);let D={x:S,y:v,w:C,h:_,x2:S+C,y2:v+_},k=new CustomEvent("dragmove",{detail:{handler:{move:function(N,E){l.setAttribute("x",N),l.setAttribute("y",E)}},box:D}});l.dispatchEvent(k)},u=()=>{M.isBrowser()&&(document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p),document.removeEventListener("mouseup",u),document.removeEventListener("touchend",u))};M.isBrowser()&&(document.addEventListener("mousemove",p),document.addEventListener("touchmove",p),document.addEventListener("mouseup",u),document.addEventListener("touchend",u))};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 es(b){b.prototype.select=function(t){if(t===!1)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;let e=this,{createHandle:s,updateHandle:i}=t,a=document.createElementNS(H,"g");a.setAttribute("class","svg_select_points");let o=e.node.parentNode;o&&o.appendChild(a);let r={},l=["t","b","l","r","lt","rt","lb","rb"];l.forEach((n,h)=>{let d=new xt(document.createElementNS(H,"g"));a.appendChild(d.node);let g=s(d,[0,0],h,[],n);r[n]={group:d,handle:g}});let c=()=>{let n=parseFloat(e.attr("x"))||0,h=parseFloat(e.attr("y"))||0,d=parseFloat(e.attr("width"))||0,g=parseFloat(e.attr("height"))||0,f=e.node.getAttribute("transform");f?a.setAttribute("transform",f):a.removeAttribute("transform");let p={t:[n+d/2,h],b:[n+d/2,h+g],l:[n,h+g/2],r:[n+d,h+g/2],lt:[n,h],rt:[n+d,h],lb:[n,h+g],rb:[n+d,h+g]};l.forEach(u=>{r[u]&&p[u]&&i(r[u].group,p[u])})};return c(),e._selectHandles=a,e._selectHandlesMap=r,e._updateSelectPositions=c,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},b.prototype.resize=function(t){if(t===!1)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;let e=this,s=e._selectHandlesMap;if(!s)return e;let i=[],a=o=>{let r=s[o];if(!r||!r.group||!r.group.node)return;let l=r.group.node,c=n=>{if(n.button&&n.button!==0)return;n.stopPropagation();let g=(n.type==="touchstart"?n.touches[0]:n).clientX,f=e.node.ownerSVGElement,p=null;f&&(p=f.getScreenCTM());let u=parseFloat(e.attr("x"))||0,m=parseFloat(e.attr("width"))||0,x=w=>{let v=(w.type==="touchmove"?w.touches[0]:w).clientX-g;p&&(v=v/p.a);let C=u,_=m;o==="l"?(C=u+v,_=m-v):o==="r"&&(_=m+v),_<0&&(_=0),e.attr({x:C,width:_}),e._updateSelectPositions&&e._updateSelectPositions();let D=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(D)},y=()=>{M.isBrowser()&&(document.removeEventListener("mousemove",x),document.removeEventListener("touchmove",x),document.removeEventListener("mouseup",y),document.removeEventListener("touchend",y));let w=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(w)};M.isBrowser()&&(document.addEventListener("mousemove",x),document.addEventListener("touchmove",x),document.addEventListener("mouseup",y),document.addEventListener("touchend",y))};l.addEventListener("mousedown",c),l.addEventListener("touchstart",c),i.push(()=>{l.removeEventListener("mousedown",c),l.removeEventListener("touchstart",c)})};return a("l"),a("r"),e._resizeCleanup=()=>{i.forEach(o=>o())},e}}$e($);Qe($);ts($);es($);function _t(){let b=F.createElementNS(H,"svg"),t=new xt(b);return t.attr({xmlns:H}),t}_t.xlink="http://www.w3.org/1999/xlink";M.isBrowser()&&typeof window.SVG>"u"&&(window.SVG=_t);M.isBrowser()?(typeof window.SVG>"u"&&(window.SVG=_t),typeof window.Apex>"u"&&(window.Apex={})):typeof global<"u"&&(typeof global.Apex>"u"&&(global.Apex={}),typeof global.SVG>"u"&&(global.SVG=_t));var Fe=class pe{static registerFeatures(t){for(let[e,s]of Object.entries(t))pe._featureRegistry.set(e,s)}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","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new ht(this.w,this.ctx),this.ctx.axes=new It(this.w,this.ctx),this.ctx.core=new Qt(this.ctx.el,this.w,this.ctx),this.ctx.config=new ot({}),this.ctx.data=new Ct(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new At(this.w,this.ctx),this.ctx.graphics=new L(this.w,this.ctx),this.ctx.coreUtils=new q(this.w),this.ctx.crosshairs=new ut(this.w),this.ctx.events=new zt(this.w,this.ctx),this.ctx.fill=new wt(this.w),this.ctx.localization=new Ot(this.w),this.ctx.options=new J,this.ctx.responsive=new Wt(this.w),this.ctx.series=new tt(this.w,{toggleDataSeries:(...e)=>{var s;return(s=this.ctx.legend)==null?void 0:s.legendHelpers.toggleDataSeries(...e)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...e)=>this.ctx.updateHelpers._updateSeries(...e)}),this.ctx.theme=new Gt(this.w),this.ctx.formatters=new at(this.w),this.ctx.titleSubtitle=new $t(this.w),this.ctx.dimensions=new St(this.w,this.ctx),this.ctx.updateHelpers=new te(this.w,this.ctx);let t=new re(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(){let t=pe._featureRegistry,e=this.w,s=this.ctx,i=t.get("exports");s.exports=i?new i(e,s):null;let a=t.get("legend");s.legend=a?new a(e,s):null;let o=t.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var c;return!this._toolbar&&o&&(this._toolbar=new o(e,this)),(c=this._toolbar)!=null?c:null},configurable:!0});let r=t.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var c;return!this._zoomPanSelection&&r&&(this._zoomPanSelection=new r(e,this)),(c=this._zoomPanSelection)!=null?c:null},configurable:!0});let l=t.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var c;return!this._keyboardNavigation&&l&&(this._keyboardNavigation=new l(e,this)),(c=this._keyboardNavigation)!=null?c:null},configurable:!0})}};P(Fe,"_featureRegistry",new Map);var mt=Fe,Lt=class{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&typeof this.w.globals.resizeObserver.disconnect=="function"&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),ft.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,this.ctx._keyboardNavigation=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}){let e=this.w.dom;if(M.isBrowser()){let s=e.Paper.node;s.parentNode&&s.parentNode.parentNode&&!t&&(s.parentNode.parentNode.style.minHeight="unset");let i=e.baseEl;if(i&&this.ctx.eventList.forEach(a=>{i.removeEventListener(a,this.ctx.events.documentEvent)}),this.ctx.el!==null)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}},ue=new WeakMap;function ss(b,t){if(M.isSSR())return;let e=!1;if(b.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){let i=b.getBoundingClientRect();(b.style.display==="none"||i.width===0)&&(e=!0)}let s=new ResizeObserver(i=>{e&&t.call(b,i),e=!0});b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(b.children).forEach(i=>s.observe(i)):s.observe(b),ue.set(t,s)}function is(b,t){if(M.isSSR())return;let e=ue.get(t);e&&(e.disconnect(),ue.delete(t))}var as=`@keyframes opaque {
  0% {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes resizeanim {

  0%,
  to {
    opacity: 0
  }
}

.apexcharts-canvas {
  position: relative;
  direction: ltr !important;
  user-select: none
}

.apexcharts-canvas ::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 6px
}

.apexcharts-canvas ::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: rgba(0, 0, 0, .5);
  box-shadow: 0 0 1px rgba(255, 255, 255, .5);
  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
}

.apexcharts-inner {
  position: relative
}

.apexcharts-text tspan {
  font-family: inherit
}

rect.legend-mouseover-inactive,
.legend-mouseover-inactive rect,
.legend-mouseover-inactive path,
.legend-mouseover-inactive circle,
.legend-mouseover-inactive line,
.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
.legend-mouseover-inactive text.apexcharts-yaxis-label {
  transition: .15s ease all;
  opacity: .2
}

.apexcharts-legend-text {
  padding-left: 15px;
  margin-left: -15px;
}

.apexcharts-legend-series[role="button"]:focus {
  outline: 2px solid #008FFB;
  outline-offset: 2px;
}

.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {
  outline: none;
}

.apexcharts-legend-series[role="button"]:focus-visible {
  outline: 2px solid #008FFB;
  outline-offset: 2px;
}

.apexcharts-series-collapsed {
  opacity: 0
}

/* Keyboard navigation focus indicator on SVG data elements.
   SVG elements don't support CSS outline, so we use stroke. */
.apexcharts-bar-area.apexcharts-keyboard-focused,
.apexcharts-candlestick-area.apexcharts-keyboard-focused,
.apexcharts-boxPlot-area.apexcharts-keyboard-focused,
.apexcharts-rangebar-area.apexcharts-keyboard-focused,
.apexcharts-pie-area.apexcharts-keyboard-focused,
.apexcharts-heatmap-rect.apexcharts-keyboard-focused,
.apexcharts-treemap-rect.apexcharts-keyboard-focused {
  stroke: #008FFB;
  stroke-width: 2;
  stroke-opacity: 1;
}

.apexcharts-tooltip {
  border-radius: 5px;
  box-shadow: 2px 2px 6px -4px #999;
  cursor: default;
  font-size: 14px;
  left: 62px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
  z-index: 12;
  transition: .15s ease all
}

.apexcharts-tooltip.apexcharts-active {
  opacity: 1;
  transition: .15s ease all
}

.apexcharts-tooltip.apexcharts-theme-light {
  border: 1px solid #e3e3e3;
  background: rgba(255, 255, 255, .96)
}

.apexcharts-tooltip.apexcharts-theme-dark {
  color: #fff;
  background: rgba(30, 30, 30, .8)
}

.apexcharts-tooltip * {
  font-family: inherit
}

.apexcharts-tooltip-title {
  padding: 6px;
  font-size: 15px;
  margin-bottom: 4px
}

.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
  background: #eceff1;
  border-bottom: 1px solid #ddd
}

.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
  background: rgba(0, 0, 0, .7);
  border-bottom: 1px solid #333
}

.apexcharts-tooltip-text-goals-value,
.apexcharts-tooltip-text-y-value,
.apexcharts-tooltip-text-z-value {
  display: inline-block;
  margin-left: 5px;
  font-weight: 600
}

.apexcharts-tooltip-text-goals-label:empty,
.apexcharts-tooltip-text-goals-value:empty,
.apexcharts-tooltip-text-y-label:empty,
.apexcharts-tooltip-text-y-value:empty,
.apexcharts-tooltip-text-z-value:empty,
.apexcharts-tooltip-title:empty {
  display: none
}

.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
  padding: 6px 0 5px
}

.apexcharts-tooltip-goals-group,
.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
  display: flex
}

.apexcharts-tooltip-text-goals-label:not(:empty),
.apexcharts-tooltip-text-goals-value:not(:empty) {
  margin-top: -6px
}

.apexcharts-tooltip-marker {
  display: inline-block;
  position: relative;
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
  margin-right: 4px;
  text-align: center;
  vertical-align: middle;
  color: inherit;
}

.apexcharts-tooltip-marker::before {
  content: "";
  display: inline-block;
  width: 100%;
  text-align: center;
  color: currentcolor;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-size: 26px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 14px;
  font-weight: 900;
}

.apexcharts-tooltip-marker[shape="circle"]::before {
  content: "\\25CF";
}

.apexcharts-tooltip-marker[shape="square"]::before,
.apexcharts-tooltip-marker[shape="rect"]::before {
  content: "\\25A0";
  transform: translate(-1px, -2px);
}

.apexcharts-tooltip-marker[shape="line"]::before {
  content: "\\2500";
}

.apexcharts-tooltip-marker[shape="diamond"]::before {
  content: "\\25C6";
  font-size: 28px;
}

.apexcharts-tooltip-marker[shape="triangle"]::before {
  content: "\\25B2";
  font-size: 22px;
}

.apexcharts-tooltip-marker[shape="cross"]::before {
  content: "\\2715";
  font-size: 18px;
}

.apexcharts-tooltip-marker[shape="plus"]::before {
  content: "\\2715";
  transform: rotate(45deg) translate(-1px, -1px);
  font-size: 18px;
}

.apexcharts-tooltip-marker[shape="star"]::before {
  content: "\\2605";
  font-size: 18px;
}

.apexcharts-tooltip-marker[shape="sparkle"]::before {
  content: "\\2726";
  font-size: 20px;
}

.apexcharts-tooltip-series-group {
  padding: 0 10px;
  display: none;
  text-align: left;
  justify-content: left;
  align-items: center
}

.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
  opacity: 1
}

.apexcharts-tooltip-series-group.apexcharts-active,
.apexcharts-tooltip-series-group:last-child {
  padding-bottom: 4px
}

.apexcharts-tooltip-y-group {
  padding: 6px 0 5px
}

.apexcharts-custom-tooltip,
.apexcharts-tooltip-box {
  padding: 4px 8px
}

.apexcharts-tooltip-boxPlot {
  display: flex;
  flex-direction: column-reverse
}

.apexcharts-tooltip-box>div {
  margin: 4px 0
}

.apexcharts-tooltip-box span.value {
  font-weight: 700
}

.apexcharts-tooltip-rangebar {
  padding: 5px 8px
}

.apexcharts-tooltip-rangebar .category {
  font-weight: 600;
  color: #777
}

.apexcharts-tooltip-rangebar .series-name {
  font-weight: 700;
  display: block;
  margin-bottom: 5px
}

.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
  opacity: 0;
  pointer-events: none;
  color: #373d3f;
  font-size: 13px;
  text-align: center;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
  background: #eceff1;
  border: 1px solid #90a4ae
}

.apexcharts-xaxistooltip {
  padding: 9px 10px;
  transition: .15s ease all
}

.apexcharts-xaxistooltip.apexcharts-theme-dark {
  background: rgba(0, 0, 0, .7);
  border: 1px solid rgba(0, 0, 0, .5);
  color: #fff
}

.apexcharts-xaxistooltip:after,
.apexcharts-xaxistooltip:before {
  left: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none
}

.apexcharts-xaxistooltip:after {
  border-color: transparent;
  border-width: 6px;
  margin-left: -6px
}

.apexcharts-xaxistooltip:before {
  border-color: transparent;
  border-width: 7px;
  margin-left: -7px
}

.apexcharts-xaxistooltip-bottom:after,
.apexcharts-xaxistooltip-bottom:before {
  bottom: 100%
}

.apexcharts-xaxistooltip-top:after,
.apexcharts-xaxistooltip-top:before {
  top: 100%
}

.apexcharts-xaxistooltip-bottom:after {
  border-bottom-color: #eceff1
}

.apexcharts-xaxistooltip-bottom:before {
  border-bottom-color: #90a4ae
}

.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
  border-bottom-color: rgba(0, 0, 0, .5)
}

.apexcharts-xaxistooltip-top:after {
  border-top-color: #eceff1
}

.apexcharts-xaxistooltip-top:before {
  border-top-color: #90a4ae
}

.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
  border-top-color: rgba(0, 0, 0, .5)
}

.apexcharts-xaxistooltip.apexcharts-active {
  opacity: 1;
  transition: .15s ease all
}

.apexcharts-yaxistooltip {
  padding: 4px 10px
}

.apexcharts-yaxistooltip.apexcharts-theme-dark {
  background: rgba(0, 0, 0, .7);
  border: 1px solid rgba(0, 0, 0, .5);
  color: #fff
}

.apexcharts-yaxistooltip:after,
.apexcharts-yaxistooltip:before {
  top: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none
}

.apexcharts-yaxistooltip:after {
  border-color: transparent;
  border-width: 6px;
  margin-top: -6px
}

.apexcharts-yaxistooltip:before {
  border-color: transparent;
  border-width: 7px;
  margin-top: -7px
}

.apexcharts-yaxistooltip-left:after,
.apexcharts-yaxistooltip-left:before {
  left: 100%
}

.apexcharts-yaxistooltip-right:after,
.apexcharts-yaxistooltip-right:before {
  right: 100%
}

.apexcharts-yaxistooltip-left:after {
  border-left-color: #eceff1
}

.apexcharts-yaxistooltip-left:before {
  border-left-color: #90a4ae
}

.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
  border-left-color: rgba(0, 0, 0, .5)
}

.apexcharts-yaxistooltip-right:after {
  border-right-color: #eceff1
}

.apexcharts-yaxistooltip-right:before {
  border-right-color: #90a4ae
}

.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
  border-right-color: rgba(0, 0, 0, .5)
}

.apexcharts-yaxistooltip.apexcharts-active {
  opacity: 1
}

.apexcharts-yaxistooltip-hidden {
  display: none
}

.apexcharts-xcrosshairs,
.apexcharts-ycrosshairs {
  pointer-events: none;
  opacity: 0;
  transition: .15s ease all
}

.apexcharts-xcrosshairs.apexcharts-active,
.apexcharts-ycrosshairs.apexcharts-active {
  opacity: 1;
  transition: .15s ease all
}

.apexcharts-ycrosshairs-hidden {
  opacity: 0
}

.apexcharts-selection-rect {
  cursor: move
}

.svg_select_shape {
  stroke-width: 1;
  stroke-dasharray: 10 10;
  stroke: black;
  stroke-opacity: 0.1;
  pointer-events: none;
  fill: none;
}

.svg_select_handle {
  stroke-width: 3;
  stroke: black;
  fill: none;
}

.svg_select_handle_r {
  cursor: e-resize;
}

.svg_select_handle_l {
  cursor: w-resize;
}

.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
  cursor: crosshair
}

.apexcharts-svg.apexcharts-zoomable.hovering-pan {
  cursor: move
}

.apexcharts-menu-icon,
.apexcharts-pan-icon,
.apexcharts-reset-icon,
.apexcharts-selection-icon,
.apexcharts-toolbar-custom-icon,
.apexcharts-zoom-icon,
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
  cursor: pointer;
  width: 20px;
  height: 20px;
  line-height: 24px;
  color: #6e8192;
  text-align: center
}

.apexcharts-menu-icon svg,
.apexcharts-reset-icon svg,
.apexcharts-zoom-icon svg,
.apexcharts-zoomin-icon svg,
.apexcharts-zoomout-icon svg {
  fill: #6e8192
}

.apexcharts-selection-icon svg {
  fill: #444;
  transform: scale(.76)
}

.apexcharts-theme-dark .apexcharts-menu-icon svg,
.apexcharts-theme-dark .apexcharts-pan-icon svg,
.apexcharts-theme-dark .apexcharts-reset-icon svg,
.apexcharts-theme-dark .apexcharts-selection-icon svg,
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
.apexcharts-theme-dark .apexcharts-zoom-icon svg,
.apexcharts-theme-dark .apexcharts-zoomin-icon svg,
.apexcharts-theme-dark .apexcharts-zoomout-icon svg {
  fill: #f3f4f5
}

.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
  fill: #008ffb
}

.apexcharts-theme-light .apexcharts-menu-icon:hover svg,
.apexcharts-theme-light .apexcharts-reset-icon:hover svg,
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
  fill: #333
}

.apexcharts-menu-icon,
.apexcharts-selection-icon {
  position: relative
}

.apexcharts-reset-icon {
  margin-left: 5px
}

.apexcharts-menu-icon,
.apexcharts-reset-icon,
.apexcharts-zoom-icon {
  transform: scale(.85)
}

.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
  transform: scale(.7)
}

.apexcharts-zoomout-icon {
  margin-right: 3px
}

.apexcharts-pan-icon {
  transform: scale(.62);
  position: relative;
  left: 1px;
  top: 0
}

.apexcharts-pan-icon svg {
  fill: #fff;
  stroke: #6e8192;
  stroke-width: 2
}

.apexcharts-pan-icon.apexcharts-selected svg {
  stroke: #008ffb
}

.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
  stroke: #333
}

.apexcharts-toolbar {
  position: absolute;
  z-index: 11;
  max-width: 176px;
  text-align: right;
  border-radius: 3px;
  padding: 0 6px 2px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.apexcharts-menu {
  background: #fff;
  position: absolute;
  top: 100%;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 3px;
  right: 10px;
  opacity: 0;
  min-width: 110px;
  transition: .15s ease all;
  pointer-events: none
}

.apexcharts-menu.apexcharts-menu-open {
  opacity: 1;
  pointer-events: all;
  transition: .15s ease all
}

.apexcharts-menu-item {
  padding: 6px 7px;
  font-size: 12px;
  cursor: pointer
}

.apexcharts-theme-light .apexcharts-menu-item:hover {
  background: #eee
}

.apexcharts-theme-dark .apexcharts-menu {
  background: rgba(0, 0, 0, .7);
  color: #fff
}

@media screen and (min-width:768px) {
  .apexcharts-canvas:hover .apexcharts-toolbar {
    opacity: 1
  }
}

/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */
.apexcharts-toolbar:focus-within {
  opacity: 1
}

/* Focus indicator for toolbar icon buttons */
.apexcharts-menu-icon:focus-visible,
.apexcharts-pan-icon:focus-visible,
.apexcharts-reset-icon:focus-visible,
.apexcharts-selection-icon:focus-visible,
.apexcharts-toolbar-custom-icon:focus-visible,
.apexcharts-zoom-icon:focus-visible,
.apexcharts-zoomin-icon:focus-visible,
.apexcharts-zoomout-icon:focus-visible {
  outline: 2px solid #008FFB;
  outline-offset: 2px;
  border-radius: 2px
}

/* Focus indicator for hamburger menu items */
.apexcharts-menu-item:focus-visible {
  outline: 2px solid #008FFB;
  outline-offset: -2px;
  background: #eee
}

.apexcharts-canvas .apexcharts-element-hidden,
.apexcharts-datalabel.apexcharts-element-hidden,
.apexcharts-hide .apexcharts-series-points {
  opacity: 0;
}

.apexcharts-hidden-element-shown {
  opacity: 1;
  transition: 0.25s ease all;
}

.apexcharts-datalabel,
.apexcharts-datalabel-label,
.apexcharts-datalabel-value,
.apexcharts-datalabels,
.apexcharts-pie-label {
  cursor: default;
  pointer-events: none
}

.apexcharts-pie-label-delay {
  opacity: 0;
  animation-name: opaque;
  animation-duration: .3s;
  animation-fill-mode: forwards;
  animation-timing-function: ease
}

.apexcharts-radialbar-label {
  cursor: pointer;
}

.apexcharts-annotation-rect,
.apexcharts-area-series .apexcharts-area,
.apexcharts-gridline,
.apexcharts-line,
.apexcharts-point-annotation-label,
.apexcharts-radar-series path:not(.apexcharts-marker),
.apexcharts-radar-series polygon,
.apexcharts-toolbar svg,
.apexcharts-tooltip .apexcharts-marker,
.apexcharts-xaxis-annotation-label,
.apexcharts-yaxis-annotation-label,
.apexcharts-zoom-rect,
.no-pointer-events {
  pointer-events: none
}

.apexcharts-tooltip-active .apexcharts-marker {
  transition: .15s ease all
}

.apexcharts-radar-series .apexcharts-yaxis {
  pointer-events: none;
}

.resize-triggers {
  animation: 1ms resizeanim;
  visibility: hidden;
  opacity: 0;
  height: 100%;
  width: 100%;
  overflow: hidden
}

.contract-trigger:before,
.resize-triggers,
.resize-triggers>div {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0
}

.resize-triggers>div {
  height: 100%;
  width: 100%;
  background: #eee;
  overflow: auto
}

.contract-trigger:before {
  overflow: hidden;
  width: 200%;
  height: 200%
}

.apexcharts-bar-goals-markers {
  pointer-events: none
}

.apexcharts-bar-shadows {
  pointer-events: none
}

.apexcharts-rangebar-goals-markers {
  pointer-events: none
}

.apexcharts-disable-transitions * {
  transition: none !important;
}`,De=class b{constructor(t,e){P(this,"core"),P(this,"responsive"),P(this,"axes"),P(this,"grid"),P(this,"graphics"),P(this,"coreUtils"),P(this,"crosshairs"),P(this,"events"),P(this,"fill"),P(this,"localization"),P(this,"options"),P(this,"series"),P(this,"theme"),P(this,"formatters"),P(this,"titleSubtitle"),P(this,"dimensions"),P(this,"updateHelpers"),P(this,"tooltip"),P(this,"data"),P(this,"animations"),P(this,"exports"),P(this,"legend"),P(this,"toolbar"),P(this,"zoomPanSelection"),P(this,"keyboardNavigation"),P(this,"annotations"),P(this,"timeScale"),P(this,"_keyboardNavigation"),P(this,"windowResizeHandler"),P(this,"parentResizeHandler"),P(this,"publicMethods",[]),P(this,"eventList",[]),P(this,"config"),this.opts=e,this.ctx=this,this.w=new Rt(e).init(),this.el=t,this.w.globals.cuid=A.randomId(),this.w.globals.chartID=this.w.config.chart.id?A.escapeString(this.w.config.chart.id):this.w.globals.cuid,new mt(this).initModules(),this.lastUpdateOptions=null,this.create=this.create.bind(this),M.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){var t,e;return(e=(t=this.w)==null?void 0:t.config)!=null&&e.chart?new Promise((s,i)=>{var a;if(A.elementExists(this.el)){typeof Apex._chartInstances>"u"&&(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);let o=this.w.config.chart.events.beforeMount;if(typeof o=="function"&&o(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]),M.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),ss(this.el.parentNode,this.parentResizeHandler);let l=this.el.getRootNode&&this.el.getRootNode(),c=A.is("ShadowRoot",l),n=this.el.ownerDocument,h=c?l.getElementById("apexcharts-css"):n.getElementById("apexcharts-css");if(!h){h=F.createElementNS("http://www.w3.org/1999/xhtml","style"),h.id="apexcharts-css",h.textContent=as;let d=((a=this.opts.chart)==null?void 0:a.nonce)||this.w.config.chart.nonce;d&&h.setAttribute("nonce",d),c?l.prepend(h):this.w.config.chart.injectStyleSheet!==!1&&n.head.appendChild(h)}}let r=this.create(this.w.config.series,{});if(!r)return s(this);this.mount(r).then(()=>{typeof this.w.config.chart.events.mounted=="function"&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),s(r)}).catch(l=>{var c,n;let h=l instanceof Error?l:new Error(String(l)),d=h;d.chartId=(n=(c=this.w)==null?void 0:c.globals)==null?void 0:n.chartID,d.el=this.el,i(h)})}else i(new Error("Element not found"))}):Promise.reject(new Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."))}create(t,e){var s;let i=this.w;this.core||new mt(this).initModules();let a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,!A.elementExists(this.el)||(this.responsive.checkResponsiveConfig(e),i.config.xaxis.convertedCatToNumeric&&new rt(i.config).convertCatToNumericXaxis(i.config,this.ctx),this.core.setupElements(),i.config.chart.type==="treemap"&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),a.svgWidth===0))return a.animationEnded=!0,null;let o=t;t.forEach((m,x)=>{m.hidden&&(o=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:x}))});let r=q.checkComboSeries(o,i.config.chart.type);a.comboCharts=r.comboCharts,a.comboBarCount=r.comboBarCount;let l=o.every(m=>m.data&&m.data.length===0);(o.length===0||l&&a.collapsedSeries.length<1)&&this.series.handleNoData(),M.isBrowser()&&this.events.setupEventHandlers();let c=this.data.parseData(o);this._writeParsedSeriesData(c.seriesData),this._writeParsedRangeData(c.rangeData),this._writeParsedCandleData(c.candleData),this._writeParsedLabelData(c.labelData),this._writeParsedAxisFlags(c.axisFlags),this.theme.init(),new dt(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),(!a.noData||a.collapsedSeries.length===i.seriesData.series.length||i.config.legend.showForSingleSeries)&&((s=this.legend)==null||s.init()),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),i.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX)),this.formatters.heatmapLabelFormatters(),new q(this.w).getLargestMarkerSize();let d=this.dimensions.plotCoords();this._writeLayoutCoords(d.layout);let g=this.core.xySettings();this.grid.createGridMask();let f=this.core.plotChartType(o,g),p=new vt(this.w,this);p.bringForward(),i.config.dataLabels.background.enabled&&p.dataLabelsBackground(),this.core.shiftGraphPosition(),i.globals.dataPoints>50&&i.dom.elWrap.classList.add("apexcharts-disable-transitions");let u={plot:{left:i.layout.translateX,top:i.layout.translateY,width:i.layout.gridWidth,height:i.layout.gridHeight}};return{elGraph:f,xyRatios:g,dimensions:u}}mount(t=null){let e=this,s=e.w;return new Promise((i,a)=>{var o,r,l,c,n,h,d,g,f;if(e.el===null)return a(new Error("Not enough data to display or target element not found"));(t===null||s.globals.allSeriesCollapsed)&&e.series.handleNoData(),e.grid=new At(e.w,e);let p=e.grid.drawGrid(),u=mt._featureRegistry.get("annotations");if(e.annotations=u?new u(e.w,{theme:e.theme,timeScale:e.timeScale}):null,(o=e.annotations)==null||o.drawImageAnnos(),(r=e.annotations)==null||r.drawTextAnnos(),s.config.grid.position==="back"&&(p&&s.dom.elGraphical.add(p.el),(l=p?.elGridBorders)!=null&&l.node&&s.dom.elGraphical.add(p.elGridBorders)),Array.isArray(t.elGraph))for(let y=0;y<t.elGraph.length;y++)s.dom.elGraphical.add(t.elGraph[y]);else s.dom.elGraphical.add(t.elGraph);s.config.grid.position==="front"&&(p&&s.dom.elGraphical.add(p.el),(c=p?.elGridBorders)!=null&&c.node&&s.dom.elGraphical.add(p.elGridBorders)),s.config.xaxis.crosshairs.position==="front"&&e.crosshairs.drawXCrosshairs(),s.config.yaxis[0].crosshairs.position==="front"&&e.crosshairs.drawYCrosshairs(),s.config.chart.type!=="treemap"&&e.axes.drawAxis(s.config.chart.type,p);let m=new lt(this.w,this.ctx,p),x=new pt(this.w,{theme:this.theme,timeScale:this.timeScale},p);if(p!==null&&(m.xAxisLabelCorrections(),x.setYAxisTextAlignments(),s.config.yaxis.map((y,w)=>{s.globals.ignoreYAxisIndexes.indexOf(w)===-1&&x.yAxisTitleRotate(w,y.opposite)})),(n=e.annotations)==null||n.drawAxesAnnotations(),!s.globals.noData){if(M.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&((h=e.w.globals.tooltip)==null||h.drawTooltip(t.xyRatios)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&((d=e.keyboardNavigation)==null||d.init()),M.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)&&((g=e.zoomPanSelection)==null||g.init({xyRatios:t.xyRatios}));else{let y=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(S=>{y[S]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&((f=e.toolbar)==null||f.createToolbar())}s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(y=>{y.method(y.params,!1,y.context)}),!s.globals.axisCharts&&!s.globals.noData&&e.core.resizeNonAxisCharts(),i(e)})}destroy(){M.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),is(this.el.parentNode,this.parentResizeHandler));let t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((e,s)=>{e.id===A.escapeString(t)&&Apex._chartInstances.splice(s,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new Lt(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,s=!0,i=!0,a=!0){let o=this.w;if(o.interact.selection=void 0,this.lastUpdateOptions){if(A.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(t.series)){let r=Y({},t),l=Y({},this.lastUpdateOptions);if(delete r.series,delete l.series,A.shallowEqual(r,l))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((r,l)=>this.updateHelpers._extendSeries(r,l))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,e,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();let 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){let s=this;s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.series.getPreviousPaths();let i=s.w.config.series.slice();for(let a=0;a<i.length;a++)if(t[a]!==null&&typeof t[a]<"u"){let o=t[a],r=i[a];for(let l=0;l<o.data.length;l++)r.data.push(o.data[l])}return s.w.config.series=i,e&&(s.w.globals.initialSeries=A.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=A.clone(t),new Lt(this.ctx).clear({isUpdating:!0});let i=this.create(this.w.config.series,t??{});if(!i)return e(this);this.mount(i).then(()=>{typeof this.w.config.chart.events.updated=="function"&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent("updated",[this,this.w]),this.w.globals.isDirty=!0,e(this)}).catch(a=>{s(a)})})}fastUpdate(t){return new Promise((e,s)=>{var i;try{let a=this.w,o=a.globals;o.shouldAnimate=t,o.dataChanged=!0,o.animationEnded=!1,ft.invalidateSelectors(a);let r=a.globals;r.maxY=-Number.MAX_VALUE,r.minY=Number.MIN_VALUE,r.minYArr=[],r.maxYArr=[],r.maxX=-Number.MAX_VALUE,r.minX=Number.MAX_VALUE,r.initialMaxX=-Number.MAX_VALUE,r.initialMinX=Number.MAX_VALUE,r.yAxisScale=[],r.xAxisScale=null,r.xAxisTicksPositions=[],r.xRange=0,r.yRange=[],r.zRange=0,r.xTickAmount=0,r.multiAxisTickAmount=0,r.pointsArray=[],r.dataLabelsRects=[],r.lastDrawnDataLabelsIndexes=[],r.textRectsCache=new Map,r.domCache=new Map,r.cachedSelectors={},r.disableZoomIn=!1,r.disableZoomOut=!1,o.axisCharts&&(this.core.coreCalculations(),a.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters());let l=this.core.xySettings(),c=a.dom.elGraphical.node;c.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(p=>{var u;return(u=p.parentNode)==null?void 0:u.removeChild(p)});let h=this.core.plotChartType(a.config.series,l),d=c.querySelector(".apexcharts-grid"),g=Array.isArray(h)?h:[h];d&&a.config.grid.position==="front"?g.forEach(p=>{let u=p&&p.node?p.node:p;u&&c.insertBefore(u,d)}):g.forEach(p=>{a.dom.elGraphical.add(p)});let f=new vt(a,this);f.bringForward(),a.config.dataLabels.background.enabled&&f.dataLabelsBackground(),M.isBrowser()&&a.config.tooltip.enabled&&!o.noData&&((i=a.globals.tooltip)==null||i.drawTooltip(l)),typeof a.config.chart.events.updated=="function"&&a.config.chart.events.updated(this,a),this.events.fireEvent("updated",[this,a]),o.isDirty=!0,e(this)}catch(a){s(a)}})}getSyncedCharts(){let t=this.getGroupedCharts(),e=[this];return t.length&&(e=[],t.forEach(s=>{e.push(s)})),e}getGroupedCharts(){return Apex._chartInstances.filter(t=>{if(t.group)return!0}).map(t=>this.w.config.chart.group===t.group?t.chart:this)}static getChartByID(t){let e=A.escapeString(t);if(!Apex._chartInstances)return;let s=Apex._chartInstances.filter(i=>i.id===e)[0];return s&&s.chart}static initOnLoad(){var t;let e=document.querySelectorAll("[data-apexcharts]");for(let s=0;s<e.length;s++){let i=e[s],a=JSON.parse((t=e[s].getAttribute("data-options"))!=null?t:"");new b(i,a).render()}}static exec(t,e,...s){let i=this.getChartByID(t);if(!i)return;i.w.globals.isExecCalled=!0;let a=null;return i.publicMethods.indexOf(e)!==-1&&(a=i[e](...s)),a}static merge(t,e){return A.extend(t,e)}static getThemePalettes(){return Bt()}static use(t){Oe(t)}static registerFeatures(t){mt.registerFeatures(t)}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),(i=a.annotations)==null||i.addXaxisAnnotationExternal(t,e,a)}addYaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addYaxisAnnotationExternal(t,e,a)}addPointAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addPointAnnotationExternal(t,e,a)}clearAnnotations(t=void 0){var e;let s=this;t&&(s=t),(e=s.annotations)==null||e.clearAnnotations(s)}removeAnnotation(t,e=void 0){var s;let i=this;e&&(i=e),(s=i.annotations)==null||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 gt(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new gt(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){let 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;(s=this.ctx.toolbar)==null||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}_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((t=this.w.globals.resizeTimer)!=null?t:void 0);let{redrawOnWindowResize:e}=this.w.config.chart;typeof e=="function"&&(e=e()),e&&this._windowResize()}};export{ht as __apex_Animations,Rt as __apex_Base,F as __apex_BrowserAPIs_BrowserAPIs,U as __apex_ChartFactory_getChartClass,Oe as __apex_ChartFactory_register,ot as __apex_Config,Le as __apex_Constants_LINE_HEIGHT_RATIO,Te as __apex_Constants_NICE_SCALE_ALLOWED_MAG_MSD,Pt as __apex_Constants_NICE_SCALE_DEFAULT_TICKS,Qt as __apex_Core,q as __apex_CoreUtils,ut as __apex_Crosshairs,Xt as __apex_DOMShim_SSRClassList,Nt as __apex_DOMShim_SSRDOMShim,bt as __apex_DOMShim_SSRElement,Ct as __apex_Data,vt as __apex_DataLabels,B as __apex_DateTime,rt as __apex_Defaults,M as __apex_Environment_Environment,zt as __apex_Events,wt as __apex_Fill,Z as __apex_Filters,at as __apex_Formatters,yt as __apex_Globals,L as __apex_Graphics,dt as __apex_Markers,J as __apex_Options,Ve as __apex_PathMorphing_arrayToPath,Ze as __apex_PathMorphing_morphPaths,ye as __apex_PathMorphing_parsePath,we as __apex_PathMorphing_pathBbox,ft as __apex_PerformanceCache,gt as __apex_Range,ss as __apex_Resize_addResizeListener,is as __apex_Resize_removeResizeListener,Wt as __apex_Responsive,ge as __apex_SVGAnimation_SVGAnimationRunner,Qe as __apex_SVGAnimation_installAnimationMethods,xt as __apex_SVGContainer,ts as __apex_SVGDraggable_installDraggable,$ as __apex_SVGElement,fe as __apex_SVGFilter_FilterBuilder,de as __apex_SVGFilter_SVGFilter,$e as __apex_SVGFilter_installFilterMethods,oe as __apex_SVGGradient_SVGGradient,ne as __apex_SVGPattern_SVGPattern,es as __apex_SVGSelectable_installSelectable,Ht as __apex_Scales,tt as __apex_Series,Gt as __apex_Theme,Bt as __apex_ThemePalettes_getThemePalettes,Kt as __apex_TimeScale,$t as __apex_TitleSubtitle,A as __apex_Utils,It as __apex_axes_Axes,Q as __apex_axes_AxesUtils,At as __apex_axes_Grid,lt as __apex_axes_XAxis,pt as __apex_axes_YAxis,Yt as __apex_charts_Scatter,St as __apex_dimensions_Dimensions,jt as __apex_dimensions_Grid,Vt as __apex_dimensions_Helpers,Ut as __apex_dimensions_XAxis,qt as __apex_dimensions_YAxis,Lt as __apex_helpers_Destroy,mt as __apex_helpers_InitCtxVariables,Ot as __apex_helpers_Localization,te as __apex_helpers_UpdateHelpers,be as __apex_index_Box,_t as __apex_index_SVG,be as __apex_math_Box,ct as __apex_math_Matrix,j as __apex_math_Point,H as __apex_math_SVGNS,ae as __apex_tooltip_AxesTooltip,ie as __apex_tooltip_Intersect,ee as __apex_tooltip_Labels,se as __apex_tooltip_Marker,Dt as __apex_tooltip_Position,re as __apex_tooltip_Tooltip,kt as __apex_tooltip_Utils,De as default};