vendor: 12,167 bytes, lines 1-4
1var ns=Object.defineProperty,ls=Object.defineProperties,cs=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,hs=Object.prototype.hasOwnProperty,ds=Object.prototype.propertyIsEnumerable,oe=(A,t,e)=>t in A?ns(A,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):A[t]=e,$=(A,t)=>{for(var e in t||(t={}))hs.call(t,e)&&oe(A,e,t[e]);if(ve)for(var e of ve(t))ds.call(t,e)&&oe(A,e,t[e]);return A},G=(A,t)=>ls(A,cs(t)),U=(A,t,e)=>oe(A,typeof t!="symbol"?t+"":t,e),fs=(A,t,e)=>new Promise((s,i)=>{var a=n=>{try{r(e.next(n))}catch(l){i(l)}},o=n=>{try{r(e.throw(n))}catch(l){i(l)}},r=n=>n.done?s(n.value):Promise.resolve(n.value).then(a,o);r((e=e.apply(A,t)).next())});/*! 2 * ApexCharts v5.16.0 3 * (c) 2018-2026 ApexCharts 4 */class W{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:{}}}class Vt{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new gs,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(t,e){this.attributes.set(t,e)}getAttribute(t){return this.attributes.get(t)}removeAttribute(t){this.attributes.delete(t)}hasAttribute(t){return this.attributes.has(t)}appendChild(t){if(t&&t!==this){if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){const e=this.children.indexOf(t);e!==-1&&this.children.splice(e,1)}t.parentNode=this,this.children.push(t)}return t}removeChild(t){const 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){const i=this.children.indexOf(t);i!==-1&&this.children.splice(i,1)}const s=this.children.indexOf(e);return s!==-1&&(t.parentNode=this,this.children.splice(s,0,t)),t}cloneNode(t=!1){const e=new Vt(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}/>`;const 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}}class gs{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(" ")}}class ps{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new Vt(e,t)}createTextNode(t){const 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){const s=new Vt("root");return s.innerHTML=t,{documentElement:s}}}}}let ot=null,mt=null,yt=null;class B{static init(){W.isSSR()&&!ot&&(ot=new ps)}static createElement(t){return W.isSSR()?(ot||this.init(),ot.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return W.isSSR()?(ot||this.init(),ot.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return W.isSSR()?(ot||this.init(),ot.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return W.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return W.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return W.isSSR()?{}:window.getComputedStyle(t)}static getBoundingClientRect(t){return W.isSSR()?(ot||this.init(),ot.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return W.isSSR()?(ot||this.init(),mt||(mt=ot.createXMLSerializer()),mt):(mt||(mt=new XMLSerializer),mt)}static getDOMParser(){return W.isSSR()?(ot||this.init(),yt||(yt=ot.createDOMParser()),yt):(yt||(yt=new DOMParser),yt)}static addWindowEventListener(t,e,s){W.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){W.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return W.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){W.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return t?W.isSSR()?t._ssrMode===!0||t.nodeName!==void 0:t.getRootNode?t.getRootNode({composed:!0})===document||t.isConnected:!1:!1}static getWindow(){return W.isBrowser()?window:null}static getDocument(){return W.isBrowser()?document:null}static _getShim(){return ot}static _resetShim(){ot=null,mt=null,yt=null}}let T=class ft{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 W.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){const s=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(i=>{this.isObject(e[i])?i in t?s[i]=this.extend(t[i],e[i]):Object.assign(s,{[i]:e[i]}):Object.assign(s,{[i]:e[i]})}),s}static extendArray(t,e){const s=[];return t.map(i=>{s.push(ft.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(const 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;const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;for(const 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;const e=t.getRootNode();return e&&e!==document&&ft.is("ShadowRoot",e)}static getShadowRootHost(t){return ft.isInShadowDOM(t)&&t.getRootNode().host||null}static getDimensions(t){if(!t)return[0,0];if(W.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e;try{e=getComputedStyle(t,null)}catch{return[t.clientWidth||0,t.clientHeight||0]}let s=t.clientWidth,i=t.clientHeight;if(!s||!i){const a=t.getBoundingClientRect();s=s||a.width,i=i||a.height}return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),s-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),[s,i]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(W.isSSR())return B.getBoundingClientRect(t);const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}static getLargestStringFromArr(t){return t.reduce((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");const 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 parseHex(t){if(typeof t!="string")return null;let e=t.trim().replace("#","");return e.length===3&&(e=e.split("").map(s=>s+s).join("")),/^[0-9a-fA-F]{6}$/.test(e)?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]:null}static relativeLuminance([t,e,s]){const i=a=>{const o=a/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)};return .2126*i(t)+.7152*i(e)+.0722*i(s)}static getContrastRatio(t,e){const s=ft.parseHex(t),i=ft.parseHex(e);if(!s||!i)return 0;const a=ft.relativeLuminance(s),o=ft.relativeLuminance(i),r=Math.max(a,o),n=Math.min(a,o);return(r+.05)/(n+.05)}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){const 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),n=parseInt(s[2],10);return"rgb("+(Math.round((i-o)*a)+o)+","+(Math.round((i-r)*a)+r)+","+(Math.round((i-n)*a)+n)+")"}shadeHexColor(t,e){const s=parseInt(e.slice(1),16),i=t<0?0:255,a=t<0?t*-1:t,o=s>>16,r=s>>8&255,n=s&255;return"#"+(16777216+(Math.round((i-o)*a)+o)*65536+(Math.round((i-r)*a)+r)*256+(Math.round((i-n)*a)+n)).toString(16).slice(1)}shadeColor(t,e){return ft.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;const e=t.trim();return e.startsWith("var(")&&e.endsWith(")")}static getThemeColor(t){if(!ft.isCSSVariable(t)||W.isSSR())return t;const 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){const s=Number(e);if(!Number.isFinite(s))return t;if(s<=0)return"transparent";if(s>=1)return t;const i=Math.round(s*100);return`color-mix(in srgb, ${t} ${i}%, transparent)`}static getPolygonPos(t,e){const s=[],i=Math.PI*2/e;for(let a=0;a<e;a++){const 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){const a=(i-90)*Math.PI/180;return{x:t+s*Math.cos(a),y:e+s*Math.sin(a)}}static escapeString(t,e="x"){let s=t.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,e),s}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,s){if(s>=t.length){let 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,""))}
4static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t.style.key=e[s])}static preciseAddition(t,e){const s=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(s,i));return(Math.round(t*a)+Math.round(e*a))/a}static isNumber(t){return!isNaN(t)&&parseFloat(String(Number(t)))===t&&!isNaN(parseInt(t,10))}static isFloat(t){return Number(t)===t&&t%1!==0}static isMsEdge(){if(W.isSSR())return!1;const 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;){const a=e;e=t%e,t=a}return t/i}static getPrimeFactors(t){const e=[];let s=2;for(;t>=2;)t%s==0?(e.push(s),t=t/s):s++;return e}static mod(t,e,s=7){const i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));return t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i),t%e/i}};class lt{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){const e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);let s=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s),s}parseDateWithTimezone(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(t,e){const s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...s.months],o=["�",...s.shortMonths],r=["�",...s.days],n=["�",...s.shortDays];function l(C,D=2){let S=C+"";for(;S.length<D;)S="0"+S;return S}const c=i?t.getUTCFullYear():t.getFullYear();e=e.replace(/(^|[^\\])yyyy+/g,"$1"+c),e=e.replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2)),e=e.replace(/(^|[^\\])y/g,"$1"+c);const 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"+l(h)),e=e.replace(/(^|[^\\])M/g,"$1"+h);const d=i?t.getUTCDate():t.getDate();e=e.replace(/(^|[^\\])dddd+/g,"$1"+r[0]),e=e.replace(/(^|[^\\])ddd/g,"$1"+n[0]),e=e.replace(/(^|[^\\])dd/g,"$1"+l(d)),e=e.replace(/(^|[^\\])d/g,"$1"+d);const f=i?t.getUTCHours():t.getHours();e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f)),e=e.replace(/(^|[^\\])H/g,"$1"+f);const p=f>12?f-12:f===0?12:f;e=e.replace(/(^|[^\\])hh+/g,"$1"+l(p)),e=e.replace(/(^|[^\\])h/g,"$1"+p);const g=i?t.getUTCMinutes():t.getMinutes();e=e.replace(/(^|[^\\])mm+/g,"$1"+l(g)),e=e.replace(/(^|[^\\])m/g,"$1"+g);const u=i?t.getUTCSeconds():t.getSeconds();e=e.replace(/(^|[^\\])ss+/g,"$1"+l(u)),e=e.replace(/(^|[^\\])s/g,"$1"+u);let x=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(x,3)),x=Math.round(x/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(x)),x=Math.round(x/10),e=e.replace(/(^|[^\\])f/g,"$1"+x);const b=f<12?"AM":"PM";e=e.replace(/(^|[^\\])TT+/g,"$1"+b),e=e.replace(/(^|[^\\])T/g,"$1"+b.charAt(0));const w=b.toLowerCase();e=e.replace(/(^|[^\\])tt+/g,"$1"+w),e=e.replace(/(^|[^\\])t/g,"$1"+w.charAt(0));let m=-t.getTimezoneOffset(),y=i||!m?"Z":m>0?"+":"-";if(!i){m=Math.abs(m);const C=Math.floor(m/60),D=m%60;y+=l(C)+":"+l(D)}e=e.replace(/(^|[^\\])K/g,"$1"+y);const v=(i?t.getUTCDay():t.getDay())+1;return e=e.replace(new RegExp(r[0],"g"),r[v]),e=e.replace(new RegExp(n[0],"g"),n[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){const 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);const 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:
4parseInt(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=T.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}getDateFields(t,e){const s=new Date(t);return e?{year:s.getUTCFullYear(),month:s.getUTCMonth(),date:s.getUTCDate(),hour:s.getUTCHours(),minute:s.getUTCMinutes(),second:s.getUTCSeconds(),ms:s.getUTCMilliseconds(),weekday:s.getUTCDay()}:{year:s.getFullYear(),month:s.getMonth(),date:s.getDate(),hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),ms:s.getMilliseconds(),weekday:s.getDay()}}addInterval(t,e,s,i){const a=new Date(t);if(i)switch(e){case"year":a.setUTCFullYear(a.getUTCFullYear()+s);break;case"month":a.setUTCMonth(a.getUTCMonth()+s);break;case"week":a.setUTCDate(a.getUTCDate()+s*7);break;case"day":a.setUTCDate(a.getUTCDate()+s);break;case"hour":a.setUTCHours(a.getUTCHours()+s);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+s);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+s);break}else switch(e){case"year":a.setFullYear(a.getFullYear()+s);break;case"month":a.setMonth(a.getMonth()+s);break;case"week":a.setDate(a.getDate()+s*7);break;case"day":a.setDate(a.getDate()+s);break;case"hour":a.setHours(a.getHours()+s);break;case"minute":a.setMinutes(a.getMinutes()+s);break;case"second":a.setSeconds(a.getSeconds()+s);break}return a.getTime()}ceilToBoundary(t,e,s,i){const a=new Date(t);if(i)switch(e){case"second":{const o=a.getUTCSeconds(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(r),a.getTime())}case"minute":{const o=a.getUTCMinutes(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(r),a.getTime())}case"hour":{const o=a.getUTCHours(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(r),a.getTime())}case"day":return a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(a.getUTCDate()+1),a.getTime());case"week":{const r=Date.UTC(1970,0,5);a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0);const n=a.getTime(),l=Math.ceil((n-r)/6048e5),c=Math.ceil(l/s)*s,h=r+c*6048e5;return h>=t?h:h+s*6048e5}case"month":{const o=a.getUTCMonth(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCDate()===1&&a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(1),a.setUTCMonth(r),a.getTime())}case"year":{const o=a.getUTCFullYear(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCMonth()===0&&a.getUTCDate()===1&&a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:Date.UTC(r,0,1)}}else switch(e){case"second":{const o=a.getSeconds(),r=Math.ceil(o/s)*s;return r===o&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(r),a.getTime())}case"minute":{const o=a.getMinutes(),r=Math.ceil(o/s)*s;return r===o&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(r),a.getTime())}case"hour":{const o=a.getHours(),r=Math.ceil(o/s)*s;return r===o&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(r),a.getTime())}case"day":return a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(a.getDate()+1),a.getTime());case"week":{const r=new Date(1970,0,5).getTime();a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0);const n=a.getTime(),l=Math.ceil((n-r)/6048e5),c=Math.ceil(l/s)*s,h=r+c*6048e5;return h>=t?h:h+s*6048e5}
4case"month":{const o=a.getMonth(),r=Math.ceil(o/s)*s;return r===o&&a.getDate()===1&&a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(1),a.setMonth(r),a.getTime())}case"year":{const o=a.getFullYear(),r=Math.ceil(o/s)*s;return r===o&&a.getMonth()===0&&a.getDate()===1&&a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:new Date(r,0,1).getTime()}}return t}isAtBoundary(t,e,s){const i=this.getDateFields(t,s);switch(e){case"year":return i.month===0&&i.date===1&&i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"month":return i.date===1&&i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"day":return i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"hour":return i.minute===0&&i.second===0&&i.ms===0;case"minute":return i.second===0&&i.ms===0;case"second":return i.ms===0}return!1}}class zt{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,s,i){const a=this.w;if(a.config.xaxis.type==="datetime"&&a.config.xaxis.labels.formatter===void 0&&a.config.tooltip.x.formatter===void 0){const o=new lt(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){const s=this.w;if(T.isNumber(t))if(s.globals.yValueDecimal!==0)t=t.toFixed(e.decimalsInFloat!==void 0?e.decimalsInFloat:s.globals.yValueDecimal);else{const i=t.toFixed(0);t=Number(i)===t?i:t.toFixed(1)}return t}setLabelFormatters(){const 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(T.isNumber(s)){if(!t.config.xaxis.convertedCatToNumeric&&t.config.xaxis.type==="numeric"){if(T.isNumber(t.config.xaxis.decimalsInFloat))return s.toFixed(t.config.xaxis.decimalsInFloat);{const i=t.globals.maxX-t.globals.minX;if(i>0){const a=i/10,o=Math.max(0,-Math.floor(Math.log10(a)));return s.toFixed(o)}return 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)=>{if(s.labels.formatter!==void 0)e.yLabelFormatters[i]=s.labels.formatter;else if(t.config.chart.type==="violin"){const a=o=>typeof o=="number"&&isFinite(o)?`${Math.round(o*100)/100}`:o;e.yLabelFormatters[i]=o=>t.globals.xyCharts?Array.isArray(o)?o.map(a):a(o):o}else 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(){const t=this.w;if(t.config.chart.type==="heatmap"){t.globals.yAxisScale[0].result=t.seriesData.seriesNames.slice();const 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}}}const Jt=({isTimeline:A,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a})=>{var o;let r=a.rangeData.seriesRangeStart[t][e],n=a.rangeData.seriesRangeEnd[t][e],l=a.labelData.labels[e],c=a.config.series[t].name?a.config.series[t].name:"";const h=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,f={w:a,seriesIndex:t,dataPointIndex:e,start:r,end:n};typeof d=="function"&&(c=d(c,f)),(o=a.config.series[t].data[e])!=null&&o.x&&(l=a.config.series[t].data[e].x),A||a.config.xaxis.type==="datetime"&&(l=new zt(a).xLabelFormat(a.formatters.ttKeyFormatter,l,l,{i:void 0,dateFormatter:new lt(a).formatDate,w:a})),typeof h=="function"&&(l=h(l,f)),Number.isFinite(s)&&Number.isFinite(i)&&(r=s,n=i);let p="",g="";const u=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type==="datetime"){const x=new lt(a);p=x.formatDate(x.getDate(r),a.config.tooltip.x.format),g=x.formatDate(x.getDate(n),a.config.tooltip.x.format)}else p=r,g=n;else p=a.config.tooltip.x.formatter(r),g=a.config.tooltip.x.formatter(n);return{start:r,end:n,startVal:p,endVal:g,ylabel:l,color:u,seriesName:c}},Qt=A=>{let{color:t,seriesName:e,ylabel:s,start:i,end:a,seriesIndex:o,dataPointIndex:r}=A;const n=A.w.globals.tooltip.tooltipLabels.getFormatters(o);i=n.yLbFormatter(i),a=n.yLbFormatter(a);const l=n.yLbFormatter(A.w.seriesData.series[o][r]);let c="";const h=`<span class="value start-value"> 5 ${i} 6 </span> <span class="separator">-</span> <span class="value end-value"> 7 ${a} 8 </span>`;return A.w.globals.comboCharts?A.w.config.series[o].type==="rangeArea"||A.w.config.series[o].type==="rangeBar"?c=h:c=`<span>${l}</span>`:c=h,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+t+'">'+(e||"")+'</span></div><div> <span class="category">'+s+": </span> "+c+" </div></div>"};
vendor: 9,918 bytes, lines 8-10
8class Yt{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();const 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 T.extend(t,e)}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){const s=e.w.config.series[e.seriesIndex].name;return 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(),G($({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}pyramid(){return this.funnel()}gauge(){const t=this.radialBar();return G($({},t),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:8}}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Open","High","","Low","Close"],"candlestick")},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getViolinTooltip(s,t,e)},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}rangeBar(){const t=s=>{const{color:i,seriesName:a,ylabel:o,startVal:r,endVal:n}=Jt(G($({},s),{isTimeline:!0}));return Qt(G($({},s),{color:i,seriesName:a,ylabel:o,start:r,end:n}))},e=s=>{const{color:i,seriesName:a,ylabel:o,start:r,end:n}=Jt(s);return Qt(G($({},s),{color:i,seriesName:a,ylabel:o,start:r,end:n}))};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}){const r=()=>{const n=o.rangeData.seriesRangeStart[i][a];return o.rangeData.seriesRangeEnd[i][a]-n};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(){const t=e=>{const{color:s,seriesName:i,ylabel:a,start:o,end:r}=Jt(e);return Qt(G($({},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){const e={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return T.extend(t,e)}stacked100(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;const 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(){const t=this.bar();return G($({},t),{plotOptions:G($({},t.plotOptions),{bar:G($({},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 T.isNumber(a)?Math.floor(a):a};const s=t.xaxis.labels.formatter;let i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(a=>Array.isArray(a)?a:String(a))),i&&i.length&&(t.xaxis.labels.formatter=function(a){return T.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}},stroke:{lineCap:"butt"},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(t,e,s,i,a){const o=t.candleData.seriesCandleO[e][s],r=t.candleData.seriesCandleH[e][s],n=t.candleData.seriesCandleM[e][s],l=t.candleData.seriesCandleL[e][s],c=t.candleData.seriesCandleC[e][s],h=t.config.series[e];return h.type&&h.type!==a?`<div class="apexcharts-custom-tooltip"> 9 ${h.name?h.name:"series-"+(e+1)}: <strong>${t.seriesData.series[e][s]}</strong> 10 </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">
10`+r+"</span></div>"+(n?`<div>${i[2]}: <span class="value">`+n+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+l+`</span></div><div>${i[4]}: <span class="value">`+c+"</span></div></div>"}_getViolinTooltip(t,e,s){var i,a,o;const r=(i=t.violinData.seriesViolinMin[e])==null?void 0:i[s],n=(a=t.violinData.seriesViolinMax[e])==null?void 0:a[s],l=((o=t.violinData.seriesViolinPoints[e])==null?void 0:o[s])||[],c=t.config.series[e].name||"series-"+(e+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${c}</div><div>Min: <span class="value">${r}</span></div><div>Max: <span class="value">${n}</span></div><div>Observations: <span class="value">${l.length}</span></div></div>`}}const us="en",xs={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"}},Oe={name:us,options:xs};class Ct{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:"",locales:[Oe],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},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"},points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,normalize:"individual",points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}}
10,heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:"arc",min:0,max:100,bands:[],bandsStyle:{strokeWidth:"40%",gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:"#666",placement:"outside"},minor:{count:4,length:5,width:1,color:"#999",placement:"outside"},labels:{show:!1,offset:6,fontSize:"11px",fontFamily:void 0,fontWeight:400,color:"#666",formatter(t){return String(t)}}},needle:{color:"#333",length:"85%",baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:"ease-out"}},hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",stroke:void 0,strokeWidth:1,strokeDasharray:void 0,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter(t){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,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(t){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],c
10olorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter(t){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",day:"dd MMM",hour:"HH:mm",minute:"HH:mm",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}}class Bt{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,o,r,n,l,c,h;let d=this.opts;const f=new Ct,p=new Yt(d);d=this.normalizeAliasedChartType(d),this.chartType=d.chart.type,d=this.extendYAxis(d),d=this.extendAnnotations(d);let g=f.init(),u={};if(d&&typeof d=="object"){let b={};const w=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"],m=d.chart.requestedType;m==="funnel"||m==="pyramid"?b=p[m]():m==="gauge"?b=p.gauge():w.indexOf(d.chart.type)!==-1?b=p[d.chart.type]():b=p.line(),(s=(e=d.plotOptions)==null?void 0:e.bar)!=null&&s.isFunnel&&(b=p.funnel()),d.chart.stacked&&d.chart.type==="bar"&&(b=p.stackedBars()),(i=d.chart.brush)!=null&&i.enabled&&(b=p.brush(b)),(o=(a=d.plotOptions)==null?void 0:a.line)!=null&&o.isSlopeChart&&(b=p.slope()),d.chart.stacked&&d.chart.stackType==="100%"&&(d=p.stacked100(d)),(n=(r=d.plotOptions)==null?void 0:r.bar)!=null&&n.isDumbbell&&(d=p.dumbbell(d)),this.checkForDarkTheme(W.getApex()),this.checkForDarkTheme(d),d.xaxis=d.xaxis||W.getApex().xaxis||{},t||(d.xaxis.convertedCatToNumeric=!1),d=this.checkForCatToNumericXAxis(this.chartType,b,d),((l=d.chart.sparkline)!=null&&l.enabled||(h=(c=W.getApex().chart)==null?void 0:c.sparkline)!=null&&h.enabled)&&(b=p.sparkline(b)),u=T.extend(g,b)}const x=T.extend(u,W.getApex());return g=T.extend(x,d),g=this.handleUserInputErrors(g),g}normalizeAliasedChartType(t){if(!t||!t.chart)return t;const e=t.chart.type;return e!=="funnel"&&e!=="pyramid"&&e!=="gauge"||(t.chart.requestedType=e,e==="funnel"||e==="pyramid"?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel=!0,t.plotOptions.bar.horizontal=!0,t.chart.type="bar",e==="pyramid"?t.plotOptions.bar.isPyramid=!0:t.plotOptions.bar.isPyramid=!1):e==="gauge"&&(t.chart.type="radialBar")),t}checkForCatToNumericXAxis(t,e,s){var i,a,o,r,n;const l=new Yt(s),c=(t==="bar"||t==="boxPlot"||t==="violin")&&((a=(i=s.plotOptions)==null?void 0:i.bar)==null?void 0:a.horizontal),h=t==="pie"||t==="polarArea"||t==="donut"||t==="radar"||t==="radialBar"||t==="heatmap",d=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",f=(t==="scatter"||t==="bubble")&&((n=(r=(o=s.plotOptions)==null?void 0:o.scatter)==null?void 0:r.jitter)==null?void 0:n.enabled),p=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return!c&&!h&&!f&&d&&p!=="between"&&(s=l.convertCatToNumeric(s)),s}extendYAxis(t,e){const s=new Ct;(typeof t.yaxis>"u"||!t.yaxis||Array.isArray(t.yaxis)&&t.yaxis.length===0)&&(t.yaxis={});const i=W.getApex();
vendor: 5,359 bytes, line 10
10t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=T.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[T.extend(s.yAxis,t.yaxis)]:t.yaxis=T.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,n)=>{if(r.name||(o[n].name=`series-${n+1}`),t.yaxis[n])return t.yaxis[n].seriesName=o[n].name,t.yaxis[n];{const l=T.extend(s.yAxis,t.yaxis[0]);return l.show=!1,l}})),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){const e=new Ct;return t.annotations.yaxis=T.extendArray(typeof t.annotations.yaxis<"u"?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new Ct;return t.annotations.xaxis=T.extendArray(typeof t.annotations.xaxis<"u"?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new Ct;return t.annotations.points=T.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){const e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(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}}const ze=1.618,He=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],re=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24];class We{initGlobalVars(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.dataWasParsed=!1,t.originalSeries=null,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0,t.disableZoomIn=!1,t.disableZoomOut=!1,t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.rotateXLabels=!1,t.overlappingXLabels=!1,t.radialSize=0,t.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.isDestroyed=!1,t.bulkRevealScheduled=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.lastDrawnDataLabelsIndexes=[],t.textRectsCache=new Map,t.domCache=new Map,t.dimensionCache={},t.cachedSelectors={},t.seriesNS||this._attachNamespaces(t)}_attachNamespaces(t){const e=(r,n,l=n)=>{Object.defineProperty(r,l,{get(){return t[n]},set(c){t[n]=c},enumerable:!0,configurable:!0})},s={};e(s,"series","data");for(const 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,
10configurable:!0});const i={};for(const 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});const a={};for(const 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});const o={};for(const 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:ze,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:He,niceScaleDefaultTicks:re,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(t){const e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=T.extend({},t),e.initialSeries=T.clone(t.series),e.lastXAxis=T.clone(e.initialConfig.xaxis),e.lastYAxis=T.clone(e.initialConfig.yaxis),e}}class bs{constructor(t){this.opts=t}init(){const t=new Bt(this.opts).init({responsiveOverride:!1}),e=new We().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:W.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:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinMin:[],seriesViolinMax:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvi
10ded:!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(const 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(const 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(const 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(const 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(const 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(const 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(const 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(const 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});for(const i of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,i,{get(){return s.violinData[i]},set(a){s.violinData[i]=a},enumerable:!1,configurable:!0});return s}}class et{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"||o.type==="violin")&&i++,typeof o.type<"u"&&o.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){const 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){if(t===null)return this.w.config.series.reduce((e,s)=>e+s,0);{const e=this.w.seriesData.series[t];return Array.isArray(e)?e.reduce((s,i)=>s+i,0):e??0}}getStackedSeriesTotalsByGroups(){const t=this.w,e=[];return t.labelData.seriesGroups.forEach(s=>{const i=[];t.config.series.forEach((o,r)=>{s.indexOf(t.seriesData.seriesNames[r])>-1&&i.push(r)});const a=t.seriesData.series.map((o,r)=>i.indexOf(r)===-1?r:-1).filter(o=>o!==-1);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){const t=this.w.globals,e=this.w.config;let s=[];const i=[],a=[],o=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(l=>Array.isArray(l.seriesName));
vendor: 4,505 bytes, line 10
10e.series.forEach((l,c)=>{a.push(c),i.push(null)}),e.yaxis.forEach((l,c)=>{s[c]=[]});const r=[];e.yaxis.forEach((l,c)=>{let h=!1;if(l.seriesName){let d=[];Array.isArray(l.seriesName)?d=l.seriesName:d.push(l.seriesName),d.forEach(f=>{e.series.forEach((p,g)=>{if(p.name===f){let u=g;c===g||o?!o||a.indexOf(g)>-1?s[c].push([c,g]):console.warn("Series '"+p.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[g].push([g,c]),u=c),h=!0,u=a.indexOf(u),u!==-1&&a.splice(u,1)}})})}h||r.push(c)}),s=s.map(l=>{const c=[];return l.forEach(h=>{i[h[1]]=h[0],c.push(h[1])}),c});let n=e.yaxis.length-1;for(let l=0;l<r.length&&(n=r[l],s[n]=[],a);l++){const c=a[0];a.shift(),s[n].push(c),i[c]=n}a.forEach(l=>{s[n].push(l),i[l]=n}),t.seriesYAxisMap=s.map(l=>l),t.seriesYAxisReverseMap=i.map(l=>l),t.seriesYAxisMap.forEach((l,c)=>{l.forEach(h=>{if(e.series[h]&&e.series[h].group===void 0){const d=e.series[h];d.group="apexcharts-axis-".concat(c.toString())}})})}isSeriesNull(t=null){let e=[];const s=this.w.config.series;return t===null?e=s.filter(i=>i!==null):s[t]&&Array.isArray(s[t].data)?e=s[t].data.filter(i=>i!==null):e=s[t]!==null&&s[t]!==void 0?[s[t]]:[],e.length===0}seriesHaveSameValues(t){const e=this.w.seriesData.series[t];return Array.isArray(e)?e.every((s,i,a)=>s===a[0]):!0}getCategoryLabels(t){const e=this.w;let s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(i=>e.config.xaxis.labels.formatter(i-e.globals.minX+1))),s}getLargestSeries(){const 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(){const t=this.w;let 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(){const 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){const s=this.w;return s.seriesData.series.map((a,o)=>{let r=0;for(let n=0;n<a.length;n++)s.seriesData.seriesX[o][n]>t&&s.seriesData.seriesX[o][n]<e&&(r+=a[n]);return r})}getPercentSeries(){const t=this.w;t.globals.seriesPercent=t.seriesData.series.map(e=>{const s=[];if(Array.isArray(e))for(let i=0;i<e.length;i++){const a=t.seriesData.stackedSeriesTotals[i];let o=0;a&&(o=100*e[i]/a),s.push(o)}else{const i=t.globals.seriesTotals.reduce((o,r)=>o+r,0),a=100*e/i;s.push(a)}return s})}getCalculatedRatios(){const t=this.w,e=t.globals,s=[];let i=0,a=0,o=0,r=0,n=[],l=.1,c=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])),n.push(0);else e.yRange.push(Math.abs(e.minY-e.maxY));e.xRange=Math.abs(e.maxX-e.minX),e.zRange=Math.abs(e.maxZ-e.minZ);for(let 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){const h=e;h.hasNegs=!0}if(t.globals.seriesYAxisReverseMap.length>0){const h=(d,f)=>{const p=t.config.yaxis[t.globals.seriesYAxisReverseMap[f]],g=d<0?-1:1;return d=Math.abs(d),p.logarithmic&&(d=this.getBaseLog(p.logBase,d)),-g*d/s[f]};if(e.isMultipleYAxis){n=[];for(let d=0;d<s.length;d++)n.push(h(e.minYArr[d],d))}else n=[],n.push(h(e.minY,0)),e.minY!==Number.MIN_VALUE&&Math.abs(e.minY)!==0&&(l=-e.minY/i,c=e.minX/a)}else n=[],n.push(0),l=0,c=0;return{yRatio:s,invertedYRatio:i,zRatio:r,xRatio:a,invertedXRatio:o,baseLineInvertedY:l,baseLineY:n,baseLineX:c}}getLogSeries(t){const e=this.w;return e.globals.seriesLog=t.map((s,i)=>{const 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;const s=this.w,i=s.globals.seriesYAxisReverseMap[e];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,s){if(e<=0)return 0;
10const 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){const e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((a,o)=>{const r=e.globals.seriesYAxisReverseMap[o];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let n=-Number.MAX_VALUE,l=Number.MIN_VALUE,c=1;return s.seriesLog.forEach((h,d)=>{h.forEach(f=>{e.config.yaxis[d]&&e.config.yaxis[d].logarithmic&&(n=Math.max(f,n),l=Math.min(f,l))})}),c=Math.pow(s.yRange[o],Math.abs(l-n)/s.yRange[o]),i.yLogRatio[o]=c/this.w.layout.gridHeight,c}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return e!=null&&e.yaxis&&(e=t.extendYAxis(e,s)),e!=null&&e.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(i=e==null?void 0:e.annotations)!=null&&i.xaxis&&(e=t.extendXAxisAnnotations(e)),(a=e==null?void 0:e.annotations)!=null&&a.points&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,s,i){const a=this.w,o=[];return t.series.length>0&&e.forEach(r=>{const n=[],l=[];t.i.forEach((c,h)=>{a.config.series[c].group===r&&(n.push(t.series[h]),l.push(c))}),n.length>0&&o.push(i.draw(n,s,l))}),o}}const te="http://www.w3.org/2000/svg";function Ae(A){return 1-Math.pow(1-A,3)}function ms(A){return 1+2.70158*Math.pow(A-1,3)+1.70158*Math.pow(A-1,2)}let ee=null;function $e(){if(!W.isBrowser())return!1;try{return ee||(ee=window.matchMedia("(prefers-reduced-motion: reduce)")),!!ee.matches}catch{return!1}}function pt(A,t,e){if(!W.isBrowser()||e.globals.dataChanged||e.globals.resized)return!1;const s=e.config.chart.animations;if(!s||s.enabled===!1)return!1;const i=e.config.chart.type;if(i!=="line"&&i!=="area"&&i!=="rangeArea"||!(e.layout.gridWidth>0))return!1;const a=(s.speed||800)*2,o=Math.max(0,Math.min(1,t/e.layout.gridWidth)),n=(1-Math.cbrt(1-o))*a,c=A.node.style;c.opacity="0";let h=null;const d=f=>{h===null&&(h=f),f-h>=n?c.opacity="":B.requestAnimationFrame(d)};return B.requestAnimationFrame(d),!0}function ys(A){const t=A.config.chart.animations;t&&t.respectReducedMotion!==!1&&$e()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1))}function be(A){const t=A.style,e=A.index||0,s=typeof A.baseDelay=="number"?A.baseDelay:40,i=A.row||0,a=A.col||0,o=A.groupIndex||0,r=A.perGroup||1,n=A.centerDistance||0;switch(t){case"none":return 0;case"diagonal":return(i+a)*s;case"group":return o*s+e%r*(s/4);case"centroid":return n*s*(e+1);case"sequential":default:return e*s}}class Tt{constructor(t,e){this.w=t,this.ctx=e}animateLine(t,e,s,i){t.attr(e).animate(i).attr(s)}animateMarker(t,e,s,i){t.attr({opacity:0}).animate(e).attr({opacity:1}).after(()=>{i()})}animatePop(t,{speed:e,delay:s=0,onComplete:i}){const a=this.w;if(!W.isBrowser()||!a.globals.shouldAnimate||e<1){i&&i();return}const r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";const n=performance.now()+s,l=c=>{const h=Math.max(0,Math.min(1,(c-n)/e));r.transform=`scale(${ms(h)})`,r.opacity=String(Math.min(1,h*2)),h<1?B.requestAnimationFrame(l):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",i&&i())};B.requestAnimationFrame(l)}animateRect(t,e,s,i,a,o=0){t.attr(e).animate(i,o).attr(s).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:s,j:i,fill:a,pathFrom:o,pathTo:r,speed:n,delay:l}=t,c=this,h=this.w;let 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),c.morphSVG(e,s,i,h.config.chart.type==="line"&&!h.globals.comboCharts?"stroke":a,o,r,n,l*d)}revealBulk(t){const e=this.w;if(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node}),!W.isBrowser()||!e.globals.shouldAnimate){this.animationCompleted(t);return}e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,B.requestAnimationFrame(()=>{e.globals.isDestroyed||(e.globals.bulkRevealScheduled=!1,this.animationCompleted(t))}))}
10showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{const e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(t){const e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),typeof e.config.chart.events.animationEnd=="function"&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}animateDraw(t,{realIndex:e,j:s,isFill:i,isLast:a,speed:o,delay:r,mask:n}){const l=this.w,c=this,h=()=>{a&&l.globals.shouldAnimate&&c.animationCompleted(t),c.showDelayedElements()};if(!W.isBrowser()||!l.globals.shouldAnimate||o<1){h();return}const d=t.node,f=()=>{const u=n&&n.type==="radial",x=l.layout.gridWidth+8,b=n&&n.cx||0,w=n&&n.cy||0,m=(n&&n.r||l.layout.gridWidth/2)+4,y=`apexDrawMask${l.globals.cuid}-${e}-${s??0}-${i?"f":"s"}`,v=B.createElementNS(te,"mask");v.setAttribute("id",y),v.setAttribute("maskUnits","userSpaceOnUse");let C;if(u){const k=m;v.setAttribute("x",String(b-k)),v.setAttribute("y",String(w-k)),v.setAttribute("width",String(k*2)),v.setAttribute("height",String(k*2)),C=B.createElementNS(te,"circle"),C.setAttribute("cx",String(b)),C.setAttribute("cy",String(w)),C.setAttribute("r","0"),C.setAttribute("fill","#fff")}else v.setAttribute("x",String(-4)),v.setAttribute("y",String(-4)),v.setAttribute("width",String(x)),v.setAttribute("height",String(l.layout.gridHeight+8)),C=B.createElementNS(te,"rect"),C.setAttribute("x",String(-4)),C.setAttribute("y",String(-4)),C.setAttribute("width","0"),C.setAttribute("height",String(l.layout.gridHeight+8)),C.setAttribute("fill","#fff");v.appendChild(C),l.dom.elDefs.node.appendChild(v),d.setAttribute("mask",`url(#${y})`);const D=performance.now()+(r||0),S=k=>{if(l.globals.isDestroyed)return;const M=Math.max(0,Math.min(1,(k-D)/o)),L=Ae(M);u?C.setAttribute("r",String(L*m)):C.setAttribute("width",String(L*x)),M<1?B.requestAnimationFrame(S):(d.removeAttribute("mask"),v.parentNode&&v.parentNode.removeChild(v),h())};B.requestAnimationFrame(S)},p=g=>{d.setAttribute("stroke-dasharray",String(g)),d.setAttribute("stroke-dashoffset",String(g));const u=performance.now()+(r||0),x=b=>{if(l.globals.isDestroyed)return;const w=Math.max(0,Math.min(1,(b-u)/o));d.setAttribute("stroke-dashoffset",String(g*(1-Ae(w)))),w<1?B.requestAnimationFrame(x):(d.removeAttribute("stroke-dasharray"),d.removeAttribute("stroke-dashoffset"),h())};B.requestAnimationFrame(x)};B.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(i){f();return}const g=d.getAttribute("stroke-dasharray");if(!!g&&g!=="0"&&g!==""){f();return}let x=0;try{typeof d.getTotalLength=="function"&&(x=d.getTotalLength())}catch{x=0}if(!x){h();return}p(x)})}morphSVG(t,e,s,i,a,o,r,n){var l,c;const h=this.w;a||(a=t.attr("pathFrom")),o||(o=t.attr("pathTo"));const d=()=>(h.config.chart.type==="radar"&&(r=1),`M 0 ${h.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=d()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=d()),h.globals.shouldAnimate||(r=1);const p=((c=(l=this.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.isActive())===!0?"polygons":"commands";t.plot(a).animate(1,n).plot(a).animate(r,n).plot(o,p).after(()=>{T.isNumber(s)?s===h.seriesData.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&this.animationCompleted(t):i!=="none"&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.seriesData.series.length-1||h.globals.comboCharts)&&this.animationCompleted(t),this.showDelayedElements()})}}class at{constructor(t){this.w=t}getDefaultFilter(t,e){const s=this.w;t.unfilter&&t.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(t,s.config.chart.dropShadow,e)}applyFilter(t,e,s){var i,a,o;const r=this.w;if(t.unfilter&&t.unfilter(!0),s==="none"){this.getDefaultFilter(t,e);return}const n=r.config.chart.dropShadow,l=s==="lighten"?2:.3;t.filterWith&&(t.filterWith(c=>{c.colorMatrix({type:"matrix",values:` 11 ${l} 0 0 0 0 12 0 ${l} 0 0 0 13 0 0 ${l} 0 0 14 0 0 0 1 0 15 `,in:"SourceGraphic",result:"brightness"}
15),n.enabled&&this.addShadow(c,e,n,"brightness")}),n.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;const o=this.w;let{blur:r,top:n,left:l,color:c,opacity:h}=s;if(c=Array.isArray(c)?c[e]:c,((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:l,dy:n,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:r,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":h,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}dropShadow(t,e,s=0){var i,a,o,r,n;const l=this.w;return t.unfilter&&t.unfilter(!0),T.isMsEdge()&&l.config.chart.type==="radialBar"||((i=l.config.chart.dropShadow.enabledOnSeries)==null?void 0:i.length)>0&&((a=l.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.indexOf(s))===-1||t.filterWith&&(t.filterWith(c=>{this.addShadow(c,s,e,"SourceGraphic")}),e.noUserSpaceOnUse||(r=(o=t.filterer())==null?void 0:o.node)==null||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((n=t.filterer())==null?void 0:n.node)),t}setSelectionFilter(t,e,s){const i=this.w;if(typeof i.interact.selectedDataPoints[e]<"u"&&i.interact.selectedDataPoints[e].indexOf(s)>-1){t.node.setAttribute("selected",!0);const a=i.config.states.active.filter;a!=="none"&&this.applyFilter(t,e,a.type)}}_scaleFilterSize(t){if(!t)return;(s=>{for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&t.setAttribute(i,s[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}class R{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){t.indexOf("NaN")>-1&&(t="");function s(S,k,M){var L=k.x-S.x,P=k.y-S.y,E=Math.sqrt(L*L+P*P);return i(S,k,Math.min(1,M/E))}function i(S,k,M){return{x:S.x+(k.x-S.x)*M,y:S.y+(k.y-S.y)*M}}function a(S,k){S.length>2&&(S[S.length-2]=k.x,S[S.length-1]=k.y)}function o(S){return{x:parseFloat(S[S.length-2]),y:parseFloat(S[S.length-1])}}var r=t.split(/[,\s]/).reduce(function(S,k){var M=k.match(/^([a-zA-Z])(.+)/);return M?(S.push(M[1]),S.push(M[2])):S.push(k),S},[]),n=r.reduce(function(S,k){return parseFloat(k)==k&&S.length?S[S.length-1].push(k):S.push([k]),S},[]),l=[];if(n.length>1){var c=o(n[0]),h=null;n[n.length-1][0]=="Z"&&n[0].length>2&&(h=["L",c.x,c.y],n[n.length-1]=h),l.push(n[0]);for(var d=1;d<n.length;d++){var f=l[l.length-1],p=n[d],g=p==h?n[1]:n[d+1];if(g&&f&&f.length>2&&p[0]=="L"&&g.length>2&&g[0]=="L"){var u=o(f),x=o(p),b=o(g),w,m;w=s(x,u,e),m=s(x,b,e),a(p,w),p.origPoint=x,l.push(p);var y=i(w,x,.5),v=i(x,m,.5),C=["C",y.x,y.y,v.x,v.y,m.x,m.y];C.origPoint=x,l.push(C)}else l.push(p)}if(h){var D=o(l[l.length-1]);l.push(["Z"]),a(l[0],D)}}else l=n;return l.reduce(function(S,k){return S+k.join(" ")+" "},"")}drawLine(t,e,s,i,a="#a8a8a8",o=0,r=null,n="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":n})}drawRect(t=0,e=0,s=0,i=0,a=0,o="#fefefe",r=1,n=null,l=null,c=0){const 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":n!==null?n:0,stroke:l!==null?l:"none","stroke-dasharray":c}),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){const s=this.w;t<0&&(t=0);const 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:n=null,strokeDashArray:l=0}){const c=this.w;return n===null&&(n=c.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${c.layout.gridHeight}`),c.dom.Paper.path(t).attr({fill:i,"fill-opacity":a,stroke:e,"stroke-opacity":o,"stroke-linecap":n,"stroke-width":s,"stroke-dasharray":l,class:r})}group(t=null){const 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,n=!1){let l="A";return n&&(l="a"),[l,t,e,s,i,a,o,r].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,stroke:a,strokeWidth:o,strokeLinecap:r,fill:n,animationDelay:l,initialSpeed:c,dataChangeSpeed:h,className:d,chartType:f,shouldClipToGrid:p=!0,bindEventsOnPaths:g=!0,drawShadow:u=!0,drawMask:x=null}){var b,w;const m=this.w,y=new at(this.w),v=new Tt(this.w,(b=this.ctx)!=null?b:void 0),C=this.w.config.chart.animations.enabled,D=C&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0 ")&&i){const I=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);I&&(s=s.replace(/^M\s+0\s+0/,I[0]))}let S;const k=!!(C&&!m.globals.resized||D&&m.globals.dataChanged&&m.globals.shouldAnimate),M=typeof d=="str
15ing"&&(d.indexOf("apexcharts-line")>-1||d.indexOf("apexcharts-area")>-1||d.indexOf("apexcharts-rangeArea")>-1||d.indexOf("apexcharts-radar")>-1),L=!!(C&&!m.globals.resized&&!m.globals.dataChanged&&M),P=(w=m.config.chart.animations.largeDatasetThreshold)!=null?w:0,E=!!(k&&!L&&P>0&&m.globals.dataPoints>P),X=!!((f==="candlestick"||f==="boxPlot")&&k&&!L&&m.globals.dataChanged),F=E||X;k&&!L&&!F?S=s:(S=i,k||(m.globals.animationEnded=!0));const z=m.config.stroke.dashArray;let O=0;Array.isArray(z)?O=z[e]:O=m.config.stroke.dashArray;const N=this.drawPath({d:S,stroke:a,strokeWidth:o,fill:n,fillOpacity:1,classes:d,strokeLinecap:r,strokeDashArray:O});N.attr("index",e),p&&(f==="bar"&&!m.globals.isBarHorizontal||m.globals.comboCharts?N.attr({"clip-path":`url(#gridRectBarMask${m.globals.cuid})`}):N.attr({"clip-path":`url(#gridRectMask${m.globals.cuid})`})),m.config.chart.dropShadow.enabled&&u&&y.dropShadow(N,m.config.chart.dropShadow,e),g&&(N.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,N)),N.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,N)),N.node.addEventListener("mousedown",this.pathMouseDown.bind(this,N))),N.attr({pathTo:i,pathFrom:s});const H={el:N,j:t,realIndex:e,pathFrom:s,pathTo:i,fill:n,strokeWidth:o,delay:l};if(C&&!m.globals.resized&&!m.globals.dataChanged)if(L){const I=c*2,Y=a==="none"||o===0,V=m.seriesData.series.length,q=m.globals.comboCharts?!0:e===V-1;v.animateDraw(N,{realIndex:e,j:t,isFill:Y,isLast:q,speed:I,delay:0,mask:x})}else F||v.animatePathsGradually(G($({},H),{speed:c}));else(m.globals.resized||!m.globals.dataChanged)&&!F&&v.showDelayedElements();return m.globals.dataChanged&&D&&k&&!F&&v.animatePathsGradually(G($({},H),{speed:h})),F&&v.revealBulk(N),N}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,n=>
15{t==="horizontalLines"?n.line(0,0,s,0).stroke({color:i,width:a+1}):t==="verticalLines"?n.line(0,0,0,e).stroke({color:i,width:a+1}):t==="slantedLines"?n.line(0,0,e,s).stroke({color:i,width:a}):t==="squares"?n.rect(e,s).fill("none").stroke({color:i,width:a}):t==="circles"&&n.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,o=null,r=null,n=[],l=0){const c=this.w;let h;e.length<9&&e.indexOf("#")===0&&(e=T.hexToRgba(e,i)),s.length<9&&s.indexOf("#")===0&&(s=T.hexToRgba(s,a));let d=0,f=1,p=1,g=null;r!==null&&(d=typeof r[0]<"u"?r[0]/100:0,f=typeof r[1]<"u"?r[1]/100:1,p=typeof r[2]<"u"?r[2]/100:1,g=typeof r[3]<"u"?r[3]/100:null);const u=c.config.chart.type==="donut"||c.config.chart.type==="pie"||c.config.chart.type==="polarArea"||c.config.chart.type==="bubble";if(!n||n.length===0?h=c.dom.Paper.gradient(u?"radial":"linear",x=>{x.stop(d,e,i),x.stop(f,s,a),x.stop(p,s,a),g!==null&&x.stop(g,e,i)}):h=c.dom.Paper.gradient(u?"radial":"linear",x=>{(Array.isArray(n[l])?n[l]:n).forEach(w=>{x.stop(w.offset/100,w.color,w.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{const x=c.layout.gridWidth/2,b=c.layout.gridHeight/2;c.config.chart.type!=="bubble"?h.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,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}){const 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:n,opacity:l,maxWidth:c,cssClass:h="",isPlainText:d=!0,dominantBaseline:f="auto"}){const p=this.w;typeof s>"u"&&(s="");let g=s;i||(i="start"),(!n||!n.length)&&(n=p.config.chart.foreColor),o=o||p.config.chart.fontFamily,a=a||"11px",r=r||"regular";const u={maxWidth:c,fontSize:a,fontFamily:o};let x;return Array.isArray(s)?x=p.dom.Paper.text(b=>{for(let w=0;w<s.length;w++)g=s[w],c&&(g=this.getTextBasedOnMaxWidth($({text:s[w]},u))),w===0?b.tspan(g):b.tspan(g).newLine()}):(c&&(g=this.getTextBasedOnMaxWidth($({text:s},u))),x=d?p.dom.Paper.plain(s):p.dom.Paper.text(b=>b.tspan(g))),x.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":f,"font-size":a,"font-family":o,"font-weight":r,fill:n,class:"apexcharts-text "+h}),x.node.style.fontFamily=o,x.node.style.opacity=l,x}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);const r=Math.PI/o;for(let n=0;n<=2*o;n++){const l=n*r,c=n%2===0?i:i/2,h=t+c*Math.sin(l),d=e-c*Math.cos(l);a+=(n===0?"M":"L")+h+","+d}a+="Z";break}case"triangle":a=`M ${t} ${e-i} 16 L ${t+i} ${e+i} 17 L ${t-i} ${e+i} 18 Z`;break;case"square":case"rect":i=i/1.125,a=`M ${t-i} ${e-i} 19 L ${t+i} ${e-i} 20 L ${t+i} ${e+i} 21 L ${t-i} ${e+i} 22 Z`;break;case"diamond":i=i*1.05,a=`M ${t} ${e-i} 23 L ${t+i} ${e} 24 L ${t} ${e+i} 25 L ${t-i} ${e} 26 Z`;break;case"line":i=i/1.1,a=`M ${t-i} ${e} 27 L ${t+i} ${e}`;break;case"circle":default:i=i*2,a=`M ${t}, ${e} 28 m -${i/2}, 0 29 a ${i/2},${i/2} 0 1,0 ${i},0 30 a ${i/2},${i/2} 0 1,0 -${i},0`;break}return a}drawMarkerShape(t,e,s,i,a){const 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 T.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,s==null?void 0:s.shape,i,$($({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;const a=this.w,o=new at(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),n=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(!(isNaN(r)||isNaN(n))&&(typeof a.config.chart.events.dataPointMouseEnter=="function"&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),R._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&a.config.states.hover.f
30ilter.type!=="none"&&!a.interact.isTouchDevice)){const l=a.config.states.hover.filter;o.applyFilter(t,r,l.type)}}pathMouseLeave(t,e){var s,i;const a=this.w,o=new at(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),n=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);isNaN(r)||isNaN(n)||(typeof a.config.chart.events.dataPointMouseLeave=="function"&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),R._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,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;const a=this.w,o=new at(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),n=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(isNaN(r)||isNaN(n))return;let l="false";if(t.node.getAttribute("selected")==="true"){t.node.setAttribute("selected","false");const c=a.interact.selectedDataPoints[r].indexOf(n);c>-1&&a.interact.selectedDataPoints[r].splice(c,1)}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0){a.interact.selectedDataPoints=[];const c=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=f=>{Array.prototype.forEach.call(f,p=>{p.node.setAttribute("selected","false"),o.getDefaultFilter(p,r)})};d(c),d(h)}t.node.setAttribute("selected","true"),l="true",typeof a.interact.selectedDataPoints[r]>"u"&&(a.interact.selectedDataPoints[r]=[]),a.interact.selectedDataPoints[r].push(n)}if(l==="true"){const c=a.config.states.active.filter;if(c!=="none")o.applyFilter(t,r,c.type);else if(a.config.states.hover.filter!=="none"&&!a.interact.isTouchDevice){const 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){const c=a.config.states.hover.filter;o.applyFilter(t,r,c.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:n,w:a}),e&&R._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:a}])}rotateAroundCenter(t){let e={};t&&typeof t.getBBox=="function"&&(e=t.getBBox());const 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=>{const a=R._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?R._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",i=>{const a=R._findDelegateTarget(i.target,t.node,e);a&&a.instance&&this.pathMouseDown(a.instance,i)})}static _fireEvent(t,e,s){const i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;const a=i[e];for(let 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(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])}getTextRects(t,e,s,i,a=!0){const o=this.w,r=[t,e,s,i,a].join("\0"),n=o.globals.textRectsCache;if(n&&n.has(r))return n.get(r);const l=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,foreColor:"#fff",opacity:0});i&&l.attr("transform",i),o.dom.Paper.add(l);let c=l.bbox();const h=c.y;a||(c=l.node.getBoundingClientRect()),l.remove();const d={width:c.width,height:c.height,centerOffset:a?h+c.height/2- -200:0};return n&&n.set(r,d),d}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="."}}}const Z="http://www.w3.org/2000/svg";class ht{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 ht(this.x,this.y)}}class St{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){const e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new St(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new St(t,0,0,e??t,0,0))}multiply(t){return new St(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)}
30apply(t){return new ht(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class ws{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}}class nt{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){const e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),o=i>a?i:a,r=t.image;let n=0,l=0;typeof t.width>"u"&&typeof t.height>"u"?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(n=s.fill.image.width+1,l=s.fill.image.height):(n=o+1,l=o):(n=t.width,l=t.height);const c=B.createElementNS(Z,"pattern");R.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:l+"px"});const h=B.createElementNS(Z,"image");c.appendChild(h);const d=W.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(d.xlink,"href",r),R.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:l+"px"}),h.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(c)}getSeriesIndex(t){const e=this.w,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){const s=this.w;let i=null,a=null;for(const l of t)l>=e.threshold?(i===null||l>i)&&(i=l):(a===null||l<a)&&(a=l);i===null&&(i=e.threshold),a===null&&(a=e.threshold);let o=i-e.threshold+(e.threshold-a);o===0&&(o=1);let n=100-(e.threshold-a)/o*100;return n=Math.max(0,Math.min(n,100)),[{offset:n,color:e.colorAboveThreshold,opacity:s.config.fill.opacity},{offset:0,color:e.colorBelowThreshold,opacity:s.config.fill.opacity}]}fillPath(t){var e,s,i,a;const o=this.w;this.opts=t;const r=this.w.config;let n,l,c;this.seriesIndex=this.getSeriesIndex(t);const h=r.plotOptions.line.colors.colorAboveThreshold&&r.plotOptions.line.colors.colorBelowThreshold;let f=this.getFillColors()[this.seriesIndex];o.seriesData.seriesColors[this.seriesIndex]!==void 0&&(f=o.seriesData.seriesColors[this.seriesIndex]),typeof f=="function"&&(f=f({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:o}));const p=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let g=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;const u=p==="gradient"||h;t.color&&(f=t.color);const x=o.config.series[this.seriesIndex];(s=(e=x==null?void 0:x.data)==null?void 0:e[t.dataPointIndex])!=null&&s.fillColor&&(f=(a=(i=x==null?void 0:x.data)==null?void 0:i[t.dataPointIndex])==null?void 0:a.fillColor),f||(f="#fff",console.warn("undefined color - ApexCharts")),t.opacity!==void 0&&t.opacity!==null&&(g=t.opacity);let b=f;T.isCSSVariable(f)?b=T.applyOpacityToColor(f,g):f.indexOf("rgb")===-1?f.indexOf("#")===-1?b=f:f.length<9&&(b=T.hexToRgba(f,g)):f.indexOf("rgba")>-1?g=T.getOpacityFromRGBA(f):b=T.hexToRgba(T.rgb2hex(f),g);const w=T.isCSSVariable(f)?T.getThemeColor(f):f;if(p==="pattern"&&(l=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:l,fillColor:w,defaultColor:b})),u){const m=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[];let y=r.fill.gradient.type;h&&(m[this.seriesIndex]=this.computeColorStops(o.seriesData.series[this.seriesIndex],r.plotOptions.line.colors),y="vertical"),c=this.handleGradientFill({type:y,fillConfig:t.fillConfig,fillColor:w,fillOpacity:g,colorStops:m,i:this.seriesIndex})}if(p==="image"){const m=r.fill.image.src,y=t.patternID?t.patternID:"",v=`pattern${o.globals.cuid}${t.seriesNumber+1}${y}`;this.patternIDs.indexOf(v)===-1&&(this.clippedImgArea({opacity:g,image:Array.isArray(m)?t.seriesNumber<m.length?m[t.seriesNumber]:m[0]:m,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:v}),this.patternIDs.push(v)),n=`url(#${v})`}else u?n=c:p==="pattern"?n=l:n=b;return t.solid&&(n=b),n}getFillType(t){const e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}getFillColors(){const t=this.w,e=t.config,s=this.opts;let i=[];return t.globals.comboCharts?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);const o=this.opts,r=new R(this.w),n=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=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,l,n):e=i:e=r.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,n),e}handleGradientFill({type:t,fillColor:e,fillOpacity:s,fillConfig:i,colorStops:a,i:o}){let r=this.w.config.fill;i&&(r=$($({},r),i));const n=this.opts,l=new R(this.w),c=new T;t=t||r.gradient.type;let h=e,d,f=r.gradient.opacityFrom===void 0?s:Array.isArray(r.gradient.opacityFrom)?r.gradient.opacityFrom[o]:r.gradient.opacityFrom;h.indexOf("rgba")>-1&&(f=T.getOpacityFromRGBA(h));let p=r.gradient.opacityTo===void 0?s:Array.isArray(r.gradient.opacityTo)?r.gradient.opacityTo[o]:r.gradient.opacityTo;
30if(r.gradient.gradientToColors===void 0||r.gradient.gradientToColors.length===0)r.gradient.shade==="dark"?d=c.shadeColor(parseFloat(r.gradient.shadeIntensity)*-1,e.indexOf("rgb")>-1?T.rgb2hex(e):e):d=c.shadeColor(parseFloat(r.gradient.shadeIntensity),e.indexOf("rgb")>-1?T.rgb2hex(e):e);else if(r.gradient.gradientToColors[n.seriesNumber]){const g=r.gradient.gradientToColors[n.seriesNumber];d=g,g.indexOf("rgba")>-1&&(p=T.getOpacityFromRGBA(g))}else d=e;if(r.gradient.gradientFrom&&(h=r.gradient.gradientFrom),r.gradient.gradientTo&&(d=r.gradient.gradientTo),r.gradient.inverseColors){const g=h;h=d,d=g}return h.indexOf("rgb")>-1&&(h=T.rgb2hex(h)),d.indexOf("rgb")>-1&&(d=T.rgb2hex(d)),l.drawGradient(t,h,d,f,p,n.size,r.gradient.stops,a,o)}}class Pt{constructor(t,e){this.w=t,this.ctx=e,this._filters=new at(this.w),this._graphics=new R(this.w,this.ctx)}setGlobalMarkerSize(){const t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.seriesData.series.length+1)for(let e=0;e<=t.seriesData.series.length;e++)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}){const r=this.w,n=e,l=t;let c=null;const h=new R(this.w),d=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(let f=0;f<l.x.length;f++){let p,g=s,u=!T.isNumber(l.y[f]);r.globals.markers.largestSize===0&&r.globals.hasNullValues&&r.seriesData.series[n][s+1]!==null&&!o&&(u=!0),s===1&&f===0&&(g=0),s===1&&f===1&&(g=1);let x="apexcharts-marker";if((r.config.chart.type==="line"||r.config.chart.type==="area")&&!r.globals.comboCharts&&!r.config.tooltip.intersect&&(x+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[e]>0:r.config.markers.size>0)||a||d){u||(x+=` w${T.randomId()}`);const w=this.getMarkerConfig({cssClass:x,seriesIndex:e,dataPointIndex:g}),m=r.config.series[n];m.data[g]&&(m.data[g].fillColor&&(w.pointFillColor=m.data[g].fillColor),m.data[g].strokeColor&&(w.pointStrokeColor=m.data[g].strokeColor)),typeof i<"u"&&(w.pSize=i),(l.x[f]<-r.globals.markers.largestSize||l.x[f]>r.layout.gridWidth+r.globals.markers.largestSize||l.y[f]<-r.globals.markers.largestSize||l.y[f]>r.layout.gridHeight+r.globals.markers.largestSize)&&(w.pSize=0),u||((r.globals.markers.size[e]>0||a||d)&&!c&&(c=h.group({class:a||d?"":"apexcharts-series-markers"}),c.attr("clip-path",`url(#gridRectMarkerMask${r.globals.cuid})`),this.setupMarkerDelegation(c)),p=h.drawMarker(l.x[f],l.y[f],w),p.attr("rel",g),p.attr("j",g),p.attr("index",e),p.node.setAttribute("default-marker-size",w.pSize),pt(p,l.x[f],r),this._filters.setSelectionFilter(p,e,g),c&&c.add(p))}else typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([l.x[f],l.y[f]])}return c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth:o=null}){const r=this.w,n=this.getMarkerStyle(e);let l=a===null?r.globals.markers.size[e]:a;const c=r.config.markers;return s!==null&&c.discrete.length&&c.discrete.map(h=>{h.seriesIndex===e&&h.dataPointIndex===s&&(n.pointStrokeColor=h.strokeColor,n.pointFillColor=h.fillColor,l=h.size,n.pointShape=h.shape)}),{pSize:i===null?l:i,pRadius:i!==null?i:c.radius,pointStrokeWidth:o!==null?o:Array.isArray(c.strokeWidth)?c.strokeWidth[e]:c.strokeWidth,pointStrokeColor:n.pointStrokeColor,pointFillColor:n.pointFillColor,shape:n.pointShape||(Array.isArray(c.shape)?c.shape[e]:c.shape),class:t,pointStrokeOpacity:Array.isArray(c.strokeOpacity)?c.strokeOpacity[e]:c.strokeOpacity,pointStrokeDashArray:Array.isArray(c.strokeDashArray)?c.strokeDashArray[e]:c.strokeDashArray,pointFillOpacity:Array.isArray(c.fillOpacity)?c.fillOpacity[e]:c.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){const e=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{e.config.markers.onClick&&R._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}),t.node.addEventListener("dblclick",i=>{e.config.markers.onDblClick&&R._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}),t.node.addEventListener("touchstart",i=>{const a=R._findDelegateTarget(i.target,t.node,s);a&&a.instance&&this._graphics.pathMouseDown(a.instance,i)},{passive:!0})}addEvents(t){const e=this.w;t.node.addEventListener("mouseenter",this._graphics.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",this._graphics.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",this._graphics.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",this._graphics.pathMouseDown.bind(this.ctx,t),{passive:!0})}getMarkerStyle(t){const e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors,a=Array.isArray(i)?i[t]:i,o=Array.isArray(s)?s[t]:s;return{pointStrokeColor:a,pointFillColor:o}}}class Ge{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new Tt(this.w),this.filters=new at(this.w),this.fill=new nt(this.w),this.markers=new Pt(this.w,this.ctx),this.graphics=new R(this.w)}draw(t,e,s){const i=this.w,a=this.graphics,o=s.realIndex,r=s.pointsPos,n=s.zRatio,l=s.elParent,c=a.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`});if(c.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(c),Array.isArray(r.x))for(let h=0;h<r.x.length;h++){let d=e+1,f=!0;
30e===0&&h===0&&(d=0),e===0&&h===1&&(d=1);let p=i.globals.markers.size[o];if(n!==1/0){const x=i.config.plotOptions.bubble;p=i.seriesData.seriesZ[o][d],x.zScaling&&(p/=n),x.minBubbleRadius&&p<x.minBubbleRadius&&(p=x.minBubbleRadius),x.maxBubbleRadius&&p>x.maxBubbleRadius&&(p=x.maxBubbleRadius)}const g=r.x[h],u=r.y[h];if(p=p||0,(u===null||typeof i.seriesData.series[o][d]>"u")&&(f=!1),f){const x=this.drawPoint(g,u,p,o,d,e);c.add(x)}l.add(c)}}drawPoint(t,e,s,i,a,o){var r,n;const l=this.w,c=i,h=this.anim,d=this.filters,f=this.fill,p=this.markers,g=this.graphics,u=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:c,dataPointIndex:a,radius:l.config.chart.type==="bubble"||l.globals.comboCharts&&l.config.series[i]&&l.config.series[i].type==="bubble"?s:null});let x=f.fillPath({seriesNumber:i,dataPointIndex:a,color:u.pointFillColor,patternUnits:"objectBoundingBox",value:l.seriesData.series[i][o]});const b=g.drawMarker(t,e,u),w=l.config.series[c];w.data[a]&&w.data[a].fillColor&&(x=w.data[a].fillColor);const m=(r=l.config.plotOptions.scatter)==null?void 0:r.jitter;if(m!=null&&m.enabled&&m.distributed&&l.globals.colors.length){const y=Math.round((n=l.seriesData.seriesX[i])==null?void 0:n[a]);isNaN(y)||(x=l.globals.colors[y%l.globals.colors.length])}if(b.attr({fill:x}),l.config.chart.dropShadow.enabled){const y=l.config.chart.dropShadow;d.dropShadow(b,y,i)}if(this.initialAnim&&!l.globals.dataChanged&&!l.globals.resized){const y=l.config.chart.animations,v=y.speed,C=l.globals.dataPoints||1,D=y.animateGradually,k=D&&D.enabled!==!1?Math.min(20,v*.5/Math.max(1,C)):0,M=be({style:k>0?"sequential":"none",index:a,baseDelay:k});h.animatePop(b,{speed:v,delay:M,onComplete:()=>h.animationCompleted(b)})}else l.globals.animationEnded=!0;return b.attr({rel:a,j:a,index:i,"default-marker-size":u.pSize}),d.setSelectionFilter(b,i,a),b.node.classList.add("apexcharts-marker"),b}centerTextInBubble(t){const e=this.w;return t=t+parseInt(e.config.dataLabels.style.fontSize,10)/4,{y:t}}}class kt{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,o,r){const n=this.w,l=new R(this.w);let c=!1;const h=l.getTextRects(s,r),d=h.width,f=h.height;e<0&&(e=0),e>n.layout.gridHeight+f&&(e=n.layout.gridHeight+f/2),typeof n.globals.dataLabelsRects[i]>"u"&&(n.globals.dataLabelsRects[i]=[]),n.globals.dataLabelsRects[i].push({x:t,y:e,width:d,height:f});const p=n.globals.dataLabelsRects[i].length-2,g=typeof n.globals.lastDrawnDataLabelsIndexes[i]<"u"?n.globals.lastDrawnDataLabelsIndexes[i][n.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(typeof n.globals.dataLabelsRects[i][p]<"u"){const u=n.globals.dataLabelsRects[i][g];(t>u.x+u.width||e>u.y+u.height||e+f<u.y||t+d<u.x)&&(c=!0)}return(a===0||o)&&(c=!0),{x:t,y:e,textRects:h,drawnextLabel:c}}drawDataLabel({type:t,pos:e,i:s,j:i,isRangeStart:a,strokeWidth:o=2}){const r=this.w,n=new R(this.w),l=r.config.dataLabels;let c=0,h=0,d=i,f=null;if(r.globals.collapsedSeriesIndices.indexOf(s)!==-1||!l.enabled||!Array.isArray(e.x))return f;f=n.group({class:"apexcharts-data-labels"});for(let g=0;g<e.x.length;g++)if(c=e.x[g]+l.offsetX,h=e.y[g]+l.offsetY+o,!isNaN(c)){i===1&&g===0&&(d=0),i===1&&g===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 x="";const b=m=>r.config.dataLabels.formatter(m,{seriesIndex:s,dataPointIndex:d,w:r});r.config.chart.type==="bubble"?(u=r.seriesData.seriesZ[s][d],x=b(u),h=e.y[g],h=new Ge(this.w,this.ctx).centerTextInBubble(h).y):typeof u<"u"&&(x=b(u));let w=r.config.dataLabels.textAnchor;r.globals.isSlopeChart&&(d===0?w="end":d===r.config.series[s].data.length-1?w="start":w="middle"),this.plotDataLabelsText({x:c,y:h,text:x,i:s,j:d,parent:f,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:w})}return f}plotDataLabelsText(t){const e=this.w,s=new R(this.w);let{x:i,y:a,i:o,j:r,text:n,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:f,alwaysDrawDataLabel:p,offsetCorrection:g,className:u}=t,x=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(o)<0)return x;let b={x:i,y:a,drawnextLabel:!0,textRects:null};if(g&&(b=this.dataLabelsCorrection(i,a,n,o,r,p,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=b.x,a=b.y),b.textRects){const v=e.globals.barPadForNumericAxis||
300;(i<-(v+20)-b.textRects.width||i>e.layout.gridWidth+b.textRects.width+v+30)&&(n="")}let w=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)&&(w=e.globals.dataLabels.style.colors[r]),typeof w=="function"&&(w=w({series:e.seriesData.series,seriesIndex:o,dataPointIndex:r,w:e})),f&&(w=f);let m=d.offsetX,y=d.offsetY;if((e.config.chart.type==="bar"||e.config.chart.type==="rangeBar")&&(m=0,y=0),e.globals.isSlopeChart&&(r!==0&&(m=d.offsetX*-2+5),r!==0&&r!==e.config.series[o].data.length-1&&(m=0)),b.drawnextLabel){if(l==="middle"&&i===e.layout.gridWidth&&(l="end"),x=s.drawText({x:i+m,y:a+y,foreColor:w,textAnchor:l||d.textAnchor,text:n,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),x.attr({class:u||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){const v=d.dropShadow;new at(this.w).dropShadow(x,v)}h.add(x),pt(x,i,e),typeof e.globals.lastDrawnDataLabelsIndexes[o]>"u"&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(r)}return x}addBackgroundToDataLabel(t,e){const s=this.w,i=s.config.dataLabels.background,a=i.padding,o=i.padding/2,r=e.width,n=e.height,c=new R(this.w).drawRect(e.x-a,e.y-o/2,r+a*2,n+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 at(this.w).dropShadow(c,i.dropShadow),c}dataLabelsBackground(){var t;const e=this.w;if(e.config.chart.type==="bubble")return;const s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i<s.length;i++){const a=s[i],o=a.getBBox();let r=null;if(o.width&&o.height&&(r=this.addBackgroundToDataLabel(a,o)),r){(t=a.parentNode)==null||t.insertBefore(r.node,a);const n=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:n}):r.attr({fill:n}),a.setAttribute("fill",e.config.dataLabels.background.foreColor);const c=a.getAttribute("cx");c!==null&&pt(r,parseFloat(c),e)}}}bringForward(){const t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let i=0;i<e.length;i++)s&&s.insertBefore(e[i],s.nextSibling)}}class me{static invalidateAll(t){!t||!t.globals||(t.globals.cachedSelectors&&(t.globals.cachedSelectors={}),t.globals.domCache&&t.globals.domCache.clear(),t.globals.dimensionCache={})}static invalidateDimensions(t){!t||!t.globals||(t.globals.dimensionCache={})}static invalidateSelectors(t){!t||!t.globals||t.globals.cachedSelectors&&(t.globals.cachedSelectors={})}static getCachedSelector(t,e,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={});const a=t.globals.dimensionCache[e],o=Date.now();if(a&&a.lastUpdate&&o-a.lastUpdate<i)return a.value;const 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}}class bt{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){const n=this.w,l=typeof t[i]>"u"?"":t[i];let c=l;const h=n.formatters.xLabelFormatter,d=n.config.xaxis.labels.formatter,f=new zt(this.w),p=l;r&&(c=f.xLabelFormat(h,l,p,{i,dateFormatter:new lt(this.w).formatDate,w:n}),d!==void 0&&(c=d(l,t[i],{i,dateFormatter:new lt(this.w).formatDate,w:n}))),e.length>0?(s=e[i].position,c=e[i].value):n.config.xaxis.type==="datetime"&&d===void 0&&(c=""),typeof c>"u"&&(c=""),c=Array.isArray(c)?c:c.toString();const g=new R(this.w);let u={};n.layout.rotateXLabels&&r?u=g.getTextRects(c,parseInt(o,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):u=g.getTextRects(c,parseInt(o,10).toString());const x=!n.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(c)&&(String(c)==="NaN"||a.indexOf(c)>=0&&x)&&(c=""),{x:s,text:c,textRect:u}}checkLabelBasedOnTickamount(t,e,s){const i=this.w;let a=i.config.xaxis.tickAmount;if(a==="dataPoints"&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;const o=Math.round(s/(a+1));return t%o===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){const 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){const 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}
vendor: 4,743 bytes, line 30
30checkForReversedLabels(t,e){const s=this.w;return s.config.yaxis[t]&&s.config.yaxis[t].reversed&&e.reverse(),e}yAxisAllSeriesCollapsed(t){const e=this.w.globals;return!e.seriesYAxisMap[t].some(s=>e.collapsedSeriesIndices.indexOf(s)===-1)}translateYAxisIndex(t){const 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){const e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){const i=e.globals.seriesYAxisMap[t],a=new et(this.w);return i.every(o=>a.isSeriesNull(o))}return!1}getYAxisForeColor(t,e){var s;const 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){const n=this.w,l=new R(this.w);let c=n.layout.translateY+n.config.yaxis[a].labels.offsetY;if(n.globals.isBarHorizontal?c=0:n.config.chart.type==="heatmap"&&(c+=o/2),i.show&&e>0){n.config.yaxis[a].opposite===!0&&(t=t+i.width);for(let h=e;h>=0;h--){const d=l.drawLine(t+s.offsetX-i.width+i.offsetX,c+i.offsetY,t+s.offsetX+i.offsetX,c+i.offsetY,i.color);r.add(d),c+=o}}}}class Nt{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new bt(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(){const t=this.w,e=new R(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){const o=t.labelData.groups;a=[];for(let n=0;n<o.length;n++)a.push(o[n].title);const r={};t.config.xaxis.group.style&&(r.xaxisFontSize=t.config.xaxis.group.style.fontSize,r.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,r.xaxisForeColors=t.config.xaxis.group.style.colors,r.fontWeight=t.config.xaxis.group.style.fontWeight,r.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,i,a,!1,(n,l)=>o[n].cols*l,r)}if(t.config.xaxis.title.text!==void 0){const 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){const 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={}){var n,l;const c=[],h=[],d=this.w,f=r.xaxisFontSize||this.xaxisFontSize,p=r.xaxisFontFamily||this.xaxisFontFamily,g=r.xaxisForeColors||this.xaxisForeColors,u=r.fontWeight||d.config.xaxis.labels.style.fontWeight,x=r.cssClass||d.config.xaxis.labels.style.cssClass;let b,w=d.globals.padHorizontal;const m=i.length;
vendor: 6,107 bytes, line 30
30let y=d.config.xaxis.type==="category"?d.globals.dataPoints:m;if(y===0&&m>y&&(y=m),a){const v=Math.max(Number(d.config.xaxis.tickAmount)||1,y>1?y-1:y);b=d.layout.gridWidth/Math.min(v,m-1),w=w+o(0,b)/2+d.config.xaxis.labels.offsetX}else b=d.layout.gridWidth/y,w=w+o(0,b)+d.config.xaxis.labels.offsetX;for(let v=0;v<=m-1;v++){let C=w-o(v,b)/2+d.config.xaxis.labels.offsetX;v===0&&m===1&&b/2===w&&y===1&&(C=d.layout.gridWidth/2);let D=this.axesUtils.getLabel(i,d.labelData.timescaleLabels,C,v,c,f,t),S=28;d.layout.rotateXLabels&&t&&(S=22),d.config.xaxis.title.text&&d.config.xaxis.position==="top"&&(S+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(S=S+parseFloat(f)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0)),typeof d.config.xaxis.tickAmount<"u"&&d.config.xaxis.tickAmount!=="dataPoints"&&d.config.xaxis.type!=="datetime"?D=this.axesUtils.checkLabelBasedOnTickamount(v,D,m):D=this.axesUtils.checkForOverflowingLabels(v,D,m,c,h);const M=()=>t&&d.config.xaxis.convertedCatToNumeric?g[d.globals.minX+v-1]:g[v],P=((l=(n=D.textRect)==null?void 0:n.width)!=null?l:0)/2,E=D.x+P<0;if(d.config.xaxis.labels.show&&!E){const _=e.drawText({x:D.x,y:this.offY+d.config.xaxis.labels.offsetY+S-(d.config.xaxis.position==="top"?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:D.text,textAnchor:"middle",fontWeight:u,fontSize:f,fontFamily:p,foreColor:Array.isArray(g)?M():g,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(s.add(_),_.on("click",X=>{if(typeof d.config.chart.events.xAxisLabelClick=="function"){const F=Object.assign({},d,{labelIndex:v});d.config.chart.events.xAxisLabelClick(X,this.ctx,F)}}),t){const X=B.createElementNS(Z,"title");X.textContent=Array.isArray(D.text)?D.text.join(" "):D.text,_.node.appendChild(X),D.text!==""&&(c.push(D.text),h.push(D))}}v<m-1&&(w=w+o(v+1,b))}}drawXaxisInversed(t){const e=this.w,s=new R(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);const r=[];if(e.config.yaxis[t].show)for(let p=0;p<this.xaxisLabels.length;p++)r.push(this.xaxisLabels[p]);const n=e.layout.gridHeight/r.length;let l=-(n/2.2);const c=e.formatters.yLabelFormatters[0],h=e.config.yaxis[0].labels;if(h.show)for(let p=0;p<=r.length-1;p++){let g=typeof r[p]>"u"?"":r[p];g=c(g,{seriesIndex:t,dataPointIndex:p,w:e});const u=this.axesUtils.getYAxisForeColor(h.style.colors,t),x=()=>Array.isArray(u)?u[p]:u;let b=0;Array.isArray(g)&&(b=g.length/2*parseInt(h.style.fontSize,10));let w=h.offsetX-15,m="end";this.yaxis.opposite&&(m="start"),e.config.yaxis[0].labels.align==="left"?(w=h.offsetX,m="start"):e.config.yaxis[0].labels.align==="center"?(w=h.offsetX,m="middle"):e.config.yaxis[0].labels.align==="right"&&(m="end");const y=s.drawText({x:w,y:l+n+h.offsetY-b,text:g,textAnchor:m,foreColor:x(),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(y),y.on("click",C=>{if(typeof e.config.chart.events.xAxisLabelClick=="function"){const D=Object.assign({},e,{labelIndex:p});e.config.chart.events.xAxisLabelClick(C,this.ctx,D)}});const v=B.createElementNS(Z,"title");if(v.textContent=Array.isArray(g)?g.join(" "):g,y.node.appendChild(v),e.config.yaxis[t].labels.rotate!==0){const C=s.rotateAroundCenter(y.node);y.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${C.y})`)}l=l+n}if(e.config.yaxis[0].title.text!==void 0){const p=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),g=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});p.add(g),a.add(p)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);const f=e.config.xaxis.axisBorder;if(f.show){const p=s.drawLine(e.globals.padHorizontal+f.offsetX+d,1+f.offsetY,e.globals.padHorizontal+f.offsetX+d,e.layout.gridHeight+f.offsetY,f.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(p):a.add(p)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,r.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,n,a),a}drawXaxisTicks(t,e,s){const i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;const 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){const n=new R(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(n),n.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const t=this.w,e=[],s=this.xaxisLabels.length;let i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let a=0;a<s;a++)i=this.xaxisLabels[a].position,e.push(i);else{const 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;const i=this.w,a=new R(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)"),n=i.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.config.xaxis.labels.rotateAlways)for(let c=0;c<r.length;
30c++){const h=a.rotateAroundCenter(r[c]);h.y=h.y-1,h.x=h.x+1,r[c].setAttribute("transform",`rotate(${i.config.xaxis.labels.rotate} ${h.x} ${h.y})`),r[c].setAttribute("text-anchor","end"),o==null||o.setAttribute("transform","translate(0, -10)");const d=r[c].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(d,f=>{a.placeTextWithEllipsis(f,f.textContent,i.layout.xAxisLabelsHeight-(i.config.legend.position==="bottom"?20:10))})}else{const c=i.layout.gridWidth/(i.labelData.labels.length+1);for(let h=0;h<r.length;h++){const d=r[h].childNodes;i.config.xaxis.labels.trim&&i.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(d,f=>{a.placeTextWithEllipsis(f,f.textContent,c)})}}if(n.length>0){const c=n[n.length-1].getBBox(),h=n[0].getBBox();c.x<-20&&((t=n[n.length-1].parentNode)==null||t.removeChild(n[n.length-1])),h.x+h.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&((e=n[0].parentNode)==null||e.removeChild(n[0]));for(let d=0;d<l.length;d++)a.placeTextWithEllipsis(l[d],(s=l[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)}}}class Ve{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new bt(e.w,{theme:e.theme,timeScale:e.timeScale}),this.isRangeBar=t.rangeData.seriesRange.length&&t.globals.isBarHorizontal,t.labelData.timescaleLabels.length>0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){const e=this.w,s=new R(this.w);t||(t=s.group({class:"apexcharts-grid"}));const i=s.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=s.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(i),t}drawGrid(){if(this.w.globals.axisCharts){const e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){const t=this.w,e=t.globals,s=new R(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=h=>{const d=B.createElementNS(Z,"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}`);const o=["bar","rangeBar","candlestick","boxPlot","violin"].includes(t.config.chart.type)||t.globals.comboBarCount>0;let r=0,n=0;o&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=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+n+r+4,t.layout.gridHeight+i+4,0,"#fff");const l=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-l),-l,t.layout.gridWidth+Math.max(i+n+r+4,l*2),t.layout.gridHeight+l*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);const c=t.dom.elDefs.node;c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elGridRectBarMask),c.appendChild(t.dom.elGridRectMarkerMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r}){const n=this.w;if(!(t===0&&n.globals.skipFirstTimelinelabel||t===o-1&&n.globals.skipLastTimelinelabel&&!n.config.xaxis.labels.formatter||n.config.chart.type==="radar")){n.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r});let c=0;if(n.labelData.hasXaxisGroups&&n.config.xaxis.tickPlacement==="between"){const d=n.labelData.groups;if(d){let f=0;for(let p=0;f<t&&p<d.length;p++)f+=d[p].cols;f===t&&(c=n.layout.xAxisLabelsHeight*.6)}}new Nt(this.w,this.ctx).drawXaxisTicks(e,c,n.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r}){const n=this.w,l=r.node.classList.contains("apexcharts-gridlines-h
30orizontal"),c=n.globals.barPadForNumericAxis,h=s===0&&a===0||e===0&&i===0||s===n.layout.gridHeight&&a===n.layout.gridHeight||n.globals.isBarHorizontal&&(t===0||t===o-1),f=new R(this.w).drawLine(e-(l?c:0),s,i+(l?c:0),a,n.config.grid.borderColor,n.config.grid.strokeDashArray);f.node.classList.add("apexcharts-gridline"),h&&n.config.grid.show?this.elGridBorders.add(f):r.add(f)}_drawGridBandRect({c:t,x1:e,y1:s,x2:i,y2:a,type:o}){const r=this.w,n=new R(this.w),l=r.globals.barPadForNumericAxis,c=r.config.grid[o].colors[t],h=n.drawRect(e-(o==="row"?l:0),s,i+(o==="row"?l*2:0),a,0,c,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;const i=this.w,a=({xC:r,x1:n,y1:l,x2:c,y2:h})=>{for(let d=0;d<r;d++)n=this.xaxisLabels[d].position,c=this.xaxisLabels[d].position,this._drawGridLines({i:d,x1:n,y1:l,x2:c,y2:h,xCount:t,parent:this.elgridLinesV})},o=({xC:r,x1:n,y1:l,x2:c,y2:h})=>{for(let d=0;d<r+(i.axisFlags.isXNumeric?0:1);d++)d===0&&r===1&&i.globals.dataPoints===1&&(n=i.layout.gridWidth/2,c=n),this._drawGridLines({i:d,x1:n,y1:l,x2:c,y2:h,xCount:t,parent:this.elgridLinesV}),n+=i.layout.gridWidth/(i.axisFlags.isXNumeric?r-1:r),c=n};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){const r=i.globals.padHorizontal,n=0;let l;const c=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:t,x1:r,y1:n,x2:l,y2:c}):(i.axisFlags.isXNumeric&&(t=(s=i.globals.xAxisScale)==null?void 0:s.result.length),o({xC:t,x1:r,y1:n,x2:l,y2:c}))}if(i.config.grid.yaxis.lines.show){let n=0,l=0;const c=i.layout.gridWidth;let 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:n,x2:c,y2:l,parent:this.elgridLinesH}),n+=i.layout.gridHeight/(this.isRangeBar?h:e),l=n}}_drawInvertedXYLines({xCount:t}){const e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let s=e.globals.padHorizontal;const i=0;let a;const 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 Nt(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;const 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;const i=this.w,a=i.globals,o=new R(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 n=a.yAxisScale[r].result.length-1,l;return!a.isBarHorizontal||this.isRangeBar?(l=this.xaxisLabels.length,this.isRangeBar&&(n=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(l=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"&&(l=a.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:l,tickAmount:n})):(l=n,n=a.xTickAmount,this._drawInvertedXYLines({xCount:l,tickAmount:n})),this.drawGridBands(l,n),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/l}}drawGridBands(t,e){var s,i,a,o,r;const n=this.w,l=(c,h,d,f,p,g)=>{for(let u=0,x=0;u<h;u++,x++)x>
30=n.config.grid[c].colors.length&&(x=0),this._drawGridBandRect({c:x,x1:d,y1:f,x2:p,y2:g,type:c}),f+=n.layout.gridHeight/e};if(((s=n.config.grid.row.colors)==null?void 0:s.length)>0&&l("row",e,0,0,n.layout.gridWidth,n.layout.gridHeight/e),((i=n.config.grid.column.colors)==null?void 0:i.length)>0){let c=!n.globals.isBarHorizontal&&n.config.xaxis.tickPlacement==="on"&&(n.config.xaxis.type==="category"||n.config.xaxis.convertedCatToNumeric)?t-1:t;n.axisFlags.isXNumeric&&(c=((o=(a=n.globals.xAxisScale)==null?void 0:a.result.length)!=null?o:1)-1);let h=n.globals.padHorizontal;const d=0;let f=n.globals.padHorizontal+n.layout.gridWidth/c;const p=n.layout.gridHeight;for(let g=0,u=0;g<t;g++,u++)u>=n.config.grid.column.colors.length&&(u=0),n.config.xaxis.type==="datetime"&&(h=this.xaxisLabels[g].position,f=(((r=this.xaxisLabels[g+1])==null?void 0:r.position)||n.layout.gridWidth)-this.xaxisLabels[g].position),this._drawGridBandRect({c:u,x1:h,y1:d,x2:f,y2:p,type:"column"}),h+=n.layout.gridWidth/c}}}class Ue{constructor(t){this.w=t,this.coreUtils=new et(this.w)}niceScale(t,e,s=0){const a=this.w,o=a.globals;let r,n,l,c;o.isBarHorizontal?(r=a.config.xaxis,n=Math.max((o.svgWidth-100)/25,2)):(r=a.config.yaxis[s],n=Math.max((o.svgHeight-100)/15,2)),T.isNumber(n)||(n=10),l=r.min!==void 0&&r.min!==null,c=r.max!==void 0&&r.min!==null;let h=r.stepSize!==void 0&&r.stepSize!==null,d=r.tickAmount!==void 0&&r.tickAmount!==null,f=d?r.tickAmount:re[Math.min(Math.round(n/2),re.length-1)];if(o.isMultipleYAxis&&!d&&o.multiAxisTickAmount>0&&(f=o.multiAxisTickAmount,d=!0),f==="dataPoints"?f=o.dataPoints-1:f=Math.abs(Math.round(f)),(t===Number.MIN_VALUE&&e===0||!T.isNumber(t)&&!T.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=T.isNumber(r.min)?r.min:0,e=T.isNumber(r.max)?r.max:t+f,o.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");const L=e;e=t,t=L}else t===e&&(t=t===0?0:t-1,e=e===0?2:e+1);const p=[];f<1&&(f=1);let g=f,u=Math.abs(e-t);const x=.15;!l&&t>0&&t/u<x&&(t=0,l=!0),!c&&e<0&&-e/u<x&&(e=0,c=!0),u=Math.abs(e-t);let b=u/g,w=b;const m=Math.floor(Math.log10(w)),y=Math.pow(10,m);let v=Math.ceil(w/y);if(v=He[o.yValueDecimal===0?0:1][v],w=v*y,b=w,o.isBarHorizontal&&r.stepSize&&r.type!=="datetime"?(b=r.stepSize,h=!0):h&&(b=r.stepSize),h&&r.forceNiceScale){const L=Math.floor(Math.log10(b));b*=Math.pow(10,m-L)}if(l&&c){let L=u/g;if(d)if(h)if(T.mod(u,b)!=0){const P=T.getGCD(b,L);L/P<10?b=P:b=L}else T.mod(b,L)==0?b=L:(L=b,d=!1);else b=L;else if(h)T.mod(u,b)==0?L=b:b=L;else if(T.mod(u,b)==0)L=b;else{g=Math.ceil(u/b),L=u/g;const P=T.getGCD(u,b);u/P<n&&(L=P),b=L}g=Math.round(u/b)}else{if(!l&&!c)if(o.isMultipleYAxis&&d){const L=b*Math.floor(t/b);let P=L+b*g;P<e&&(b*=2),t=L,P=e,e=t+b*g,u=Math.abs(e-t),t>0&&t<Math.abs(P-e)&&(t=0,e=b*g),e<0&&-e<Math.abs(L-t)&&(e=0,t=-b*g)}else t=b*Math.floor(t/b),e=b*Math.ceil(e/b);else if(c)if(d)t=e-b*g;else{const L=t;t=b*Math.floor(t/b),Math.abs(e-t)/T.getGCD(u,b)>n&&(t=e-b*f,t+=b*Math.floor((L-t)/b))}else if(l)if(d)e=t+b*g;else{const L=e;e=b*Math.ceil(e/b),Math.abs(e-t)/T.getGCD(u,b)>n&&(e=t+b*f,e+=b*Math.ceil((L-e)/b))}u=Math.abs(e-t),b=T.getGCD(u,b),g=Math.round(u/b)}if(!d&&!(l||c)&&(g=Math.ceil((u-1e-11)/(b+1e-11)),g>16&&T.getPrimeFactors(g).length<2&&g++),!d&&r.forceNiceScale&&o.yValueDecimal===0&&g>u&&(g=u,b=Math.round(u/g)),g>n&&(!(d||h)||r.forceNiceScale)){const L=T.getPrimeFactors(g),P=L.length-1;let E=g;t:for(var C=0;C<P;C++)for(var D=0;D<=P-C;D++){const _=Math.min(D+C,P);let X=E,F=1;for(var S=D;S<=_;S++)F*=L[S];if(X/=F,X<n){E=X;break t}}E===g?b=u:b=u/E,g=Math.round(u/b)}o.isMultipleYAxis&&o.multiAxisTickAmount==0&&o.ignoreYAxisIndexes.indexOf(s)<0&&(o.multiAxisTickAmount=g);let k=t-b;const M=b*1e-11;do k+=b,p.push(T.stripNumber(k,7));while(e-k>M);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}linearScale(t,e,s=10,i=0,a=void 0){const o=Math.abs(e-t);let 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);const n=s;a||(a=o/n);const l=2;if(a!==0&&isFinite(a)){const d=Math.floor(Math.log10(Math.abs(a)
30)),f=Math.max(l,-d+l),p=Math.pow(10,f);a=Math.round((a+Number.EPSILON)*p)/p}let c=s===Number.MAX_VALUE?5:n;s===Number.MAX_VALUE&&(a=1);let h=t;for(;c>=0;)r.push(h),h=T.preciseAddition(h,a),c-=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));const 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));const i=[],a=Math.log(e)/Math.log(s),o=Math.log(t)/Math.log(s),r=a-o,n=Math.round(r),l=r/n;for(let c=0,h=o;c<n;c++,h+=l)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){const a=Number(this.w.config.yaxis[e].labels.formatter(1));T.isNumber(a)&&this.w.globals.yValueDecimal===0&&(i=Math.ceil(s))}return i<t?i:t}setYScaleForIndex(t,e,s){const i=this.w.globals,a=this.w.config,o=i.isBarHorizontal?a.xaxis:a.yaxis[t];typeof i.yAxisScale[t]>"u"&&(i.yAxisScale[t]=[]);const 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||!T.isNumber(s)||e===Number.MAX_VALUE||!T.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){const s=this.w,i=s.globals;if(e===-Number.MAX_VALUE||!T.isNumber(e))i.xAxisScale=this.linearScale(0,10,10);else{const 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(){const t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr,o=[],r=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((n,l)=>{const c=[];if(n.forEach(h=>{var d;const f=(d=t.series[h])==null?void 0:d.group;c.indexOf(f)<0&&c.push(f)}),n.length>0){let h=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=h,p=d,g,u;if(t.chart.stacked){const w=new Array(e.dataPoints).fill(0),m=[],y=[],v=[];c.forEach(()=>{m.push(w.map(()=>Number.MIN_VALUE)),y.push(w.map(()=>Number.MIN_VALUE)),v.push(w.map(()=>Number.MIN_VALUE))});for(let C=0;C<n.length;C++){!g&&t.series[n[C]].type&&(g=t.series[n[C]].type);const D=n[C];t.series[D].group?u=t.series[D].group:u="axis-".concat(l.toString()),!(e.collapsedSeriesIndices.indexOf(D)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(D)<0)||(e.allSeriesCollapsed=!1,c.forEach((k,M)=>{if(t.series[D].group===k)for(let L=0;L<this.w.seriesData.series[D].length;L++){const P=this.w.seriesData.series[D][L];P>=0?y[M][L]+=P:v[M][L]+=P,m[M][L]+=P,f=Math.min(f,P),p=Math.max(p,P)}})),(g==="bar"||g==="column")&&e.barGroups.push(u)}g||(g=t.chart.type),g==="bar"||g==="column"?c.forEach((C,D)=>{h=Math.min(h,Math.min.apply(null,v[D])),d=Math.max(d,Math.max.apply(null,y[D]))}):(c.forEach((C,D)=>{f=Math.min(f,Math.min.apply(null,m[D])),p=Math.max(p,Math.max.apply(null,m[D]))}),h=f,d=p),h===Number.MIN_VALUE&&d===Number.MIN_VALUE&&(d=-Number.MAX_VALUE)}else for(let w=0;w<n.length;w++){const m=n[w];h=Math.min(h,i[m]),d=Math.max(d,a[m]),!(e.collapsedSeriesIndices.indexOf(m)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(m)<0)||(e.allSeriesCollapsed=!1)}t.yaxis[l].min!==void 0&&(typeof t.yaxis[l].min=="function"?h=t.yaxis[l].min(h):h=t.yaxis[l].min),t.yaxis[l].max!==void 0&&(typeof t.yaxis[l].max=="function"?d=t.yaxis[l].max(d):d=t.yaxis[l].max),e.barGroups=e.barGroups.filter((w,m,y)=>y.indexOf(w)===m);const x=t.yaxis[l];r&&x.alignZero===!0&&!x.logarithmic&&x.min===void 0&&x.max===void 0&&e.ignoreYAxisIndexes.indexOf(l)<0&&T.isNumber(h)&&T.isNumber(d)?o.push({ai:l,minY:h,maxY:d}):(this.setYScaleForIndex(l,h,d),n.forEach(w=>{i[w]=e.yAxisScale[l].niceMin,a[w]=e.yAxisScale[l].niceMax}))}else this.setYScaleForIndex(l,0,-Number.MAX_VALUE)}),o.length>=2){o.forEach(c=>
30{this.setYScaleForIndex(c.ai,c.minY,c.maxY),s[c.ai].forEach(h=>{i[h]=e.yAxisScale[c.ai].niceMin,a[h]=e.yAxisScale[c.ai].niceMax})});let n=0;o.forEach(c=>{const h=e.yAxisScale[c.ai],d=h.niceMax-h.niceMin;if(d>0){const f=-h.niceMin/d;f>n&&(n=f)}}),n>1&&(n=1),n<0&&(n=0);const l=c=>{if(c<=0)return 1;const h=Math.floor(Math.log10(c)),d=Math.pow(10,h),f=c/d;let p;return f<=1+1e-9?p=1:f<=2+1e-9?p=2:f<=2.5+1e-9?p=2.5:f<=5+1e-9?p=5:p=10,p*d};o.forEach(c=>{const h=e.yAxisScale[c.ai];if(!h.result||h.result.length<2)return;const d=h.niceMax-h.niceMin;if(d<=0)return;const f=-h.niceMin/d;if(Math.abs(f-n)<=1e-9)return;const p=f<n&&n<1-1e-9,g=!p&&f>n&&n>1e-9;if(!p&&!g)return;const u=p?-n*h.niceMax/(1-n):h.niceMin,x=g?-h.niceMin*(1-n)/n:h.niceMax,b=x-u;if(b<=0)return;const w=Math.max(h.result.length,5),m=l(b/Math.max(w-1,1));if(m<=0)return;let y,v;if(p){y=Math.floor(u/m+1e-9)*m;const C=n>1e-9?y*(n-1)/n:h.niceMax,D=Math.max(C,h.niceMax);v=Math.ceil(D/m-1e-9)*m}else{v=Math.ceil(x/m-1e-9)*m;const C=n<1-1e-9?-n*v/(1-n):h.niceMin,D=Math.min(C,h.niceMin);y=Math.floor(D/m+1e-9)*m}h.result=[];for(let C=y;C<=v+m*1e-9;C=T.preciseAddition(C,m))h.result.push(T.stripNumber(C,7));h.niceMin=y,h.niceMax=v,s[c.ai].forEach(C=>{i[C]=h.niceMin,a[C]=h.niceMax})})}else if(o.length===1){const n=o[0];this.setYScaleForIndex(n.ai,n.minY,n.maxY),s[n.ai].forEach(l=>{i[l]=e.yAxisScale[n.ai].niceMin,a[l]=e.yAxisScale[n.ai].niceMax})}}}class ne{constructor(t){this.w=t,this.scales=new Ue(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,n,l,c,h,d;const f=this.w.config,p=this.w.globals;let g=-Number.MAX_VALUE,u=Number.MIN_VALUE;i===null&&(i=t+1);const x=this.w.seriesData.series;let b=x,w=x;f.chart.type==="candlestick"?(b=this.w.candleData.seriesCandleL,w=this.w.candleData.seriesCandleH):f.chart.type==="boxPlot"?(b=this.w.candleData.seriesCandleO,w=this.w.candleData.seriesCandleC):f.chart.type==="violin"?(b=this.w.violinData.seriesViolinMin,w=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(b=this.w.rangeData.seriesRangeStart,w=this.w.rangeData.seriesRangeEnd);let m=!1;if(this.w.seriesData.seriesX.length>=i){const y=(a=p.brushSource)==null?void 0:a.w.config.chart.brush;(f.chart.zoom.enabled&&f.chart.zoom.autoScaleYaxis||y!=null&&y.enabled&&(y!=null&&y.autoScaleYaxis))&&(m=!0)}for(let y=t;y<i;y++){p.dataPoints=Math.max(p.dataPoints,x[y].length);const v=f.series[y].type;this.w.labelData.categoryLabels.length&&(p.dataPoints=this.w.labelData.categoryLabels.filter(S=>typeof S<"u").length),this.w.labelData.labels.length&&f.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((S,k)=>S+k.length,0)!==0&&(p.dataPoints=Math.max(p.dataPoints,this.w.labelData.labels.length));let C=0,D=x[y].length-1;if(m){if(f.xaxis.min)for(;C<D&&this.w.seriesData.seriesX[y][C]<f.xaxis.min;C++);if(f.xaxis.max)for(;D>C&&this.w.seriesData.seriesX[y][D]>f.xaxis.max;D--);}for(let S=C;S<=D&&S<this.w.seriesData.series[y].length;S++){let k=x[y][S];if(k!==null&&T.isNumber(k)){switch(typeof((o=w[y])==null?void 0:o[S])<"u"&&(g=Math.max(g,w[y][S]),e=Math.min(e,w[y][S])),typeof((r=b[y])==null?void 0:r[S])<"u"&&(e=Math.min(e,b[y][S]),s=Math.max(s,b[y][S])),v){case"candlestick":typeof this.w.candleData.seriesCandleC[y][S]<"u"&&(g=Math.max(g,this.w.candleData.seriesCandleH[y][S]),e=Math.min(e,this.w.candleData.seriesCandleL[y][S]));break;case"boxPlot":typeof this.w.candleData.seriesCandleC[y][S]<"u"&&(g=Math.max(g,this.w.candleData.seriesCandleC[y][S]),e=Math.min(e,this.w.candleData.seriesCandleO[y][S]));break;case"violin":typeof((n=this.w.violinData.seriesViolinMax[y])==null?void 0:n[S])<"u"&&(g=Math.max(g,this.w.violinData.seriesViolinMax[y][S]),e=Math.min(e,this.w.violinData.seriesViolinMin[y][S]));break}if(v&&v!=="candlestick"&&v!=="boxPlot"&&v!=="violin"&&v!=="rangeArea"&&v!=="rangeBar"&&(g=Math.max(g,this.w.seriesData.series[y][S]),e=Math.min(e,this.w.seriesData.series[y][S])),this.w.seriesData.seriesGoals[y]&&this.w.seriesData.seriesGoals[y][S]&&Array.isArray(this.w.seriesData.seriesGoals[y][S])&&this.w.seriesData.seriesGoals[y][S].forEac
30h(M=>{g=Math.max(g,M.value),e=Math.min(e,M.value)}),this.w.config.chart.type==="boxPlot"||v==="boxPlot"){const M=(c=(l=this.w.candleData.seriesBoxPoints)==null?void 0:l[y])==null?void 0:c[S];if(M)for(let L=0;L<M.length;L++){const P=M[L];typeof P=="number"&&(g=Math.max(g,P),e=Math.min(e,P))}}s=g,k=T.noExponents(k),T.isFloat(k)&&(p.yValueDecimal=Math.max(p.yValueDecimal,k.toString().split(".")[1].length)),u>((h=b[y])==null?void 0:h[S])&&((d=b[y])==null?void 0:d[S])<0&&(u=b[y][S])}else p.hasNullValues=!0}(v==="bar"||v==="column")&&(u<0&&g<0&&(g=0,s=Math.max(s,0)),u===Number.MIN_VALUE&&(u=0,e=Math.min(e,0)))}return f.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&p.isBarHorizontal&&(u=e),f.chart.type==="bar"&&(u<0&&g<0&&(g=0),u===Number.MIN_VALUE&&(u=0)),{minY:u,maxY:g,lowestY:e,highestY:s}}setYRange(){const t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let s=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==="violin"||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=>{const 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(){const 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&&T.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){const 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){const 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.noLabelsProvi
30ded&&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(){const 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&&T.isNumber(this.w.seriesData.seriesZ[e][s])&&(t.maxZ=Math.max(t.maxZ,this.w.seriesData.seriesZ[e][s]),t.minZ=Math.min(t.minZ,this.w.seriesData.seriesZ[e][s]))}}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const s=new lt(this.w);if(e.xaxis.type==="datetime"){const i=s.getDate(t.minX);e.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),t.minX=new Date(i).getTime();const a=s.getDate(t.maxX);e.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()+2):a.setDate(a.getDate()+2),t.maxX=new Date(a).getTime()}else(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(){const 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]);const s=e.slice();s.sort((i,a)=>i-a),s.forEach((i,a)=>{if(a>0){const 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(){const t=this.w.globals;if(!this.w.seriesData.series.length)return;let e=this.w.labelData.seriesGroups;e.length||(e=[this.w.seriesData.seriesNames.map(a=>a)]);const s={},i={};e.forEach(a=>{s[a]=[],i[a]=[],this.w.config.series.map((r,n)=>a.indexOf(this.w.seriesData.seriesNames[n])>-1?n:null).filter(r=>r!==null).forEach(r=>{var n,l,c,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||((l=(n=this.w.config.series)==null?void 0:n[r])==null?void 0:l.type)==="bar"||((h=(c=this.w.config.series)==null?void 0:c[r])==null?void 0:h.type)==="column"))&&this.w.seriesData.series[r][d]!==null&&T.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 le(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}class ye{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 bt(t,{theme:e,timeScale:s})}drawYaxis(t){const e=this.w,s=new R(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:o,fontWeight:r}=i,n=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return n;const l=s.group({class:"apexcharts-yaxis-texts-g"});n.add(l);const c=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/c,d=e.formatters.yLabelFormatters[t],f=this.axesUtils.checkForRever
vendor: 5,685 bytes, line 30
30sedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){let p=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?p=0:e.config.chart.type==="heatmap"&&(p-=h/2),p+=parseInt(a,10)/3;let g=null;for(let u=c;u>=0;u--){const x=d(f[u],u,e);let b=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&e.config.yaxis.length!==0&&(b*=-1);const w=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),y=Array.isArray(m)?m[u]:m,v=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(D=>D.textContent),C=s.drawText({x:b,y:p,text:v.includes(x)&&!e.config.yaxis[t].labels.showDuplicates?"":x,textAnchor:w,fontSize:a,fontFamily:o,fontWeight:r,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});l.add(C),this.addTooltip(C,x),g===null&&(g=C),e.config.yaxis[t].labels.rotate!==0&&this.rotateLabel(s,C,g,e.config.yaxis[t].labels.rotate),p+=h}}return this.addYAxisTitle(s,n,t),this.addAxisBorder(s,n,t,c,h),n}getTextAnchor(t,e){return t==="left"?"start":t==="center"?"middle":t==="right"?"end":e?"start":"end"}addTooltip(t,e){const s=B.createElementNS(Z,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){const a=t.rotateAroundCenter(s.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${o.y})`)}addYAxisTitle(t,e,s){const i=this.w;if(i.config.yaxis[s].title.text!==void 0){const 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){const o=this.w,r=o.config.yaxis[s].axisBorder;let n=31+r.offsetX;if(o.config.yaxis[s].opposite&&(n=-31-r.offsetX),r.show){const l=t.drawLine(n,o.layout.translateY+r.offsetY-2,n,o.layout.gridHeight+o.layout.translateY+r.offsetY+2,r.color,0,r.width);e.add(l)}o.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,i,r,o.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){const e=this.w,s=new R(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;const r=e.layout.gridWidth/o+.1;let n=r+e.config.xaxis.labels.offsetX;const l=e.formatters.xLabelFormatter;let c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());const h=e.labelData.timescaleLabels;if(h.length>0&&(this.xaxisLabels=h.slice(),c=h.slice(),o=c.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 f=l==null?void 0:l(c[d],d,e),p=e.layout.gridWidth+e.globals.padHorizontal-(n-r+e.config.xaxis.labels.offsetX);if(h.length){const u=this.axesUtils.getLabel(c,h,p,d,this.drawnLabels,this.xaxisFontSize);p=u.x,f=u.text,this.drawnLabels.push(u.text),d===0&&e.globals.skipFirstTimelinelabel&&(f=""),d===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}const g=s.drawText({x:p,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:f,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(g),this.addTooltip(g,f),n+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){const e=this.w,s=new R(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;e.config.chart.type==="bar"&&e.axisFlags.isXNumeric&&(a-=15);const 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){const e=this.w,s=new R(this.w);if(e.config.xaxis.title.text!==void 0){const i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=s.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${e.config.xaxis.title.style.cssClass}`});i.add(a),t.add(i)}}yAxisTitleRotate(t,e){const s=this.w,i=new R(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`),n=r?r.getBoundingClientRect():{width:0,height:0};if(r){const l=this.xPaddingForYAxisTitle(t,o,n,e);r.setAttribute("x",String(l.xPos-(e?10:0)));
30const c=i.rotateAroundCenter(r);r.setAttribute("transform",`rotate(${e?s.config.yaxis[t].title.rotate*-1:s.config.yaxis[t].title.rotate} ${c.x} ${c.y})`)}}xPaddingForYAxisTitle(t,e,s,i){const a=this.w;let 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){const s=this.w;let i=0,a=0,o=18,r=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((n,l)=>{const c=s.globals.ignoreYAxisIndexes.includes(l)||!n.show||n.floating||t[l].width===0,h=t[l].width+e[l].width;n.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[l]=a-n.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+r,c||(r+=h+20),s.globals.translateYAxisX[l]=a-n.labels.offsetX+20):(i=s.layout.translateX-o,c||(o+=h+20),s.globals.translateYAxisX[l]=i+n.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((s,i)=>{const a=t.config.yaxis[i];if(a&&!a.floating&&a.labels.align!==void 0){const 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`)),n=o.getBoundingClientRect();r.forEach(l=>{l.setAttribute("text-anchor",a.labels.align)}),a.labels.align==="left"&&!a.opposite?o.setAttribute("transform",`translate(-${n.width}, 0)`):a.labels.align==="center"?o.setAttribute("transform",`translate(${n.width/2*(a.opposite?1:-1)}, 0)`):a.labels.align==="right"&&a.opposite&&o.setAttribute("transform",`translate(${n.width}, 0)`)}})}}class vs{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){const s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,t)?s.globals.events[t].push(e):s.globals.events[t]=[e]}removeEventListener(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;const i=s.globals.events[t].indexOf(e);i!==-1&&s.globals.events[t].splice(i,1)}fireEvent(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;(!e||!e.length)&&(e=[]);const i=s.globals.events[t],a=i.length;for(let o=0;o<a;o++)i[o].apply(null,e)}setupEventHandlers(){const t=this.w,e=this.ctx,s=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(i=>{s==null||s.addEventListener(i,a=>{const 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"),n=Object.assign({},t,{seriesIndex:t.globals.axisCharts?o:0,dataPointIndex:r});
30a.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,n),e.ctx.events.fireEvent("keydown",[a,e,n])):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,n),e.ctx.events.fireEvent("keyup",[a,e,n])):a.type==="mousemove"||a.type==="touchmove"?typeof t.config.chart.events.mouseMove=="function"&&t.config.chart.events.mouseMove(a,e,n):a.type==="mouseleave"||a.type==="touchleave"?typeof t.config.chart.events.mouseLeave=="function"&&t.config.chart.events.mouseLeave(a,e,n):(a.type==="mouseup"&&a.which===1||a.type==="touchend")&&(typeof t.config.chart.events.click=="function"&&t.config.chart.events.click(a,e,n),e.ctx.events.fireEvent("click",[a,e,n]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(i=>{t.dom.baseEl.addEventListener(i,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){const e=this.w,s=t.target.className;if(t.type==="click"){const 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}}class As{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const s=W.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));const i=e.filter(a=>a.name===t)[0];if(i){const a=T.extend(Oe,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")}}class Cs{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const s=this.w.globals,i=this.w.config,a=new Nt(this.w,this.ctx,e),o=new ye(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&t!=="radar"){let r,n;s.isBarHorizontal?(n=o.drawYaxisInversed(0),r=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(r),this.w.dom.elGraphical.add(n)):(r=a.drawXaxis(),this.w.dom.elGraphical.add(r),i.yaxis.map((l,c)=>{if(s.ignoreYAxisIndexes.indexOf(c)===-1&&(n=o.drawYaxis(c),this.w.dom.Paper.add(n),this.w.config.grid.position==="back")){const h=this.w.dom.Paper.children()[1];h&&(h.remove(),this.w.dom.Paper.add(h))}}))}}}class ce{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w,e=new R(this.w),s=new at(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,n=i.colorTo,l=i.opacityFrom,c=i.opacityTo,h=i.stops,d="none",f=a.enabled,p=a.left,g=a.top,u=a.blur,x=a.color,b=a.opacity;let w=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){o==="gradient"&&(w=e.drawGradient("vertical",r,n,l,c,null,h,[]));let m=e.drawRect();t.config.xaxis.crosshairs.width===1&&(m=e.drawLine(0,0,0,0));let y=t.layout.gridHeight;(!T.isNumber(y)||y<0)&&(y=0);let v=t.config.xaxis.crosshairs.width;(!T.isNumber(v)||Number(v)<0)&&(v=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:v,height:y,fill:w,filter:d,"f
30ill-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}),f&&(m=s.dropShadow(m,{left:p,top:g,blur:u,color:x,opacity:b})),t.dom.elGraphical.add(m)}}drawYCrosshairs(){const t=this.w,e=new R(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const 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)}const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),t.dom.elGraphical.add(a)}}function qe(A,t){if(!T.isObject(A)||!T.isObject(t))return t!==void 0?t:A;const e=$({},A);for(const s of Object.keys(t)){const i=t[s];i!==void 0&&(T.isObject(i)&&T.isObject(A[s])?e[s]=qe(A[s],i):e[s]=i)}return e}class Ss{constructor(t){this.w=t,this._activeBreakpoint=null}checkResponsiveConfig(t){const e=this.w,s=e.config;if(s.responsive.length===0)return;const i=s.responsive.slice();i.sort((r,n)=>r.breakpoint>n.breakpoint?1:n.breakpoint>r.breakpoint?-1:0).reverse();const a=new Bt({}),o=(r={})=>{var n;const l=i[0].breakpoint,c=W.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(c>l){if(this._activeBreakpoint!==null){if(!e.globals.initialConfig)return;const h=T.clone(e.globals.initialConfig);h.series=T.clone(e.config.series);const d=et.extendArrayProps(a,h,e);r=T.extend(d,r),this.overrideResponsiveOptions(r),this._activeBreakpoint=null}}else for(let h=0;h<i.length;h++)if(c<i[h].breakpoint){const d=(n=i[h].options)!=null&&n.yaxis?T.clone(i[h].options.yaxis):null;if(r=et.extendArrayProps(a,i[h].options,e),r=T.extend(e.config,r),Array.isArray(e.config.yaxis)&&d){const f=Array.isArray(d)?d:[d];r=G($({},r),{yaxis:e.config.yaxis.map((p,g)=>qe(p,f[g]))})}this.overrideResponsiveOptions(r),this._activeBreakpoint=i[h].breakpoint}};if(t){let r=et.extendArrayProps(a,t,e);r=T.extend(e.config,r),r=T.extend(r,t),o(r)}else o({})}overrideResponsiveOptions(t){const e=new Bt(t).init({responsiveOverride:!0});this.w.config=e}}class tt{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(){const t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const t=this.w,e="allSeriesEls";return t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=t.dom.baseEl.getElementsByClassName("apexcharts-series")),t.globals.cachedSelectors[e]}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${T.escapeString(t)}']`)}isSeriesHidden(t){var e;const 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){tt.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;const s=this.isSeriesHidden(t);return(e=this._toggleDataSeries)==null||e.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden&&((e=this._toggleDataSeries)==null||e.call(this,s.realIndex,!0))}hideSeries(t){var e;const 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;const o=this.w;this.clearSeriesCache();let r=T.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){const 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;const s=this.w,i=this.getSeriesByName(t),a=parseInt((e=i==null?void 0:i.getAttribute("data:realIndex"))!=null?e:"",10),o="highlightSeriesEls";let r=s.globals.cachedSelectors[o];r||(r=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[o]=r);let n=null,l=null,c=null;if(s.globals.axisCharts||s.config.chart.type==="radialBar")if(s.globals.axisCharts){n=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const h=s.globals.seriesYAxisReverseMap[a];c=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${h}']`)}else n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let h=0;h<r.length;h++)r[h].classList.add(this.legendInactiveClass);if(n){if(!s.globals.axisCharts){const h=n.parentNode;h==null||h.classList.remove(this.legendInactiveClass)}n.classList.remove(this.legendInactiveClass),l!==null&&l.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass)}else for(let h=0;h<r.length;h++)r[h].classList.remove(this.legendInactiveClass)}toggleSeriesOnHover(t,e){const s=this.w;e||(e=t.target);const i=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");
30if(t.type==="mousemove"){const 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){const s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=n=>{for(let l=0;l<i.length;l++){const c=i[l].classList;typeof c[n]=="function"&&c[n](this.legendInactiveClass)}};if(e==="reset"){a("remove");return}const o=s.config.plotOptions.heatmap.colorScale.ranges,r=o&&o[t];if(r){a("add");for(let n=0;n<i.length;n++){const l=Number(i[n].getAttribute("val"));l>=r.from&&l<=r.to&&i[n].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(t="asc",e=[]){const s=this.w;let i=0;if(s.config.series.length>1){const a=s.config.series.map((o,r)=>{const n=()=>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&&n()?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;const a=this.w;if(!a.globals.axisCharts){a.globals.previousPaths=a.seriesData.series;return}a.globals.previousPaths=[];function o(c,h,d){const f=c[h].childNodes,p={type:d,paths:[],realIndex:c[h].getAttribute("data:realIndex")};for(let g=0;g<f.length;g++)if(f[g].hasAttribute("pathTo")){const u=f[g].getAttribute("pathTo");p.paths.push({d:u})}a.globals.previousPaths.push(p)}const r=c=>a.dom.baseEl.querySelectorAll(`.apexcharts-${c}-series .apexcharts-series`);["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(c=>{const h=r(c);for(let d=0;d<h.length;d++)o(h,d,c)});const l=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);if(l.length>0)for(let c=0;c<l.length;c++){const h=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${c}'] rect`),d=[];for(let f=0;f<h.length;f++){const p=u=>h[f].getAttribute(u),g={x:parseFloat((t=p("x"))!=null?t:"0"),y:parseFloat((e=p("y"))!=null?e:"0"),width:parseFloat((s=p("width"))!=null?s:"0"),height:parseFloat((i=p("height"))!=null?i:"0")};d.push({rect:g,color:h[f].getAttribute("color")})}a.globals.previousPaths.push(d)}}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,e=this,s=t.config.noData,i=new R(e.w);let 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!==""){const n=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(n)}}setNullSeriesToZeroValues(t){const 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;const 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:[])}}class ks{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}checkHeatmapDistributed(){const{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(){const{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;const e=this.w,s=new T;e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`);const 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);const 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}const 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));const 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){const 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)=>{const 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){const{color:i,shadeIntensity:a,shadeTo:o}=t,r=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,n=1/(r/a);let l=0;return Array.from({length:r},()=>{const c=o==="dark"?s.shadeColor(l*-1,i):s.shadeColor(l,i);return l+=n,c})}applyColorTypes(t,e){const s=this.w;t.forEach(i=>
30{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){const 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(){const 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){const 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){const i=this.w;let 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){const o=a-t.length;for(let r=0;r<o;r++)t.push(t[r])}}getColorBlindColors(t){const e=le();return({deuteranopia:e.cvdDeuteranopia,protanopia:e.cvdProtanopia,tritanopia:e.cvdTritanopia,highContrast:e.highContrast}[t]||e.palette1).slice()}updateThemeOptions(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};const e=t.theme.mode,s=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(){const t=this.w.config.theme.palette,e=le();return e[t]||e.palette1}}class Ls{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){const e=this.w,s=t==="title"?e.config.title:e.config.subtitle;let 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){const n=new R(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});n.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(n)}}}let Ds=class{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){const e=this.w;let s=0,i=0;const a=t==="title"?e.config.title.floating:e.config.subtitle.floating,o=e.dom.baseEl.querySelector(`.apexcharts-${t}-text`);if(o!==null&&!a){const r=o.getBoundingClientRect();s=r.width,i=e.globals.axisCharts?r.height+5:r.height}return{width:s,height:i}}getLegendsRect(){const 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");const s=Object.assign({},T.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(){const t=this.w,e=[];t.config.series.forEach((r,n)=>{r.data.forEach((l,c)=>{const d=(f=>t.config.dataLabels.formatter(f,{seriesIndex:n,dataPointIndex:c,w:t}))(t.seriesData.series[n][c]);e.push(d)})});const s=T.getLargestStringFromArr(e),i=new R(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){const s=this.w;let i=t;if(s.axisFlags.isMultiLineX){const a=e.map(n=>Array.isArray(n)?n.length:1),o=Math.max(...a),r=a.indexOf(o);i=e[r]}return i}};class Ms{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let e=t.labelData.labels.slice();t.config.xaxis.convertedCatToNumeric&&e.length===0&&(e=t.labelData.categoryLabels);let s;if(t.labelData.timescaleLabels.length>0){const i=this.getxAxisTimeScaleLabelsCoords();s={width:i.width,height:i.height},t.layout.rotateXLabels=!1}
30else{this.dCtx.lgWidthForSideLegends=(t.config.legend.position==="left"||t.config.legend.position==="right")&&!t.config.legend.floating?this.dCtx.lgRect.width:0;const i=t.formatters.xLabelFormatter;let a=T.getLargestStringFromArr(e),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,e);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((d,f)=>d.length>f.length?d:f,0),o=a);const r=new zt(this.w),n=a;a=r.xLabelFormat(i,a,n,{i:void 0,dateFormatter:new lt(this.w).formatDate,w:t}),o=r.xLabelFormat(i,o,n,{i:void 0,dateFormatter:new lt(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&typeof a>"u"||String(a).trim()==="")&&(a="1",o=a);const l=new R(this.w);let c=l.getTextRects(a,t.config.xaxis.labels.style.fontSize),h=c;if(a!==o&&(h=l.getTextRects(o,t.config.xaxis.labels.style.fontSize)),s={width:c.width>=h.width?c.width:h.width,height:c.height>=h.height?c.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;const d=f=>l.getTextRects(f,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);c=d(a),a!==o&&(h=d(o)),s.height=(c.height>h.height?c.height:h.height)/1.5,s.width=c.width>h.width?c.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;const e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};const 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);let a;const o=T.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,i),n=new R(this.w),l=n.getTextRects(o,s);let c=l;return o!==r&&(c=n.getTextRects(r,s)),a={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){const t=this.w;let e=0,s=0;if(t.config.xaxis.title.text!==void 0){const a=new R(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(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(r=>r.value),s=e.reduce((r,n)=>typeof r>"u"?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):r.length>n.length?r:n,0),a=new R(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){const e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,o=t.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;const r=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,n=h=>s.collapsedSeriesIndices.indexOf(h)!==-1,l=h=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const d=this.dCtx.timescaleLabels[0],p=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+o/1.75-this.dCtx.yAxisWidthRight,g=d.position-o/1.75+this.dCtx.yAxisWidthLeft,u=e.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;p>s.svgWidth-e.layout.translateX-u&&(s.skipLastTimelinelabel=!0),g<-((!h.show||h.floating)&&(i.chart.type==="bar"||i.chart.type==="candlestick"||i.chart.type==="rangeBar"||i.chart.type==="boxPlot"||i.chart.type==="violin")?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)},c=(h,d)=>{i.yaxis.length>1&&n(d)||l(h)};i.yaxis.forEach((h,d)=>{r?(this.dCtx.gridPad.left<o&&(this.dCtx.xPadLeft=o/2+1),this.dCtx.xPadRight=o/2+1):c(h,d)})}}class Ts{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){const t=this.w,e=0,s=0,i=[];let a=10;const o=new bt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return t.config.yaxis.map((r,n)=>{const l={seriesIndex:n,dataPointIndex:-1,w:t},c=t.globals.yAxisScale[n];let h=0;if(!o.isYAxisHidden(n)&&r.labels.show&&r.labels.minWidth!==void 0&&(h=r.labels.minWidth),!o.isYAxisHidden(n)&&r.labels.show&&c.result.length){const d=t.formatters.yLabelFormatters[n],f=c.niceMin===Number.MIN_VALUE?0:c.niceMin;let p=c.result.reduce((m,y)=>{var v,C;return((v=String(d(m,l)))==null?void 0:v.length)>((C=String(d(y,l)))==null?void 0:C.length)?m:y},f);p=d(p,l);let g=p;if((typeof p>"u"||p.length===0)&&(p=c.niceMax),String(p).length===1&&(p=p+".0",g=p),t.globals.isBarHorizontal){a=0;const m=t.labelData.labels.slice();p=T.getLargestStringFromArr(m),p=d(p,{seriesIndex:n,dataPointIndex:-1,w:t}),g=this.dCtx.dimHelpers.getLargestStringFromMultiArr(p,m)}const u=new R(this.w),x="rotate(".concat(r.labels.rotate," 0 0)"),b=u.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1);let w=b;p!==g&&(w=u.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>w.width||h>b.width?h:w.width>
vendor: 16,333 bytes, line 30
30b.width?w.width:b.width)+a,height:w.height>b.height?w.height:b.height})}else i.push({width:e,height:s})}),i}getyAxisTitleCoords(){const t=this.w,e=[];return t.config.yaxis.map(s=>{if(s.show&&s.title.text!==void 0){const i=new R(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(){const t=this.w;let e=0,s=0,i=0;const a=t.globals.yAxisScale.length>1?10:0,o=new bt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),r=function(l){return t.globals.ignoreYAxisIndexes.indexOf(l)>-1},n=(l,c)=>{const h=t.config.yaxis[c].floating;let d=0;l.width>0&&!h?(d=l.width+a,r(c)&&(d=d-l.width-a)):d=h||o.isYAxisHidden(c)?0:5,t.config.yaxis[c].opposite?i=i+d:s=s+d,e=e+d};return t.layout.yLabelsCoords.map((l,c)=>{n(l,c)}),t.layout.yTitleCoords.map((l,c)=>{n(l,c)}),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.layout.yLabelsCoords[0].width+t.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=s,this.dCtx.yAxisWidthRight=i,e}}class Ps{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){const{w:e}=this,{config:s,globals:i}=e;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;const a=h=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(h),o=s.chart.type;let r=0,n=a(o)?s.series.length:1;i.comboBarCount>0&&(n=i.comboBarCount),i.collapsedSeries.forEach(h=>{a(h.type)&&(n-=1)}),s.chart.stacked&&(n=1);const l=a(o)||i.comboBarCount>0;let c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&n>0&&c!==0){c<=3&&(c=i.dataPoints);const h=c/t;let 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(){const{w:t}=this,{globals:e}=t;let 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);const 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){const{w:s}=this,i=new bt(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))})}}class Ut{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 Ds(this),this.dimYAxis=new Ts(this),this.dimXAxis=new Ms(this),this.dimGrid=new Ps(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};const s=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width;this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([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;const 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(){const t=this.w,e=t.globals,s=this.dimYAxis.getyAxisLabelsCoords(),i=this.dimYAxis.getyAxisTitleCoords();e.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.layout.yLabelsCoords=[],t.layout.yTitleCoords=[],t.config.yaxis.map((f,p)=>{t.layout.yLabelsCoords.push({width:s[p].width,index:p}),t.layout.yTitleCoords.push({width:i[p].width,index:p})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const 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 n=this.yAxisWidth,l=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 c=10;(t.config.chart.type==="radar"||this.isSparkline)&&(n=0,l=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||t.config.chart.type==="treemap")&&(n=0,l=0,c=0),!this.isSparkline&&t.config.chart.type!=="treemap"&&this.dimXAxis.additionalPaddingXLabels(a);const h=()=>{t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-this.lgRect.height-l-(!this.isSparkline&&t.config.chart.type!=="treemap"?t.layout.rotateXLabels?10:15:0),t.layout.gridWidth=e.svgWidth-n-this.datalabelsCoords.width*2};switch(t.config.xaxis.position==="top"&&(c=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=c,h();break;case"top":t.layout.translateY=this.lgRect.height+c,h();break;case"left":t.layout.translateY=c,t.layout.translateX=this.lgRect.width+n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-this.datalabelsCoords.width*2;break;case"right":t.layout.translateY=c,t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-this.datalabelsCoords.width*2-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(i,s),new ye(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){const t=this.w,e=t.globals,s=t.config;let i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);const a=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;const n=t.dom.elWrap.getBoundingClientRect().width;t.layout.gridWidth=Math.min(n,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){const i=this.w,a=i.labelData.hasXaxisGroups?2:1,o=s.height+t.height+e.height,r=i.axisFlags.isMultiLineX?1.2:ze,n=i.layout.rotateXLabels?22:10,c=i.layout.rotateXLabels&&i.config.legend.position==="bottom"?10:0;this.xAxisHeight=o*r+a*n+c,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(f=>{h+=f.labels.minWidth,d+=f.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>d&&(this.yAxisWidth=d)}}const Ft=1e3,Rt=60*Ft,Xt=60*Rt,Mt=24*Xt,Ce=7*Mt,se=30*Mt,wt=365*Mt,Es=10/(1440*60),ie=[{unit:"second",step:1,approxMs:Ft},{unit:"second",step:5,approxMs:5*Ft},{unit:"second",step:15,approxMs:15*Ft},{unit:"second",step:30,approxMs:30*Ft},{unit:"minute",step:1,approxMs:Rt},{unit:"minute",step:5,approxMs:5*Rt},{unit:"minute",step:15,approxMs:15*Rt},{unit:"minute",step:30,approxMs:30*Rt},{unit:"hour",step:1,approxMs:Xt},{unit:"hour",step:3,approxMs:3*Xt},{unit:"hour",step:6,approxMs:6*Xt},{unit:"hour",step:12,approxMs:12*Xt},{unit:"day",step:1,approxMs:Mt},{unit:"day",step:2,approxMs:2*Mt},{unit:"week",step:1,approxMs:Ce},{unit:"week",step:2,approxMs:2*Ce},{unit:"month",step:1,approxMs:se},{unit:"month",step:3,approxMs:3*se},{unit:"month",step:6,approxMs:6*se},{unit:"year",step:1,approxMs:wt},{unit:"year",step:2,approxMs:2*wt},{unit:"year",step:5,approxMs:5*wt},{unit:"year",step:10,approxMs:10*wt},{unit:"year",step:25,approxMs:25*wt},{unit:"year",step:50,approxMs:50*wt},{unit:"year",step:100,approxMs:100*wt}],Ze=10;class _s{constructor(t,e){this.w=t,this.ctx=e,this.tickInterval=null,this.timeScaleArray=[],this.utc=t.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){const s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const i=e-t,a=i/Mt;s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<Es?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);const o=Number.isFinite(s.config.xaxis.tickAmount)?s.config.xaxis.tickAmount:Ze;this.tickInterval=Fs(i,o);const r=this.generateBaseTicks(t,e,this.tickInterval);return this.timeScaleArray=r,r}generateBaseTicks(t,e,s){const i=this.w,a=new lt(i),o=this.utc,r=i.layout.gridWidth,n=e-t,l=[];let c=a.ceilToBoundary(t,s.unit,s.step,o),h=0;const d=5e3;for(;c<=e&&h<d;){const f=a.getDateFields(c,o),p=n>0?(c-t)/n*r:0;l.push({timestamp:c,position:p,unit:s.unit,year:f.year,month:f.month+1,day:f.date,hour:f.hour,minute:f.minute,second:f.second,value:c}),c=a.addInterval(c,s.unit,s.step,o),h++}return l}recalcDimensionsBasedOnFormat(t){const e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();const o=new Ut(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(o.layout)}formatDates(t){const e=this.w,s=new lt(e),i=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,o=this.utc,r=(l,c=2)=>String(l).padStart(c,"0"),n=i||this._effectiveFormat(t,a);return t.map(l=>{const c=s.getDate(l.timestamp),h=s.formatDate(c,n);return{dateString:`${l.year}-${r(l.month)}-${r(l.day)}T${r(l.hour)}:${r(l.minute)}:${r(l.second)}.000${o?"Z":""}`,position:l.position,value:h,unit:l.unit,year:l.year,month:l.month}})}_effectiveFormat(t,e){if(t.length===0)return e.day||"dd MMM";const s=this.tickInterval&&this.tickInterval.unit||t[0].unit,i=e[s==="week"?"day":s]||e.day||"dd MMM",a=t[0],o=t[t.length-1],r=a.year!==o.year,l=r||a.month!==o.month||a.day!==o.day,c=/y/i.test(i),h=/M/.test(i),d=/d/i.test(i);return s==="month"||s==="week"||s==="day"?r&&!c?i+" yyyy":i:(s==="hour"||s==="minute"||s==="second")&&l&&!d&&!h?(r?"dd MMM yyyy":"dd MMM")+" "+i:i}removeOverlappingTS(t){if(t.length===0)return[];const e=this.w,s=new R(e);let i=!1,a;t[0].value&&t.every(n=>n.value.length===t[0].value.length)&&(i=!0,a=s.getTextRects(t[0].value,e.config.xaxis.labels.style.fontSize).width);let o=0;return t.map((n,l)=>{if(l===0||!e.config.xaxis.labels.hideOverlappingLabels)return n;const c=i?a:s.getTextRects(t[o].value,e.config.xaxis.labels.style.fontSize).width,h=t[o].position;return n.position>h+c+10?(o=l,n):null}).filter(n=>n!==null)}}function Fs(A,t){if((!Number.isFinite(t)||t<=0)&&(t=Ze),A<=0)return ie[0];const e=A/t;let s=ie[0],i=1/0;for(const a of ie){const o=Math.abs(Math.log(a.approxMs/e));o<i&&(i=o,s=a)}return s}const he="__apexcharts_registry__";globalThis[he]||(globalThis[he]={});function je(){return globalThis[he]}function Rs(A){Object.assign(je(),A)}function rt(A){const t=je()[A];if(!t)throw new Error(`ApexCharts: chart type "${A}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return t}class Xs{constructor(t,e,s){this.w=e,this.ctx=s,this.el=t}setupElements(){const{globals:t,config:e}=this.w,s=e.chart.type,i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],a=[...i,"radar","heatmap","treemap"];t.axisCharts=a.includes(s),t.xyCharts=i.includes(s),t.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(s)&&e.plotOptions.bar.horizontal,t.chartClass=`.apexcharts${t.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=B.createElementNS("http://www.w3.org/1999/xhtml","div"),R.setAttrs(this.w.dom.elWrap,{id:t.chartClass.substring(1),class:`apexcharts-canvas ${t.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);const o=globalThis.SVG;if(this.w.dom.Paper=o().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${e.chart.offsetX}, ${e.chart.offsetY})`}),this.w.dom.Paper.node.style.background=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=B.createElementNS(Z,"foreignObject"),R.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=B.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),e.chart.accessibility.enabled&&e.chart.accessibility.announcements.enabled){const r=B.createElement("div");r.className="apexcharts-sr-status",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true"),this.w.dom.elWrap.appendChild(r)}if(e.chart.accessibility.enabled){const r=this.getAccessibleChartLabel(),n=e.chart.accessibility.keyboard.enabled&&e.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:n,"aria-label":r}),e.chart.accessibility.description){const l=B.createElementNS(Z,"desc");l.textContent=e.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(l,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}
30),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}plotChartType(t,e){const{w:s,ctx:i}=this,{config:a,globals:o}=s,r={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},n=a.chart.type||"line";let l=null,c=0;this.w.seriesData.series.forEach((m,y)=>{var v,C;const D=((v=t[y])==null?void 0:v.type)==="column"?"bar":((C=t[y])==null?void 0:C.type)||(n==="column"?"bar":n),S=r;S[D]?(D==="rangeArea"?(S[D].series.push(this.w.rangeData.seriesRangeStart[y]),S[D].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[y])):S[D].series.push(m),S[D].i.push(y),D==="bar"&&(s.globals.columnSeries=r.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(D)?l=D:console.warn(`You have specified an unrecognized series type (${D}).`),n!==D&&D!=="scatter"&&c++}),c>0&&(l&&console.warn(`Chart or series type ${l} cannot appear with other chart or series types.`),r.bar.series.length>0&&a.plotOptions.bar.horizontal&&(c-=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=c>0);const 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(rt("line"))(i.w,i,e):null,p=r.candlestick.series.length>0||r.boxPlot.series.length>0||!o.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(rt("candlestick"))(i.w,i,e):null,u=r.violin.series.length>0||!o.comboCharts&&a.chart.type==="violin"?new(rt("violin"))(i.w,i,e):null,x=!o.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=x?new(rt("pie"))(i.w,i):null;const b=r.rangeBar.series.length>0||!o.comboCharts&&a.chart.type==="rangeBar";i.rangeBar=b?new(rt("rangeBar"))(i.w,i,e):null;let w=[];if(o.comboCharts){const m=new et(this.w);if(r.area.series.length>0&&w.push(...m.drawSeriesByGroup(r.area,o.areaGroups,"area",d)),r.bar.series.length>0)if(a.chart.stacked){const y=new(rt("barStacked"))(i.w,i,e);w.push(y.draw(r.bar.series,r.bar.i))}else i.bar=new(rt("bar"))(i.w,i,e),w.push(i.bar.draw(r.bar.series,r.bar.i));if(r.rangeArea.series.length>0&&w.push(d.draw(r.rangeArea.series,"rangeArea",r.rangeArea.i,r.rangeArea.seriesRangeEnd)),r.line.series.length>0&&w.push(...m.drawSeriesByGroup(r.line,o.lineGroups,"line",d)),r.candlestick.series.length>0&&w.push(p.draw(r.candlestick.series,"candlestick",r.candlestick.i)),r.boxPlot.series.length>0&&w.push(p.draw(r.boxPlot.series,"boxPlot",r.boxPlot.i)),r.violin.series.length>0&&w.push(u.draw(r.violin.series,"violin",r.violin.i)),r.rangeBar.series.length>0&&w.push(i.rangeBar.draw(r.rangeBar.series,r.rangeBar.i)),r.scatter.series.length>0){const y=new(rt("line"))(i.w,i,e,!0);w.push(y.draw(r.scatter.series,"scatter",r.scatter.i))}if(r.bubble.series.length>0){const y=new(rt("line"))(i.w,i,e,!0);w.push(y.draw(r.bubble.series,"bubble",r.bubble.i))}}else{const m=a.chart.type;switch(m){case"line":w=d.draw(this.w.seriesData.series,"line");break;case"area":w=d.draw(this.w.seriesData.series,"area");break;case"bar":a.chart.stacked?w=new(rt("barStacked"))(i.w,i,e).draw(this.w.seriesData.series):(i.bar=new(rt("bar"))(i.w,i,e),w=i.bar.draw(this.w.seriesData.series));break;case"candlestick":w=p.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":w=p.draw(this.w.seriesData.series,m);break;case"violin":w=u.draw(this.w.seriesData.series,"violin");break;case"rangeBar":w=i.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":w=d.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{w=new(rt("heatmap"))(i.w,i,e).draw(this.w.seriesData.series);break}case"treemap":{w=new(rt("treemap"))(i.w,i).draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":w=i.pie.draw(this.w.seriesData.series);break;case"radialBar":{w=new(rt("radialBar"))(i.w,i).draw(this.w.seriesData.series);break}case"radar":{w=new(rt("radar"))(i.w,i).draw(this.w.seriesData.series);break}default:w=d.draw(this.w.seriesData.series)}}return w}setSVGDimensions(){var t;const{globals:e,config:s}=this.w;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto";const i=s.chart.width,a=s.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let o=T.getDimensions(this.el);const r=i.toString().split(/[0-9]+/g).pop();r==="%"?T.isNumber(o[0])&&(o[0].width===0&&(o=T.getDimensions(this.el.parentNode)),e.svgWidth=o[0]*parseInt(i,10)/100):(r==="px"||r==="")&&(e.svgWidth=parseInt(i,10));const n=String(a).toString().split(/[0-9]+/g).pop();if(a!=="auto"&&a!=="")if(n==="%"){const l=T.getDimensions(this.el.parentNode);e.svgHeight=l[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),R.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),n!=="%"&&W.isBrowser()){const l=e.axisCharts&&(s.grid.show||s.dataLabels.enabled||s.xaxis.labels.show||s.xaxis.axisBorder.show||s.xaxis.axisTicks.show||s.yaxis.some(d=>d.show&&(d.labels.show||d.axisBorder.show||d.axisTicks.show))),c=s.chart.sparkline.enabled||!l?0:s.chart.parentHeightOffset,h=this.w.dom.Paper.node;(t=h.parentNode)!=null&&t.parentNode&&(h.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(){const{globals:t}=this.w,{translateY:e,translateX:s}=t;R.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e,s,i,a,o;const{w:r}=this,n=r.config.chart.height?String(r.config.chart.height):"",l=n!==""&&n!=="auto",c=n.includes("%");let h=0,d=r.config.chart.sparkline.enabled?1:15;d+=r.config.grid.padding.bottom,["top","bottom"].includes(r.config.legend.position)&&r.config.legend.show&&!r.config.legend.floating&&(h=((e=(t=this.ctx.legend)==null?void 0:t.legendHelpers.getLegendDimensions().clwh)!=null?e:0)+
307);const f=r.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),p=r.globals.pieExternalLabelMarginY||0;let g=p>0?r.globals.radialSize*2+p*2:r.globals.radialSize*2.05;const u=Math.abs(r.config.plotOptions.radialBar.endAngle-r.config.plotOptions.radialBar.startAngle);if(f&&!r.config.chart.sparkline.enabled&&u<360){const b=T.getBoundingClientRect(this.w.dom.Paper.node);let w=1/0,m=-1/0;const y=L=>{var P,E,_,X;if((P=L.classList)!=null&&P.contains("apexcharts-radialbar-hollow"))return;const F=(_=(E=L.tagName)==null?void 0:E.toLowerCase)==null?void 0:_.call(E);if(F==="text"||F==="tspan")return;const z=Array.from((X=L.children)!=null?X:[]);if(z.length>0){z.forEach(H=>y(H));return}const O=T.getBoundingClientRect(L);if(O.bottom-O.top>0){const H=O.top-b.top,I=O.bottom-b.top;H<w&&(w=H),I>m&&(m=I)}};Array.from((s=f.children)!=null?s:[]).forEach(L=>y(L)),Number.isFinite(w)||(w=0),Number.isFinite(m)||(m=T.getBoundingClientRect(f).bottom-b.top);const v=Math.max(d,r.globals.radialSize*.2),C=Math.max(v-w,0);C!==0&&(r.layout.translateY=((i=r.layout.translateY)!=null?i:0)+C,R.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${(a=r.layout.translateX)!=null?a:0}, ${r.layout.translateY})`}),m+=C),g=m>0?m:r.globals.radialSize*2.05;const D=Math.max(v,w),S=Math.ceil(g+h+D),k=(o=r.config.chart.offsetY)!=null?o:0,M=S+Math.max(k,0);c||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(M)),this.w.dom.elWrap.style.height=`${M}px`,R.setAttrs(this.w.dom.Paper.node,{height:S}),W.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${M}px`));return}const x=Math.ceil(g+this.w.layout.translateY+h+d);l||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(x)),this.w.dom.elWrap.style.height=`${x}px`,R.setAttrs(this.w.dom.Paper.node,{height:x}),W.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${x}px`))}coreCalculations(){new ne(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new We,{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(){const{w:t}=this;let e=null;if(t.globals.axisCharts){if(t.config.xaxis.crosshairs.position==="back"&&new ce(this.w).drawXCrosshairs(),t.config.yaxis[0].crosshairs.position==="back"&&new ce(this.w).drawYCrosshairs(),t.config.xaxis.type==="datetime"&&t.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new _s(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 et(this.w).getCalculatedRatios()}return e}updateSourceChart(t){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:t,w:e}=this;if(e.config.chart.brush.enabled&&typeof e.config.chart.events.selection!="function"){const s=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];s.forEach(i=>{const 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(){const t=this.w,e=t.config;if(e.chart.accessibility&&e.chart.accessibility.description)return e.chart.accessibility.description;const s=e.chart.type,i=[];if(e.title.text)i.push(`${e.title.text}. ${s} chart`),e.subtitle.text&&i.push(e.subtitle.text);else{const a=Array.isArray(t.seriesData.seriesNames)&&t.seriesData.seriesNames.length?t.seriesData.seriesNames.filter(
30Boolean):Array.isArray(e.series)?e.series.map(r=>typeof r=="object"&&r!==null?r.name:null).filter(Boolean):[],o=t.seriesData.series.length||(e.series?e.series.length:0);a.length?i.push(`${s} chart with ${o} data series: ${a.join(", ")}`):i.push(`${s} chart with ${o} data series`)}return i.join(". ")}}class xt{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 et(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series,e=new tt(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();const 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;const e=this.getFirstDataPoint();if(!e||typeof e.x>"u")return!1;const s=(t=this.w.config.series[this.activeSeriesIndex])==null?void 0:t.data;if(s){const 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(){const t=this.getFirstDataPoint();return t&&Array.isArray(t)}handleFormat2DArray(t,e){const 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++){const r=i[o],n=r[0],l=r[1],c=r[2];if(typeof l<"u"&&(Array.isArray(l)&&l.length===4&&!a?this.twoDSeries.push(T.parseNumber(l[3])):r.length>=5?this.twoDSeries.push(T.parseNumber(r[4])):this.twoDSeries.push(T.parseNumber(l)),this.w.axisFlags.dataFormatXNumeric=!0),s.xaxis.type==="datetime"){const h=new Date(n).getTime();this.twoDSeriesX.push(h)}else this.twoDSeriesX.push(n);typeof c<"u"&&(this.threeDSeries.push(c),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){const s=this.w.config,i=this.w.globals,a=new lt(this.w),o=t[e].data;let r=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);const n=t[r].data;for(let l=0;l<o.length;l++){const c=o[l];if(typeof c.y<"u"){const h=Array.isArray(c.y)?T.parseNumber(c.y[c.y.length-1]):T.parseNumber(c.y);this.twoDSeries.push(h)}typeof this.seriesGoals[e]>"u"&&(this.seriesGoals[e]=[]),typeof c.goals<"u"&&Array.isArray(c.goals)?this.seriesGoals[e].push(c.goals):this.seriesGoals[e].push(null),typeof c.z<"u"&&(this.threeDSeries.push(c.z),this.w.axisFlags.isDataXYZ=!0)}for(let l=0;l<n.length;l++){const h=n[l].x,d=typeof h=="string",f=Array.isArray(h),p=!f&&!!a.isValidDate(h);if(d||p)if(d||s.xaxis.convertedCatToNumeric){const g=i.isBarHorizontal&&this.w.axisFlags.isRangeData;s.xaxis.type==="datetime"&&!g?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 f?(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=>{const o=a.y,r=o.length;if(!(r<=1))for(let n=0;n<r;n++){const l=o[n],c=l.y1,h=l.y2;for(let d=n+1;d<r;d++){const f=o[d],p=f.y1,g=f.y2;if(c<=g&&p<=h){const u=a;u.overlaps.add(l.rangeName),u.overlaps.add(f.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,this.w.candleData.seriesBoxPoints[e]=s.points||[],s}handleViolinData(t,e){var s,i,a,o,r,n;const l=this.w,c=t[e].data,h=[],d=[],f=[],p=[],g=[];for(let u=0;u<c.length;u++){const x=c[u],b=(a=(i=(s=x==null?void 0:x.y)==null?void 0:s.density)!=null?i:x==null?void 0:x[1])!=null?a:[],w=(n=(r=(o=x==null?void 0:x.y)==null?void 0:o.points)!=null?r:x==null?void 0:x[2])!=null?n:[],m=[],y=[];let v=0,C=null,D=1/0,S=-1/0;for(let M=0;M<b.length;M++){const L=T.parseNumber(b[M][0]),P=T.parseNumber(b[M][1]);L===null||P===null||(m.push(L),y.push(P),P>v&&(v=P,C=L),L<D&&(D=L),L>S&&(S=L))}const k=[];for(let M=0;M<w.length;M++){const L=T.parseNumber(w[M]);L!==null&&(k.push(L),L<D&&(D=L),L>S&&(S=L))}h.push({values:m,weights:y,maxWeight:v}),d.push(k),f.push(D===1/0?0:D),p.push(S===-1/0?0:S),g.push(C!==null?C:k.length?k[Math.floor(k.length/2)]:0)}l.violinData.seriesViolinDensity[e]=h,l.violinData.seriesViolinPoints[e]=d,l.violinData.seriesViolinMin[e]=f,l.violinData.seriesViolinMax[e]=p,this.twoDSeries=g}handleRangeDataFormat(t,e,s){const i=[],a=[],o=new Map,r=[];if(e[s].data.forEach(n=>{if(!o.has(n.x)){const l={x:n.x,overlaps:new Set,y:[]};o.set(n.x,l),r.push(l)}}),t==="array")for(let n=0;n<e[s].data.length;n++)Array.isArray(e[s].data[n])?(i.push(e[s].data[n][1][0]),a.push(e[s].data[n][1][1])):(i.push(e[s].data[n]),a.push(e[s].data[n]));else if(t==="xy")for(let n=0;n<e[s].data.length;n++){const l=Array.isArray(e[s].data[n].y),c=T.randomId(),h=e[s].data[n].x,d={y1:l?e[s].data[n].y[0]:e[s].data[n].y,y2:l?e[s].data[n].y[1]:e[s].data[n].y,rangeName:c};e[s].data[n].rangeName=c;const f=o.get(h);f&&f.y.push(d),i.push(d.y1),a.push(d.y2)}return{start:i,end:a,rangeUniques:r}}handleCandleStickBoxDataFormat(t,e,s){const i=this.w,a=i.config.chart.type==="boxPlot"||i.config.series[s].type==="boxPlot",o=[],r=[],n=[],l=[],c=[],h=[],d=e[s].data;let f;t==="array"?a&&d[0].length===6||!a&&d[0].length===5?f=g=>g.slice(1):f=g=>Array.isArray(g[1])?g[1]:[]:f=p=>Array.isArray(p.y)?p.y:[];for(let p=0;p<d.length;p++){const g=f(d[p]);g&&g.length>=2&&(o.push(g[0]),r.push(g[1]),a?(n.push(g[2]),l.push(g[3]),c.push(g[4])):(l.push(g[2]),c.push(g[3])));const u=d[p]&&d[p].points;h.push(Array.isArray(u)?u:[])}return{o,h:r,m:n,l,c,points:h}}parseDataAxisCharts(t){var e,s,i,a,o,r;const n=this.w.config,l=this.w.globals,c=new lt(this.w),h=n.labels.length>0?n.labels.slice():n.xaxis.categories.slice();this.w.axisFlags.isRangeBar=n.chart.type==="rangeBar"&&l.isBarHorizontal,this.w.labelData.hasXaxisGroups=n.xaxis.type==="category"&&n.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=n.xaxis.group.groups),t.forEach((g,u)=>{g.name!==void 0?this.w.seriesData.seriesNames.push(g.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(u+1),10))}),this.coreUtils.setSeriesYAxisMappings();const d=[],f=[...new Set(n.series.map(g=>g.group))];
30n.series.forEach((g,u)=>{const x=f.indexOf(g.group);d[x]||(d[x]=[]),d[x].push(this.w.seriesData.seriesNames[u])}),this.w.labelData.seriesGroups=d;const p=()=>{for(let g=0;g<h.length;g++)if(typeof h[g]=="string")if(c.isValidDate(h[g]))this.twoDSeriesX.push(c.parseDate(h[g]));else throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");else this.twoDSeriesX.push(h[g])};for(let g=0;g<t.length;g++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],typeof t[g].data>"u"){console.error("It is a possibility that you may have not included 'data' property in series.");return}const u=n.chart.dataReducer,x=(s=(e=l.dataReducerRawSeries)==null?void 0:e[g])==null?void 0:s.data;if(u!=null&&u.enabled&&this.isMultiFormat()&&Array.isArray(x)&&x.length>((i=u.threshold)!=null?i:500)){const b=(a=u.targetPoints)!=null?a:250,w=n.xaxis.min,m=n.xaxis.max,y=w==null&&m==null?x:xt.sliceByXRange(x,w,m);let v=y;if(y.length>b){const C=Array.isArray(y[0])?(r=y[0])==null?void 0:r[1]:(o=y[0])==null?void 0:o.y;Array.isArray(C)?C.length===4?v=xt.ohlcAggregate(y,b):C.length===2&&(v=xt.rangeAggregate(y,b)):v=xt.lttbDownsample(y,b)}t[g]=G($({},t[g]),{data:v})}if((n.chart.type==="rangeBar"||n.chart.type==="rangeArea"||t[g].type==="rangeBar"||t[g].type==="rangeArea")&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,g)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,g):this.isFormatXY()&&this.handleFormatXY(t,g),(n.chart.type==="candlestick"||t[g].type==="candlestick"||n.chart.type==="boxPlot"||t[g].type==="boxPlot")&&this.handleCandleStickBoxData(t,g),(n.chart.type==="violin"||t[g].type==="violin")&&this.handleViolinData(t,g),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,g===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{n.xaxis.type==="datetime"?(this.w.axisFlags.isXNumeric=!0,p(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):n.xaxis.type==="numeric"&&(this.w.axisFlags.isXNumeric=!0,h.length>0&&(this.twoDSeriesX=h,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const b=t[g].data.map(w=>T.parseNumber(w));this.w.seriesData.series.push(b)}this.w.seriesData.seriesZ.push(this.threeDSeries),t[g].color!==void 0?this.w.seriesData.seriesColors.push(t[g].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(t){const 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}const 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=>{const r=T.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(){const 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){const 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:[]};const 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)=>
30{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(T.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){const e=this.w.config;if(e.xaxis.categories.length>0)this.w.labelData.labels=e.xaxis.categories;else if(e.labels.length>0)this.w.labelData.labels=e.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(i=>{i.forEach(a=>{this.w.labelData.labels.indexOf(a.x)<0&&a.x&&this.w.labelData.labels.push(a.x)})});const 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{const i=new Map;for(const a of s){const o=JSON.stringify(a);i.has(o)||i.set(o,a)}this.w.labelData.labels=Array.from(i.values())}}e.xaxis.convertedCatToNumeric&&(new Yt(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t))}else this._generateExternalLabels(t)}_generateExternalLabels(t){const e=this.w.globals,s=this.w.config;let i=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const a=s.series.map(r=>{const n=new Map;for(const l of r.data)n.has(l.x)||n.set(l.x,l);return Array.from(n.values())}),o=a.reduce((r,n,l,c)=>c[r].length>n.length?r:l,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){const e=this.w.config,s=this.w.globals,i=e.parsing;if(this.w.axisFlags.dataWasParsed||!i&&!t.some(o=>o.parsing))return t;const a=t.map((o,r)=>{var n,l,c;if(!o.data||!Array.isArray(o.data)||o.data.length===0)return o;const h={x:((n=o.parsing)==null?void 0:n.x)||(i==null?void 0:i.x),y:((l=o.parsing)==null?void 0:l.y)||(i==null?void 0:i.y),z:((c=o.parsing)==null?void 0:c.z)||(i==null?void 0:i.z)};if(!h.x&&!h.y)return o;const 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;const f=o.data.map((p,g)=>{if(typeof p!="object"||p===null)return console.warn(`ApexCharts: Series ${r}, data point ${g} is not an object, skipping parsing`),p;const u=this.getNestedValue(p,h.x);let x,b;if(Array.isArray(h.y)){const m=h.y.map(y=>this.getNestedValue(p,y));this.w.config.chart.type==="bubble"?(m.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)}`),x=m[0]):x=m}else x=this.getNestedValue(p,h.y);h.z&&(b=this.getNestedValue(p,h.z)),u===void 0&&console.warn(`ApexCharts: Series ${r}, data point ${g} missing field '${h.x}'`),x===void 0&&console.warn(`ApexCharts: Series ${r}, data point ${g} missing field '${h.y}'`);const w={x:u,y:x,z:void 0};if(this.w.config.chart.type==="bubble"&&Array.isArray(h.y)&&h.y.length===2){const m=this.getNestedValue(p,h.y[1]);m!==void 0&&(w.z=m)}return b!==void 0&&(w.z=b),w});return G($({},o),{data:f,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=T.clone(t)),a}getNestedValue(t,e){if(!t||typeof t!="object"||!e)return;if(e.indexOf(".")===-1)return t[e];const s=e.split(".");let i=t;for(let a=0;a<s.length;a++){if(i==null||typeof i!="object")return;i=i[s[a]]}return i}
30expandScatterJitterData(t){var e,s;const i=this.w.config,a=i.chart.type==="scatter"||i.chart.type==="bubble",o=(s=(e=i.plotOptions)==null?void 0:e.scatter)==null?void 0:s.jitter;if(!a||!o||!o.enabled||!Array.isArray(t))return t;if(!t.some(d=>Array.isArray(d==null?void 0:d.data)&&d.data.some(f=>f&&!Array.isArray(f)&&Array.isArray(f.y))))return i.xaxis.type!=="datetime"&&Array.isArray(i.xaxis.categories)&&i.xaxis.categories.length&&this._applyBandAxis(i.xaxis.categories.slice()),t;const n=[],l=new Map;t.forEach(d=>{Array.isArray(d==null?void 0:d.data)&&d.data.forEach(f=>{if(f&&Array.isArray(f.y)){const p=String(f.x);l.has(p)||(l.set(p,n.length),n.push(f.x))}})});const c=o.maxPoints||5e3,h=t.map(d=>{if(!Array.isArray(d==null?void 0:d.data))return d;const f=[];return d.data.forEach(p=>{if(p&&Array.isArray(p.y)){const g=l.get(String(p.x)),u=p.y,x=u.length>c?Math.ceil(u.length/c):1;for(let b=0;b<u.length;b+=x){const w=T.parseNumber(u[b]);w!==null&&f.push({x:g,y:w})}}else if(p&&typeof p=="object"&&!Array.isArray(p)){const g=String(p.x);f.push({x:l.has(g)?l.get(g):p.x,y:p.y})}else f.push(p)}),G($({},d),{data:f})});return this._applyBandAxis(n),h}_applyBandAxis(t){const e=this.w.config.xaxis,s=t.length;if(!s)return;const i=e._scatterBand=e._scatterBand||{};e.type="numeric",(e.min==null||i.min)&&(e.min=-1,i.min=!0),(e.max==null||i.max)&&(e.max=s,i.max=!0),(e.tickAmount==null||e.tickAmount==="dataPoints"||i.tick)&&(e.tickAmount=s+1,i.tick=!0),e.labels=e.labels||{};const a=e.labels.formatter;if(typeof a!="function"||a._scatterBand){const o=(r=>{const n=Math.round(r);return Math.abs(r-n)<1e-6&&t[n]!==void 0?t[n]:""});o._scatterBand=!0,e.labels.formatter=o}}parseData(t){var e,s,i,a,o,r;const n=this.w,l=n.config,c=n.globals;if(t=this.parseRawDataIfNeeded(t),t=this.expandScatterJitterData(t),(e=l.chart.dataReducer)!=null&&e.enabled&&c.axisCharts&&!c.dataReducerRawSeries){c.dataReducerRawSeries=t.map(p=>({data:Array.isArray(p==null?void 0:p.data)?p.data.slice():p==null?void 0:p.data}));let d=1/0,f=-1/0;for(const p of t){const g=p==null?void 0:p.data;if(!Array.isArray(g)||g.length===0)continue;const u=!Array.isArray(g[0]),x=u?(s=g[0])==null?void 0:s.x:(i=g[0])==null?void 0:i[0],b=u?(a=g[g.length-1])==null?void 0:a.x:(o=g[g.length-1])==null?void 0:o[0];typeof x=="number"&&(d=Math.min(d,x)),typeof b=="number"&&(f=Math.max(f,b))}d!==1/0&&(c.dataReducerRawMinX=d,c.dataReducerRawMaxX=f)}if(l.series=t,c.dataReducerRawSeries&&((r=l.chart.dataReducer)!=null&&r.enabled)){const d=c.dataReducerRawSeries;c.initialSeries=t.map((f,p)=>{var g,u,x;return G($({},f),{data:(x=(u=(g=d[p])==null?void 0:g.data)==null?void 0:u.slice())!=null?x:f.data})})}else c.initialSeries=T.clone(t);if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),c.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),l.chart.stacked){const d=new tt(this.w);this.w.seriesData.series=d.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),c.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||l.xaxis.type==="numeric"&&l.labels.length===0&&l.xaxis.categories.length===0)&&this.handleExternalLabelsData(t);const h=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let d=0;d<h.length;d++)if(Array.isArray(h[d])){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:c.initialSeries,originalSeries:c.originalSeries,stackedSeriesTotals:this.w.seriesData.stackedSeriesTotals,stackedSeriesTotalsByGroups:this.w.seriesData.stackedSeriesTotalsByGroups,noLabelsProvided:this.w.axisFlags.noLabelsProvi
30ded},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC,seriesBoxPoints:this.w.candleData.seriesBoxPoints},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static sliceByXRange(t,e,s){const i=t.length;if(i===0)return t;const o=!Array.isArray(t[0])?l=>l.x:l=>l[0];let r=0;if(e!=null){let l=0,c=i-1;for(;l<=c;){const h=l+c>>1;o(t[h])<e?l=h+1:c=h-1}r=Math.max(0,l-1)}let n=i;if(s!=null){let l=0,c=i-1;for(;l<=c;){const h=l+c>>1;o(t[h])>s?c=h-1:l=h+1}n=Math.min(i,l+1)}return r===0&&n===i?t.slice():t.slice(r,n)}static lttbDownsample(t,e){const s=t.length;if(e>=s||e<3)return t;const i=!Array.isArray(t[0]),a=i?c=>c.x:c=>c[0],o=i?c=>c.y:c=>c[1],r=[];r.push(t[0]);const n=(s-2)/(e-2);let l=0;for(let c=0;c<e-2;c++){const h=Math.floor((c+1)*n)+1,d=Math.min(Math.floor((c+2)*n)+1,s);let f=0,p=0;const g=d-h;for(let v=h;v<d;v++)f+=a(t[v]),p+=o(t[v]);f/=g,p/=g;const u=Math.floor(c*n)+1,x=Math.min(Math.floor((c+1)*n)+1,s),b=a(t[l]),w=o(t[l]);let m=-1,y=u;for(let v=u;v<x;v++){const C=Math.abs((b-f)*(o(t[v])-w)-(b-a(t[v]))*(p-w))*.5;C>m&&(m=C,y=v)}r.push(t[y]),l=y}return r.push(t[s-1]),r}static ohlcAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?c=>c.x:c=>c[0],o=i?c=>c.y:c=>c[1],r=i?(c,h)=>({x:c,y:h}):(c,h)=>[c,h],n=[],l=s/e;for(let c=0;c<e;c++){const h=Math.floor(c*l),d=c===e-1?s:Math.floor((c+1)*l);if(d<=h)continue;const f=o(t[h]),p=f[0];let g=f[1],u=f[2],x=f[3];for(let b=h+1;b<d;b++){const w=o(t[b]);w[1]>g&&(g=w[1]),w[2]<u&&(u=w[2]),x=w[3]}n.push(r(a(t[h]),[p,g,u,x]))}return n}static rangeAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?c=>c.x:c=>c[0],o=i?c=>c.y:c=>c[1],r=i?(c,h)=>({x:c,y:h}):(c,h)=>[c,h],n=[],l=s/e;for(let c=0;c<e;c++){const h=Math.floor(c*l),d=c===e-1?s:Math.floor((c+1)*l);if(d<=h)continue;let f=1/0,p=-1/0;for(let g=h;g<d;g++){const u=o(t[g]);if(u!=null)for(let x=0;x<2;x++){const b=u[x];b==null||!isFinite(b)||(b<f&&(f=b),b>p&&(p=b))}}n.push(r(a(t[h]),f===1/0?[null,null]:[f,p]))}return n}excludeCollapsedSeriesInYAxis(){const 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)}}class Is{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((n,l)=>{var c,h;const d=n.w;if(d.globals.shouldAnimate=s,e||(d.globals.resized=!0,d.globals.dataChanged=!0,s&&n.series.getPreviousPaths()),s&&t&&typeof t=="object"){const f=(c=t==null?void 0:t.chart)==null?void 0:c.type,p=d.config.chart.requestedType||d.config.chart.type;f&&f!==p&&((h=n.morphTypeChange)==null||h.captureBeforeDestroy({fromType:p,toType:f,newSeries:t.series||d.config.series}))}if(t&&typeof t=="object"){n.config=new Bt(t);const f=t.chart&&t.chart.type,p=f==="funnel"||f==="pyramid"||f==="gauge",g=!!d.config.chart.requestedType;if(f&&!p&&g){t.chart=t.chart||{},t.chart.requestedType=f;const u=d.config.chart.requestedType;(u==="funnel"||u==="pyramid")&&(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel===void 0&&(t.plotOptions.bar.isFunnel=!1),t.plotOptions.bar.isPyramid===void 0&&(t.plotOptions.bar.isPyramid=!1))}if(n.config.normalizeAliasedChartType(t),t=et.extendArrayProps(n.config,t,d),n.w.globals.chartID!==this.w.globals.chartID&&delete t.series,d.config=T.extend(d.config,t),a&&(d.globals.lastXAxis=t.xaxis?T.clone(t.xaxis):[],d.globals.lastYAxis=t.yaxis?T.clone(t.yaxis):[],d.globals.initialConfig=T.extend({},d.config),d.globals.initialSeries=T.clone(d.config.series),t.series)){for(let u=0;u<d.globals.collapsedSeriesIndices.length;u++){const x=d.config.series[d.globals.collapsedSeriesIndices[u]];d.globals.collapsedSeries[u].data=d.globals.axisCharts?x.data.slice():x}for(let u=0;u<d.globals.ancillaryCollapsedSeriesIndices.length;u++){const x=d.config.series[d.globals.ancillaryCollapsedSeriesIndices[u]];d.globals.ancillaryCollapsedSeries[u].data=d.globals.axisCharts?x.data.slice():x}n.series.emptyCollapsedSeries(d.config.series)}}return n.update(t).then(()=>{l===r.length-1&&o(n)})})})}_updateSeries(t,e,s=!1){return new Promise(i=>{const a=this.w;
30a.globals.shouldAnimate=e,a.globals.dataChanged=!0,me.invalidateSelectors(a),e&&this.ctx.series.getPreviousPaths();const o=a.config.series.length;a.globals.dataReducerRawSeries=null,this.ctx.data.resetParsingFlags();const 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=T.clone(a.config.series)),a.globals.initialSeries=T.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.ancillaryCollapsedSeries.length>0||s.globals.risingSeries.length>0||s.globals.comboCharts||s.interact.zoomed)}_extendSeries(t,e){const s=this.w,i=s.config.series[e];return G($({},s.config.series[e]),{name:t.name?t.name:i==null?void 0:i.name,color:t.color?t.color:i==null?void 0:i.color,type:t.type?t.type:i==null?void 0:i.type,group:t.group?t.group:i==null?void 0:i.group,hidden:typeof t.hidden<"u"?t.hidden:i==null?void 0:i.hidden,data:t.data?t.data:i==null?void 0:i.data,zIndex:typeof t.zIndex<"u"?t.zIndex:e})}toggleDataPointSelection(t,e){const s=this.w;let i=null;const a=`.apexcharts-series[data\\:realIndex='${t}']`;if(s.globals.axisCharts?i=s.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):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 R(this.w).pathMouseDown(i,null);else return console.warn("toggleDataPointSelection: Element not found"),null;return i.node?i.node:null}forceXAxisUpdate(t){const 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 Yt(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){const e=this.w;let s=e.globals.lastXAxis,i=e.globals.lastYAxis;t&&t.xaxis&&(s=t.xaxis),t&&t.yaxis&&(i=t.yaxis);const a=s;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;const o=r=>{if(typeof i[r]<"u"){const n=i[r];e.config.yaxis[r].min=n.min,e.config.yaxis[r].max=n.max}};e.config.yaxis.map((r,n)=>{e.interact.zoomed||typeof i[n]<"u"?o(n):typeof this.ctx.opts.yaxis[n]<"u"&&(r.min=this.ctx.opts.yaxis[n].min,r.max=this.ctx.opts.yaxis[n].max)})}}class Ke{constructor(t){this.w=t.w,this.ttCtx=t}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,o;const r=this.w,n=e.getBoundingClientRect(),l=n.width,c=n.height;let h=l/(r.globals.dataPoints-1);const d=c/r.globals.dataPoints,f=this.hasBars();(r.globals.comboCharts||f)&&!r.config.xaxis.convertedCatToNumeric&&(h=l/r.globals.dataPoints);const p=s-n.left-r.globals.barPadForNumericAxis,g=i-n.top;p<0||g<0||p>l||g>c?(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 x=Math.round(p/h);const b=Math.floor(g/d);f&&!r.config.xaxis.convertedCatToNumeric&&(x=Math.ceil(p/h),x=x-1);let w=null,m=null,y=r.globals.seriesXvalues.map(C=>C.filter(D=>T.isNumber(D)));const v=r.globals.seriesYvalues.map(C=>C.filter(D=>T.isNumber(D)));if(r.axisFlags.isXNumeric){const C=this.ttCtx.getElGrid();if(!C)return{hoverX:p,hoverY:g};const D=C.getBoundingClientRect(),S=p*(D.width/l),k=g*(D.height/c);m=this.closestInMultiArray(S,k,y,v),w=m.index,x=(a=m.j)!=null?a:0,w!==null&&r.globals.hasNullValues&&(y=r.globals.seriesXvalues[w],m=this.closestInArray(S,y),x=(o=m.j)!=null?o:0)}return r.interact.capturedSeriesIndex=w===null?-1:w,(!x||x<1)&&(x=0),r.globals.isBarHorizontal?r.interact.capturedDataPointIndex=b:r.interact.capturedDataPointIndex=x,{capturedSeries:w,j:r.globals.isBarHorizontal?b:x,hoverX:p,hoverY:g}}getFirstActiveXArray(t){const e=this.w;let s=0;const 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){const a=this.w,o=d=>a.globals.collapsedSeriesIndices.indexOf(d)===-1&&a.globals.ancillaryCollapsedSeriesIndices.indexOf(d)===-1,r=a.config.chart.type,n=!a.globals.comboCharts&&(r==="line"||r==="area");let l=1/0,c=null,h=null;if(a.globals.allSeriesHasEqualX){let d=1/0;for(let f=0;f<s.length;f++){if(!o(f))continue;const p=s[f],g=i[f],u=Math.min(p.length,g.length);for(let x=0;x<u;
30x++){const b=Math.abs(t-p[x]);b<d&&(d=b,h=x)}}if(h!==null)if(n){let f=1/0;for(let p=0;p<s.length;p++){if(!o(p))continue;const g=s[p],u=i[p],x=Math.min(g.length,u.length);if(x<2){const b=u[h];if(typeof b!="number")continue;const w=Math.abs(e-b);w<f&&(f=w,c=p);continue}for(let b=0;b<x-1;b++){const w=this._distanceToSegment(t,e,g[b],u[b],g[b+1],u[b+1]);w.dist<f&&(f=w.dist,c=p)}}}else{let f=1/0;for(let p=0;p<s.length;p++){if(!o(p))continue;const g=i[p][h];if(typeof g!="number")continue;const u=Math.abs(e-g);u<f&&(f=u,c=p)}}return{index:c,j:h}}for(let d=0;d<s.length;d++){if(!o(d))continue;const f=s[d],p=i[d],g=Math.min(f.length,p.length);if(n&&g>=2){for(let u=0;u<g-1;u++){const x=this._distanceToSegment(t,e,f[u],p[u],f[u+1],p[u+1]);x.dist<l&&(l=x.dist,c=d,h=x.t<.5?u:u+1)}continue}for(let u=0;u<g;u++){const x=f[u],b=t-x,w=p[u],m=e-w,y=Math.sqrt(b*b+m*m);y<l&&(l=y,c=d,h=u)}}return{index:c,j:h}}_distanceToSegment(t,e,s,i,a,o){const r=a-s,n=o-i,l=r*r+n*n;let c=l===0?0:((t-s)*r+(e-i)*n)/l;c<0?c=0:c>1&&(c=1);const h=s+c*r,d=i+c*n,f=t-h,p=e-d;return{dist:Math.sqrt(f*f+p*p),t:c}}closestInArray(t,e){const s=e[0];let i=null,a=Math.abs(t-s);for(let o=0;o<e.length;o++){const r=Math.abs(t-e[o]);r<a&&(a=r,i=o)}return{j:i}}isXoverlap(t){const 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;const a=((t=this.w.globals.initialSeries)==null?void 0:t.filter((o,r)=>{var n;return!((n=this.w.globals.collapsedSeriesIndices)!=null&&n.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=>{const 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});const s=[];return e.forEach(i=>{s.push(i.querySelector(".apexcharts-marker"))}),s}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){const s=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new R(this.w).getMarkerPath(s,i,a,e)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(t){const e=this.w;let s=e.config.markers.hover.size;return s===void 0&&(s=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(t){const e=this.w,s=this.ttCtx;s.allTooltipSeriesGroups.length===0&&(s.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const 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")}}class Ys{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new Ke(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:s=0,j:i=null,y1:a,y2:o,e:r}){const n=this.w;n.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:s,j:i,y1:a,y2:o,w:n}):this.toggleActiveInactiveSeries(t,s);const l=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:l,ttItems:e,shared:t,e:r});const c=this.ttCtx.getElTooltip();c&&(this.ttCtx.tooltipRect.ttWidth=c.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=c.getBoundingClientRect().height)}printLabels({i:t,j:e,values:s,ttItems:i,shared:a,e:o}){const r=this.w,{xVal:n,zVal:l,xAxisTTVal:c}=s,h=r.seriesData.series.length,d=e!==null&&r.config.plotOptions.bar.distributed?r.globals.colors[e]:r.globals.colors[t];for(let f=0;f<h;f++){const p=r.config.tooltip.inverseOrder?h-1-f:f,g=this.computeSeriesRow({i:t,j:e,t:f,tIndex:p,shared:a,e:o,basePColor:d});this.DOMHandling({i:t,t:p,j:e,ttItems:i,values:{val:g.val,goalVals:g.goalVals,xVal:n,xAxisTTVal:c,zVal:l},seriesName:g.seriesName,shared:a,pColor:g.pColor})}}computeSeriesRow({i:t,j:e,tIndex:s,shared:i,e:a,basePColor:o}){const r=this.w;let n=this.getFormatters(t),l=o,c,h=[],d=r.config.chart.type==="treemap"?n.yLbTitleFormatter(String(r.config.series[t].data[e].x),{series:r.seriesData.series,seriesIndex:t,dataPointIndex:e,w:r}
30):this.getSeriesName({fn:n.yLbTitleFormatter,index:t,seriesIndex:t,j:e});return r.globals.axisCharts&&(i?(n=this.getFormatters(s),d=this.getSeriesName({fn:n.yLbTitleFormatter,index:s,seriesIndex:t,j:e}),l=r.globals.colors[s],c=this.formatYValue(n,s,e),h=this.formatGoalVals(n,s,e)):(l=this.resolvePatternColor(a,l),c=this.formatYValue(n,t,e),h=this.formatGoalVals(n,t,e))),e===null&&(c=n.yLbFormatter(r.seriesData.series[t],G($({},r),{seriesIndex:t,dataPointIndex:t}))),{seriesName:d,val:c,goalVals:h,pColor:l}}formatYValue(t,e,s){var i,a,o,r;const n=this.w;return n.axisFlags.isRangeData?t.yLbFormatter((a=(i=n.rangeData.seriesRangeStart)==null?void 0:i[e])==null?void 0:a[s],{series:n.rangeData.seriesRangeStart,seriesIndex:e,dataPointIndex:s,w:n})+" - "+t.yLbFormatter((r=(o=n.rangeData.seriesRangeEnd)==null?void 0:o[e])==null?void 0:r[s],{series:n.rangeData.seriesRangeEnd,seriesIndex:e,dataPointIndex:s,w:n}):t.yLbFormatter(n.seriesData.series[e][s],{series:n.seriesData.series,seriesIndex:e,dataPointIndex:s,w:n})}formatGoalVals(t,e,s){var i;const a=this.w,o=(i=a.seriesData.seriesGoals[e])==null?void 0:i[s];return Array.isArray(o)?o.map(r=>({attrs:r,val:t.yLbFormatter(r.value,{seriesIndex:e,dataPointIndex:s,w:a})})):[]}resolvePatternColor(t,e){var s,i,a;const o=this.w,r=(s=t==null?void 0:t.target)==null?void 0:s.getAttribute("fill");if(!r)return e;if(r.indexOf("url")===-1)return r;if(r.indexOf("Pattern")===-1)return e;const n=o.dom.baseEl.querySelector(r.substr(4).slice(0,-1));return(a=(i=n==null?void 0:n.childNodes[0])==null?void 0:i.getAttribute("stroke"))!=null?a:e}getFormatters(t){const e=this.w;let 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}){const 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}){const n=this.w,l=this.ttCtx,{val:c,goalVals:h,xVal:d,xAxisTTVal:f,zVal:p}=i;if(!s||!s[t])return;let g=null;g=s[t].children,n.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=r,g[0].style.display="none"),l.showTooltipTitle&&(l.tooltipTitle===null&&(l.tooltipTitle=n.dom.baseEl.querySelector(".apexcharts-tooltip-title")),l.tooltipTitle&&(l.tooltipTitle.innerHTML=d)),l.isXAxisTooltipEnabled&&l.xaxisTooltipText&&(l.xaxisTooltipText.innerHTML=f!==""?f:d);const u=s[t].querySelector(".apexcharts-tooltip-text-y-label");u&&(u.innerHTML=a||"");const x=s[t].querySelector(".apexcharts-tooltip-text-y-value");x&&(x.innerHTML=typeof c<"u"?c:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(n.config.tooltip.marker.fillColors&&Array.isArray(n.config.tooltip.marker.fillColors)&&(r=n.config.tooltip.marker.fillColors[t]),n.config.tooltip.fillSeriesColor?g[0].style.backgroundColor=r:g[0].style.color=r),n.config.tooltip.marker.show||(g[0].style.display="none");const b=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),w=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&n.seriesData.seriesGoals[t]){const m=()=>{let y="<div>",v="<div>";h.forEach(C=>{y+=` <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>`}),b.innerHTML=y+"</div>",w.innerHTML=v+"</div>"};o?n.seriesData.seriesGoals[t][e]&&Array.isArray(n.seriesData.seriesGoals[t][e])?m():(b.innerHTML="",w.innerHTML=""):m()}else b.innerHTML="",w.innerHTML="";if(p!==null){const m=s[t].querySelector(".apexcharts-tooltip-text-z-label");m.innerHTML=n.config.tooltip.z.title;const y=s[t].querySelector(".apexcharts-tooltip-text-z-value");y.innerHTML=typeof p<"u"?p:""}if(o&&g[0]){if(n.config.tooltip.hideEmptySeries){const m=s[t].querySelector(".apexcharts-tooltip-marker"),y=s[t].querySelector(".apexcharts-tooltip-text");parseFloat(c)==0?(m.style.display="none",y.style.display="none"):(m.style.display="block",y.style.display="block")}typeof c>"u"||c===null||n.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||n.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(l.tConfig.enabledOnSeries)&&l.tConfig.enabledOnSeries.indexOf(t)===-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=n.config.tooltip.items.display}else Array.isArray(l.tConfig.enabledOnSeries)&&l.tConfig.enabledOnSeries.indexOf(t)===-1&&(g[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){const s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const i=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(i){const 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,n,l,c;const h=this.w,d=h.seriesData.seriesX.map(m=>m.length>0?m:[]);let f="",p="",g=null,u=null;const x={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},b=h.formatters.ttZFormatter;if(e===null)u=h.seriesData.series[t];else if(h.axisFlags.isXNumeric&&h.config.chart.type!=="treemap"){if(f=d[t][e],d[t].length===0){const m=this.tooltipUtil.getFirstActiveXArray(d);f=d[m][e]}}else new xt(this.w).isFormatXY()?f=typeof h.config.series[t].data[e]<"u"?h.config.series[t].data[e].x:"":f=typeof h.labelData.labels[e]<"u"?h.labelData.labels[e]:"";const w=f;return h.axisFlags.isXNumeric&&h.config.xaxis.type==="datetime"?f=new zt(this.w).xLabelFormat(h.formatters.ttKeyFormatter,w,w,{i:void 0,dateFormatter:new lt(this.w).formatDate,w:this.w}
30):h.globals.isBarHorizontal?f=h.formatters.yLabelFormatters[0](w,x):f=(a=(i=(s=h.formatters).xLabelFormatter)==null?void 0:i.call(s,w,x))!=null?a:w,h.config.tooltip.x.formatter!==void 0&&(f=(n=(r=(o=h.formatters).ttKeyFormatter)==null?void 0:r.call(o,w,x))!=null?n:w),h.seriesData.seriesZ.length>0&&h.seriesData.seriesZ[t].length>0&&(g=b==null?void 0:b(h.seriesData.seriesZ[t][e],h)),typeof h.config.xaxis.tooltip.formatter=="function"?p=(c=(l=h.formatters).xaxisTooltipFormatter)==null?void 0:c.call(l,w,x):p=f,{val:Array.isArray(u)?u.join(" "):u,xVal:Array.isArray(f)?f.join(" "):f,xAxisTTVal:Array.isArray(p)?p.join(" "):p,zVal:g}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){const o=this.ttCtx.getElTooltip();let r=a.config.tooltip.custom;Array.isArray(r)&&r[t]&&(r=r[t]);const n=r({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});o&&(typeof n=="string"||typeof n=="number"?o.innerHTML=String(n):(n instanceof Element||typeof n.nodeName=="string")&&(o.innerHTML="",o.appendChild(n.cloneNode(!0))))}}class Je{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){const s=this.ttCtx,i=this.w,a=s.getElXCrosshairs();let o=t-s.xcrosshairsWidth/2;const 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 n=o;(i.config.xaxis.crosshairs.width==="tickWidth"||i.config.xaxis.crosshairs.width==="barWidth")&&(n=o+s.xcrosshairsWidth/2),this.moveXAxisTooltip(n)}}moveYCrosshairs(t){const e=this.ttCtx;e.ycrosshairs!==null&&R.setAttrs(e.ycrosshairs,{y1:t,y2:t}),e.ycrosshairsHidden!==null&&R.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;if(a.xaxisTooltip!==null&&a.xcrosshairsWidth!==0){a.xaxisTooltip.classList.add("apexcharts-active");const o=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+5+i.config.xaxis.offsetY,n=a.xaxisTooltip.getBoundingClientRect().width;if(t=t-n/2,!isNaN(t)){t=t+i.layout.translateX;const c=new R(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=c.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=o+"px"}}}moveYAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);const o=parseInt((s=(e=a.ycrosshairsHidden)==null?void 0:e.getAttribute("y1"))!=null?s:"0",10);let r=i.layout.translateY+o;if(a.yaxisTTEls){const n=a.yaxisTTEls[t].getBoundingClientRect(),l=n.height;let c;const h=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),d=i.dom.elWrap.getBoundingClientRect();if(h){const f=h.getBoundingClientRect();f.width>0&&(c=f.left+f.width/2-d.left-n.width/2)}c==null&&(c=i.config.yaxis[t].opposite?i.globals.translateYAxisX[t]+4:i.globals.translateYAxisX[t]-n.width-4),r=r-l/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=c+i.config.yaxis[t].tooltip.offsetX+"px"):a.yaxisTTEls[t].classList.remove("apexcharts-active")}}moveTooltip(t,e,s=null){const a=this.ttCtx.getElTooltip();if(!a)return;const o=this.computeTooltipPosition(t,e,s);o!==null&&this.applyTooltipPosition(a,o)}computeTooltipPosition(t,e,s=null){var i,a,o,r,n,l,c;const h=this.w,d=this.ttCtx,f=d.tooltipRect,p=!!h.config.tooltip.arrow,g=s!==null?parseFloat(String(s)):1,u=f.ttHeight||0,x=f.ttWidth||0,b=parseFloat(String(t)),w=parseFloat(String(e));if(isNaN(b))return null;let m=b+g+5;const y=w+h.layout.translateY;let v=p?y-u/2+g/2:w+g/2,C="right";if(m>h.layout.gridWidth/2&&(m=m-x-g-10,C="left"),m>h.layout.gridWidth-x-10&&(m=h.layout.gridWidth-x),m<-20&&(m=-20),h.config.tooltip.followCursor){const k=d.getElGrid();if(!k)return null;const M=k.getBoundingClientRect();m=d.e.clientX-M.left,m>h.layout.gridWidth/2?(m=m-x,C="left"):C="right",v=d.e.clientY+h.layout.translateY-M.top,v>h.layout.gridHeight/2&&(v=v-u)}else if(!h.globals.isBarHorizontal)if(p){const k=h.layout.translateY,M=h.layout.translateY+h.layout.gridHeight;v+u>M&&(v=M-u),v<k&&(v=k)}else u/2+v>h.layout.gridHeight&&(v=h.layout.gridHeight-u+h.layout.translateY);if(isNaN(m))return null;m=m+h.layout.translateX;const D=(a=(i=h.config)==null?void 0:i.chart)==null?void 0:a.accessibility;if(D!=null&&D.enabled&&((r=(o=D==null?void 0:D.keyboard)==null?void 0:o.navigation)!=null&&r.enabled)&&((c=(l=(n=h.dom)==null?void 0:n.baseEl)==null?void 0:l.querySelector)!=null&&c.call(l,".apexcharts-keyboard-focused"))){const k=p?y:w,M=(g||1)+12,L=v,P=v+u;!isNaN(k)&&u>0&&L<k+M&&P>k-M&&(v=k-u-M,v<0&&(v=k+M))}let S=null;if(p&&u>0){const k=y-v,M=10,L=u-10;S=Math.max(M,Math.min(L,k))}return{x:m,y:v,placement:C,arrowY:S}}applyTooltipPosition(t,e){if(!t)return;const s=t.dataset.positioned!=="true";s&&(t.style.transitionProperty="none"),t.style.left=e.x+"px",t.style.top=e.y+"px",e.placement&&(t.dataset.placement=e.placement),e.arrowY!=null&&t.style.setProperty("--apx-tt-arrow-y",e.arrowY+"px"),e.arrowX!=null&&t.style.setProperty("--apx-tt-arrow-x",e.arrowX+"px"),s&&(t.offsetWidth,t.dataset.positioned="true",requestAnimationFrame(()=>{t.style.transitionProperty=""}))}moveMarkers(t,e){var s;const i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0){const 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;const n=this.w,l=this.ttCtx;let c=0,h=0;const d=new R(this.w),f=n.globals.pointsArray,p=l.tooltipUtil.getHoverMarkerSize(e),g=n.config.series[e].type;if(g&&(g==="column"||g==="candlestick"||g==="boxPlot"||g==="violin"))return;c=(i=(s=f[e])==null?void 0:s[t])==null?void 0:i[0],h=((o=(a=f[e])==null?void 0:a[t])==null?void 0:o[1])||0;const u=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(u&&h<n.layout.gridHeight&&h>0){const x=(r=u.getAttribute("shape"))!=null?r:"circle",b=d.getMarkerPath(c,h,x,p*1.5);u.setAttribute("d",b)}this.moveXCrosshairs(c),l.fixedTooltip||this.moveTooltip(c,h,p)}moveDynamicPointsOnHover(t){var e,s;const i=this.ttCtx,a=i.w;let o=0,r=0,n=0;const l=a.globals.pointsArray,c=new tt(this.w),h=new R(this.w);n=c.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const d=i.tooltipUtil.getHoverMarkerSize(n);if((e=l[n])!=null&&e[t]&&(o=l[n][t][0],r=l[n][t][1]),isNaN(o))return;const f=i.tooltipUtil.getAllMarkers();if(f.length)for(let p=0;p<a.seriesData.series.length;p++){const g=l[p];if(a.globals.comboCharts&&typeof g>"u"&&f.splice(p,0,null),g&&g.length){let u=l[p][t][1],x;f[p].setAttribute("cx",o);const b=(s=f[p].getAttribute("shape"))!=null?s:"circle";if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){const w=t+a.seriesData.series[p].length;x=l[p][w][1];const m=Math.abs(u-x)/2;u=u-m}if(u!==null&&!isNaN(u)&&u<a.layout.gridHeight+d&&u+d>0){const w=h.getMarkerPath(o,u,b,d);f[p].setAttribute("d",w)}else f[p].setAttribute("d","")}}this.moveXCrosshairs(o),i.fixedTooltip||this.moveTooltip(o,r||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,a;const o=this.w,r=this.ttCtx;let n=o.globals.columnSeries?o.globals.columnSeries.length:o.seriesData.series.length;o.config.chart.stacked&&(n=o.globals.barGroups.length);let l=n>=2&&n%2===0?Math.floor(n/2):Math.floor(n/2)+1;o.globals.isBarHorizontal&&(l=new tt(this.w).getActiveConfigSeriesIndex("desc")+1);let c=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${l}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[rel='${l}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${l}'] path[j='${t}'], .apexcharts-violin-series .apexcharts-series[rel='${l}'] path[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${l}'] path[j='${t}']`);!c&&typeof e=="number"&&(c=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'], 31 .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'], 32 .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'], 33 .apexcharts-violin-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'], 34 .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let h=c?parseFloat((s=c.getAttribute("cx"))!=null?s:"0"):0,d=c?parseFloat((i=c.getAttribute("cy"))!=null?i:"0"):0;const f=c?parseFloat((a=c.getAttribute("barWidth"))!=null?a:"0"):0,p=r.getElGrid();if(!p)return;const g=p.getBoundingClientRect(),u=c&&(c.classList.contains("apexcharts-candlestick-area")||c.classList.contains("apexcharts-boxPlot-area"));if(o.axisFlags.isXNumeric){if(c&&!u){const x=this._datapointCenterXFromBars(t,g);x!=null?h=x:h=h-(n%2!==0?f/2:0)}c&&u&&(h=h-f/2)}
34else o.globals.isBarHorizontal||(h=r.xAxisTicksPositions[t-1]+r.dataPointsDividedWidth/2,isNaN(h)&&(h=r.xAxisTicksPositions[t]-r.dataPointsDividedWidth/2));if(o.globals.isBarHorizontal?d=d-r.tooltipRect.ttHeight:o.config.tooltip.followCursor?d=r.e.clientY-g.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){if(o.globals.isBarHorizontal&&!o.config.tooltip.followCursor&&this.placeHorizontalSharedTooltip(t))return;this.moveTooltip(h,d||o.layout.gridHeight)}}_datapointCenterXFromBars(t,e){var s,i;const a=this.w,o=a.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`);if(!o.length)return null;let r=1/0,n=-1/0;for(const l of o){const c=l.parentNode;if((i=(s=c==null?void 0:c.classList)==null?void 0:s.contains)!=null&&i.call(s,"apexcharts-series-collapsed"))continue;const h=l.getBoundingClientRect();h.width===0&&h.height===0||(h.left<r&&(r=h.left),h.right>n&&(n=h.right))}return isFinite(r)?(r+n)/2-e.left-(a.globals.barPadForNumericAxis||0):null}placeHorizontalSharedTooltip(t){var e,s;const i=this.w,a=this.ttCtx,o=a.getElTooltip();if(!o)return!1;const r=a.getElGrid();if(!r)return!1;const n=r.getBoundingClientRect(),l=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}']`);if(!l.length)return!1;let c=1/0,h=-1/0,d=1/0,f=-1/0;for(const L of l){const P=L.parentNode;if((s=(e=P==null?void 0:P.classList)==null?void 0:e.contains)!=null&&s.call(e,"apexcharts-series-collapsed"))continue;const E=L.getBoundingClientRect();E.width===0&&E.height===0||(E.left<c&&(c=E.left),E.right>h&&(h=E.right),E.top<d&&(d=E.top),E.bottom>f&&(f=E.bottom))}if(!isFinite(c))return!1;const p=a.tooltipRect.ttWidth||0,g=a.tooltipRect.ttHeight||0,u=7,x=(c+h)/2-n.left+i.layout.translateX,b=d-n.top+i.layout.translateY,w=f-n.top+i.layout.translateY,m=i.layout.translateY,y=i.layout.translateY+i.layout.gridHeight,v=i.layout.translateX,C=i.layout.translateX+i.layout.gridWidth;let D="top",S=b-g-u;if(S<m){const L=w+u;L+g<=y&&(D="bottom",S=L)}let k=x-p/2;k<v&&(k=v),k+p>C&&(k=C-p);const M=Math.max(10,Math.min(p-10,x-k));return this.applyTooltipPosition(o,{x:k,y:S,placement:D,arrowY:null,arrowX:M}),!0}}function Bs(A){const t=e=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${e}</svg>`;switch(A){case"square":case"rect":return t('<rect x="1" y="1" width="10" height="10" rx="1" fill="currentColor"/>');case"line":return t('<rect x="0" y="5" width="12" height="2" rx="1" fill="currentColor"/>');case"diamond":return t('<path d="M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z" fill="currentColor"/>');case"triangle":return t('<path d="M6 1 L11.2 10.5 L0.8 10.5 Z" fill="currentColor"/>');case"cross":return t('<path d="M2 2 L10 10 M10 2 L2 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"plus":return t('<path d="M6 1 L6 11 M1 6 L11 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"star":return t('<path d="M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z" fill="currentColor"/>');case"sparkle":return t('<path d="M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z" fill="currentColor"/>');case"circle":default:return t('<circle cx="6" cy="6" r="5" fill="currentColor"/>')}}class Ns{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new Je(t)}drawDynamicPoints(){const t=this.w,e=new R(this.w),s=new Pt(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++){const 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");const n=s.getMarkerConfig({cssClass:r,seriesIndex:Number(o.getAttribute("data:realIndex"))}),l=e.drawMarker(0,0,n);
34l.node.setAttribute("default-marker-size",0);const c=B.createElementNS(Z,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(l.node),o.appendChild(c)}}}enlargeCurrentPoint(t,e,s=null,i=null){const 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"){const n=this.ttCtx.getElGrid();if(!n)return;const l=n.getBoundingClientRect();o=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(o,r,a.config.markers.hover.size)}}enlargePoints(t){var e,s;const i=this.w,a=this,o=this.ttCtx,r=t,n=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");let l=i.config.markers.hover.size;for(let c=0;c<n.length;c++){const h=n[c].getAttribute("rel"),d=n[c].getAttribute("index");if(l===void 0&&(l=i.globals.markers.size[d]+i.config.markers.hover.sizeOffset),r===parseInt(h??"0",10)){a.newPointSize(r,n[c]);const f=(e=n[c].getAttribute("cx"))!=null?e:"0",p=(s=n[c].getAttribute("cy"))!=null?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(f)),o.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(f),parseFloat(p),l)}else a.oldPointSize(n[c])}}newPointSize(t,e){const s=this.w;let i=s.config.markers.hover.size;const a=t===0?e.parentNode.firstChild:e.parentNode.lastChild;if(a.getAttribute("default-marker-size")!=="0"){const o=parseInt(a.getAttribute("index"),10);i===void 0&&(i=s.globals.markers.size[o]+s.config.markers.hover.sizeOffset),i<0&&(i=0);const r=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);e.setAttribute("d",r)}}oldPointSize(t){const e=parseFloat(t.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",s)}resetPointsSize(){var t;const s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let i=0;i<s.length;i++){const a=parseFloat((t=s[i].getAttribute("default-marker-size"))!=null?t:"0");if(T.isNumber(a)&&a>0){const o=this.ttCtx.tooltipUtil.getPathFromPoint(s[i],a);s[i].setAttribute("d",o)}else s[i].setAttribute("d","M0,0")}}}class Os{constructor(t){this.w=t.w;const 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;const n=this.ttCtx,l=this.w;if(t.target.classList.contains(`apexcharts-${a}-rect`)){const c=this.getAttr(t,"i"),h=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),f=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),g=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:c,j:h,shared:!1,e:t}),l.interact.capturedSeriesIndex=c,l.interact.capturedDataPointIndex=h,s=d+n.tooltipRect.ttWidth/2+p,i=f+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(d+p/2),s>l.layout.gridWidth/2&&(s=d-n.tooltipRect.ttWidth/2+p),n.w.config.tooltip.followCursor){const u=l.dom.elWrap.getBoundingClientRect();s=((o=l.interact.clientX)!=null?o:0)-u.left-(s>l.layout.gridWidth/2?n.tooltipRect.ttWidth:0),i=((r=l.interact.clientY)!=null?r:0)-u.top-(i>l.layout.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:s,y:i}}handleMarkerTooltip({e:t,opt:e,x:s,y:i}){const a=this.w,o=this.ttCtx;let r,n;if(t.target.classList.contains("apexcharts-marker")){const l=parseInt(e.paths.getAttribute("cx"),10),c=parseInt(e.paths.getAttribute("cy"),10),h=parseFloat(e.paths.getAttribute("val"));if(n=parseInt(e.paths.getAttribute("rel"),10),r=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,o.intersect){const f=T.findAncestor(e.paths,"apexcharts-series");f&&(r=parseInt(f.getAttribute("data:realIndex"),10))}o.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:n,shared:o.showOnIntersect?!1:a.config.tooltip.shared,e:t}),t.type==="mouseup"&&o.markerClick(t,r,n),a.interact.capturedSeriesIndex=r,a.interact.capturedDataPointIndex=n;const d=!!a.config.tooltip.arrow;if(s=l,d?i=c:(i=c+a.layout.translateY-o.tooltipRect.ttHeight*1.4,h<0&&(i=c)),o.w.config.tooltip.followCursor){const f=o.getElGrid();if(!f)return{x:s,y:i};const p=f.getBoundingClientRect();i=o.e.clientY+a.layout.translateY-p.top}o.marker.enlargeCurrentPoint(n,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){var s,i,a;const o=this.w,r=this.ttCtx,n=r.getElTooltip();let l=0,c=0,h=0,d=0,f;const p=this.getBarTooltipXY({e:t,opt:e});if(p.j===null&&p.barHeight===0&&p.barWidth===0)return;d=p.i;const g=p.j;if(o.interact.capturedSeriesIndex=d,o.interact.capturedDataPointIndex=g!==null?g:o.interact.capturedDataPointIndex,o.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||
vendor: 12,132 bytes, line 34
34!o.config.tooltip.shared?(c=p.x,h=p.y,f=Array.isArray(o.config.stroke.width)?o.config.stroke.width[d]:o.config.stroke.width,l=c):!o.globals.comboCharts&&!o.config.tooltip.shared&&(l=l/2),isNaN(h)&&(h=o.globals.svgHeight-r.tooltipRect.ttHeight),c+r.tooltipRect.ttWidth>o.layout.gridWidth?c=c-r.tooltipRect.ttWidth:c<0&&(c=0),!(r.w.config.tooltip.followCursor&&!r.getElGrid())&&(r.tooltip===null&&(r.tooltip=o.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?r.tooltipPosition.moveXCrosshairs(l+f/2):r.tooltipPosition.moveXCrosshairs(l)),!r.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(h=h+o.layout.translateY-r.tooltipRect.ttHeight/2,n))){const u=r.tooltipRect.ttWidth||0,x=r.tooltipRect.ttHeight||0,b=!!o.config.tooltip.arrow,{barAnchorXInGrid:w,barAnchorYInGrid:m,barRectInGrid:y}=p,v=7,C=(s=r.getElGrid())==null?void 0:s.getBoundingClientRect(),D=o.dom.elWrap.getBoundingClientRect(),S=C?C.left-D.left:o.layout.translateX;let k,M=null,L=null,P=c+S,E=h;if(b&&o.globals.isBarHorizontal&&y!=null){const _=o.layout.translateY,X=o.layout.translateY+o.layout.gridHeight,F=S,z=S+o.layout.gridWidth,O=(y.left+y.right)/2+S,N=y.top+o.layout.translateY,H=y.bottom+o.layout.translateY;let I=N-x-v;if(k="top",I<_){const Y=H+v;Y+x<=X&&(k="bottom",I=Y)}E=I,P=O-u/2,P<F&&(P=F),P+u>z&&(P=z-u),L=Math.max(10,Math.min(u-10,O-P))}else if(b&&w!=null&&m!=null){const _=w+S,X=S+o.layout.gridWidth/2,F=((i=y==null?void 0:y.left)!=null?i:w)+S,z=((a=y==null?void 0:y.right)!=null?a:w)+S;if(_<X?(k="right",P=z+v):(k="left",P=F-u-v),y){E=(y.top+y.bottom)/2+o.layout.translateY-x/2;const N=o.layout.translateY,H=o.layout.translateY+o.layout.gridHeight;E<N&&(E=N),E+x>H&&(E=H-x)}if(x>0&&y){const O=(y.top+y.bottom)/2+o.layout.translateY;M=Math.max(10,Math.min(x-10,O-E))}}r.tooltipPosition.applyTooltipPosition(n,{x:P,y:E,placement:k,arrowY:M,arrowX:L})}}getBarTooltipXY({e:t,opt:e}){const s=this.w;let i=null;const a=this.ttCtx;let o=0,r=0,n=0,l=0,c=0,h=null,d=null,f=null,p=null,g=null;const u=t.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){const x=t.target,b=x.getBoundingClientRect(),w=e.elGrid.getBoundingClientRect(),m=b.height;c=b.height;const y=b.width,v=parseInt(x.getAttribute("cx"),10),C=parseInt(x.getAttribute("cy"),10);h=v,d=C,l=parseFloat(x.getAttribute("barWidth"));const D=b.left-w.left,S=b.top-w.top,k=D+y/2,M=S+m/2;f=k,p=s.globals.isBarHorizontal?M:S,g={left:D,top:S,right:D+y,bottom:S+m};const L=t.type==="touchmove"?t.touches[0].clientX:t.clientX;i=parseInt(x.getAttribute("j"),10),o=parseInt(x.parentNode.getAttribute("rel"),10)-1;const P=x.getAttribute("data-range-y1"),E=x.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(x.parentNode.getAttribute("data:realIndex"),10));const _=F=>(s.axisFlags.isXNumeric?F=v-y/2:this.isVerticalGroupedRangeBar?F=v+y/2:F=v-a.dataPointsDividedWidth+y/2,F),X=()=>C-a.dataPointsDividedHeight+m/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:i,y1:P?parseInt(P,10):null,y2:E?parseInt(E,10):null,shared:a.showOnIntersect?!1:s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(r=L-w.left+15,n=X()):(r=_(r),n=t.clientY-w.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(r=v,a.xyRatios&&r<a.xyRatios.baseLineInvertedY&&(r=v-a.tooltipRect.ttWidth),n=X()):(r=_(r),n=C)}return{x:r,y:n,barHeight:c,barWidth:l,i:o,j:i,barCx:h,barCy:d,barAnchorXInGrid:f,barAnchorYInGrid:p,barRectInGrid:g}}}class zs{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){const 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;const 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=B.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=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}drawYaxisTooltip(){const t=this.w,e=this.ttCtx;for(let s=0;s<t.config.yaxis.length;s++){const i=t.config.yaxis[s].opposite||t.config.yaxis[s].crosshairs.opposite;e.yaxisOffX=i?t.layout.gridWidth+1:1;const a=i?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,o=t.dom.elWrap;t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip apexcharts-yaxistooltip-${s}`)===null&&(e.yaxisTooltip=B.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]=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[s]))}}setXCrosshairWidth(){var t,e;const s=this.w,i=this.ttCtx,a=i.getElXCrosshairs();if(i.xcrosshairsWidth=parseInt(s.config.xaxis.crosshairs.width,10),s.globals.comboCharts){const o=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(o!==null&&s.config.xaxis.crosshairs.width==="barWidth"){const r=parseFloat((e=o.getAttribute("barWidth"))!=null?e:"0");i.xcrosshairsWidth=r}else if(s.config.xaxis.crosshairs.width==="tickWidth"){const r=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/r}}else if(s.config.xaxis.crosshairs.width==="tickWidth"){const o=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/o}else if(s.config.xaxis.crosshairs.width==="barWidth"){const o=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(o!==null){const 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(){const t=this.w,e=this.ttCtx;e.ycrosshairs=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(t,e,s){const i=this.ttCtx,a=this.w,o=a.globals,r=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&r.length>0){const n=a.formatters.yLabelFormatters[t],l=i.getElGrid();if(!l)return;const c=l.getBoundingClientRect(),h=r[0];let d=0;s.yRatio.length>1&&(d=h);const f=(e-c.top)*s.yRatio[d],p=o.maxYArr[h]-o.minYArr[h];let g=o.minYArr[h]+(p-f);a.config.yaxis[t].reversed&&(g=o.maxYArr[h]-(p-f)),i.tooltipPosition.moveYCrosshairs(e-c.top),i.yaxisTooltipText[t].innerHTML=n(g),i.tooltipPosition.moveYAxisTooltip(t)}}}class Hs{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new Ke(this),this.tooltipLabels=new Ys(this),this.tooltipPosition=new Je(this),this.marker=new Ns(this),this.intersect=new Os(this),this.axesTooltip=new zs(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=null,this.e=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1,this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){const t=this.w,e=this.getElTooltip();e&&(this.updateDimensionCache(),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(){const t=this.w,e=this.getElTooltip();if(!e)return;const s=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}getCachedDimensions(){const t=this.w;if(t.globals.dimensionCache.tooltip){const s=t.globals.dimensionCache.tooltip;if(Date.now()-s.lastUpdate<1e3)return{ttWidth:s.width,ttHeight:s.height}}this.updateDimensionCache();const e=t.globals.dimensionCache.tooltip;return e?{ttWidth:e.width,ttHeight:e.height}:{ttWidth:0,ttHeight:0}}getElTooltip(t){return t||(t=this),t.w.dom.baseEl?t.w.dom.baseEl.querySelector(".apexcharts-tooltip"):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}getElGrid(){return this.w.dom.baseEl.querySelector(".apexcharts-grid")}drawTooltip(t){const e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map(n=>!!(n.show&&n.tooltip.enabled&&e.globals.axisCharts)),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);const s=this.getElTooltip();s!=null&&s.parentNode&&s.parentNode.removeChild(s),this.tooltipTitle=null;const i=B.createElementNS("http://www.w3.org/1999/xhtml","div");i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),this.tConfig.fillSeriesColor&&i.classList.add("apexcharts-tooltip-fill-series"),this.tConfig.style&&this.tConfig.style.background&&i.style.setProperty("--apx-tt-bg",this.tConfig.style.background);const a=this.tConfig.shared&&e.config.series.length>1&&!e.globals.isBarHorizontal;if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!a&&!this.tConfig.fillSeriesColor&&e.globals.axisCharts){const n=B.createElementNS("http://www.w3.org/1999/xhtml","div");n.classList.add("apexcharts-tooltip-arrow"),i.appendChild(n)}if(e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&(i.setAttribute("role","tooltip"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),i.setAttribute("aria-hidden","true")),e.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const n=new Nt(this.w,this.ctx,void 0);this.xAxisTicksPositions=n.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=B.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));let r=e.seriesData.series.length;
vendor: 4,959 bytes, line 34
34(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(this.showOnIntersect?r=1:r=e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){const e=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a<t;a++){const o=B.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);const r=B.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];const n=e.config.markers.shape;let l=n;Array.isArray(n)&&(l=n[a]),r.setAttribute("shape",l),r.innerHTML=Bs(l),o.appendChild(r);const c=B.createElementNS("http://www.w3.org/1999/xhtml","div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,c.style.fontSize=this.tConfig.style.fontSize,["y","goals","z"].forEach(h=>{const d=B.createElementNS("http://www.w3.org/1999/xhtml","div");d.classList.add(`apexcharts-tooltip-${h}-group`);const f=B.createElementNS("http://www.w3.org/1999/xhtml","span");f.classList.add(`apexcharts-tooltip-text-${h}-label`),d.appendChild(f);const p=B.createElementNS("http://www.w3.org/1999/xhtml","span");p.classList.add(`apexcharts-tooltip-text-${h}-value`),d.appendChild(p),c.appendChild(d)}),o.appendChild(c),i.appendChild(o),s.push(o)}return s}addSVGEvents(){const t=this.w,e=t.config.chart.type,s=this.getElTooltip();if(!s)return;const i=e==="bar"||e==="candlestick"||e==="boxPlot"||e==="violin"||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());const n=[],l=[],c={hoverArea:o,elGrid:r,tooltipEl:s,tooltipY:n,tooltipX:l,ttItems:this.ttItems};let h;if(t.globals.axisCharts&&(a?h=t.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area"):(e==="heatmap"||e==="treemap")&&(h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),h&&h.length))for(let f=0;f<h.length;f++)n.push(h[f].getAttribute("cy")),l.push(h[f].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],c);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect)this.addDatapointEventsListeners(c);else if(!t.globals.axisCharts||e==="heatmap"||e==="treemap"){const f=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(f,c)}if(this.showOnIntersect){const f=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");f.length>0&&this.addPathsEventListeners(f,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}drawFixedTooltipRect(){const t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};const s=e.getBoundingClientRect(),i=s.width+10,a=s.height+10;let o=this.tConfig.fixed.offsetX,r=this.tConfig.fixed.offsetY;const n=this.tConfig.fixed.position.toLowerCase();return n.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),n.indexOf("bottom")>-1&&(r=r+t.globals.svgHeight-a-10),this.tooltipPosition.applyTooltipPosition(e,{x:o,y:r}),{x:o,y:r,ttWidth:i,ttHeight:a}}addDatapointEventsListeners(t){const 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){const s=this;for(let i=0;i<t.length;i++){const a={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(r=>t[i].addEventListener(r,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){const i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-i))}seriesHover(t,e){this.lastHoverTime=Date.now();let s=[];const 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.forEac
34h(a=>{const 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}){const a=t.w;if(!this.getElTooltip(t))return;const 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;const i=this.w;let a,o;const r=e.elGrid.getBoundingClientRect(),n=t.type==="touchmove"?t.touches[0].clientX:t.clientX,l=t.type==="touchmove"?t.touches[0].clientY:t.clientY;if(this.clientY=l,this.clientX=n,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,l<r.top||l>r.top+r.height){this.handleMouseOut(e);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){const p=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(p)<0){this.handleMouseOut(e);return}}const c=this.getElTooltip();if(!c)return;const h=this.getElXCrosshairs();let d=[];i.config.chart.group&&(d=this.ctx.getSyncedCharts());const f=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");const p=(s=this.yaxisTooltips)==null?void 0:s.filter(u=>u===!0),g=this.ycrosshairs;if(g!==null&&(p!=null&&p.length)&&g.classList.add("apexcharts-active"),f&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(t,n,l,e);else if(i.config.chart.type==="heatmap"||i.config.chart.type==="treemap"){const u=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:o,type:i.config.chart.type});a=u.x,o=u.y,c.style.left=a+"px",c.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,l,this.xyRatios);i.dom.baseEl.classList.add("apexcharts-tooltip-active"),e.tooltipEl.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&e.tooltipEl.removeAttribute("aria-hidden")}else(t.type==="mouseout"||t.type==="touchend")&&this.handleMouseOut(e)}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:s}){var i,a,o,r;const n=this.w,l=e.paths.getAttribute("rel"),c=this.getElTooltip();if(!c)return;const h=n.dom.elWrap.getBoundingClientRect();if(t.type==="mousemove"||t.type==="touchmove"){n.dom.baseEl.classList.add("apexcharts-tooltip-active"),c.classList.add("apexcharts-active"),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&c.removeAttribute("aria-hidden"),this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(l,10)-1,shared:!1});let d,f;const p=e.paths.querySelector("path[data\\:cx]")||e.paths;if(n.config.tooltip.intersect&&p.hasAttribute("data:cx")&&p.hasAttribute("data:cy")){const g=n.dom.Paper.node.getBoundingClientRect();d=g.left-h.left+parseFloat(p.getAttribute("data:cx"))-s.ttWidth/2,f=g.top-h.top+parseFloat(p.getAttribute("data:cy"))-s.ttHeight-10}else d=((i=n.interact.clientX)!=null?i:0)-h.left-s.ttWidth/2,f=((a=n.interact.clientY)!=null?a:0)-h.top-s.ttHeight-10;if(c.style.left=d+"px",c.style.top=f+"px",n.config.legend.tooltipHoverFormatter){const g=n.config.legend.tooltipHoverFormatter,u=l-1,x=(o=this.legendLabels)==null?void 0:o[u];if(!x)return;const b=x.getAttribute("data:default-text"),w=g(b,{seriesIndex:u,dataPointIndex:u,w:n});x.innerHTML=w}}else(t.type==="mouseout"||t.type==="touchend")&&(c.classList.remove("apexcharts-active"),n.dom.baseEl.classList.remove("apexcharts-tooltip-active"),n.config.legend.tooltipHoverFormatter&&((r=this.legendLabels)==null||r.forEach(d=>{const f=d.getAttribute("data:default-text");d.innerHTML=decodeURIComponent(f??"")})))}handleStickyTooltip(t,e,s,i){const a=this.w,o=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),r=o.j;let n=o.capturedSeries;n!==null&&a.globals.collapsedSeriesIndices.includes(n??-1)&&(n=null);const l=i.elGrid.getBoundingClientRect();if(o.hoverX<0||o.hoverX>l.width){this.handleMouseOut(i);return}if(n!==null)this.handleStickyCapturedSeries(t,n??-1,i,r??0);else if(this.tooltipUtil.isXoverlap(r??0)||a.globals.isBarHorizontal){const c=a.seriesData.series.findIndex((h,d)=>!a.globals.collapsedSeriesIndices.includes(d));this.create(t,this,c,r??0,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){const 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)){const o=a.seriesData.series.findIndex((r,n)=>!a.globals.collapsedSeriesIndices.includes(n));this.create(t,this,o,i,s.ttItems)}}deactivateHoverFilter(){const t=this.w,e=new R(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;const i=this.w,a=this.getElXCrosshairs();i.dom.baseEl.classList.remove("apexcharts-tooltip-active"),t.tooltipEl.classList.remove("apexcharts-active"),delete t.tooltipEl.dataset.positioned,i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&t.tooltipEl.setAttribute("aria-hidden","true"),this.deactivateHoverFilter(),i.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),a!==null&&a.classList.remove("apexcharts-active");const 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.forEac
34h(r=>{const n=r.getAttribute("data:default-text");r.innerHTML=decodeURIComponent(n??"")}))}markerClick(t,e,s){const 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,n,l,c,h,d,f,p,g,u,x,b,w,m,y,v,C,D,S;const k=this.w,M=e;t.type==="mouseup"&&this.markerClick(t,s,i),o===null&&(o=this.tConfig.shared);const L=this.tooltipUtil.hasMarkers(s),P=this.tooltipUtil.getElBars(),E=()=>{k.globals.markers.largestSize>0?M.marker.enlargePoints(i):M.tooltipPosition.moveDynamicPointsOnHover(i)};if(k.config.legend.tooltipHoverFormatter){const F=k.config.legend.tooltipHoverFormatter,z=Array.from((r=this.legendLabels)!=null?r:[]);z.forEach(O=>{const N=O.getAttribute("data:default-text");O.innerHTML=decodeURIComponent(N??"")});for(let O=0;O<z.length;O++){const N=z[O],H=parseInt((n=N.getAttribute("i"))!=null?n:"",10),I=decodeURIComponent((l=N.getAttribute("data:default-text"))!=null?l:""),Y=F(I,{seriesIndex:o?H:s,dataPointIndex:i,w:k});if(o)N.innerHTML=k.globals.collapsedSeriesIndices.indexOf(H)<0?Y:I;else if(N.innerHTML=H===s?Y:I,s===H)break}}const _=k.rangeData,X=$($({ttItems:a,i:s,j:i},((f=(d=(h=(c=_.seriesRange)==null?void 0:c[s])==null?void 0:h[i])==null?void 0:d.y[0])==null?void 0:f.y1)!==void 0&&{y1:(x=(u=(g=(p=_.seriesRange)==null?void 0:p[s])==null?void 0:g[i])==null?void 0:u.y[0])==null?void 0:x.y1}),((y=(m=(w=(b=_.seriesRange)==null?void 0:b[s])==null?void 0:w[i])==null?void 0:m.y[0])==null?void 0:y.y2)!==void 0&&{y2:(S=(D=(C=(v=_.seriesRange)==null?void 0:v[s])==null?void 0:C[i])==null?void 0:D.y[0])==null?void 0:S.y2});if(o){if(M.tooltipLabels.drawSeriesTexts(G($({},X),{shared:this.showOnIntersect?!1:this.tConfig.shared})),L)E();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...P]),this.barSeriesHeight>0)){const F=new R(this.w,this.ctx),z=k.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter(),M.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&E(),M.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let N=0;N<z.length;N++)F.pathMouseEnter(z[N],void 0)}}else M.tooltipLabels.drawSeriesTexts($({shared:!1},X)),this.tooltipUtil.hasBars()&&M.tooltipPosition.moveStickyTooltipOverBars(i,s),L&&M.tooltipPosition.moveMarkers(s,i)}}class it{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);const s=typeof t=="string"?{[t]:e}:t;for(const 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){const 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(const 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"){const s=this.bbox(),i=t-(s.x+s.width/2),a=e-(s.y+s.height/2);return this.attr("transform",`translate(${i}, ${a})`)}return this.attr({cx:t,cy:e})}add(t){return 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 it(e))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new it(e):null}on(t,e){const s=t.split(".")[0];return this._listeners.push({event:t,eventType:s,handler:e}),this.node.addEventListener(s,e),this}
34off(t,e){if(!t&&!e)this._listeners.forEach(s=>{this.node.removeEventListener(s.eventType,s.handler)}),this._listeners=[];else if(t&&!e){const s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType===s?(this.node.removeEventListener(i.eventType,i.handler),!1):!0)}else{const 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=>{const a=i.instance||new it(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 it(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){const e=B.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new it(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}}let Ws=0;class $s extends it{constructor(t,e,s){const i=e==="radial"?"radialGradient":"linearGradient",a=B.createElementNS(Z,i);super(a),this._id="SvgjsGradient"+ ++Ws,this.attr("id",this._id),typeof s=="function"&&s(new Gs(this));let o=t.node.querySelector("defs");o||(o=B.createElementNS(Z,"defs"),t.node.appendChild(o)),o.appendChild(this.node)}stop(t,e,s){const i=B.createElementNS(Z,"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()}}class Gs{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}}let Vs=0;class Us extends it{constructor(t,e,s,i){const a=B.createElementNS(Z,"pattern");if(super(a),this._id="SvgjsPattern"+ ++Vs,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),typeof i=="function"){const r=new Ht(this.node);i(r)}let o=t.node.querySelector("defs");o||(o=B.createElementNS(Z,"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()}}class Ht extends it{line(t,e,s,i){const a=this._make("line");return t!==void 0&&a.attr({x1:t,y1:e,x2:s,y2:i}),a}rect(t,e){const s=this._make("rect");return t!==void 0&&s.attr({width:t,height:e}),s}circle(t){const e=this._make("circle");return t!==void 0&&e.attr({r:t/2,cx:t/2,cy:t/2}),e}path(t){const e=this._make("path");return t&&e.attr("d",t),e}polygon(t){const e=this._make("polygon");return t&&e.attr("points",t),e}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(t){const e=B.createElementNS(Z,"text");e.textContent=t;const s=new it(e);return this.node.appendChild(e),s}text(t){const e=B.createElementNS(Z,"text"),s=new it(e);return this.node.appendChild(e),typeof t=="function"&&t(new qs(e)),s}image(t,e){const s=B.createElementNS(Z,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const i=new it(s);if(this.node.appendChild(s),typeof e=="function"){const 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 $s(this,t,e)}pattern(t,e,s){return new Us(this,t,e,s)}_make(t){const e=B.createElementNS(Z,t);return this.node.appendChild(e),new it(e)}_makeContainer(t){const e=B.createElementNS(Z,t);return this.node.appendChild(e),new Ht(e)}}class qs{constructor(t){this.textNode=t}tspan(t){const e=B.createElementNS(Z,"tspan");return e.textContent=t,this.textNode.appendChild(e),new Zs(e,this.textNode)}}class Zs{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let js=0;class Ks extends it{constructor(){const t=B.createElementNS(Z,"filter");super(t),this._id="SvgjsFilter"+ ++js,this.attr("id",this._id)}size(t,e,s,i){return this.attr({width:t,height:e,x:s,y:i})}}class Js{constructor(t){this.filter=t}colorMatrix(t){return this._primitive("feColorMatrix",t)}offset(t){return this._primitive("feOffset",t)}gaussianBlur(t){return this._primitive("feGaussianBlur",t)}flood(t){return this._primitive("feFlood",t)}composite(t){return this._primitive("feComposite",t)}merge(t){const e=B.createElementNS(Z,"feMerge");return t.forEach(s=>{const i=B.createElementNS(Z,"feMergeNode");i.setAttribute("in",s),e.appendChild(i)}),this.filter.node.appendChild(e),new it(e)}_primitive(t,e){const s=B.createElementNS(Z,t);for(const i in e)s.setAttribute(i,e[i]);return this.filter.node.appendChild(s),new it(s)}}function Qs(A){A.prototype.filterWith=function(t){const e=new Ks;this._filter=e;let s=this.node;for(;s&&s.nodeName!=="svg";)s=s.parentNode;if(s){let i=s.querySelector("defs");i||(i=B.createElementNS(Z,"defs"),s.insertBefore(i,s.firstChild)),i.appendChild(e.node)}return t(new Js(e)),this.attr("filter","url(#"+e._id+")"),this},A.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},A.prototype.filterer=function(){return this._filter}}/*! 35 * Path morphing for SVG path animations 36 * Based on svg.pathmorphing.js by Ulrich-Matthias Schäfer (MIT License) 37 * Refactored to be standalone (no SVG.js dependency) 38 * 39 * Two algorithms are exported: 40 * - morphPaths() â command-level interpolation; preserves curves but can 41 * produce "wings/flips" when two shapes have very 42 * different topology (e.g. bar rect â pie arc). 43 * - morphPolygons() â resamples both shapes into N evenly-spaced perimeter 44 * points and tweens point-by-point with rotation-search 45 * alignment; always smooth and non-self-intersecting, 46 * at the cost of throwing away curve smoothness. 47 */function Ot(A){if(!A||typeof A!="string")return[["M",0,0]];const t=[],e=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let i;const a=[],o=[];for(;(i=e.exec(A))!==null;)a.push(i[1]),o.push(i.index);for(let r=0;r<a.length;r++){const n=o[r]+a[r].length,l=r+1<o.length?o[r+1]:A.length,c=A.substring(n,l),h=[];let d;for(s.lastIndex=0;(d=s.exec(c))!==null;)h.push(parseFloat(d[0]));const f=a[r].toUpperCase();if(f==="Z")t.push(["Z"]);else if(f==="M"||f==="L"||f==="T")for(let p=0;p<h.length;p+=2)t.push([f,h[p],h[p+1]]);else if(f==="H")for(let p=0;p<h.length;p++)t.push([f,h[p]]);else if(f==="V")for(let p=0;p<h.length;p++)t.push([f,h[p]]);else if(f==="C")for(let p=0;p<h.length;p+=6)t.push([f,h[p],h[p+1],h[p+2],h[p+3],h[p+4],h[p+5]]);else if(f==="S"||f==="Q")for(let p=0;p<h.length;p+=4)t.push([f,h[p],h[p+1],h[p+2],h[p+3]]);else if(f==="A")for(let p=0;p<h.length;p+=7)t.push([f,h[p],h[p+1],h[p+2],h[p+3],h[p+4],h[p+5],h[p+6]])}return t.length===0&&t.push(["M",0,0]),t}function qt(A){let t=1/0,e=1/0,s=-1/0,i=-1/0;return A.forEach(a=>{for(let o=1;o<a.length;o+=2)if(o+1<=a.length){const r=a[o],n=a[o+1];typeof r=="number"&&typeof n=="number"&&(r<t&&(t=r),r>s&&(s=r),n<e&&(e=n),n>i&&(i=n))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:e,width:s-t,height:i-e}}function ti(A){return A.map(t=>t.join(" ")).join(" ")}function Se(A){switch(A[0]){case"z":case"Z":A[0]="L",A[1]=this.start[0],A[2]=this.start[1];break;case"H":A[0]="L",A[2]=this.pos[1];break;case"V":A[0]="L",A[2]=A[1],A[1]=this.pos[0];break;case"T":A[0]="Q",A[3]=A[1],A[4]=A[2],A[1]=this.reflection[1],A[2]=this.reflection[0];break;case"S":A[0]="C",A[6]=A[4],A[5]=A[3],A[4]=A[2],A[3]=A[1],A[2]=this.reflection[1],A[1]=this.reflection[0];break}return A}function ke(A){var t=A.length;return this.pos=[A[t-2],A[t-1]],"SCQT".indexOf(A[0])!=-1&&(this.reflection=[2*this.pos[0]-A[t-4],2*this.pos[1]-A[t-3]]),A}function Le(A){var t,e=[A];switch(A[0]){case"M":return this.pos=this.start=[A[1],A[2]],e;
47case"L":A[5]=A[3]=A[1],A[6]=A[4]=A[2],A[1]=this.pos[0],A[2]=this.pos[1];break;case"Q":A[6]=A[4],A[5]=A[3],A[4]=A[4]*1/3+A[2]*2/3,A[3]=A[3]*1/3+A[1]*2/3,A[2]=this.pos[1]*1/3+A[2]*2/3,A[1]=this.pos[0]*1/3+A[1]*2/3;break;case"A":e=ei((t=this.pos)!=null?t:[],A),A=e[0];break}return A[0]="C",this.pos=[A[5],A[6]],this.reflection=[2*A[5]-A[3],2*A[6]-A[4]],e}function De(A,t){if(t===!1)return!1;for(var e=t,s=A.length;e<s;++e)if(A[e][0]=="M")return e;return!1}function ei(A,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],n=t[7],l=new ht(A[0],A[1]),c=new ht(r,n),h,d,f,p,g,u,x,b,w,m,y,v,C,D,S,k,M,L,P,E,_,X,F=[],z,O,N,H;if(e===0||s===0||l.x===c.x&&l.y===c.y)return[["C",l.x,l.y,c.x,c.y,c.x,c.y]];for(h=new ht((l.x-c.x)/2,(l.y-c.y)/2).transform(new St().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),f=new St().rotate(i).scale(1/e,1/s).rotate(-i),l=l.transform(f),c=c.transform(f),p=[c.x-l.x,c.y-l.y],u=p[0]*p[0]+p[1]*p[1],g=Math.sqrt(u),p[0]/=g,p[1]/=g,x=u<4?Math.sqrt(1-u/4):0,a===o&&(x*=-1),b=new ht((c.x+l.x)/2+x*-p[1],(c.y+l.y)/2+x*p[0]),w=new ht(l.x-b.x,l.y-b.y),m=new ht(c.x-b.x,c.y-b.y),y=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(y*=-1),v=Math.acos(m.x/Math.sqrt(m.x*m.x+m.y*m.y)),m.y<0&&(v*=-1),o&&y>v&&(v+=2*Math.PI),!o&&y<v&&(v-=2*Math.PI),D=Math.ceil(Math.abs(y-v)*2/Math.PI),k=[],M=y,C=(v-y)/D,S=4*Math.tan(C/4)/3,_=0;_<=D;_++)P=Math.cos(M),L=Math.sin(M),E=new ht(b.x+P,b.y+L),k[_]=[new ht(E.x+S*L,E.y-S*P),E,new ht(E.x-S*L,E.y+S*P)],M+=C;for(k[0][0]=k[0][1].clone(),k[k.length-1][2]=k[k.length-1][1].clone(),f=new St().rotate(i).scale(e,s).rotate(-i),_=0,X=k.length;_<X;_++)k[_][0]=k[_][0].transform(f),k[_][1]=k[_][1].transform(f),k[_][2]=k[_][2].transform(f);for(_=1,X=k.length;_<X;_++)E=k[_-1][2],z=E.x,O=E.y,E=k[_][0],N=E.x,H=E.y,E=k[_][1],r=E.x,n=E.y,F.push(["C",z,O,N,H,r,n]);return F}function si(A,t,e,s,i,a){for(var o=A.slice(t,e||void 0),r=s.slice(i,a||void 0),n=0,l={pos:[0,0],start:[0,0]},c={pos:[0,0],start:[0,0]};o[n]=Se.call(l,o[n]),r[n]=Se.call(c,r[n]),o[n][0]!=r[n][0]||o[n][0]=="M"||o[n][0]=="A"&&(o[n][4]!=r[n][4]||o[n][5]!=r[n][5])?(Array.prototype.splice.apply(o,[n,1].concat(Le.call(l,o[n]))),Array.prototype.splice.apply(r,[n,1].concat(Le.call(c,r[n])))):(o[n]=ke.call(l,o[n]),r[n]=ke.call(c,r[n])),!(++n==o.length&&n==r.length);)n==o.length&&o.push(["C",l.pos[0],l.pos[1],l.pos[0],l.pos[1],l.pos[0],l.pos[1]]),n==r.length&&r.push(["C",c.pos[0],c.pos[1],c.pos[0],c.pos[1],c.pos[0],c.pos[1]]);return{start:o,dest:r}}function ii(A,t){for(var e=Ot(A),s=Ot(t),i=0,a=0,o=!1,r=!1,n;!(i===!1&&a===!1);){if(o=De(e,i===!1?!1:i+1),r=De(s,a===!1?!1:a+1),i===!1){const l=qt(n.start);l.height==0||l.width==0?i=e.push(e[0])-1:i=e.push(["M",l.x+l.width/2,l.y+l.height/2])-1}if(a===!1){const l=qt(n.dest);l.height==0||l.width==0?a=s.push(s[0])-1:a=s.push(["M",l.x+l.width/2,l.y+l.height/2])-1}n=si(e,i,o,s,a,r),e=e.slice(0,i).concat(n.start,o===!1?[]:e.slice(o)),s=s.slice(0,a).concat(n.dest,r===!1?[]:s.slice(r)),i=o===!1?!1:i+n.start.length,a=r===!1?!1:a+n.dest.length}return{start:e,dest:s}}function ai(A,t){var e=ii(A,t),s=e.start,i=e.dest;return function(a){var o=s.map(function(r,n){return i[n].map(function(l,c){return c===0?l:r[c]+(i[n][c]-r[c])*a})});return ti(o)}}let vt=null,Et=null;function Me(A,t){const e=new Array(t);if(!W.isBrowser()){const i=Ot(A),a=qt(i),o=a.x+a.width/2,r=a.y+a.height/2;for(let n=0;n<t;n++)e[n]={x:o,y:r};return e}vt||(vt=document.createElementNS("http://www.w3.org/2000/svg","svg"),vt.setAttribute("width","0"),vt.setAttribute("height","0"),vt.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),Et=document.createElementNS("http://www.w3.org/2000/svg","path"),vt.appendChild(Et),document.body.appendChild(vt)),Et.setAttribute("d",A||"M0 0");let s=0;try{s=Et.getTotalLength()}catch{s=0}if(!s||!isFinite(s)){const i=Ot(A),a=qt(i),o=a.x+a.width/2,r=a.y+a.height/2;for(let n=0;n<t;n++)e[n]={x:o,y:r};return e}for(let i=0;i<t;i++)try{const a=Et.getPointAtLength(i/t*s);e[i]={x:a.x,y:a.y}}catch{e[i]={x:0,y:0}}return e}function oi(A,t,e=96){const s=Me(A,e),i=Me(t,e);let a=0,o=1/0;for(let n=0;n<e;n++){let l=0;for(let c=0;c<e;c++){const h=s[(c+n)%e],d=i[c],f=h.x-d.x,p=h.y-d.y;if(l+=f*f+p*p,l>=o)break}l<o&&(o=l,a=n)}const r=new Array(e);for(let n=0;n<e;n++)r[n]=s[(n+a)%e];return function(n){let l="";for(let c=0;c<e;c++){const h=r[c],d=i[c],f=h.x+(d.x-h.x)*n,p=h.y+(d.y-h.y)*n;l+=(c===0?"M":"L")+f.toFixed(3)+" "+p.toFixed(3)+" "}return l+"Z"}}function ri(A){return-Math.cos(A*Math.PI)/2+.5}function Te(A){if(!A||typeof A!="string")return null;if(A[0]==="#"){let e=A.slice(1);e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const s=parseInt(e,16);return[s>>16&255,s>>8&255,s&255,1]}const t=A.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 ni(A,t,e){return`rgba(${Math.round(A[0]+(t[0]-A[0])*e)},${Math.round(A[1]+(t[1]-A[1])*e)},${Math.round(A[2]+(t[2]-A[2])*e)},${A[3]+(t[3]-A[3])*e})`}class we{constructor(t,e,s){this.el=t,this.duration=e??300,this.delay=s||0,this._attrTarget=null,this._plotTarget=null,this._plotAlgorithm="commands",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,e){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._schedule(),this}after(t){return this._afterCb=t,this._schedule(),this}during(t){return this._duringCb=t,this._schedule(),this}animate(t,e){const s=new we(this.el,t,e);return this._next=s,s._root=this._root||this,s}
vendor: 4,876 bytes, line 47
47_schedule(){const t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){const t=[];let e=this;for(;e;)t.push(e),e=e._next;let s=0;t.forEach(i=>{s+=i.delay,i._execute(s),s+=i.duration})}_execute(t){const e=this.el,s=this.duration;if(s<=1){const 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}const i=()=>{const a={},o={},r={};if(this._attrTarget)for(const h of Object.keys(this._attrTarget)){const d=e.attr(h);a[h]=d;const f=Te(d),p=Te(String(this._attrTarget[h]));f&&p&&(o[h]=f,r[h]=p)}let n=null;if(this._plotTarget){const h=e.attr("d")||"";try{n=this._plotAlgorithm==="polygons"?oi(h,this._plotTarget):ai(h,this._plotTarget)}catch{n=null}}const l=performance.now(),c=h=>{const d=h-l,f=Math.min(d/s,1),p=ri(f);if(this._attrTarget)if(f>=1)e.attr(this._attrTarget);else{const g={};for(const u of Object.keys(this._attrTarget))if(o[u]&&r[u])g[u]=ni(o[u],r[u],p);else{const x=parseFloat(a[u]),b=parseFloat(this._attrTarget[u]);!isNaN(x)&&!isNaN(b)&&(g[u]=x+(b-x)*p)}e.attr(g)}n&&f<1&&e.attr("d",n(p)),this._duringCb&&this._duringCb(p),f<1?B.requestAnimationFrame(c):(this._plotTarget&&e.attr("d",this._plotTarget),this._afterCb&&this._afterCb.call(e))};B.requestAnimationFrame(c)};t>0?setTimeout(i,t):i()}}function li(A){A.prototype.animate=function(t,e){return new we(this,t,e)}}function ci(A){A.prototype.draggable=function(t){if(t===!1)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const e=this,s=t||{},i=a=>{if(a.button&&a.button!==0)return;a.stopPropagation();const r=a.type==="touchstart"?a.touches[0]:a,n=e.node,l=parseFloat(n.getAttribute("x"))||0,c=parseFloat(n.getAttribute("y"))||0,h=r.clientX,d=r.clientY,f=n.ownerSVGElement;let p=null;f&&(p=f.getScreenCTM());const g=x=>{const b=x.type==="touchmove"?x.touches[0]:x;let w=b.clientX-h,m=b.clientY-d;p&&(w=w/p.a,m=m/p.d);let y=l+w,v=c+m;const C=parseFloat(n.getAttribute("width"))||0,D=parseFloat(n.getAttribute("height"))||0;s.minX!==void 0&&y<s.minX&&(y=s.minX),s.minY!==void 0&&v<s.minY&&(v=s.minY),s.maxX!==void 0&&y+C>s.maxX&&(y=s.maxX-C),s.maxY!==void 0&&v+D>s.maxY&&(v=s.maxY-D);const S={x:y,y:v,w:C,h:D,x2:y+C,y2:v+D},k=new CustomEvent("dragmove",{detail:{handler:{move:function(M,L){n.setAttribute("x",M),n.setAttribute("y",L)}},box:S}});n.dispatchEvent(k)},u=()=>{W.isBrowser()&&(document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",u),document.removeEventListener("touchend",u))};W.isBrowser()&&(document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),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 hi(A){A.prototype.select=function(t){if(t===!1)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const e=this,{createHandle:s,updateHandle:i}=t,a=document.createElementNS(Z,"g");a.setAttribute("class","svg_select_points");const o=e.node.parentNode;o&&o.appendChild(a);const r={},n=["t","b","l","r","lt","rt","lb","rb"];n.forEach((c,h)=>{const d=new Ht(document.createElementNS(Z,"g"));a.appendChild(d.node);const f=s(d,[0,0],h,[],c);r[c]={group:d,handle:f}});const l=()=>{const c=parseFloat(e.attr("x"))||0,h=parseFloat(e.attr("y"))||0,d=parseFloat(e.attr("width"))||0,f=parseFloat(e.attr("height"))||0,p=e.node.getAttribute("transform");p?a.setAttribute("transform",p):a.removeAttribute("transform");const g={t:[c+d/2,h],b:[c+d/2,h+f],l:[c,h+f/2],r:[c+d,h+f/2],lt:[c,h],rt:[c+d,h],lb:[c,h+f],rb:[c+d,h+f]};n.forEach(u=>{r[u]&&g[u]&&i(r[u].group,g[u])})};return l(),e._selectHandles=a,e._selectHandlesMap=r,e._updateSelectPositions=l,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},A.prototype.resize=function(t){if(t===!1)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;const e=this,s=e._selectHandlesMap;if(!s)return e;const i=[],a=o=>{const r=s[o];if(!r||!r.group||!r.group.node)return;const n=r.group.node,l=c=>{if(c.button&&c.button!==0)return;c.stopPropagation();const f=(c.type==="touchstart"?c.touches[0]:c).clientX,p=e.node.ownerSVGElement;let g=null;p&&(g=p.getScreenCTM());const u=parseFloat(e.attr("x"))||0,x=parseFloat(e.attr("width"))||0,b=m=>{let v=(m.type==="touchmove"?m.touches[0]:m).clientX-f;g&&(v=v/g.a);let C=u,D=x;o==="l"?(C=u+v,D=x-v):o==="r"&&(D=x+v),D<0&&(D=0),e.attr({x:C,width:D}),e._updateSelectPositions&&e._updateSelectPositions();const S=new CustomEvent("resize",{detail:{el:e}});
47e.node.dispatchEvent(S)},w=()=>{W.isBrowser()&&(document.removeEventListener("mousemove",b),document.removeEventListener("touchmove",b),document.removeEventListener("mouseup",w),document.removeEventListener("touchend",w));const m=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(m)};W.isBrowser()&&(document.addEventListener("mousemove",b),document.addEventListener("touchmove",b),document.addEventListener("mouseup",w),document.addEventListener("touchend",w))};n.addEventListener("mousedown",l),n.addEventListener("touchstart",l),i.push(()=>{n.removeEventListener("mousedown",l),n.removeEventListener("touchstart",l)})};return a("l"),a("r"),e._resizeCleanup=()=>{i.forEach(o=>o())},e}}Qs(it);li(it);ci(it);hi(it);function Zt(){const A=B.createElementNS(Z,"svg"),t=new Ht(A);return t.attr({xmlns:Z}),t}Zt.xlink="http://www.w3.org/1999/xlink";W.isBrowser()&&typeof window.SVG>"u"&&(window.SVG=Zt);W.isBrowser()?(typeof window.SVG>"u"&&(window.SVG=Zt),typeof window.Apex>"u"&&(window.Apex={})):typeof global<"u"&&(typeof global.Apex>"u"&&(global.Apex={}),typeof global.SVG>"u"&&(global.SVG=Zt));const Qe=class de{static registerFeatures(t){for(const[e,s]of Object.entries(t))de._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","drillDown","drillUp","drillToRoot","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new Tt(this.w,this.ctx),this.ctx.axes=new Cs(this.w,this.ctx),this.ctx.core=new Xs(this.ctx.el,this.w,this.ctx),this.ctx.config=new Bt({}),this.ctx.data=new xt(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new Ve(this.w,this.ctx),this.ctx.graphics=new R(this.w,this.ctx),this.ctx.coreUtils=new et(this.w),this.ctx.crosshairs=new ce(this.w),this.ctx.events=new vs(this.w,this.ctx),this.ctx.fill=new nt(this.w),this.ctx.localization=new As(this.w),this.ctx.options=new Ct,this.ctx.responsive=new Ss(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 ks(this.w),this.ctx.formatters=new zt(this.w),this.ctx.titleSubtitle=new Ls(this.w),this.ctx.dimensions=new Ut(this.w,this.ctx),this.ctx.updateHelpers=new Is(this.w,this.ctx);const t=new Hs(this.w,this.ctx);this.w.globals.tooltip=t,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){const t=de._featureRegistry,e=this.w,s=this.ctx,i=t.get("exports");s.exports=i?new i(e,s):null;const a=t.get("legend");s.legend=a?new a(e,s):null;const o=t.get("morphTypeChange");s.morphTypeChange=o?new o(e,s):null;const r=t.get("drilldown");s.drilldown=r?new r(e,s):null;const n=t.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var h;return!this._toolbar&&n&&(this._toolbar=new n(e,this)),(h=this._toolbar)!=null?h:null},configurable:!0});const l=t.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var h;return!this._zoomPanSelection&&l&&(this._zoomPanSelection=new l(e,this)),(h=this._zoomPanSelection)!=null?h:null},configurable:!0});const c=t.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var h;return!this._keyboardNavigation&&c&&(this._keyboardNavigation=new c(e,this)),(h=this._keyboardNavigation)!=null?h:null},configurable:!0})}};U(Qe,"_featureRegistry",new Map);let Wt=Qe;class Pe{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){t||(this.w.globals.isDestroyed=!0),this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&typeof this.w.globals.resizeObserver.disconnect=="function"&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),me.invali
vendor: 3,184 bytes, lines 47-107
47dateAll(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}){const e=this.w.dom;if(W.isBrowser()&&e.Paper){const s=e.Paper.node;s.parentNode&&s.parentNode.parentNode&&!t&&(s.parentNode.parentNode.style.minHeight="unset");const i=e.baseEl;if(i&&this.ctx.eventList.forEach(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}}const fe=new WeakMap;function di(A,t){if(W.isSSR())return;let e=!1;if(A.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const i=A.getBoundingClientRect();(A.style.display==="none"||i.width===0)&&(e=!0)}const s=new ResizeObserver(i=>{e&&t.call(A,i),e=!0});A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(A.children).forEach(i=>s.observe(i)):s.observe(A),fe.set(t,s)}function fi(A,t){if(W.isSSR())return;const e=fe.get(t);e&&(e.disconnect(),fe.delete(t))}const gi=`@keyframes opaque { 48 0% { 49 opacity: 0 50 } 51 52 to { 53 opacity: 1 54 } 55} 56 57@keyframes resizeanim { 58 59 0%, 60 to { 61 opacity: 0 62 } 63} 64 65.apexcharts-canvas { 66 position: relative; 67 direction: ltr !important; 68 user-select: none; 69 /* Focus indicator colour. Themes override below. */ 70 --apexcharts-focus-color: #008FFB; 71} 72 73/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */ 74.apexcharts-canvas .apexcharts-theme-dark, 75.apexcharts-theme-dark.apexcharts-canvas { 76 --apexcharts-focus-color: #FFD500; 77} 78.apexcharts-canvas.apexcharts-high-contrast, 79.apexcharts-high-contrast.apexcharts-canvas { 80 --apexcharts-focus-color: #FFFF00; 81} 82 83/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */ 84.apexcharts-sr-status { 85 position: absolute; 86 width: 1px; 87 height: 1px; 88 padding: 0; 89 margin: -1px; 90 overflow: hidden; 91 clip: rect(0, 0, 0, 0); 92 white-space: nowrap; 93 border: 0; 94} 95 96/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */ 97@media (prefers-reduced-motion: reduce) { 98 .apexcharts-canvas *, 99 .apexcharts-canvas *::before, 100 .apexcharts-canvas *::after { 101 animation-duration: 0.01ms !important; 102 animation-iteration-count: 1 !important; 103 transition-duration: 0.01ms !important; 104 } 105} 106 107.apexcharts-canvas ::-webkit-scrollbar {
108 -webkit-appearance: none; 109 width: 6px 110} 111 112.apexcharts-canvas ::-webkit-scrollbar-thumb { 113 border-radius: 4px; 114 background-color: rgba(0, 0, 0, .5); 115 box-shadow: 0 0 1px rgba(255, 255, 255, .5); 116 -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5) 117} 118 119.apexcharts-inner { 120 position: relative 121} 122 123.apexcharts-text tspan { 124 font-family: inherit 125} 126 127rect.legend-mouseover-inactive, 128.legend-mouseover-inactive rect, 129.legend-mouseover-inactive path, 130.legend-mouseover-inactive circle, 131.legend-mouseover-inactive line, 132.legend-mouseover-inactive text.apexcharts-yaxis-title-text, 133.legend-mouseover-inactive text.apexcharts-yaxis-label { 134 transition: .15s ease all; 135 opacity: .2 136} 137 138.apexcharts-legend-text { 139 padding-left: 15px; 140 margin-left: -15px; 141} 142 143.apexcharts-legend-series[role="button"]:focus { 144 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 145 outline-offset: 2px; 146} 147 148.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) { 149 outline: none; 150} 151 152.apexcharts-legend-series[role="button"]:focus-visible { 153 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 154 outline-offset: 2px; 155} 156 157.apexcharts-series-collapsed { 158 opacity: 0 159} 160 161.apexcharts-canvas svg:focus:not(:focus-visible) { 162 outline: none; 163} 164 165/* Keyboard navigation focus indicator on SVG data elements. 166 SVG elements don't support CSS outline, so we use stroke. */ 167.apexcharts-bar-area.apexcharts-keyboard-focused, 168.apexcharts-candlestick-area.apexcharts-keyboard-focused, 169.apexcharts-boxPlot-area.apexcharts-keyboard-focused, 170.apexcharts-rangebar-area.apexcharts-keyboard-focused, 171.apexcharts-pie-area.apexcharts-keyboard-focused, 172.apexcharts-heatmap-rect.apexcharts-keyboard-focused, 173.apexcharts-treemap-rect.apexcharts-keyboard-focused { 174 stroke: var(--apexcharts-focus-color, #008FFB); 175 stroke-width: 2; 176 stroke-opacity: 1; 177} 178 179.apexcharts-tooltip { 180 --apx-tt-bg: #ffffff; 181 --apx-tt-border: rgba(15, 23, 42, 0.06); 182 /* Layered shadow: tight inner contact + soft outer drop. The two Y 183 * offsets are exposed as variables so they flip in sync with the 184 * arrow when the tooltip is below the data point â see the 185 * \`[data-placement="bottom"]\` rule further down. */ 186 --apx-tt-shadow-y-mid: 8px; 187 --apx-tt-shadow-y-far: 16px; 188 --apx-tt-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(15, 23, 42, 0.12), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(15, 23, 42, 0.18); 189 --apx-tt-arrow-bg: var(--apx-tt-bg); 190 /* Two stacked drop-shadows: the first is a tight contact halo for 191 * edge definition against light chart backgrounds; the second is a 192 * softer directional drop that lifts the arrow off the surface. 193 * \`--apx-tt-arrow-drop-y\` is the Y offset of the directional drop; 194 * a per-placement rule below flips it to negative when the tooltip 195 * is below the data point (arrow on top) so the shadow always 196 * casts outward instead of into the tooltip body. */ 197 --apx-tt-arrow-drop-y: 2px; 198 --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(15, 23, 42, 0.2)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(15, 23, 42, 0.2)); 199 --apx-tt-color: #0f172a; 200 --apx-tt-color-muted: rgba(15, 23, 42, 0.55); 201 border-radius: 8px; 202 background: var(--apx-tt-bg); 203 border: 1px solid var(--apx-tt-border); 204 box-shadow: var(--apx-tt-shadow); 205 color: var(--apx-tt-color); 206 cursor: default; 207 font-size: 13px; 208 left: 0; 209 top: 0; 210 opacity: 0; 211 pointer-events: none; 212 position: absolute; 213 display: flex; 214 flex-direction: column; 215 padding: 2px 0; 216 white-space: nowrap; 217 z-index: 12; 218 transition: opacity .12s ease 219} 220 221/* While the tooltip is visible, smoothly animate position changes 222 * between data points. Kept short (160 ms) and ease-out so it stays 223 * responsive â too long would feel laggy when sweeping across many 224 * points fast. The position transition is only attached after the 225 * first paint (Position.applyTooltipPosition flips \`data-positioned\` 226 * once the tooltip has been placed) so the *first* show doesn't slide 227 * the tooltip in from the previously-stale (0,0) coordinates. */ 228.apexcharts-tooltip.apexcharts-active { 229 opacity: 1; 230 transition: opacity .12s ease 231} 232.apexcharts-tooltip.apexcharts-active[data-positioned="true"] { 233 transition: opacity .12s ease, left .16s ease-out, top .16s ease-out 234} 235 236.apexcharts-tooltip.apexcharts-theme-light { 237 /* defaults already set above; class kept for backward-compat selectors */ 238} 239 240.apexcharts-tooltip.apexcharts-theme-dark { 241 --apx-tt-bg: #1c1c1f; 242 --apx-tt-border: rgba(255, 255, 255, 0.08); 243 --apx-tt-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(0, 0, 0, 0.45), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(0, 0, 0, 0.55); 244 --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.55)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(0, 0, 0, 0.45)); 245 --apx-tt-color: #f3f4f6; 246 --apx-tt-color-muted: rgba(243, 244, 246, 0.55); 247} 248 249.apexcharts-tooltip * { 250 font-family: inherit 251} 252 253.apexcharts-tooltip-title { 254 padding: 8px 12px 4px; 255 font-size: 12px; 256 font-weight: 600; 257 letter-spacing: 0.01em; 258 color: var(--apx-tt-color-muted); 259 background: transparent; 260 border-bottom: none; 261 margin-bottom: 0 262} 263 264.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title, 265.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title { 266 background: transparent; 267 border-bottom: none 268} 269 270/* \`fillSeriesColor\`: each series-group already paints itself with the 271 * series colour. Drop the glass body entirely (transparent bg, no 272 * border, no backdrop-filter, no padding) and clip the coloured 273 * series-group(s) to the tooltip's rounded corners so they fill the 274 * shell edge-to-edge. Text inside the coloured group is forced to 275 * white for contrast. */ 276.apexcharts-tooltip.apexcharts-tooltip-fill-series { 277 background: transparent; 278 -webkit-backdrop-filter: none; 279 backdrop-filter: none; 280 border: none; 281 padding: 0; 282 overflow: hidden; 283 color: #fff 284} 285 286.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title { 287 background: rgba(0, 0, 0, 0.22); 288 color: #fff; 289 opacity: 1; 290 padding: 6px 12px 291} 292 293.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group { 294 color: #fff 295} 296 297/* Arrow connector â sits *entirely outside* the tooltip body. Shares 298 * the body's solid fill so it reads as a single shape. \`filter: 299 * drop-shadow\` traces the clipped triangle outline (a regular
300 * \`box-shadow\` would be erased by the \`clip-path\`). */ 301.apexcharts-tooltip-arrow { 302 position: absolute; 303 width: 7px; 304 height: 14px; 305 background: var(--apx-tt-arrow-bg); 306 /* The variable already contains the full \`drop-shadow(...) ...\` filter 307 * chain (stacked shadows) so it's applied raw. */ 308 -webkit-filter: var(--apx-tt-arrow-shadow); 309 filter: var(--apx-tt-arrow-shadow); 310 pointer-events: none; 311 top: calc(var(--apx-tt-arrow-y, 50%) - 7px) 312} 313 314.apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow { 315 left: -7px; 316 clip-path: polygon(0 50%, 100% 0, 100% 100%) 317} 318 319.apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow { 320 right: -7px; 321 clip-path: polygon(100% 50%, 0 0, 0 100%) 322} 323 324/* Vertical arrow variants: tooltip is above/below the data point and the 325 * arrow points down/up. The base rule above uses \`--apx-tt-arrow-y\` for 326 * left/right placement; for top/bottom we re-orient the rectangle and 327 * use \`--apx-tt-arrow-x\` (set by applyTooltipPosition). */ 328.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow, 329.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow { 330 width: 14px; 331 height: 7px; 332 top: auto; 333 left: calc(var(--apx-tt-arrow-x, 50%) - 7px) 334} 335 336.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow { 337 bottom: -7px; 338 clip-path: polygon(50% 100%, 0 0, 100% 0) 339} 340 341.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow { 342 top: -7px; 343 clip-path: polygon(50% 0, 0 100%, 100% 100%) 344} 345 346/* When the tooltip is flipped below the data point (arrow on top 347 * pointing up), the default downward-biased shadows leave the top 348 * edge of both the body *and* the arrow undefined. Flipping every 349 * Y offset to negative casts the entire elevation upward so the 350 * shadow falls between the tooltip and the bar above. */ 351.apexcharts-tooltip[data-placement="bottom"] { 352 --apx-tt-shadow-y-mid: -8px; 353 --apx-tt-shadow-y-far: -16px; 354 --apx-tt-arrow-drop-y: -2px 355} 356 357.apexcharts-tooltip-text-goals-value, 358.apexcharts-tooltip-text-y-value, 359.apexcharts-tooltip-text-z-value { 360 display: inline-block; 361 margin-left: 5px; 362 font-weight: 600 363} 364 365.apexcharts-tooltip-text-goals-label:empty, 366.apexcharts-tooltip-text-goals-value:empty, 367.apexcharts-tooltip-text-y-label:empty, 368.apexcharts-tooltip-text-y-value:empty, 369.apexcharts-tooltip-text-z-value:empty, 370.apexcharts-tooltip-title:empty { 371 display: none 372} 373 374.apexcharts-tooltip-text-goals-label, 375.apexcharts-tooltip-text-goals-value { 376 padding: 6px 0 5px 377} 378 379.apexcharts-tooltip-goals-group, 380.apexcharts-tooltip-text-goals-label, 381.apexcharts-tooltip-text-goals-value { 382 display: flex 383} 384 385.apexcharts-tooltip-text-goals-label:not(:empty), 386.apexcharts-tooltip-text-goals-value:not(:empty) { 387 margin-top: -6px 388} 389 390.apexcharts-tooltip-marker { 391 display: inline-flex; 392 align-items: center; 393 justify-content: center; 394 position: relative; 395 width: 12px; 396 height: 12px; 397 margin-right: 6px; 398 vertical-align: middle; 399 color: inherit; 400} 401 402.apexcharts-tooltip-marker svg { 403 width: 100%; 404 height: 100%; 405 display: block; 406} 407 408.apexcharts-tooltip-series-group { 409 padding: 4px 12px; 410 display: none; 411 gap: 8px; 412 text-align: left; 413 justify-content: left; 414 align-items: center 415} 416 417.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker { 418 opacity: 1 419} 420 421.apexcharts-tooltip-series-group.apexcharts-active:last-child, 422.apexcharts-tooltip-series-group:last-child { 423 padding-bottom: 8px 424} 425 426.apexcharts-tooltip-y-group { 427 padding: 6px 0 5px 428} 429 430.apexcharts-custom-tooltip, 431.apexcharts-tooltip-box { 432 padding: 4px 8px 433} 434 435.apexcharts-tooltip-boxPlot { 436 display: flex; 437 flex-direction: column-reverse 438} 439 440.apexcharts-tooltip-box>div { 441 margin: 4px 0 442} 443 444.apexcharts-tooltip-box span.value { 445 font-weight: 700 446} 447 448.apexcharts-tooltip-rangebar { 449 padding: 5px 8px 450} 451 452.apexcharts-tooltip-rangebar .category { 453 font-weight: 600; 454 color: #777 455} 456 457.apexcharts-tooltip-rangebar .series-name { 458 font-weight: 700; 459 display: block; 460 margin-bottom: 5px 461} 462 463/* X/Y axis tooltips â small popovers that label the crosshair on the 464 * axes. Restyled to match the modern data-tooltip palette: solid white 465 * body with a subtle border + soft drop-shadow, smaller font, rounded 466 * corners. The arrows still use the CSS border-triangle technique 467 * (cheap, crisp at small sizes); their colours flow from CSS variables 468 * so light/dark themes only need one override per axis. */ 469.apexcharts-xaxistooltip, 470.apexcharts-yaxistooltip { 471 --apx-axt-bg: #ffffff; 472 --apx-axt-border: rgba(15, 23, 42, 0.08); 473 --apx-axt-color: #0f172a; 474 --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12); 475 opacity: 0; 476 pointer-events: none; 477 color: var(--apx-axt-color); 478 font-size: 12px; 479 font-weight: 500; 480 text-align: center; 481 border-radius: 6px; 482 position: absolute; 483 z-index: 10; 484 background: var(--apx-axt-bg); 485 border: 1px solid var(--apx-axt-border); 486 box-shadow: var(--apx-axt-shadow) 487} 488 489.apexcharts-xaxistooltip.apexcharts-theme-dark, 490.apexcharts-yaxistooltip.apexcharts-theme-dark { 491 --apx-axt-bg: #1c1c1f; 492 --apx-axt-border: rgba(255, 255, 255, 0.1); 493 --apx-axt-color: #f3f4f6; 494 --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45) 495} 496 497.apexcharts-xaxistooltip { 498 padding: 4px 8px; 499 transition: .15s ease all 500} 501 502.apexcharts-xaxistooltip:after, 503.apexcharts-xaxistooltip:before { 504 left: 50%; 505 border: solid transparent; 506 content: " "; 507 height: 0; 508 width: 0; 509 position: absolute; 510 pointer-events: none 511} 512 513/* :before paints the 1px border outline of the triangle (slightly larger 514 * than :after); :after sits inside and paints the fill â leaves a 1px 515 * ring of :before visible at the edges. */ 516.apexcharts-xaxistooltip:after { 517 border-color: transparent; 518 border-width: 5px; 519 margin-left: -5px 520} 521 522.apexcharts-xaxistooltip:before { 523 border-color: transparent; 524 border-width: 6px; 525 margin-left: -6px 526} 527 528.apexcharts-xaxistooltip-bottom:after, 529.apexcharts-xaxistooltip-bottom:before { 530 bottom: 100% 531} 532 533.apexcharts-xaxistooltip-top:after, 534.apexcharts-xaxistooltip-top:before { 535 top: 100% 536} 537 538.apexcharts-xaxistooltip-bottom:after { 539 border-bottom-color: var(--apx-axt-bg) 540} 541 542.apexcharts-xaxistooltip-bottom:before { 543 border-bottom-color: var(--apx-axt-border) 544} 545 546.apexcharts-xaxistooltip-top:after { 547 border-top-color: var(--apx-axt-bg) 548} 549 550.apexcharts-xaxistooltip-top:before { 551 border-top-color: var(--apx-axt-border) 552} 553 554.apexcharts-xaxistooltip.apexcharts-active { 555 opacity: 1; 556 transition: .15s ease all 557} 558 559.apexcharts-yaxistooltip { 560 padding: 3px 8px 561} 562 563.apexcharts-yaxistooltip:after, 564.apexcharts-yaxistooltip:before { 565 top: 50%; 566 border: solid transparent; 567 content: " "; 568 height: 0; 569 width: 0; 570 position: absolute; 571 pointer-events: none 572} 573 574.apexcharts-yaxistooltip:after { 575 border-color: transparent; 576 border-width: 5px; 577 margin-top: -5px 578} 579 580.apexcharts-yaxistooltip:before { 581 border-color: transparent; 582 border-width: 6px; 583 margin-top: -6px 584} 585 586.apexcharts-yaxistooltip-left:after, 587.apexcharts-yaxistooltip-left:before { 588 left: 100% 589} 590 591.apexcharts-yaxistooltip-right:after, 592.apexcharts-yaxistooltip-right:before { 593 right: 100% 594}
594 595 596.apexcharts-yaxistooltip-left:after { 597 border-left-color: var(--apx-axt-bg) 598} 599 600.apexcharts-yaxistooltip-left:before { 601 border-left-color: var(--apx-axt-border) 602} 603 604.apexcharts-yaxistooltip-right:after { 605 border-right-color: var(--apx-axt-bg) 606} 607 608.apexcharts-yaxistooltip-right:before { 609 border-right-color: var(--apx-axt-border) 610} 611 612.apexcharts-yaxistooltip.apexcharts-active { 613 opacity: 1 614} 615 616.apexcharts-yaxistooltip-hidden { 617 display: none 618} 619 620.apexcharts-xcrosshairs, 621.apexcharts-ycrosshairs { 622 pointer-events: none; 623 opacity: 0; 624 transition: .15s ease all 625} 626 627.apexcharts-xcrosshairs.apexcharts-active, 628.apexcharts-ycrosshairs.apexcharts-active { 629 opacity: 1; 630 transition: .15s ease all 631} 632 633.apexcharts-ycrosshairs-hidden { 634 opacity: 0 635} 636 637.apexcharts-selection-rect { 638 cursor: move 639} 640 641.svg_select_shape { 642 stroke-width: 1; 643 stroke-dasharray: 10 10; 644 stroke: black; 645 stroke-opacity: 0.1; 646 pointer-events: none; 647 fill: none; 648} 649 650.svg_select_handle { 651 stroke-width: 3; 652 stroke: black; 653 fill: none; 654} 655 656.svg_select_handle_r { 657 cursor: e-resize; 658} 659 660.svg_select_handle_l { 661 cursor: w-resize; 662} 663 664.apexcharts-svg.apexcharts-zoomable.hovering-zoom { 665 cursor: crosshair 666} 667 668.apexcharts-svg.apexcharts-zoomable.hovering-pan { 669 cursor: move 670} 671 672.apexcharts-menu-icon, 673.apexcharts-pan-icon, 674.apexcharts-reset-icon, 675.apexcharts-selection-icon, 676.apexcharts-toolbar-custom-icon, 677.apexcharts-zoom-icon, 678.apexcharts-zoomin-icon, 679.apexcharts-zoomout-icon { 680 cursor: pointer; 681 /* WCAG 2.5.8 Target Size (Minimum): 24Ã24 CSS px hit target. */ 682 width: 26px; 683 height: 24px; 684 line-height: 24px; 685 color: #6e8192; 686 text-align: center; 687 /* Reset native <button> chrome â these are styled via SVG icons. */ 688 padding: 0; 689 margin: 0; 690 background: transparent; 691 border: 0; 692 border-radius: 5px; 693 display: inline-flex; 694 align-items: center; 695 justify-content: center; 696 transition: background-color .12s ease, color .12s ease; 697} 698 699.apexcharts-menu-icon svg, 700.apexcharts-pan-icon svg, 701.apexcharts-reset-icon svg, 702.apexcharts-selection-icon svg, 703.apexcharts-zoom-icon svg, 704.apexcharts-zoomin-icon svg, 705.apexcharts-zoomout-icon svg { 706 width: 18px; 707 height: 18px; 708 fill: none; 709 stroke: currentColor; 710 stroke-width: 2; 711 stroke-linecap: round; 712 stroke-linejoin: round 713} 714 715.apexcharts-theme-dark .apexcharts-menu-icon, 716.apexcharts-theme-dark .apexcharts-pan-icon, 717.apexcharts-theme-dark .apexcharts-reset-icon, 718.apexcharts-theme-dark .apexcharts-selection-icon, 719.apexcharts-theme-dark .apexcharts-toolbar-custom-icon, 720.apexcharts-theme-dark .apexcharts-zoom-icon, 721.apexcharts-theme-dark .apexcharts-zoomin-icon, 722.apexcharts-theme-dark .apexcharts-zoomout-icon { 723 color: #d4d6dc 724} 725 726.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected, 727.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected, 728.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected, 729.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected { 730 background: rgba(0, 143, 251, 0.12); 731 color: #008ffb 732} 733 734.apexcharts-theme-light .apexcharts-menu-icon:hover, 735.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover, 736.apexcharts-theme-light .apexcharts-reset-icon:hover, 737.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover, 738.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover, 739.apexcharts-theme-light .apexcharts-zoomin-icon:hover, 740.apexcharts-theme-light .apexcharts-zoomout-icon:hover { 741 background: rgba(15, 23, 42, 0.06); 742 color: #1f2937 743} 744 745.apexcharts-theme-dark .apexcharts-menu-icon:hover, 746.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover, 747.apexcharts-theme-dark .apexcharts-reset-icon:hover, 748.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover, 749.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover, 750.apexcharts-theme-dark .apexcharts-zoomin-icon:hover, 751.apexcharts-theme-dark .apexcharts-zoomout-icon:hover { 752 background: rgba(255, 255, 255, 0.08); 753 color: #fff 754} 755 756.apexcharts-menu-icon, 757.apexcharts-selection-icon { 758 position: relative 759} 760 761.apexcharts-toolbar { 762 position: absolute; 763 z-index: 11; 764 display: inline-flex; 765 align-items: center; 766 gap: 1px; 767 padding: 3px; 768 border-radius: 8px; 769 background: rgba(255, 255, 255, 0.85); 770 backdrop-filter: blur(8px); 771 -webkit-backdrop-filter: blur(8px); 772} 773 774.apexcharts-theme-dark .apexcharts-toolbar { 775 background: rgba(28, 28, 31, 0.82); 776} 777 778.apexcharts-menu { 779 background: rgba(255, 255, 255, 0.95); 780 backdrop-filter: blur(8px); 781 -webkit-backdrop-filter: blur(8px); 782 position: absolute; 783 top: calc(100% + 4px); 784 border: 1px solid rgba(15, 23, 42, 0.08); 785 border-radius: 8px; 786 padding: 4px; 787 right: 0; 788 opacity: 0; 789 min-width: 120px; 790 transition: opacity .15s ease, transform .15s ease; 791 transform: translateY(-2px); 792 pointer-events: none; 793 box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06) 794} 795 796.apexcharts-menu.apexcharts-menu-open { 797 opacity: 1; 798 transform: translateY(0); 799 pointer-events: all 800} 801 802.apexcharts-menu-item { 803 padding: 6px 9px; 804 font-size: 12px; 805 border-radius: 5px; 806 cursor: pointer 807} 808 809.apexcharts-theme-light .apexcharts-menu-item:hover { 810 background: rgba(15, 23, 42, 0.06) 811} 812 813.apexcharts-theme-dark .apexcharts-menu { 814 background: rgba(28, 28, 31, 0.92); 815 border-color: rgba(255, 255, 255, 0.08); 816 color: #f3f4f6; 817 box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4) 818} 819 820.apexcharts-theme-dark .apexcharts-menu-item:hover { 821 background: rgba(255, 255, 255, 0.08) 822} 823 824@media screen and (min-width:768px) { 825 .apexcharts-canvas:hover .apexcharts-toolbar { 826 opacity: 1 827 } 828} 829 830/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */ 831.apexcharts-toolbar:focus-within { 832 opacity: 1 833} 834 835/* Focus indicator for toolbar icon buttons */ 836.apexcharts-menu-icon:focus-visible, 837.apexcharts-pan-icon:focus-visible, 838.apexcharts-reset-icon:focus-visible, 839.apexcharts-selection-icon:focus-visible, 840.apexcharts-toolbar-custom-icon:focus-visible, 841.apexcharts-zoom-icon:focus-visible, 842.apexcharts-zoomin-icon:focus-visible, 843.apexcharts-zoomout-icon:focus-visible { 844 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 845 outline-offset: 1px; 846 border-radius: 5px 847} 848 849/* Focus indicator for hamburger menu items */ 850.apexcharts-menu-item:focus-visible { 851 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 852 outline-offset: -2px; 853 background: #eee 854} 855 856.apexcharts-canvas .apexcharts-element-hidden, 857.apexcharts-datalabel.apexcharts-element-hidden, 858.apexcharts-hide .apexcharts-series-points { 859 opacity: 0; 860} 861 862.apexcharts-hidden-element-shown { 863 opacity: 1; 864 transition: 0.25s ease all; 865} 866 867.apexcharts-datalabel, 868.apexcharts-datalabel-label, 869.apexcharts-datalabel-value, 870.apexcharts-datalabels, 871.apexcharts-pie-label, 872.apexcharts-pie-name-label, 873.apexcharts-pie-name-label-group, 874.apexcharts-pie-label-connector { 875 cursor: default; 876 pointer-events: none 877} 878 879.apexcharts-pie-label-connector { 880 fill: none 881} 882 883.apexcharts-pie-label-delay { 884 opacity: 0; 885 animation-name: opaque; 886 animation-duration: .3s; 887 animation-fill-mode: forwards; 888 animation-timing-function: ease 889} 890 891.apexcharts-radialbar-label { 892 cursor: pointer; 893} 894 895.apexcharts-annotation-rect, 896.apexcharts-area-series .apexcharts-area, 897.apexcharts-gridline, 898.apexcharts-line, 899.apexcharts-point-annotation-label, 900.apexcharts-radar-series path:not(.apexcharts-marker), 901.apexcharts-radar-series polygon, 902.apexcharts-toolbar svg, 903.apexcharts-tooltip .apexcharts-marker, 904.apexcharts-xaxis-annotation-label, 905.apexcharts-yaxis-annotation-label, 906.apexcharts-zoom-rect, 907.no-pointer-events { 908 pointer-events: none 909} 910 911.apexcharts-tooltip-active .apexcharts-marker { 912 transition: .15s ease all 913} 914 915.apexcharts-radar-series .apexcharts-yaxis { 916 pointer-events: none; 917} 918 919.resize-triggers { 920 animation: 1ms resizeanim; 921 visibility: hidden; 922 opacity: 0; 923 height: 100%; 924 width: 100%; 925 overflow: hidden 926} 927 928.contract-trigger:before, 929.resize-triggers, 930.resize-triggers>div {
931 content: " "; 932 display: block; 933 position: absolute; 934 top: 0; 935 left: 0 936} 937 938.resize-triggers>div { 939 height: 100%; 940 width: 100%; 941 background: #eee; 942 overflow: auto 943} 944 945.contract-trigger:before { 946 overflow: hidden; 947 width: 200%; 948 height: 200% 949} 950 951.apexcharts-bar-goals-markers { 952 pointer-events: none 953} 954 955.apexcharts-bar-shadows { 956 pointer-events: none 957} 958 959.apexcharts-rangebar-goals-markers { 960 pointer-events: none 961} 962 963.apexcharts-drilldown-target { 964 cursor: pointer 965} 966 967.apexcharts-breadcrumb { 968 position: absolute; 969 z-index: 11; 970 display: inline-flex; 971 align-items: center; 972 gap: 2px; 973 font-size: 12px; 974 font-family: inherit; 975 padding: 2px 4px 976} 977 978.apexcharts-breadcrumb-item { 979 background: transparent; 980 border: none; 981 padding: 2px 6px; 982 border-radius: 3px; 983 font: inherit; 984 color: inherit; 985 cursor: pointer; 986 line-height: 1.2 987} 988 989.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) { 990 background: rgba(0, 0, 0, 0.08) 991} 992 993.apexcharts-breadcrumb-arrow { 994 margin-right: 4px; 995 font-weight: 600; 996 user-select: none 997} 998 999.apexcharts-breadcrumb-current { 1000 cursor: default; 1001 font-weight: 600; 1002 opacity: 0.85 1003} 1004 1005.apexcharts-breadcrumb-separator { 1006 opacity: 0.5; 1007 user-select: none 1008} 1009 1010.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) { 1011 background: rgba(255, 255, 255, 0.12) 1012} 1013 1014.apexcharts-disable-transitions * { 1015 transition: none !important; 1016}`;class dt{constructor(t,e){U(this,"core"),U(this,"responsive"),U(this,"axes"),U(this,"grid"),U(this,"graphics"),U(this,"coreUtils"),U(this,"crosshairs"),U(this,"events"),U(this,"fill"),U(this,"localization"),U(this,"options"),U(this,"series"),U(this,"theme"),U(this,"formatters"),U(this,"titleSubtitle"),U(this,"dimensions"),U(this,"updateHelpers"),U(this,"tooltip"),U(this,"data"),U(this,"animations"),U(this,"exports"),U(this,"legend"),U(this,"toolbar"),U(this,"zoomPanSelection"),U(this,"keyboardNavigation"),U(this,"annotations"),U(this,"morphTypeChange"),U(this,"timeScale"),U(this,"_keyboardNavigation"),U(this,"windowResizeHandler"),U(this,"parentResizeHandler"),U(this,"publicMethods",[]),U(this,"eventList",[]),U(this,"config"),this.opts=e,this.ctx=this,this.w=new bs(e).init(),this.el=t,this.w.globals.cuid=T.randomId(),this.w.globals.chartID=this.w.config.chart.id?T.escapeString(this.w.config.chart.id):this.w.globals.cuid,ys(this.w),new Wt(this).initModules(),this.lastUpdateOptions=null,this.create=this.create.bind(this),W.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(T.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);const o=this.w.config.chart.events.beforeMount;if(typeof o=="function"&&o(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]),W.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),di(this.el.parentNode,this.parentResizeHandler);const n=this.el.getRootNode&&this.el.getRootNode(),l=T.is("ShadowRoot",n),c=this.el.ownerDocument;let h=l?n.getElementById("apexcharts-css"):c.getElementById("apexcharts-css");if(!h){h=B.createElementNS("http://www.w3.org/1999/xhtml","style"),h.id="apexcharts-css",h.textContent=gi;const d=((a=this.opts.chart)==null?void 0:a.nonce)||this.w.config.chart.nonce;d&&h.setAttribute("nonce",d),l?n.prepend(h):this.w.config.chart.injectStyleSheet!==!1&&c.head.appendChild(h)}}const 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(n=>{var l,c;const h=n instanceof Error?n:new Error(String(n)),d=h;d.chartId=(c=(l=this.w)==null?void 0:l.globals)==null?void 0:c.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,i,a;const o=this.w;this.core||new Wt(this).initModules();const r=this.w.globals;if(r.noData=!1,r.animationEnded=!1,!T.elementExists(this.el)||(this.responsive.checkResponsiveConfig(e),o.config.xaxis.convertedCatToNumeric&&new Yt(o.config).convertCatToNumericXaxis(o.config,this.ctx),this.core.setupElements(),o.config.chart.type==="treemap"&&(o.config.grid.show=!1,o.config.yaxis[0].show=!1),r.svgWidth===0))return r.animationEnded=!0,null;let n=t;t.forEach((w,m)=>{w.hidden&&(n=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:m}))});const l=et.checkComboSeries(n,o.config.chart.type);r.comboCharts=l.comboCharts,r.comboBarCount=l.comboBarCount;const c=n.every(w=>w.data&&w.data.length===0);(n.length===0||c&&r.collapsedSeries.length<1)&&this.series.handleNoData(),W.isBrowser()&&this.events.setupEventHandlers();const h=this.data.parseData(n);
1016this._writeParsedSeriesData(h.seriesData),this._writeParsedRangeData(h.rangeData),this._writeParsedCandleData(h.candleData),this._writeParsedLabelData(h.labelData),this._writeParsedAxisFlags(h.axisFlags),this.theme.init(),new Pt(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),(!r.noData||r.collapsedSeries.length===o.seriesData.series.length||o.config.legend.showForSingleSeries)&&((s=this.legend)==null||s.init()),this.series.hasAllSeriesEqualX(),r.axisCharts&&(this.core.coreCalculations(),o.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=o.globals.minX,this.ctx.toolbar.maxX=o.globals.maxX)),this.formatters.heatmapLabelFormatters(),new et(this.w).getLargestMarkerSize();const p=this.dimensions.plotCoords();this._writeLayoutCoords(p.layout);const g=this.core.xySettings();this.grid.createGridMask();const u=this.core.plotChartType(n,g),x=new kt(this.w,this);x.bringForward(),o.config.dataLabels.background.enabled&&x.dataLabelsBackground(),this.core.shiftGraphPosition(),(a=(i=this.legend)==null?void 0:i.heatmapGradientLegend)==null||a.repositionToPlot(),o.globals.dataPoints>50&&o.dom.elWrap.classList.add("apexcharts-disable-transitions");const b={plot:{left:o.layout.translateX,top:o.layout.translateY,width:o.layout.gridWidth,height:o.layout.gridHeight}};return{elGraph:u,xyRatios:g,dimensions:b}}mount(t=null){const e=this,s=e.w;return new Promise((i,a)=>{var o,r,n,l,c,h,d,f,p;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 Ve(e.w,e);const g=e.grid.drawGrid(),u=Wt._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"&&(g&&s.dom.elGraphical.add(g.el),(n=g==null?void 0:g.elGridBorders)!=null&&n.node&&s.dom.elGraphical.add(g.elGridBorders)),Array.isArray(t.elGraph))for(let w=0;w<t.elGraph.length;w++)s.dom.elGraphical.add(t.elGraph[w]);else s.dom.elGraphical.add(t.elGraph);s.config.grid.position==="front"&&(g&&s.dom.elGraphical.add(g.el),(l=g==null?void 0:g.elGridBorders)!=null&&l.node&&s.dom.elGraphical.add(g.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,g);const x=new Nt(this.w,this.ctx,g),b=new ye(this.w,{theme:this.theme,timeScale:this.timeScale},g);if(g!==null&&(x.xAxisLabelCorrections(),b.setYAxisTextAlignments(),s.config.yaxis.map((w,m)=>{s.globals.ignoreYAxisIndexes.indexOf(m)===-1&&b.yAxisTitleRotate(m,w.opposite)})),(c=e.annotations)==null||c.drawAxesAnnotations(),!s.globals.noData){if(W.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()),W.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.c
1016onfig.chart.pan.enabled)&&((f=e.zoomPanSelection)==null||f.init({xyRatios:t.xyRatios}));else{const w=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(y=>{w[y]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&((p=e.toolbar)==null||p.createToolbar())}s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(w=>{w.method(w.params,!1,w.context)}),!s.globals.axisCharts&&!s.globals.noData&&e.core.resizeNonAxisCharts(),i(e)})}destroy(){var t;W.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),fi(this.el.parentNode,this.parentResizeHandler),clearTimeout((t=this.w.globals.resizeTimer)!=null?t:void 0));const e=this.w.config.chart.id;e&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEach((s,i)=>{s.id===T.escapeString(e)&&Apex._chartInstances.splice(i,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new Pe(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,s=!0,i=!0,a=!0){const o=this.w;if(o.interact.selection=void 0,this.lastUpdateOptions){if(T.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(t.series)){const r=$({},t),n=$({},this.lastUpdateOptions);if(delete r.series,delete n.series,T.shallowEqual(r,n))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,n)=>this.updateHelpers._extendSeries(r,n))),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();const i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,s)}appendData(t,e=!0){const s=this;s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.series.getPreviousPaths();const i=s.w.config.series.slice();for(let a=0;a<i.length;a++)if(t[a]!==null&&typeof t[a]<"u"){const o=t[a],r=i[a];for(let n=0;n<o.data.length;n++)r.data.push(o.data[n])}return s.w.config.series=i,e&&(s.w.globals.initialSeries=T.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=T.clone(t),new Pe(this.ctx).clear({isUpdating:!0});const i=this.create(this.w.config.series,t??{});if(!i)return e(this);this.mount(i).then(()=>{var a;(a=this.morphTypeChange)==null||a.applyChromeFade(),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{const a=this.w,o=a.globals;o.shouldAnimate=t,o.dataChanged=!0,o.animationEnded=!1,me.invalidateSelectors(a);const 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());const n=this.core.xySettings(),l=a.dom.elGraphical.node;l.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(g=>{var u;return(u=g.parentNode)==null?void 0:u.removeChild(g)});const h=this.core.plotChartType(a.config.series,n),d=l.querySelector(".apexcharts-grid"),f=Array.isArray(h)?h:[h];d&&a.config.grid.position==="front"?f.forEach(g=>{const u=g&&g.node?g.node:g;u&&l.insertBefore(u,d)}):f.forEach(g=>{a.dom.elGraphical.add(g)});const p=new kt(a,this);p.bringForward(),a.config.dataLabels.background.enabled&&p.dataLabelsBackgroun
1016d(),W.isBrowser()&&a.config.tooltip.enabled&&!o.noData&&((i=a.globals.tooltip)==null||i.drawTooltip(n)),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(){const t=this.getGroupedCharts();let 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){const e=T.escapeString(t);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(i=>i.id===e)[0];return s&&s.chart}static initOnLoad(){var t;const e=document.querySelectorAll("[data-apexcharts]");for(let s=0;s<e.length;s++){const i=e[s],a=JSON.parse((t=e[s].getAttribute("data-options"))!=null?t:"");new dt(i,a).render()}}static exec(t,e,...s){const 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 T.extend(t,e)}static getThemePalettes(){return le()}static use(t){Rs(t)}static registerFeatures(t){Wt.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 ne(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new ne(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const t=this.w,e=t.globals;return{series:t.seriesData.series,seriesNames:t.seriesData.seriesNames,colors:e.colors,labels:t.labelData.labels,seriesTotals:e.seriesTotals,seriesPercent:e.seriesPercent,seriesXvalues:e.seriesXvalues,seriesYvalues:e.seriesYvalues,minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,minXDiff:e.minXDiff,dataPoints:e.dataPoints,xAxisScale:e.xAxisScale,yAxisScale:e.yAxisScale,xTickAmount:e.xTickAmount,isXNumeric:t.axisFlags.isXNumeric,seriesYAxisMap:e.seriesYAxisMap,seriesYAxisReverseMap:e.seriesYAxisReverseMap,svgWidth:e.svgWidth,svgHeight:e.svgHeight,gridWidth:t.layout.gridWidth,gridHeight:t.layout.gridHeight,selectedDataPoints:t.interact.selectedDataPoints,collapsedSeriesIndices:e.collapsedSeriesIndices,zoomed:t.interact.zoomed,seriesX:t.seriesData.seriesX,seriesZ:t.seriesData.seriesZ,seriesCandleO:t.candleData.seriesCandleO,seriesCandleH:t.candleData.seriesCandleH,seriesCandleM:t.candleData.seriesCandleM,seriesCandleL:t.candleData.seriesCandleL,seriesCandleC:t.candleData.seriesCandleC,seriesRangeStart:t.rangeData.seriesRangeStart,seriesRangeEnd:t.rangeData.seriesRangeEnd,seriesGoals:t.seriesData.seriesGoals}}toggleDataPointSelection(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}zoomX(t,e){var s;(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)}
1016getSvgString(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}drillDown(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillDown(t)}drillUp(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillUp()}drillToRoot(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillToRoot()}_writeParsedSeriesData(t){Object.assign(this.w.seriesData,t)}_writeParsedRangeData(t){Object.assign(this.w.rangeData,t)}_writeParsedCandleData(t){Object.assign(this.w.candleData,t)}_writeParsedLabelData(t){Object.assign(this.w.labelData,t)}_writeParsedAxisFlags(t){Object.assign(this.w.axisFlags,t)}_writeLayoutCoords(t){Object.assign(this.w.layout,t)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{this.w.globals.resized=!0,this.w.globals.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){var t;clearTimeout((t=this.w.globals.resizeTimer)!=null?t:void 0);let{redrawOnWindowResize:e}=this.w.config.chart;typeof e=="function"&&(e=e()),e&&this._windowResize()}}const ts=`.apexcharts-flip-y { 1017 transform: scaleY(-1) translateY(-100%); 1018 transform-origin: top; 1019 transform-box: fill-box; 1020} 1021.apexcharts-flip-x { 1022 transform: scaleX(-1); 1023 transform-origin: center; 1024 transform-box: fill-box; 1025} 1026.apexcharts-legend { 1027 display: flex; 1028 overflow: auto; 1029 padding: 0 10px; 1030} 1031.apexcharts-legend.apexcharts-legend-group-horizontal { 1032 flex-direction: column; 1033} 1034.apexcharts-legend-group { 1035 display: flex; 1036} 1037.apexcharts-legend-group-vertical { 1038 flex-direction: column-reverse; 1039} 1040.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top { 1041 flex-wrap: wrap 1042} 1043.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { 1044 flex-direction: column; 1045 bottom: 0; 1046} 1047.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { 1048 justify-content: flex-start; 1049 align-items: flex-start; 1050} 1051.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center { 1052 justify-content: center; 1053 align-items: center; 1054} 1055.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right { 1056 justify-content: flex-end; 1057 align-items: flex-end; 1058} 1059.apexcharts-legend-series { 1060 cursor: pointer; 1061 line-height: normal; 1062 display: flex; 1063 align-items: center; 1064} 1065.apexcharts-legend-text { 1066 position: relative; 1067 font-size: 14px; 1068} 1069.apexcharts-legend-text *, .apexcharts-legend-marker * { 1070 pointer-events: none; 1071} 1072.apexcharts-legend-marker { 1073 position: relative; 1074 display: flex; 1075 align-items: center; 1076 justify-content: center; 1077 cursor: pointer; 1078 margin-right: 1px; 1079} 1080 1081.apexcharts-legend-series.apexcharts-no-click { 1082 cursor: auto; 1083} 1084.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series { 1085 display: none !important; 1086} 1087.apexcharts-inactive-legend { 1088 opacity: 0.45; 1089} `;class es{constructor(t,e){this.w=t,this.ctx=e}svgStringToNode(t){return new DOMParser().parseFromString(t,"image/svg+xml").documentElement}scaleSvgNode(t,e){const s=parseFloat(t.getAttributeNS(null,"width")),i=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",s*e),t.setAttributeNS(null,"height",i*e),t.setAttributeNS(null,"viewBox","0 0 "+s+" "+i)}getSvgString(t){return new Promise(e=>{const s=this.w;let i=t||s.config.chart.toolbar.export.scale||s.config.chart.toolbar.export.width/s.globals.svgWidth;i||(i=1);const a=s.globals.svgWidth*i,o=s.globals.svgHeight*i,r=s.dom.elWrap.cloneNode(!0);r.style.width=a+"px",r.style.height=o+"px";const n=new XMLSerializer().serializeToString(r),l=s.config.legend.show&&s.dom.elLegendWrap&&s.dom.elLegendWrap.children.length>0;let c=` 1090 .apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect { 1091 display: none; 1092 } 1093 `;l&&(c+=ts);let h=` 1094 <svg xmlns="http://www.w3.org/2000/svg" 1095 version="1.1" 1096 xmlns:xlink="http://www.w3.org/1999/xlink" 1097 class="apexcharts-svg" 1098 xmlns:data="ApexChartsNS" 1099 transform="translate(0, 0)" 1100 width="${s.globals.svgWidth}px" height="${s.globals.svgHeight}px"> 1101 <foreignObject width="100%" height="100%"> 1102 <div xmlns="http://www.w3.org/1999/xhtml" style="width:${a}px; height:${o}px;"> 1103 <style type="text/css"> 1104 ${c} 1105 </style> 1106 ${n} 1107 </div> 1108 </foreignObject> 1109 </svg> 1110 `;const d=this.svgStringToNode(h);i!==1&&this.scaleSvgNode(d,i),this.convertImagesToBase64(d).then(()=>{h=new XMLSerializer().serializeToString(d),e(h.replace(/ /g," "))})})}convertImagesToBase64(t){const e=t.getElementsByTagName("image"),s=Array.from(e).map(i=>{const a=i.getAttributeNS("http://www.w3.org/1999/xlink","href");return a&&!a.startsWith("data:")?this.getBase64FromUrl(a).then(o=>{i.setAttributeNS("http://www.w3.org/1999/xlink","href",o)}).catch(o=>{console.error("Error converting image to base64:",o)}):Promise.resolve()});return Promise.all(s)}getBase64FromUrl(t){return W.isSSR()?Promise.resolve(t):new Promise((e,s)=>{const i=new Image;i.crossOrigin="Anonymous",i.onload=()=>{const a=document.createElement("canvas");a.width=i.width,a.height=i.height;const o=a.getContext("2d");o&&o.drawImage(i,0,0),e(a.toDataURL())},i.onerror=s,i.src=t})}svgUrl(){return new Promise(t=>
1110{this.getSvgString().then(e=>{const s=new Blob([e],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(s))})})}dataURI(t){return W.isSSR()?Promise.resolve({imgURI:""}):new Promise(e=>{const s=this.w,i=t?t.scale||t.width/s.globals.svgWidth:1,a=document.createElement("canvas");a.width=s.globals.svgWidth*i,a.height=parseInt(s.dom.elWrap.style.height,10)*i;const o=s.config.chart.background==="transparent"||!s.config.chart.background?"#fff":s.config.chart.background,r=a.getContext("2d");r&&(r.fillStyle=o,r.fillRect(0,0,a.width*i,a.height*i),this.getSvgString(i).then(n=>{const l="data:image/svg+xml,"+encodeURIComponent(n),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{r.drawImage(c,0,0);const h=a;if(h.msToBlob){const d=h.msToBlob();e({blob:d})}else{const d=a.toDataURL("image/png");e({imgURI:d})}},c.src=l}))})}exportToSVG(){this.svgUrl().then(t=>{this.triggerDownload(t,this.w.config.chart.toolbar.export.svg.filename,".svg")})}exportToPng(){const t=this.w.config.chart.toolbar.export.scale,e=this.w.config.chart.toolbar.export.width,s=t?{scale:t}:e?{width:e}:void 0;this.dataURI(s).then(({imgURI:i,blob:a})=>{a?navigator.msSaveOrOpenBlob(a,this.w.globals.chartID+".png"):this.triggerDownload(i,this.w.config.chart.toolbar.export.png.filename,".png")})}exportToCSV({series:t,fileName:e,columnDelimiter:s=",",lineDelimiter:i=` 1111`}){const a=this.w;t||(t=a.config.series);let o=[];const r=[];let n="";const l="\uFEFF",c=a.seriesData.series.map((m,y)=>a.globals.collapsedSeriesIndices.indexOf(y)===-1?m:[]),h=m=>typeof a.config.chart.toolbar.export.csv.categoryFormatter=="function"?a.config.chart.toolbar.export.csv.categoryFormatter(m):a.config.xaxis.type==="datetime"&&String(m).length>=10?new Date(m).toDateString():T.isNumber(m)?m:m.split(s).join(""),d=m=>typeof a.config.chart.toolbar.export.csv.valueFormatter=="function"?a.config.chart.toolbar.export.csv.valueFormatter(m):m,f=Math.max(...t.map(m=>m.data?m.data.length:0)),p=new xt(this.w),g=new bt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),u=m=>{let y="";if(!a.globals.axisCharts)y=a.config.labels[m];else{if(a.config.xaxis.type==="category"||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){const v=a.formatters.yLabelFormatters[0],D=new tt(this.ctx.w).getActiveConfigSeriesIndex();y=v(a.labelData.labels[m],{seriesIndex:D,dataPointIndex:m,w:a})}else y=g.getLabel(a.labelData.labels,a.labelData.timescaleLabels,0,m).text;a.config.xaxis.type==="datetime"&&(a.config.xaxis.categories.length?y=a.config.xaxis.categories[m]:a.config.labels.length&&(y=a.config.labels[m]))}return y===null?"nullvalue":(Array.isArray(y)&&(y=y.join(" ")),T.isNumber(y)?y:y.split(s).join(""))},x=()=>[...Array(f)].map(()=>""),b=(m,y)=>{var v,C,D,S,k,M;if(o.length&&y===0&&r.push(o.join(s)),m.data){m.data=m.data.length&&m.data||x();for(let L=0;L<m.data.length;L++){o=[];let P=u(L);if(P!=="nullvalue"){if(P||(p.isFormatXY()?P=t[y].data[L].x:p.isFormat2DArray()&&(P=t[y].data[L]?t[y].data[L][0]:"")),y===0){o.push(h(P));for(let E=0;E<a.seriesData.series.length;E++){const _=p.isFormatXY()?(v=t[E].data[L])==null?void 0:v.y:c[E][L];o.push(d(_))}}(a.config.chart.type==="candlestick"||m.type&&m.type==="candlestick")&&(o.pop(),o.push(a.candleData.seriesCandleO[y][L]),o.push(a.candleData.seriesCandleH[y][L]),o.push(a.candleData.seriesCandleL[y][L]),o.push(a.candleData.seriesCandleC[y][L])),(a.config.chart.type==="boxPlot"||m.type&&m.type==="boxPlot")&&(o.pop(),o.push(a.candleData.seriesCandleO[y][L]),o.push(a.candleData.seriesCandleH[y][L]),o.push(a.candleData.seriesCandleM[y][L]),o.push(a.candleData.seriesCandleL[y][L]),o.push(a.candleData.seriesCandleC[y][L])),a.config.chart.type==="rangeBar"&&(o.pop(),o.push(a.rangeData.seriesRangeStart[y][L]),o.push(a.rangeData.seriesRangeEnd[y][L])
1111),(a.config.chart.type==="violin"||m.type&&m.type==="violin")&&(o.pop(),o.push((C=a.violinData.seriesViolinMin[y])==null?void 0:C[L]),o.push((D=a.violinData.seriesViolinMax[y])==null?void 0:D[L]),o.push((M=(k=(S=a.violinData.seriesViolinPoints[y])==null?void 0:S[L])==null?void 0:k.length)!=null?M:0)),o.length&&r.push(o.join(s))}}}},w=()=>{const m=new Set,y={};t.forEach((v,C)=>{v==null||v.data.forEach(D=>{let S,k;if(p.isFormatXY())S=D.x,k=D.y;else if(p.isFormat2DArray())S=D[0],k=D[1];else return;y[S]||(y[S]=Array(t.length).fill("")),y[S][C]=d(k),m.add(S)})}),o.length&&r.push(o.join(s)),Array.from(m).sort().forEach(v=>{r.push([h(v),y[v].join(s)])})};o.push(a.config.chart.toolbar.export.csv.headerCategory),a.config.chart.type==="boxPlot"?(o.push("minimum"),o.push("q1"),o.push("median"),o.push("q3"),o.push("maximum")):a.config.chart.type==="candlestick"?(o.push("open"),o.push("high"),o.push("low"),o.push("close")):a.config.chart.type==="rangeBar"?(o.push("minimum"),o.push("maximum")):a.config.chart.type==="violin"?(o.push("minimum"),o.push("maximum"),o.push("observations")):t.map((m,y)=>{const v=(m.name?m.name:`series-${y}`)+"";a.globals.axisCharts&&o.push(v.split(s).join("")?v.split(s).join(""):`series-${y}`)}),a.globals.axisCharts||(o.push(a.config.chart.toolbar.export.csv.headerValue),r.push(o.join(s))),!a.globals.allSeriesHasEqualX&&a.globals.axisCharts&&!a.config.xaxis.categories.length&&!a.config.labels.length?w():t.map((m,y)=>{a.globals.axisCharts?b(m,y):(o=[],o.push(h(a.labelData.labels[y])),o.push(d(c[y])),r.push(o.join(s)))}),n+=r.join(i),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent(l+n),e||a.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(t,e,s){if(W.isSSR())return;const i=document.createElement("a");i.href=t,i.download=(e||this.w.globals.chartID)+s,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}dt.registerFeatures({exports:es});let pi=class{constructor(t){this.w=t.w,this.lgCtx=t}getLegendStyles(){if(W.isSSR())return null;const t=document.createElement("style");t.setAttribute("type","text/css");const e=this.w.config.chart.nonce;e&&t.setAttribute("nonce",e);const s=document.createTextNode(ts);return t.appendChild(s),t}getLegendDimensions(){const e=this.w.dom.baseEl.querySelector(".apexcharts-legend");if(!e)return{clwh:0,clww:0};const{width:s,height:i}=e.getBoundingClientRect();return{clwh:i,clww:s}}appendToForeignObject(){var t;const e=this.getLegendStyles();this.w.config.chart.injectStyleSheet!==!1&&e&&((t=this.w.dom.elLegendForeign)==null||t.appendChild(e))}toggleDataSeries(t,e){var s,i;const a=this.w;if(a.globals.axisCharts||a.config.chart.type==="radialBar"){a.globals.resized=!0;let o=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts){if(o=a.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}']`),!o)return;r=parseInt((s=o.getAttribute("data:realIndex"))!=null?s:"",10)}else{if(o=a.dom.baseEl.querySelector(`.apexcharts-series[rel='${t+1}']`),!o)return;r=parseInt((i=o.getAttribute("rel"))!=null?i:"",10)-1}if(e?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(l=>{const c=l.cs,h=l.csi;this.riseCollapsedSeries(c,h,r)}):this.hideSeries({seriesEl:o,realIndex:r}),a.config.chart.accessibility.enabled){const n=a.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(n){const l=a.globals.collapsedSeriesIndices.includes(r)||a.globals.ancillaryCollapsedSeriesIndices.includes(r);n.setAttribute("aria-pressed",l?"true":"false");const c=n.querySelector(".apexcharts-legend-text"),h=c?c.textContent:a.seriesData.seriesNames[t],d=l?"hidden":"visible";n.setAttribute("aria-label",`${h}, ${d}. Press Enter or Space to toggle.`)}}}else{const o=a.dom.Paper.findOne(` .apexcharts-series[rel='${t+1}'] path`),r=a.config.chart.type;if(r==="pie"||r==="polarArea"||r==="donut"){const n=a.config.plotOptions.pie.donut.labels;new R(this.w).pathMouseDown(o,null),this.lgCtx.printDataLabelsInner(o.node,n)}if(a.config.chart.accessibility.enabled){const n=a.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(n){const l=a.globals.collapsedSeriesIndices.includes(t);n.setAttribute("aria-pressed",l?"true":"false");const c=n.querySelector(".apexcharts-legend-text"),h=c?c.textContent:a.seriesData.seriesNames[t],d=l?"hidden":"visible";n.setAttribute("aria-label",`${h}, ${d}. Press Enter or Space to toggle.`)}}}}getSeriesAfterCollapsing({realIndex:t}){var e;const s=this.w,i=s.globals,a=T.clone(s.config.series);if(i.axisCharts){const o=s.config.yaxis[i.seriesYAxisReverseMap[t]],r={index:t,data:a[t].data.slice(),type:a[t].type||s.config.chart.type};if(o&&o.show&&o.showAlways)i.ancillaryCollapsedSeriesIndices.indexOf(t)<0&&(i.ancillaryCollapsedSeries.push(r),i.ancillaryCollapsedSeriesIndices.push(t));else if(i.collapsedSeriesIndices.indexOf(t)<0){i.collapsedSeries.push(r),i.collapsedSeriesIndices.push(t);const n=i.risingSeries.indexOf(t);i.risingSeries.splice(n,1)}}else i.collapsedSeries.push({index:t,data:a[t],type:(e=s.config.series[t].type)!=null?e:"line"}),i.collapsedSeriesIndices.push(t);return i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.config.series.length,this._getSeriesBasedOnCollapsedState(a)}hideSeries({seriesEl:t,realIndex:e}){const s=this.w,i=this.getSeriesAfterCollapsing({realIndex:e}),a=t.childNodes;for(let o=0;o<a.length;o++)a[o].classList.contains("apexcharts-series-markers-wrap")&&(a[o].classList.contains("apexcharts-hide")?a[o].classList.remove("apexcharts-hide"):a[o].classList.add("apexcharts-hide"));this.lgCtx.updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled)}riseCollapsedSeries(t,e,s){const i=this.w;let a=T.clone(i.config.series);if(t.length>0){for(let o=0;o<t.length;o++)t[o].index===s&&(i.globals.axisCharts?a[s].data=t[o].data.slice():a[s]=t[o].data,typeof a[s]!="number"&&(a[s].hidden=!1),t.splice(o,1),e.splice(o,1),i.globals.risingSeries.push(s),o--);a=this._getSeriesBasedOnCollapsedState(a),this.lgCtx.updateSeries(a,i.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(t){const e=this.w;let s=0;return e.globals.axisCharts?t.forEach((i,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(a)<0||(t[a].data=[],s++)}):t.forEach((i,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0||(t[a]=0,s++)}),e.globals.allSeriesCollapsed=s===t.length,t}};const ut="http://www.w3.org/2000/svg";class Ee{constructor(t,e){this.w=t,this.ctx=e,this.svgEl=null,this.arrowEl=null,this.hoverValueEl=null,this._min=0,this._max=0,this._geom=null,this._bandHitEls=[],this._activeBandIndex=-1,this._onCellEnter=this._onCellEnter.bind(this),this._onCellLeave=this._onCellLeave.bind(this),this._onBandEnter=this._onBandEnter.bind(this),this._onBandLeave=this._onBandLeave.bind(this)}_getFormatter(){const t=this.w.config.plotOptions.heatmap.colorScale.gradientLegend;return typeof t.formatter=="function"?t.formatter:e=>{if(!Number.isFinite(e))return String(e);const s=Math.abs(e);return s>=1e3?e.toFixed(0):s>=10?e.toFixed(1):e.toFixed(2)}}static isEnabled(t){var e,s,i,a;const o=(a=(i=(s=(e=t==null?void 0:t.config)==null?void 0:e.plotOptions)==null?void 0:s.heatmap)==null?void 0:i.colorScale)==null?void 0:a.gradientLegend;return!!(o&&o.enabled)}draw(){var t,e,s,i,a,o,r,n;const l=this.w,c=l.dom.elLegendWrap;if(!c)return;const h=l.config.plotOptions.heatmap.colorScale.gradientLegend,d=l.config.legend.position,f=d==="left"||d==="right",p=(e=(t=h.arrow)==null?void 0:t.size)!=null?e:8,g=p+4,u=h.showLabels?28:4,x=h.showLabels?20:4,b=h.showLabels?44:0,w=this._resolveStripLength(f?h.height:h.width,f),m=h.thickness,y=f?Math.max(m+g+4,b):w+u*2,v=f?w+x*2:m+g+4,C=m+g,D=(y-C)/2,S=f?d==="left"?D:D+g:u,k=f?x:d==="top"?g:4,M=B.createElementNS(ut,"svg");M.setAttribute("class","apexcharts-heatmap-gradient-legend"),M.setAttribute("width",String(y)),M.setAttribute("height",String(v)),M.setAttribute("overflow","visible");const L=B.createElementNS(ut,"defs"),P=`apexcharts-heatmap-gradient-${l.globals.cuid}`,E=B.createElementNS(ut,"linearGradient");E.setAttribute("id",P),f?(E.setAttribute("x1","0"),E.setAttribute("y1","1"),E.setAttribute("x2","0"),E.setAttribute("y2","0")):(E.setAttribute("x1","0"),E.setAttribute("y1","0"),E.setAttribute("x2","1"),E.setAttribute("y2","0"));const{min:_,max:X,stops:F,bands:z}=this._computeStops();this._min=_,this._max=X,F.forEach(I=>{const Y=B.createElementNS(ut,"stop");Y.setAttribute("offset",`${(I.percent*100).toFixed(2)}%`),Y.setAttribute("stop-color",I.color),E.appendChild(Y)}),L.appendChild(E),M.appendChild(L);const O=B.createElementNS(ut,"rect");if(O.setAttribute("x",String(S)),O.setAttribute("y",String(k)),O.setAttribute("width",String(f?m:w)),O.setAttribute("height",String(f?w:m)),O.setAttribute("rx","2"),O.setAttribute("fill",`url(#${P})`),M.appendChild(O),h.showLabels){const I=((s=h.labelStyle)==null?void 0:s.colors)||(Array.isArray(l.config.legend.labels.colors)?l.config.legend.labels.colors[0]:l.config.legend.labels.colors)||l.config.chart.foreColor,Y=((i=h.labelStyle)==null?void 0:i.fontSize)||"11px",V=((a=h.labelStyle)==null?void 0:a.fontFamily)||l.config.chart.fontFamily,q=this._getFormatter(),K=(Q,st,J,ct)=>{const j=B.createElementNS(ut,"text");return j.setAttribute("x",String(st)),j.setAttribute("y",String(J)),j.setAttribute("text-anchor",ct),j.setAttribute("dominant-baseline","middle"),j.setAttribute("fill",I),j.setAttribute("font-size",Y),V&&j.setAttribute("font-family",V),j.textContent=String(Q),j};if(f){const Q=S+m/2;M.appendChild(K(q(_),Q,k+w+10,"middle")),M.appendChild(K(q(X),Q,k-10,"middle"))}else{const Q=k+m/2;M.appendChild(K(q(_),S-6,Q,"end")),M.appendChild(K(q(X),S+w+6,Q,"start"))}}const N=((o=h.arrow)==null?void 0:o.color)||l.config.chart.foreColor,H=this._buildArrow(p,N,d);
1111if(M.appendChild(H),this.arrowEl=H,this._bandHitEls=[],l.config.legend.onItemHover.highlightDataSeries&&z.length>0&&z.forEach(I=>{const Y=B.createElementNS(ut,"rect");if(f){const V=k+w-I.p2*w,q=k+w-I.p1*w;Y.setAttribute("x",String(S)),Y.setAttribute("y",String(V)),Y.setAttribute("width",String(m)),Y.setAttribute("height",String(Math.max(0,q-V)))}else Y.setAttribute("x",String(S+I.p1*w)),Y.setAttribute("y",String(k)),Y.setAttribute("width",String(Math.max(0,(I.p2-I.p1)*w))),Y.setAttribute("height",String(m));Y.setAttribute("fill","transparent"),Y.setAttribute("class","apexcharts-heatmap-gradient-band"),Y.setAttribute("data:range-index",String(I.index)),Y.style.cursor="pointer",M.appendChild(Y),this._bandHitEls.push(Y)}),this._geom={isVertical:f,position:d,stripX:S,stripY:k,stripLength:w,stripThickness:m,arrowSize:p,svgWidth:y,svgHeight:v},h.showHoverValue){const I=B.createElement("div");I.classList.add("apexcharts-heatmap-gradient-legend-value"),I.style.position="absolute",I.style.fontSize=((r=h.labelStyle)==null?void 0:r.fontSize)||"11px",I.style.fontFamily=((n=h.labelStyle)==null?void 0:n.fontFamily)||l.config.chart.fontFamily||"",I.style.color=l.config.chart.foreColor,I.style.background="rgba(0,0,0,0.65)",I.style.color="#fff",I.style.padding="2px 6px",I.style.borderRadius="3px",I.style.pointerEvents="none",I.style.whiteSpace="nowrap",I.style.opacity="0",I.style.transition="opacity 120ms ease",this.hoverValueEl=I}c.classList.add("apexcharts-heatmap-gradient-legend-wrap"),c.classList.add("apx-legend-position-"+d),c.appendChild(M),this.hoverValueEl&&c.appendChild(this.hoverValueEl),this.svgEl=M,this._applyWrapAlignment(c,d,f,y,v),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(t,e){const s=this.w,i=e?s.globals.svgHeight||s.config.chart.height||300:s.globals.svgWidth||s.config.chart.width||600;if(typeof t=="string"){const a=t.trim();if(a.endsWith("%")){const r=parseFloat(a)||0;return Math.max(20,i*r/100)}const o=parseFloat(a);return Number.isFinite(o)?o:200}return typeof t=="number"&&Number.isFinite(t)?t:200}_applyWrapAlignment(t,e,s,i,a){const o=this.w,n=o.config.plotOptions.heatmap.colorScale.gradientLegend.align||"center",l=12,c=o.globals.svgWidth||o.config.chart.width||600,h=o.globals.svgHeight||o.config.chart.height||300,d=o.config.legend.offsetX||0,f=o.config.legend.offsetY||0;if(t.style.position="absolute",t.style.display="block",t.style.overflow="visible",t.style.padding="0",t.style.width=i+"px",t.style.height=a+"px",t.style.right="auto",t.style.bottom="auto",s){const p=h-a-l*2;let g;n==="start"?g=l:n==="end"?g=l+Math.max(0,p):g=l+Math.max(0,p)/2,t.style.top=g+f+"px",e==="left"?t.style.left=l+d+"px":t.style.left=c-i-l+d+"px"}else{const p=c-i-l*2;let g;n==="start"?g=l:n==="end"?g=l+Math.max(0,p):g=l+Math.max(0,p)/2,t.style.left=g+d+"px",e==="top"?t.style.top=l+f+"px":t.style.top=h-a-l+f+"px"}}repositionToPlot(){var t,e;if(!W.isBrowser())return;const s=this.w,i=s.globals,a=s.dom.elLegendWrap;if(!a||!this._geom||!Number.isFinite(i.gridWidth)||!Number.isFinite(i.gridHeight))return;const{isVertical:o,position:r,svgWidth:n,svgHeight:l,stripX:c,stripY:h,stripThickness:d}=this._geom,f=s.config.plotOptions.heatmap.colorScale.gradientLegend.align||"center",p=s.config.legend.offsetX||0,g=s.config.legend.offsetY||0,u=(e=(t=this.ctx)==null?void 0:t.dimensions)==null?void 0:e.dimHelpers,x=u?u.getTitleSubtitleCoords("title").height+u.getTitleSubtitleCoords("subtitle").height:0,b=s.layout.xAxisHeight||0,w=(m,y)=>{const v=Math.max(0,m-y);return f==="start"?0:f==="end"?v:v/2};if(o){a.style.top=i.translateY+w(i.gridHeight,l)+g+"px";const m=r==="left"?0:i.translateX+i.gridWidth,y=r==="left"?i.translateX:i.svgWidth,v=(m+y)/2;a.style.left=v-c-d/2+p+"px"}else{a.style.left=i.translateX+w(i.gridWidth,n)+p+"px";const m=r==="top"?x:i.translateY+i.gridHeight+b,y=r==="top"?i.translateY:i.svgHeight,v=(m+y)/2;a.style.top=v-h-d/2+g+"px"}B.requestAnimationFrame(()=>this._enforceMinPlotGap())}_enforceMinPlotGap(){const t=this.w,e=t.dom.elLegendWrap,s=this.svgEl&&this.svgEl.querySelector("rect"),i=t.dom.baseEl.querySelector(".apexcharts-grid");if(!e||!s||!i||!this._geom)return;const a=s.getBoundingClientRect(),o=i.getBoundingClientRect();if(!a.width||!a.height||!o.width||!o.height)return;const r=16,{isVertical:n,position:l}=this._geom;if(n){const c=l==="left"?o.left-a.right:a.left-o.right;if(c<r){const h=parseFloat(e.style.left)||0,d=r-c;e.style.left=h+(l==="left"?-d:d)+"px"}}else{const c=l==="top"?o.top-a.bottom:a.top-o.bottom;if(c<r){const h=parseFloat(e.style.top)||0,d=r-c;e.style.top=h+(l==="top"?-d:d)+"px"}}}destroy(){var t,e,s,i,a,o,r;for(let n=0;n<this._bandHitEls.length;n++){const l=this._bandHitEls[n];(t=l.removeEventListener)==null||t.call(l,"mousemove",this._onBandEnter),(e=l.removeEventListener)==null||e.call(l,"mouseout",this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,!!((s=this.ctx)!=null&&s.events))try{(a=(i=this.ctx.events).removeEventListener)==null||a.call(i,"dataPointMouseEnter",this._onCellEnter),(r=(o=this.ctx.events).removeEventListener)==null||r.call(o,"dataPointMouseLeave",this._onCellLeave)}catch{}}_attachBandHoverListeners(){if(W.isBrowser())for(let t=0;t<this._bandHitEls.length;t++){const e=this._bandHitEls[t];e.addEventListener("mousemove",this._onBandEnter),e.addEventListener("mouseout",this._onBandLeave)}}_onBandEnter(t){var e,s,i,a;const o=this.w,r=t.currentTarget,n=parseInt((e=r.getAttribute("data:range-index"))!=null?e:"-1",10);n<0||n===this._activeBandIndex||(this._activeBandIndex=n,(a=(i=(s=this.ctx)==null?void 0:s.events)==null?void 0:i.fireEvent)==null||a.call(i,"legendHover",[this.ctx,n,o]),new tt(o).highlightRangeInSeries(n,"highlight"))}_onBandLeave(){if(this._activeBandIndex<0)return;const t=this._activeBandIndex;this._activeBandIndex=-1,new tt(this.w).highlightRangeInSeries(t,"reset")}_attachHoverListeners(){var t,e;W.isBrowser()&&(e=(t=this.ctx)==null?void 0:t.events)!=null&&e.addEventListener&&(this.ctx.events.addEventListener("dataPointMouseEnter",this._onCellEnter),this.ctx.events.addEventListener("dataPointMouseLeave",this._onCellLeave))}_onCellEnter(...t){var e,s;const i=this.w;if(!this.arrowEl)return;const a=t[t.length-1];if(!a||typeof a!="object")return;const o=a.seriesIndex,r=a.dataPointIndex;if(typeof o!="number"||typeof r!="number"||i.config.chart.type!=="heatmap")return;const n=(s=(e=i.seriesData)==null?void 0:e.series)==null?void 0:s[o],l=n==null?void 0:n[r];l==null||Number.isNaN(l)||this._positionArrow(l)}
1111_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute("opacity","0"),this.hoverValueEl&&(this.hoverValueEl.style.opacity="0"))}_positionArrow(t){if(!this.arrowEl||!this._geom)return;const{isVertical:e,position:s,stripX:i,stripY:a,stripLength:o,stripThickness:r,arrowSize:n}=this._geom,l=this._min,h=this._max-l;let d;if(h===0?d=.5:d=(t-l)/h,d<0&&(d=0),d>1&&(d=1),e){const f=a+o-d*o;let p,g;s==="left"?(p=i+r,g=p+n):(p=i,g=p-n);const u=[`${p},${f}`,`${g},${f-n/2}`,`${g},${f+n/2}`].join(" ");this.arrowEl.setAttribute("points",u)}else{const f=i+d*o;let p,g;s==="top"?(p=a+r,g=p+n):(p=a,g=p-n);const u=[`${f},${p}`,`${f-n/2},${g}`,`${f+n/2},${g}`].join(" ");this.arrowEl.setAttribute("points",u)}if(this.arrowEl.setAttribute("opacity","1"),this.hoverValueEl){const f=this._getFormatter();if(this.hoverValueEl.textContent=f(t),e){const p=a+o-d*o;s==="left"?this.hoverValueEl.style.left=`${i+r+n+8}px`:(this.hoverValueEl.style.left=`${i-n-8}px`,this.hoverValueEl.style.transform="translateX(-100%)"),this.hoverValueEl.style.top=`${p-9}px`}else{const p=i+d*o;this.hoverValueEl.style.left=`${p}px`,this.hoverValueEl.style.transform="translateX(-50%)",s==="top"?this.hoverValueEl.style.top=`${a+r+n+8}px`:this.hoverValueEl.style.top=`${a-n-18}px`}this.hoverValueEl.style.opacity="1"}}_buildArrow(t,e,s){const i=B.createElementNS(ut,"polygon");return i.setAttribute("fill",e),i.setAttribute("opacity","0"),i.setAttribute("class","apexcharts-heatmap-gradient-arrow"),i.setAttribute("points","0,0 0,0 0,0"),i.setAttribute("pointer-events","none"),i}_computeStops(){var t,e;const s=this.w,i=s.config.plotOptions.heatmap.colorScale,a=i.gradientLegend;let o=1/0,r=-1/0;const n=((t=s.seriesData)==null?void 0:t.series)||[];for(let f=0;f<n.length;f++){const p=n[f];if(p)for(let g=0;g<p.length;g++){const u=p[g];u==null||Number.isNaN(u)||(u<o&&(o=u),u>r&&(r=u))}}Number.isFinite(o)||(o=0),Number.isFinite(r)||(r=0);let l=o,c=r;typeof i.min<"u"&&(l=i.min<o?i.min:o),typeof i.max<"u"&&(c=i.max>r?i.max:r);const h=[],d=[];if(i.ranges&&i.ranges.length>0){const f=i.ranges.map((x,b)=>G($({},x),{_originalIndex:b})).sort((x,b)=>x.from-b.from),p=f[0].from,g=f[f.length-1].to;l=p,c=g;const u=g-p||1;f.forEach(x=>{const b=(x.from-p)/u,w=(x.to-p)/u;h.push({percent:(b+w)/2,color:x.color}),d.push({index:x._originalIndex,p1:b,p2:w})})}else{const f=s.globals.colors[0]||"#008FFB",p=new T,g=(e=s.config.plotOptions.heatmap.shadeIntensity)!=null?e:.5,u=s.globals.hasNegs,x=Math.max(2,a.stops||16);for(let b=0;b<x;b++){const w=b/(x-1),m=l+w*(c-l),y=Math.abs(c)+Math.abs(l),v=y===0?0:100*m/y;let C;u?s.config.plotOptions.heatmap.reverseNegativeShade?C=v<0?v/100*(g*1.25):(1-v/100)*(g*1.25):C=v<=0?1-(1+v/100)*g:(1-v/100)*g:C=1-v/100,C>1&&(C=1),C<-1&&(C=-1);const D=s.config.plotOptions.heatmap.enableShades?p.shadeColor(s.config.theme.mode==="dark"?C*-1:C,f):f;h.push({percent:w,color:D})}}return{min:l,max:c,stops:h,bands:d}}}class ui{constructor(t,e){this.w=t,this.ctx=e,this.printDataLabelsInner=(...s)=>{var i;return(i=e.pie)==null?void 0:i.printDataLabelsInner(...s)},this.updateSeries=(...s)=>e.updateHelpers._updateSeries(...s),this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new pi(this)}init(){const t=this.w,e=t.globals,s=t.config;this.isBarsDistributed=s.chart.type==="bar"&&s.plotOptions.bar.distributed&&s.series.length===1;const i=s.legend.showForSingleSeries&&this.w.seriesData.series.length===1||this.isBarsDistributed||s.chart.type==="heatmap"||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&s.legend.show){const a=t.dom.elLegendWrap;for(;a.firstChild;)a.removeChild(a.firstChild);this.heatmapGradientLegend&&(this.heatmapGradientLegend.destroy(),this.heatmapGradientLegend=null),s.chart.type==="heatmap"&&Ee.isEnabled(t)?(this.heatmapGradientLegend=new Ee(t,this.ctx),this.heatmapGradientLegend.draw()):(this.drawLegends(),s.legend.position==="bottom"||s.legend.position==="top"?this.legendAlignHorizontal():(s.legend.position==="right"||s.legend.position==="left")&&this.legendAlignVertical())}}
vendor: 5,938 bytes, line 1111
1111createLegendMarker({i:t,fillcolor:e}){const s=this.w,i=B.createElement("span");i.classList.add("apexcharts-legend-marker");const a=s.config.legend.markers.shape||s.config.markers.shape;let o=a;Array.isArray(a)&&(o=a[t]);const r=Array.isArray(s.config.legend.markers.size)?parseFloat(s.config.legend.markers.size[t]):parseFloat(s.config.legend.markers.size),n=Array.isArray(s.config.legend.markers.offsetX)?parseFloat(s.config.legend.markers.offsetX[t]):parseFloat(s.config.legend.markers.offsetX),l=Array.isArray(s.config.legend.markers.offsetY)?parseFloat(s.config.legend.markers.offsetY[t]):parseFloat(s.config.legend.markers.offsetY),c=Array.isArray(s.config.legend.markers.strokeWidth)?parseFloat(s.config.legend.markers.strokeWidth[t]):parseFloat(s.config.legend.markers.strokeWidth),h=i.style;if(h.height=(r+c)*2+"px",h.width=(r+c)*2+"px",h.left=n+"px",h.top=l+"px",s.config.legend.markers.customHTML)h.background="transparent",h.color=e[t],Array.isArray(s.config.legend.markers.customHTML)?s.config.legend.markers.customHTML[t]&&(i.innerHTML=s.config.legend.markers.customHTML[t]()):i.innerHTML=s.config.legend.markers.customHTML();else{const f=new Pt(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${o}`,seriesIndex:t,strokeWidth:c,size:r}),g=(W.isBrowser()?window.SVG:global.SVG)().addTo(i).size("100%","100%"),u=new R(this.w).drawMarker(0,0,G($({},f),{pointFillColor:Array.isArray(e)?e[t]:f.pointFillColor,shape:o}));s.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(b=>{b.node.classList.contains("apexcharts-marker-triangle")?b.node.style.transform="translate(50%, 45%)":b.node.style.transform="translate(50%, 50%)"}),g.add(u)}return i}drawLegends(){var t;const e=this,s=this.w,i=s.dom.elLegendWrap,a=s.config.legend.fontFamily;let o=s.seriesData.seriesNames,r=s.config.legend.markers.fillColors?s.config.legend.markers.fillColors.slice():s.globals.colors.slice();if(s.config.chart.type==="heatmap"){const h=s.config.plotOptions.heatmap.colorScale.ranges;o=h.map(d=>d.name?d.name:d.from+" - "+d.to),r=h.map(d=>d.color)}else this.isBarsDistributed&&(o=s.labelData.labels.slice());s.config.legend.customLegendItems.length&&(o=s.config.legend.customLegendItems);const n=s.formatters.legendFormatter,l=s.config.legend.inverseOrder,c=[];s.labelData.seriesGroups.length>1&&s.config.legend.clusterGroupedSeries&&s.labelData.seriesGroups.forEach((h,d)=>{c[d]=B.createElement("div"),c[d].classList.add("apexcharts-legend-group",`apexcharts-legend-group-${d}`),s.config.legend.clusterGroupedSeriesOrientation==="horizontal"?i.classList.add("apexcharts-legend-group-horizontal"):c[d].classList.add("apexcharts-legend-group-vertical")});for(let h=l?o.length-1:0;l?h>=0:h<=o.length-1;l?h--:h++){const d=n(o[h],{seriesIndex:h,w:s});let f=!1,p=!1;if(s.globals.collapsedSeries.length>0)for(let m=0;m<s.globals.collapsedSeries.length;m++)s.globals.collapsedSeries[m].index===h&&(f=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(let m=0;m<s.globals.ancillaryCollapsedSeriesIndices.length;m++)s.globals.ancillaryCollapsedSeriesIndices[m]===h&&(p=!0);const g=this.createLegendMarker({i:h,fillcolor:r});R.setAttrs(g,{rel:h+1,"data:collapsed":f||p}),(f||p)&&g.classList.add("apexcharts-inactive-legend");const u=B.createElement("div");if(s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled){u.setAttribute("role","button"),u.setAttribute("tabindex","0");const m=Array.isArray(d)?d.join(" "):d,y=f||p,v=y?"hidden":"visible";u.setAttribute("aria-label",`${m}, ${v}. Press Enter or Space to toggle.`),u.setAttribute("aria-pressed",y?"true":"false")}const x=B.createElement("span");x.classList.add("apexcharts-legend-text"),x.innerHTML=Array.isArray(d)?d.join(" "):d;let b=s.config.legend.labels.useSeriesColors?s.globals.colors[h]:Array.isArray(s.config.legend.labels.colors)?(t=s.config.legend.labels.colors)==null?void 0:t[h]:s.config.legend.labels.colors;b||(b=s.config.chart.foreColor),x.style.color=b,x.style.fontSize=s.config.legend.fontSize,x.style.fontWeight=s.config.legend.fontWeight,x.style.fontFamily=a||s.config.chart.fontFamily,R.setAttrs(x,{rel:h+1,i:h,"data:default-text":encodeURIComponent(d),"data:collapsed":f||p}),u.appendChild(g),u.appendChild(x);const w=new et(this.w);s.config.legend.showForZeroSeries||w.getSeriesTotalByIndex(h)===0&&w.seriesHaveSameValues(h)&&!w.isSeriesNull(h)&&s.globals.collapsedSeriesIndices.indexOf(h)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&u.classList.add("apexcharts-hidden-zero-series"),s.config.legend.showForNullSeries||w.isSeriesNull(h)&&s.globals.collapsedSeriesIndices.indexOf(h)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&u.classList.add("apexcharts-hidden-null-series"),c.length?s.labelData.seriesGroups.forEach((m,y)=>{var v,C;m.includes((C=(v=s.config.series[h])==null?void 0:v.name)!=null?C:"")&&(i.appendChild(c[y]),c[y].appendChild(u))}):i.appendChild(u),i.classList.add(`apexcharts-align-${s.config.legend.horizontalAlign}`),i.classList.add("apx-legend-position-"+s.config.legend.position),u.classList.add("apexcharts-legend-series"),u.style.margin=`${s.config.legend.itemMargin.vertical}px ${s.config.legend.itemMargin.horizontal}px`,i.style.width=s.config.legend.width?s.config.legend.width+"px":"",i.style.height=s.config.legend.height?s.config.legend.height+"px":"",R.setAttrs(u,{rel:h+1,seriesName:T.escapeString(o[h]),"data:collapsed":f||p}),(f||p)&&u.classList.add("apexcharts-inactive-legend"),s.config.legend.onItemClick.toggleDataSeries||u.classList.add("apexcharts-no-click")}s.dom.elWrap.addEventListener("click",e.onLegendClick,!0),s.config.legend.onItemHover.highlightDataSeries&&s.config.legend.customLegendItems.length===0&&(s.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),s.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0)),s.config.chart.accessibility.enabled&&s.c
1111onfig.chart.accessibility.keyboard.enabled&&s.dom.elWrap.addEventListener("keydown",e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(t,e){const s=this.w,i=s.dom.elLegendWrap,a=i.clientHeight;let o=0,r=0;if(s.config.legend.position==="bottom")r=s.globals.svgHeight-Math.min(a,s.globals.svgHeight/2)-5;else if(s.config.legend.position==="top"){const l=new Ut(this.w,this.ctx),c=l.dimHelpers.getTitleSubtitleCoords("title").height,h=l.dimHelpers.getTitleSubtitleCoords("subtitle").height;r=(c>0?c-10:0)+(h>0?h-10:0)}i.style.position="absolute",o=o+t+s.config.legend.offsetX,r=r+e+s.config.legend.offsetY,i.style.left=o+"px",i.style.top=r+"px",s.config.legend.position==="right"&&(i.style.left="auto",i.style.right=25+s.config.legend.offsetX+"px"),["width","height"].forEach(l=>{i&&i.style[l]&&(i.style[l]=parseInt(String(s.config.legend[l]),10)+"px")})}legendAlignHorizontal(){const t=this.w,e=t.dom.elLegendWrap;e.style.right="0";const s=new Ut(this.w,this.ctx),i=s.dimHelpers.getTitleSubtitleCoords("title"),a=s.dimHelpers.getTitleSubtitleCoords("subtitle"),o=20;let r=0;t.config.legend.position==="top"&&(r=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(o,r)}legendAlignVertical(){const t=this.w,e=this.legendHelpers.getLegendDimensions(),s=20;let i=0;t.config.legend.position==="left"&&(i=20),t.config.legend.position==="right"&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,s)}onLegendHovered(t){var e;const s=this.w,i=t.target,a=i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker");if(s.config.chart.type!=="heatmap"&&!this.isBarsDistributed)!i.classList.contains("apexcharts-inactive-legend")&&a&&new tt(this.ctx.w).toggleSeriesOnHover(t,i);else if(a){const o=parseInt((e=i.getAttribute("rel"))!=null?e:"0",10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,o,this.w]);const r=new tt(this.ctx.w);t.type==="mousemove"?r.highlightRangeInSeries(o,"highlight"):t.type==="mouseout"&&r.highlightRangeInSeries(o,"reset")}}onLegendKeyDown(t){const e=this,s=this.w,i=t.target;if((i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))&&(t.key==="Enter"||t.key===" ")){t.preventDefault();const o=i.getAttribute("rel");e.onLegendClick(t),o!==null&&s.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{const r=s.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${o}"]`);r&&r.focus()})}}onLegendClick(t){var e;const s=this.w,i=t.target;if(!s.config.legend.customLegendItems.length&&(i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))){const a=parseInt((e=i.getAttribute("rel"))!=null?e:"0",10)-1,o=i.getAttribute("data:collapsed")==="true",r=this.w.config.chart.events.legendClick;typeof r=="function"&&r(this.ctx,a,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,a,this.w]);const n=this.w.config.legend.markers.onClick;typeof n=="function"&&i.classList.contains("apexcharts-legend-marker")&&(n(this.ctx,a,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,a,this.w])),s.config.chart.type!=="treemap"&&s.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&s.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(a,o)}}}dt.registerFeatures({legend:ui});const xi=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1112 <path d="M5 9 2 12l3 3"/> 1113 <path d="M9 5l3-3 3 3"/> 1114 <path d="M15 19l-3 3-3-3"/> 1115 <path d="M19 9l3 3-3 3"/> 1116 <path d="M2 12h20"/> 1117 <path d="M12 2v20"/> 1118</svg> 1119`,bi=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1120 <circle cx="11" cy="11" r="7"/> 1121 <path d="m21 21-4.3-4.3M8 11h6M11 8v6"/> 1122</svg> 1123`,mi=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1124 <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/> 1125 <path d="M3 3v5h5"/> 1126</svg> 1127`,yi=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1128 <path d="M12 5v14M5 12h14"/> 1129</svg> 1130`,wi=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1131 <path d="M5 12h14"/> 1132</svg> 1133`,vi=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1134 <path d="M5 3a2 2 0 0 0-2 2"/> 1135 <path d="M19 3a2 2 0 0 1 2 2"/> 1136 <path d="M21 19a2 2 0 0 1-2 2"/> 1137 <path d="M5 21a2 2 0 0 1-2-2"/> 1138 <path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/> 1139</svg> 1140`,Ai=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1141 <path d="M4 6h16M4 12h16M4 18h16"/> 1142</svg> 1143`;class ss{constructor(t,e){this.w=t,this.ctx=e,this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){const t=this.w,e=()=>B.createElementNS("http://www.w3.org/1999/xhtml","div"),s=()=>{const n=B.createElementNS("http://www.w3.org/1999/xhtml","button");return n.setAttribute("type","button"),n},i=e();if(i.setAttribute("class","apexcharts-toolbar"),i.style.top=t.config.chart.toolbar.offsetY+"px",i.style.right=-t.config.chart.toolbar.offsetX+3+"px",t.dom.elWrap.appendChild(i),this.elZoom=s(),this.elZoomIn=s(),this.elZoomOut=s(),this.elPan=s(),this.elSelection=s(),this.elZoomReset=s(),this.elMenuIcon=s(),this.elMenu=e(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let n=0;n<this.t.customIcons.length;n++)this.elCustomIcons.push(s());const a=[],o=(n,l,c)=>{const h=n.toLowerCase();this.t[h]&&t.config.chart.zoom.enabled&&a.push({el:l,icon:typeof this.t[h]=="string"?this.t[h]:c,title:this.localeValues[n],class:`apexcharts-${h}-icon`})};o("zoomIn",this.elZoomIn,yi),o("zoomOut",this.elZoomOut,wi);const r=n=>{this.t[n]&&t.config.chart[n].enabled&&a.push({el:n==="zoom"?this.elZoom:this.elSelection,icon:typeof this.t[n]=="string"?this.t[n]:n==="zoom"?bi:vi,title:this.localeValues[n==="zoom"?"selectionZoom":"selection"],class:`apexcharts-${n}-icon`})};r("zoom"),r("selection"),this.t.pan&&t.config.chart.zoom.enabled&&a.push({el:this.elPan,icon:typeof this.t.pan=="str
1143ing"?this.t.pan:xi,title:this.localeValues.pan,class:"apexcharts-pan-icon"}),o("reset",this.elZoomReset,mi),this.t.download&&a.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:Ai,title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(let n=0;n<this.elCustomIcons.length;n++)a.push({el:this.elCustomIcons[n],icon:this.t.customIcons[n].icon,title:this.t.customIcons[n].title,index:this.t.customIcons[n].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[n].class});a.forEach((n,l)=>{n.index&&T.moveIndexInArray(a,l,n.index)});for(let n=0;n<a.length;n++)R.setAttrs(a[n].el,{class:a[n].class,title:a[n].title,"aria-label":a[n].title}),a[n].el.innerHTML=a[n].icon,i.appendChild(a[n].el);this.elZoom.parentNode&&this.elZoom.setAttribute("aria-pressed",String(!!t.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!t.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!t.interact.panEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","false")),this._createHamburgerMenu(i),t.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):t.interact.panEnabled?this.elPan.classList.add(this.selectedClass):t.interact.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}_createHamburgerMenu(t){this.elMenuItems=[],t.appendChild(this.elMenu),R.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});const e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let s=0;s<e.length;s++)this.elMenuItems.push(B.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[s].innerHTML=e[s].title,R.setAttrs(this.elMenuItems[s],{class:`apexcharts-menu-item ${e[s].name}`,title:e[s].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[s])}addToolbarEventListeners(){var t,e,s,i,a,o,r,n;(t=this.elZoomReset)==null||t.addEventListener("click",this.handleZoomReset.bind(this)),(e=this.elSelection)==null||e.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),(s=this.elZoom)==null||s.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),(i=this.elZoomIn)==null||i.addEventListener("click",this.handleZoomIn.bind(this)),(a=this.elZoomOut)==null||a.addEventListener("click",this.handleZoomOut.bind(this)),(o=this.elPan)==null||o.addEventListener("click",this.togglePanning.bind(this)),(r=this.elMenuIcon)==null||r.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(c=>{c.classList.contains("exportSVG")?c.addEventListener("click",this.handleDownload.bind(this,"svg")):c.classList.contains("exportPNG")?c.addEventListener("click",this.handleDownload.bind(this,"png")):c.classList.contains("exportCSV")&&c.addEventListener("click",this.handleDownload.bind(this,"csv"))});for(let c=0;c<this.t.customIcons.length;c++)this.elCustomIcons[c].addEventListener("click",this.t.customIcons[c].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMenuIcon,...this.elCustomIcons].forEach(c=>{c.addEventListener("keydown",h=>{if(h.key==="Enter"||h.key===" "){h.preventDefault();const d=c.className;c.click(),requestAnimationFrame(()=>{const f=this.w.dom.baseEl;if(!f)return;const p=d.split(" ").find(u=>u.startsWith("apexcharts-"));if(!p)return;const g=f.querySelector(`.${p}`);g&&g.focus()})}})}),(n=this.elMenuIcon)==null||n.addEventListener("keydown",c=>{var h;(c.key==="ArrowDown"||c.key==="ArrowUp")&&(c.preventDefault(),(h=this.elMenu)!=null&&h.classList.contains("apexcharts-menu-open")||this.toggleMenu(),window.setTimeout(()=>{const d=c.key==="ArrowDown"?0:this.elMenuItems.length-1;this.elMenuItems[d]&&this.elMenuItems[d].focus()},20))}),this.elMenuItems.forEach((c,h)=>{c.addEventListener("keydown",d=>{var f;d.key==="ArrowDown"?(d.preventDefault(),(this.elMenuItems[h+1]||this.elMenuItems[0]).focus()):d.key==="ArrowUp"?(d.preventDefault(),(this.elMenuItems[h-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):d.key==="Escape"||d.key==="Tab"?(this._closeMenu(),(f=this.elMenuIcon)==null||f.focu
1143s(),d.key==="Tab"||d.preventDefault()):(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),c.click())})})}toggleZoomSelection(t){this.ctx.getSyncedCharts().forEach(s=>{s.ctx.toolbar.toggleOtherControls();const i=t==="selection"?s.ctx.toolbar.elSelection:s.ctx.toolbar.elZoom,a=t==="selection"?"selectionEnabled":"zoomEnabled";s.w.globals[a]=!s.w.globals[a],i.classList.contains(s.ctx.toolbar.selectedClass)?i.classList.remove(s.ctx.toolbar.selectedClass):i.classList.add(s.ctx.toolbar.selectedClass),i.setAttribute("aria-pressed",String(s.w.globals[a]))})}getToolbarIconsReference(){const t=this.w;this.elZoom||(this.elZoom=t.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.dom.baseEl.querySelector(".apexcharts-selection-icon"))}enableZoomPanFromToolbar(t){this.toggleOtherControls(),t==="pan"?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;const e=t==="pan"?this.elPan:this.elZoom,s=t==="pan"?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),s&&s.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{e.ctx.toolbar.toggleOtherControls(),e.w.interact.panEnabled=!e.w.interact.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass),e.ctx.toolbar.elPan.setAttribute("aria-pressed",String(e.w.interact.panEnabled))})}toggleOtherControls(){const t=this.w;t.interact.panEnabled=!1,t.interact.zoomEnabled=!1,t.interact.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(s=>{s&&s.classList.remove(this.selectedClass)})}_currentXRange(){const t=this.w;return t.axisFlags.isRangeBar?{minX:t.globals.minY,maxX:t.globals.maxY}:{minX:t.globals.minX,maxX:t.globals.maxX}}handleZoomIn(){const t=this.w,{minX:e,maxX:s}=this._currentXRange();this.minX=e,this.maxX=s;const i=(e+s)/2,a=(e+i)/2,o=(s+i)/2,r=this._getNewMinXMaxX(a,o);t.interact.disableZoomIn||this.zoomUpdateOptions(r.minX,r.maxX)}handleZoomOut(){const t=this.w,{minX:e,maxX:s}=this._currentXRange();if(this.minX=e,this.maxX=s,t.config.xaxis.type==="datetime"&&new Date(e).getUTCFullYear()<1e3)return;const i=(e+s)/2,a=e-(i-e),o=s-(i-s),r=this._getNewMinXMaxX(a,o);t.interact.disableZoomOut||this.zoomUpdateOptions(r.minX,r.maxX)}_getNewMinXMaxX(t,e){const s=this.w.config.xaxis.convertedCatToNumeric;return{minX:s?Math.floor(t):t,maxX:s?Math.floor(e):e}}zoomUpdateOptions(t,e){const s=this.w;if(t===void 0&&e===void 0){this.handleZoomReset();return}if(s.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=s.globals.dataPoints),e-t<2))return;let i={min:t,max:e};const a=this.getBeforeZoomRange(i,void 0);a&&(i=a.xaxis);const o={xaxis:i};if(!s.globals.initialConfig)return;const r=T.clone(s.globals.initialConfig.yaxis);s.config.chart.group||(o.yaxis=r),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(o,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(i,r)}zoomCallback(t,e){typeof this.ev.zoomed=="function"&&(this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e}),this.ctx.events.fireEvent("zoomed",{xaxis:t,yaxis:e}))}getBeforeZoomRange(t,e){let s=null;return typeof this.ev.beforeZoom=="function"&&(s=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),s}toggleMenu(){window.setTimeout(()=>{var t,e,s;(t=this.elMenu)!=null&&t.classList.contains("apexcharts-menu-open")?this._closeMenu():((e=this.elMenu)==null||e.classList.add("apexcharts-menu-open"),(s=this.elMenuIcon)==null||s.setAttribute("aria-expanded","true"))},0)}_closeMenu(){var t,e;(t=this.elMenu)==null||t.classList.remove("apexcharts-menu-open"),(e=this.elMenuIcon)==null||e.setAttribute("aria-expanded","false")}handleDownload(t){const e=this.w,s=new es(this.w,this.ctx);switch(t){case"svg":s.exportToSVG();break;case"png":s.exportToPng();break;case"csv":s.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter});break}}
1143handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{const s=e.w;if(!s.interact.zoomed)return;if(s.globals.lastXAxis.min=s.globals.initialConfig.xaxis.min,s.globals.lastXAxis.max=s.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof s.config.chart.events.beforeResetZoom=="function"){const a=s.config.chart.events.beforeResetZoom(e,s);a&&e.updateHelpers.revertDefaultAxisMinMax(a)}typeof s.config.chart.events.zoomed=="function"&&e.ctx.toolbar.zoomCallback({min:s.config.xaxis.min,max:s.config.xaxis.max});const i=e.ctx.series.emptyCollapsedSeries(T.clone(s.globals.initialSeries));e.updateHelpers._updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled),s.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}class Ci extends ss{constructor(t,e){super(t,e),this.w=t,this.ctx=e,this.dragged=!1,this.graphics=new R(this.w),this.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection="none",this.debounceTimer=null,this.debounceDelay=100,this.wheelDelay=400}init({xyRatios:t}){const e=this.w,s=this;this.xyRatios=t,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=e.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new ws(0,0,e.layout.gridWidth,e.layout.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),e.dom.Paper.add(this.zoomRect),e.dom.Paper.add(this.selectionRect),e.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:e.layout.gridWidth,maxY:e.layout.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):e.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:e.layout.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=e.dom.baseEl.querySelector(`${e.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(i=>{var a;(a=this.hoverArea)==null||a.addEventListener(i,s.svgMouseEvents.bind(s,t),{capture:!1,passive:!0})}),e.config.chart.zoom.enabled&&e.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",s.mouseWheelEvent.bind(s),{capture:!1,passive:!1}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}svgMouseEvents(t,e){var s;const i=this.w,a=this.ctx.toolbar,o=i.interact.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,r=i.config.chart.toolbar.autoSelected;if(e.shiftKey?(this.shiftWasPressed=!0,a.enableZoomPanFromToolbar(r==="pan"?"zoom":"pan")):this.shiftWasPressed&&(a.enableZoomPanFromToolbar(r),this.shiftWasPressed=!1),!e.target)return;const n=e.target.classList;let l;if(e.target.parentNode&&e.target.parentNode!==null&&(l=e.target.parentNode.classList),!(n.contains("apexcharts-legend-marker")||n.contains("apexcharts-legend-text")||l&&l.contains("apexcharts-toolbar"))){if(this.clientX=e.type==="touchmove"||e.type==="touchstart"?e.touches[0].clientX:e.type==="touchend"?e.changedTouches[0].clientX:e.clientX,this.clientY=e.type==="touchmove"||e.type==="touchstart"?e.touches[0].clientY:e.type==="touchend"?e.changedTouches[0].clientY:e.clientY,e.type==="mousedown"&&e.which===1||e.type==="touchstart"){const h=(s=this.gridRect)==null?void 0:s.getBoundingClientRect();if(!h)return;this.startX=this.clientX-h.left-i.globals.barPadForNumericAxis,this.startY=this.clientY-h.top,this.dragged=!1,this.w.interact.mousedown=!0}(e.type==="mousemove"&&e.which===1||e.type==="touchmove")&&(this.dragged=!0,i.interact.panEnabled?(i.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:o,xyRatios:t})):(this.w.interact.mousedown&&i.interact.zoomEnabled||this.w.interact.mousedown&&i.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:o}))),(e.type==="mouseup"||e.type==="touchend"||e.type==="mouseleave")&&this.handleMouseUp({zoomtype:o}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:t,isResized:e}){var s;const i=this.w,a=(s=this.gridRect)==null?void 0:s.getBoundingClientRect();a&&(this.w.interact.mousedown||e)&&(this.endX=this.clientX-a.left-i.globals.barPadForNumericAxis,this.endY=this.clientY-a.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(i.interact.zoomEnabled||i.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:t})),i.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}mouseWheelEvent(t){const e=this.w;t.preventDefault();const s=Date.now();s-e.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(t),e.interact.lastWheelExecution=s),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{s-e.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(t),e.interact.lastWheelExecution=s)},this.debounceDelay)}executeMouseWheelZoom(t){var e,s,i;const a=this.w;this.minX=a.axisFlags.isRangeBar?a.globals.minY:a.globals.minX,this.maxX=a.axisFlags.isRangeBar?a.globals.maxY:a.globals.maxX;const o=(e=this.gridRect)==null?void 0:e.getBoundingClientRect();if(!o)return;const r=(t.clientX-o.left)/o.width,n=this.minX,l=this.maxX,c=l-n,h=.5,d=1.5;let f,p,g;if(t.deltaY<0){f=h*c;const x=n+r*c;p=x-f/2,g=x+f/2}else f=d*c,p=n-f/2,g=l+f/2;if(!a.axisFlags.isRangeBar){const x=(s=a.globals.dataReducerRawMinX)!=null?s:a.globals.initialMinX,b=(i=a.globals.dataReducerRawMaxX)!=null?i:a.globals.initialMaxX;p=Math.max(p,x),g=Math.min(g,b);const w=a.globals.minXDiff>0&&isFinite(a.globals.minXDiff)?a.globals.minXDiff:0,m=Math.max(w*2,(b-x)*1e-6);if(g-p<m){const y=(p+g)/2;p=y-m/2,g=y+m/2}}const u=this._getNewMinXMaxX(p,g);
1143!isNaN(u.minX)&&!isNaN(u.maxX)&&this.zoomUpdateOptions(u.minX,u.maxX)}makeSelectionRectDraggable(){const t=this.w;if(!this.selectionRect)return;const e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(s,i,a,o,r)=>r==="l"||r==="r"?s.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):s.circle(0),updateHandle:(s,i)=>s.center(i[0],i[1])}).resize().on("resize",()=>{const s=t.interact.zoomEnabled?t.config.chart.zoom.type:t.config.chart.selection.type;this.handleMouseUp({zoomtype:s,isResized:!0})}))}preselectedSelection(){const t=this.w,e=this.xyRatios;if(!t.interact.zoomEnabled){if(typeof t.interact.selection<"u"&&t.interact.selection!==null)this.drawSelectionRect(G($({},t.interact.selection),{translateX:t.layout.translateX,translateY:t.layout.translateY}));else if(t.config.chart.selection.xaxis.min!==void 0&&t.config.chart.selection.xaxis.max!==void 0){let s=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i=t.layout.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-s;t.axisFlags.isRangeBar&&(s=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);const a={x:s,y:0,width:i,height:t.layout.gridHeight,translateX:t.layout.translateX,translateY:t.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),typeof t.config.chart.events.selection=="function"&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:t,y:e,width:s,height:i,translateX:a=0,translateY:o=0}){const r=this.w,n=this.zoomRect,l=this.selectionRect;if(this.dragged||r.interact.selection!==null){const c={transform:"translate("+a+", "+o+")"};r.interact.zoomEnabled&&this.dragged&&(s<0&&(s=1),n.attr({x:t,y:e,width:s,height:i,fill:r.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":r.config.chart.zoom.zoomedArea.fill.opacity,stroke:r.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":r.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":r.config.chart.zoom.zoomedArea.stroke.opacity}),R.setAttrs(n.node,c)),r.interact.selectionEnabled&&(l.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,fill:r.config.chart.selection.fill.color,"fill-opacity":r.config.chart.selection.fill.opacity,stroke:r.config.chart.selection.stroke.color,"stroke-width":r.config.chart.selection.stroke.width,"stroke-dasharray":r.config.chart.selection.stroke.dashArray,"stroke-opacity":r.config.chart.selection.stroke.opacity}),R.setAttrs(l.node,c))}}hideSelectionRect(t){t&&t.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:t,zoomtype:e}){var s;const i=this.w,a=t,o=(s=this.gridRect)==null?void 0:s.getBoundingClientRect();if(!o)return;const r=a.startX-1,n=a.startY;let l=!1,c=!1;const h=a.clientX-o.left-i.globals.barPadForNumericAxis,d=a.clientY-o.top;let f=h-r,p=d-n,g={translateX:i.layout.translateX,translateY:i.layout.translateY};return Math.abs(f+r)>i.layout.gridWidth?f=i.layout.gridWidth-r:h<0&&(f=r),r>h&&(l=!0,f=Math.abs(f)),n>d&&(c=!0,p=Math.abs(p)),e==="x"?g={x:l?r-f:r,y:0,width:f,height:i.layout.gridHeight}:e==="y"?g={x:0,y:c?n-p:n,width:i.layout.gridWidth,height:p}:g={x:l?r-f:r,y:c?n-p:n,width:f,height:p},g=G($({},g),{translateX:i.layout.translateX,translateY:i.layout.translateY}),a.drawSelectionRect(g),a.selectionDragging("resizing"),g}selectionDragging(t,e){var s;const i=this.w;if(!e)return;e.preventDefault();const{handler:a,box:o}=e.detail,r=this.constraints;let{x:n,y:l}=o;n<r.x&&(n=r.x),l<r.y&&(l=r.y),o.x2>r.x2&&(n=r.x2-o.w),o.y2>r.y2&&(l=r.y2-o.h),a.move(n,l);const c=this.xyRatios,h=this.selectionRect;let d=0;t==="resizing"&&(d=30);const f=g=>parseFloat(h.node.getAttribute(g)),p={x:f("x"),y:f("y"),width:f("width"),height:f("height")};i.interact.selection=p,typeof i.config.chart.events.selection=="function"&&i.interact.selectionEnabled&&(clearTimeout((s=this.w.globals.selectionResizeTimer)!=null?s:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{var g;const u=(g=this.gridRect)==null?void 0:g.getBoundingClientRect();if(!u)return;const x=h.node.getBoundingClientRect();let b,w,m,y;if(i.axisFlags.isRangeBar)b=i.globals.yAxisScale[0].niceMin+(x.left-u.left)*c.invertedYRatio,w=i.globals.yAxisScale[0].niceMin+(x.right-u.left)*c.invertedYRatio,m=0,y=1;else{if(!i.globals.xAxisScale)return;b=i.globals.xAxisScale.niceMin+(x.left-u.left)*c.xRatio,w=i.globals.xAxisScale.niceMin+(x.right-u.left)*c.xRatio,m=i.globals.yAxisScale[0].niceMin+(u.bottom-x.bottom)*c.yRatio[0],y=i.globals.yAxisScale[0].niceMax-(x.top-u.top)*c.yRatio[0]}const v={xaxis:{min:b,max:w},yaxis:{min:m,max:y}};i.config.chart.events.selection(this.ctx,v),i.config.chart.brush.enabled&&i.config.chart.events.brushScrolled!==void 0&&i.config.chart.events.brushScrolled(this.ctx,v)},d))}selectionDrawn({context:t,zoomtype:e}){var s,i;const a=this.w,o=t,r=this.xyRatios,n=this.ctx.toolbar,l=a.interact.zoomEnabled?o.zoomRect.node.getBoundingClientRect():o.selectionRect.node.getBoundingClientRect(),c=o.gridRect.getBoundingClientRect(),h=l.left-c.left-a.globals.barPadForNumericAxis,d=l.right-c.left-a.globals.barPadForNumericAxis,f=l.top-c.top,p=l.bottom-c.top;let g,u;if(a.axisFlags.isRangeBar)g=a.globals.yAxisScale[0].niceMin+h*r.invertedYRatio,u=a.globals.yAxisScale[0].niceMin+d*r.invertedYRatio;else{const w=(i=(s=a.globals.xAxisScale)==null?void 0:s.niceMin)!=null?i:0;g=w+h*r.xRatio,u=w+d*r.xRatio}const x=[],b=[];if(a.config.yaxis.forEach((w,m)=>{const y=a.globals.seriesYAxisMap[m][0],v=a.globals.yAxisScale[m].niceMax-r.yRatio[y]*f,C=a.globals.yAxisScale[m].niceMax-r.yRatio[y]*p;x.push(v),b.push(C)}),o.dragged&&(o.dragX>10||o.dragY>10)&&g!==u){if(a.interact.zoomEnabled){if(!a.globals.initialConfig)return;let w=T.clone(a.globals.initialConfig.yaxis),m=T.clone(a.globals.initialConfig.xaxis);if(a.interact.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(g=Math.floor(g),u=Math.floor(u),g<1&&(g=1,u=a.globals.dataPoints),u-g<2&&(u=g+1)),(e==="xy"||e==="x")&&(m={min:g,max:u}
1143),(e==="xy"||e==="y")&&w.forEach((v,C)=>{w[C].min=b[C],w[C].max=x[C]}),n){const v=n.getBeforeZoomRange(m,w);v&&(m=v.xaxis?v.xaxis:m,w=v.yaxis?v.yaxis:w)}const y={xaxis:m};a.config.chart.group||(y.yaxis=w),o.ctx.updateHelpers._updateOptions(y,!1,o.w.config.chart.animations.dynamicAnimation.enabled),typeof a.config.chart.events.zoomed=="function"&&n.zoomCallback(m,w)}else if(a.interact.selectionEnabled){let w=null,m=null;if(m={min:g,max:u},e==="xy"||e==="y"){const y=T.clone(a.config.yaxis);w=y,y.forEach((v,C)=>{y[C].min=b[C],y[C].max=x[C]})}a.interact.selection=o.selection,typeof a.config.chart.events.selection=="function"&&a.config.chart.events.selection(o.ctx,{xaxis:m,yaxis:w})}}}panDragging({context:t}){var e;const s=this.w,i=t;if(typeof s.interact.lastClientPosition.x<"u"){const r=s.interact.lastClientPosition.x-i.clientX,n=((e=s.interact.lastClientPosition.y)!=null?e:0)-i.clientY;Math.abs(r)>Math.abs(n)&&r>0?this.moveDirection="left":Math.abs(r)>Math.abs(n)&&r<0?this.moveDirection="right":Math.abs(n)>Math.abs(r)&&n>0?this.moveDirection="up":Math.abs(n)>Math.abs(r)&&n<0&&(this.moveDirection="down")}s.interact.lastClientPosition={x:i.clientX,y:i.clientY};const a=s.axisFlags.isRangeBar?s.globals.minY:s.globals.minX,o=s.axisFlags.isRangeBar?s.globals.maxY:s.globals.maxX;i.panScrolled(a,o)}panScrolled(t,e){var s,i;const a=this.w,o=this.xyRatios;if(!a.globals.initialConfig)return;const r=T.clone(a.globals.initialConfig.yaxis);let n=o.xRatio,l=a.globals.minX,c=a.globals.maxX;if(a.axisFlags.isRangeBar&&(n=o.invertedYRatio,l=a.globals.minY,c=a.globals.maxY),this.moveDirection==="left"?(t=l+a.layout.gridWidth/15*n,e=c+a.layout.gridWidth/15*n):this.moveDirection==="right"&&(t=l-a.layout.gridWidth/15*n,e=c-a.layout.gridWidth/15*n),!a.axisFlags.isRangeBar){const f=(s=a.globals.dataReducerRawMinX)!=null?s:a.globals.initialMinX,p=(i=a.globals.dataReducerRawMaxX)!=null?i:a.globals.initialMaxX;(t<f||e>p)&&(t=l,e=c)}const d={xaxis:{min:t,max:e}};
1143a.config.chart.group||(d.yaxis=r),this.updateScrolledChart(d,t,e)}updateScrolledChart(t,e,s){const i=this.w;if(this.ctx.updateHelpers._updateOptions(t,!1,!1),typeof i.config.chart.events.scrolled=="function"){const a={xaxis:{min:e,max:s}};i.config.chart.events.scrolled(this.ctx,a),this.ctx.events.fireEvent("scrolled",a)}}}dt.registerFeatures({toolbar:ss,zoomPanSelection:Ci});let jt=class{constructor(t){this.w=t.w,this.annoCtx=t}setOrientations(t,e=null){var s,i;const a=this.w;if(t.label.orientation==="vertical"){const o=e!==null?e:0,r=a.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${o}']`);if(r!==null){const n=r.getBBox();r.setAttribute("x",String(parseFloat((s=r.getAttribute("x"))!=null?s:"0")-n.height+4));const l=t.label.position==="top"?n.width:-n.width;r.setAttribute("y",String(parseFloat((i=r.getAttribute("y"))!=null?i:"0")+l));const{x:c,y:h}=this.annoCtx.graphics.rotateAroundCenter(r);r.setAttribute("transform",`rotate(-90 ${c} ${h})`)}}}addBackgroundToAnno(t,e){const s=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;const i=s.dom.baseEl.querySelector(".apexcharts-grid");if(!i)return null;const a=i.getBoundingClientRect(),o=i.getBBox(),r=a.width/o.width||1,n=t.getBoundingClientRect();let{left:l,right:c,top:h,bottom:d}=e.label.style.padding;e.label.orientation==="vertical"&&([h,d,l,c]=[l,c,h,d]);const f=(n.left-a.left)/r-l,p=(n.top-a.top)/r-h,g=this.annoCtx.graphics.drawRect(f-s.globals.barPadForNumericAxis,p,n.width/r+l+c,n.height/r+h+d,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}annotationsBackground(){const t=this.w,e=(s,i,a)=>{const o=t.dom.baseEl.querySelector(`.apexcharts-${a}-annotations .apexcharts-${a}-annotation-label[rel='${i}']`);if(o){const r=o.parentNode,n=this.addBackgroundToAnno(o,s);if(n){r==null||r.insertBefore(n.node,o);const l=o.getAttribute("x");l!==null&&pt(n,parseFloat(l),t),s.label.mouseEnter&&n.node.addEventListener("mouseenter",s.label.mouseEnter.bind(this,s)),s.label.mouseLeave&&n.node.addEventListener("mouseleave",s.label.mouseLeave.bind(this,s)),s.label.click&&n.node.addEventListener("click",s.label.click.bind(this,s))}}};t.config.annotations.xaxis.forEach((s,i)=>e(s,i,"xaxis")),t.config.annotations.yaxis.forEach((s,i)=>e(s,i,"yaxis")),t.config.annotations.points.forEach((s,i)=>e(s,i,"point"))}getY1Y2(t,e){var s,i;const a=this.w,o=t==="y1"?e.y:e.y2;let r,n=!1;if(this.annoCtx.invertAxis){const l=a.config.xaxis.convertedCatToNumeric?a.labelData.categoryLabels:a.labelData.labels,c=l.indexOf(o),h=a.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${c+1})`);r=h?parseFloat((s=h.getAttribute("y"))!=null?s:"0"):(a.layout.gridHeight/l.length-1)*(c+1)-a.globals.barHeight,e.seriesIndex!==void 0&&a.globals.barHeight&&(r-=a.globals.barHeight/2*(a.seriesData.series.length-1)-a.globals.barHeight*e.seriesIndex)}
1143else{const l=a.globals.seriesYAxisMap[e.yAxisIndex][0],c=a.config.yaxis[e.yAxisIndex].logarithmic?new et(this.w).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,o,l)/a.globals.yLogRatio[l]:(o-a.globals.minYArr[l])/(a.globals.yRange[l]/a.layout.gridHeight);r=a.layout.gridHeight-Math.min(Math.max(c,0),a.layout.gridHeight),n=c>a.layout.gridHeight||c<0,e.marker&&(e.y===void 0||e.y===null)&&(r=0),(i=a.config.yaxis[e.yAxisIndex])!=null&&i.reversed&&(r=c)}return typeof o=="string"&&o.includes("px")&&(r=parseFloat(o)),{yP:r,clipped:n}}getX1X2(t,e){const s=this.w,i=t==="x1"?e.x:e.x2,a=this.annoCtx.invertAxis?s.globals.minY:s.globals.minX,o=this.annoCtx.invertAxis?s.globals.maxY:s.globals.maxX,r=this.annoCtx.invertAxis?s.globals.yRange[0]:s.globals.xRange;let n=!1,l=this.annoCtx.inversedReversedAxis?(o-i)/(r/s.layout.gridWidth):(i-a)/(r/s.layout.gridWidth);return(s.config.xaxis.type==="category"||s.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!s.axisFlags.dataFormatXNumeric&&(s.config.chart.sparkline.enabled||(l=this.getStringX(i))),typeof i=="string"&&i.includes("px")&&(l=parseFloat(i)),i==null&&e.marker&&(l=s.layout.gridWidth),e.seriesIndex!==void 0&&s.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=s.globals.barWidth/2*(s.seriesData.series.length-1)-s.globals.barWidth*e.seriesIndex),typeof l!="number"&&(l=0,n=!0),parseFloat(l.toFixed(10))>parseFloat(s.layout.gridWidth.toFixed(10))?(l=s.layout.gridWidth,n=!0):l<0&&(l=0,n=!0),{x:l,clipped:n}}getStringX(t){var e;const s=this.w;let i=t;if(s.config.xaxis.convertedCatToNumeric&&s.labelData.categoryLabels.length){const r=String(t);t=s.labelData.categoryLabels.findIndex(n=>String(n)===r)+1}const a=s.labelData.labels.map(r=>Array.isArray(r)?r.join(" "):r).indexOf(t),o=s.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${a+1})`);return o&&(i=parseFloat((e=o.getAttribute("x"))!=null?e:"0")),i}};class Si{constructor(t){this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new jt(this.annoCtx)}addXaxisAnnotation(t,e,s){const i=this.w,a=this.helpers.getX1X2("x1",t);let o=a.x;const r=a.clipped;let n=!0,l;const c=t.label.text,h=t.strokeDashArray;if(T.isNumber(o)){if(t.x2===null||typeof t.x2>"u"){if(!r){const d=this.annoCtx.graphics.drawLine(o+t.offsetX,0+t.offsetY,o+t.offsetX,i.layout.gridHeight+t.offsetY,t.borderColor,h,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id),pt(d,o+t.offsetX,i)}}else{const d=this.helpers.getX1X2("x2",t);if(l=d.x,n=d.clipped,l<o){const p=o;o=l,l=p}const f=this.annoCtx.graphics.drawRect(o+t.offsetX,0+t.offsetY,l-o,i.layout.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,h);f.node.classList.add("apexcharts-annotation-rect"),f.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(f.node),t.id&&f.node.classList.add(t.id),pt(f,o+t.offsetX,i)}if(!(r&&n)){const d=this.annoCtx.graphics.getTextRects(c,t.label.style.fontSize),f=t.label.position==="top"?4:t.label.position==="center"?i.layout.gridHeight/2+(t.label.orientation==="vertical"?d.width/2:0):i.layout.gridHeight,p=this.annoCtx.graphics.drawText({x:o+t.label.offsetX,y:f+t.label.offsetY-(t.label.orientation==="vertical"?t.label.position==="top"?d.width/2-12:-d.width/2:0),text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});p.attr({rel:s}),e.appendChild(p.node),pt(p,o+t.label.offsetX,i),this.annoCtx.helpers.setOrientations(t,s)}}}drawXAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map((s,i)=>{this.addXaxisAnnotation(s,e.node,i)}),e}}class ki{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new jt(this.annoCtx),this.axesUtils=new bt(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(t,e,s){const i=this.w,a=t.strokeDashArray;let o=this.helpers.getY1Y2("y1",t),r=o.yP;const n=o.clipped;let l,c=!0,h=!1;const d=t.label.text;if(t.y2===null||typeof t.y2>"u"){if(!n){h=!0;const f=this.annoCtx.graphics.drawLine(0+t.offsetX,r+t.offsetY,this._getYAxisAnnotationWidth(t),r+t.offsetY,t.borderColor,a,t.borderWidth);e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}}else{if(o=this.helpers.getY1Y2("y2",t),l=o.yP,c=o.clipped,l>r){const f=r;r=l,l=f}if(!(n&&c)){h=!0;const f=this.annoCtx.graphics.drawRect(0+t.offsetX,l+t.offsetY,this._getYAxisAnnotationWidth(t),r-l,0,t.fillColor,t.opacity,1,t.borderColor,a);f.node.classList.add("apexcharts-annotation-rect"),f.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}}if(h){const f=t.label.position==="right"?i.layout.gridWidth:t.label.position==="center"?i.layout.gridWidth/2:0,p=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(l??r)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});p.attr({rel:s}),e.appendChild(p.node)}}_getYAxisAnnotationWidth(t){const e=this.w;let s=e.layout.gridWidth;return t.width.indexOf("%")>-1?s=e.layout.gridWidth*parseInt(t.width,10)/100:s=parseInt(t.width,10),s+t.offsetX}drawYAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach((s,i)=>{s.yAxisIndex=this.axesUtils.translateYAxisIndex(s.yAxisIndex),this.axesUtils.isYAxisHidden(s.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(s.yAxisIndex)||this.addYaxisAnnotation(s,e.node,i)}),e}}class Li{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new jt(this.annoCtx)}addPointAnnotation(t,e,s){const i=this.w;if(i.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)return;const a=this.helpers.getX1X2("x1",t),o=a.x,r=a.clipped,n=this.helpers.getY1Y2("y1",t),l=n.yP,c=n.clipped;if(T.isNumber(o)&&!(c||r)){const h={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radiu
vendor: 12,317 bytes, line 1143
1143s,class:`apexcharts-point-annotation-marker ${t.marker.cssClass} ${t.id?t.id:""}`};let d=this.annoCtx.graphics.drawMarker(o+t.marker.offsetX,l+t.marker.offsetY,h);e.appendChild(d.node),pt(d,o,i);const f=t.label.text?t.label.text:"",p=this.annoCtx.graphics.drawText({x:o+t.label.offsetX,y:l+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:f,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-point-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});if(p.attr({rel:s}),e.appendChild(p.node),pt(p,o,i),t.customSVG.SVG){const g=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});g.attr({transform:`translate(${o+t.customSVG.offsetX}, ${l+t.customSVG.offsetY})`}),g.node.innerHTML=t.customSVG.SVG,e.appendChild(g.node)}if(t.image.path){const g=t.image.width?t.image.width:20,u=t.image.height?t.image.height:20;d=this.annoCtx.addImage({x:o+t.image.offsetX-g/2,y:l+t.image.offsetY-u/2,width:g,height:u,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&d.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&d.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&d.node.addEventListener("click",t.click.bind(this,t))}}drawPointAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map((s,i)=>{this.addPointAnnotation(s,e.node,i)}),e}}class Di{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new R(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new jt(this),this.xAxisAnnotations=new Si(this),this.yAxisAnnotations=new ki(this),this.pointsAnnotations=new Li(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){const t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){const e=this.yAxisAnnotations.drawYAxisAnnotations(),s=this.xAxisAnnotations.drawXAxisAnnotations(),i=this.pointsAnnotations.drawPointAnnotations(),a=t.config.chart.animations.enabled,o=[e,s,i],r=[s.node,e.node,i.node],n=t.config.chart.type==="line"||t.config.chart.type==="area"||t.config.chart.type==="rangeArea",l=[n,!1,n];for(let c=0;c<3;c++)t.dom.elGraphical.add(o[c]),a&&!t.globals.resized&&!t.globals.dataChanged&&t.config.chart.type!=="scatter"&&t.config.chart.type!=="bubble"&&t.globals.dataPoints>1&&!l[c]&&r[c].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:r[c],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(e=>{this.addImage(e)})}drawTextAnnos(){this.w.config.annotations.texts.map(e=>{this.addText(e)})}addXaxisAnnotation(t,e,s){this.xAxisAnnotations.addXaxisAnnotation(t,e,s)}addYaxisAnnotation(t,e,s){this.yAxisAnnotations.addYaxisAnnotation(t,e,s)}addPointAnnotation(t,e,s){this.pointsAnnotations.addPointAnnotation(t,e,s)}addText(t){const{x:e,y:s,text:i,textAnchor:a,foreColor:o,fontSize:r,fontFamily:n,fontWeight:l,cssClass:c,backgroundColor:h,borderWidth:d,strokeDashArray:f,borderRadius:p,borderColor:g,appendTo:u=".apexcharts-svg",paddingLeft:x=4,paddingRight:b=4,paddingBottom:w=2,paddingTop:m=2}=t,y=this.w,v=this.graphics.drawText({x:e,y:s,text:i,textAnchor:a||"start",fontSize:r||"12px",fontWeight:l||"regular",fontFamily:n||y.config.chart.fontFamily,foreColor:o||y.config.chart.foreColor,cssClass:"apexcharts-text "+c?c:""}),C=y.dom.baseEl.querySelector(u);C&&C.appendChild(v.node);const D=v.bbox();if(i){const S=this.graphics.drawRect(D.x-x,D.y-m,D.width+x+b,D.height+w+m,p,h||"transparent",1,d,g,f);C.insertBefore(S.node,v.node)}}addImage(t){const e=this.w,{path:s,x:i=0,y:a=0,width:o=20,height:r=20,appendTo:n=".apexcharts-svg"}=t,l=e.dom.Paper.image(s);l.size(o,r).move(i,a);const c=e.dom.baseEl.querySelector(n);return c&&c.appendChild(l.node),l}addXaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"xaxis",contextMethod:s.addXaxisAnnotation}),s}addYaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"yaxis",contextMethod:s.addYaxisAnnotation}),s}addPointAnnotationExternal(t,e,s){return typeof this.invertAxis>"u"&&(this.invertAxis=s.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"point",contextMethod:s.addPointAnnotation}),s}addAnnotationExternal({params:t,pushToMemory:e,context:s,type:i,contextMethod:a}){const o=s,r=o.w,n=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations`),l=n.childNodes.length+1,c=new Ct,h=Object.assign({},i==="xaxis"?c.xAxisAnnotation:i==="yaxis"?c.yAxisAnnotation:c.pointAnnotation),d=T.extend(h,t);switch(i){case"xaxis":this.addXaxisAnnotation(d,n,l);break;case"yaxis":this.addYaxisAnnotation(d,n,l);break;case"point":this.addPointAnnotation(d,n,l);break}const f=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations .apexcharts-${i}-annotation-label[rel='${l}']`),p=this.helpers.addBackgroundToAnno(f,d);return p&&n.insertBefore(p.node,f),e&&r.globals.memory.methodsToExec.push({context:o,id:d.id?d.id:T.randomId(),method:a,label:"addAnnotation",params:t}),s}clearAnnotations(t){const e=t.w,s=e.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");for(let i=e.globals.memory.methodsToExec.length-1;i>=0;i--)(e.globals.memory.methodsToExec[i].label==="addText"||e.globals.memory.methodsToExec[i].label==="addAnnotation")&&e.globals.memory.methodsToExec.splice(i,1);Array.prototype.forEach.call(s,i=>{for(;i.firstChild;)i.removeChild(i.firstChild)})}removeAnnotation(t,e){const s=t.w,i=s.dom.baseEl.querySelectorAll(`.${e}`);i&&(s.globals.memory.methodsToExec.map((a,o)=>{a.id===e&&s.globals.memory.methodsToExec.splice(o,1)}),Object.keys(s.config.annotations).forEach(a=>{const o=s.config.annotations[a];Array.isArray(o)&&(s.config.annotations[a]=o.filter(r=>r.id!==e))}),Array.prototype.forEach.call(i,a=>{a.parentElement.removeChild(a)}))}}dt.registerFeatures({annotations:Di});class Mi{constructor(t,e){this.w=t,this.ctx=e,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._tooltipDismissed=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._lastPointerDownAt=0}init(){const e=this.w.dom.Paper.node;e&&(e.setAttribute("tabindex","0"),e.addEventListener("focus",this._onFocus),e.addEventListener("blur",this._onBlur),e.addEventListener("mousedown",this._onPointerDown,{capture:!0}),e.addEventListener("pointerdown",this._onPointerDown,{capture:!0}),e.addEventListener("touchstart",this._onPointerDown,{capture:!0,passive:!0}),e.addEventListener("keydown",this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener("legendClick",this._onLegendClick))}destroy(){const t=this.w,e=t.dom.Paper&&t.dom.Paper.node;e&&(e.removeEventListener("focus",this._onFocus),e.removeEventListener("blur",this._onBlur),e.removeEventListener("keydown",this._onKeyDown),e.removeEventListener("mousedown",this._onPointerDown,{capture:!0}),e.removeEventListener("pointerdown",this._onPointerDown,{capture:!0}),e.removeEventListener("touchstart",this._onPointerDown,{capture:!0}),this.ctx.events.removeEventListener("legendClick",this._onLegendClick))}_onPointerDown(){this._lastPointerDownAt=Date.now()}handleKey(t){}_onFocus(){this._isNavEnabled()&&(Date.now()-this._lastPointerDownAt<100||(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint()))}_onBlur(){this.active=!1,this._tooltipDismissed=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(t){var e,s,i;if(!(!this._isNavEnabled()||!this.active)){if(t.shiftKey&&(t.key==="ArrowRight"||t.key==="ArrowLeft")&&this._canPan()){t.preventDefault(),this._panBy(t.key==="ArrowRight"?1:-1);return}switch(t.key){case"ArrowRight":t.preventDefault(),this._move(0,1);break;case"ArrowLeft":t.preventDefault(),this._move(0,-1);break;case"ArrowUp":t.preventDefault(),this._move(-1,0);break;case"ArrowDown":t.preventDefault(),this._move(1,0);break;case"Home":t.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case"End":t.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case"Enter":case" ":t.preventDefault(),this._fireClick();break;case"+":case"=":this._canZoom()&&(t.preventDefault(),(e=this.ctx.toolbar)==null||e.handleZoomIn(),this._announce("Zoomed in"));break;case"-":case"_":this._canZoom()&&(t.preventDefault(),(s=this.ctx.toolbar)==null||s.handleZoomOut(),this._announce("Zoomed out"));break;case"0":this._canZoom()&&this.w.interact.zoomed&&(t.preventDefault(),(i=this.ctx.toolbar)==null||i.handleZoomReset(),this._announce("Zoom reset"));break;case"Escape":t.preventDefault(),this._tooltipDismissed?(this.active=!1,this._tooltipDismissed=!1,this._hideFocus()):(this._tooltipDismissed=!0,this._hideFocus());break}}}_canZoom(){const t=this.w;return!!(t.globals.axisCharts&&t.config.chart.zoom&&t.config.chart.zoom.enabled)}_canPan(){return this._canZoom()}_panBy(t){const e=this.w,s=this.ctx.toolbar;if(!s)return;const i=Number(e.globals.minX),a=Number(e.globals.maxX);if(!isFinite(i)||!isFinite(a)||i===a)return;const r=(a-i)*.1*t;s.zoomUpdateOptions(i+r,a+r),this._announce(t>0?"Panned right":"Panned left")}_move(t,e){const s=this.w,i=s.config.chart.accessibility.keyboard.navigation.wrapAround;if(t!==0){const a=this.w.globals.tooltip;if(a&&a.tConfig&&a.tConfig.shared){const c=this.dataPointIndex;if(a.tooltipUtil&&a.tooltipUtil.isXoverlap(c)&&a.tooltipUtil.isInitialSeriesSameLen())return}const o=this._getSeriesCount();let r=this.seriesIndex+t,n=0;for(;n<o&&(r<0&&(r=i?o-1:0),r>=o&&(r=i?0:o-1),!!s.globals.collapsedSeriesIndices.includes(r));)r+=t,n++;this.seriesIndex=r;const l=this._getDataPointCount(r);this.dataPointIndex>=l&&(this.dataPointIndex=l-1)}if(e!==0){const a=this._getDataPointCount(this.seriesIndex);let o=this.dataPointIndex+e;o<0&&(o=i?a-1:0),o>=a&&(o=i?0:a-1),this.dataPointIndex=o,e>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(e)}this._showCurrentPoint()}_skipNullForward(){const t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e);let i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&t.seriesData.series[e][i]===null;)i=(i+1)%s,a++;this.dataPointIndex=i}}_skipNullBackward(){const t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e);let i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&t.seriesData.series[e][i]===null;)i=(i-1+s)%s,a++;this.dataPointIndex=i}}_showCurrentPoint(){const{seriesIndex:t,dataPointIndex:e}=this,s=this.w,i=s.globals.tooltip;!i||!i.ttItems||(s.interact.capturedSeriesIndex=t,s.interact.capturedDataPointIndex=e,this._applyFocusClass(t,e),this._showTooltip(t,e,i))}_hideFocus(){const t=this.w,e=t.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!e)return;e.marker&&e.marker.resetPointsSize(),this._enlargedScatterMarker=null;const s=e.getElTooltip();s&&(s.classList.remove("apexcharts-active"),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&s.setAttribute("aria-hidden","true")),t.dom.baseEl.classList.remove("apexcharts-tooltip-active");const i=e.getElXCrosshairs();i&&i.classList.remove("apexcharts-active")}_showTooltip(t,e,s){const i=this.w,a=i.config.chart.type,o=s.getElTooltip();if(!o)return;const r=s.getCachedDimensions();s.tooltipRect={x:0,y:0,ttWidth:r.ttWidth||0,ttHeight:r.ttHeight||0},this._setSyntheticEvent(t,e,s),i.dom.baseEl.classList.add("apexcharts-tooltip-active"),o.classList.add("apexcharts-active"),i.c
1143onfig.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&o.removeAttribute("aria-hidden"),a==="pie"||a==="donut"||a==="polarArea"?this._showTooltipNonAxis(t,e,s,o):a==="radialBar"?this._showTooltipRadialBar(t,e,s,o):a==="heatmap"||a==="treemap"?this._showTooltipHeatTree(t,e,s,o,a):a==="bar"||a==="candlestick"||a==="boxPlot"||a==="violin"||a==="rangeBar"?this._showTooltipBar(t,e,s):this._showTooltipAxisLine(t,e,s)}_setSyntheticEvent(t,e,s){const i=this.w,a=i.config.chart.type;let o=0,r=0;const n=this._getFocusableElement(t,e);if(n){const l=n.getBoundingClientRect();o=l.left+l.width/2,r=l.top+l.height/2}else if(i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){const l=i.globals.pointsArray[t][e],c=s.getElGrid&&s.getElGrid();if(c){const h=c.getBoundingClientRect();o=h.left+(l[0]||0),r=h.top+(l[1]||0)}}else{const l=i.dom.Paper&&i.dom.Paper.node;if(l){const c=l.getBoundingClientRect();o=c.left+c.width/2,r=c.top+c.height/2}}if((a==="line"||a==="area"||a==="rangeArea"||a==="scatter"||a==="bubble"||a==="radar")&&i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){const l=i.globals.pointsArray[t][e],c=s.getElGrid&&s.getElGrid();if(c){const h=c.getBoundingClientRect();o=h.left+(l[0]||0),r=h.top+(l[1]||0)}}s.e={type:"mousemove",clientX:o,clientY:r}}_showTooltipBar(t,e,s){var i,a,o,r;const n=this.w,l=s.tConfig.shared&&(s.tooltipUtil.isXoverlap(e)||n.globals.isBarHorizontal)&&s.tooltipUtil.isInitialSeriesSameLen(),c=(r=(o=(a=(i=n.rangeData.seriesRange)==null?void 0:i[t])==null?void 0:a[e])==null?void 0:o.y)==null?void 0:r[0];s.tooltipLabels.drawSeriesTexts(G($($({ttItems:s.ttItems,i:t,j:e},(c==null?void 0:c.y1)!==void 0&&{y1:c.y1}),(c==null?void 0:c.y2)!==void 0&&{y2:c.y2}),{shared:l}));const h=`.apexcharts-series[data\\:realIndex='${t}']`,d=n.dom.Paper.findOne(`${h} path[j='${e}'], ${h} circle[j='${e}'], ${h} rect[j='${e}']`);if(d&&(this._leaveHoveredBar(),new R(this.w,this.ctx).pathMouseEnter(d,null),this._hoveredBarEl=d),n.globals.isBarHorizontal){const f=d&&d.node;if(f){const p=n.dom.elWrap.getBoundingClientRect(),g=f.getBoundingClientRect(),u=g.left-p.left,x=g.top-p.top,b=g.height,w=g.width,m=s.tooltipRect.ttWidth||0,y=s.tooltipRect.ttHeight||0,v=x+b/2-y/2;let C=u+w;const D=s.xyRatios&&s.xyRatios.baseLineInvertedY!=null?s.xyRatios.baseLineInvertedY:p.width/2;u<D&&(C=u-m);const S=s.getElTooltip();S&&(S.style.left=C+"px",S.style.top=v+"px")}}else s.tooltipPosition.moveStickyTooltipOverBars(e,t)}_showTooltipAxisLine(t,e,s){const i=this.w,a=i.config.chart.type,r=s.tConfig.shared&&s.tooltipUtil.isXoverlap(e)&&s.tooltipUtil.isInitialSeriesSameLen();s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:r});const n=a==="scatter"||a==="bubble",l=i.globals.markers.largestSize>0;n?this._showScatterBubblePoint(t,e,s):l?r?s.marker.enlargePoints(e):s.tooltipPosition.moveDynamicPointOnHover(e,t):r?s.tooltipPosition.moveDynamicPointsOnHover(e):s.tooltipPosition.moveDynamicPointOnHover(e,t)}_showScatterBubblePoint(t,e,s){const i=this.w.dom.baseEl;this._enlargedScatterMarker&&(s.marker.oldPointSize(this._enlargedScatterMarker),this._enlargedScatterMarker=null);const a=i.querySelector(`.apexcharts-series[data\\:realIndex='${t}']`);if(!a)return;const o=a.querySelector(`.apexcharts-marker[rel='${e}']`);o&&(s.marker.enlargeCurrentPoint(e,o),this._enlargedScatterMarker=o)}_showTooltipNonAxis(t,e,s,i){var a,o;const r=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,shared:!1});const n=i.getBoundingClientRect(),l=n.width||s.tooltipRect.ttWidth||0,c=n.height||s.tooltipRect.ttHeight||0,h=r.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${e}']`);if(h){const d=parseFloat((a=h.getAttribute("data:cx"))!=null?a:""),f=parseFloat((o=h.getAttribute("data:cy"))!=null?o:"");if(!isNaN(d)&&!isNaN(f)){const p=r.dom.Paper.node.getBoundingClientRect(),g=r.dom.elWrap.getBoundingClientRect(),u=p.left-g.left,x=p.top-g.top;i.style.left=u+d-l/2+"px",i.style.top=x+f-c-10+"px"}}}_showTooltipRadialBar(t,e,s,i){var a;const o=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,shared:!1});
1143const{ttWidth:r=0,ttHeight:n=0}=s.getCachedDimensions(),l=o.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`);if(l){const c=parseFloat((a=l.getAttribute("data:angle"))!=null?a:"")||0,d=(o.config.plotOptions.radialBar.startAngle||0)+c/2,f=o.layout.gridWidth/2,p=o.layout.gridHeight/2,g=o.globals.radialSize||Math.min(o.layout.gridWidth,o.layout.gridHeight)/2,u=o.seriesData.series.length,x=g/Math.max(u,1),b=g-t*x,w=b-x,m=(b+w)/2,y=T.polarToCartesian(f,p,m,d),v=y.x+(o.layout.translateX||0),C=y.y+(o.layout.translateY||0);i.style.left=v-r/2+"px",i.style.top=C-n-10+"px"}}_showTooltipHeatTree(t,e,s,i,a){var o,r;const n=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:!1});const l=i.getBoundingClientRect(),c=l.width||s.tooltipRect.ttWidth||0,h=l.height||s.tooltipRect.ttHeight||0,d=a==="heatmap"?"apexcharts-heatmap-rect":"apexcharts-treemap-rect",f=n.dom.baseEl.querySelector(`.${d}[i='${t}'][j='${e}']`);if(f){const p=n.dom.elWrap.getBoundingClientRect(),g=f.getBoundingClientRect(),u=g.left-p.left,x=g.top-p.top,b=g.width,w=g.height,m=parseFloat((o=f.getAttribute("cx"))!=null?o:""),y=parseFloat((r=f.getAttribute("width"))!=null?r:"");s.tooltipPosition.moveXCrosshairs(m+y/2);let v=u+b+c/2;const C=x+w/2-h/2;u+b>n.layout.gridWidth/2&&(v=u-c/2),i.style.left=v+"px",i.style.top=C+"px"}}_applyFocusClass(t,e){this._removeFocusClass();const s=this._getFocusableElement(t,e);if(s){s.classList.add("apexcharts-keyboard-focused"),s.setAttribute("role","img");const i=this._buildPointLabel(t,e);i&&s.setAttribute("aria-label",i),this._focusedEl=s}}_removeFocusClass(){this._focusedEl&&(this._focusedEl.classList.remove("apexcharts-keyboard-focused"),this._focusedEl.removeAttribute("role"),this._focusedEl.removeAttribute("aria-label"),this._focusedEl=null)}_buildPointLabel(t,e){var s,i,a,o,r,n,l,c;const h=this.w,d=h.config.chart.type,f=h.seriesData.seriesNames||[],p=h.seriesData.series||[];if(d==="pie"||d==="donut"||d==="polarArea"){const C=(i=((s=h.labelData)==null?void 0:s.labels)&&h.labelData.labels[e])!=null?i:"",D=Array.isArray(p)?p[e]:"";return C?`${C}: ${D}`:`${D}`}if(d==="radialBar"){const C=f[t]||`Series ${t+1}`,D=Array.isArray(p)?p[t]:"";return`${C}: ${D}`}const g=f[t]||`Series ${t+1}`,x=(Array.isArray(p[t])?p[t]:[])[e];let b=x==null?"":String(x);const w=(o=(a=h.formatters)==null?void 0:a.yLabelFormatters)==null?void 0:o[t];if(typeof w=="function")try{b=w(x,{seriesIndex:t,dataPointIndex:e,w:h})}catch{}let m="";const y=(r=h.labelData)==null?void 0:r.categoryLabels,v=(l=(n=h.seriesData)==null?void 0:n.seriesX)==null?void 0:l[t];if(Array.isArray(y)&&y[e]!=null)m=String(y[e]);else if(Array.isArray(v)&&v[e]!=null){const C=(c=h.formatters)==null?void 0:c.xLabelFormatter;if(typeof C=="function")try{m=String(C(v[e],{seriesIndex:t,dataPointIndex:e,w:h}))}catch{m=String(v[e])}else m=String(v[e])}return m?`${g}: ${b}, ${m}`:`${g}: ${b}`}_leaveHoveredBar(){this._hoveredBarEl&&(new R(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),this._hoveredBarEl=null)}_getFocusableElement(t,e){const s=this.w,i=s.config.chart.type,a=s.dom.baseEl;return i==="pie"||i==="donut"||i==="polarArea"?a.querySelector(`.apexcharts-pie-area[j='${e}']`):i==="heatmap"?a.querySelector(`.apexcharts-heatmap-rect[i='${t}'][j='${e}']`):i==="treemap"?a.querySelector(`.apexcharts-treemap-rect[i='${t}'][j='${e}']`):i==="radialBar"?a.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`):i==="bar"||i==="candlestick"||i==="boxPlot"||i==="violin"||i==="rangeBar"?a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`):a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker[rel='${e}']`)||null}_fireClick(){const e=this.w.globals.tooltip;if(!e)return;const s={type:"mouseup",clientX:0,clientY:0};e.markerClick(s,this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){const t=this.w.config.chart.accessibility;return t.enabled&&t.keyboard.enabled&&t.keyboard.navigation.enabled}_getSeriesCount(){const t=this.w,e=t.config.chart.type;return e==="pie"||e==="donut"||e==="polarArea"?1:t.seriesData.series.length}_getDataPointCount(t){const e=this.w,s=e.config.chart.type;if(s==="pie"||s==="donut"||s==="polarArea")return e.seriesData.series.length;const i=e.seriesData.series;return i[t]&&Array.isArray(i[t])?i[t].length:0}_clampCursor(){const t=this._getSeriesCount();this.seriesIndex>=t&&(this.seriesIndex=t-1),this.seriesIndex<0&&(this.seriesIndex=0);const e=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=e&&(this.dataPointIndex=e-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){const t=this.w,e=t.globals,s=this.seriesIndex;if(!t.interact.zoomed)return;const i=t.seriesData.seriesX&&t.seriesData.seriesX[s];if(!i||!i.length)return;const a=e.minX,o=e.maxX;if(a===void 0||o===void 0)return;const r=i[this.dataPointIndex];if(r>=a&&r<=o)return;const n=i.length;for(let l=0;l<n;l++)if(i[l]>=a&&i[l]<=o){this.dataPointIndex=l;return}}_snapToVisibleRangeInDirection(t){const e=this.w,s=e.globals,i=this.seriesIndex,a=e.seriesData.seriesX&&e.seriesData.seriesX[i];if(!a||!a.length)return;const o=s.minX,r=s.maxX;if(o===void 0||r===void 0)return;const n=a.length;if(t>=0){for(let l=0;l<n;l++)if(a[l]>=o&&a[l]<=r){this.dataPointIndex=l;return}}else for(let l=n-1;l>=0;
1143l--)if(a[l]>=o&&a[l]<=r){this.dataPointIndex=l;return}}_isDataPointVisible(t,e){const s=this.w,i=s.globals;if(!s.interact.zoomed)return!0;const a=s.seriesData.seriesX&&s.seriesData.seriesX[t];if(!a)return!0;const o=a[e];return o===void 0?!0:o>=i.minX&&o<=i.maxX}_announce(t){const e=this.w;if(!e.config.chart.accessibility.announcements.enabled)return;const s=e.dom.baseEl;if(!s)return;const i=s.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=t},0))}}dt.registerFeatures({keyboardNavigation:Mi});const Ti=new Set(["bar","funnel","pyramid"]),Pi=new Set(["pie","donut","polarArea","radialBar","gauge"]);function Lt(A){return Ti.has(A)?"bar":Pi.has(A)?"radial":null}class Ei{constructor(t,e){this.w=t,this.ctx=e,this._snapshot=null}canMorphTypes(t,e){if(t===e)return!1;const s=Lt(t),i=Lt(e);return!(!s||!i)}isCompatibleSeriesShape(t,e,s){if(!Array.isArray(s)||s.length===0)return!1;const i=Lt(t),a=Lt(e);return a==="radial"?s.every(o=>typeof o=="number")?!0:s.length===1&&s[0]&&typeof s[0]=="object"&&Array.isArray(s[0].data):a==="bar"?s.every(o=>o&&typeof o=="object"&&Array.isArray(o.data)):i!==null&&a!==null}captureBeforeDestroy({fromType:t,toType:e,newSeries:s}){if(this._snapshot=null,!W.isBrowser())return!1;const i=this.w.config.chart.animations;if(!i||i.enabled===!1||i.chartTypeMorph&&i.chartTypeMorph.enabled===!1||i.respectReducedMotion&&$e()||!this.canMorphTypes(t,e)||!this.isCompatibleSeriesShape(t,e,s))return!1;const a=this._captureFromDOM(t);if(!a.length)return!1;const o=this._buildMapping(a,t,e,s);return o.size===0?!1:(this._snapshot={fromType:t,toType:e,mapping:o,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}},this.w.globals.previousPaths=[],!0)}_captureFromDOM(t){var e;const s=(e=this.w.globals.dom)==null?void 0:e.baseEl;if(!s)return[];const i=[],a=Lt(t);if(a==="bar")s.querySelectorAll(".apexcharts-bar-series .apexcharts-series").forEach(r=>{var n;const l=parseInt((n=r.getAttribute("data:realIndex"))!=null?n:"0",10);r.querySelectorAll("path[pathTo]").forEach((h,d)=>{const f=h.getAttribute("pathTo")||h.getAttribute("d");f&&i.push({realIndex:l,j:d,d:f,fill:h.getAttribute("fill")})})});else if(a==="radial")if(t==="radialBar"||t==="gauge"){const o=this.w.layout.gridWidth/2,r=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;s.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(l=>{var c;const h=l.parentElement,d=parseInt((c=h==null?void 0:h.getAttribute("data:realIndex"))!=null?c:"0",10),f=l.getAttribute("d");if(!f)return;const p=parseFloat(l.getAttribute("stroke-width")||"0"),g=p>1&&this._radialArcToFilledSegment(f,p,o,r)||f;i.push({realIndex:d,j:0,d:g,fill:l.getAttribute("stroke")})})}else s.querySelectorAll(".apexcharts-pie-series .apexcharts-pie-area").forEach((r,n)=>{const l=r.getAttribute("d");l&&i.push({realIndex:n,j:0,d:l,fill:r.getAttribute("fill")})});return i}_radialArcToFilledSegment(t,e,s,i){const a=t.match(/M\s*(-?[\d.]+)\s+(-?[\d.]+)\s+A\s*(-?[\d.]+)\s+(?:-?[\d.]+)\s+(?:-?[\d.]+)\s+(\d)\s+(\d)\s+(-?[\d.]+)\s+(-?[\d.]+)/);if(!a)return null;const o=parseFloat(a[1]),r=parseFloat(a[2]),n=parseFloat(a[3]),l=parseInt(a[4],10),c=parseInt(a[5],10),h=parseFloat(a[6]),d=parseFloat(a[7]);if(!isFinite(n)||n<=0)return null;const f=e/2,p=n+f,g=Math.max(0,n-f),u=(v,C,D)=>{const S=v-s,k=C-i,M=Math.sqrt(S*S+k*k);if(M===0)return{x:s,y:i};const L=D/M;return{x:s+S*L,y:i+k*L}},x=u(o,r,p),b=u(h,d,p),w=u(o,r,g),m=u(h,d,g),y=c?0:1;return`M ${x.x} ${x.y} A ${p} ${p} 0 ${l} ${c} ${b.x} ${b.y} L ${m.x} ${m.y} A ${g} ${g} 0 ${l} ${y} ${w.x} ${w.y} Z`}buildRingSegmentPath(t,e,s,i,a,o){const r=i/2,n=s+r,l=Math.max(0,s-r),c=(a-90)*Math.PI/180,h=(o-90)*Math.PI/180,d={x:t+n*Math.cos(c),y:e+n*Math.sin(c)},f={x:t+n*Math.cos(h),y:e+n*Math.sin(h)},p={x:t+l*Math.cos(c),y:e+l*Math.sin(c)},g={x:t+l*Math.cos(h),y:e+l*Math.sin(h)},u=o>a?1:0,x=Math.abs(o-a)>180?1:0;return`M ${d.x} ${d.y} A ${n} ${n} 0 ${x} ${u} ${f.x} ${f.y} L ${g.x} ${g.y} A ${l} ${l} 0 ${x} ${1-u} ${p.x} ${p.y} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(t,e,s,i){const a=new Map,o=Lt(s),r=t.slice().sort((n,l)=>n.realIndex-l.realIndex||n.j-l.j);if(o==="radial")return r.forEach((n,l)=>{a.set(`${l}:0`,{d:n.d,fill:n.fill})}),a;if(o==="bar"){const n=[];
1143return(Array.isArray(i)?i:[]).forEach((c,h)=>{const d=c&&Array.isArray(c.data)?c.data:[];for(let f=0;f<d.length;f++)n.push({realIndex:h,j:f})}),r.forEach((c,h)=>{const d=n[h];d&&a.set(`${d.realIndex}:${d.j}`,{d:c.d,fill:c.fill})}),a}return a}isActive(){return this._snapshot!==null}getInitialPathFor(t,e){if(!this._snapshot)return null;const s=this._snapshot.mapping.get(`${t}:${e}`);if(!s)return null;const i=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),a=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return i===0&&a===0?s.d:this._translatePathD(s.d,i,a)}_translatePathD(t,e,s){return e===0&&s===0?t:Ot(t).map(a=>{const o=a[0];return o==="Z"?"Z":o==="M"||o==="L"||o==="T"?`${o} ${a[1]+e} ${a[2]+s}`:o==="H"?`${o} ${a[1]+e}`:o==="V"?`${o} ${a[1]+s}`:o==="C"?`${o} ${a[1]+e} ${a[2]+s} ${a[3]+e} ${a[4]+s} ${a[5]+e} ${a[6]+s}`:o==="S"||o==="Q"?`${o} ${a[1]+e} ${a[2]+s} ${a[3]+e} ${a[4]+s}`:o==="A"?`${o} ${a[1]} ${a[2]} ${a[3]} ${a[4]} ${a[5]} ${a[6]+e} ${a[7]+s}`:a.join(" ")}).join(" ")}getInitialFillFor(t,e){if(!this._snapshot)return null;const s=this._snapshot.mapping.get(`${t}:${e}`);return s?s.fill:null}getSpeed(){const t=this.w.config.chart.animations;return t.chartTypeMorph&&t.chartTypeMorph.speed||t.speed||600}applyChromeFade(){var t;if(!this._snapshot||!W.isBrowser())return;const e=(t=this.w.globals.dom)==null?void 0:t.baseEl;if(!e)return;const s=this.getSpeed();[".apexcharts-xaxis",".apexcharts-yaxis",".apexcharts-grid",".apexcharts-gridlines-horizontal",".apexcharts-gridlines-vertical",".apexcharts-legend",".apexcharts-title-text",".apexcharts-subtitle-text"].forEach(a=>{e.querySelectorAll(a).forEach(o=>{o.style&&(o.style.opacity="0",o.style.transition=`opacity ${s}ms ease-out`,B.requestAnimationFrame(()=>{o.style.opacity="1"}),setTimeout(()=>{o.style.transition="",o.style.opacity=""},s+80))})}),setTimeout(()=>this.cleanup(),s+100)}cleanup(){this._snapshot=null}}dt.registerFeatures({morphTypeChange:Ei});const Dt="http://www.w3.org/1999/xhtml";class _i{constructor(t,e,s){this.w=t,this.ctx=e,this.drilldown=s}render(t){if(!W.isBrowser())return;const e=this.w,s=e.dom.elWrap;if(!s)return;const i=s.querySelector(".apexcharts-breadcrumb");i&&i.parentNode&&i.parentNode.removeChild(i);const a=e.config.drilldown&&e.config.drilldown.breadcrumb;if(!a||a.show===!1||this.drilldown.depth===0)return;const o=B.createElementNS(Dt,"nav");o.setAttribute("class","apexcharts-breadcrumb"),o.setAttribute("aria-label","Drilldown breadcrumb"),this._position(o,a);const r=a.separator!=null?a.separator:" / ";t.forEach((n,l)=>{if(l>0){const d=B.createElementNS(Dt,"span");d.setAttribute("class","apexcharts-breadcrumb-separator"),d.setAttribute("aria-hidden","true"),d.textContent=r,o.appendChild(d)}const c=this._label(n,l);if(l===t.length-1){const d=B.createElementNS(Dt,"span");d.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),d.setAttribute("aria-current","page"),d.textContent=c,o.appendChild(d)}else{const d=B.createElementNS(Dt,"button");if(d.setAttribute("type","button"),d.setAttribute("class","apexcharts-breadcrumb-item"),l===0){const p=B.createElementNS(Dt,"span");p.setAttribute("class","apexcharts-breadcrumb-arrow"),p.setAttribute("aria-hidden","true"),p.textContent="â",d.appendChild(p)}const f=B.createElementNS(Dt,"span");f.setAttribute("class","apexcharts-breadcrumb-label"),f.textContent=c,d.appendChild(f),d.addEventListener("click",()=>this.drilldown.drillToLevel(l)),o.appendChild(d)}}),s.appendChild(o)}_label(t,e){const s=this.w.config.drilldown.breadcrumb;let i;if(e===0)i=s.rootLabel!=null?s.rootLabel:"All";else{const a=(this.w.config.drilldown.series||[]).find(o=>o&&o.id===t);i=a&&a.name||String(t)}return typeof s.formatter=="function"?s.formatter(i,{index:e,depth:this.drilldown.depth}):i}_position(t,e){const s=e.offsetX||0,i=e.offsetY||0;t.style.position="absolute",t.style.top=i+"px",e.position==="top-right"?t.style.right=-s+3+"px":t.style.left=s+"px"}}const _e=32;class Fi{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.rootSnapshot=null,this._wired=!1,this.breadcrumb=new _i(t,e,this),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this.init()}init(){const t=this.w;!t.config.drilldown||!t.config.drilldown.enabled||this._wired||(this._wired=!0,this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender))}get path(){return["root",...this.stack.map(t=>
1143t.id)]}get depth(){return this.stack.length}drillDown(t,e,s){const i=this._resolveChild(t);return i?this._drillInto(i,e,s):typeof this.w.config.drilldown.onDrillDown=="function"?this._drillDownAsync(t,e,s):(console.warn(`ApexCharts: drilldown id "${t}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(t){const e=this.stack.length;if(t<0||t>=e)return Promise.resolve(this.ctx);const s=this.path[this.path.length-1],i=t===0?this.rootSnapshot:this.stack[t].restore;this.stack=this.stack.slice(0,t);const a=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(i),"up",{from:s,to:a})}_resolveChild(t){const e=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(e)&&e.find(s=>s&&s.id===t)||null}_drillInto(t,e,s){if(this.stack.length>=_e)return console.warn(`ApexCharts: drilldown max depth (${_e}) reached.`),Promise.resolve(this.ctx);this.rootSnapshot||(this.rootSnapshot=this._snapshot());const i=this.path[this.path.length-1];return this.stack.push({id:t.id,name:t.name,restore:this._snapshot()}),this._apply(this._viewFromChild(t),"down",{from:i,to:t.id,point:e,seriesIndex:s&&s.seriesIndex,dataPointIndex:s&&s.dataPointIndex})}_drillDownAsync(t,e,s){const i=this.w.config.drilldown.onDrillDown;let a;try{a=i({point:e,seriesIndex:s&&s.seriesIndex,dataPointIndex:s&&s.dataPointIndex})}catch(o){return this._fire("drillDownError",{id:t,error:o}),Promise.resolve(this.ctx)}return Promise.resolve(a).then(o=>!o||!o.data?this.ctx:this._drillInto(o,e,s),o=>(this._fire("drillDownError",{id:t,error:o}),this.ctx))}_snapshot(){const t=this.w.config,e=this._overrideFields(),s={series:T.clone(t.series)};return Array.isArray(t.labels)&&t.labels.length&&(s.labels=T.clone(t.labels)),s.chart={type:t.chart.type,stacked:t.chart.stacked},e.has("xaxis")&&(s.xaxis=T.clone(t.xaxis)),e.has("yaxis")&&(s.yaxis=T.clone(t.yaxis)),e.has("colors")&&(s.colors=t.colors?T.clone(t.colors):void 0),e.has("plotOptions")&&(s.plotOptions=T.clone(t.plotOptions)),e.has("fill")&&(s.fill=T.clone(t.fill)),e.has("legend")&&(s.legend=T.clone(t.legend)),s}_overrideFields(){const t=new Set,e=this.w.config.drilldown&&this.w.config.drilldown.series||[];for(const s of e)s&&(s.xaxis&&t.add("xaxis"),s.yaxis&&t.add("yaxis"),s.colors&&t.add("colors"),s.plotOptions&&t.add("plotOptions"),s.fill&&t.add("fill"),s.legend&&t.add("legend"));return t}_viewFromChild(t){const e={};Array.isArray(t.series)?e.series=t.series:e.series=[{name:t.name||"",data:t.data}];const s={};return t.chart&&t.chart.type&&(s.type=t.chart.type),t.chart&&t.chart.stacked!=null&&(s.stacked=t.chart.stacked),Object.keys(s).length&&(e.chart=s),t.xaxis&&(e.xaxis=t.xaxis),t.yaxis&&(e.yaxis=t.yaxis),t.colors&&(e.colors=t.colors),t.plotOptions&&(e.plotOptions=t.plotOptions),t.fill&&(e.fill=t.fill),t.legend&&(e.legend=t.legend),e}_viewFromSnapshot(t){const e={series:t.series,chart:t.chart};return t.labels&&t.labels.length&&(e.labels=t.labels),t.xaxis&&(e.xaxis=t.xaxis),t.yaxis&&(e.yaxis=t.yaxis),t.colors&&(e.colors=t.colors),t.plotOptions&&(e.plotOptions=t.plotOptions),t.fill&&(e.fill=t.fill),t.legend&&(e.legend=t.legend),e}_apply(t,e,s){const i=this.w;i.interact.selectedDataPoints=[],i.globals.collapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeries=[],i.globals.ancillaryCollapsedSeriesIndices=[],i.globals.allSeriesCollapsed=!1,i.globals.risingSeries=[];const a=(!i.config.drilldown.animation||i.config.drilldown.animation.enabled!==!1)&&i.config.chart.animations.enabled!==!1;e==="down"&&this._fire("drillDownStart",s);const o=n=>this.ctx.updateOptions(t,!1,n,!1,!1),r=()=>(this._fire(e==="down"?"drillDownEnd":"drillUp",s),this.ctx);if(a&&this._zoomEnabled()){const n=this._triggerOrigin(s);if(n)return this._zoomDrill(n,e,()=>o(!1)).then(r)}return o(a).then(r)}_zoomEnabled(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation;return!!(t&&t.zoomFromPoint)}_svgNode(){const t=this.w.dom&&this.w.dom.Paper;return t&&t.node?t.node:null}_markGroup(){const t=this._svgNode();return!t||typeof t.querySelector!="function"?null:t.querySelector(".apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap")}_triggerOrigin(t){if(!W.isBrowser())return null;const e=this._svgNode(),s=this._markGroup();if(!e||!s||typeof s.animate!="function"||typeof e.getBoundingClientRect!="function")return null;const i=e.getBoundingClientRect();let a=null;if(t&&t.seriesIndex!=null&&t.dataPointIndex!=null&&this.w.dom.baseEl&&(a=this.w.dom.baseEl.querySelector(`[index="${t.seriesIndex}"][j="${t.dataPointIndex}"]`)),a&&typeof a.getBoundingClientRect=="function"){const r=a.getBoundingClientRect();
1143return{x:r.left+r.width/2-i.left,y:r.top+r.height/2-i.top}}const o=s.getBoundingClientRect();return{x:o.left+o.width/2-i.left,y:o.top+o.height/2-i.top}}_zoomDrill(t,e,s){return fs(this,null,function*(){const i=this._zoomDuration(),a=e==="down",o=Math.round(i*.55),r=a?"scale(1.03)":"scale(0.97)",n=a?"scaleX(0.55) scaleY(0.85)":"scale(1.04)",l=p=>{p.style.transformBox="view-box",p.style.transformOrigin=`${t.x}px ${t.y}px`},c=p=>{p.style.transform="",p.style.opacity="",p.style.transformOrigin="",p.style.transformBox=""},h=this._markGroup();let d=null;if(h){l(h),d=h.animate([{transform:"scale(1)",opacity:1},{transform:r,opacity:0}],{duration:o,easing:"ease-in",fill:"forwards"});try{yield d.finished}catch{}}yield s();const f=this._markGroup();if(f){l(f),f.style.opacity="0",f.style.transform=n,d&&h===f&&d.cancel();const p=f.animate([{transform:n,opacity:0},{transform:"scale(1)",opacity:1}],{duration:i,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"});try{yield p.finished}catch{}c(f),p.cancel()}})}_zoomDuration(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation,e=t&&typeof t.speed=="number"?t.speed:260;return Math.max(80,e)}_fire(t,e){const s=this.w.config.chart.events&&this.w.config.chart.events[t];typeof s=="function"&&s(e,this.ctx,this.w),this.ctx.events.fireEvent(t,[e,this.ctx,this.w])}_onPointSelect(t,e,s){if(!s)return;const i=this._pointAt(s.seriesIndex,s.dataPointIndex);if(i&&typeof i=="object"&&i.drilldown!=null)return this.drillDown(i.drilldown,i,s);if(typeof this.w.config.drilldown.onDrillDown=="function")return this._drillDownAsync(null,i,s)}_pointAt(t,e){const s=this.w.config.series;if(!Array.isArray(s)||t==null||e==null)return null;const i=s[t];return!i||!Array.isArray(i.data)?null:i.data[e]!=null?i.data[e]:null}_afterRender(){!this.w.config.drilldown||!this.w.config.drilldown.enabled||(this._markDrillableTargets(),this.breadcrumb.render(this.path))}_markDrillableTargets(){if(!W.isBrowser())return;const t=this.w,e=t.dom.baseEl,s=t.config.series;!e||!Array.isArray(s)||s.forEach((i,a)=>{const o=i&&Array.isArray(i.data)?i.data:null;o&&o.forEach((r,n)=>{if(!r||typeof r!="object"||r.drilldown==null)return;e.querySelectorAll(`[index="${a}"][j="${n}"]`).forEach(c=>c.classList.add("apexcharts-drilldown-target"))})})}}dt.registerFeatures({drilldown:Fi});class Ri{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){const{x:e,y:s,y1:i,y2:a,i:o,j:r,realIndex:n,columnGroupIndex:l,series:c,barHeight:h,barWidth:d,barXPosition:f,barYPosition:p,visibleSeries:g}=t,u=this.w,x=new R(this.barCtx.w),b=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth;let w,m;u.axisFlags.isXNumeric&&!u.globals.isBarHorizontal?(w=e+d*(g+1),m=s+h*(g+1)-b):(w=e+d*g,m=s+h*g);let y=null,v=null,C=e,D=s,S={};const k=u.config.dataLabels,M=this.barCtx.barOptions.dataLabels,L=this.barCtx.barOptions.dataLabels.total;typeof p<"u"&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(m=p,D=p),typeof f<"u"&&this.barCtx.isVerticalGroupedRangeBar&&(w=f,C=f);const P=k.offsetX,E=k.offsetY;let _={width:0,height:0};if(u.config.dataLabels.enabled){const F=u.seriesData.series[o][r];_=x.getTextRects(u.config.dataLabels.formatter?u.config.dataLabels.formatter(F,G($({},u),{seriesIndex:o,dataPointIndex:r,w:u})):u.formatters.yLabelFormatters[0](F),parseFloat(k.style.fontSize).toString())}const X={x:e,y:s,i:o,j:r,realIndex:n,columnGroupIndex:l,bcx:w,bcy:m,barHeight:h,barWidth:d,textRects:_,strokeWidth:b,dataLabelsX:C,dataLabelsY:D,dataLabelsConfig:k,barDataLabelsConfig:M,barTotalDataLabelsConfig:L,offX:P,offY:E};return this.barCtx.isHorizontal?S=this.calculateBarsDataLabelsPosition(X):S=this.calculateColumnsDataLabelsPosition(X),y=this.drawCalculatedDataLabels({x:S.dataLabelsX,y:S.dataLabelsY,val:this.barCtx.isRangeBar?[i,a]:u.config.chart.stackType==="100%"?c[n][r]:u.seriesData.series[n][r],i:n,j:r,barWidth:d,barHeight:h,textRects:_,dataLabelsConfig:k}),u.config.chart.stacked&&L.enabled&&(v=this.drawTotalDataLabels({x:S.totalDataLabelsX,y:S.totalDataLabelsY,barWidth:d,barHeight:h,realIndex:n,textAnchor:S.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:n,j:r}),dataLabelsConfig:k,barTotalDataLabelsConfig:L})),{dataLabelsPos:S,dataLabels:y,totalDataLabels:v}}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let i=this.barCtx.stackedSeriesTotals[e];return this.totalFormatter&&(i=this.totalFormatter(i,G($({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),i}calculateColumnsDataLabelsPosition(t){const e=this.w;let{i:s,j:i,realIndex:a,y:o,bcx:r,barWidth:n,barHeight:l,textRects:c,dataLabelsX:h,dataLabelsY:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:g,strokeWidth:u,offX:x,offY:b}=t,w,m;const y="middle",v=r;l=Math.abs(l);const C=e.config.plotOptions.bar.dataLabels.orientation==="vertical",{zeroEncounters:D}=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:i});r=r-u/2;const S=e.layout.gridWidth/e.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?h+=n/2:(e.axisFlags.isXNumeric?h=r-n/2+x:h=r-S+n/2+x,!e.config.chart.stacked&&D>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(h-=n*D)),C&&(h=h+c.height/2-u/2-2);const k=e.seriesData.series[s][i]<0;let M=o;switch(this.barCtx.isReversed&&(M=o+(k?l:-l)),p.position){case"center":C?k?d=M-l/2+b:d=M+l/2-b:k?d=M-l/2+c.height/2+b:d=M+l/2+c.height/2-b;break;case"bottom":C?k?d=M-l+b:d=M+l-b:k?d=M-l+c.height+u+b:d=M+l-c.height/2+u-b;break;case"top":C?k?d=M+b:d=M-b:k?d=M-c.height/2-b:d=M+c.height+b;break}let L=M;if(e.labelData.seriesGroups.forEach(P=>{var E;(E=this.barCtx[P.join(",")])==null||E.prevY.forEach(_=>{k?L=Math.max(_[i],L):L=Math.min(_[i],L)})}),this.barCtx.lastActiveBarSerieIndex===a&&g.enabled){const _=new R(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),f.fontSize);k?w=L-_.height/2-b-g.offsetY+18:w=L+_.height+b+g.offsetY-18;const X=S;m=v+(e.axisFlags.isXNumeric?-n*e.globals.barGroups.length/2:e.globals.barGroups.length*n/2-(e.globals.barGroups.length-1)*n-X)+g.offsetX}return e.config.chart.stacked||(d<0?d=0+u:d+c.height/3>e.layout.gridHeight&&(d=e.layout.gridHeight-u)),{bcx:r,bcy:o,dataLabelsX:h,dataLabelsY:d,totalDataLabelsX:m,totalDataLabelsY:w,totalDataLabelsAnchor:y}}calculateBarsDataLabelsPosition(t){var e;const s=this.w;let{x:i,i:a,j:o,realIndex:r,bcy:n,barHeight:l,barWidth:c,textRects:h,dataLabelsX:d,strokeWidth:f,dataLabelsConfig:p,barDataLabelsConfig:g,barTotalDataLabelsConfig:u,offX:x,offY:b}=t;const w=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:o});c=Math.abs(c);let y;if(this.barCtx.isPyramid){const L=(e=h.centerOffset)!=null?e:0;y=n+l/2+b-L}else y=n-(this.barCtx.isRangeBar?0:w)+l/2+h.height/2+b-3;!s.config.chart.stacked&&m>
11430&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=l*m);let v,C,D="start";const S=s.seriesData.series[a][o]<0;let k=i;if(this.barCtx.isReversed&&(k=i+(S?-c:c),D=S?"start":"end"),this.barCtx.isPyramid)d=s.layout.gridWidth/2+x;else switch(g.position){case"center":S?d=k+c/2-x:d=Math.max(h.width/2,k-c/2)+x;break;case"bottom":S?d=k+c-f-x:d=k-c+f+x;break;case"top":S?d=k-f-x:d=k-f+x;break}let M=k;if(s.labelData.seriesGroups.forEach(L=>{var P;(P=this.barCtx[L.join(",")])==null||P.prevX.forEach(E=>{S?M=Math.min(E[o],M):M=Math.max(E[o],M)})}),this.barCtx.lastActiveBarSerieIndex===r&&u.enabled){const P=new R(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),p.fontSize);S?(v=M-f-x-u.offsetX,D="end"):v=M+x+u.offsetX+(this.barCtx.isReversed?-(c+f):f),C=y-h.height/2+P.height/2+u.offsetY+f,s.globals.barGroups.length>1&&(C=C-s.globals.barGroups.length/2*(l/2))}return s.config.chart.stacked||(p.textAnchor==="start"?d-h.width<0?d=S?h.width+f:f:d+h.width>s.layout.gridWidth&&(d=S?s.layout.gridWidth-f:s.layout.gridWidth-h.width-f):p.textAnchor==="middle"?d-h.width/2<0?d=h.width/2+f:d+h.width/2>s.layout.gridWidth&&(d=s.layout.gridWidth-h.width/2-f):p.textAnchor==="end"&&(d<1?d=h.width+f:d+1>s.layout.gridWidth&&(d=s.layout.gridWidth-h.width-f))),{bcx:i,bcy:n,dataLabelsX:d,dataLabelsY:y,totalDataLabelsX:v,totalDataLabelsY:C,totalDataLabelsAnchor:D}}drawCalculatedDataLabels({x:t,y:e,val:s,i,j:a,textRects:o,barHeight:r,barWidth:n,dataLabelsConfig:l}){const c=this.w;let h="rotate(0)";c.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(h=`rotate(-90, ${t}, ${e})`);const d=new kt(this.barCtx.w,this.barCtx.ctx),f=new R(this.barCtx.w),p=l.formatter;let g=null;const u=c.globals.collapsedSeriesIndices.indexOf(i)>-1;if(l.enabled&&!u){g=f.group({class:"apexcharts-data-labels",transform:h});let x="";typeof s<"u"&&(x=p(s,G($({},c),{seriesIndex:i,dataPointIndex:a,w:c}))),!s&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(x="");const b=c.seriesData.series[i][a]<0,w=c.config.plotOptions.bar.dataLabels.position;if(c.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(w==="top"&&(b?l.textAnchor="end":l.textAnchor="start"),w==="center"&&(l.textAnchor="middle"),w==="bottom"&&(b?l.textAnchor="end":l.textAnchor="start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){const y=f.getTextRects(x,parseFloat(l.style.fontSize).toString());n<y.width&&(x="")}c.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?o.width/1.6>Math.abs(n)&&(x=""):o.height/1.6>Math.abs(r)&&(x=""));const m=$({},l);this.barCtx.isHorizontal&&s<0&&(l.textAnchor==="start"?m.textAnchor="end":l.textAnchor==="end"&&(m.textAnchor="start")),d.plotDataLabelsText({x:t,y:e,text:x,i,j:a,parent:g,dataLabelsConfig:m,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}drawTotalDataLabels({x:t,y:e,val:s,realIndex:i,textAnchor:a,barTotalDataLabelsConfig:o}){const r=new R(this.barCtx.w);let n;return o.enabled&&typeof t<"u"&&typeof e<"u"&&this.barCtx.lastActiveBarSerieIndex===i&&(n=r.drawText({x:t,y:e,foreColor:o.style.color,text:s,textAnchor:a,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight})),n}}let Xi=class{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let i=0;i<t[s].length;i++)e.seriesData.seriesX[s][i]>e.globals.minX&&e.seriesData.seriesX[s][i]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),T.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(s=>s.map(i=>"none"))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],e.globals.comboCharts||this.checkZeroSeries({series:t})}initialPositions(t){const e=this.w;let s,i,a,o,r,n,l,c,h=e.globals.dataPoints;this.barCtx.isRangeBar&&(h=e.labelData.labels.length);let d=this.barCtx.seriesLen;if(e.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)a=e.layout.gridHeight/h,r=a/d,e.axisFlags.isXNumeric&&(a=e.layout.gridHeight/this.barCtx.totalItems,r=a/this.barCtx.seriesLen),r=r*parseInt(this.barCtx.barOptions.barHeight,10)/100,Str
1143ing(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.barHeight,10)),c=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?this.barCtx.baseLineInvertedY*2:0),this.barCtx.isFunnel&&(c=e.layout.gridWidth/2),i=(a-r*this.barCtx.seriesLen)/2;else{if(o=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(o=e.layout.gridWidth/e.globals.dataPoints),n=o/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const f=this.barCtx.xRatio;e.globals.minXDiff&&e.globals.minXDiff!==.5&&e.globals.minXDiff/f>0&&(o=e.globals.minXDiff/f),n=o/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?this.barCtx.baseLineY[this.barCtx.translationsIndex]*2:0),e.axisFlags.isXNumeric?s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x:s=e.globals.padHorizontal+T.noExponents(o-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=r,e.globals.barWidth=n,{x:s,y:i,yDivision:a,xDivision:o,barHeight:r,barWidth:n,zeroH:l,zeroW:c}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(s=>{t[s]||(t[s]={}),t[s].prevY=[],t[s].prevX=[],t[s].prevYF=[],t[s].prevXF=[],t[s].prevYVal=[],t[s].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(s=>{t[s]||(t[s]={}),t[s].xArrj=[],t[s].xArrjF=[],t[s].xArrjVal=[],t[s].yArrj=[],t[s].yArrjF=[],t[s].yArrjVal=[]})}getPathFillColor(t,e,s,i){var a,o,r,n;const l=this.w,c=new nt(this.barCtx.w);let h=null;const d=this.barCtx.barOptions.distributed?s:e;let f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(u=>{t[e][s]>=u.from&&t[e][s]<=u.to&&(h=u.color,f=!0)}),{color:c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:i,dataPointIndex:s,color:h,value:t[e][s],fillConfig:(a=l.config.series[e].data[s])==null?void 0:a.fill,fillType:(r=(o=l.config.series[e].data[s])==null?void 0:o.fill)!=null&&r.type?(n=l.config.series[e].data[s])==null?void 0:n.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type}),useRangeColor:f}}getStrokeWidth(t,e,s){let i=0;const a=this.w;return typeof this.barCtx.series[t][e]>"u"||this.barCtx.series[t][e]===null||a.config.chart.type==="bar"&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,a.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),i}createBorderRadiusArr(t){var e;const s=this.w,i=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,a=t.length,o=((e=t[0])==null?void 0:e.length)|0,r=Array.from({length:a},()=>Array(o).fill(i?"top":"none"));if(i)return r;const n=this.w.config.chart.type;for(let l=0;l<o;l++){const c=[],h=[];let d=0;for(let f=0;f<a;f++){const p=t[f][l];p>0?(c.push(f),d++):p<0&&(h.push(f),d++)}if(c.length>0&&h.length===0)if(c.length===1)r[c[0]][l]=n==="bar"&&o===1?"top":"both";else{const f=c[0],p=c[c.length-1];for(const g of c)g===f?r[g][l]=n==="bar"&&o===1?"top":"bottom":g===p?r[g][l]="top":r[g][l]="none"}else if(h.length>0&&c.length===0)if(h.length===1)r[h[0]][l]="both";else{const f=Math.max(...h),p=Math.min(...h);for(const g of h)g===f?r[g][l]="bottom":g===p?r[g][l]="top":r[g][l]="none"}else if(c.length>0&&h.length>0){const f=c[c.length-1];for(const g of c)g===f?r[g][l]="top":r[g][l]="none";const p=Math.max(...h);for(const g of h)g===p?r[g][l]="bottom":r[g][l]="none"}else if(d===1){const f=c[0]||h[0];r[f][l]="both"}}return r}barBackground({j:t,i:e,x1:s,x2:i,y1:a,y2:o,elSeries:r}){const n=this.w,l=new R(this.barCtx.w),h=new tt(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const d=this.barCtx.barOptions.colors.backgroundBarColors[t],f=l.drawRect(typeof s<"u"?s:0,typeof a<"u"?a:0,typeof i<"u"?i:n.layout.gridWidth,typeof o<"u"?o:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);r.add(f),f.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:i,strokeWidth:a,isReversed:o,series:r,seriesGroup:n,realIndex:l,i:c,j:h,w:d}){var f,p,g;const u=new R(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let x=t,b=e;(f=d.config.series[l].data[h])!=null&&f.columnWidthOffset&&(b=e-d.config.series[l].data[h].columnWidthOffset/2,x=t+d.config.series[l].data[h].columnWidthOffset);const w=a/2,m=b+w,y=b+x-w,v=(r[c][h]>=0?1:-1)*(o?-1:1);s+=.001-w*v,i+=.001+w*v;const C=u.line(y,s),D=d.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z";let S=u.move(m,s)+u.line(m,i)+u.line(y,i)+C+D;this.arrBorderRadius[l][h]!=="none"&&(S=u.roundPathCorners(S,d.config.plotOptions.bar.borderRadius));let k;const M=(g=(p=this.barCtx.ctx)==null?void 0:p.morphTypeChange)==null?void 0:g.getInitialPathFor(l,h);if(M?k=M:d.globals.previousPaths.length>0?k=this.barCtx.getPreviousPath(l,h,S):k=u.move(m,s)+u.line(m,s)+C+C+C+C+C+u.line(m,s)+D,d.config.chart.stacked){let L=this.barCtx;L=this.barCtx[n],L.yArrj.push(i-w*v),L.yArrjF.push(Math.abs(s-i+a*v)),L.yArrjVal.push(this.barCtx.series[c][h])}return{pathTo:S,pathFrom:k}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i,j:a,realIndex:o,strokeWidth:r,w:n}){var l,c;const h=new R(this.barCtx.w),d=n.layout.gridWidth/2,f=P=>Math.abs(P/this.barCtx.invertedYRatio)/2,p=f(s[i][a]),g=s[i].length-1,u=a===g,x=n.config.plotOptions.funnel.lastShape==="taper"?"taper":"flat";let b;u?b=x==="taper"?0:p:b=f(s[i][a+1]);const w=r/2,m=t+w,y=t+e-w,v=d-p,C=d+p,D=d-b,S=d+b,k=h.move(v,m)+h.line(C,m)+h.line(S,y)+h.line(D,y)+" Z";let M;const L=(c=(l=this.barCtx.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.getInitialPathFor(o,a);return L?M=L:n.globals.previousPaths.length>0?M=this.barCtx.getPreviousPath(o,a,k):M=h.move(d,m)+h.line(d,m)+h.line(d,y)+h.line(d,y)+" Z",{pathTo:k,pathFrom:M,x:C,x1:v,barXPosition:d}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,i=e.layout.gridWidth,a=t.map(c=>Math.abs(Number(c)||0)),o=a.reduce((c,h)=>c+h,0);if(o===0||s<=0)return a.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const r=i/2;let n=0;const l=[];for(let c=0;c<a.length;c++){const h=n/o;n+=a[c];
1143const d=n/o,f=h*s,p=d*s;l.push({y:f,height:p-f,topHalf:h*r,bottomHalf:d*r})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:i,realIndex:a,j:o,strokeWidth:r,w:n}){var l,c;const h=new R(this.barCtx.w),d=n.layout.gridWidth/2,f=r/2,p=t+f,g=t+e-f,u=d-s,x=d+s,b=d-i,w=d+i,m=h.move(u,p)+h.line(x,p)+h.line(w,g)+h.line(b,g)+" Z";let y;const v=(c=(l=this.barCtx.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.getInitialPathFor(a,o);return v?y=v:n.globals.previousPaths.length>0?y=this.barCtx.getPreviousPath(a,o,m):y=h.move(d,p)+h.line(d,p)+h.line(d,g)+h.line(d,g)+" Z",{pathTo:m,pathFrom:y,x,x1:u,barXPosition:d}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:i,strokeWidth:a,isReversed:o,series:r,seriesGroup:n,realIndex:l,i:c,j:h,w:d}){var f,p,g;const u=new R(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let x=t,b=e;(f=d.config.series[l].data[h])!=null&&f.barHeightOffset&&(x=t-d.config.series[l].data[h].barHeightOffset/2,b=e+d.config.series[l].data[h].barHeightOffset);const w=a/2,m=x+w,y=x+b-w,v=(r[c][h]>=0?1:-1)*(o?-1:1);s+=.001+w*v,i+=.001-w*v;const C=this.barCtx.isFunnel,D=C?(s+i)/2:s,S=u.line(s,y),k=d.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z";let M=u.move(s,m)+u.line(i,m)+u.line(i,y)+S+k;this.arrBorderRadius[l][h]!=="none"&&(M=u.roundPathCorners(M,d.config.plotOptions.bar.borderRadius));let L;const P=(g=(p=this.barCtx.ctx)==null?void 0:p.morphTypeChange)==null?void 0:g.getInitialPathFor(l,h);if(P)L=P;else if(d.globals.previousPaths.length>0)L=this.barCtx.getPreviousPath(l,h,M);else{const E=C?u.line(D,y):S;L=u.move(D,m)+u.line(D,m)+E+E+E+E+E+u.line(D,m)+k}if(d.config.chart.stacked){let E=this.barCtx;E=this.barCtx[n],E.xArrj.push(i+w*v),E.xArrjF.push(Math.abs(s-i-a*v)),E.xArrjVal.push(this.barCtx.series[c][h])}return{pathTo:M,pathFrom:L}}checkZeroSeries({series:t}){const e=this.w;for(let s=0;s<t.length;s++){let i=0;for(let a=0;a<t[e.globals.maxValsInArrayIndex].length;a++)i+=t[s][a];i===0&&this.barCtx.zeroSerieses.push(s)}}getXForValue(t,e,s=!0){let i=s?e:null;return typeof t<"u"&&t!==null&&(i=e+t/this.barCtx.invertedYRatio-(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)*2),i}getYForValue(t,e,s,i=!0){let a=i?e:null;return typeof t<"u"&&t!==null&&(a=e-t/this.barCtx.yRatio[s]+(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)*2),a}getGoalValues(t,e,s,i,a,o){const r=this.w,n=[],l=(c,h)=>{n.push({[t]:t==="x"?this.getXForValue(c,e,!1):this.getYForValue(c,s,o,!1),attrs:h})};if(r.seriesData.seriesGoals[i]&&r.seriesData.seriesGoals[i][a]&&Array.isArray(r.seriesData.seriesGoals[i][a])&&r.seriesData.seriesGoals[i][a].forEach(c=>{l(c.value,c)}),this.barCtx.barOptions.isDumbbell&&r.rangeData.seriesRange.length){const c=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:r.globals.colors,h={strokeHeight:t==="x"?0:r.globals.markers.size[i],strokeWidth:t==="x"?r.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(c[i])?c[i][0]:c[i]};l(r.rangeData.seriesRangeStart[i][a],h),l(r.rangeData.seriesRangeEnd[i][a],G($({},h),{strokeColor:Array.isArray(c[i])?c[i][1]:c[i]}))}return n}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:i,barWidth:a,barHeight:o}){const r=new R(this.barCtx.w),n=r.group({className:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(c=>{if(c.x>=-1&&c.x<=r.w.layout.gridWidth+1){const h=typeof c.attrs.strokeHeight<"u"?c.attrs.strokeHeight:o/2,d=e+h+o/2;l=r.drawLine(c.x,d-h*2,c.x,d,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeWidth?c.attrs.strokeWidth:2,c.attrs.strokeLineCap),n.add(l)}}):Array.isArray(i)&&i.forEach(c=>{if(c.y>=-1&&c.y<=r.w.layout.gridHeight+1){const h=typeof c.attrs.strokeWidth<"u"?c.attrs.strokeWidth:a/2,d=t+h+a/2;l=r.drawLine(d-h*2,c.y,d,c.y,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeHeight?c.attrs.strokeHeight:2,c.attrs.strokeLineCap),n.add(l)}}),n}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:i,j:a}){const o=this.w,{x:r,x1:n,barYPosition:l}=t,{x:c,x1:h,barYPosition:d}=e,f=l+e.barHeight,p=new R(this.barCtx.w),g=new T,u=p.move(n,f)+p.line(r,f)+p.line(c,d)+p.line(h,d)+p.line(n,f)+(o.c
vendor: 9,481 bytes, line 1143
1143onfig.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[i][a]==="both"?" Z":" z");return p.drawPath({d:u,fill:g.shadeColor(.5,T.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const i=this.w;let a=0,o=0;return(i.config.plotOptions.bar.horizontal?i.seriesData.series.map((n,l)=>l):((s=i.globals.columnSeries)==null?void 0:s.i.map(n=>n))||[]).forEach(n=>{const l=i.globals.seriesPercent[n][e];l&&a++,n<t&&l===0&&o++}),{nonZeroColumns:a,zeroEncounters:o}}getGroupIndex(t){const e=this.w,s=e.labelData.seriesGroups.findIndex(o=>o.indexOf(e.seriesData.seriesNames[t])>-1),i=this.barCtx.columnGroupIndices;let a=i.indexOf(s);return a<0&&(i.push(s),a=i.length-1),{groupIndex:s,columnGroupIndex:a}}};class gt{constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,this.xyRatios!==null&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const i=new tt(this.w);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];const a=i.getBarSeriesIndices(),o=new et(this.w);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((r,n)=>a.indexOf(n)===-1?n:-1).filter(r=>r!==-1)),this.barHelpers=new Xi(this)}draw(t,e){var s,i;const a=this.w,o=new R(this.w),r=new et(this.w);t=r.getLogSeries(t),this.series=t,this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const n=o.group({class:"apexcharts-bar-series apexcharts-plot-series"});a.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(let l=0,c=0;l<t.length;l++,c++){let h,d;const f=[],p=[],g=a.globals.comboCharts?e[l]:l,{columnGroupIndex:u}=this.barHelpers.getGroupIndex(g),x=o.group({class:"apexcharts-series",rel:l+1,seriesName:T.escapeString(a.seriesData.seriesNames[g]),"data:realIndex":g});tt.addCollapsedClassToSeries(this.w,x,g),t[l].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[g],this.translationsIndex=g);const b=this.translationsIndex;this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[l]));const w=this.barHelpers.initialPositions(g),{y:m,yDivision:y,zeroW:v,x:C,xDivision:D,zeroH:S}=w;let k=w.barHeight,M=w.barWidth;d=m,h=C,this.isHorizontal||p.push(h+(M??0)/2);const L=o.group({class:"apexcharts-datalabels","data:realIndex":g});a.globals.delayedElements.push({el:L.node}),L.node.classList.add("apexcharts-element-hidden");const P=o.group({class:"apexcharts-bar-goals-markers"}),E=o.group({class:"apexcharts-bar-shadows"});a.globals.delayedElements.push({el:E.node}),E.node.classList.add("apexcharts-element-hidden");for(let _=0;_<t[l].length;_++){const X=this.barHelpers.getStrokeWidth(l,_,g);let F=null;const z={indexes:{i:l,j:_,realIndex:g,translationsIndex:b,bc:c},x:h,y:d,strokeWidth:X,elSeries:x};this.isHorizontal?(F=this.drawBarPaths(G($({},z),{barHeight:k,zeroW:v,yDivision:y})),M=this.series[l][_]/this.invertedYRatio):(F=this.drawColumnPaths(G($({},z),{xDivision:D,barWidth:M,zeroH:S})),k=this.series[l][_]/this.yRatio[b]);const O=this.barHelpers.getPathFillColor(t,l,_,g);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&((s=a.config.plotOptions.funnel)==null?void 0:s.shape)!=="trapezoid"&&this.pathArr.length&&_>0){const H=this.barHelpers.drawBarShadow({color:typeof O.color=="string"&&((i=O.color)==null?void 0:i.indexOf("url"))===-1?O.color:T.hexToRgba(a.globals.colors[l]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:F,realIndex:g,j:_});E.add(H),a.config.chart.dropShadow.enabled&&new at(this.w).dropShadow(H,a.config.chart.dropShadow,g)}this.pathArr.push(F);const N=this.barHelpers.drawGoalLine({barXPosition:F.barXPosition,barYPosition:F.barYPosition,goalX:F.goalX,goalY:F.goalY,barHeight:k,barWidth:M});N&&P.add(N),d=F.y,h=F.x,_>0&&p.push(h+(M??0)/2),f.push(d),this.renderSeries(G($({realIndex:g,pathFill:O.color},O.useRangeColor?{lineFill:O.color}:{}),{j:_,i:l,columnGroupIndex:u,pathFrom:F.pathFrom,pathTo:F.pathTo,strokeWidth:X,elSeries:x,x:h,y:d,series:t,barHeight:Math.abs(F.barHeight?F.barHeight:k),barWidth:Math.abs(F.barWidth?F.barWidth:M),elDataLabelsWrap:L,elGoalsMarkers:P,elBarShadows:E,visibleSeries:this.visibleI,type:"bar"}))}a.globals.seriesXvalues[g]=p,a.globals.seriesYvalues[g]=f,n.add(x)}return n}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:i,i:a,columnGroupIndex:o,pathFrom:r,pathTo:n,strokeWidth:l,elSeries:c,x:h,y:d,y1:f,y2:p,series:g,barHeight:u,barWidth:x,barXPosition:b,barYPosition:w,elDataLabelsWrap:m,elGoalsMarkers:y,elBarShadows:v,visibleSeries:C,type:D,classes:S}){var k;const M=this.w,L=new R(this.w,this.ctx);let P=!1;if(c._bindingsDelegated||(c._bindingsDelegated=!0,L.setupEventDelegation(c,`.apexcharts-${D}-area`)),!s){let N=function(I){const Y=M.config.stroke.colors;let V;return Array.isArray(Y)&&Y.length>0&&(V=Y[I],V||(V=""),typeof V=="function")?V({value:M.seriesData.series[I][i],dataPointIndex:i,w:M}):V};const H=typeof M.globals.stroke.colors[t]=="function"?N(t):M.globals.stroke.colors[t];s=this.barOptions.distributed?M.globals.stroke.colors[i]:H}const _=new Ri(this).handleBarDataLabels({x:h,y:d,y1:f,y2:p,i:a,j:i,series:g,realIndex:t,columnGroupIndex:o,barHeight:u,barWidth:x,barXPosition:b,barYPosition:w,visibleSeries:C});M.globals.isBarHorizontal||(_.dataLabelsPos.dataLabelsX+Math.max(x,M.globals.barPadForNumericAxis)<0||_.dataLabelsPos.dataLabelsX-Math.max(x,M.globals.barPadForNumericAxis)>M.layout.gridWidth)&&(P=!0),M.config.series[a].data[i]&&M.config.series[a].data[i].strokeColor&&(s=M.config.series[a].data[i].strokeColor),this.isNullValue&&(e="none");const X=M.config.chart.animations,F=X.animateGradually,z=F&&F.enabled!==!1;let O=0;if(z){const N=M.globals.dataPoints||1,H=F.delay||0,I=Math.min(H,X.speed*.5/Math.max(1,N));let Y=be({style:"sequential",index:i,baseDelay:I});M.config.chart.stacked&&(Y+=a*I*.5),O=Y/(H||1)}if(!P){const H=((k=this.ctx.morphTypeChange)==null?void 0:k.isActive())===!0?this.ctx.morphTypeChange.getSpeed():M.config.chart.animations.dynamicAnimation.speed,I=L.renderPaths({i:a,j:i,realIndex:t,pathFrom:r,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:M.config.stroke.lineCap,fill:e,animationDelay:O,initialSpeed:M.config.chart.animations.speed,dataChangeSpeed:H,className:`apexcharts-${D}-area ${S}`,chartType:D,bindEventsOnPaths:!1});I.attr("clip-path",`url(#gridRectBarMask${M.globals.cuid})`);const Y=M.config.forecastDataPoints;Y.count>0&&i>=M.globals.dataPoints-Y.count&&(I.node.setAttribute("stroke-dasharray",Y.dashArray),I.node.setAttribute("stroke-width",Y.strokeWidth),I.node.setAttribute("fill-opacity",Y.fillOpacity)),typeof f<"u"&&typeof p<"u"&&(I.attr("data-range-y1",f),I.attr("data-range-y2",p)),new at(this.w).setSelectionFilter(I,t,i),c.add(I),I.attr({cy:_.dataLabelsPos.bcy,cx:_.dataLabelsPos.bcx,j:i,val:M.seriesData.series[a][i],barHeight:u,barWidth:x}),_.dataLabels!==null&&m.add(_.dataLabels),_.totalDataLabels&&m.add(_.totalDataLabels),c.add(m),y&&c.add(y),v&&c.add(v)}return c}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:o,yDivision:r,elSeries:n}){const l=this.w,c=t.i,h=t.j;let d;if(l.axisFlags.isXNumeric)o=(l.seriesData.seriesX[c][h]-l.globals.minX)/this.invertedXRatio-e,d=o+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:x,zeroEncounters:b}=this.barHelpers.getZeroValueEncounters({i:c,j:h});x>0&&(e=this.seriesLen*e/x),d=o+e*this.visibleI,d-=e*b}else d=o+e*this.visibleI;const f=this.isFunnel&&l.config.plotOptions.funnel.shape==="trapezoid",p=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[h]:null,g=!!p;if(p)d=p.y,e=p.height;else if(this.isFunnel&&!f){const x=i??0;i=x-(this.barHelpers.getXForValue(this.series[c][h],x)-x)/2}a=this.barHelpers.getXForValue(this.series[c][h],i??0);let u;return p?u=this.barHelpers.getPyramidPaths({barYPosition:d,barHeight:e,topHalf:p.topHalf,bottomHalf:p.bottomHalf,realIndex:t.realIndex,j:h,strokeWidth:s,w:l}):f?u=this.barHelpers.getFunnelTrapezoidPaths({barYPosition:d,barHeight:e,series:this.series,i:c,j:h,realIndex:t.realIndex,strokeWidth:s,w:l}):u=this.barHelpers.getBarpaths({barYPosition:d,barHeight:e,x1:i,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:c,j:h,w:l}),(f||g)&&(i=u.x1,a=u.x),!l.axisFlags.isXNumeric&&!g&&(o=o+r),g&&(o=d),this.barHelpers.barBackgroun
vendor: 6,280 bytes, line 1143
1143d({j:h,i:c,y1:d-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:u.pathTo,pathFrom:u.pathFrom,x1:i,x:a,y:o,goalX:this.barHelpers.getGoalValues("x",i,null,c,h,0),barYPosition:d,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:o,strokeWidth:r,elSeries:n}){const l=this.w,c=t.realIndex,h=t.translationsIndex,d=t.i,f=t.j,p=t.bc;let g;if(l.axisFlags.isXNumeric){const x=this.getBarXForNumericXAxis({x:e,j:f,realIndex:c,barWidth:a});e=x.x,g=x.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:x,zeroEncounters:b}=this.barHelpers.getZeroValueEncounters({i:d,j:f});x>0&&(a=this.seriesLen*a/x),g=e+a*this.visibleI,g-=a*b}else g=e+a*this.visibleI;s=this.barHelpers.getYForValue(this.series[d][f],o,h);const u=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:a,y1:o,y2:s,strokeWidth:r,isReversed:this.isReversed,series:this.series,realIndex:c,i:d,j:f,w:l});return l.axisFlags.isXNumeric||(e=e+i),this.barHelpers.barBackground({bc:p,j:f,i:d,x1:g-r/2-a*this.visibleI,x2:a*this.seriesLen+r/2,elSeries:n}),{pathTo:u.pathTo,pathFrom:u.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,d,f,h),barXPosition:g,barWidth:a}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:i}){const a=this.w;let o=s;return a.seriesData.seriesX[s].length||(o=a.globals.maxValsInArrayIndex),T.isNumber(a.seriesData.seriesX[o][i])&&(t=(a.seriesData.seriesX[o][i]-a.globals.minX)/this.xRatio-e*this.seriesLen/2),{barXPosition:t+e*this.visibleI,x:t}}getPreviousPath(t,e,s){const i=this.w;let a=null;for(let o=0;o<i.globals.previousPaths.length;o++){const r=i.globals.previousPaths[o];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(String(t),10)&&typeof r.paths[e]<"u"&&(a=r.paths[e].d)}return a&>.pathCommandCount(a)===gt.pathCommandCount(s)?a:s}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}class Ii extends gt{draw(t,e){const s=this.w;this.graphics=new R(this.w),this.bar=new gt(this.w,this.ctx,this.xyRatios);const i=new et(this.w);t=i.getLogSeries(t),this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),s.config.chart.stackType==="100%"&&(t=s.globals.comboCharts?e.map(n=>s.globals.seriesPercent[n]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const a=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let o=0,r=0;for(let n=0,l=0;n<t.length;n++,l++){const c=s.globals.comboCharts?e[n]:n,{groupIndex:h,columnGroupIndex:d}=this.barHelpers.getGroupIndex(c);this.groupCtx=this[s.labelData.seriesGroups[h]];const f=[],p=[];let g=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[c][0],g=c),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let u=this.graphics.group({class:"apexcharts-series",seriesName:T.escapeString(s.seriesData.seriesNames[c]),rel:n+1,"data:realIndex":c});tt.addCollapsedClassToSeries(this.w,u,c);const x=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":c}),b=this.graphics.group({class:"apexcharts-bar-goals-markers"}),w=this.initialPositions(o,r,void 0,void 0,void 0,void 0,g),{xDivision:m,yDivision:y,zeroH:v,zeroW:C}=w;let D=w.barHeight,S=w.barWidth;r=w.y,o=w.x,s.globals.barHeight=D,s.globals.barWidth=S,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(k=>isNaN(k))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>v),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let k=0;k<s.globals.dataPoints;k++){const M=this.barHelpers.getStrokeWidth(n,k,c),L={indexes:{i:n,j:k,realIndex:c,translationsIndex:g,bc:l},strokeWidth:M,x:o,y:r,elSeries:u,columnGroupIndex:d,seriesGroup:s.labelData.seriesGroups[h]};let P=null;this.isHorizontal?(P=this.drawStackedBarPaths(G($({},L),{zeroW:C,barHeight:D,yDivision:y})),S=this.series[n][k]/this.invertedYRatio):(P=this.drawStackedColumnPaths(G($({},L),{xDivision:m,barWidth:S,zeroH:v})),D=this.series[n][k]/this.yRatio[g]);const E=this.barHelpers.drawGoalLine({barXPosition:P.barXPosition,barYPosition:P.barYPosition,goalX:P.goalX,goalY:P.goalY,barHeight:D,barWidth:S});E&&b.add(E),r=P.y,o=P.x,f.push(o),p.push(r);const _=this.barHelpers.getPathFillColor(t,n,k,c);let X="";const F=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(this.barHelpers.arrBorderRadius[c][k]==="bottom"&&s.seriesData.series[c][k]>0||this.barHelpers.arrBorderRadius[c][k]==="top"&&s.seriesData.series[c][k]<0)&&(X=F),u=this.renderSeries(G($({realIndex:c,pathFill:_.color},_.useRangeColor?{lineFill:_.color}:{}),{j:k,i:n,columnGroupIndex:d,pathFrom:P.pathFrom,pathTo:P.pathTo,strokeWidth:M,elSeries:u,x:o,y:r,series:t,barHeight:D,barWidth:S,elDataLabelsWrap:x,elGoalsMarkers:b,type:"bar",visibleSeries:d,classes:X}))}s.globals.seriesXvalues[c]=f,s.globals.seriesYvalues[c]=p,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),a.add(u)}return a}initialPositions(t,e,s,i,a,o,r){const n=this.w;let l,c;if(this.isHorizontal){i=n.layout.gridHeight/n.globals.dataPoints;const d=n.config.plotOptions.bar.barHeight;String(d).indexOf("%")===-1?l=parseInt(d,10):l=i*parseInt(d,10)/100,o=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(i-l)/2}else{s=n.layout.gridWidth/n.globals.dataPoints,c=s;const d=n.config.plotOptions.bar.columnWidth;n.axisFlags.isXNumeric&&n.globals.dataPoints>1?(s=n.globals.minXDiff/this.xRatio,c=s*parseInt(this.barOptions.columnWidth,10)/100):String(d).indexOf("%")===-1?c=parseInt(d,10):c*=parseInt(d,10)/100,this.isReversed?a=this.baseLineY[r]:a=n.layout.gridHeight-this.baseLineY[r],t=n.globals.padHorizontal+(s-c)/2}const h=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:s,barHeight:(l??0)/h,barWidth:(c??0)/h,zeroH:a,zeroW:o}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:o,columnGroupIndex:r,seriesGroup:n,yDivision:l,elSeries:c}){var h,d,f,p,g;const u=this.w,x=o+r*e;let b;
1143const w=t.i,m=t.j,y=t.realIndex,v=t.translationsIndex;let C=0;for(let k=0;k<this.groupCtx.prevXF.length;k++)C=C+this.groupCtx.prevXF[k][m];let D=w;if(u.config.series[y].name&&(D=n.indexOf(u.config.series[y].name)),D>0){let k=i;this.groupCtx.prevXVal[D-1][m]<0?k=((h=this.series[w])==null?void 0:h[m])>=0?this.groupCtx.prevX[D-1][m]+C-(this.isReversed?C:0)*2:this.groupCtx.prevX[D-1][m]:this.groupCtx.prevXVal[D-1][m]>=0&&(k=((d=this.series[w])==null?void 0:d[m])>=0?this.groupCtx.prevX[D-1][m]:this.groupCtx.prevX[D-1][m]-C+(this.isReversed?C:0)*2),b=k}else b=i;((f=this.series[w])==null?void 0:f[m])===null?a=b:a=b+((p=this.series[w])==null?void 0:p[m])/this.invertedYRatio-(this.isReversed?((g=this.series[w])==null?void 0:g[m])/this.invertedYRatio:0)*2;const S=this.barHelpers.getBarpaths({barYPosition:x,barHeight:e,x1:b,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:w,j:m,w:u});return this.barHelpers.barBackground({j:m,i:w,y1:x,y2:e,elSeries:c}),o=o+l,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",i,null,w,m,v),barXPosition:b,barYPosition:x,x:a,y:o}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:o,columnGroupIndex:r,seriesGroup:n,elSeries:l}){var c,h,d,f,p,g,u,x,b;const w=this.w,m=t.i,y=t.j,v=t.bc,C=t.realIndex,D=t.translationsIndex;if(w.axisFlags.isXNumeric){let E=w.seriesData.seriesX[C][y];E||(E=0),e=(E-w.globals.minX)/this.xRatio-a/2*w.globals.barGroups.length}const S=e+r*a;let k,M=0;for(let E=0;E<this.groupCtx.prevYF.length;E++)M=M+(isNaN(this.groupCtx.prevYF[E][y])?0:this.groupCtx.prevYF[E][y]);let L=m;if(n&&(L=n.indexOf(w.seriesData.seriesNames[C])),L>0&&!w.axisFlags.isXNumeric||L>0&&w.axisFlags.isXNumeric&&w.seriesData.seriesX[C-1][y]===w.seriesData.seriesX[C][y]){let E,_;const X=Math.min(this.yRatio.length+1,C+1);if(this.groupCtx.prevY[L-1]!==void 0&&this.groupCtx.prevY[L-1].length){for(let F=1;F<X;F++)if(!isNaN((c=this.groupCtx.prevY[L-F])==null?void 0:c[y])){_=this.groupCtx.prevY[L-F][y];break}}for(let F=1;F<X;F++)if(((h=this.groupCtx.prevYVal[L-F])==null?void 0:h[y])<0){E=((d=this.series[m])==null?void 0:d[y])>=0?_-M+(this.isReversed?M:0)*2:_;break}else if(((f=this.groupCtx.prevYVal[L-F])==null?void 0:f[y])>=0){E=((p=this.series[m])==null?void 0:p[y])>=0?_:_+M-(this.isReversed?M:0)*2;break}typeof E>"u"&&(E=w.layout.gridHeight),(g=this.groupCtx.prevYF[0])!=null&&g.every(F=>F===0)&&this.groupCtx.prevYF.slice(1,L).every(F=>F.every(z=>isNaN(z)))?k=o:k=E}else k=o;(u=this.series[m])!=null&&u[y]?s=k-((x=this.series[m])==null?void 0:x[y])/this.yRatio[D]+(this.isReversed?((b=this.series[m])==null?void 0:b[y])/this.yRatio[D]:0)*2:s=k;const P=this.barHelpers.getColumnPaths({barXPosition:S,barWidth:a,y1:k,y2:s,yRatio:this.yRatio[D],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:m,j:y,w});return this.barHelpers.barBackground({bc:v,j:y,i:m,x1:S,x2:a,elSeries:l}),{pathTo:P.pathTo,pathFrom:P.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,o,m,y,0),barXPosition:S,x:w.axisFlags.isXNumeric?e:e+i,y:s}}}function is({w:A,points:t,seedA:e,seedB:s,center:i,halfExtent:a,alongFn:o,isHorizontal:r,options:n,clampAt:l}){const c=n;if(!c||c.show===!1)return[];if(!t||!t.length)return[];const h=c.maxPoints||3e3,d=t.length>h?Math.ceil(t.length/h):1,f=c.size!=null?c.size:2.5,p=c.jitter!=null?c.jitter:.5,g=a*p,u=c.constrainToViolin!==!1&&typeof l=="function",x=c.shape==="square",b=c.colorScale,w=b&&Array.isArray(b.colors)&&b.colors.length>0,m=w?Math.max(2,b.steps||24):1,y=w&&b.min!=null?b.min:A.globals.minY,C=(w&&b.max!=null?b.max:A.globals.maxY)-y||1,D=w?new Array(m).fill(""):[""];for(let k=0;k<t.length;k+=d){const M=t[k],L=o(M);let P=(ge(e*7919+s*100003+k)-.5)*2*g;if(u){const F=l(M);P>F&&(P=F),P<-F&&(P=-F)}const E=r?L:i+P,_=r?i+P:L,X=x?Ni(E,_,f):Bi(E,_,f);if(w){let F=(M-y)/C;F<0&&(F=0),F>1&&(F=1),D[Math.round(F*(m-1))]+=X}else D[0]+=X}if(!w)return D[0]?[{fill:null,d:D[0]}]:[];const S=[];for(let k=0;k<m;k++)D[k]&&S.push({fill:Yi(b.colors,k/(m-1)),d:D[k]});return S}function as({graphics:A,w:t,elSeries:e,pointsByCat:s,options:i,distributed:a,realIndex:o,wrapClass:r,pointClass:n}){if(!i||i.show===!1||!s.length)return;const l=i.opacity!=null?i.opacity:.9,c=i.strokeColor!=null?i.strokeColor:"#fff",h=i.strokeWidth!=null?i.strokeWidth:1,d=t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged,f=A.group({class:d?`${r} apexcharts-element-hidden`:r});d&&t.globals.delayedElements.push({el:f.node}
vendor: 4,278 bytes, line 1143
1143),s.forEach(({groups:p,j:g})=>{const u=a?t.globals.colors[g]:t.globals.colors[o],x=i.fillColor,b=x==="series"?u:x==="series-dark"?Fe(u,.45):x||Fe(u,.45);p.forEach(w=>{const m=A.drawPath({d:w.d,fill:w.fill!=null?w.fill:b,stroke:h>0?c:"none",strokeWidth:h,fillOpacity:l,classes:n});m.attr("data:realIndex",o),m.attr("j",g),m.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),m.node.style.pointerEvents="none",f.add(m)})}),e.add(f)}function Fe(A,t){const e=T.parseHex(A);if(!e)return A;const s=Math.max(0,1-t);return`rgb(${Math.round(e[0]*s)},${Math.round(e[1]*s)},${Math.round(e[2]*s)})`}function Yi(A,t){if(!A.length)return"#000";if(A.length===1)return A[0];const e=Math.max(0,Math.min(1,t))*(A.length-1),s=Math.floor(e),i=e-s,a=T.parseHex(A[s])||[0,0,0],o=T.parseHex(A[Math.min(s+1,A.length-1)])||a,r=(n,l)=>Math.round(n+(l-n)*i);return`rgb(${r(a[0],o[0])},${r(a[1],o[1])},${r(a[2],o[2])})`}function ge(A){let t=(A^2654435769)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}function Bi(A,t,e){return`M ${A-e} ${t} a ${e} ${e} 0 1 0 ${2*e} 0 a ${e} ${e} 0 1 0 ${-2*e} 0 `}function Ni(A,t,e){return`M ${A-e} ${t-e} h ${2*e} v ${2*e} h ${-2*e} z `}class Re extends gt{draw(t,e,s){var i;const a=this.w,o=new R(this.w),r=a.globals.comboCharts?e:a.config.chart.type,n=new nt(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type==="ohlc",this.coreUtils=new et(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const l=o.group({class:`apexcharts-${r}-series apexcharts-plot-series`});for(let c=0;c<t.length;c++){this.isBoxPlot=a.config.chart.type==="boxPlot"||a.config.series[c].type==="boxPlot";let h,d;const f=[],p=[],g=a.globals.comboCharts?s[c]:c,{columnGroupIndex:u}=this.barHelpers.getGroupIndex(g),x=o.group({class:"apexcharts-series",seriesName:T.escapeString(a.seriesData.seriesNames[g]),rel:c+1,"data:realIndex":g});tt.addCollapsedClassToSeries(this.w,x,g),t[c].length>0&&(this.visibleI=this.visibleI+1);let b=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[g][0],b=g);const w=this.barHelpers.initialPositions(g),{y:m,barHeight:y,yDivision:v,zeroW:C,x:D,barWidth:S,xDivision:k,zeroH:M}=w;d=m,h=D,p.push(h+(S??0)/2);const L=o.group({class:"apexcharts-datalabels","data:realIndex":g}),P=o.group({class:"apexcharts-bar-goals-markers"}),E=this.isBoxPlot?this.boxOptions.points:null,_=[],X=a.layout.gridWidth,F=S??0;for(let z=0;z<a.globals.dataPoints;z++){const O=this.barHelpers.getStrokeWidth(c,z,g);let N=null;const H={indexes:{i:c,j:z,realIndex:g,translationsIndex:b},x:h,y:d,strokeWidth:O,elSeries:x};if(this.isHorizontal?N=this.drawHorizontalBoxPaths(G($({},H),{yDivision:v,barHeight:y,zeroW:C})):N=this.drawVerticalBoxPaths(G($({},H),{xDivision:k,barWidth:S,zeroH:M,cullBounds:{lo:-F,hi:X+F}})),d=N.y,h=N.x,z>0&&p.push(h+(S??0)/2),f.push(d),N.culled)continue;const I=this.barHelpers.drawGoalLine({barXPosition:N.barXPosition,barYPosition:N.barYPosition,goalX:N.goalX,goalY:N.goalY,barHeight:y,barWidth:S});if(I&&P.add(I),N.pathTo.forEach((Y,V)=>{const q=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?N.color[V]:a.globals.stroke.colors[c],K=n.fillPath({seriesNumber:g,dataPointIndex:z,color:N.color[V],value:t[c][z]});this.renderSeries({realIndex:g,pathFill:K,lineFill:q,j:z,i:c,pathFrom:N.pathFrom,pathTo:Y,strokeWidth:O,elSeries:x,x:h,y:d,series:t,columnGroupIndex:u,barHeight:y,barWidth:S,elDataLabelsWrap:L,elGoalsMarkers:P,visibleSeries:this.visibleI,type:a.config.chart.type})}),E&&E.show!==!1){const Y=(i=a.candleData.seriesBoxPoints[g])==null?void 0:i[z];if(Y&&Y.length){const V=J=>this.coreUtils.getLogValAtSeriesIndex(J,g);let q,K,Q;if(this.isHorizontal){const J=this.invertedYRatio,ct=y??0,j=C??0;q=N.barYPosition+ct/2,K=ct/2,Q=Kt=>j+V(Kt)/J}else{const J=this.yRatio[b],ct=S??0,j=M??0;q=N.barXPosition+ct/2,K=ct/2,Q=Kt=>j-V(Kt)/J}const st=is({w:a,points:Y,seedA:g,seedB:z,center:q,halfExtent:K,alongFn:Q,isHorizontal:this.isHorizontal,options:E});st.length&&_.push({groups:st,j:z})}}}
vendor: 5,636 bytes, line 1143
1143E&&as({graphics:o,w:a,elSeries:x,pointsByCat:_,options:E,distributed:a.config.plotOptions.bar.distributed,realIndex:g,wrapClass:"apexcharts-boxPlot-points-wrap",pointClass:"apexcharts-boxPlot-points"}),a.globals.seriesXvalues[g]=p,a.globals.seriesYvalues[g]=f,l.add(x)}return l}drawVerticalBoxPaths({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a,strokeWidth:o,cullBounds:r=null}){var n,l;const c=this.w,h=new R(this.w),d=t.i,f=t.j,{colors:p}=c.config.plotOptions.candlestick,{colors:g}=this.boxOptions,u=t.realIndex,x=_=>Array.isArray(_)?_[u]:_,b=x(p.upward),w=x(p.downward),m=this.yRatio[t.translationsIndex],y=this.getOHLCValue(u,f);let v=a,C=a,D=y.o<y.c?[b]:[w];this.isBoxPlot&&(D=[x(g.lower),x(g.upper)]);let S=Math.min(y.o,y.c),k=Math.max(y.o,y.c),M=y.m;c.axisFlags.isXNumeric&&(e=(c.seriesData.seriesX[u][f]-c.globals.minX)/this.xRatio-i/2);const L=e+i*this.visibleI;if(typeof((n=this.series[d])==null?void 0:n[f])>"u"||((l=this.series[d])==null?void 0:l[f])===null?(S=a,k=a):(S=a-S/m,k=a-k/m,v=a-y.h/m,C=a-y.l/m,M=a-y.m/m),r&&(L+i<r.lo||L>r.hi))return{pathTo:null,pathFrom:null,x:c.axisFlags.isXNumeric?e:e+s,y:k,barXPosition:L,color:D,culled:!0};let P;if(this.isOHLC){const _=L+i/2,X=a-y.o/m,F=a-y.c/m;P=[h.move(_,v)+h.line(_,C)+h.move(_,X)+h.line(L,X)+h.move(_,F)+h.line(L+i,F)]}else this.isBoxPlot?P=[h.move(L,S)+h.line(L+i/2,S)+h.line(L+i/2,v)+h.line(L+i/4,v)+h.line(L+i-i/4,v)+h.line(L+i/2,v)+h.line(L+i/2,S)+h.line(L+i,S)+h.line(L+i,M)+h.line(L,M)+h.line(L,S+o/2),h.move(L,M)+h.line(L+i,M)+h.line(L+i,k)+h.line(L+i/2,k)+h.line(L+i/2,C)+h.line(L+i-i/4,C)+h.line(L+i/4,C)+h.line(L+i/2,C)+h.line(L+i/2,k)+h.line(L,k)+h.line(L,M)+"z"]:P=[h.move(L,k)+h.line(L+i/2,k)+h.line(L+i/2,v)+h.line(L+i/2,k)+h.line(L+i,k)+h.line(L+i,S)+h.line(L+i/2,S)+h.line(L+i/2,C)+h.line(L+i/2,S)+h.line(L,S)+h.line(L,k-o/2)];let E;return c.globals.previousPaths.length>0?E=this.getPreviousPath(u,f,P[0]):E=h.move(L+i/2,S)+h.move(L,S),c.axisFlags.isXNumeric||(e=e+s),{pathTo:P,pathFrom:E,x:e,y:k,goalY:this.barHelpers.getGoalValues("y",null,a,d,f,t.translationsIndex),barXPosition:L,color:D}}drawHorizontalBoxPaths({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a,strokeWidth:o}){var r,n;const l=this.w,c=new R(this.w),h=t.i,d=t.j,f=t.realIndex,{colors:p}=l.config.plotOptions.candlestick,{colors:g}=this.boxOptions,u=L=>Array.isArray(L)?L[f]:L,x=this.invertedYRatio,b=this.getOHLCValue(f,d);let w=b.o<b.c?[u(p.upward)]:[u(p.downward)];this.isBoxPlot&&(w=[u(g.lower),u(g.upper)]);let m=a,y=a,v=Math.min(b.o,b.c),C=Math.max(b.o,b.c),D=b.m;l.axisFlags.isXNumeric&&(e=(l.seriesData.seriesX[f][d]-l.globals.minX)/this.invertedXRatio-i/2);const S=e+i*this.visibleI;typeof((r=this.series[h])==null?void 0:r[d])>"u"||((n=this.series[h])==null?void 0:n[d])===null?(v=a,C=a):(v=a+v/x,C=a+C/x,m=a+b.h/x,y=a+b.l/x,D=a+b.m/x);const k=[c.move(v,S)+c.line(v,S+i/2)+c.line(m,S+i/2)+c.line(m,S+i/2-i/4)+c.line(m,S+i/2+i/4)+c.line(m,S+i/2)+c.line(v,S+i/2)+c.line(v,S+i)+c.line(D,S+i)+c.line(D,S)+c.line(v+o/2,S),c.move(D,S)+c.line(D,S+i)+c.line(C,S+i)+c.line(C,S+i/2)+c.line(y,S+i/2)+c.line(y,S+i-i/4)+c.line(y,S+i/4)+c.line(y,S+i/2)+c.line(C,S+i/2)+c.line(C,S)+c.line(D,S)+"z"];let M;return l.globals.previousPaths.length>0?M=this.getPreviousPath(f,d,k[0]):M=c.move(v,S+i/2)+c.move(v,S),l.axisFlags.isXNumeric||(e=e+s),{pathTo:k,pathFrom:M,x:C,y:e,goalX:this.barHelpers.getGoalValues("x",a,null,h,d,0),barYPosition:S,color:w}}getOHLCValue(t,e){const s=this.w,i=this.coreUtils,a=h=>h[t]&&h[t][e]!=null?i.getLogValAtSeriesIndex(h[t][e],t):0,o=a(s.candleData.seriesCandleH),r=a(s.candleData.seriesCandleO),n=a(s.candleData.seriesCandleM),l=a(s.candleData.seriesCandleC),c=a(s.candleData.seriesCandleL);return{o:this.isBoxPlot?o:r,h:this.isBoxPlot?r:o,m:n,l:this.isBoxPlot?l:c,c:this.isBoxPlot?c:l}}}const Oi=A=>{const t=zi(A),e=A.length-1,s=1e-6,i=[];let a,o,r,n;for(let l=0;l<e;l++)r=ue(A[l],A[l+1]),Math.abs(r)<s?t[l]=t[l+1]=0:(a=t[l]/r,o=t[l+1]/r,n=a*a+o*o,n>9&&(n=r*3/Math.sqrt(n),t[l]=n*a,t[l+1]=n*o));for(let l=0;l<=e;l++)n=(A[Math.min(e,l+1)][0]-A[Math.max(0,l-1)][0])/(6*(1+t[l]*t[l])),i.push([n||0,t[l]*n||0]);return i},os=A=>{let t="";for(let e=0;e<A.length;e++){const s=A[e],i=s.length;i>4?(t+=`C${s[0]}, ${s[1]}`,t+=`, ${s[2]}, ${s[3]}`,t+=`, ${s[4]}, ${s[5]}`):i>2&&(t+=`S${s[0]}, ${s[1]}`,t+=`, ${s[2]}, ${s[3]}`)}return t},pe={points(A){const t=Oi(A),e=A[1],s=A[0],i=[],a=t[1],o=t[0];i.push(s,[s[0]+o[0],s[1]+o[1],e[0]-a[0],e[1]-a[1],e[0],e[1]]);for(let r=2,n=t.length;r<n;r++){const l=A[r],c=t[r];i.push([l[0]-c[0],l[1]-c[1],l[0],l[1]])}return i},slice(A,t,e){const s=A.slice(t,e);if(t){if(e-t>1&&s[1].length<6){const i=s[0].length;s[1]=[s[0][i-2]*2-s[0][i-4],s[0][i-1]*2-s[0][i-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s}};function ue(A,t){return(t[1]-A[1])/(t[0]-A[0])}function zi(A){const t=[];let e=A[0],s=A[1],i=t[0]=ue(e,s),a=1;for(let o=A.length-1;a<o;a++)e=s,s=A[a+1],t[a]=(i+(i=ue(e,s)))*.5;return t[a]=i,t}class Hi extends gt{draw(t,e,s){const i=this.w,a=new R(this.w),o=new nt(this.w);this.violinOptions=i.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=i.config.plotOptions.bar.distributed,this.isHorizontal=i.config.plotOptions.bar.horizontal,this.coreUtils=new et(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const r=a.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let n=0;n<t.length;n++){let l,c;const h=[],d=[],f=i.globals.comboCharts?s[n]:n,{columnGroupIndex:p}
vendor: 9,980 bytes, line 1143
1143=this.barHelpers.getGroupIndex(f),g=a.group({class:"apexcharts-series",seriesName:T.escapeString(i.seriesData.seriesNames[f]),rel:n+1,"data:realIndex":f});tt.addCollapsedClassToSeries(this.w,g,f),t[n].length>0&&(this.visibleI=this.visibleI+1);let u=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[f][0],u=f);const x=this.barHelpers.initialPositions(f),{y:b,barHeight:w,yDivision:m,zeroW:y,x:v,barWidth:C,xDivision:D,zeroH:S}=x;c=b,l=v,d.push(l+(C??0)/2);const k=a.group({class:"apexcharts-datalabels","data:realIndex":f});this.seriesMaxWeight=0,this.normalize==="group"&&(i.violinData.seriesViolinDensity[f]||[]).forEach(P=>{P&&P.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=P.maxWeight)});const M=[];for(let L=0;L<i.globals.dataPoints;L++){const P=this.barHelpers.getStrokeWidth(n,L,f),E=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:n,j:L,realIndex:f,translationsIndex:u},y:c,yDivision:m,barHeight:w,zeroW:y}):this.drawVerticalViolin({indexes:{i:n,j:L,realIndex:f,translationsIndex:u},x:l,xDivision:D,barWidth:C,zeroH:S});l=E.x,c=E.y,L>0&&d.push(E.center),h.push(E.alongRepresentative);const _=this.buildPointsSubPath({realIndex:f,j:L,center:E.center,halfExtent:E.halfExtent,alongFn:E.alongFn,density:E.density,maxWeight:E.maxWeight});_.length&&M.push({groups:_,j:L});const X=o.fillPath({seriesNumber:this.distributed?L:f,dataPointIndex:L,color:this.distributed?i.globals.colors[L]:void 0,value:t[n][L]});this.renderSeries({realIndex:f,pathFill:X,lineFill:i.globals.stroke.colors[f],j:L,i:n,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:P,elSeries:g,x:l,y:c,series:t,columnGroupIndex:p,barHeight:w,barWidth:C,elDataLabelsWrap:k,visibleSeries:this.visibleI,type:"violin"});const F=g.node.querySelector(`path.apexcharts-violin-area[j='${L}']`);F&&isFinite(E.alongRepresentative)&&F.setAttribute(this.isHorizontal?"cx":"cy",`${E.alongRepresentative}`)}as({graphics:a,w:i,elSeries:g,pointsByCat:M,options:this.pointsOptions,distributed:this.distributed,realIndex:f,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),i.globals.seriesXvalues[f]=d,i.globals.seriesYvalues[f]=h,r.add(g)}return r}drawVerticalViolin({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a}){var o;const r=this.w,{realIndex:n,j:l,translationsIndex:c}=t,h=this.yRatio[c];r.axisFlags.isXNumeric&&(e=(r.seriesData.seriesX[n][l]-r.globals.minX)/this.xRatio-i/2);const f=e+i*this.visibleI+i/2,p=i/2,g=this.getDensity(n,l),u=this.effectiveMaxWeight(g),x=m=>a-this.logVal(m,n)/h,b=this.buildBodyPath({nodes:g.nodes,center:f,halfExtent:p,maxWeight:u,vertical:!0,alongFn:x,collapsed:!1});let w;return r.globals.previousPaths.length>0?w=this.getPreviousPath(n,l,b):w=this.buildBodyPath({nodes:g.nodes,center:f,halfExtent:p,maxWeight:u,vertical:!0,alongFn:x,collapsed:!0}),r.axisFlags.isXNumeric||(e=e+s),{pathTo:b,pathFrom:w,x:e,y:a,center:f,halfExtent:p,alongFn:x,density:g,maxWeight:u,alongRepresentative:x((o=this.series[t.i][l])!=null?o:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a}){var o;const r=this.w,{realIndex:n,j:l}=t,c=this.invertedYRatio;r.axisFlags.isXNumeric&&(e=(r.seriesData.seriesX[n][l]-r.globals.minX)/this.invertedXRatio-i/2);const d=e+i*this.visibleI+i/2,f=i/2,p=this.getDensity(n,l),g=this.effectiveMaxWeight(p),u=w=>a+this.logVal(w,n)/c,x=this.buildBodyPath({nodes:p.nodes,center:d,halfExtent:f,maxWeight:g,vertical:!1,alongFn:u,collapsed:!1});let b;return r.globals.previousPaths.length>0?b=this.getPreviousPath(n,l,x):b=this.buildBodyPath({nodes:p.nodes,center:d,halfExtent:f,maxWeight:g,vertical:!1,alongFn:u,collapsed:!0}),r.axisFlags.isXNumeric||(e=e+s),{pathTo:x,pathFrom:b,x:a,y:e,center:d,halfExtent:f,alongFn:u,maxWeight:g,density:p,alongRepresentative:u((o=this.series[t.i][l])!=null?o:0)}}getDensity(t,e){var s;const a=(s=this.w.violinData.seriesViolinDensity[t])==null?void 0:s[e];if(!a||!a.values.length)return{nodes:[],maxWeight:0};const o=a.values.map((l,c)=>c);o.sort((l,c)=>a.values[l]-a.values[c]);const r=[];let n=null;for(const l of o){const c=a.values[l];n!==null&&c===n||(r.push({v:c,w:a.weights[l]}),n=c)}return{nodes:r,maxWeight:a.maxWeight}}effectiveMaxWeight(t){return this.normalize==="group"&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:s,maxWeight:i,vertical:a,alongFn:o,collapsed:r}){const n=new R(this.w);if(t.length===0){const d=o(0);return a?n.move(e,d)+n.line(e,d):n.move(d,e)+n.line(d,e)}const l=d=>{if(r||i<=0)return 0;const f=d/i*s*this.bandwidthScale;return Math.min(s,Math.max(0,f))},c=[],h=[];for(let d=0;d<t.length;d++){const f=o(t[d].v),p=l(t[d].w);a?(c.push([e+p,f]),h.push([e-p,f])):(c.push([f,e+p]),h.push([f,e-p]))}return h.reverse(),this.smoothSegment(c,a,!1)+this.smoothSegment(h,a,!0)+"z"}smoothSegment(t,e,s){const i=new R(this.w),a=t[0];let o=s?i.line(a[0],a[1]):i.move(a[0],a[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let h=1;h<t.length;h++)o+=i.line(t[h][0],t[h][1]);return o}const n=t.map(([h,d])=>e?[d,h]:[h,d]),l=pe.points(n),c=e?l.map(Wi):l;return o+=os(c),o}strictlyMonotonic(t,e){const s=e?1:0;for(let i=1;i<t.length;i++)if(t[i][s]===t[i-1][s])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:s,halfExtent:i,alongFn:a,density:o,maxWeight:r}){var n;return is({w:this.w,points:(n=this.w.violinData.seriesViolinPoints[t])==null?void 0:n[e],seedA:t,seedB:e,center:s,halfExtent:i,alongFn:a,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:l=>this.halfWidthAtValue(l,o,i,r)})}halfWidthAtValue(t,e,s,i){const{nodes:a}=e,o=i??e.maxWeight;if(!a.length||o<=0)return 0;const r=n=>Math.min(s,n/o*s*this.bandwidthScale);if(t<=a[0].v)return r(a[0].w);if(t>=a[a.length-1].v)return r(a[a.length-1].w);for(let n=1;n<a.length;n++)if(t<=a[n].v){const l=a[n-1],c=a[n],h=c.v===l.v?0:(t-l.v)/(c.v-l.v);return r(l.w+(c.w-l.w)*h)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}function Wi(A){const t=[];for(let e=0;e<A.length;e+=2)t.push(A[e+1],A[e]);return t}class rs{constructor(t,e){this.ctx=e,this.w=t}checkColorRange(){const t=this.w;let e=!1;const s=t.config.plotOptions[t.config.chart.type];return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(i=>{i.from<=0&&(e=!0)}),e}getShadeColor(t,e,s,i){const a=this.w;let o=1;const r=a.config.plotOptions[t].shadeIntensity,n=this.determineColor(t,e,s);a.globals.hasNegs||i?a.config.plotOptions[t].reverseNegativeShade?n.percent<0?o=n.percent/100*(r*1.25):o=(1-n.percent/100)*(r*1.25):n.percent<=0?o=1-(1+n.percent/100)*r:o=(1-n.percent/100)*r:(o=1-n.percent/100,t==="treemap"&&(o=(1-n.percent/100)*(r*1.25)));let l=n.color;const c=new T;if(a.config.plotOptions[t].enableShades)if(this.w.config.theme.mode==="dark"){const h=c.shadeColor(o*-1,n.color);l=T.hexToRgba(T.isColorHex(h)?h:T.rgb2hex(h),a.config.fill.opacity)}else{const h=c.shadeColor(o,n.color);l=T.hexToRgba(T.isColorHex(h)?h:T.rgb2hex(h),a.config.fill.opacity)}return{color:l,colorProps:n}}determineColor(t,e,s){const i=this.w,a=i.seriesData.series[e][s],o=i.config.plotOptions[t];let r=o.colorScale.inverse?s:e;o.distributed&&i.config.chart.type==="treemap"&&(r=s);let n=i.globals.colors[r],l=null,c=Math.min(...i.seriesData.series[e]),h=Math.max(...i.seriesData.series[e]);!o.distributed&&t==="heatmap"&&(c=i.globals.minY,h=i.globals.maxY),typeof o.colorScale.min<"u"&&(c=o.colorScale.min<i.globals.minY?o.colorScale.min:i.globals.minY,h=o.colorScale.max>i.globals.maxY?o.colorScale.max:i.globals.maxY);const d=Math.abs(h)+Math.abs(c);let f=d===0?0:100*a/d;return o.colorScale.ranges.length>0&&o.colorScale.ranges.map(g=>{if(a>=g.from&&a<=g.to){n=g.color,l=g.foreColor?g.foreColor:null,c=g.from,h=g.to;const u=Math.abs(h)+Math.abs(c);f=u===0?0:100*a/u}}),{color:n,foreColor:l,percent:f}}calculateDataLabels({text:t,x:e,y:s,i,j:a,colorProps:o,fontSize:r}){const l=this.w.config.dataLabels,c=new R(this.w),h=new kt(this.w,this.ctx);let d=null;if(l.enabled){d=c.group({class:"apexcharts-data-labels"});const f=l.offsetX,p=l.offsetY,g=e+f,u=s+parseFloat(l.style.fontSize)/3+p;h.plotDataLabelsText({x:g,y:u,text:t,i,j:a,color:o.foreColor,parent:d,fontSize:r,dataLabelsConfig:l})}return d}}class $i{constructor(t,e,s){this.ctx=e,this.w=t,this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new rs(t,e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(t){const e=this.w,s=new R(this.w,this.ctx),i=s.group({class:"apexcharts-heatmap"});i.attr("clip-path",`url(#gridRectMask${e.globals.cuid})`);const a=e.layout.gridWidth/e.globals.dataPoints,o=e.layout.gridHeight/e.seriesData.series.length;let r=0,n=!1;this.negRange=this.helpers.checkColorRange();const l=t.slice();e.config.yaxis[0].reversed&&(n=!0,l.reverse());for(let h=n?0:l.length-1;n?h<l.length:h>=0;n?h++:h--){const d=s.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:T.escapeString(e.seriesData.seriesNames[h]),rel:h+1,"data:realIndex":h});if(tt.addCollapsedClassToSeries(this.w,d,h),s.setupEventDelegation(d,".apexcharts-heatmap-rect"),e.config.chart.dropShadow.enabled){const u=e.config.chart.dropShadow;new at(this.w).dropShadow(d,u,h)}let f=0;const p=e.config.plotOptions.heatmap.shadeIntensity;let g=0;for(let u=0;u<e.globals.dataPoints;u++){if(e.seriesData.seriesX.length&&!e.globals.allSeriesHasEqualX&&e.globals.minX+e.globals.minXDiff*u<e.seriesData.seriesX[h][g]){f=f+a;continue}if(g>=l[h].length)break;const x=this.helpers.getShadeColor(e.config.chart.type,h,g,this.negRange);let b=x.color;const w=x.colorProps;e.config.fill.type==="image"&&(b=new nt(this.w).fillPath({seriesNumber:h,dataPointIndex:g,opacity:e.globals.hasNegs?w.percent<0?1-(1+w.percent/100):p+w.percent/100:w.percent/100,patternID:T.randomId(),width:e.config.fill.image.width?e.config.fill.image.width:a,height:e.config.fill.image.height?e.config.fill.image.height:o}));const m=this.rectRadius,y=s.drawRect(f,r,a,o,m);
1143if(y.attr({cx:f,cy:r}),y.node.classList.add("apexcharts-heatmap-rect"),d.add(y),y.attr({fill:b,i:h,index:h,j:g,val:t[h][g],"stroke-width":this.strokeWidth,stroke:e.config.plotOptions.heatmap.useFillColorAsStroke?b:e.globals.stroke.colors[0],color:b}),e.config.chart.animations.enabled&&!e.globals.dataChanged){let S=1;e.globals.resized||(S=e.config.chart.animations.speed),this.animateHeatMap(y,f,r,a,o,S,h,g)}if(e.globals.dataChanged){let S=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){S=this.dynamicAnim.speed;let k=e.globals.previousPaths[h]&&e.globals.previousPaths[h][g]&&e.globals.previousPaths[h][g].color;k||(k="rgba(255, 255, 255, 0)"),this.animateHeatColor(y,T.isColorHex(k)?k:T.rgb2hex(k),T.isColorHex(b)?b:T.rgb2hex(b),S)}}const v=e.config.dataLabels.formatter,C=v(e.seriesData.series[h][g],{value:e.seriesData.series[h][g],seriesIndex:h,dataPointIndex:g,w:e}),D=this.helpers.calculateDataLabels({text:C,x:f+a/2,y:r+o/2,i:h,j:g,colorProps:w,series:l});D!==null&&d.add(D),f=f+a,g++}r=r+o,i.add(d)}const c=e.globals.yAxisScale[0].result.slice();return e.config.yaxis[0].reversed?c.unshift(""):c.push(""),e.globals.yAxisScale[0].result=c,i}animateHeatMap(t,e,s,i,a,o,r=0,n=0){const l=this.w,c=new Tt(this.w),d=l.config.chart.animations.animateGradually,f=d&&d.enabled!==!1;let p=0;if(f){const g=(l.seriesData.series||[]).length||1,u=l.globals.dataPoints||1,x=g+u-2,b=Math.min(d.delay||0,o*.5/Math.max(1,x));p=be({style:"diagonal",index:n,row:r,col:n,baseDelay:b})}c.animateRect(t,{x:e+i/2,y:s+a/2,width:0,height:0},{x:e,y:s,width:i,height:a},o,()=>{c.animationCompleted(t)},p)}animateHeatColor(t,e,s,i){t.attr({fill:e}).animate(i).attr({fill:s})}}class Gi{constructor(t){this.w=t.w,this.lineCtx=t}sameValueSeriesFix(t,e){const s=this.w;if((s.config.fill.type==="gradient"||s.config.fill.type[t]==="gradient")&&new et(this.lineCtx.w).seriesHaveSameValues(t)){const a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}calculatePoints({series:t,realIndex:e,x:s,y:i,i:a,j:o,prevY:r}){const n=this.w,l=[],c=[];let h=this.lineCtx.categoryAxisCorrection+n.config.markers.offsetX;return n.axisFlags.isXNumeric&&(h=(n.seriesData.seriesX[e][0]-n.globals.minX)/this.lineCtx.xRatio+n.config.markers.offsetX),o===0&&(l.push(h),c.push(T.isNumber(t[a][0])?r+n.config.markers.offsetY:null)),l.push(s+n.config.markers.offsetX),c.push(T.isNumber(t[a][o+1])?i+n.config.markers.offsetY:null),{x:l,y:c}}checkPreviousPaths({pathFromLine:t,pathFromArea:e,realIndex:s}){const i=this.w;for(let a=0;a<i.globals.previousPaths.length;a++){const o=i.globals.previousPaths[a];(o.type==="line"||o.type==="area")&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(s,10)&&(o.type==="line"?(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[a].paths[0].d):o.type==="area"&&(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[a].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[a].paths[1]&&(t=i.globals.previousPaths[a].paths[1].d)))}return{pathFromLine:t,pathFromArea:e}}determineFirstPrevY({i:t,realIndex:e,series:s,prevY:i,lineYPosition:a,translationsIndex:o}){var r,n,l;const c=this.w,h=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((r=this.w.config.series[e])==null?void 0:r.type)==="bar"||((n=this.w.config.series[e])==null?void 0:n.type)==="column");if(typeof((l=s[t])==null?void 0:l[0])<"u")h?t>
11430?a=this.lineCtx.prevSeriesY[t-1][0]:a=this.lineCtx.zeroY:a=this.lineCtx.zeroY,i=a-s[t][0]/this.lineCtx.yRatio[o]+(this.lineCtx.isReversed?s[t][0]/this.lineCtx.yRatio[o]:0)*2;else if(h&&t>0&&typeof s[t][0]>"u"){for(let d=t-1;d>=0;d--)if(s[d][0]!==null&&typeof s[d][0]<"u"){a=this.lineCtx.prevSeriesY[d][0],i=a;break}}return{prevY:i,lineYPosition:a}}}class _t{constructor(t,e,s,i){this.ctx=e,this.w=t,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||i,this.scatter=new Ge(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Gi(this),this.markers=new Pt(this.w,this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null}draw(t,e,s,i){var a;const o=this.w,r=new R(this.w),n=o.globals.comboCharts?e:o.config.chart.type,l=r.group({class:`apexcharts-${n}-series apexcharts-plot-series`}),c=new et(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=c.getLogSeries(t),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[];const h=[];for(let d=0;d<t.length;d++){t=this.lineHelpers.sameValueSeriesFix(d,t);const f=o.globals.comboCharts?s[d]:d,p=this.yRatio.length>1?f:0;this._initSerieVariables(t,d,f);const g=[],u=[],x=[];let b=o.globals.padHorizontal+this.categoryAxisCorrection;const w=1,m=[],y=[];tt.addCollapsedClassToSeries(this.w,this.elSeries,f),o.axisFlags.isXNumeric&&o.seriesData.seriesX.length>0&&(b=(o.seriesData.seriesX[f][0]-o.globals.minX)/this.xRatio),x.push(b);const v=b;let C;const D=v;let S=this.zeroY,k=this.zeroY;const M=0;S=this.lineHelpers.determineFirstPrevY({i:d,realIndex:f,series:t,prevY:S,lineYPosition:M,translationsIndex:p}).prevY,o.config.stroke.curve==="monotoneCubic"&&t[d][0]===null?g.push(null):g.push(S);const P=S;let E;n==="rangeArea"&&(E=this.lineHelpers.determineFirstPrevY({i:d,realIndex:f,series:i,prevY:k,lineYPosition:M,translationsIndex:p}),k=E.prevY,C=k,u.push(g[0]!==null?k:null));const _=this._calculatePathsFrom({type:n,series:t,i:d,realIndex:f,translationsIndex:p,prevX:D,prevY:S,prevY2:k}),X=[g[0]],F=[u[0]],z={type:n,series:t,realIndex:f,translationsIndex:p,i:d,x:b,y:w,pX:v,pY:P,pathsFrom:_,linePaths:m,areaPaths:y,seriesIndex:s,lineYPosition:M,xArrj:x,yArrj:g,y2Arrj:u,seriesRangeEnd:i},O=this._iterateOverDataPoints(G($({},z),{iterations:n==="rangeArea"?t[d].length-1:void 0,isRangeStart:!0}));if(n==="rangeArea"){const N=this._calculatePathsFrom({series:i,i:d,realIndex:f,prevX:D,prevY:k}),H=this._iterateOverDataPoints(G($({},z),{series:i,xArrj:[b],yArrj:X,y2Arrj:F,pY:C,areaPaths:O.areaPaths,pathsFrom:N,iterations:i[d].length-1,isRangeStart:!1})),I=O.linePaths.length/2;for(let Y=0;Y<I;Y++)O.linePaths[Y]=H.linePaths[Y+I]+O.linePaths[Y];O.linePaths.splice(I),O.pathFromLine=H.pathFromLine+O.pathFromLine}else O.pathFromArea+="z";this._handlePaths({type:n,realIndex:f,i:d,paths:O}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),h.push(this.elSeries)}if(typeof((a=o.config.series[0])==null?void 0:a.zIndex)<"u"&&h.sort((d,f)=>Number(d.node.getAttribute("zIndex"))-Number(f.node.getAttribute("zIndex"))),o.config.chart.stacked)for(let d=h.length-1;d>=0;d--)l.add(h[d]);else for(let d=0;d<h.length;d++)l.add(h[d]);return l}_initSerieVariables(t,e,s){const i=this.w,a=new R(this.w);this.xDivision=i.layout.gridWidth/(i.globals.dataPoints-(i.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;let o=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],o=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[o]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?this.baseLineY[o]*2:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||i.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const r=i.config.series[s];if(this.elSeries=a.group({class:"apexcharts-series",zIndex:typeof r.zIndex<"u"?r.zIndex:s,seriesName:T.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=a.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),i.globals.hasNullValues){const l=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]}
1143,seriesIndex:e,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});l!==null&&this.elPointsMain.add(l)}this.elDataLabelsWrap=a.group({class:"apexcharts-datalabels","data:realIndex":s});const n=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:t,series:e,i:s,realIndex:i,translationsIndex:a,prevX:o,prevY:r,prevY2:n}){const l=this.w,c=new R(this.w);let h,d,f,p;if(e[s][0]===null){for(let g=0;g<e[s].length;g++)if(e[s][g]!==null){o=this.xDivision*g,r=this.zeroY-e[s][g]/this.yRatio[a],h=c.move(o,r),d=c.move(o,this.areaBottomY);break}}else h=c.move(o,r),t==="rangeArea"&&(h=c.move(o,n)+c.line(o,r)),d=c.move(o,this.areaBottomY)+c.line(o,r);if(f=c.move(0,this.areaBottomY)+c.line(0,this.areaBottomY),p=c.move(0,this.areaBottomY)+c.line(0,this.areaBottomY),l.globals.previousPaths.length>0){const g=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:p,realIndex:i});f=g.pathFromLine,p=g.pathFromArea}return{prevX:o,prevY:r,linePath:h,areaPath:d,pathFromLine:f,pathFromArea:p}}_handlePaths({type:t,realIndex:e,i:s,paths:i}){const a=this.w,o=new R(this.w),r=new nt(this.w);this.prevSeriesY.push(i.yArrj),a.globals.seriesXvalues[e]=i.xArrj,a.globals.seriesYvalues[e]=i.yArrj;const n=a.config.forecastDataPoints;if(n.count>0&&t!=="rangeArea"){const c=a.globals.seriesXvalues[e][a.globals.seriesXvalues[e].length-n.count-1],h=o.drawRect(c,0,a.layout.gridWidth,a.layout.gridHeight,0);a.dom.elForecastMask.appendChild(h.node);const d=o.drawRect(0,0,c,a.layout.gridHeight,0);a.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||a.globals.delayedElements.push({el:this.elPointsMain.node,index:e});const l={i:s,realIndex:e,animationDelay:s,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${t}`};if(t==="area"){const c=r.fillPath({seriesNumber:e});for(let h=0;h<i.areaPaths.length;h++){const d=o.renderPaths(G($({},l),{pathFrom:i.pathFromArea,pathTo:i.areaPaths[h],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:c}));this.elSeries.add(d)}}if(a.config.stroke.show&&!this.pointsChart){let c=null;if(t==="line")c=r.fillPath({seriesNumber:e,i:s});else if(a.config.stroke.fill.type==="solid")c=a.globals.stroke.colors[e];else{const h=a.config.fill;a.config.fill=a.config.stroke.fill,c=r.fillPath({seriesNumber:e,i:s}),a.config.fill=h}for(let h=0;h<i.linePaths.length;h++){let d=c;t==="rangeArea"&&(d=r.fillPath({seriesNumber:e}));const f=G($({},l),{pathFrom:i.pathFromLine,pathTo:i.linePaths[h],stroke:c,strokeWidth:this.strokeWidth,strokeLineCap:a.config.stroke.lineCap,fill:t==="rangeArea"?d:"none"}),p=o.renderPaths(f);if(this.elSeries.add(p),p.attr("fill-rule","evenodd"),n.count>0&&t!=="rangeArea"){const g=o.renderPaths(f);g.node.setAttribute("stroke-dasharray",n.dashArray),n.strokeWidth&&g.node.setAttribute("stroke-width",n.strokeWidth),this.elSeries.add(g),g.attr("clip-path",`url(#forecastMask${a.globals.cuid})`),p.attr("clip-path",`url(#nonForecastMask${a.globals.cuid})`)}}}}_iterateOverDataPoints({type:t,series:e,iterations:s,realIndex:i,translationsIndex:a,i:o,x:r,y:n,pX:l,pY:c,pathsFrom:h,linePaths:d,areaPaths:f,seriesIndex:p,lineYPosition:g,xArrj:u,yArrj:x,y2Arrj:b,isRangeStart:w,seriesRangeEnd:m}){var y,v;const C=this.w,D=new R(this.w),S=this.yRatio;let{prevY:k,linePath:M,areaPath:L,pathFromLine:P,pathFromArea:E}=h;const _=T.isNumber(C.globals.minYArr[i])?C.globals.minYArr[i]:C.globals.minY;s||(s=C.globals.dataPoints>1?C.globals.dataPoints-1:C.globals.dataPoints);const X=(Y,V)=>V-Y/S[a]+(this.isReversed?Y/S[a]:0)*2;let F=n;const z=C.config.chart.stacked&&!C.globals.comboCharts||C.config.chart.stacked&&C.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((y=this.w.config.series[i])==null?void 0:y.type)==="bar"||((v=this.w.config.series[i])==null?void 0:v.type)==="column");let O=C.config.stroke.curve;Array.isArray(O)&&(Array.isArray(p)?O=O[p[o]]:O=O[o]);let N=0,H;const I=this.pointsChart?this._scatterJitterPx(i):null;for(let Y=0;Y<s&&e[o].length!==0;Y++){const V=typeof e[o][Y+1]>"u"||e[o][Y+1]===null;if(C.axisFlags.isXNumeric){let J=C.seriesData.seriesX[i][Y+1];typeof C.seriesData.seriesX[i][Y+1]>"u"&&(J=C.seriesData.seriesX[i][s-1]),r=(J-C.globals.minX)/this.xRatio}else r=r+this.xDivision;if(z)if(o>0&&C.globals.collapsedSeries.length<C.config.series.length-1){const J=ct=>{for(let j=ct;j>0;j--)if(C.globals.collapsedSeriesIndices.indexOf((p==null?void 0:p[j])||j)>-1)j--;else return j;return 0};g=this.prevSeriesY[J(o-1)][Y+1]}else g=this.zeroY;else g=this.zeroY;V?n=X(_,g):(n=X(e[o][Y+1],g),t==="rangeArea"&&(F=X(m[o][Y+1],g)));let q=r,K=n;if(I){const J=i*100003+(Y+1);I.x&&(q=r+(ge(J*7919+13)-.5)*2*I.x),I.y&&(K=n+(ge(J*6271+97)-.5)*2*I.y)}u.push(e[o][Y+1]===null?null:q),V&&(C.config.stroke.curve==="smooth"||C.config.stroke.curve==="monotoneCubic")?(x.push(null),b.push(null)):(x.push(K),b.push(F));const Q=this.lineHelpers.calculatePoints({series:e,x:q,y:K,realIndex:i,i:o,j:Y,prevY:k}),st=this._createPaths({type:t,series:e,i:o,j:Y,x:r,y:n,y2:F,xArrj:u,yArrj:x,y2Arrj:b,pX:l,pY:c,pathState:N,segmentStartX:H,linePath:M,areaPath:L,linePaths:d,areaPaths:f,curve:O,isRangeStart:w});f=st.areaPaths,d=st.linePaths,l=st.pX,c=st.pY,N=st.pathState,H=st.segmentStartX,L=st.areaPath,M=st.linePath,this.appendPathFrom&&!C.globals.hasNullValues&&!(O==="monotoneCubic"&&t==="rangeArea")&&(P+=D.line(r,this.areaBottomY),E+=D.line(r,this.areaBottomY)),this.handleNullDataPoints(e,Q,o,Y,i),this._handleMarkersAndLabels({type:t,pointsPos:Q,i:o,j:Y,realIndex:i,isRangeStart:w})}return{yArrj:x,xArrj:u,pathFromArea:E,areaPaths:f,pathFromLine:P,linePaths:d,linePath:M,areaPath:L}}_handleMarkersAndLabels({type:t,pointsPos:e,isRangeStart:s,i,j:a,realIndex:o}){const r=this.w,n=new kt(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:o,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!r.globals.dataChanged&&!r.globals.resized)&&r.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const h=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:o,j:a+1});h!==null&&this.elPointsMain.add(h)}const l=n.drawDataLabel({type:t,isRangeStart:s,pos:e,i:o,j:a+1});l!==null&&this.elDataLabelsWrap.add(l)}_scatterJitterPx(t){var e;const s=this.w,i=(e=s.config.plotOptions.scatter)==null?void 0:e.jitter;if(!i||!i.enabled||!i.x&&!i.y)return null;const a=s.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,o=this.yRatio.length>1?t:0,r=this.yRatio[o]?1/this.yRatio[o]:0;return{x:(i.x||0)*a,y:(i.y||0)*r}}_createPaths({type:t,series:e,i:s,j:i,x:a,y:o,xArrj:r,yArrj:n,y2:l,y2Arrj:c,pX:h,pY:d,pathState:f,segmentStartX:p,linePath:g,areaPath:u,linePaths:x,areaPaths:b,curve:w,isRangeStart:m}){const y=new R(this.w),v=this.areaBottomY,C=t==="rangeArea",D=t==="rangeArea"&&m;switch(w){case"monotoneCubic":{const S=m?n:c,k=(P,E)=>P.map((_,X)=>
1143[_,E[X]]).filter(_=>_[1]!==null),M=P=>{const E=[];let _=0;return P.forEach(X=>{X!==null?_++:_>0&&(E.push(_),_=0)}),_>0&&E.push(_),E},L=(P,E)=>{const _=M(P),X=[];for(let F=0,z=0;F<_.length;z+=_[F++])X[F]=pe.slice(E,z,z+_[F]);return X};switch(f){case 0:if(S[i+1]===null)break;f=1;case 1:if(!(C?r.length===e[s].length:i===e[s].length-2))break;case 2:{const P=m?r:r.slice().reverse(),E=m?S:S.slice().reverse(),_=k(P,E),X=_.length>1?pe.points(_):_;let F=[];C&&(D?b=_:F=b.reverse());let z=0,O=0;if(L(E,X).forEach(N=>{z++;const H=os(N),I=O;O+=N.length;const Y=O-1;D?g=y.move(_[I][0],_[I][1])+H:C?g=y.move(F[I][0],F[I][1])+y.line(_[I][0],_[I][1])+H+y.line(F[Y][0],F[Y][1]):(g=y.move(_[I][0],_[I][1])+H,u=g+y.line(_[Y][0],v)+y.line(_[I][0],v)+"z",b.push(u)),x.push(g)}),C&&z>1&&!D){const N=x.slice(z).reverse();x.splice(z),N.forEach(H=>x.push(H))}f=0;break}}break}case"smooth":{const S=(a-h)*.35;if(e[s][i]===null)f=0;else switch(f){case 0:if(p=h,D?g=y.move(h,c[i])+y.line(h,d):g=y.move(h,d),u=y.move(h,d),e[s][i+1]===null||typeof e[s][i+1]>"u"){x.push(g),b.push(u);break}if(f=1,i<e[s].length-2){const k=y.curve(h+S,d,a-S,o,a,o);g+=k,u+=k;break}case 1:if(e[s][i+1]===null)D?g+=y.line(h,l):g+=y.move(h,d),u+=y.line(h,v)+y.line(p,v)+"z",x.push(g),b.push(u),f=-1;
1143else{const k=y.curve(h+S,d,a-S,o,a,o);g+=k,u+=k,i>=e[s].length-2&&(D&&(g+=y.curve(a,o,a,o,a,l)+y.move(a,l)),u+=y.curve(a,o,a,o,a,v)+y.line(p,v)+"z",x.push(g),b.push(u),f=-1)}break}h=a,d=o;break}default:{const S=(k,M,L)=>{let P="";switch(k){case"stepline":P=y.line(M,null,"H")+y.line(null,L,"V");break;case"linestep":P=y.line(null,L,"V")+y.line(M,null,"H");break;case"straight":P=y.line(M,L);break}return P};if(e[s][i]===null)f=0;else switch(f){case 0:if(p=h,D?g=y.move(h,c[i])+y.line(h,d):g=y.move(h,d),u=y.move(h,d),e[s][i+1]===null||typeof e[s][i+1]>"u"){x.push(g),b.push(u);break}if(f=1,i<e[s].length-2){const k=S(w,a,o);g+=k,u+=k;break}case 1:if(e[s][i+1]===null)D?g+=y.line(h,l):g+=y.move(h,d),u+=y.line(h,v)+y.line(p,v)+"z",x.push(g),b.push(u),f=-1;else{const k=S(w,a,o);g+=k,u+=k,i>=e[s].length-2&&(D&&(g+=y.line(a,l)),u+=y.line(a,v)+y.line(p,v)+"z",x.push(g),b.push(u),f=-1)}break}h=a,d=o;break}}return{linePaths:x,areaPaths:b,pX:h,pY:d,pathState:f,segmentStartX:p,linePath:g,areaPath:u}}handleNullDataPoints(t,e,s,i,a){const o=this.w;if(t[s][i]===null&&o.config.markers.showNullDataPoints||t[s].length===1){let r=this.strokeWidth-o.config.markers.strokeWidth/2;r>0||(r=0);const n=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:a,j:i+1,pSize:r,alwaysDrawMarker:!0});n!==null&&this.elPointsMain.add(n)}}}class $t{constructor(t){this.w=t}drawYAxisTexts(t,e,s,i){const a=this.w,o=a.config.yaxis[0],r=a.formatters.yLabelFormatters[0];return new R(this.w).drawText({x:t+o.labels.offsetX,y:e+o.labels.offsetY,text:r(i,s),textAnchor:"middle",fontSize:o.labels.style.fontSize,fontFamily:o.labels.style.fontFamily,foreColor:Array.isArray(o.labels.style.colors)?o.labels.style.colors[s]:o.labels.style.colors})}getMaxLabelWidth(t,{fontSize:e,fontFamily:s}={}){const i=new R(this.w);let a=0;return t.forEach(o=>{if(o===null||typeof o>"u"||o==="")return;const r=i.getTextRects(`${o}`,e||"12px",s,"");a=Math.max(a,r.width)}),a}drawExternalLabel({lines:t,lineHeight:e,anchor:s,elbow:i,labelX:a,labelY:o,side:r,connector:n,style:l,foreColor:c}){const h=new R(this.w),d=h.group({class:"apexcharts-pie-name-label-group"});if(n.show){const x=`M ${s.x} ${s.y} L ${i.x} ${i.y} L ${a} ${o}`,b=h.drawPath({d:x,stroke:n.color,strokeWidth:n.width,fill:"none",strokeLinecap:"round"});b.node.classList.add("apexcharts-pie-label-connector"),d.add(b)}const f=r==="right"?a+4:a-4,p=t.length,g=o-(p-1)*e/2,u=h.drawText({x:f,y:g,text:p===1?t[0]:t,textAnchor:r==="right"?"start":"end",fontSize:l.fontSize,fontFamily:l.fontFamily,fontWeight:l.fontWeight,foreColor:c,dominantBaseline:"central",cssClass:"apexcharts-pie-name-label"});if(p>1){const x=u.node.getElementsByTagName("tspan");for(let b=0;b<x.length;b++)x[b].setAttribute("x",`${f}`),x[b].setAttribute("dy",b===0?"0":`${e}`)}return d.add(u),d}}class Gt{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=Math.min(t.layout.gridWidth,t.layout.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.layout.gridWidth/2,t.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(t.config.plotOptions.pie.endAngle-t.config.plotOptions.pie.startAngle),this.initialAngle=t.config.plotOptions.pie.startAngle%this.fullAngle,t.globals.radialSize=this.defaultSize/2.05-t.config.stroke.width-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.externalCfg=t.config.plotOptions.pie.dataLabels.external;const s=t.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||s.fontSize,fontFamily:this.externalCfg.fontFamily||s.fontFamily,fontWeight:this.externalCfg.fontWeight||s.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,t.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&this.chartType!=="polarArea",this.showExternalLabels&&!t.globals.noData&&this.reserveExter
1143nalLabelSpace(),this.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100;const i=t.config.plotOptions.pie.customScale,a=t.layout.gridWidth/2,o=t.layout.gridHeight/2;this.translateX=a-a*i,this.translateY=o-o*i,this.dataLabelsGroup=new R(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${i})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}getExternalLabelText(t){var e,s,i;const a=this.w,o=a.seriesData.seriesNames[t],r=this.externalCfg.formatter;return typeof r=="function"?r(o,{seriesIndex:t,percent:(s=(e=a.globals.seriesPercent)==null?void 0:e[t])==null?void 0:s[0],value:(i=a.globals.seriesTotals)==null?void 0:i[t],w:a}):o==null?"":`${o}`}getExternalLabelLines(t){const e=this.getExternalLabelText(t);return(Array.isArray(e)?e:`${e??""}`.split(` 1144`)).map(i=>i==null?"":`${i}`)}reserveExternalLabelSpace(){const t=this.w,e=new $t(t),s=(t.seriesData.seriesNames||[]).map((d,f)=>this.getExternalLabelLines(f)),i=e.getMaxLabelWidth(s.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=s.reduce((d,f)=>Math.max(d,f.length),1),this.externalLabelLineH=Math.round((parseFloat(this.externalLabelStyle.fontSize)||12)*1.35);const a=this.externalCfg.connector,o=this.externalLabelMaxLines*this.externalLabelLineH,r=i+(a.length||0)+(a.gap||0)+12,n=o/2+(a.gap||0)+6,l=Math.min(t.globals.radialSize,t.layout.gridWidth/2-r,t.layout.gridHeight/2-n);t.globals.radialSize=Math.max(l,this.defaultSize*.15),t.globals.pieExternalLabelMarginY=n;const c=t.config.chart.height?String(t.config.chart.height):"",h=c!==""&&c!=="auto";this.centerY=h?t.layout.gridHeight/2:t.globals.radialSize+n}draw(t){var e;const s=this,i=this.w,a=new R(this.w),o=a.group({class:"apexcharts-pie"});if(i.globals.noData)return o;let r=0;for(let d=0;d<t.length;d++)r+=T.negToZero(t[d]);const n=[],l=a.group();r===0&&(r=1e-5),t.forEach(d=>{this.maxY=Math.max(this.maxY,d)}),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),i.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(o);for(let d=0;d<t.length;d++){const f=this.fullAngle*T.negToZero(t[d])/r;n.push(f),this.chartType==="polarArea"?(n[d]=this.fullAngle/t.length,this.sliceSizes.push(i.globals.radialSize*t[d]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}const c=((e=this.ctx.morphTypeChange)==null?void 0:e.isActive())===!0;if(i.globals.dataChanged&&!c){let d=0;for(let p=0;p<i.globals.previousPaths.length;p++)d+=T.negToZero(i.globals.previousPaths[p]);let f;for(let p=0;p<i.globals.previousPaths.length;p++)f=this.fullAngle*T.negToZero(i.globals.previousPaths[p])/d,this.prevSectorAngleArr.push(f)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){const d=a.drawCircle(this.donutSize);d.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),l.add(d)}const h=s.drawArcs(n,t);
vendor: 5,902 bytes, line 1144
1144if(this.sliceLabels.forEach(d=>{h.add(d)}),l.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${i.config.plotOptions.pie.customScale})`}),l.add(h),o.add(l),this.donutDataLabels.show){const d=this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged&&this.animDur>0,f=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:d?0:this.donutDataLabels.show});if(d){const p=this.dataLabelsGroup.node;p.style.transition="opacity 280ms ease-out",setTimeout(()=>{p.style.opacity="1"},this.animDur)}o.add(f)}return i.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(o),o}drawArcs(t,e){var s,i;const a=this.w,o=new at(this.w),r=new R(this.w),n=new nt(this.w),l=r.group({class:"apexcharts-slices"});let c=this.initialAngle,h=this.initialAngle,d=this.initialAngle,f=this.initialAngle;this.strokeWidth=a.config.stroke.show?a.config.stroke.width:0;const p=((s=this.ctx.morphTypeChange)==null?void 0:s.isActive())===!0;for(let g=0;g<t.length;g++){const u=r.group({class:"apexcharts-series apexcharts-pie-series",seriesName:T.escapeString(a.seriesData.seriesNames[g]),rel:g+1,"data:realIndex":g});l.add(u),c=d,h=f,d=c+t[g],f=h+this.prevSectorAngleArr[g];const x=d<c?this.fullAngle+d-c:d-c,b=n.fillPath({seriesNumber:g,size:this.sliceSizes[g],value:e[g]}),w=p?this.ctx.morphTypeChange.getInitialPathFor(g,0):null,m=w||this.getChangedPath(h,f),y=r.drawPath({d:m,stroke:Array.isArray(this.lineColorArr)?(i=this.lineColorArr[g])!=null?i:this.lineColorArr[g%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:b,fillOpacity:a.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${g}`});if(y.attr({index:0,j:g}),o.setSelectionFilter(y,0,g),a.config.chart.dropShadow.enabled){const k=a.config.chart.dropShadow;o.dropShadow(y,k,g)}this.addListeners(y,this.donutDataLabels);let v={x:0,y:0};const C=(c+x/2)%this.fullAngle;let D={x:this.centerX,y:this.centerY};this.chartType==="pie"||this.chartType==="polarArea"?(v=T.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize/1.25+a.config.plotOptions.pie.dataLabels.offset,C),D=T.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize/2,C)):this.chartType==="donut"&&(v=T.polarToCartesian(this.centerX,this.centerY,(a.globals.radialSize+this.donutSize)/2+a.config.plotOptions.pie.dataLabels.offset,C),D=T.polarToCartesian(this.centerX,this.centerY,(a.globals.radialSize+this.donutSize)/2,C)),R.setAttrs(y.node,{"data:angle":x,"data:startAngle":c,"data:strokeWidth":this.strokeWidth,"data:value":e[g],"data:cx":D.x,"data:cy":D.y}),u.add(y);let S=0;if(this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged?(S=x/this.fullAngle*a.config.chart.animations.speed,S===0&&(S=1),this.animDur=S+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),p&&w){const k=this.getPiePath({me:this,startAngle:c,angle:x,size:this.sliceSizes[g]}),M=this.ctx.morphTypeChange.getSpeed(),L=this.ctx.animations;y.node.setAttribute("data:pathOrig",k);const P=y.animate(M).plot(k,"polygons").attr({"stroke-width":this.strokeWidth});P&&typeof P.after=="function"?P.after(()=>L.animationCompleted(y)):L.animationCompleted(y)}else this.dynamicAnim&&a.globals.dataChanged?this.animatePaths(y,{size:this.sliceSizes[g],endAngle:d,startAngle:c,prevStartAngle:h,prevEndAngle:f,animateStartingPos:!0,i:g,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:a.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(y,{size:this.sliceSizes[g],endAngle:d,startAngle:c,i:g,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:S});if(a.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&y.node.addEventListener("mouseup",this.pieClicked.bind(this,g)),typeof a.interact.selectedDataPoints[0]<"u"&&a.interact.selectedDataPoints[0].indexOf(g)>-1)if(this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged&&this.animDur>0){const k=this,M=g;setTimeout(()=>k.pieClicked(M),this.animDur)}else this.pieClicked(g);if(a.config.dataLabels.enabled){const k=v.x,M=v.y;let L=100*x/this.fullAngle+"%";if(x!==0&&a.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[g]){const P=a.config.dataLabels.formatter;P!==void 0&&(L=P(a.globals.seriesPercent[g][0],{seriesIndex:g,w:a}));const E=a.globals.dataLabels.style.colors[g],_=r.group({class:"apexcharts-datalabels"}),X=r.drawText({x:k,y:M,text:L,textAnchor:"middle",fontSize:a.config.dataLabels.style.fontSize,fontFamily:a.config.dataLabels.style.fontFamily,fontWeight:a.config.dataLabels.style.fontWeight,foreColor:E});if(_.add(X),a.config.dataLabels.dropShadow.enabled){const F=a.config.dataLabels.dropShadow;o.dropShadow(X,F)}X.node.classList.add("apexcharts-pie-label"),a.config.chart.animations.animate&&a.globals.resized===!1&&(X.node.classList.add("apexcharts-pie-label-delay"),X.node.style.animationDelay=a.config.chart.animations.speed/940+"s"),this.sliceLabels.push(_)}}if(this.showExternalLabels&&x!==0){const k=this.getExternalLabelLines(g);if(k.some(M=>M!=="")){const M=T.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize,C),L=T.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize+(this.externalCfg.connector.gap||0),C),P=L.x>=this.centerX,E=P?L.x+(this.externalCfg.connector.length||0):L.x-(this.externalCfg.connector.length||0);this.externalLabels.push({lines:k,anchor:M,elbow:L,side:P?"right":"left",labelX:E+parseFloat(this.externalCfg.offsetX||0),idealY:L.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||a.globals.colors[g],foreColor:this.externalCfg.color||a.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();const g=W.isBrowser()&&(p||this.dynamicAnim&&a.globals.dataChanged||this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged);
1144this.externalLabels.forEach(u=>{const x=new $t(a).drawExternalLabel({lines:u.lines,lineHeight:this.externalLabelLineH,anchor:u.anchor,elbow:u.elbow,labelX:u.labelX,labelY:u.labelY,side:u.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:u.connectorColor},style:this.externalLabelStyle,foreColor:u.foreColor});g&&(x.node.classList.add("apexcharts-element-hidden"),a.globals.delayedElements.push({el:x.node})),l.add(x)})}return l}placeExternalLabels(){const t=this.w,e=this.externalLabelMaxLines*this.externalLabelLineH+2,s=this.centerY+t.globals.radialSize+t.globals.pieExternalLabelMarginY;["left","right"].forEach(i=>{const a=this.externalLabels.filter(n=>n.side===i).sort((n,l)=>n.idealY-l.idealY);a.forEach(n=>{n.labelY=n.idealY});for(let n=1;n<a.length;n++)a[n].labelY-a[n-1].labelY<e&&(a[n].labelY=a[n-1].labelY+e);const o=a[a.length-1],r=o?o.labelY-s:0;if(r>0)for(let n=a.length-1;n>=0;n--)a[n].labelY-=r,n<a.length-1&&a[n+1].labelY-a[n].labelY<e&&(a[n].labelY=a[n+1].labelY-e)})}addListeners(t,e){const s=new R(this.w);t.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),t.node.addEventListener("mousedown",s.pathMouseDown.bind(this,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}animatePaths(t,e){const s=this.w,i=this;let a=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,o=a,r=e.startAngle;const n=e.startAngle;e.prevStartAngle!==void 0&&e.prevEndAngle!==void 0&&(r=e.prevEndAngle,o=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===s.config.series.length-1&&(a+n>this.fullAngle?e.endAngle=e.endAngle-(a+n):a+n<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(a+n)))),a===this.fullAngle&&(a=this.fullAngle-.01),i.animateArc(t,r,n,a,o,e)}animateArc(t,e,s,i,a,o){const r=this,n=this.w,l=new Tt(this.w),c=o.size;let h;(isNaN(e)||isNaN(a))&&(e=s,a=i,o.dur=0);let d=i,f=s;const p=e<s?this.fullAngle+e-s:e-s;n.globals.dataChanged&&o.shouldSetPrevPaths&&o.prevEndAngle&&(h=r.getPiePath({me:r,startAngle:o.prevStartAngle,angle:o.prevEndAngle<o.prevStartAngle?this.fullAngle+o.prevEndAngle-o.prevStartAngle:o.prevEndAngle-o.prevStartAngle,size:c}),t.attr({d:h})),o.dur!==0?t.animate(o.dur,o.animBeginArr[o.i]).after(function(){(r.chartType==="pie"||r.chartType==="donut"||r.chartType==="polarArea")&&this.animate(n.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":r.strokeWidth}),o.i===n.config.series.length-1&&l.animationCompleted(t)}).during(g=>{d=p+(i-p)*g,o.animateStartingPos&&(d=a+(i-a)*g,f=e-a+(s-(e-a))*g),h=r.getPiePath({me:r,startAngle:f,angle:d,size:c}),t.node.setAttribute("data:pathOrig",h),t.attr({d:h})}):(h=r.getPiePath({me:r,startAngle:f,angle:i,size:c}),o.isTrack||(n.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",h),t.attr({d:h,"stroke-width":r.strokeWidth}))}pieClicked(t){const e=this.w,s=this,i=s.sliceSizes[t]+(e.config.plotOptions.pie.expandOnClick?4:0),a=e.dom.Paper.findOne(`.apexcharts-${s.chartType.toLowerCase()}-slice-${t}`);if(a.attr("data:pieClicked")==="true"){a.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner();const l=a.attr("data:pathOrig");a.attr({d:l});return}else{const l=e.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(l,c=>{c.setAttribute("data:pieClicked","false");const h=c.getAttribute("data:pathOrig");h&&c.setAttribute("d",h)}),e.interact.capturedDataPointIndex=t,a.attr("data:pieClicked","true")}const o=parseInt(a.attr("data:startAngle"),10),r=parseInt(a.attr("data:angle"),10),n=s.getPiePath({me:s,startAngle:o,angle:r,size:i});r!==360&&a.plot(n)}getChangedPath(t,e){let s="";return this.dynamicAnim&&this.w.globals.dataChanged&&(s=this.getPiePath({me:this,startAngle:t,angle:e-t,size:this.size})),s}getPiePath({me:t,startAngle:e,angle:s,size:i}){let a;const o=new R(this.w),r=e,n=Math.PI*(r-90)/180;let l=s+e;Math.ceil(l)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(l=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(l)>this.fullAngle&&(l-=this.fullAngle);const c=Math.PI*(l-90)/180,h=t.centerX+i*Math.cos(n),d=t.centerY+i*Math.sin(n),f=t.centerX+i*Math.cos(c),p=t.centerY+i*Math.sin(c),g=T.polarToCartesian(t.centerX,t.centerY,t.donutSize,l),u=T.polarToCartesian(t.centerX,t.centerY,t.donutSize,r),x=s>180?1:0,b=["M",h,d,"A",i,i,0,x,1,f,p];return t.chartType==="donut"?a=[...b,"L",g.x,g.y,"A",t.donutSize,t.donutSize,0,x,0,u.x,u.y,"L",h,d,"z"].join(" "):t.chartType==="pie"||t.chartType==="polarArea"?a=[...b,"L",t.centerX,t.centerY,"L",h,d].join(" "):a=[...b].join(" "),o.roundPathCorners(a,this.strokeWidth*2)}drawPolarElements(t){const e=this.w,s=new Ue(this.w),i=new R(this.w),a=new $t(this.w),o=i.group(),r=i.group(),n=s.niceScale(0,Math.ceil(this.maxY),0),l=n.result.reverse(),c=n.result.length;this.maxY=n.niceMax;let h=e.globals.radialSize;const d=h/(c-1);for(let f=0;f<c-1;f++){const p=i.drawCircle(h);if(p.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.r
vendor: 6,984 bytes, line 1144
1144ings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){const g=a.drawYAxisTexts(this.centerX,this.centerY-h+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,f,l[f]);r.add(g)}o.add(p),h=h-d}this.drawSpokes(t),t.add(o),t.add(r)}renderInnerDataLabels(t,e,s){const i=this.w,a=new R(this.w),o=e.total.show;t.node.innerHTML="",t.node.style.opacity=s.opacity;const r=s.centerX,n=this.donutDataLabels.total.label?s.centerY:s.centerY-s.centerY/6;let l,c;e.name.color===void 0?l=i.globals.colors[0]:l=e.name.color;let h=e.name.fontSize,d=e.name.fontFamily,f=e.name.fontWeight;e.value.color===void 0?c=i.config.chart.foreColor:c=e.value.color;const p=e.value.formatter;let g="",u="";if(o?(l=e.total.color,h=e.total.fontSize,d=e.total.fontFamily,f=e.total.fontWeight,u=this.donutDataLabels.total.label?e.total.label:"",g=e.total.formatter(i)):i.seriesData.series.length===1&&(g=p(i.seriesData.series[0],i),u=i.seriesData.seriesNames[0]),u&&(u=e.name.formatter(u,e.total.show,i)),e.name.show){const x=a.drawText({x:r,y:n+parseFloat(e.name.offsetY),text:u,textAnchor:"middle",foreColor:l,fontSize:h,fontWeight:f,fontFamily:d});x.node.classList.add("apexcharts-datalabel-label"),t.add(x)}if(e.value.show){const x=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,b=a.drawText({x:r,y:n+x,text:g,textAnchor:"middle",foreColor:c,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});b.node.classList.add("apexcharts-datalabel-value"),t.add(b)}return t}printInnerLabels(t,e,s,i){const a=this.w;let o;i?t.name.color===void 0?o=a.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:o=t.name.color:a.seriesData.series.length>1&&t.total.show&&(o=t.total.color);const r=a.dom.baseEl.querySelector(".apexcharts-datalabel-label"),n=a.dom.baseEl.querySelector(".apexcharts-datalabel-value"),l=t.value.formatter;s=l(s,a),!i&&typeof t.total.formatter=="function"&&(s=t.total.formatter(a));const c=e===t.total.label;if(e=this.donutDataLabels.total.label?t.name.formatter(e,c,a):"",r!==null&&(r.textContent=e),n!==null&&(n.textContent=s),r!==null){const h=r;h.style.fill=o}}printDataLabelsInner(t,e){const s=this.w,i=t.getAttribute("data:value"),a=s.seriesData.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];s.seriesData.series.length>1&&this.printInnerLabels(e,a,i,t);const o=s.dom.baseEl.querySelector(".apexcharts-datalabels-group");if(o!==null){const r=o;r.style.opacity="1"}}drawSpokes(t){const e=this.w,s=new R(this.w),i=e.config.plotOptions.polarArea.spokes;if(i.strokeWidth===0)return;const a=[],o=360/e.seriesData.series.length;for(let r=0;r<e.seriesData.series.length;r++)a.push(T.polarToCartesian(this.centerX,this.centerY,e.globals.radialSize,e.config.plotOptions.pie.startAngle+o*r));a.forEach((r,n)=>{const l=s.drawLine(r.x,r.y,this.centerX,this.centerY,Array.isArray(i.connectorColors)?i.connectorColors[n]:i.connectorColors);t.add(l)})}revertDataLabelsInner(){const t=this.w;if(this.donutDataLabels.show){const e=t.dom.Paper.findOne(".apexcharts-datalabels-group"),s=this.renderInnerDataLabels(e,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});t.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(s)}}}class Vi{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new R(this.w),this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight<t.globals.svgWidth?t.layout.gridHeight:t.layout.gridWidth,this.isLog=t.config.yaxis[0].logarithmic,this.logBase=t.config.yaxis[0].logBase,this.coreUtils=new et(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,t.globals.maxY,0):t.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):t.globals.minY,this.polygons=t.config.plotOptions.radar.polygons,this.strokeWidth=t.config.stroke.show?t.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-t.config.chart.dropShadow.blur,t.config.xaxis.labels.show&&(this.size=this.size-t.layout.xAxisLabelsWidth/1.75),t.config.plotOptions.radar.size!==void 0&&(this.size=t.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(t){const e=this.w,s=new nt(this.w),i=[],a=new kt(this.w,this.ctx);t.length&&(this.dataPointsLen=t[e.globals.maxValsInArrayIndex].length),this.disAngle=Math.PI*2/this.dataPointsLen;const o=e.layout.gridWidth/2,r=e.layout.gridHeight/2,n=o+e.config.plotOptions.radar.offsetX,l=r+e.config.plotOptions.radar.offsetY,c=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:`translate(${n||0}, ${l||0})`});let h=[],d=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((p,g)=>{const u=p.length===e.globals.dataPoints,x=this.graphics.group().attr({class:"apexcharts-series","data:longestSeries":u,seriesName:T.escapeString(e.seriesData.seriesNames[g]),rel:g+1,"data:realIndex":g});this.dataRadiusOfPercent[g]=[],this.dataRadius[g]=[],this.angleArr[g]=[],p.forEach((y,v)=>{const C=Math.abs(this.maxValue-this.minValue);y=y-this.minValue,this.isLog&&(y=this.coreUtils.getLogVal(this.logBase,y,0)),this.dataRadiusOfPercent[g][v]=y/C,this.dataRadius[g][v]=this.dataRadiusOfPercent[g][v]*this.size,this.angleArr[g][v]=v*this.disAngle}),h=this.getDataPointsPos(this.dataRadius[g],this.angleArr[g]);const b=this.createPaths(h,{x:0,y:0});d=this.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":g}),e.globals.delayedElements.push({el:d.node,index:g});const w={i:g,realIndex:g,animationDelay:g,initialSpeed:e.config.chart.animations.speed,dataChangeSpeed:e.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:e.globals.stroke.colors[g],strokeLineCap:e.config.stroke.lineCap};let m=null;e.globals.previousPaths.length>0&&(m=this.getPreviousPath(g));for(let y=0;y<b.linePathsTo.length;y++){const v=this.graphics.renderPaths(G($({},w),{pathFrom:m===null?b.linePathsFrom[y]:m,pathTo:b.linePathsTo[y],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[g]:this.strokeWidth,fill:"none",drawShadow:!1}));x.add(v);const C=s.fillPath({seriesNumber:g}),D=this.graphics.renderPaths(G($({},w),{pathFrom:m===null?b.areaPathsFrom[y]:m,pathTo:b.areaPathsTo[y],strokeWidth:0,fill:C,drawShadow:!1,drawMask:{type:"radial",cx:0,cy:0,r:this.size}}));if(e.config.chart.dropShadow.enabled){const S=new at(this.w),k=e.config.chart.dropShadow;S.dropShadow(D,Object.assign({},k,{noUserSpaceOnUse:!0}),g)}x.add(D)}
vendor: 12,851 bytes, line 1144
1144p.forEach((y,v)=>{const D=new Pt(this.w,this.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:g,dataPointIndex:v}),S=this.graphics.drawMarker(h[v].x,h[v].y,D);S.attr("rel",v),S.attr("j",v),S.attr("index",g),S.node.setAttribute("default-marker-size",D.pSize);const k=this.graphics.group({class:"apexcharts-series-markers"});k&&k.add(S),d.add(k),x.add(d);const M=e.config.dataLabels;if(M.enabled){const L=M.formatter(e.seriesData.series[g][v],{seriesIndex:g,dataPointIndex:v,w:e});a.plotDataLabelsText({x:h[v].x,y:h[v].y,text:L,textAnchor:"middle",i:g,j:g,parent:f,offsetCorrection:!1,dataLabelsConfig:$({},M)})}x.add(f)}),i.push(x)}),this.drawPolygons({parent:c}),e.config.xaxis.labels.show){const p=this.drawXAxisTexts();c.add(p)}return i.forEach(p=>{c.add(p)}),c.add(this.yaxisLabels),c}drawPolygons(t){const e=this.w,{parent:s}=t,i=new $t(this.w),a=e.globals.yAxisScale[0].result.reverse(),o=a.length,r=[],n=this.size/(o-1);for(let h=0;h<o;h++)r[h]=n*h;r.reverse();const l=[],c=[];r.forEach((h,d)=>{const f=T.getPolygonPos(h,this.dataPointsLen);let p="";f.forEach((g,u)=>{if(d===0){const x=this.graphics.drawLine(g.x,g.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[u]:this.polygons.connectorColors);c.push(x)}u===0&&this.yaxisLabelsTextsPos.push({x:g.x,y:g.y}),p+=g.x+","+g.y+" "}),l.push(p)}),l.forEach((h,d)=>{const f=this.polygons.strokeColors,p=this.polygons.strokeWidth,g=this.graphics.drawPolygon(h,Array.isArray(f)?f[d]:f,Array.isArray(p)?p[d]:p,e.globals.radarPolygons.fill.colors[d]);s.add(g)}),c.forEach(h=>{s.add(h)}),e.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((h,d)=>{const f=i.drawYAxisTexts(h.x,h.y,d,a[d]);this.yaxisLabels.add(f)})}drawXAxisTexts(){const t=this.w,e=t.config.xaxis.labels,s=this.graphics.group({class:"apexcharts-xaxis"}),i=T.getPolygonPos(this.size,this.dataPointsLen);return t.labelData.labels.forEach((a,o)=>{const r=t.config.xaxis.labels.formatter,n=new kt(this.w,this.ctx);if(i[o]){const l=this.getTextPos(i[o],this.size),c=r(a,{seriesIndex:-1,dataPointIndex:o,w:t});n.plotDataLabelsText({x:l.newX,y:l.newY,text:c,textAnchor:l.textAnchor,i:o,j:o,parent:s,className:"apexcharts-xaxis-label",color:Array.isArray(e.style.colors)&&e.style.colors[o]?e.style.colors[o]:"#a8a8a8",dataLabelsConfig:$({textAnchor:l.textAnchor,dropShadow:{enabled:!1}},e),offsetCorrection:!1}).on("click",d=>{if(typeof t.config.chart.events.xAxisLabelClick=="function"){const f=Object.assign({},t,{labelIndex:o});t.config.chart.events.xAxisLabelClick(d,this.ctx,f)}})}}),s}createPaths(t,e){const s=[];let i=[];const a=[];let o=[];if(t.length){i=[this.graphics.move(e.x,e.y)],o=[this.graphics.move(e.x,e.y)];let r=this.graphics.move(t[0].x,t[0].y),n=this.graphics.move(t[0].x,t[0].y);t.forEach((l,c)=>{r+=this.graphics.line(l.x,l.y),n+=this.graphics.line(l.x,l.y),c===t.length-1&&(r+="Z",n+="Z")}),s.push(r),a.push(n)}return{linePathsFrom:i,linePathsTo:s,areaPathsFrom:o,areaPathsTo:a}}getTextPos(t,e){let i="middle",a=t.x,o=t.y;return Math.abs(t.x)>=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?o-=10:t.y>0&&(o+=10)),{textAnchor:i,newX:a,newY:o}}getPreviousPath(t){const e=this.w;let s=null;for(let i=0;i<e.globals.previousPaths.length;i++){const a=e.globals.previousPaths[i];a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(String(t),10)&&typeof e.globals.previousPaths[i].paths[0]<"u"&&(s=e.globals.previousPaths[i].paths[0].d)}return s}getDataPointsPos(t,e,s=this.dataPointsLen){t=t||[],e=e||[];const i=[];for(let a=0;a<s;a++){const o={};o.x=t[a]*Math.sin(e[a]),o.y=-t[a]*Math.cos(e[a]),i.push(o)}return i}}class Ui extends Gt{constructor(t,e){super(t,e),this.ctx=e,this.w=t,this.animBeginArr=[0],this.animDur=0,this.startAngle=t.config.plotOptions.radialBar.startAngle,this.endAngle=t.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(t.config.plotOptions.radialBar.endAngle-t.config.plotOptions.radialBar.startAngle),this.trackStartAngle=t.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=t.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||(this.trackStartAngle=this.startAngle),this.trackEndAngle||(this.trackEndAngle=this.endAngle),this.endAngle===360&&(this.endAngle=359.99),this.margin=parseInt(t.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(t){var e;const s=this.w,i=new R(this.w),a=i.group({class:"apexcharts-radialbar"});if(s.globals.noData)return a;const o=i.group(),r=this.defaultSize/2,n=s.layout.gridWidth/2;let l=this.defaultSize/2.05;s.config.chart.sparkline.enabled||(l=l-s.config.stroke.width-s.config.chart.dropShadow.blur);const c=s.globals.fill.colors,h=s.config.plotOptions.radialBar,d=Array.isArray(h.bands)&&h.bands.length>0,f=d&&h.bandsStyle&&h.bandsStyle.hideTrackWhenPresent,p=h.shape==="needle";if(h.track.show&&!f){const b=this.drawTracks({size:l,centerX:n,centerY:r,colorArr:c,series:t});o.add(b)}if(d){const b=this.drawBands({size:l,centerX:n,centerY:r,series:t});o.add(b)}const g=this.drawArcs({size:l,centerX:n,centerY:r,colorArr:c,series:t,skipValueArc:p&&!((e=h.needle)!=null&&e.showValueArc)});if(h.ticks&&h.ticks.show){const b=this.drawTicks({size:l,centerX:n,centerY:r,series:t});if(this.initialAnim&&!s.globals.dataChanged&&!s.globals.resized&&W.isBrowser()&&s.globals.shouldAnimate){const m=b.node;m.style.opacity="0",m.style.transition="opacity 280ms ease-out";const y=s.config.chart.animations.speed||800;setTimeout(()=>{m.style.opacity="1"},y)}o.add(b)}if(p){const b=this.drawNeedle({size:l,centerX:n,centerY:r,series:t});o.add(b)}let u=360;s.config.plotOptions.radialBar.startAngle<0&&(u=this.totalAngle);const x=(360-u)/360;if(s.globals.radialSize=l-l*x,this.radialDataLabels.value.show){const b=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);s.globals.radialSize+=b*x}return o.add(g.g),s.config.plotOptions.radialBar.hollow.position==="front"&&(g.g.add(g.elHollow),g.dataLabels&&g.g.add(g.dataLabels)),a.add(o),a}drawTracks(t){const e=this.w,s=new R(this.w),i=s.group({class:"apexcharts-tracks"}),a=new at(this.w),o=new nt(this.w),r=this.getStrokeWidth(t);t.size=t.size-r/2;for(let n=0;n<t.series.length;n++){const l=s.group({class:"apexcharts-radialbar-track apexcharts-track"});i.add(l),l.attr({rel:n+1}),t.size=t.size-r-this.margin;const c=e.config.plotOptions.radialBar.track,h=o.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(c.background)?c.background[n]:c.background,solid:!0}),d=this.trackStartAngle;let f=this.trackEndAngle;Math.abs(f)+Math.abs(d)>=360&&(f=360-Math.abs(this.startAngle)-.1);const p=s.drawPath({d:"",stroke:h,strokeWidth:r*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){const g=c.dropShadow;a.dropShadow(p,g)}l.add(p),p.attr("id","apexcharts-radialbarTrack-"+n),this.animatePaths(p,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:d,size:t.size,i:n,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}drawArcs(t){var e;const s=this.w,i=new R(this.w),a=new nt(this.w),o=new at(this.w),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;let l=s.config.plotOptions.radialBar.hollow.background;const c=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(s.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=c-s.config.plotOptions.radialBar.hollow.margin;s.config.plotOptions.radialBar.hollow.image!==void 0&&(l=this.drawHollowImage(t,r,c,l));const d=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:l||"transparent"});if(s.config.plotOptions.radialBar.hollow.dropShadow.enabled){const x=s.config.plotOptions.radialBar.hollow.dropShadow;o.dropShadow(d,x)}let f=1;!this.radialDataLabels.total.show&&s.seriesData.series.length>1&&(f=0);let p=null;if(this.radialDataLabels.show){const x=s.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(x,this.radialDataLabels,{hollowSize:c,centerX:t.centerX,centerY:t.centerY,opacity:f})}s.config.plotOptions.radialBar.hollow.position==="back"&&(r.add(d),p&&r.add(p));let g=!1;s.config.plotOptions.radialBar.inverseOrder&&(g=!0);const u=((e=this.ctx.morphTypeChange)==null?void 0:e.isActive())===!0;for(let x=g?t.series.length-1:0;g?x>=0:x<t.series.length;g?x--:x++){const b=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:T.escapeString(s.seriesData.seriesNames[x])});r.add(b),b.attr({rel:x+1,"data:realIndex":x}),tt.addCollapsedClassToSeries(this.w,b,x),t.size=t.size-n-this.margin;const w=a.fillPath({seriesNumber:x,size:t.size,value:t.series[x]}),m=this.startAngle;let y;const v=s.config.plotOptions.radialBar,C=typeof v.min=="number"?v.min:0,D=typeof v.max=="number"?v.max:100,S=D===C?1:D-C,k=q=>{const K=Math.min(Math.max(q,C),D);return Math.max(0,(K-C)/S)},M=k(T.negToZero(t.series[x]));let L=Math.round(this.totalAngle*M)+this.startAngle,P;s.globals.dataChanged&&(y=this.startAngle,P=Math.round(this.totalAngle*k(T.negToZero(s.globals.previousPaths[x])))+y),Math.abs(L)+Math.abs(m)>360&&(L=L-.01),Math.abs(P)+Math.abs(y)>360&&(P=P-.01);const X=L-m,F=Array.isArray(s.config.stroke.dashArray)?s.config.stroke.dashArray[x]:s.config.stroke.dashArray,z=u?this.ctx.morphTypeChange.getInitialPathFor(x,0):null,O=u?this.ctx.morphTypeChange.getFromType():null,N=!!z&&(O==="bar"||O==="funnel"||O==="pyramid"||O==="pie"||O==="donut"||O==="polarArea"),H=i.drawPath({d:z||"",stroke:N||t.skipValueArc?"transparent":w,strokeWidth:N||t.skipValueArc?0:n,fill:N?w:"none",fillOpacity:s.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:F}),I=m+X/2,Y=T.polarToCartesian(t.centerX,t.centerY,t.size,I);if(R.setAttrs(H.node,{"data:angle":X,"data:value":t.series[x],"data:cx":Y.x,"data:cy":Y.y}),s.config.chart.dropShadow.enabled){const q=s.config.chart.dropShadow;o.dropShadow(H,q,x)}if(o.setSelectionFilter(H,0,x),this.addListeners(H,this.radialDataLabels),b.add(H),H.attr({index:0,j:x}),this.barLabels.enabled){const q=T.polarToCartesian(t.centerX,t.centerY,t.size,m),K=this.barLabels.formatter(s.seriesData.seriesNames[x],{seriesIndex:x,w:s}),Q=["apexcharts-radialbar-label"];this.barLabels.onClick||Q.push("apexcharts-no-click");let st=this.barLabels.useSeriesColors?s.globals.colors[x]:s.config.chart.foreColor;st||(st=s.config.chart.foreColor);const J=q.x+this.barLabels.offsetX,ct=q.y+this.barLabels.offsetY,j=i.drawText({x:J,y:ct,text:K,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:st,cssClass:Q.join(" ")});j.on("click",this.onBarLabelClick),j.attr({rel:x+1}),m!==0&&j.attr({"transform-origin":`${J} ${ct}`,transform:`rotate(${m} 0 0)`}),b.add(j)}let V=0;if(this.initialAnim&&!s.globals.resized&&!s.globals.dataChanged&&(V=s.config.chart.animations.speed),s.globals.dataChanged&&(V=s.config.chart.animations.dynamicAnimation.speed),this.animDur=V/(t.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),u&&z){const q=this.ctx.morphTypeChange.getSpeed(),K=this.getPiePath({me:this,startAngle:m,angle:X,size:t.size});if(N){const Q=this.ctx.morphTypeChange.buildRingSegmentPath(t.centerX,t.centerY,t.size,n,m,m+X);H.animate(q).plot(Q,"polygons").after(function(){this.attr({d:K,fill:"none",stroke:t.skipValueArc?"transparent":w,"stroke-width":t.skipValueArc?0:n})})}else H.animate(q).plot(K,"polygons").attr({"stroke-width":n})}else this.animatePaths(H,{centerX:t.centerX,centerY:t.centerY,endAngle:L,startAngle:m,prevEndAngle:P,prevStartAngle:y,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:V,shouldSetPrevPaths:!0})}return{g:r,elHollow:d,dataLabels:p}}_angleAtValue(t){const e=this.w.config.plotOptions.radialBar,s=typeof e.min=="number"?e.min:0,i=typeof e.max=="number"?e.max:100,a=i===s?s+1:i,r=(Math.max(s,Math.min(a,Number(t)))-s)/(a-s);return this.startAngle+r*(this.endAngle-this.startAngle)}_describeArc(t,e,s,i,a){const o=T.polarToCartesian(t,e,s,a),r=T.polarToCartesian(t,e,s,i),n=a-i,l=Math.abs(n)>180?1:0;return`M ${o.x} ${o.y} A ${s} ${s} 0 ${l} 0 ${r.x} ${r.y}`}drawBands(t){const e=this.w,s=new R(this.w),i=e.config.plotOptions.radialBar,a=i.bands||[],o=s.group({class:"apexcharts-gauge-bands"}),r=this.getStrokeWidth(t),n=t.size-r/2-r-this.margin,l=r*parseInt(i.bandsStyle.strokeWidth,10)/100,c=typeof i.min=="number"?i.min:0,h=typeof i.max=="number"?i.max:100,d=h===c?0:(i.bandsStyle.gap||0)*((this.endAngle-this.startAngle)/(h-c));for(let f=0;f<a.length;f++){const p=a[f];if(p.from===void 0||p.to===void 0)continue;const g=this._angleAtValue(p.from),u=this._angleAtValue(p.to),x=Math.min(g,u)+d/2,b=M
1144ath.max(g,u)-d/2;if(b-x<=0)continue;const w=s.drawPath({d:this._describeArc(t.centerX,t.centerY,n,x,b),stroke:p.color||"#ccc",strokeWidth:l,fill:"none",strokeLinecap:i.bandsStyle.linecap||"butt",classes:"apexcharts-gauge-band"});w.node.setAttribute("data-band-index",String(f)),o.add(w)}return o}drawTicks(t){var e,s,i,a;const o=this.w,r=new R(this.w),n=o.config.plotOptions.radialBar,l=n.ticks,c=r.group({class:"apexcharts-gauge-ticks"}),h=this.getStrokeWidth(t),d=t.size-h/2-h-this.margin,f=typeof n.min=="number"?n.min:0,p=typeof n.max=="number"?n.max:100,g=Math.max(2,(s=(e=l.major)==null?void 0:e.count)!=null?s:11),u=Math.max(0,(a=(i=l.minor)==null?void 0:i.count)!=null?a:0),x=(b,w,m)=>{var y,v,C;const D=this._angleAtValue(b),S=(y=w.length)!=null?y:8,k=w.placement==="inside"?d-S:d,M=w.placement==="inside"?d:d+S,L=T.polarToCartesian(t.centerX,t.centerY,k,D),P=T.polarToCartesian(t.centerX,t.centerY,M,D),E=r.drawLine(L.x,L.y,P.x,P.y,w.color||(m?"#666":"#999"),0,w.width||(m?2:1));if(c.add(E),m&&((v=l.labels)!=null&&v.show)){const _=(w.placement==="inside"?k:M)+(w.placement==="inside"?-1:1)*((C=l.labels.offset)!=null?C:6),X=T.polarToCartesian(t.centerX,t.centerY,_,D),F=typeof l.labels.formatter=="function"?l.labels.formatter(b):String(b),z=r.drawText({x:X.x,y:X.y,text:F,textAnchor:"middle",dominantBaseline:"middle",fontFamily:l.labels.fontFamily,fontSize:l.labels.fontSize,fontWeight:l.labels.fontWeight,foreColor:l.labels.color,cssClass:"apexcharts-gauge-tick-label"});c.add(z)}};for(let b=0;b<g;b++){const w=b/(g-1),m=f+w*(p-f);if(x(m,l.major||{},!0),b<g-1&&u>0)for(let y=1;y<=u;y++){const v=(b+y/(u+1))/(g-1),C=f+v*(p-f);x(C,l.minor||{},!1)}}return c}drawNeedle(t){var e,s,i,a,o;const r=this.w,n=new R(this.w),c=r.config.plotOptions.radialBar.needle||{},h=n.group({class:"apexcharts-gauge-needle"});if(!t.series||t.series.length===0)return h;const d=this.getStrokeWidth(t),f=t.size-d/2-d-this.margin,p=typeof c.length=="string"&&c.length.endsWith("%")?f*parseInt(c.length,10)/100:Number(c.length||f*.85),g=(e=c.baseWidth)!=null?e:4,u=(s=c.tipWidth)!=null?s:1,x=c.color||"#333",b=t.centerX,w=Number((i=c.offsetY)!=null?i:0),m=t.centerY+w,y=`M ${b+g/2} ${m} A ${g/2} ${g/2} 0 0 1 ${b-g/2} ${m} L ${b-u/2} ${m-p} L ${b+u/2} ${m-p} Z`,v=n.drawPath({d:y,stroke:x,strokeWidth:0,fill:x,classes:"apexcharts-gauge-needle-shape"});h.add(v);const C=Number(t.series[0]),D=this._angleAtValue(C),S=this.initialAnim&&!r.globals.dataChanged&&!r.globals.resized,k=this.ctx,M=typeof k._lastNeedleAngle=="number"?k._lastNeedleAngle:this.startAngle;if(k._lastNeedleAngle=D,W.isBrowser()&&r.globals.shouldAnimate&&(S||r.globals.dataChanged)&&M!==D){const P=h.node;P.setAttribute("transform-origin",`${b} ${m}`),P.setAttribute("transform",`rotate(${M})`);const E=((a=c.animation)==null?void 0:a.duration)&&Number(c.animation.duration)||c.animationSpeed&&Number(c.animationSpeed)||((o=r.config.chart.animations.dynamicAnimation)==null?void 0:o.speed)||r.config.chart.animations.speed||800,_=1.70158,X=_+1,O=S?I=>1+X*Math.pow(I-1,3)+_*Math.pow(I-1,2):I=>1-Math.pow(1-I,3),N=performance.now(),H=I=>{const Y=Math.max(0,Math.min(1,(I-N)/E)),V=M+(D-M)*O(Y);P.setAttribute("transform",`rotate(${V})`),Y<1&&B.requestAnimationFrame(H)};B.requestAnimationFrame(H)}else h.attr({"transform-origin":`${b} ${m}`,transform:`rotate(${D})`});return h}drawHollow(t){var e;const s=new R(this.w),i=this.w.config.plotOptions.radialBar.hollow,a=s.drawCircle(t.size*2),o={class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill};return(i.stroke||i.strokeDasharray)&&(o.stroke=i.stroke||"transparent",o["stroke-width"]=(e=i.strokeWidth)!=null?e:1,i.strokeDasharray&&(o["stroke-dasharray"]=i.strokeDasharray)),a.attr(o),a}drawHollowImage(t,e,s,i){const a=this.w,o=new nt(this.w),r=T.randomId(),n=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:s,height:s,image:n,patternID:`pattern${a.globals.cuid}${r}`}),i=`url(#pattern${a.globals.cuid}${r})`;else{const l=a.config.plotOptions.radialBar.hollow.imageWidth,c=a.config.plotOptions.radialBar.hollow.imageHeight;if(l===void 0&&c===void 0){const h=a.dom.Paper.image(n,function(d){this.move(t.centerX-d.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-d.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});e.add(h)}else{const h=a.dom.Paper.image(n,function(){this.move(t.centerX-l/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)});e.add(h)}}return i}getStrokeWidth(t){const e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}onBarLabelClick(t){var e;
vendor: 4,699 bytes, line 1144
1144const s=t.target,i=parseInt((e=s.getAttribute("rel"))!=null?e:"",10)-1,a=this.barLabels.onClick,o=this.w;a&&a(o.seriesData.seriesNames[i],{w:o,seriesIndex:i})}}class qi extends gt{draw(t,e){var s,i,a,o,r,n,l,c,h;const d=this.w,f=new R(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=d.rangeData.seriesRangeStart,this.seriesRangeEnd=d.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const p=f.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let g=0;g<t.length;g++){let u,x;const b=d.globals.comboCharts?e[g]:g,{columnGroupIndex:w}=this.barHelpers.getGroupIndex(b),m=f.group({class:"apexcharts-series",seriesName:T.escapeString(d.seriesData.seriesNames[b]),rel:g+1,"data:realIndex":b});tt.addCollapsedClassToSeries(this.w,m,b),t[g].length>0&&(this.visibleI=this.visibleI+1);let y=0;this.yRatio.length>1&&(this.yaxisIndex=d.globals.seriesYAxisReverseMap[b][0],y=b);const v=this.barHelpers.initialPositions(b),{y:C,zeroW:D,x:S,zeroH:k}=v;let M=(s=v.barWidth)!=null?s:0,L=(i=v.barHeight)!=null?i:0;const P=(a=v.yDivision)!=null?a:0,E=(o=v.xDivision)!=null?o:0;x=C,u=S;const _=f.group({class:"apexcharts-datalabels","data:realIndex":b}),X=f.group({class:"apexcharts-rangebar-goals-markers"});for(let F=0;F<d.globals.dataPoints;F++){const z=this.barHelpers.getStrokeWidth(g,F,b),O=this.seriesRangeStart[g][F],N=this.seriesRangeEnd[g][F];let H=null,I=null,Y=null;const V={x:u,y:x,strokeWidth:z,elSeries:m};let q=this.seriesLen;if(d.config.plotOptions.bar.rangeBarGroupRows&&(q=1),typeof((r=d.config.series[g].data)==null?void 0:r[F])>"u")break;if(this.isHorizontal){Y=x+L*this.visibleI;const st=(P-L*q)/2;if((l=(n=d.config.series[g].data)==null?void 0:n[F])!=null&&l.x){const J=this.detectOverlappingBars({i:g,j:F,barYPosition:Y,srty:st,barHeight:L,yDivision:P,initPositions:v});L=J.barHeight,Y=J.barYPosition}H=this.drawRangeBarPaths($({indexes:{i:g,j:F,realIndex:b},barHeight:L,barYPosition:Y,zeroW:D,yDivision:P,y1:O,y2:N},V)),M=H.barWidth}else{d.axisFlags.isXNumeric&&(u=(d.seriesData.seriesX[g][F]-d.globals.minX)/this.xRatio-M/2),I=u+M*this.visibleI;const st=(E-M*q)/2;if((h=(c=d.config.series[g].data)==null?void 0:c[F])!=null&&h.x){const J=this.detectOverlappingBars({i:g,j:F,barXPosition:I,srtx:st,barWidth:M,xDivision:E,initPositions:v});M=J.barWidth,I=J.barXPosition}H=this.drawRangeColumnPaths($({indexes:{i:g,j:F,realIndex:b,translationsIndex:y},barWidth:M,barXPosition:I,zeroH:k,xDivision:E},V)),L=H.barHeight}const K=this.barHelpers.drawGoalLine({barXPosition:H.barXPosition,barYPosition:Y,goalX:H.goalX,goalY:H.goalY,barHeight:L,barWidth:M});K&&X.add(K),x=H.y,u=H.x;const Q=this.barHelpers.getPathFillColor(t,g,F,b);this.renderSeries({realIndex:b,pathFill:Q.color,lineFill:Q.useRangeColor?Q.color:d.globals.stroke.colors[b],j:F,i:g,x:u,y:x,y1:O,y2:N,pathFrom:H.pathFrom,pathTo:H.pathTo,strokeWidth:z,elSeries:m,series:t,barHeight:L,barWidth:M,barXPosition:I,barYPosition:Y,columnGroupIndex:w,elDataLabelsWrap:_,elGoalsMarkers:X,visibleSeries:this.visibleI,type:"rangebar"})}p.add(m)}return p}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:i,srty:a,srtx:o,barHeight:r,barWidth:n,yDivision:l,xDivision:c,initPositions:h}){var d,f,p,g;const u=this.w;let x=[];const b=(f=(d=u.config.series[t].data)==null?void 0:d[e])==null?void 0:f.rangeName,w=(g=(p=u.config.series[t].data)==null?void 0:p[e])==null?void 0:g.x,m=Array.isArray(w)?w.join(" "):w,y=u.labelData.labels.map(C=>Array.isArray(C)?C.join(" "):C).indexOf(m),v=u.rangeData.seriesRange[t].findIndex(C=>{var D;return C.x===m&&((D=C.overlaps)==null?void 0:D.size)>0});return this.isHorizontal?(u.config.plotOptions.bar.rangeBarGroupRows?s=a+l*y:s=a+r*this.visibleI+l*y,v>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(u.rangeData.seriesRange[t][v].overlaps),x.indexOf(b)>-1&&(r=h.barHeight/x.length,s=r*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+r*(this.visibleI+x.indexOf(b))+l*y))):(y>-1&&!u.labelData.timescaleLabels.length&&(u.config.plotOptions.bar.rangeBarGroupRows?i=o+c*y:i=o+n*this.visibleI+c*y),v>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(u.rangeData.seriesRange[t][v].overlaps),x.indexOf(b)>-1&&(n=h.barWidth/x.length,i=n*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+n*(this.visibleI+x.indexOf(b))+c*y))),{barYPosition:s,barXPosition:i,barHeight:r,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:i,barXPosition:a,zeroH:o}){var r,n;const l=this.w,{i:c,j:h,realIndex:d,translationsIndex:f}=t,p=this.yRatio[f],g=this.getRangeValue(d,h);let u=Math.min(g.start,g.end),x=Math.max(g.start,g.end);typeof((r=this.series[c])==null?void 0:r[h])>
vendor: 6,911 bytes, line 1144
1144"u"||((n=this.series[c])==null?void 0:n[h])===null?u=o:(u=o-u/p,x=o-x/p);const b=Math.abs(x-u),w=this.barHelpers.getColumnPaths({barXPosition:a,barWidth:i,y1:u,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:d,i:d,j:h,w:l});if(!l.axisFlags.isXNumeric)e=e+s;else{const m=this.getBarXForNumericXAxis({x:e,j:h,realIndex:d,barWidth:i});e=m.x,a=m.barXPosition}return{pathTo:w.pathTo,pathFrom:w.pathFrom,barHeight:b,x:e,y:g.start<0&&g.end<0?u:x,goalY:this.barHelpers.getGoalValues("y",null,o,c,h,f),barXPosition:a}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:i,yDivision:a,barHeight:o,barYPosition:r,zeroW:n}){const l=this.w,{realIndex:c,j:h}=t,d=this.preventBarOverflow(n+s/this.invertedYRatio),f=this.preventBarOverflow(n+i/this.invertedYRatio),p=this.getRangeValue(c,h),g=Math.abs(f-d),u=this.barHelpers.getBarpaths({barYPosition:r,barHeight:o,x1:d,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:h,w:l});return l.axisFlags.isXNumeric||(e=e+a),{pathTo:u.pathTo,pathFrom:u.pathFrom,barWidth:g,x:p.start<0&&p.end<0?d:f,goalX:this.barHelpers.getGoalValues("x",n,null,c,h,0),y:e}}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}function Xe(A,t){let e=0;for(let a=0;a<A.length;a++)e+=A[a];const s=t/e,i=new Array(A.length);for(let a=0;a<A.length;a++)i[a]=A[a]*s;return i}function Ie(A,t,e,s){const i=s*s,a=e*e;return Math.max(i*t/a,a/(i*A))}function Zi(A,t,e,s,i,a){if(A===0)return!0;const o=Ie(t,e,s,a),r=Ie(Math.min(t,i),Math.max(e,i),s+i,a);return o>=r}function Ye(A,t,e,s,i,a,o,r){if(o>=r){const n=s/r;let l=a;for(let c=0;c<e;c++){const h=t[c]/n;A.push([i,l,i+n,l+h]),l+=h}}else{const n=s/o;let l=i;for(let c=0;c<e;c++){const h=t[c]/n;A.push([l,a,l+h,a+n]),l+=h}}}function Be(A,t,e,s,i){const a=[],o=A.length;if(o===0)return a;const r=new Array(o);let n=0,l=0,c=1/0,h=-1/0,d=0;for(;d<o;){const f=Math.min(s,i),p=A[d];if(Zi(n,c,h,l,p,f))r[n]=p,n++,l+=p,p<c&&(c=p),p>h&&(h=p),d++;else{if(Ye(a,r,n,l,t,e,s,i),s>=i){const g=l/i;t+=g,s-=g}else{const g=l/s;e+=g,i-=g}n=0,l=0,c=1/0,h=-1/0}}return n>0&&Ye(a,r,n,l,t,e,s,i),a}function ji(A,t,e){const s=A.length,i=new Array(s);for(let r=0;r<s;r++){let n=0;const l=A[r];for(let c=0;c<l.length;c++)n+=l[c];i[r]=n}const a=Be(Xe(i,t*e),0,0,t,e),o=new Array(s);for(let r=0;r<s;r++){const n=a[r],l=n[0],c=n[1],h=n[2]-l,d=n[3]-c;o[r]=Be(Xe(A[r],h*d),l,c,h,d)}return o}const Ki={generate:ji};class Ji{constructor(t,e){this.ctx=e,this.w=t,this.strokeWidth=this.w.config.stroke.width,this.helpers=new rs(t,e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}draw(t){const e=this.w,s=new R(this.w,this.ctx),i=new nt(this.w),a=s.group({class:"apexcharts-treemap"});if(e.globals.noData)return a;const o=[];return t.forEach(n=>{const l=n.map(c=>Math.abs(c));o.push(l)}),this.negRange=this.helpers.checkColorRange(),e.config.series.forEach((n,l)=>{n.data.forEach(c=>{Array.isArray(this.labels[l])||(this.labels[l]=[]),this.labels[l].push(c.x)})}),Ki.generate(o,e.layout.gridWidth,e.layout.gridHeight).forEach((n,l)=>{var c;const h=s.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:T.escapeString(e.seriesData.seriesNames[l]),rel:l+1,"data:realIndex":l});if(s.setupEventDelegation(h,".apexcharts-treemap-rect"),e.config.chart.dropShadow.enabled){const w=e.config.chart.dropShadow;new at(this.w).dropShadow(a,w,l)}const d=s.group({class:"apexcharts-data-labels"}),f={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},p=e.config.chart.animations,g=p.animateGradually,u=g&&g.enabled!==!1,x=new Array(n.length).fill(0);if(u){const w=n.length||1,m=Math.min(g.delay||0,p.speed*.5/w);n.map((v,C)=>({j:C,area:(v[2]-v[0])*(v[3]-v[1])})).sort((v,C)=>C.area-v.area).forEach((v,C)=>{x[v.j]=C*m})}n.forEach((w,m)=>{const y=w[0],v=w[1],C=w[2],D=w[3];f.xMin=Math.min(f.xMin,y),f.yMin=Math.min(f.yMin,v),f.xMax=Math.max(f.xMax,C),f.yMax=Math.max(f.yMax,D);const S=this.helpers.getShadeColor(e.config.chart.type,l,m,this.negRange),k=S.color,M=i.fillPath({color:k,seriesNumber:l,dataPointIndex:m}),L=s.drawRect(y,v,C-y,D-v,e.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,e.config.plotOptions.treemap.useFillColorAsStroke?k:e.globals.stroke.colors[l]);L.attr({cx:y,cy:v,index:l,i:l,j:m,width:C-y,height:D-v,fill:M}),L.node.classList.add("apexcharts-treemap-rect");let P={x:y+(C-y)/2,y:v+(D-v)/2,width:0,height:0};const E={x:y,y:v,width:C-y,height:D-v};if(e.config.chart.animations.enabled&&!e.globals.dataChanged){let z=1;e.globals.resized||(z=e.config.chart.animations.speed),this.animateTreemap(L,P,E,z,x[m]||0)}if(e.globals.dataChanged){let z=1;this.dynamicAnim.enabled&&e.globals.shouldAnimate&&(z=this.dynamicAnim.speed,e.globals.previousPaths[l]&&e.globals.previousPaths[l][m]&&e.globals.previousPaths[l][m].rect&&(P=e.globals.previousPaths[l][m].rect),this.animateTreemap(L,P,E,z))}let _=this.getFontSize(w),X=e.config.dataLabels.formatter(this.labels[l][m],{value:e.seriesData.series[l][m],seriesIndex:l,dataPointIndex:m,w:e});e.config.plotOptions.treemap.dataLabels.format==="truncate"&&(_=parseInt(String(e.config.dataLabels.style.fontSize),10),X=this.truncateLabels(String(X),_,y,v,C,D));let F=null;e.seriesData.series[l][m]&&(F=this.helpers.calculateDataLabels({text:X,x:(y+C)/2,y:(v+D)/2+this.strokeWidth/2+_/3,i:l,j:m,colorProps:S,fontSize:_,series:t})),e.config.dataLabels.enabled&&F&&this.rotateToFitLabel(F,_,X,y,v,C,D),h.add(L),F!==null&&h.add(F)});const b=e.config.plotOptions.treemap.seriesTitle;if(e.config.series.length>1&&b&&b.show){const w=e.config.series[l].name||"";if(w&&f.xMin<1/0&&f.yMin<1/0){const{offsetX:m,offsetY:y,borderColor:v,borderWidth:C,borderRadius:D,style:S}=b,k=S.color||e.config.chart.foreColor,M={left:S.padding.left,right:S.padding.right,top:S.padding.top,bottom:S.padding.bottom},L=s.getTextRects(w,S.fontSize,S.fontFamily),P=L.width+M.left+M.right,E=L.height+M.top+M.bottom,_=f.xMin+(m||0),X=f.yMin+(y||0),F=s.drawRect(_,X,P,E,D,S.background,1,C,v),z=s.drawText({x:_+M.left,y:X+M.top+((c=L==null?void 0:L.height)!=null?c:0)*.75,text:w,fontSize:S.fontSize,fontFamily:S.fontFamily,fontWeight:S.fontWeight,foreColor:k,cssClass:S.cssClass||""});h.add(F),h.add(z)}}h.add(d),a.add(h)}),a}getFontSize(t){const e=this.w;function s(r){let n,l=0;if(Array.isArray(r[0]))for(n=0;n<r.length;n++)l+=s(r[n]);else for(n=0;n<r.length;n++)l+=r[n].length;return l}function i(r){let n,l=0;if(Array.isArray(r[0]))for(n=0;n<r.length;n++)l+=i(r[n]);else for(n=0;n<r.length;n++)l+=1;return l}const a=s(this.labels)/i(this.labels);function o(r,n){const l=r*n,c=Math.pow(l,.5);return Math.min(c/a,parseInt(e.config.dataLabels.style.fontSize,10))}return o(t[2]-t[0],t[3]-t[1])}rotateToFitLabel(t,e,s,i,a,o,r){const n=new R(this.w),l=n.getTextRects(s,String(e));if(l.width+this.w.config.stroke.width+5>
1144o-i&&l.width<=r-a){const c=n.rotateAroundCenter(t.node);t.node.setAttribute("transform",`rotate(-90 ${c.x} ${c.y}) translate(${l.height/3})`)}}truncateLabels(t,e,s,i,a,o){const r=new R(this.w),l=r.getTextRects(t,String(e)).width+this.w.config.stroke.width+5>a-s&&o-i>a-s?o-i:a-s,c=r.getTextBasedOnMaxWidth({text:t,maxWidth:l,fontSize:e});return t.length!==c.length&&l/e<5?"":c}animateTreemap(t,e,s,i,a=0){const o=new Tt(this.w);o.animateRect(t,e,s,i,()=>{o.animationCompleted(t)},a)}}dt.use({line:_t,area:_t,scatter:_t,bubble:_t,rangeArea:_t,bar:gt,column:gt,barStacked:Ii,rangeBar:qi,candlestick:Re,boxPlot:Re,violin:Hi,pie:Gt,donut:Gt,polarArea:Gt,radialBar:Ui,radar:Vi,heatmap:$i,treemap:Ji});const Qi={"3m":"3M","6m":"6M","12m":"12M","24m":"24M",all:"Desde inÃcio"},At=(A,t)=>new Intl.NumberFormat("pt-BR",{minimumFractionDigits:A,maximumFractionDigits:t}),It=(A,t)=>{switch(A){case"perf":return`R$ ${At(2,2).format(t)}`;case"div":return`R$ ${At(2,t<1?3:2).format(t)}`;case"cot":return At(0,0).format(t);case"vol":return`R$ ${At(0,0).format(t)} mil`;case"dy":return`${At(1,2).format(t)}%`;default:return At(0,2).format(t)}},ta=A=>{const t=10**(Math.floor(Math.log10(A))-1);return Math.ceil(A/t)*t},xe=new Map,ea=()=>getComputedStyle(document.documentElement).getPropertyValue("--asset-red").trim()||"#d42126";function Ne(A,t,e,s,i,a,o){var p;(p=xe.get(A))==null||p.destroy();const r=Math.min(0,...i.data),n=Math.max(...i.data),l=s==="area"&&n>0?ta(n*1.2):void 0,c=i.labels.length-1,h=i.labels.length>12?Math.ceil(i.labels.length/12):1,d=new Set(i.labels.filter((g,u)=>(c-u)%h===0)),f=new dt(t,{chart:{type:s,height:260,toolbar:{show:!1},zoom:{enabled:!1},fontFamily:"Inter, sans-serif",redrawOnWindowResize:!1,animations:{enabled:o,speed:650,animateGradually:{enabled:!1},dynamicAnimation:{enabled:!0,speed:500},respectReducedMotion:!1}},series:[{name:e,data:i.data}],xaxis:{categories:i.labels,axisBorder:{show:!1},axisTicks:{show:!1},labels:{style:{colors:"#595959",fontSize:"12px"},formatter:g=>d.has(String(g))?String(g):""}},yaxis:{labels:{style:{colors:"#595959",fontSize:"12px"},formatter:g=>It(e,g)},tickAmount:4,min:r,...l!==void 0?{max:l}:{forceNiceScale:!0}},colors:[a],stroke:s==="area"?{curve:"smooth",width:2.5}:{show:!1},fill:s==="area"?{type:"gradient",gradient:{opacityFrom:.22,opacityTo:0,shadeIntensity:0}}:{opacity:.85},plotOptions:{bar:{borderRadius:6,columnWidth:"72%"}},dataLabels:{enabled:!1},grid:{borderColor:"rgba(14,15,18,.05)",strokeDashArray:0},tooltip:{x:{formatter:g=>String(g)},y:{formatter:g=>It(e,g)}}});f.render().then(()=>{var g;(g=t.querySelector(".apexcharts-svg"))==null||g.removeAttribute("tabindex")}),xe.set(A,f)}function ae(A,t=!0){const e=A.dataset.key??"perf",s=A.dataset.kind==="bar"?"bar":"area",i=A.dataset.period??"12m",o=JSON.parse(A.dataset.series??"{}")[i],r=A.querySelector("[data-chart-canvas]");if(!o||!r)return;sa(A,e,o,i);const n=ea();if(xe.get(A)&&t){r.style.transition="opacity .16s ease",r.style.opacity="0",window.setTimeout(()=>{Ne(A,r,e,s,o,n,!0),requestAnimationFrame(()=>{r.style.opacity="1"})},160);return}Ne(A,r,e,s,o,n,t)}function sa(A,t,e,s){const i=e.data;if(!i.length)return;const a=i[i.length-1],o=i[0],r=o?(a-o)/o*100:0,n=r>=0,l=A.querySelector("[data-chart-latest]"),c=A.querySelector("[data-chart-delta]"),h=A.querySelector("[data-chart-range]");l&&(l.textContent=It(t,a)),c&&(c.textContent=`${n?"â²":"â¼"} ${n?"+":""}${At(0,1).format(r)}%`,c.classList.toggle("up",n),c.classList.toggle("down",!n)),h&&(h.textContent=`mÃn ${It(t,Math.min(...i))} · máx ${It(t,Math.max(...i))} · ${Qi[s]??s}`)}function ia(){document.querySelectorAll("[data-chart-card]").forEach(A=>{if(ae(A),A.dataset.enhanced!=="1"&&(A.dataset.enhanced="1",A.querySelectorAll("[data-chart-period]").forEach(t=>{t.addEventListener("click",()=>{A.dataset.period=t.dataset.chartPeriod??"12m",A.querySelectorAll("[data-chart-period]").forEach(e=>{e.classList.toggle("on",e===t),e.setAttribute("aria-pressed",e===t?"true":"false")}),ae(A)})}),"ResizeObserver"in window)){let t=Math.round(A.getBoundingClientRect().width),e;new ResizeObserver(i=>{const a=Math.round(i[0].contentRect.width);a!==t&&(t=a,window.clearTimeout(e),e=window.setTimeout(()=>ae(A,!1),120))}).observe(A)}})}ia();export{ia as setupChartCards};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.