PageSourceSearch

https://situatiescolara.spiruharet.ro/scripts-Q4B2KD6Y.js

js spiruharet.ro collected 2026-10-02 04:20:02 UTC 618,053 bytes, 1,131 lines download raw bytes

vendor: 5,856 bytes, lines 1-4
1/*!
2 * ApexCharts v5.16.0
3 * (c) 2018-2026 ApexCharts
4 */(function(He,Pe){typeof exports=="object"&&typeof module<"u"?module.exports=Pe():typeof define=="function"&&define.amd?define(Pe):(He=typeof globalThis<"u"?globalThis:He||self).ApexCharts=Pe()})(this,function(){"use strict";var He=Object.defineProperty,Pe=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,Ue=(d,e,t)=>e in d?He(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t,$=(d,e)=>{for(var t in e||(e={}))Jt.call(e,t)&&Ue(d,t,e[t]);if(xt)for(var t of xt(e))Qt.call(e,t)&&Ue(d,t,e[t]);return d},G=(d,e)=>Pe(d,Kt(e)),j=(d,e,t)=>Ue(d,typeof e!="symbol"?e+"":e,t);class O{static isSSR(){return typeof window>"u"||typeof document>"u"}static isBrowser(){return!this.isSSR()}static hasAPI(e){return!this.isSSR()&&window[e]!==void 0}static getApex(){return typeof window<"u"&&window.Apex?window.Apex:typeof global<"u"&&global.Apex?global.Apex:{}}}class Ne{constructor(e,t=null){this.nodeName=e,this.namespaceURI=t,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new es,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){if(e&&e!==this){if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){const t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}e.parentNode=this,this.children.push(e)}return e}removeChild(e){const t=this.children.indexOf(e);return t!==-1&&(this.children.splice(t,1),e.parentNode=null),e}insertBefore(e,t){if(!t)return this.appendChild(e);if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){const i=this.children.indexOf(e);i!==-1&&this.children.splice(i,1)}const s=this.children.indexOf(t);return s!==-1&&(e.parentNode=this,this.children.splice(s,0,e)),e}cloneNode(e=!1){const t=new Ne(this.nodeName,this.namespaceURI);return t.textContent=this.textContent,this.attributes.forEach((s,i)=>{t.attributes.set(i,s)}),Object.assign(t.style,this.style),e&&this.children.forEach(s=>{s.cloneNode&&t.appendChild(s.cloneNode(!0))}),t}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 e=this;for(;e.parentNode;)e=e.parentNode;return e}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let e="";if(this.attributes.forEach((s,i)=>{e+=` ${i}="${s}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${e}/>`;const t=this.children.map(s=>s.toString()).join("");return`<${this.nodeName}${e}>${this.textContent}${t}</${this.nodeName}>`}get innerHTML(){return this.children.map(e=>e.toString()).join("")}set innerHTML(e){this.children=[],this.textContent=e}get outerHTML(){return this.toString()}get isConnected(){return!0}}class es{constructor(){this.classes=new Set}add(...e){e.forEach(t=>this.classes.add(t))}remove(...e){e.forEach(t=>this.classes.delete(t))}contains(e){return this.classes.has(e)}toggle(e,t){return t===!0?(this.classes.add(e),!0):t===!1||this.classes.has(e)?(this.classes.delete(e),!1):(this.classes.add(e),!0)}toString(){return Array.from(this.classes).join(" ")}}class ts{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(e,t){return new Ne(t,e)}createTextNode(e){const t={nodeName:"#text",nodeType:3,textContent:e,toString:()=>t.textContent};return t}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString:e=>e.toString?e.toString():""}}createDOMParser(){return{parseFromString(e,t){const s=new Ne("root");return s.innerHTML=e,{documentElement:s}}}}}let ie=null,me=null,ye=null;class B{static init(){O.isSSR()&&!ie&&(ie=new ts)}static createElement(e){return O.isSSR()?(ie||this.init(),ie.createElementNS(null,e)):document.createElement(e)}static createElementNS(e,t){return O.isSSR()?(ie||this.init(),ie.createElementNS(e,t)):document.createElementNS(e,t)}static createTextNode(e){return O.isSSR()?(ie||this.init(),ie.createTextNode(e)):document.createTextNode(e)}static querySelector(e){return O.isSSR()?null:document.querySelector(e)}static querySelectorAll(e){return O.isSSR()?[]:document.querySelectorAll(e)}static getComputedStyle(e){return O.isSSR()?{}:window.getComputedStyle(e)}static getBoundingClientRect(e){return O.isSSR()?(ie||this.init(),ie.getBoundingClientRect(e)):e?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return O.isSSR()?(ie||this.init(),me||(me=ie.createXMLSerializer()),me):(me||(me=new XMLSerializer),me)}static getDOMParser(){return O.isSSR()?(ie||this.init(),ye||(ye=ie.createDOMParser()),ye):(ye||(ye=new DOMParser),ye)}static addWindowEventListener(e,t,s){O.isBrowser()&&window.addEventListener(e,t,s)}static removeWindowEventListener(e,t,s){O.isBrowser()&&window.removeEventListener(e,t,s)}static requestAnimationFrame(e){return O.isBrowser()?window.requestAnimationFrame(e):(e(0),null)}static cancelAnimationFrame(e){O.isBrowser()&&e&&window.cancelAnimationFrame(e)}static elementExists(e){return!!e&&(O.isSSR()?e._ssrMode===!0||e.nodeName!==void 0:!!e.getRootNode&&(e.getRootNode({composed:!0})===document||e.isConnected))}
4static getWindow(){return O.isBrowser()?window:null}static getDocument(){return O.isBrowser()?document:null}static _getShim(){return ie}static _resetShim(){ie=null,me=null,ye=null}}let M=class pe{static isObject(e){return e&&typeof e=="object"&&!Array.isArray(e)}static is(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}static isSafari(){return O.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(e,t){const s=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(i=>{this.isObject(t[i])?i in e?s[i]=this.extend(e[i],t[i]):Object.assign(s,{[i]:t[i]}):Object.assign(s,{[i]:t[i]})}),s}static extendArray(e,t){const s=[];return e.map(i=>{s.push(pe.extend(t,i))}),e=s}static monthMod(e){return e%12}static clone(e,t=new WeakMap,s=!1){if(e===null||typeof e!="object")return e;if(t.has(e))return t.get(e);let i;if(Array.isArray(e))if(s)i=e.slice();else{i=[],t.set(e,i);for(let a=0;a<e.length;a++)i[a]=this.clone(e[a],t,!1)}else if(e instanceof Date)i=new Date(e.getTime());else if(s)i=Object.assign({},e);else{i={},t.set(e,i);for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=this.clone(e[a],t,!1))}return i}static shallowClone(e){return e===null||typeof e!="object"?e:Array.isArray(e)?e.slice():Object.assign({},e)}static shallowEqual(e,t){if(e===t)return!0;if(!e||!t)return!1;if(typeof e!="object"||typeof t!="object")return e===t;const s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(const a of s)if(e[a]!==t[a])return!1;return!0}static log10(e){return Math.log(e)/Math.LN10}static roundToBase10(e){return Math.pow(10,Math.floor(Math.log10(e)))}static roundToBase(e,t){return Math.pow(t,Math.floor(Math.log(e)/Math.log(t)))}static parseNumber(e){return typeof e=="number"||e===null?e:parseFloat(e)}static stripNumber(e,t=2){return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(e){return e.toString().includes("e")?Math.round(e):e}static elementExists(e){return!(!e||!e.isConnected)}static isInShadowDOM(e){if(!e||!e.getRootNode)return!1;const t=e.getRootNode();return t&&t!==document&&pe.is("ShadowRoot",t)}static getShadowRootHost(e){return pe.isInShadowDOM(e)&&e.getRootNode().host||null}static getDimensions(e){if(!e)return[0,0];if(O.isSSR())return[e._ssrWidth||400,e._ssrHeight||300];let t;try{t=getComputedStyle(e,null)}catch{return[e.clientWidth||0,e.clientHeight||0]}let s=e.clientWidth,i=e.clientHeight;if(!s||!i){const a=e.getBoundingClientRect();s=s||a.width,i=i||a.height}return i-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),s-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),[s,i]}static getBoundingClientRect(e){if(!e)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(O.isSSR())return B.getBoundingClientRect(e);const t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}static getLargestStringFromArr(e){return e.reduce((t,s)=>(Array.isArray(s)&&(s=s.reduce((i,a)=>i.length>a.length?i:a)),t.length>s.length?t:s),0)}static hexToRgba(e="#999999",t=.6){e.substring(0,1)!=="#"&&(e="#999999");const s=e.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 t!==void 0&&i.push(t),"rgba("+i.join(",")+")"}static getOpacityFromRGBA(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}static parseHex(e){if(typeof e!="string")return null;let t=e.trim().replace("#","");return t.length===3&&(t=t.split("").map(s=>s+s).join("")),/^[0-9a-fA-F]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]:null}static relativeLuminance([e,t,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(e)+.7152*i(t)+.0722*i(s)}static getContrastRatio(e,t){const s=pe.parseHex(e),i=pe.parseHex(t);if(!s||!i)return 0;const a=pe.relativeLuminance(s),o=pe.relativeLuminance(i);return(Math.max(a,o)+.05)/(Math.min(a,o)+.05)}static rgb2hex(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}shadeRGBColor(e,t){const s=t.split(","),i=e<0?0:255,a=e<0?-1*e:e,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(e,t){const s=parseInt(t.slice(1),16),i=e<0?0:255,a=e<0?-1*e:e,o=s>
vendor: 5,216 bytes, line 4
4>16,r=s>>8&255,n=255&s;return"#"+(16777216+65536*(Math.round((i-o)*a)+o)+256*(Math.round((i-r)*a)+r)+(Math.round((i-n)*a)+n)).toString(16).slice(1)}shadeColor(e,t){return pe.isColorHex(t)?this.shadeHexColor(e,t):this.shadeRGBColor(e,t)}static isColorHex(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}static isCSSVariable(e){if(typeof e!="string")return!1;const t=e.trim();return t.startsWith("var(")&&t.endsWith(")")}static getThemeColor(e){if(!pe.isCSSVariable(e)||O.isSSR())return e;const t=document.createElement("div");let s;t.style.cssText="position:fixed; left: -9999px; visibility:hidden;",t.style.color=e,document.body.appendChild(t);try{s=window.getComputedStyle(t).color}finally{t.parentNode&&t.parentNode.removeChild(t)}return s}static applyOpacityToColor(e,t){const s=Number(t);return Number.isFinite(s)?s<=0?"transparent":s>=1?e:`color-mix(in srgb, ${e} ${Math.round(100*s)}%, transparent)`:e}static getPolygonPos(e,t){const s=[],i=2*Math.PI/t;for(let a=0;a<t;a++){const o={};o.x=e*Math.sin(a*i),o.y=-e*Math.cos(a*i),s.push(o)}return s}static polarToCartesian(e,t,s,i){const a=(i-90)*Math.PI/180;return{x:e+s*Math.cos(a),y:t+s*Math.sin(a)}}static escapeString(e,t="x"){let s=e.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,t),s}static negToZero(e){return e<0?0:e}static moveIndexInArray(e,t,s){if(s>=e.length){let i=s-e.length+1;for(;i--;)e.push(void 0)}return e.splice(s,0,e.splice(t,1)[0]),e}static extractNumber(e){return parseFloat(e.replace(/[^\d.]*/g,""))}static findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}static setELstyles(e,t){for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e.style.key=t[s])}static preciseAddition(e,t){const s=(String(e).split(".")[1]||"").length,i=(String(t).split(".")[1]||"").length,a=Math.pow(10,Math.max(s,i));return(Math.round(e*a)+Math.round(t*a))/a}static isNumber(e){return!isNaN(e)&&parseFloat(String(Number(e)))===e&&!isNaN(parseInt(e,10))}static isFloat(e){return Number(e)===e&&e%1!=0}static isMsEdge(){if(O.isSSR())return!1;const e=window.navigator.userAgent,t=e.indexOf("Edge/");return t>0&&parseInt(e.substring(t+5,e.indexOf(".",t)),10)}static getGCD(e,t,s=7){let i=Math.pow(10,s-Math.floor(Math.log10(Math.max(e,t))));for(i>1?(e=Math.round(Math.abs(e)*i),t=Math.round(Math.abs(t)*i)):i=1;t;){const a=t;t=e%t,e=a}return e/i}static getPrimeFactors(e){const t=[];let s=2;for(;e>=2;)e%s==0?(t.push(s),e/=s):s++;return t}static mod(e,t,s=7){const i=Math.pow(10,s-Math.floor(Math.log10(Math.max(e,t))));return(e=Math.round(Math.abs(e)*i))%(t=Math.round(Math.abs(t)*i))/i}};class ne{constructor(e){this.w=e,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(e){return typeof e!="number"&&!isNaN(this.parseDate(e))}getTimeStamp(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}getDate(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}parseDate(e){const t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);let s=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s),s}parseDateWithTimezone(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(e,t){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 c(S,L=2){let A=S+"";for(;A.length<L;)A="0"+A;return A}const h=i?e.getUTCFullYear():e.getFullYear();t=(t=(t=t.replace(/(^|[^\\])yyyy+/g,"$1"+h)).replace(/(^|[^\\])yy/g,"$1"+h.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+h);const l=(i?e.getUTCMonth():e.getMonth())+1;t=(t=(t=(t=t.replace(/(^|[^\\])MMMM+/g,"$1"+a[0])).replace(/(^|[^\\])MMM/g,"$1"+o[0])).replace(/(^|[^\\])MM/g,"$1"+c(l))).replace(/(^|[^\\])M/g,"$1"+l);const g=i?e.getUTCDate():e.getDate();t=(t=(t=(t=t.replace(/(^|[^\\])dddd+/g,"$1"+r[0])).replace(/(^|[^\\])ddd/g,"$1"+n[0])).replace(/(^|[^\\])dd/g,"$1"+c(g))).replace(/(^|[^\\])d/g,"$1"+g);const p=i?e.getUTCHours():e.getHours(),u=p>12?p-12:p===0?12:p;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+c(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+c(u))).replace(/(^|[^\\])h/g,"$1"+u);const x=i?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+c(x))).replace(/(^|[^\\])m/g,"$1"+x);const b=i?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+c(b))).replace(/(^|[^\\])s/g,"$1"+b);let f=i?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+c(f,3)),f=Math.round(f/10),t=t.replace(/(^|[^\\])ff/g,"$1"+c(f)),f=Math.round(f/10);const m=p<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+f)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));const w=m.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+w)).replace(/(^|[^\\])t/g,"$1"+w.charAt(0));let y=-e.getTimezoneOffset(),v=i||!y?"Z":y>0?"+":"-";if(!i){y=Math.abs(y);const S=y%60;v+=c(Math.floor(y/60))+":"+c(S)}t=t.replace(/(^|[^\\])K/g,"$1"+v);const C=(i?e.getUTCDay():e.getDay())+1;
4return t=(t=(t=(t=(t=t.replace(new RegExp(r[0],"g"),r[C])).replace(new RegExp(n[0],"g"),n[C])).replace(new RegExp(a[0],"g"),a[l])).replace(new RegExp(o[0],"g"),o[l])).replace(/\\(.)/g,"$1")}getTimeUnitsfromTimestamp(e,t){const s=this.w;s.config.xaxis.min!==void 0&&(e=s.config.xaxis.min),s.config.xaxis.max!==void 0&&(t=s.config.xaxis.max);const i=this.getDate(e),a=this.getDate(t),o=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),r=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(o[6],10),maxMillisecond:parseInt(r[6],10),minSecond:parseInt(o[5],10),maxSecond:parseInt(r[5],10),minMinute:parseInt(o[4],10),maxMinute:parseInt(r[4],10),minHour:parseInt(o[3],10),maxHour:parseInt(r[3],10),minDate:parseInt(o[2],10),maxDate:parseInt(r[2],10),minMonth:parseInt(o[1],10)-1,maxMonth:parseInt(r[1],10)-1,minYear:parseInt(o[0],10),maxYear:parseInt(r[0],10)}}isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}calculcateLastDaysOfMonth(e,t,s){return this.determineDaysOfMonths(e,t)-s}determineDaysOfYear(e){let t=365;return this.isLeapYear(e)&&(t=366),t}determineRemainingDaysOfYear(e,t,s){let i=this.daysCntOfYear[t]+s;return t>1&&this.isLeapYear(e)&&i++,i}determineDaysOfMonths(e,t){let s=30;switch(e=M.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(s=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:s=31}return s}getDateFields(e,t){const s=new Date(e);return t?{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(e,t,s,i){const a=new Date(e);if(i)switch(t){case"year":a.setUTCFullYear(a.getUTCFullYear()+s);break;case"month":a.setUTCMonth(a.getUTCMonth()+s);break;case"week":a.setUTCDate(a.getUTCDate()+7*s);break;case"day":a.setUTCDate(a.getUTCDate()+s);break;case"hour":a.setUTCHours(a.getUTCHours()+s);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+s);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+s)}else switch(t){case"year":a.setFullYear(a.getFullYear()+s);break;case"month":a.setMonth(a.getMonth()+s);break;case"week":a.setDate(a.getDate()+7*s);break;case"day":a.setDate(a.getDate()+s);break;case"hour":a.setHours(a.getHours()+s);break;case"minute":a.setMinutes(a.getMinutes()+s);break;case"second":a.setSeconds(a.getSeconds()+s)}return a.getTime()}ceilToBoundary(e,t,s,i){const a=new Date(e);if(i)switch(t){case"second":{const o=a.getUTCSeconds(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCMilliseconds()===0?e:(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?e:(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?e:(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?e:(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(),c=Math.ceil((n-r)/6048e5),h=r+Math.ceil(c/s)*s*6048e5;return h>=e?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?e:(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?e:Date.UTC(r,0,1)}}else switch(t){case"second":{const o=a.getSeconds(),r=Math.ceil(o/s)*s;return r===o&&a.getMilliseconds()===0?e:(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?e:(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?e:(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?e:(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(),c=Math.ceil((n-r)/6048e5),h=r+Math.ceil(c/s)*s*6048e5;return h>=e?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?e:(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?e:new Date(r,0,1).getTime()}}return e}isAtBoundary(e,t,s){const i=this.getDateFields(e,s);switch(t){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 Te{constructor(e){this.w=e,this.tooltipKeyFormat="dd MMM"}xLabelFormat(e,t,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 ne(this.w);return o.formatDate(o.getDate(t),a.config.tooltip.x.format)}return e(t,s,i)}defaultGeneralFormatter(e){return Array.isArray(e)?e.map(t=>t):e}defaultYFormatter(e,t){const s=this.w;if(M.isNumber(e))if(s.globals.yValueDecimal!==0)e=e.toFixed(t.decimalsInFloat!==void 0?t.decimalsInFloat:s.globals.yValueDecimal);else{const i=e.toFixed(0);e=Number(i)===e?i:e.toFixed(1)}return e}setLabelFormatters(){const e=this.w,t=e.formatters;return t.xaxisTooltipFormatter=s=>this.defaultGeneralFormatter(s),t.ttKeyFormatter=s=>this.defaultGeneralFormatter(s),t.ttZFormatter=s=>s,t.legendFormatter=s=>this.defaultGeneralFormatter(s),e.config.xaxis.labels.formatter!==void 0?t.xLabelFormatter=e.config.xaxis.labels.formatter:t.xLabelFormatter=s=>{if(M.isNumber(s)){if(!e.config.xaxis.convertedCatToNumeric&&e.config.xaxis.type==="numeric"){if(M.isNumber(e.config.xaxis.decimalsInFloat))return s.toFixed(e.config.xaxis.decimalsInFloat);{const i=e.globals.maxX-e.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 e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?s.toFixed(1):s.toFixed(0)}return s},typeof e.config.tooltip.x.formatter=="function"?t.ttKeyFormatter=e.config.tooltip.x.formatter:t.ttKeyFormatter=t.xLabelFormatter,typeof e.config.xaxis.tooltip.formatter=="function"&&(t.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||e.config.tooltip.y.formatter!==void 0)&&(t.ttVal=e.config.tooltip.y),e.config.tooltip.z.formatter!==void 0&&(t.ttZFormatter=e.config.tooltip.z.formatter),e.config.legend.formatter!==void 0&&(t.legendFormatter=e.config.legend.formatter),t.yLabelFormatters=[],e.config.yaxis.forEach((s,i)=>{if(s.labels.formatter!==void 0)t.yLabelFormatters[i]=s.labels.formatter;else if(e.config.chart.type==="violin"){const a=o=>typeof o=="number"&&isFinite(o)?""+Math.round(100*o)/100:o;t.yLabelFormatters[i]=o=>e.globals.xyCharts?Array.isArray(o)?o.map(a):a(o):o}else t.yLabelFormatters[i]=a=>e.globals.xyCharts?Array.isArray(a)?a.map(o=>this.defaultYFormatter(o,s)):this.defaultYFormatter(a,s):a}),e.globals}heatmapLabelFormatters(){const e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.seriesData.seriesNames.slice();const t=e.seriesData.seriesNames.reduce((s,i)=>s.length>i.length?s:i,0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}const qe=({isTimeline:d,seriesIndex:e,dataPointIndex:t,y1:s,y2:i,w:a})=>{var o;let r=a.rangeData.seriesRangeStart[e][t],n=a.rangeData.seriesRangeEnd[e][t],c=a.labelData.labels[t],h=a.config.series[e].name?a.config.series[e].name:"";const l=a.formatters.ttKeyFormatter,g=a.config.tooltip.y.title.formatter,p={w:a,seriesIndex:e,dataPointIndex:t,start:r,end:n};typeof g=="function"&&(h=g(h,p)),(o=a.config.series[e].data[t])!=null&&o.x&&(c=a.config.series[e].data[t].x),!d&&a.config.xaxis.type==="datetime"&&(c=new Te(a).xLabelFormat(a.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new ne(a).formatDate,w:a})),typeof l=="function"&&(c=l(c,p)),Number.isFinite(s)&&Number.isFinite(i)&&(r=s,n=i);let u="",x="";const b=a.globals.colors[e];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type==="datetime"){const f=new ne(a);u=f.formatDate(f.getDate(r),a.config.tooltip.x.format),x=f.formatDate(f.getDate(n),a.config.tooltip.x.format)}else u=r,x=n;else u=a.config.tooltip.x.formatter(r),x=a.config.tooltip.x.formatter(n);return{start:r,end:n,startVal:u,endVal:x,ylabel:c,color:b,seriesName:h}},Ze=d=>{let{color:e,seriesName:t,ylabel:s,start:i,end:a,seriesIndex:o,dataPointIndex:r}=d;const n=d.w.globals.tooltip.tooltipLabels.getFormatters(o);i=n.yLbFormatter(i),a=n.yLbFormatter(a);const c=n.yLbFormatter(d.w.seriesData.series[o][r]);let h="";const l=`<span class="value start-value">
5  ${i}
6  </span> <span class="separator">-</span> <span class="value end-value">
7  ${a}
8  </span>`;return h=d.w.globals.comboCharts?d.w.config.series[o].type==="rangeArea"||d.w.config.series[o].type==="rangeBar"?l:`<span>${c}</span>`:l,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(t||"")+'</span></div><div> <span class="category">'+s+": </span> "+h+" </div></div>"};class Ee{constructor(e){this.opts=e}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(e){return this.hideYAxis(),M.extend(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}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(e,t){const s=t.w.config.series[t.seriesIndex].name;return e!==null?s+": "+e:""},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}}
8,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 e=this.radialBar();return G($({},e),{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:e,dataPointIndex:t,w:s})=>this._getBoxTooltip(s,e,t,["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:e,dataPointIndex:t,w:s})=>this._getBoxTooltip(s,e,t,["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:e,dataPointIndex:t,w:s})=>this._getViolinTooltip(s,e,t)},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}rangeBar(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(e,{seriesIndex:t,dataPointIndex:s,w:i}){const a=()=>{const o=i.rangeData.seriesRangeStart[t][s];return i.rangeData.seriesRangeEnd[t][s]-o};return i.globals.comboCharts?i.config.series[t].type==="rangeBar"||i.config.series[t].type==="rangeArea"?a():e:a()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:e=>e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?(t=>{const{color:s,seriesName:i,ylabel:a,startVal:o,endVal:r}=qe(G($({},t),{isTimeline:!0}));return Ze(G($({},t),{color:s,seriesName:i,ylabel:a,start:o,end:r}))})(e):(t=>{const{color:s,seriesName:i,ylabel:a,start:o,end:r}=qe(t);return Ze(G($({},t),{color:s,seriesName:i,ylabel:a,start:o,end:r}))})(e)},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(e){var t,s;return(t=e.plotOptions.bar)!=null&&t.barHeight||(e.plotOptions.bar.barHeight=2),(s=e.plotOptions.bar)!=null&&s.columnWidth||(e.plotOptions.bar.columnWidth=2),e}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:e=>(t=>{const{color:s,seriesName:i,ylabel:a,start:o,end:r}=qe(t);return Ze(G($({},t),{color:s,seriesName:i,ylabel:a,start:o,end:r}))})(e)}}}brush(e){return M.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;const t=e.dataLabels.formatter;return e.yaxis.forEach((s,i)=>{e.yaxis[i].min=0,e.yaxis[i].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=t||function(s){return typeof s=="number"&&s?s.toFixed(0)+"%":s}),e}stackedBars(){const e=this.bar();return G($({},e),{plotOptions:G($({},e.plotOptions),{bar:G($({},e.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}
vendor: 5,057 bytes, lines 8-10
8convertCatToNumeric(e){return e.xaxis.convertedCatToNumeric=!0,e}convertCatToNumericXaxis(e,t){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(a){return M.isNumber(a)?Math.floor(a):a};const s=e.xaxis.labels.formatter;let i=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return t&&t.length&&(i=t.map(a=>Array.isArray(a)?a:String(a))),i&&i.length&&(e.xaxis.labels.formatter=function(a){return M.isNumber(a)?s(i[Math.floor(a)-1]):s(a)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}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:e=>e.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:e=>e.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:e=>e.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:e=>e,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(e,t,s,i,a){const o=e.candleData.seriesCandleO[t][s],r=e.candleData.seriesCandleH[t][s],n=e.candleData.seriesCandleM[t][s],c=e.candleData.seriesCandleL[t][s],h=e.candleData.seriesCandleC[t][s],l=e.config.series[t];return l.type&&l.type!==a?`<div class="apexcharts-custom-tooltip">
9          ${l.name?l.name:"series-"+(t+1)}: <strong>${e.seriesData.series[t][s]}</strong>
10        </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div>${i[0]}: <span class="value">`+o+`</span></div><div>${i[1]}: <span class="value">`+r+"</span></div>"+(n?`<div>${i[2]}: <span class="value">`+n+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+c+`</span></div><div>${i[4]}: <span class="value">`+h+"</span></div></div>"}_getViolinTooltip(e,t,s){var i,a,o;const r=(i=e.violinData.seriesViolinMin[t])==null?void 0:i[s],n=(a=e.violinData.seriesViolinMax[t])==null?void 0:a[s],c=((o=e.violinData.seriesViolinPoints[t])==null?void 0:o[s])||[],h=e.config.series[t].name||"series-"+(t+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${h}</div><div>Min: <span class="value">${r}</span></div><div>Max: <span class="value">${n}</span></div><div>Observations: <span class="value">${c.length}</span></div></div>`}}const ft={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
10ay","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"}}};class we{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:[ft],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}}
vendor: 4,123 bytes, line 10
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:e=>String(e)}},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:e=>e},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:e=>e+"%"},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:e=>e.globals.seriesTotals.reduce((t,s)=>t+s,0)/e.seriesData.series.length+"%"}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:e=>e,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:e=>e},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:e=>e},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:e=>e.globals.seriesTotals.reduce((t,s)=>t+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:e=>e!==null?e:"",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:e=>e?e+": ":""}},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 Fe{constructor(e){this.opts=e}init({responsiveOverride:e}){var t,s,i,a,o,r,n,c,h,l;let g=this.opts;const p=new we,u=new Ee(g);g=this.normalizeAliasedChartType(g),this.chartType=g.chart.type,g=this.extendYAxis(g),g=this.extendAnnotations(g);let x=p.init(),b={};if(g&&typeof g=="object"){let m={};const w=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"],y=g.chart.requestedType;m=y==="funnel"||y==="pyramid"?u[y]():y==="gauge"?u.gauge():w.indexOf(g.chart.type)!==-1?u[g.chart.type]():u.line(),(s=(t=g.plotOptions)==null?void 0:t.bar)!=null&&s.isFunnel&&(m=u.funnel()),g.chart.stacked&&g.chart.type==="bar"&&(m=u.stackedBars()),(i=g.chart.brush)!=null&&i.enabled&&(m=u.brush(m)),(o=(a=g.plotOptions)==null?void 0:a.line)!=null&&o.isSlopeChart&&(m=u.slope()),g.chart.stacked&&g.chart.stackType==="100%"&&(g=u.stacked100(g)),(n=(r=g.plotOptions)==null?void 0:r.bar)!=null&&n.isDumbbell&&(g=u.dumbbell(g)),this.checkForDarkTheme(O.getApex()),this.checkForDarkTheme(g),g.xaxis=g.xaxis||O.getApex().xaxis||{},e||(g.xaxis.convertedCatToNumeric=!1),g=this.checkForCatToNumericXAxis(this.chartType,m,g),((c=g.chart.sparkline)!=null&&c.enabled||(l=(h=O.getApex().chart)==null?void 0:h.sparkline)!=null&&l.enabled)&&(m=u.sparkline(m)),b=M.extend(x,m)}const f=M.extend(b,O.getApex());return x=M.extend(f,g),x=this.handleUserInputErrors(x),x}normalizeAliasedChartType(e){if(!e||!e.chart)return e;const t=e.chart.type;return t!=="funnel"&&t!=="pyramid"&&t!=="gauge"||(e.chart.requestedType=t,t==="funnel"||t==="pyramid"?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel=!0,e.plotOptions.bar.horizontal=!0,e.chart.type="bar",e.plotOptions.bar.isPyramid=t==="pyramid"):t==="gauge"&&(e.chart.type="radialBar")),e}checkForCatToNumericXAxis(e,t,s){var i,a,o,r,n;const c=new Ee(s),h=(e==="bar"||e==="boxPlot"||e==="violin")&&((a=(i=s.plotOptions)==null?void 0:i.bar)==null?void 0:a.horizontal),l=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",g=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",p=(e==="scatter"||e==="bubble")&&((n=(r=(o=s.plotOptions)==null?void 0:o.scatter)==null?void 0:r.jitter)==null?void 0:n.enabled),u=s.xaxis.tickPlacement?s.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return h||l||p||!g||u==="between"||(s=c.convertCatToNumeric(s)),s}extendYAxis(e,t){const s=new we;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={});const i=O.getApex();
vendor: 5,160 bytes, line 10
10e.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(e.yaxis=M.extend(e.yaxis,i.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[M.extend(s.yAxis,e.yaxis)]:e.yaxis=M.extendArray(e.yaxis,s.yAxis);let a=!1;e.yaxis.forEach(r=>{r.logarithmic&&(a=!0)});let o=e.series;return t&&!o&&(o=t.config.series),a&&o.length!==e.yaxis.length&&o.length&&(e.yaxis=o.map((r,n)=>{if(r.name||(o[n].name=`series-${n+1}`),e.yaxis[n])return e.yaxis[n].seriesName=o[n].name,e.yaxis[n];{const c=M.extend(s.yAxis,e.yaxis[0]);return c.show=!1,c}})),a&&o.length>1&&(o.length,e.yaxis.length),e}extendAnnotations(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e)}extendYAxisAnnotations(e){const t=new we;return e.annotations.yaxis=M.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],t.yAxisAnnotation),e}extendXAxisAnnotations(e){const t=new we;return e.annotations.xaxis=M.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],t.xAxisAnnotation),e}extendPointAnnotations(e){const t=new we;return e.annotations.points=M.extendArray(e.annotations.points!==void 0?e.annotations.points:[],t.pointAnnotation),e}checkForDarkTheme(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}handleUserInputErrors(e){const t=e;if(t.tooltip.shared&&t.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(t.chart.type==="bar"&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return t.chart.type!=="bar"&&t.chart.type!=="rangeBar"||t.tooltip.shared&&t.xaxis.crosshairs.width==="barWidth"&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),t.chart.type!=="candlestick"&&t.chart.type!=="boxPlot"||t.yaxis[0].reversed&&(t.yaxis[0].reversed=!1),t}}const bt=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],Ke=[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 mt{initGlobalVars(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.maxValsInArrayIndex=0,e.yValueDecimal=0,e.allSeriesHasEqualX=!0,e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0,e.disableZoomIn=!1,e.disableZoomOut=!1,e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.rotateXLabels=!1,e.overlappingXLabels=!1,e.radialSize=0,e.barHeight=0,e.barWidth=0,e.animationEnded=!1,e.isDestroyed=!1,e.bulkRevealScheduled=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.lastDrawnDataLabelsIndexes=[],e.textRectsCache=new Map,e.domCache=new Map,e.dimensionCache={},e.cachedSelectors={},e.seriesNS||this._attachNamespaces(e)}_attachNamespaces(e){const t=(r,n,c=n)=>{Object.defineProperty(r,c,{get:()=>e[n],set(h){e[n]=h},enumerable:!0,configurable:!0})},s={};t(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"])t(s,r);Object.defineProperty(e,"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"])t(i,r);Object.defineProperty(e,"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"])t(a,r);Object.defineProperty(e,"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"])t(o,r);Object.defineProperty(e,"cache",{value:o,writable:!1,enumerable:!1,configurable:!0})}globalVars(e){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:e.markers.size,largestSize:0},LINE_HEIGHT_RATIO:1.618,axisCharts:!0,isSlopeChart:e.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:bt,niceScaleDefaultTicks:Ke,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(e){const t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=M.extend({},e),t.initialSeries=M.clone(e.series),t.lastXAxis=M.clone(t.initialConfig.xaxis),t.lastYAxis=M.clone(t.initialConfig.yaxis),t}}class ss{constructor(e){this.opts=e}init(){const e=new Fe(this.opts).init({responsiveOverride:!1}),t=new mt().init(e),s={config:e,globals:t,dom:{},interact:{zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.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:!!O.isBrowser()&&("ontouchstart"in window||navigator.maxTouchPoints>0)},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinMin:[],seriesViolinMax:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,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(t,"dom",{get:()=>s.dom,set(i){s.dom=i},enumerable:!1,configurable:!0});for(const i of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(t,i,{get:()=>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(t,i,{get:()=>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(t,i,{get:()=>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(t,i,{get:()=>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(t,i,{get:()=>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(t,i,{get:()=>s.labelData[i],set(a){s.labelData[i]=a},enumerable:!1,configurable:!0});for(const i of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(t,i,{get:()=>s.rangeData[i],set(a){s.rangeData[i]=a},enumerable:!1,configurable:!0});for(const i of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(t,i,{get:()=>s.candleData[i],set(a){s.candleData[i]=a},enumerable:!1,configurable:!0});for(const i of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(t,i,{get:()=>s.violinData[i],set(a){s.violinData[i]=a},enumerable:!1,configurable:!0});return s}}class J{constructor(e){this.w=e}static checkComboSeries(e,t){let s=!1,i=0,a=0;return t===void 0&&(t="line"),e.length&&e[0].type!==void 0&&e.forEach(o=>{o.type!=="bar"&&o.type!=="column"&&o.type!=="candlestick"&&o.type!=="boxPlot"&&o.type!=="violin"||i++,o.type!==void 0&&o.type!==t&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(e=[]){const t=this.w,s=[];if(t.seriesData.series.length===0)return s;for(let i=0;i<t.seriesData.series[t.globals.maxValsInArrayIndex].length;i++){let a=0;for(let o=0;o<t.seriesData.series.length;o++)t.seriesData.series[o][i]!==void 0&&e.indexOf(o)===-1&&(a+=t.seriesData.series[o][i]);s.push(a)}return s}getSeriesTotalByIndex(e=null){if(e===null)return this.w.config.series.reduce((t,s)=>t+s,0);{const t=this.w.seriesData.series[e];return Array.isArray(t)?t.reduce((s,i)=>s+i,0):t??0}}getStackedSeriesTotalsByGroups(){const e=this.w,t=[];return e.labelData.seriesGroups.forEach(s=>{const i=[];e.config.series.forEach((o,r)=>{s.indexOf(e.seriesData.seriesNames[r])>-1&&i.push(r)});const a=e.seriesData.series.map((o,r)=>i.indexOf(r)===-1?r:-1).filter(o=>o!==-1);t.push(this.getStackedSeriesTotals(a))}),t}setSeriesYAxisMappings(){const e=this.w.globals,t=this.w.config;let s=[];const i=[],a=[],o=this.w.seriesData.series.length>t.yaxis.length||t.yaxis.some(c=>Array.isArray(c.seriesName));
vendor: 2,241 bytes, line 10
10t.series.forEach((c,h)=>{a.push(h),i.push(null)}),t.yaxis.forEach((c,h)=>{s[h]=[]});const r=[];t.yaxis.forEach((c,h)=>{let l=!1;if(c.seriesName){let g=[];Array.isArray(c.seriesName)?g=c.seriesName:g.push(c.seriesName),g.forEach(p=>{t.series.forEach((u,x)=>{if(u.name===p){let b=x;h===x||o?(!o||a.indexOf(x)>-1)&&s[h].push([h,x]):(s[x].push([x,h]),b=h),l=!0,b=a.indexOf(b),b!==-1&&a.splice(b,1)}})})}l||r.push(h)}),s=s.map(c=>{const h=[];return c.forEach(l=>{i[l[1]]=l[0],h.push(l[1])}),h});let n=t.yaxis.length-1;for(let c=0;c<r.length&&(n=r[c],s[n]=[],a);c++){const h=a[0];a.shift(),s[n].push(h),i[h]=n}a.forEach(c=>{s[n].push(c),i[c]=n}),e.seriesYAxisMap=s.map(c=>c),e.seriesYAxisReverseMap=i.map(c=>c),e.seriesYAxisMap.forEach((c,h)=>{c.forEach(l=>{t.series[l]&&t.series[l].group===void 0&&(t.series[l].group="apexcharts-axis-".concat(h.toString()))})})}isSeriesNull(e=null){let t=[];const s=this.w.config.series;return t=e===null?s.filter(i=>i!==null):s[e]&&Array.isArray(s[e].data)?s[e].data.filter(i=>i!==null):s[e]!==null&&s[e]!==void 0?[s[e]]:[],t.length===0}seriesHaveSameValues(e){const t=this.w.seriesData.series[e];return!Array.isArray(t)||t.every((s,i,a)=>s===a[0])}getCategoryLabels(e){const t=this.w;let s=e.slice();return t.config.xaxis.convertedCatToNumeric&&(s=e.map(i=>t.config.xaxis.labels.formatter(i-t.globals.minX+1))),s}getLargestSeries(){const e=this.w;e.globals.maxValsInArrayIndex=e.seriesData.series.map(t=>t.length).indexOf(Math.max.apply(Math,e.seriesData.series.map(t=>t.length)))}getLargestMarkerSize(){const e=this.w;let t=0;return e.globals.markers.size.forEach(s=>{t=Math.max(t,s)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(s=>{t=Math.max(t,s.size)}),t>0&&(e.config.markers.hover.size>0?t=e.config.markers.hover.size:t+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=t,t}getSeriesTotals(){const e=this.w;e.globals.seriesTotals=e.seriesData.series.map(t=>{let s=0;if(Array.isArray(t))for(let i=0;i<t.length;i++)s+=t[i];else s+=t;return s})}getSeriesTotalsXRange(e,t){const s=this.w;return s.seriesData.series.map((i,a)=>{let o=0;for(let r=0;r<i.length;r++)s.seriesData.seriesX[a][r]>e&&s.seriesData.seriesX[a][r]<t&&(o+=i[r]);return o}
10)}getPercentSeries(){const e=this.w;e.globals.seriesPercent=e.seriesData.series.map(t=>{const s=[];if(Array.isArray(t))for(let i=0;i<t.length;i++){const a=e.seriesData.stackedSeriesTotals[i];let o=0;a&&(o=100*t[i]/a),s.push(o)}else{const i=100*t/e.globals.seriesTotals.reduce((a,o)=>a+o,0);s.push(i)}return s})}getCalculatedRatios(){const e=this.w,t=e.globals,s=[];let i=0,a=0,o=0,r=0,n=[],c=.1,h=0;if(t.yRange=[],t.isMultipleYAxis)for(let l=0;l<t.minYArr.length;l++)t.yRange.push(Math.abs(t.minYArr[l]-t.maxYArr[l])),n.push(0);else t.yRange.push(Math.abs(t.minY-t.maxY));t.xRange=Math.abs(t.maxX-t.minX),t.zRange=Math.abs(t.maxZ-t.minZ);for(let l=0;l<t.yRange.length;l++)s.push(t.yRange[l]/this.w.layout.gridHeight);if(a=t.xRange/this.w.layout.gridWidth,i=t.yRange/this.w.layout.gridWidth,o=t.xRange/this.w.layout.gridHeight,r=t.zRange/this.w.layout.gridHeight*16,r||(r=1),t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(t.hasNegs=!0),e.globals.seriesYAxisReverseMap.length>0){const l=(g,p)=>{const u=e.config.yaxis[e.globals.seriesYAxisReverseMap[p]],x=g<0?-1:1;return g=Math.abs(g),u.logarithmic&&(g=this.getBaseLog(u.logBase,g)),-x*g/s[p]};if(t.isMultipleYAxis){n=[];for(let g=0;g<s.length;g++)n.push(l(t.minYArr[g],g))}else n=[],n.push(l(t.minY,0)),t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(c=-t.minY/i,h=t.minX/a)}else n=[],n.push(0),c=0,h=0;return{yRatio:s,invertedYRatio:i,zRatio:r,xRatio:a,invertedXRatio:o,baseLineInvertedY:c,baseLineY:n,baseLineX:h}}getLogSeries(e){const t=this.w;return t.globals.seriesLog=e.map((s,i)=>{const a=t.globals.seriesYAxisReverseMap[i];return t.config.yaxis[a]&&t.config.yaxis[a].logarithmic?s.map(o=>o===null?null:this.getLogVal(t.config.yaxis[a].logBase,o,i)):s}),t.globals.invalidLogScale?e:t.globals.seriesLog}getLogValAtSeriesIndex(e,t){if(e===null)return null;const s=this.w,i=s.globals.seriesYAxisReverseMap[t];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,e,t):e}getBaseLog(e,t){return Math.log(t)/Math.log(e)}getLogVal(e,t,s){if(t<=0)return 0;const i=this.w,a=i.globals.minYArr[s]===0?-1:this.getBaseLog(e,i.globals.minYArr[s]),o=(i.globals.maxYArr[s]===0?0:this.getBaseLog(e,i.globals.maxYArr[s]))-a;return t<1?t/o:(this.getBaseLog(e,t)-a)/o}getLogYRatios(e){const t=this.w,s=this.w.globals,i=s;return i.yLogRatio=e.slice(),i.logYRange=s.yRange.map((a,o)=>{const r=t.globals.seriesYAxisReverseMap[o];if(t.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let n=-Number.MAX_VALUE,c=Number.MIN_VALUE,h=1;return s.seriesLog.forEach((l,g)=>{l.forEach(p=>{t.config.yaxis[g]&&t.config.yaxis[g].logarithmic&&(n=Math.max(p,n),c=Math.min(p,c))})}),h=Math.pow(s.yRange[o],Math.abs(c-n)/s.yRange[o]),i.yLogRatio[o]=h/this.w.layout.gridHeight,h}}),i.invalidLogScale?e.slice():i.yLogRatio}static extendArrayProps(e,t,s){var i,a;return t?.yaxis&&(t=e.extendYAxis(t,s)),t?.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),(i=t?.annotations)!=null&&i.xaxis&&(t=e.extendXAxisAnnotations(t)),(a=t?.annotations)!=null&&a.points&&(t=e.extendPointAnnotations(t))),t}drawSeriesByGroup(e,t,s,i){const a=this.w,o=[];return e.series.length>0&&t.forEach(r=>{const n=[],c=[];e.i.forEach((h,l)=>{a.config.series[h].group===r&&(n.push(e.series[l]),c.push(h))}),n.length>0&&o.push(i.draw(n,s,c))}),o}}const Je="http://www.w3.org/2000/svg";function yt(d){return 1-Math.pow(1-d,3)}let Qe=null;function wt(){if(!O.isBrowser())return!1;try{return Qe||(Qe=window.matchMedia("(prefers-reduced-motion: reduce)")),!!Qe.matches}catch{return!1}}function ue(d,e,t){if(!O.isBrowser()||t.globals.dataChanged||t.globals.resized)return!1;const s=t.config.chart.animations;if(!s||s.enabled===!1)return!1;const i=t.config.chart.type;if(i!=="line"&&i!=="area"&&i!=="rangeArea"||!(t.layout.gridWidth>0))return!1;const a=2*(s.speed||800),o=Math.max(0,Math.min(1,e/t.layout.gridWidth)),r=(1-Math.cbrt(1-o))*a,n=d.node.style;n.opacity="0";let c=null;const h=l=>{c===null&&(c=l),l-c>=r?n.opacity="":B.requestAnimationFrame(h)};return B.requestAnimationFrame(h),!0}function et(d){const e=d.style,t=d.index||0,s=typeof d.baseDelay=="number"?d.baseDelay:40,i=d.row||0,a=d.col||0,o=d.groupIndex||0,r=d.perGroup||1,n=d.centerDistance||0;switch(e){case"none":return 0;case"diagonal":return(i+a)*s;case"group":return o*s+t%r*(s/4);case"centroid":return n*s*(t+1);default:return t*s}}class Se{constructor(e,t){this.w=e,this.ctx=t}animateLine(e,t,s,i){e.attr(t).animate(i).attr(s)}animateMarker(e,t,s,i){e.attr({opacity:0}
10).animate(t).attr({opacity:1}).after(()=>{i()})}animatePop(e,{speed:t,delay:s=0,onComplete:i}){const a=this.w;if(!O.isBrowser()||!a.globals.shouldAnimate||t<1)return void(i&&i());const o=e.node.style;o.transformBox="fill-box",o.transformOrigin="center",o.transform="scale(0)",o.opacity="0";const r=performance.now()+s,n=c=>{const h=Math.max(0,Math.min(1,(c-r)/t));o.transform=`scale(${(function(l){return 1+2.70158*Math.pow(l-1,3)+1.70158*Math.pow(l-1,2)})(h)})`,o.opacity=String(Math.min(1,2*h)),h<1?B.requestAnimationFrame(n):(o.transform="",o.transformOrigin="",o.transformBox="",o.opacity="",i&&i())};B.requestAnimationFrame(n)}animateRect(e,t,s,i,a,o=0){e.attr(t).animate(i,o).attr(s).after(()=>a())}animatePathsGradually(e){const{el:t,realIndex:s,j:i,fill:a,pathFrom:o,pathTo:r,speed:n,delay:c}=e,h=this.w;let l=0;h.config.chart.animations.animateGradually.enabled&&(l=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&h.config.chart.type!=="bar"&&(l=0),this.morphSVG(t,s,i,h.config.chart.type!=="line"||h.globals.comboCharts?a:"stroke",o,r,n,c*l)}revealBulk(e){const t=this.w;e.node.classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:e.node}),O.isBrowser()&&t.globals.shouldAnimate?t.globals.bulkRevealScheduled||(t.globals.bulkRevealScheduled=!0,B.requestAnimationFrame(()=>{t.globals.isDestroyed||(t.globals.bulkRevealScheduled=!1,this.animationCompleted(e))})):this.animationCompleted(e)}showDelayedElements(){this.w.globals.delayedElements.forEach(e=>{const t=e.el;t.classList.remove("apexcharts-element-hidden"),t.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(e){const t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd=="function"&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}animateDraw(e,{realIndex:t,j:s,isFill:i,isLast:a,speed:o,delay:r,mask:n}){const c=this.w,h=this,l=()=>{a&&c.globals.shouldAnimate&&h.animationCompleted(e),h.showDelayedElements()};if(!O.isBrowser()||!c.globals.shouldAnimate||o<1)return void l();const g=e.node,p=()=>{const u=n&&n.type==="radial",x=c.layout.gridWidth+8,b=n&&n.cx||0,f=n&&n.cy||0,m=(n&&n.r||c.layout.gridWidth/2)+4,w=`apexDrawMask${c.globals.cuid}-${t}-${s??0}-${i?"f":"s"}`,y=B.createElementNS(Je,"mask");let v;if(y.setAttribute("id",w),y.setAttribute("maskUnits","userSpaceOnUse"),u){const L=m;y.setAttribute("x",String(b-L)),y.setAttribute("y",String(f-L)),y.setAttribute("width",String(2*L)),y.setAttribute("height",String(2*L)),v=B.createElementNS(Je,"circle"),v.setAttribute("cx",String(b)),v.setAttribute("cy",String(f)),v.setAttribute("r","0"),v.setAttribute("fill","#fff")}else y.setAttribute("x",String(-4)),y.setAttribute("y",String(-4)),y.setAttribute("width",String(x)),y.setAttribute("height",String(c.layout.gridHeight+8)),v=B.createElementNS(Je,"rect"),v.setAttribute("x",String(-4)),v.setAttribute("y",String(-4)),v.setAttribute("width","0"),v.setAttribute("height",String(c.layout.gridHeight+8)),v.setAttribute("fill","#fff");y.appendChild(v),c.dom.elDefs.node.appendChild(y),g.setAttribute("mask",`url(#${w})`);const C=performance.now()+(r||0),S=L=>{if(c.globals.isDestroyed)return;const A=Math.max(0,Math.min(1,(L-C)/o)),D=yt(A);u?v.setAttribute("r",String(D*m)):v.setAttribute("width",String(D*x)),A<1?B.requestAnimationFrame(S):(g.removeAttribute("mask"),y.parentNode&&y.parentNode.removeChild(y),l())};B.requestAnimationFrame(S)};B.requestAnimationFrame(()=>{if(c.globals.isDestroyed)return;if(i)return void p();const u=g.getAttribute("stroke-dasharray");if(u&&u!=="0"&&u!=="")return void p();let x=0;try{typeof g.getTotalLength=="function"&&(x=g.getTotalLength())}catch{x=0}x?(b=>{g.setAttribute("stroke-dasharray",String(b)),g.setAttribute("stroke-dashoffset",String(b));const f=performance.now()+(r||0),m=w=>{if(c.globals.isDestroyed)return;const y=Math.max(0,Math.min(1,(w-f)/o));g.setAttribute("stroke-dashoffset",String(b*(1-yt(y)))),y<1?B.requestAnimationFrame(m):(g.removeAttribute("stroke-dasharray"),g.removeAttribute("stroke-dashoffset"),l())};B.requestAnimationFrame(m)})(x):l()})}morphSVG(e,t,s,i,a,o,r,n){var c,h;const l=this.w;a||(a=e.attr("pathFrom")),o||(o=e.attr("pathTo"));const g=()=>(l.config.chart.type==="radar"&&(r=1),`M 0 ${l.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=g()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=g()),l.globals.shouldAnimate||(r=1);const p=((h=(c=this.ctx)==null?void 0:c.morphTypeChange)==null?void 0:h.isActive())===!0?"polygons":"commands";e.plot(a).animate(1,n).plot(a).animate(r,n).plot(o,p).after(()=>{M.isNumber(s)?s===l.seriesData.series[l.globals.maxValsInArrayIndex].length-2&&l.globals.shouldAnimate&&this.animationCompleted(e):i!=="none"&&l.globals.shouldAnimate&&(!l.globals.comboCharts&&t===l.seriesData.series.length-1||l.globals.comboCharts)&&this.animationCompleted(e),this.showDelayedElements()})}}class te{constructor(e){this.w=e}getDefaultFilter(e,t){const s=this.w;e.unfilter&&e.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(e,s.config.chart.dropShadow,t)}
10applyFilter(e,t,s){var i,a,o;const r=this.w;if(e.unfilter&&e.unfilter(!0),s==="none")return void this.getDefaultFilter(e,t);const n=r.config.chart.dropShadow,c=s==="lighten"?2:.3;e.filterWith&&(e.filterWith(h=>{h.colorMatrix({type:"matrix",values:`
11            ${c} 0 0 0 0
12            0 ${c} 0 0 0
13            0 0 ${c} 0 0
14            0 0 0 1 0
15          `,in:"SourceGraphic",result:"brightness"}),n.enabled&&this.addShadow(h,t,n,"brightness")}),n.noUserSpaceOnUse||(a=(i=e.filterer())==null?void 0:i.node)==null||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((o=e.filterer())==null?void 0:o.node))}addShadow(e,t,s,i){var a;const o=this.w;let{blur:r,top:n,left:c,color:h,opacity:l}=s;if(h=Array.isArray(h)?h[t]:h,((a=o.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.length)>0&&o.config.chart.dropShadow.enabledOnSeries.indexOf(t)===-1)return e;e.offset({in:i,dx:c,dy:n,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:r,result:"blur"}),e.flood({"flood-color":h,"flood-opacity":l,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",i])}dropShadow(e,t,s=0){var i,a,o,r,n;const c=this.w;return e.unfilter&&e.unfilter(!0),M.isMsEdge()&&c.config.chart.type==="radialBar"||((i=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:i.length)>0&&((a=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.indexOf(s))===-1||e.filterWith&&(e.filterWith(h=>{this.addShadow(h,s,t,"SourceGraphic")}),t.noUserSpaceOnUse||(r=(o=e.filterer())==null?void 0:o.node)==null||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((n=e.filterer())==null?void 0:n.node)),e}setSelectionFilter(e,t,s){const i=this.w;if(i.interact.selectedDataPoints[t]!==void 0&&i.interact.selectedDataPoints[t].indexOf(s)>-1){e.node.setAttribute("selected",!0);const a=i.config.states.active.filter;a!=="none"&&this.applyFilter(e,t,a.type)}}_scaleFilterSize(e){e&&(t=>{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.setAttribute(s,t[s])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}class F{constructor(e,t=null){this.w=e,this.ctx=t}roundPathCorners(e,t){function s(L,A,D){var k=A.x-L.x,P=A.y-L.y,T=Math.sqrt(k*k+P*P);return i(L,A,Math.min(1,D/T))}function i(L,A,D){return{x:L.x+(A.x-L.x)*D,y:L.y+(A.y-L.y)*D}}function a(L,A){L.length>2&&(L[L.length-2]=A.x,L[L.length-1]=A.y)}function o(L){return{x:parseFloat(L[L.length-2]),y:parseFloat(L[L.length-1])}}e.indexOf("NaN")>-1&&(e="");var r=e.split(/[,\s]/).reduce(function(L,A){var D=A.match(/^([a-zA-Z])(.+)/);return D?(L.push(D[1]),L.push(D[2])):L.push(A),L},[]).reduce(function(L,A){return parseFloat(A)==A&&L.length?L[L.length-1].push(A):L.push([A]),L},[]),n=[];if(r.length>1){var c=o(r[0]),h=null;r[r.length-1][0]=="Z"&&r[0].length>2&&(h=["L",c.x,c.y],r[r.length-1]=h),n.push(r[0]);for(var l=1;l<r.length;l++){var g=n[n.length-1],p=r[l],u=p==h?r[1]:r[l+1];if(u&&g&&g.length>2&&p[0]=="L"&&u.length>2&&u[0]=="L"){var x,b,f=o(g),m=o(p),w=o(u);x=s(m,f,t),b=s(m,w,t),a(p,x),p.origPoint=m,n.push(p);var y=i(x,m,.5),v=i(m,b,.5),C=["C",y.x,y.y,v.x,v.y,b.x,b.y];C.origPoint=m,n.push(C)}else n.push(p)}if(h){var S=o(n[n.length-1]);n.push(["Z"]),a(n[0],S)}}else n=r;return n.reduce(function(L,A){return L+A.join(" ")+" "},"")}drawLine(e,t,s,i,a="#a8a8a8",o=0,r=null,n="butt"){return this.w.dom.Paper.line().attr({x1:e,y1:t,x2:s,y2:i,stroke:a,"stroke-dasharray":o,"stroke-width":r,"stroke-linecap":n})}drawRect(e=0,t=0,s=0,i=0,a=0,o="#fefefe",r=1,n=null,c=null,h=0){const l=this.w.dom.Paper.rect();return l.attr({x:e,y:t,width:s>0?s:0,height:i>0?i:0,rx:a,ry:a,opacity:r,"stroke-width":n!==null?n:0,stroke:c!==null?c:"none","stroke-dasharray":h}),l.node.setAttribute("fill",o),l}drawPolygon(e,t="#e1e1e1",s=1,i="none"){return this.w.dom.Paper.polygon(e).attr({fill:i,stroke:t,"stroke-width":s})}drawCircle(e,t=null){e<0&&(e=0);const s=this.w.dom.Paper.circle(2*e);return t!==null&&s.attr(t),s}drawPath({d:e="",stroke:t="#a8a8a8",strokeWidth:s=1,fill:i,fillOpacity:a=1,strokeOpacity:o=1,classes:r,strokeLinecap:n=null,strokeDashArray:c=0}){const h=this.w;return n===null&&(n=h.config.stroke.lineCap),(e.indexOf("undefined")>-1||e.indexOf("NaN")>-1)&&(e=`M 0 ${h.layout.gridHeight}`),h.dom.Paper.path(e).attr({fill:i,"fill-opacity":a,stroke:t,"stroke-opacity":o,"stroke-linecap":n,"stroke-width":s,"stroke-dasharray":c,class:r})}group(e=null){const t=this.w.dom.Paper.group();return e!==null&&t.attr(e),t}move(e,t){return["M",e,t].join(" ")}line(e,t,s=null){return s==="H"?[" H",e].join(" "):s==="V"?[" V",t].join(" "):[" L",e,t].join(" ")}curve(e,t,s,i,a,o){return["C",e,t,s,i,a,o].join(" ")}quadraticCurve(e,t,s,i){return["Q",e,t,s,i].join(" ")}arc(e,t,s,i,a,o,r,n=!1){let c="A";return n&&(c="a"),[c,e,t,s,i,a,o,r].join(" ")}renderPaths({j:e,realIndex:t,pathFrom:s,pathTo:i,stroke:a,strokeWidth:o,strokeLinecap:r,fill:n,animationDelay:c,initialSpeed:h,dataChangeSpeed:l,className:g,chartType:p,shouldClipToGrid:u=!0,bindEventsOnPaths:x=!0,drawShadow:b=!0,drawMask:f=null}){var m,w;const y=this.w,v=new te(this.w),C=new Se(this.w,(m=this.ctx)!=null?m:void 0),S=this.w.config.chart.animations.enabled,L=S&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0 ")&&i){const W=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);W&&(s=s.replace(/^M\s+0\s+0/,W[0]))}let A;const D=!!(S&&!y.globals.resized||L&&y.globals.dataChanged&&y.globals.shouldAnimate),k=typeof g=="string"&&(g.indexOf("apexcharts-line")>-1||g.indexOf("apexcharts-area")>-1||g.indexOf("apexcharts-rangeArea")>-1||g.indexOf("apexcharts-radar")>-1),P=!(!S||y.globals.resized||y.globals.dataChanged||!k),T=(w=y.config.chart.animations.largeDatasetThreshold)!=null?w:0,I=!!(D&&!P&&T>0&&y.globals.dataPoints>T),E=!(!(p==="candlestick"||p==="boxPlot")||!D||P||!y.globals.dataChanged),X=I||E;!D||P||X?(A=i,D||(y.globals.animationEnded=!0)):A=s;const z=y.config.stroke.dashArray;let H=0;H=Array.isArray(z)?z[t]:y.config.stroke.dashArray;const Y=this.drawPath({d:A,stroke:a,strokeWidth:o,fill:n,fillOpacity:1,classes:g,strokeLinecap:r,strokeDashArray:H});Y.attr("index",t),u&&(p==="bar"&&!y.globals.isBarHorizontal||y.globals.comboCharts?Y.attr({"clip-path":`url(#gridRectBarMask${y.globals.cuid})`}):Y.attr({"clip-path":`url(#gridRectMask${y.globals.cuid})`}
15)),y.config.chart.dropShadow.enabled&&b&&v.dropShadow(Y,y.config.chart.dropShadow,t),x&&(Y.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,Y)),Y.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,Y)),Y.node.addEventListener("mousedown",this.pathMouseDown.bind(this,Y))),Y.attr({pathTo:i,pathFrom:s});const N={el:Y,j:e,realIndex:t,pathFrom:s,pathTo:i,fill:n,strokeWidth:o,delay:c};if(!S||y.globals.resized||y.globals.dataChanged)!y.globals.resized&&y.globals.dataChanged||X||C.showDelayedElements();else if(P){const W=2*h,R=a==="none"||o===0,_=y.seriesData.series.length,V=!!y.globals.comboCharts||t===_-1;C.animateDraw(Y,{realIndex:t,j:e,isFill:R,isLast:V,speed:W,delay:0,mask:f})}else X||C.animatePathsGradually(G($({},N),{speed:h}));return y.globals.dataChanged&&L&&D&&!X&&C.animatePathsGradually(G($({},N),{speed:l})),X&&C.revealBulk(Y),Y}drawPattern(e,t,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(t,s,o=>{e==="horizontalLines"?o.line(0,0,s,0).stroke({color:i,width:a+1}):e==="verticalLines"?o.line(0,0,0,t).stroke({color:i,width:a+1}):e==="slantedLines"?o.line(0,0,t,s).stroke({color:i,width:a}):e==="squares"?o.rect(t,s).fill("none").stroke({color:i,width:a}):e==="circles"&&o.circle(t).fill("none").stroke({color:i,width:a})})}drawGradient(e,t,s,i,a,o=null,r=null,n=[],c=0){const h=this.w;let l;t.length<9&&t.indexOf("#")===0&&(t=M.hexToRgba(t,i)),s.length<9&&s.indexOf("#")===0&&(s=M.hexToRgba(s,a));let g=0,p=1,u=1,x=null;r!==null&&(g=r[0]!==void 0?r[0]/100:0,p=r[1]!==void 0?r[1]/100:1,u=r[2]!==void 0?r[2]/100:1,x=r[3]!==void 0?r[3]/100:null);const b=!(h.config.chart.type!=="donut"&&h.config.chart.type!=="pie"&&h.config.chart.type!=="polarArea"&&h.config.chart.type!=="bubble");if(l=n&&n.length!==0?h.dom.Paper.gradient(b?"radial":"linear",f=>
15{(Array.isArray(n[c])?n[c]:n).forEach(m=>{f.stop(m.offset/100,m.color,m.opacity)})}):h.dom.Paper.gradient(b?"radial":"linear",f=>{f.stop(g,t,i),f.stop(p,s,a),f.stop(u,s,a),x!==null&&f.stop(x,t,i)}),b){const f=h.layout.gridWidth/2,m=h.layout.gridHeight/2;h.config.chart.type!=="bubble"?l.attr({gradientUnits:"userSpaceOnUse",cx:f,cy:m,r:o}):l.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else e==="vertical"?l.from(0,0).to(0,1):e==="diagonal"?l.from(0,0).to(1,1):e==="horizontal"?l.from(0,1).to(1,1):e==="diagonal2"&&l.from(1,0).to(0,1);return l}getTextBasedOnMaxWidth({text:e,maxWidth:t,fontSize:s,fontFamily:i}){const a=this.getTextRects(e,s,i,""),o=a.width/e.length,r=Math.floor(t/o);return t<a.width?e.slice(0,r-3)+"...":e}drawText({x:e,y:t,text:s,textAnchor:i,fontSize:a,fontFamily:o,fontWeight:r,foreColor:n,opacity:c,maxWidth:h,cssClass:l="",isPlainText:g=!0,dominantBaseline:p="auto"}){const u=this.w;s===void 0&&(s="");let x=s;i||(i="start"),n&&n.length||(n=u.config.chart.foreColor),o=o||u.config.chart.fontFamily,r=r||"regular";const b={maxWidth:h,fontSize:a=a||"11px",fontFamily:o};let f;return Array.isArray(s)?f=u.dom.Paper.text(m=>{for(let w=0;w<s.length;w++)x=s[w],h&&(x=this.getTextBasedOnMaxWidth($({text:s[w]},b))),w===0?m.tspan(x):m.tspan(x).newLine()}):(h&&(x=this.getTextBasedOnMaxWidth($({text:s},b))),f=g?u.dom.Paper.plain(s):u.dom.Paper.text(m=>m.tspan(x))),f.attr({x:e,y:t,"text-anchor":i,"dominant-baseline":p,"font-size":a,"font-family":o,"font-weight":r,fill:n,class:"apexcharts-text "+l}),f.node.style.fontFamily=o,f.node.style.opacity=c,f}getMarkerPath(e,t,s,i){let a="";switch(s){case"cross":a=`M ${e-(i/=1.4)} ${t-i} L ${e+i} ${t+i}  M ${e-i} ${t+i} L ${e+i} ${t-i}`;break;case"plus":a=`M ${e-(i/=1.12)} ${t} L ${e+i} ${t}  M ${e} ${t-i} L ${e} ${t+i}`;break;case"star":case"sparkle":{let o=5;i*=1.15,s==="sparkle"&&(i/=1.1,o=4);const r=Math.PI/o;for(let n=0;n<=2*o;n++){const c=n*r,h=n%2==0?i:i/2;a+=(n===0?"M":"L")+(e+h*Math.sin(c))+","+(t-h*Math.cos(c))}a+="Z";break}case"triangle":a=`M ${e} ${t-i} 
16             L ${e+i} ${t+i} 
17             L ${e-i} ${t+i} 
18             Z`;break;case"square":case"rect":a=`M ${e-(i/=1.125)} ${t-i} 
19           L ${e+i} ${t-i} 
20           L ${e+i} ${t+i} 
21           L ${e-i} ${t+i} 
22           Z`;break;case"diamond":a=`M ${e} ${t-(i*=1.05)} 
23             L ${e+i} ${t} 
24             L ${e} ${t+i} 
25             L ${e-i} ${t} 
26            Z`;break;case"line":a=`M ${e-(i/=1.1)} ${t} 
27           L ${e+i} ${t}`;break;default:a=`M ${e}, ${t} 
28           m -${(i*=2)/2}, 0 
29           a ${i/2},${i/2} 0 1,0 ${i},0 
30           a ${i/2},${i/2} 0 1,0 -${i},0`}return a}drawMarkerShape(e,t,s,i,a){const o=this.drawPath({d:this.getMarkerPath(e,t,s,i),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return o.attr({cx:e,cy:t,shape:a.shape,class:a.class?a.class:""}),o}drawMarker(e,t,s){e=e||0;let i=s.pSize||0;return M.isNumber(t)||(i=0,t=0),this.drawMarkerShape(e,t,s?.shape,i,$($({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(e,t){var s,i;const a=this.w,o=new te(this.w),r=parseInt((s=e.node.getAttribute("index"))!=null?s:"",10),n=parseInt((i=e.node.getAttribute("j"))!=null?i:"",10);if(!(isNaN(r)||isNaN(n)||(typeof a.config.chart.events.dataPointMouseEnter=="function"&&a.config.chart.events.dataPointMouseEnter(t,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),F._fireEvent(a,"dataPointMouseEnter",[t,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}]),a.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||a.config.states.hover.filter.type==="none"||a.interact.isTouchDevice))){const c=a.config.states.hover.filter;o.applyFilter(e,r,c.type)}}pathMouseLeave(e,t){var s,i;const a=this.w,o=new te(this.w),r=parseInt((s=e.node.getAttribute("index"))!=null?s:"",10),n=parseInt((i=e.node.getAttribute("j"))!=null?i:"",10);isNaN(r)||isNaN(n)||(typeof a.config.chart.events.dataPointMouseLeave=="function"&&a.config.chart.events.dataPointMouseLeave(t,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),F._fireEvent(a,"dataPointMouseLeave",[t,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}]),a.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||a.config.states.hover.f
30ilter.type!=="none"&&o.getDefaultFilter(e,r))}pathMouseDown(e,t){var s,i;const a=this.w,o=new te(this.w),r=parseInt((s=e.node.getAttribute("index"))!=null?s:"",10),n=parseInt((i=e.node.getAttribute("j"))!=null?i:"",10);if(isNaN(r)||isNaN(n))return;let c="false";if(e.node.getAttribute("selected")==="true"){e.node.setAttribute("selected","false");const h=a.interact.selectedDataPoints[r].indexOf(n);h>-1&&a.interact.selectedDataPoints[r].splice(h,1)}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0){a.interact.selectedDataPoints=[];const h=a.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),l=a.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),g=p=>{Array.prototype.forEach.call(p,u=>{u.node.setAttribute("selected","false"),o.getDefaultFilter(u,r)})};g(h),g(l)}e.node.setAttribute("selected","true"),c="true",a.interact.selectedDataPoints[r]===void 0&&(a.interact.selectedDataPoints[r]=[]),a.interact.selectedDataPoints[r].push(n)}if(c==="true"){const h=a.config.states.active.filter;if(h!=="none")o.applyFilter(e,r,h.type);else if(a.config.states.hover.filter!=="none"&&!a.interact.isTouchDevice){const l=a.config.states.hover.filter;o.applyFilter(e,r,l.type)}}else if(a.config.states.active.filter.type!=="none")if(a.config.states.hover.filter.type==="none"||a.interact.isTouchDevice)o.getDefaultFilter(e,r);else{const h=a.config.states.hover.filter;o.applyFilter(e,r,h.type)}typeof a.config.chart.events.dataPointSelection=="function"&&a.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:a}),t&&F._fireEvent(a,"dataPointSelection",[t,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:a}])}rotateAroundCenter(e){let t={};return e&&typeof e.getBBox=="function"&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}setupEventDelegation(e,t){let s=null;e.node.addEventListener("mouseover",i=>{const a=F._findDelegateTarget(i.target,e.node,t);a&&a!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=a,a.instance&&this.pathMouseEnter(a.instance,i))}),e.node.addEventListener("mouseout",i=>{s&&(i.relatedTarget?F._findDelegateTarget(i.relatedTarget,e.node,t):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),e.node.addEventListener("mousedown",i=>{const a=F._findDelegateTarget(i.target,e.node,t);a&&a.instance&&this.pathMouseDown(a.instance,i)})}static _fireEvent(e,t,s){const i=e.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,t))return;const a=i[t];for(let o=0;o<a.length;o++)a[o].apply(null,s)}static _findDelegateTarget(e,t,s){for(;e&&e!==t&&e!==document;){if(e.matches&&e.matches(s))return e;e=e.parentNode}return null}static setAttrs(e,t){for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.setAttribute(s,t[s])}getTextRects(e,t,s,i,a=!0){const o=this.w,r=[e,t,s,i,a].join("\0"),n=o.globals.textRectsCache;if(n&&n.has(r))return n.get(r);const c=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:s,foreColor:"#fff",opacity:0});i&&c.attr("transform",i),o.dom.Paper.add(c);let h=c.bbox();const l=h.y;a||(h=c.node.getBoundingClientRect()),c.remove();const g={width:h.width,height:h.height,centerOffset:a?l+h.height/2- -200:0};return n&&n.set(r,g),g}placeTextWithEllipsis(e,t,s){if(typeof e.getComputedTextLength=="function"&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=s/1.1)){for(let i=t.length-3;i>0;i-=3)if(e.getSubStringLength(0,i)<=s/1.1)return void(e.textContent=t.substring(0,i)+"...");e.textContent="."}}}const U="http://www.w3.org/2000/svg";class he{constructor(e,t){typeof e=="object"?(this.x=e.x,this.y=e.y):(this.x=e||0,this.y=t||0)}transform(e){return e.apply(this)}clone(){return new he(this.x,this.y)}}class ve{constructor(e,t,s,i,a,o){this.a=e??1,this.b=t??0,this.c=s??0,this.d=i??1,this.e=a??0,this.f=o??0}rotate(e){const t=e*Math.PI/180,s=Math.cos(t),i=Math.sin(t);return this.multiply(new ve(s,i,-i,s,0,0))}scale(e,t){return this.multiply(new ve(e,0,0,t??e,0,0))}multiply(e){return new ve(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.e+this.c*e.f+this.e,this.b*e.e+this.d*e.f+this.f)}
30apply(e){return new he(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)}}class is{constructor(e,t,s,i){this.x=e,this.y=t,this.w=s,this.h=i,this.width=s,this.height=i,this.x2=e+s,this.y2=t+i}}class le{constructor(e){this.w=e,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(e){const t=this.w,s=t.config,i=parseInt(String(t.layout.gridWidth),10),a=parseInt(String(t.layout.gridHeight),10),o=i>a?i:a,r=e.image;let n=0,c=0;e.width===void 0&&e.height===void 0?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(n=s.fill.image.width+1,c=s.fill.image.height):(n=o+1,c=o):(n=e.width,c=e.height);const h=B.createElementNS(U,"pattern");F.setAttrs(h,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:n+"px",height:c+"px"});const l=B.createElementNS(U,"image");h.appendChild(l);const g=O.isBrowser()?window.SVG:global.SVG;l.setAttributeNS(g.xlink,"href",r),F.setAttrs(l,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:c+"px"}),l.style.opacity=e.opacity,t.dom.elDefs.node.appendChild(h)}getSeriesIndex(e){const t=this.w,s=t.config.chart.type;return(s==="bar"||s==="rangeBar")&&t.config.plotOptions.bar.distributed||s==="heatmap"||s==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.seriesData.series.length,this.seriesIndex}computeColorStops(e,t){const s=this.w;let i=null,a=null;for(const n of e)n>=t.threshold?(i===null||n>i)&&(i=n):(a===null||n<a)&&(a=n);i===null&&(i=t.threshold),a===null&&(a=t.threshold);let o=i-t.threshold+(t.threshold-a);o===0&&(o=1);let r=100-(t.threshold-a)/o*100;return r=Math.max(0,Math.min(r,100)),[{offset:r,color:t.colorAboveThreshold,opacity:s.config.fill.opacity},{offset:0,color:t.colorBelowThreshold,opacity:s.config.fill.opacity}]}fillPath(e){var t,s,i,a;const o=this.w;this.opts=e;const r=this.w.config;let n,c,h;this.seriesIndex=this.getSeriesIndex(e);const l=r.plotOptions.line.colors.colorAboveThreshold&&r.plotOptions.line.colors.colorBelowThreshold;let g=this.getFillColors()[this.seriesIndex];o.seriesData.seriesColors[this.seriesIndex]!==void 0&&(g=o.seriesData.seriesColors[this.seriesIndex]),typeof g=="function"&&(g=g({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:o}));const p=e.fillType?e.fillType:this.getFillType(this.seriesIndex);let u=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;const x=p==="gradient"||l;e.color&&(g=e.color);const b=o.config.series[this.seriesIndex];(s=(t=b?.data)==null?void 0:t[e.dataPointIndex])!=null&&s.fillColor&&(g=(a=(i=b?.data)==null?void 0:i[e.dataPointIndex])==null?void 0:a.fillColor),g||(g="#fff"),e.opacity!==void 0&&e.opacity!==null&&(u=e.opacity);let f=g;M.isCSSVariable(g)?f=M.applyOpacityToColor(g,u):g.indexOf("rgb")===-1?g.indexOf("#")===-1?f=g:g.length<9&&(f=M.hexToRgba(g,u)):g.indexOf("rgba")>-1?u=M.getOpacityFromRGBA(g):f=M.hexToRgba(M.rgb2hex(g),u);const m=M.isCSSVariable(g)?M.getThemeColor(g):g;if(p==="pattern"&&(c=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:c,fillColor:m,defaultColor:f})),x){const w=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[];let y=r.fill.gradient.type;l&&(w[this.seriesIndex]=this.computeColorStops(o.seriesData.series[this.seriesIndex],r.plotOptions.line.colors),y="vertical"),h=this.handleGradientFill({type:y,fillConfig:e.fillConfig,fillColor:m,fillOpacity:u,colorStops:w,i:this.seriesIndex})}if(p==="image"){const w=r.fill.image.src,y=e.patternID?e.patternID:"",v=`pattern${o.globals.cuid}${e.seriesNumber+1}${y}`;this.patternIDs.indexOf(v)===-1&&(this.clippedImgArea({opacity:u,image:Array.isArray(w)?e.seriesNumber<w.length?w[e.seriesNumber]:w[0]:w,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:v}),this.patternIDs.push(v)),n=`url(#${v})`}else n=x?h:p==="pattern"?c:f;return e.solid&&(n=f),n}getFillType(e){const t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}getFillColors(){const e=this.w,t=e.config,s=this.opts;let i=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?i=e.globals.stroke.colors:i.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?i=e.globals.fill.colors:i.push(e.globals.fill.colors):t.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?i=e.globals.stroke.colors:i.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?i=e.globals.fill.colors:i.push(e.globals.fill.colors),s.fillColors!==void 0&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}handlePatternFill({fillConfig:e,patternFill:t,fillColor:s,defaultColor:i}){let a=this.w.config.fill;e&&(a=e);const o=this.opts,r=new F(this.w),n=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,c=s;return Array.isArray(a.pattern.style)?a.pattern.style[o.seriesNumber]!==void 0?t=r.drawPattern(a.pattern.style[o.seriesNumber],a.pattern.width,a.pattern.height,c,n):t=i:t=r.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,c,n),t}handleGradientFill({type:e,fillColor:t,fillOpacity:s,fillConfig:i,colorStops:a,i:o}){let r=this.w.config.fill;i&&(r=$($({},r),i));const n=this.opts,c=new F(this.w),h=new M;e=e||r.gradient.type;let l,g=t,p=r.gradient.opacityFrom===void 0?s:Array.isArray(r.gradient.opacityFrom)?r.gradient.opacityFrom[o]:r.gradient.opacityFrom;g.indexOf("rgba")>-1&&(p=M.getOpacityFromRGBA(g));let u=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)l=r.gradient.shade==="dark"?h.shadeColor(-1*parseFloat(r.gradient.shadeIntensity),t.indexOf("rgb")>-1?M.rgb2hex(t):t):h.shadeColor(parseFloat(r.gradient.shadeIntensity),t.indexOf("rgb")>-1?M.rgb2hex(t):t);else if(r.gradient.gradientToColors[n.seriesNumber]){const x=r.gradient.gradientToColors[n.seriesNumber];l=x,x.indexOf("rgba")>-1&&(u=M.getOpacityFromRGBA(x))}else l=t;if(r.gradient.gradientFrom&&(g=r.gradient.gradientFrom),r.gradient.gradientTo&&(l=r.gradient.gradientTo),r.gradient.inverseColors){const x=g;g=l,l=x}return g.indexOf("rgb")>-1&&(g=M.rgb2hex(g)),l.indexOf("rgb")>-1&&(l=M.rgb2hex(l)),c.drawGradient(e,g,l,p,u,n.size,r.gradient.stops,a,o)}}class ke{constructor(e,t){this.w=e,this.ctx=t,this._filters=new te(this.w),this._graphics=new F(this.w,this.ctx)}setGlobalMarkerSize(){const e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.seriesData.series.length+1)for(let t=0;t<=e.seriesData.series.length;t++)e.globals.markers.size[t]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(()=>e.config.markers.size)}plotChartMarkers({pointsPos:e,seriesIndex:t,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:o=!1}){const r=this.w,n=t,c=e;let h=null;const l=new F(this.w),g=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(c.x))for(let p=0;p<c.x.length;p++){let u,x=s,b=!M.isNumber(c.y[p]);r.globals.markers.largestSize===0&&r.globals.hasNullValues&&r.seriesData.series[n][s+1]!==null&&!o&&(b=!0),s===1&&p===0&&(x=0),s===1&&p===1&&(x=1);let f="apexcharts-marker";if(r.config.chart.type!=="line"&&r.config.chart.type!=="area"||r.globals.comboCharts||r.config.tooltip.intersect||(f+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[t]>0:r.config.markers.size>0)||a||g){b||(f+=` w${M.randomId()}`);const m=this.getMarkerConfig({cssClass:f,seriesIndex:t,dataPointIndex:x}),w=r.config.series[n];w.data[x]&&(w.data[x].fillColor&&(m.pointFillColor=w.data[x].fillColor),w.data[x].strokeColor&&(m.pointStrokeColor=w.data[x].strokeColor)),i!==void 0&&(m.pSize=i),(c.x[p]<-r.globals.markers.largestSize||c.x[p]>r.layout.gridWidth+r.globals.markers.largestSize||c.y[p]<-r.globals.markers.largestSize||c.y[p]>r.layout.gridHeight+r.globals.markers.largestSize)&&(m.pSize=0),!b&&((r.globals.markers.size[t]>0||a||g)&&!h&&(h=l.group({class:a||g?"":"apexcharts-series-markers"}),h.attr("clip-path",`url(#gridRectMarkerMask${r.globals.cuid})`),this.setupMarkerDelegation(h)),u=l.drawMarker(c.x[p],c.y[p],m),u.attr("rel",x),u.attr("j",x),u.attr("index",t),u.node.setAttribute("default-marker-size",m.pSize),ue(u,c.x[p],r),this._filters.setSelectionFilter(u,t,x),h&&h.add(u))}else r.globals.pointsArray[t]===void 0&&(r.globals.pointsArray[t]=[]),r.globals.pointsArray[t].push([c.x[p],c.y[p]])}return h}getMarkerConfig({cssClass:e,seriesIndex:t,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth:o=null}){const r=this.w,n=this.getMarkerStyle(t);let c=a===null?r.globals.markers.size[t]:a;const h=r.config.markers;return s!==null&&h.discrete.length&&h.discrete.map(l=>{l.seriesIndex===t&&l.dataPointIndex===s&&(n.pointStrokeColor=l.strokeColor,n.pointFillColor=l.fillColor,c=l.size,n.pointShape=l.shape)}),{pSize:i===null?c:i,pRadius:i!==null?i:h.radius,pointStrokeWidth:o!==null?o:Array.isArray(h.strokeWidth)?h.strokeWidth[t]:h.strokeWidth,pointStrokeColor:n.pointStrokeColor,pointFillColor:n.pointFillColor,shape:n.pointShape||(Array.isArray(h.shape)?h.shape[t]:h.shape),class:e,pointStrokeOpacity:Array.isArray(h.strokeOpacity)?h.strokeOpacity[t]:h.strokeOpacity,pointStrokeDashArray:Array.isArray(h.strokeDashArray)?h.strokeDashArray[t]:h.strokeDashArray,pointFillOpacity:Array.isArray(h.fillOpacity)?h.fillOpacity[t]:h.fillOpacity,seriesIndex:t}}setupMarkerDelegation(e){const t=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(e,s),e.node.addEventListener("click",i=>{t.config.markers.onClick&&F._findDelegateTarget(i.target,e.node,s)&&t.config.markers.onClick(i)}),e.node.addEventListener("dblclick",i=>{t.config.markers.onDblClick&&F._findDelegateTarget(i.target,e.node,s)&&t.config.markers.onDblClick(i)}),e.node.addEventListener("touchstart",i=>{const a=F._findDelegateTarget(i.target,e.node,s);a&&a.instance&&this._graphics.pathMouseDown(a.instance,i)},{passive:!0})}addEvents(e){const t=this.w;e.node.addEventListener("mouseenter",this._graphics.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",this._graphics.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",this._graphics.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",this._graphics.pathMouseDown.bind(this.ctx,e),{passive:!0})}getMarkerStyle(e){const t=this.w,s=t.globals.markers.colors,i=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[e]:i,pointFillColor:Array.isArray(s)?s[e]:s}}}class vt{constructor(e,t){this.ctx=t,this.w=e,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new Se(this.w),this.filters=new te(this.w),this.fill=new le(this.w),this.markers=new ke(this.w,this.ctx),this.graphics=new F(this.w)}draw(e,t,s){const i=this.w,a=this.graphics,o=s.realIndex,r=s.pointsPos,n=s.zRatio,c=s.elParent,h=a.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`});if(h.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(h),Array.isArray(r.x))for(let l=0;l<r.x.length;l++){let g=t+1,p=!0;t===0&&l===0&&(g=0),t===0&&l===1&&(g=1);let u=i.globals.markers.size[o];if(n!==1/0){const f=i.config.plotOptions.bubble;u=i.seriesData.seriesZ[o][g],f.zScaling&&(u/=n),f.minBubbleRadius&&u<f.minBubbleRadius&&(u=f.minBubbleRadius),f.max
30BubbleRadius&&u>f.maxBubbleRadius&&(u=f.maxBubbleRadius)}const x=r.x[l],b=r.y[l];if(u=u||0,b!==null&&i.seriesData.series[o][g]!==void 0||(p=!1),p){const f=this.drawPoint(x,b,u,o,g,t);h.add(f)}c.add(h)}}drawPoint(e,t,s,i,a,o){var r,n;const c=this.w,h=i,l=this.anim,g=this.filters,p=this.fill,u=this.markers,x=this.graphics,b=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:h,dataPointIndex:a,radius:c.config.chart.type==="bubble"||c.globals.comboCharts&&c.config.series[i]&&c.config.series[i].type==="bubble"?s:null});let f=p.fillPath({seriesNumber:i,dataPointIndex:a,color:b.pointFillColor,patternUnits:"objectBoundingBox",value:c.seriesData.series[i][o]});const m=x.drawMarker(e,t,b),w=c.config.series[h];w.data[a]&&w.data[a].fillColor&&(f=w.data[a].fillColor);const y=(r=c.config.plotOptions.scatter)==null?void 0:r.jitter;if(y?.enabled&&y.distributed&&c.globals.colors.length){const v=Math.round((n=c.seriesData.seriesX[i])==null?void 0:n[a]);isNaN(v)||(f=c.globals.colors[v%c.globals.colors.length])}if(m.attr({fill:f}),c.config.chart.dropShadow.enabled){const v=c.config.chart.dropShadow;g.dropShadow(m,v,i)}if(!this.initialAnim||c.globals.dataChanged||c.globals.resized)c.globals.animationEnded=!0;else{const v=c.config.chart.animations,C=v.speed,S=c.globals.dataPoints||1,L=v.animateGradually,A=L&&L.enabled!==!1?Math.min(20,.5*C/Math.max(1,S)):0,D=et({style:A>0?"sequential":"none",index:a,baseDelay:A});l.animatePop(m,{speed:C,delay:D,onComplete:()=>l.animationCompleted(m)})}return m.attr({rel:a,j:a,index:i,"default-marker-size":b.pSize}),g.setSelectionFilter(m,i,a),m.node.classList.add("apexcharts-marker"),m}centerTextInBubble(e){const t=this.w;return{y:e+=parseInt(t.config.dataLabels.style.fontSize,10)/4}}}class Ae{constructor(e,t=null){this.w=e,this.ctx=t}dataLabelsCorrection(e,t,s,i,a,o,r){const n=this.w;let c=!1;const h=new F(this.w).getTextRects(s,r),l=h.width,g=h.height;t<0&&(t=0),t>n.layout.gridHeight+g&&(t=n.layout.gridHeight+g/2),n.globals.dataLabelsRects[i]===void 0&&(n.globals.dataLabelsRects[i]=[]),n.globals.dataLabelsRects[i].push({x:e,y:t,width:l,height:g});const p=n.globals.dataLabelsRects[i].length-2,u=n.globals.lastDrawnDataLabelsIndexes[i]!==void 0?n.globals.lastDrawnDataLabelsIndexes[i][n.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(n.globals.dataLabelsRects[i][p]!==void 0){const x=n.globals.dataLabelsRects[i][u];(e>x.x+x.width||t>x.y+x.height||t+g<x.y||e+l<x.x)&&(c=!0)}return(a===0||o)&&(c=!0),{x:e,y:t,textRects:h,drawnextLabel:c}}drawDataLabel({type:e,pos:t,i:s,j:i,isRangeStart:a,strokeWidth:o=2}){const r=this.w,n=new F(this.w),c=r.config.dataLabels;let h=0,l=0,g=i,p=null;if(r.globals.collapsedSeriesIndices.indexOf(s)!==-1||!c.enabled||!Array.isArray(t.x))return p;p=n.group({class:"apexcharts-data-labels"});for(let u=0;u<t.x.length;u++)if(h=t.x[u]+c.offsetX,l=t.y[u]+c.offsetY+o,!isNaN(h)){i===1&&u===0&&(g=0),i===1&&u===1&&(g=1);let x=r.seriesData.series[s][g];e==="rangeArea"&&(x=a?r.rangeData.seriesRangeStart[s][g]:r.rangeData.seriesRangeEnd[s][g]);let b="";const f=w=>r.config.dataLabels.formatter(w,{seriesIndex:s,dataPointIndex:g,w:r});r.config.chart.type==="bubble"?(x=r.seriesData.seriesZ[s][g],b=f(x),l=t.y[u],l=new vt(this.w,this.ctx).centerTextInBubble(l).y):x!==void 0&&(b=f(x));let m=r.config.dataLabels.textAnchor;r.globals.isSlopeChart&&(m=g===0?"end":g===r.config.series[s].data.length-1?"start":"middle"),this.plotDataLabelsText({x:h,y:l,text:b,i:s,j:g,parent:p,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:m})}return p}plotDataLabelsText(e){const t=this.w,s=new F(this.w);let{x:i,y:a,i:o,j:r,text:n,textAnchor:c,fontSize:h,parent:l,dataLabelsConfig:g,color:p,alwaysDrawDataLabel:u,offsetCorrection:x,className:b}=e,f=null;if(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(o)<0)return f;let m={x:i,y:a,drawnextLabel:!0,textRects:null};if(x&&(m=this.dataLabelsCorrection(i,a,n,o,r,u,parseInt(g.style.fontSize,10).toString())),t.interact.zoomed||(i=m.x,a=m.y),m.textRects){const C=t.globals.barPadForNumericAxis||0;(i<-(C+20)-m.textRects.width||i>t.layout.gridWidth+m.textRects.width+C+30)&&(n="")}let w=t.globals.dataLabels.style.colors[o];((t.config.chart.type==="bar"||t.config.chart.type==="rangeBar")&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(w=t.globals.dataLabels.style.colors[r]),typeof w=="function"&&(w=w({series:t.seriesData.series,seriesIndex:o,dataPointIndex:r,w:t})),p&&(w=p);let y=g.offsetX,v=g.offsetY;if(t.config.chart.type!=="bar"&&t.config.chart.type!=="rangeBar"||(y=0,v=0),t.globals.isSlopeChart&&(r!==0&&(y=-2*g.offsetX+5),r!==0&&r!==t.config.series[o].data.length-1&&(y=0)),m.drawnextLabel){if(c==="middle"&&i===t.layout.gridWidth&&(c="end"),f=s.drawText({x:i+y,y:a+v,foreColor:w,textAnchor:c||g.textAnchor,text:n,fontSize:h||g.style.fontSize,fontFamily:g.style.fontFamily,fontWeight:g.style.fontWeight||"normal"}),f.attr({class:b||"apexcharts-datalabel",cx:i,cy:a}),g.dropShadow.enabled){const C=g.dropShadow;new te(this.w).dropShadow(f,C)}l.add(f),ue(f,i,t),t.globals.lastDrawnDataLabelsIndexes[o]===void 0&&(t.globals.lastDrawnDataLabelsIndexes[o]=[]),t.globals.lastDrawnDataLabelsIndexes[o].push(r)}return f}
30addBackgroundToDataLabel(e,t){const s=this.w,i=s.config.dataLabels.background,a=i.padding,o=i.padding/2,r=t.width,n=t.height,c=new F(this.w).drawRect(t.x-a,t.y-o/2,r+2*a,n+o,i.borderRadius,s.config.chart.background!=="transparent"&&s.config.chart.background?s.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new te(this.w).dropShadow(c,i.dropShadow),c}dataLabelsBackground(){var e;const t=this.w;if(t.config.chart.type==="bubble")return;const s=t.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){(e=a.parentNode)==null||e.insertBefore(r.node,a);const n=t.config.dataLabels.background.backgroundColor||a.getAttribute("fill");t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged?r.animate().attr({fill:n}):r.attr({fill:n}),a.setAttribute("fill",t.config.dataLabels.background.foreColor);const c=a.getAttribute("cx");c!==null&&ue(r,parseFloat(c),t)}}}bringForward(){const e=this.w,t=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=e.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let i=0;i<t.length;i++)s&&s.insertBefore(t[i],s.nextSibling)}}class tt{static invalidateAll(e){e&&e.globals&&(e.globals.cachedSelectors&&(e.globals.cachedSelectors={}),e.globals.domCache&&e.globals.domCache.clear(),e.globals.dimensionCache={})}static invalidateDimensions(e){e&&e.globals&&(e.globals.dimensionCache={})}static invalidateSelectors(e){e&&e.globals&&e.globals.cachedSelectors&&(e.globals.cachedSelectors={})}static getCachedSelector(e,t,s){return e&&e.globals?(e.globals.cachedSelectors||(e.globals.cachedSelectors={}),e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=s()),e.globals.cachedSelectors[t]):s()}static getCachedDimension(e,t,s,i=1e3){if(!e||!e.globals)return s();e.globals.dimensionCache||(e.globals.dimensionCache={});const a=e.globals.dimensionCache[t],o=Date.now();if(a&&a.lastUpdate&&o-a.lastUpdate<i)return a.value;const r=s();return e.globals.dimensionCache[t]={value:r,lastUpdate:o},r}static cacheDOMElement(e,t,s){e&&e.globals&&(e.globals.domCache||(e.globals.domCache=new Map),e.globals.domCache.set(t,s))}static getCachedDOMElement(e,t){return e&&e.globals&&e.globals.domCache&&e.globals.domCache.get(t)||null}}class xe{constructor(e,{theme:t=null,timeScale:s=null}={}){this.w=e,this.theme=t,this.timeScale=s}getLabel(e,t,s,i,a=[],o="12px",r=!0){const n=this.w,c=e[i]===void 0?"":e[i];let h=c;const l=n.formatters.xLabelFormatter,g=n.config.xaxis.labels.formatter,p=new Te(this.w),u=c;r&&(h=p.xLabelFormat(l,c,u,{i,dateFormatter:new ne(this.w).formatDate,w:n}),g!==void 0&&(h=g(c,e[i],{i,dateFormatter:new ne(this.w).formatDate,w:n}))),t.length>0?(s=t[i].position,h=t[i].value):n.config.xaxis.type==="datetime"&&g===void 0&&(h=""),h===void 0&&(h=""),h=Array.isArray(h)?h:h.toString();const x=new F(this.w);let b={};b=n.layout.rotateXLabels&&r?x.getTextRects(h,parseInt(o,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):x.getTextRects(h,parseInt(o,10).toString());const f=!n.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(h)&&(String(h)==="NaN"||a.indexOf(h)>=0&&f)&&(h=""),{x:s,text:h,textRect:b}}checkLabelBasedOnTickamount(e,t,s){const i=this.w;let a=i.config.xaxis.tickAmount;return a==="dataPoints"&&(a=Math.round(i.layout.gridWidth/120)),a>s||e%Math.round(s/(a+1))===0||(t.text=""),t}checkForOverflowingLabels(e,t,s,i,a){const o=this.w;if(e===0&&o.globals.skipFirstTimelinelabel&&(t.text=""),e===s-1&&o.globals.skipLastTimelinelabel&&(t.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 t;t.x<r.textRect.width/(o.layout.rotateXLabels?Math.abs(o.config.xaxis.labels.rotate)/12:1.01)+r.x&&(t.text="")}return t}checkForReversedLabels(e,t){const s=this.w;return s.config.yaxis[e]&&s.config.yaxis[e].reversed&&t.reverse(),t}yAxisAllSeriesCollapsed(e){const t=this.w.globals;return!t.seriesYAxisMap[e].some(s=>t.collapsedSeriesIndices.indexOf(s)===-1)}translateYAxisIndex(e){const t=this.w,s=t.globals,i=t.config.yaxis;return t.seriesData.series.length>i.length||i.some(a=>Array.isArray(a.seriesName))?e:s.seriesYAxisReverseMap[e]}isYAxisHidden(e){const t=this.w,s=t.config.yaxis[e];if(!s.show||this.yAxisAllSeriesCollapsed(e))return!0;
30if(!s.showForNullSeries){const i=t.globals.seriesYAxisMap[e],a=new J(this.w);return i.every(o=>a.isSeriesNull(o))}return!1}getYAxisForeColor(e,t){var s;const i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[t]&&((s=this.theme)==null||s.pushExtraColors(e,i.globals.yAxisScale[t].result.length,!1)),e}drawYAxisTicks(e,t,s,i,a,o,r){const n=this.w,c=new F(this.w);let h=n.layout.translateY+n.config.yaxis[a].labels.offsetY;if(n.globals.isBarHorizontal?h=0:n.config.chart.type==="heatmap"&&(h+=o/2),i.show&&t>0){n.config.yaxis[a].opposite===!0&&(e+=i.width);for(let l=t;l>=0;l--){const g=c.drawLine(e+s.offsetX-i.width+i.offsetX,h+i.offsetY,e+s.offsetX+i.offsetX,h+i.offsetY,i.color);r.add(g),h+=o}}}}class Ie{constructor(e,t,s){this.w=e,this.ctx=t,this.elgrid=s,this.axesUtils=new xe(e,{theme:t.theme,timeScale:t.timeScale}),this.xaxisLabels=e.labelData.labels.slice(),e.labelData.timescaleLabels.length>0&&!e.globals.isBarHorizontal&&(this.xaxisLabels=e.labelData.timescaleLabels.slice()),e.config.xaxis.overwriteCategories&&(this.xaxisLabels=e.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],e.config.xaxis.position==="top"?this.offY=0:this.offY=e.layout.gridHeight,this.offY=this.offY+e.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=e.config.chart.type==="bar"&&e.config.plotOptions.bar.horizontal,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.xaxisBorderWidth=e.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=e.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=e.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=e.config.xaxis.axisBorder.height,this.yaxis=e.config.yaxis[0]}drawXaxis(){const e=this.w,t=new F(this.w),s=t.group({class:"apexcharts-xaxis",transform:`translate(${e.config.xaxis.offsetX}, ${e.config.xaxis.offsetY})`}),i=t.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.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,t,i,a,e.axisFlags.isXNumeric,(o,r)=>r),e.labelData.hasXaxisGroups){const o=e.labelData.groups;a=[];for(let n=0;n<o.length;n++)a.push(o[n].title);const r={};e.config.xaxis.group.style&&(r.xaxisFontSize=e.config.xaxis.group.style.fontSize,r.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,r.xaxisForeColors=e.config.xaxis.group.style.colors,r.fontWeight=e.config.xaxis.group.style.fontWeight,r.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,t,i,a,!1,(n,c)=>o[n].cols*c,r)}if(e.config.xaxis.title.text!==void 0){const o=t.group({class:"apexcharts-xaxis-title"}),r=t.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.layout.xAxisLabelsHeight:-e.layout.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,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});o.add(r),s.add(o)}if(e.config.xaxis.axisBorder.show){const o=e.globals.barPadForNumericAxis,r=t.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-o,this.offY,this.xaxisBorderWidth+o,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):s.add(r)}return s}drawXAxisLabelAndGroup(e,t,s,i,a,o,r={}){var n,c;const h=[],l=[],g=this.w,p=r.xaxisFontSize||this.xaxisFontSize,u=r.xaxisFontFamily||this.xaxisFontFamily,x=r.xaxisForeColors||this.xaxisForeColors,b=r.fontWeight||g.config.xaxis.labels.style.fontWeight,f=r.cssClass||g.config.xaxis.labels.style.cssClass;let m,w=g.globals.padHorizontal;const y=i.length;let v=g.config.xaxis.type==="category"?g.globals.dataPoints:y;if(v===0&&y>v&&(v=y),a){const C=Math.max(Number(g.config.xaxis.tickAmount)||1,v>1?v-1:v);m=g.layout.gridWidth/Math.min(C,y-1),w=w+o(0,m)/2+g.config.xaxis.labels.offsetX}else m=g.layout.gridWidth/v,w=w+o(0,m)+g.config.xaxis.labels.offsetX;for(let C=0;C<=y-1;C++){let S=w-o(C,m)/2+g.config.xaxis.labels.offsetX;C===0&&y===1&&m/2===w&&v===1&&(S=g.layout.gridWidth/2);let L=this.axesUtils.getLabel(i,g.labelData.timescaleLabels,S,C,h,p,e),A=28;g.layout.rotateXLabels&&e&&(A=22),g.config.xaxis.title.text&&g.config.xaxis.position==="top"&&(A+=parseFloat(g.config.xaxis.title.style.fontSize)+2),e||(A=A+parseFloat(p)+(g.layout.xAxisLabelsHeight-g.layout.xAxisGroupLabelsHeight)+(g.layout.rotateXLabels?10:0)),L=g.config.xaxis.tickAmount!==void 0&&g.config.xaxis.tickAmount!=="dataPoints"&&g.config.xaxis.type!=="datetime"?this.axesUtils.checkLabelBasedOnTickamount(C,L,y):this.axesUtils.checkForOverflowingLabels(C,L,y,h,l);const D=()=>e&&g.config.xaxis.convertedCatToNumeric?x[g.globals.minX+C-1]:x[C],k=((c=(n=L.textRect)==null?void 0:n.width)!=null?c:0)/2,P=L.x+k<0;if(g.config.xaxis.labels.show&&!P){const T=t.drawText({x:L.x,y:this.offY+g.config.xaxis.labels.offsetY+A-(g.config.xaxis.position==="top"?g.layout.xAxisHeight+g.config.xaxis.axisTicks.height-2:0),text:L.text,textAnchor:"middle",fontWeight:b,fontSize:p,fontFamily:u,foreColor:Array.isArray(x)?D():x,isPlainText:!1,
vendor: 4,658 bytes, line 30
30cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+f});if(s.add(T),T.on("click",I=>{if(typeof g.config.chart.events.xAxisLabelClick=="function"){const E=Object.assign({},g,{labelIndex:C});g.config.chart.events.xAxisLabelClick(I,this.ctx,E)}}),e){const I=B.createElementNS(U,"title");I.textContent=Array.isArray(L.text)?L.text.join(" "):L.text,T.node.appendChild(I),L.text!==""&&(h.push(L.text),l.push(L))}}C<y-1&&(w+=o(C+1,m))}}drawXaxisInversed(e){const t=this.w,s=new F(this.w),i=t.config.yaxis[0].opposite?t.globals.translateYAxisX[e]:0,a=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),o=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+i+", 0)"});a.add(o);const r=[];if(t.config.yaxis[e].show)for(let u=0;u<this.xaxisLabels.length;u++)r.push(this.xaxisLabels[u]);const n=t.layout.gridHeight/r.length;let c=-n/2.2;const h=t.formatters.yLabelFormatters[0],l=t.config.yaxis[0].labels;if(l.show)for(let u=0;u<=r.length-1;u++){let x=r[u]===void 0?"":r[u];x=h(x,{seriesIndex:e,dataPointIndex:u,w:t});const b=this.axesUtils.getYAxisForeColor(l.style.colors,e),f=()=>Array.isArray(b)?b[u]:b;let m=0;Array.isArray(x)&&(m=x.length/2*parseInt(l.style.fontSize,10));let w=l.offsetX-15,y="end";this.yaxis.opposite&&(y="start"),t.config.yaxis[0].labels.align==="left"?(w=l.offsetX,y="start"):t.config.yaxis[0].labels.align==="center"?(w=l.offsetX,y="middle"):t.config.yaxis[0].labels.align==="right"&&(y="end");const v=s.drawText({x:w,y:c+n+l.offsetY-m,text:x,textAnchor:y,foreColor:f(),fontSize:l.style.fontSize,fontFamily:l.style.fontFamily,fontWeight:l.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+l.style.cssClass,maxWidth:l.maxWidth});o.add(v),v.on("click",S=>{if(typeof t.config.chart.events.xAxisLabelClick=="function"){const L=Object.assign({},t,{labelIndex:u});t.config.chart.events.xAxisLabelClick(S,this.ctx,L)}});const C=B.createElementNS(U,"title");if(C.textContent=Array.isArray(x)?x.join(" "):x,v.node.appendChild(C),t.config.yaxis[e].labels.rotate!==0){const S=s.rotateAroundCenter(v.node);v.node.setAttribute("transform",`rotate(${t.config.yaxis[e].labels.rotate} 0 ${S.y})`)}c+=n}if(t.config.yaxis[0].title.text!==void 0){const u=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),x=s.drawText({x:t.config.yaxis[0].title.offsetX,y:t.layout.gridHeight/2+t.config.yaxis[0].title.offsetY,text:t.config.yaxis[0].title.text,textAnchor:"middle",foreColor:t.config.yaxis[0].title.style.color,fontSize:t.config.yaxis[0].title.style.fontSize,fontWeight:t.config.yaxis[0].title.style.fontWeight,fontFamily:t.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+t.config.yaxis[0].title.style.cssClass});u.add(x),a.add(u)}let g=0;this.isCategoryBarHorizontal&&t.config.yaxis[0].opposite&&(g=t.layout.gridWidth);const p=t.config.xaxis.axisBorder;if(p.show){const u=s.drawLine(t.globals.padHorizontal+p.offsetX+g,1+p.offsetY,t.globals.padHorizontal+p.offsetX+g,t.layout.gridHeight+p.offsetY,p.color,0);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(u):a.add(u)}return t.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(g,r.length,t.config.yaxis[0].axisBorder,t.config.yaxis[0].axisTicks,0,n,a),a}drawXaxisTicks(e,t,s){const i=this.w,a=e;if(e<0||e-2>i.layout.gridWidth)return;const o=this.offY+i.config.xaxis.axisTicks.offsetY;if(t=t+o+i.config.xaxis.axisTicks.height,i.config.xaxis.position==="top"&&(t=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){const r=new F(this.w).drawLine(e+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,t+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(r),r.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const e=this.w,t=[],s=this.xaxisLabels.length;let i=e.globals.padHorizontal;if(e.labelData.timescaleLabels.length>0)for(let a=0;a<s;a++)i=this.xaxisLabels[a].position,t.push(i);else{const a=s;for(let o=0;o<a;o++){let r=a;e.axisFlags.isXNumeric&&e.config.chart.type!=="bar"&&(r-=1),i+=e.layout.gridWidth/r,t.push(i)}}return t}xAxisLabelCorrections(){var e,t,s;const i=this.w,a=new F(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"),c=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.config.xaxis.labels.rotateAlways)for(let h=0;h<r.length;
30h++){const l=a.rotateAroundCenter(r[h]);l.y=l.y-1,l.x=l.x+1,r[h].setAttribute("transform",`rotate(${i.config.xaxis.labels.rotate} ${l.x} ${l.y})`),r[h].setAttribute("text-anchor","end"),o?.setAttribute("transform","translate(0, -10)");const g=r[h].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(g,p=>{a.placeTextWithEllipsis(p,p.textContent,i.layout.xAxisLabelsHeight-(i.config.legend.position==="bottom"?20:10))})}else{const h=i.layout.gridWidth/(i.labelData.labels.length+1);for(let l=0;l<r.length;l++){const g=r[l].childNodes;i.config.xaxis.labels.trim&&i.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(g,p=>{a.placeTextWithEllipsis(p,p.textContent,h)})}}if(n.length>0){const h=n[n.length-1].getBBox(),l=n[0].getBBox();h.x<-20&&((e=n[n.length-1].parentNode)==null||e.removeChild(n[n.length-1])),l.x+l.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&((t=n[0].parentNode)==null||t.removeChild(n[0]));for(let g=0;g<c.length;g++)a.placeTextWithEllipsis(c[g],(s=c[g].textContent)!=null?s:"",i.config.yaxis[0].labels.maxWidth-(i.config.yaxis[0].title.text?2*parseFloat(i.config.yaxis[0].title.style.fontSize):0)-15)}}}class At{constructor(e,t){this.w=e,this.ctx=t,this.xaxisLabels=e.labelData.labels.slice(),this.axesUtils=new xe(t.w,{theme:t.theme,timeScale:t.timeScale}),this.isRangeBar=e.rangeData.seriesRange.length&&e.globals.isBarHorizontal,e.labelData.timescaleLabels.length>0&&(this.xaxisLabels=e.labelData.timescaleLabels.slice())}drawGridArea(e=null){const t=this.w,s=new F(this.w);e||(e=s.group({class:"apexcharts-grid"}));const i=s.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.layout.gridHeight,"transparent"),a=s.drawLine(t.globals.padHorizontal,t.layout.gridHeight,t.layout.gridWidth,t.layout.gridHeight,"transparent");return e.add(a),e.add(i),e}drawGrid(){if(this.w.globals.axisCharts){const e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){const e=this.w,t=e.globals,s=new F(this.w),i=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,a=h=>{const l=B.createElementNS(U,"clipPath");return l.setAttribute("id",h),l};e.dom.elGridRectMask=a(`gridRectMask${t.cuid}`),e.dom.elGridRectBarMask=a(`gridRectBarMask${t.cuid}`),e.dom.elGridRectMarkerMask=a(`gridRectMarkerMask${t.cuid}`),e.dom.elForecastMask=a(`forecastMask${t.cuid}`),e.dom.elNonForecastMask=a(`nonForecastMask${t.cuid}`);let o=0,r=0;(["bar","rangeBar","candlestick","boxPlot","violin"].includes(e.config.chart.type)||e.globals.comboBarCount>
300)&&e.axisFlags.isXNumeric&&!e.globals.isBarHorizontal&&(o=Math.max(e.config.grid.padding.left,t.barPadForNumericAxis),r=Math.max(e.config.grid.padding.right,t.barPadForNumericAxis)),e.dom.elGridRect=s.drawRect(-i/2-2,-i/2-2,e.layout.gridWidth+i+4,e.layout.gridHeight+i+4,0,"#fff"),e.dom.elGridRectBar=s.drawRect(-i/2-o-2,-i/2-2,e.layout.gridWidth+i+r+o+4,e.layout.gridHeight+i+4,0,"#fff");const n=e.globals.markers.largestSize;e.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-o-2,-n),-n,e.layout.gridWidth+Math.max(i+r+o+4,2*n),e.layout.gridHeight+2*n,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);const c=e.dom.elDefs.node;c.appendChild(e.dom.elGridRectMask),c.appendChild(e.dom.elGridRectBarMask),c.appendChild(e.dom.elGridRectMarkerMask),c.appendChild(e.dom.elForecastMask),c.appendChild(e.dom.elNonForecastMask)}_drawGridLines({i:e,x1:t,y1:s,x2:i,y2:a,xCount:o,parent:r}){const n=this.w;if(!(e===0&&n.globals.skipFirstTimelinelabel||e===o-1&&n.globals.skipLastTimelinelabel&&!n.config.xaxis.labels.formatter||n.config.chart.type==="radar")){n.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:t,y1:s,x2:i,y2:a,xCount:o,parent:r});let c=0;if(n.labelData.hasXaxisGroups&&n.config.xaxis.tickPlacement==="between"){const h=n.labelData.groups;if(h){let l=0;for(let g=0;l<e&&g<h.length;g++)l+=h[g].cols;l===e&&(c=.6*n.layout.xAxisLabelsHeight)}}new Ie(this.w,this.ctx).drawXaxisTicks(t,c,n.dom.elGraphical)}}_drawGridLine({i:e,x1:t,y1:s,x2:i,y2:a,xCount:o,parent:r}){const n=this.w,c=r.node.classList.contains("apexcharts-gridlines-horizontal"),h=n.globals.barPadForNumericAxis,l=s===0&&a===0||t===0&&i===0||s===n.layout.gridHeight&&a===n.layout.gridHeight||n.globals.isBarHorizontal&&(e===0||e===o-1),g=new F(this.w).drawLine(t-(c?h:0),s,i+(c?h:0),a,n.config.grid.borderColor,n.config.grid.strokeDashArray);g.node.classList.add("apexcharts-gridline"),l&&n.config.grid.show?this.elGridBorders.add(g):r.add(g)}_drawGridBandRect({c:e,x1:t,y1:s,x2:i,y2:a,type:o}){const r=this.w,n=new F(this.w),c=r.globals.barPadForNumericAxis,h=r.config.grid[o].colors[e],l=n.drawRect(t-(o==="row"?c:0),s,i+(o==="row"?2*c:0),a,0,h,r.config.grid[o].opacity);this.elg.add(l),l.attr("clip-path",`url(#gridRectMask${r.globals.cuid})`),l.node.classList.add(`apexcharts-grid-${o}`)}_drawXYLines({xCount:e,tickAmount:t}){var s;const i=this.w,a=({xC:r,x1:n,y1:c,x2:h,y2:l})=>{for(let g=0;g<r;g++)n=this.xaxisLabels[g].position,h=this.xaxisLabels[g].position,this._drawGridLines({i:g,x1:n,y1:c,x2:h,y2:l,xCount:e,parent:this.elgridLinesV})},o=({xC:r,x1:n,y1:c,x2:h,y2:l})=>{for(let g=0;g<r+(i.axisFlags.isXNumeric?0:1);g++)g===0&&r===1&&i.globals.dataPoints===1&&(h=n=i.layout.gridWidth/2),this._drawGridLines({i:g,x1:n,y1:c,x2:h,y2:l,xCount:e,parent:this.elgridLinesV}),h=n+=i.layout.gridWidth/(i.axisFlags.isXNumeric?r-1:r)};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){const r=i.globals.padHorizontal,n=0;let c;const h=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:e,x1:r,y1:n,x2:c,y2:h}):(i.axisFlags.isXNumeric&&(e=(s=i.globals.xAxisScale)==null?void 0:s.result.length),o({xC:e,x1:r,y1:n,x2:c,y2:h}))}if(i.config.grid.yaxis.lines.show){let n=0,c=0;const h=i.layout.gridWidth;let l=t+1;this.isRangeBar&&(l=i.labelData.labels.length);for(let g=0;g<l+(this.isRangeBar?1:0);g++)this._drawGridLine({i:g,xCount:l+(this.isRangeBar?1:0),x1:0,y1:n,x2:h,y2:c,parent:this.elgridLinesH}),n+=i.layout.gridHeight/(this.isRangeBar?l:t),c=n}}_drawInvertedXYLines({xCount:e}){const t=this.w;if(t.config.grid.xaxis.lines.show||t.config.xaxis.axisTicks.show){let s=t.globals.padHorizontal;const i=0;let a;const o=t.layout.gridHeight;for(let r=0;r<e+1;r++)t.config.grid.xaxis.lines.show&&this._drawGridLine({i:r,xCount:e+1,x1:s,y1:i,x2:a,y2:o,parent:this.elgridLinesV}),new Ie(this.w,this.ctx).drawXaxisTicks(s,0,t.dom.elGraphical),s+=t.layout.gridWidth/e,a=s}if(t.config.grid.yaxis.lines.show){let i=0,a=0;const o=t.layout.gridWidth;for(let r=0;r<t.globals.dataPoints+1;
30r++)this._drawGridLine({i:r,xCount:t.globals.dataPoints+1,x1:0,y1:i,x2:o,y2:a,parent:this.elgridLinesH}),i+=t.layout.gridHeight/t.globals.dataPoints,a=i}}renderGrid(){var e,t,s;const i=this.w,a=i.globals,o=new F(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,c=a.yAxisScale[r].result.length-1;return!a.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(c=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(n=i.config.xaxis.tickAmount),((s=(t=(e=a.yAxisScale)==null?void 0:e[r])==null?void 0:t.result)==null?void 0:s.length)>0&&i.config.xaxis.type!=="datetime"&&(n=a.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:n,tickAmount:c})):(n=c,c=a.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:c})),this.drawGridBands(n,c),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/n}}drawGridBands(e,t){var s,i,a,o,r;const n=this.w,c=(h,l,g,p,u,x)=>{for(let b=0,f=0;b<l;b++,f++)f>=n.config.grid[h].colors.length&&(f=0),this._drawGridBandRect({c:f,x1:g,y1:p,x2:u,y2:x,type:h}),p+=n.layout.gridHeight/t};if(((s=n.config.grid.row.colors)==null?void 0:s.length)>0&&c("row",t,0,0,n.layout.gridWidth,n.layout.gridHeight/t),((i=n.config.grid.column.colors)==null?void 0:i.length)>0){let h=n.globals.isBarHorizontal||n.config.xaxis.tickPlacement!=="on"||n.config.xaxis.type!=="category"&&!n.config.xaxis.convertedCatToNumeric?e:e-1;n.axisFlags.isXNumeric&&(h=((o=(a=n.globals.xAxisScale)==null?void 0:a.result.length)!=null?o:1)-1);let l=n.globals.padHorizontal;const g=0;let p=n.globals.padHorizontal+n.layout.gridWidth/h;const u=n.layout.gridHeight;for(let x=0,b=0;x<e;x++,b++)b>=n.config.grid.column.colors.length&&(b=0),n.config.xaxis.type==="datetime"&&(l=this.xaxisLabels[x].position,p=(((r=this.xaxisLabels[x+1])==null?void 0:r.position)||n.layout.gridWidth)-this.xaxisLabels[x].position),this._drawGridBandRect({c:b,x1:l,y1:g,x2:p,y2:u,type:"column"}),l+=n.layout.gridWidth/h}}}class Ct{constructor(e){this.w=e,this.coreUtils=new J(this.w)}niceScale(e,t,s=0){const a=this.w,o=a.globals;let r,n,c,h;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)),M.isNumber(n)||(n=10),c=r.min!==void 0&&r.min!==null,h=r.max!==void 0&&r.min!==null;let l=r.stepSize!==void 0&&r.stepSize!==null,g=r.tickAmount!==void 0&&r.tickAmount!==null,p=g?r.tickAmount:Ke[Math.min(Math.round(n/2),Ke.length-1)];if(o.isMultipleYAxis&&!g&&o.multiAxisTickAmount>0&&(p=o.multiAxisTickAmount,g=!0),p=p==="dataPoints"?o.dataPoints-1:Math.abs(Math.round(p)),(e===Number.MIN_VALUE&&t===0||!M.isNumber(e)&&!M.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=M.isNumber(r.min)?r.min:0,t=M.isNumber(r.max)?r.max:e+p,o.allSeriesCollapsed=!1),e>t){const k=t;t=e,e=k}else e===t&&(e=e===0?0:e-1,t=t===0?2:t+1);const u=[];p<1&&(p=1);let x=p,b=Math.abs(t-e);!c&&e>0&&e/b<.15&&(e=0,c=!0),!h&&t<0&&-t/b<.15&&(t=0,h=!0),b=Math.abs(t-e);let f=b/x,m=f;const w=Math.floor(Math.log10(m)),y=Math.pow(10,w);let v=Math.ceil(m/y);if(v=bt[o.yValueDecimal===0?0:1][v],m=v*y,f=m,o.isBarHorizontal&&r.stepSize&&r.type!=="datetime"?(f=r.stepSize,l=!0):l&&(f=r.stepSize),l&&r.forceNiceScale){const k=Math.floor(Math.log10(f));f*=Math.pow(10,w-k)}if(c&&h){let k=b/x;if(g)if(l)if(M.mod(b,f)!=0){const P=M.getGCD(f,k);f=k/P<10?P:k}else M.mod(f,k)==0?f=k:(k=f,g=!1);else f=k;else if(l)M.mod(b,f)==0?k=f:f=k;else if(M.mod(b,f)==0)k=f;else{x=Math.ceil(b/f),k=b/x;const P=M.getGCD(b,f);b/P<n&&(k=P),f=k}x=Math.round(b/f)}else{if(c||h){if(h)if(g)e=t-f*x;
30else{const k=e;e=f*Math.floor(e/f),Math.abs(t-e)/M.getGCD(b,f)>n&&(e=t-f*p,e+=f*Math.floor((k-e)/f))}else if(c)if(g)t=e+f*x;else{const k=t;t=f*Math.ceil(t/f),Math.abs(t-e)/M.getGCD(b,f)>n&&(t=e+f*p,t+=f*Math.ceil((k-t)/f))}}else if(o.isMultipleYAxis&&g){const k=f*Math.floor(e/f);let P=k+f*x;P<t&&(f*=2),P=t,t=(e=k)+f*x,b=Math.abs(t-e),e>0&&e<Math.abs(P-t)&&(e=0,t=f*x),t<0&&-t<Math.abs(k-e)&&(t=0,e=-f*x)}else e=f*Math.floor(e/f),t=f*Math.ceil(t/f);b=Math.abs(t-e),f=M.getGCD(b,f),x=Math.round(b/f)}if(g||c||h||(x=Math.ceil((b-1e-11)/(f+1e-11)),x>16&&M.getPrimeFactors(x).length<2&&x++),!g&&r.forceNiceScale&&o.yValueDecimal===0&&x>b&&(x=b,f=Math.round(b/x)),x>n&&(!g&&!l||r.forceNiceScale)){const k=M.getPrimeFactors(x),P=k.length-1;let T=x;e:for(var C=0;C<P;C++)for(var S=0;S<=P-C;S++){const I=Math.min(S+C,P);let E=T,X=1;for(var L=S;L<=I;L++)X*=k[L];if(E/=X,E<n){T=E;break e}}f=T===x?b:b/T,x=Math.round(b/f)}o.isMultipleYAxis&&o.multiAxisTickAmount==0&&o.ignoreYAxisIndexes.indexOf(s)<0&&(o.multiAxisTickAmount=x);let A=e-f;const D=f*1e-11;do A+=f,u.push(M.stripNumber(A,7));while(t-A>D);return{result:u,niceMin:u[0],niceMax:u[u.length-1]}}linearScale(e,t,s=10,i=0,a=void 0){const o=Math.abs(t-e);let r=[];if(e===t)return r=[e],{result:r,niceMin:r[0],niceMax:r[r.length-1]};(s=this._adjustTicksForSmallRange(s,i,o))==="dataPoints"&&(s=this.w.globals.dataPoints-1);const n=s;if(a||(a=o/n),a!==0&&isFinite(a)){const l=Math.floor(Math.log10(Math.abs(a))),g=Math.max(2,2-l),p=Math.pow(10,g);a=Math.round((a+Number.EPSILON)*p)/p}let c=s===Number.MAX_VALUE?5:n;s===Number.MAX_VALUE&&(a=1);let h=e;for(;c>=0;)r.push(h),h=M.preciseAddition(h,a),c-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScaleNice(e,t,s){t<=0&&(t=Math.max(e,s)),e<=0&&(e=Math.min(t,s));const i=[],a=Math.ceil(Math.log(t)/Math.log(s)+1);for(let o=Math.floor(Math.log(e)/Math.log(s));o<a;o++)i.push(Math.pow(s,o));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}logarithmicScale(e,t,s){t<=0&&(t=Math.max(e,s)),e<=0&&(e=Math.min(t,s));const i=[],a=Math.log(t)/Math.log(s),o=Math.log(e)/Math.log(s),r=a-o,n=Math.round(r),c=r/n;for(let h=0,l=o;h<n;h++,l+=c)i.push(Math.pow(s,l));return i.push(Math.pow(s,a)),{result:i,niceMin:e,niceMax:t}}_adjustTicksForSmallRange(e,t,s){let i=e;if(t!==void 0&&this.w.config.yaxis[t].labels.formatter&&this.w.config.yaxis[t].tickAmount===void 0){const a=Number(this.w.config.yaxis[t].labels.formatter(1));M.isNumber(a)&&this.w.globals.yValueDecimal===0&&(i=Math.ceil(s))}return i<e?i:e}setYScaleForIndex(e,t,s){const i=this.w.globals,a=this.w.config,o=i.isBarHorizontal?a.xaxis:a.yaxis[e];i.yAxisScale[e]===void 0&&(i.yAxisScale[e]=[]);const r=Math.abs(s-t);o.logarithmic&&r<=5&&(i.invalidLogScale=!0),o.logarithmic&&r>5?(i.allSeriesCollapsed=!1,i.yAxisScale[e]=o.forceNiceScale?this.logarithmicScaleNice(t,s,o.logBase):this.logarithmicScale(t,s,o.logBase)):s!==-Number.MAX_VALUE&&M.isNumber(s)&&t!==Number.MAX_VALUE&&M.isNumber(t)?(i.allSeriesCollapsed=!1,i.yAxisScale[e]=this.niceScale(t,s,e)):i.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}setXScale(e,t){const s=this.w,i=s.globals;if(t!==-Number.MAX_VALUE&&M.isNumber(t)){const a=i.xTickAmount;i.xAxisScale=this.linearScale(e,t,a,0,s.config.xaxis.max===void 0?s.config.xaxis.stepSize:void 0)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}scaleMultipleYAxes(){const e=this.w.config,t=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const s=t.seriesYAxisMap,i=t.minYArr,a=t.maxYArr,o=[],r=!t.isBarHorizontal;if(t.allSeriesCollapsed=!0,t.barGroups=[],s.forEach((n,c)=>{const h=[];if(n.forEach(l=>{var g;const p=(g=e.series[l])==null?void 0:g.group;h.indexOf(p)<0&&h.push(p)}),n.length>0){let l,g,p=Number.MAX_VALUE,u=-Number.MAX_VALUE,x=p,b=u;if(e.chart.stacked){const m=new Array(t.dataPoints).fill(0),w=[],y=[],v=[];h.forEach(()=>{w.push(m.map(()=>Number.MIN_VALUE)),y.push(m.map(()=>Number.MIN_VALUE)),v.push(m.map(()=>Number.MIN_VALUE))});for(let C=0;C<n.length;C++){!l&&e.series[n[C]].type&&(l=e.series[n[C]].type);const S=n[C];g=e.series[S].group?e.series[S].group:"axis-".concat(c.toString()),!(t.collapsedSeriesIndices.indexOf(S)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(S)<0)||(t.allSeriesCollapsed=!1,h.forEach((L,A)=>{if(e.series[S].group===L)for(let D=0;D<this.w.seriesData.series[S].length;D++){const k=this.w.seriesData.series[S][D];k>=0?y[A][D]+=k:v[A][D]+=k,w[A][D]+=k,x=Math.min(x,k),b=Math.max(b,k)}})),l!=="bar"&&l!=="column"||t.barGroups.push(g)}l||(l=e.chart.type),l==="bar"||l==="column"?h.forEach((C,S)=>{p=Math.min(p,Math.min.apply(null,v[S])),u=Math.max(u,Math.max.apply(null,y[S]))}
30):(h.forEach((C,S)=>{x=Math.min(x,Math.min.apply(null,w[S])),b=Math.max(b,Math.max.apply(null,w[S]))}),p=x,u=b),p===Number.MIN_VALUE&&u===Number.MIN_VALUE&&(u=-Number.MAX_VALUE)}else for(let m=0;m<n.length;m++){const w=n[m];p=Math.min(p,i[w]),u=Math.max(u,a[w]),!(t.collapsedSeriesIndices.indexOf(w)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(w)<0)||(t.allSeriesCollapsed=!1)}e.yaxis[c].min!==void 0&&(p=typeof e.yaxis[c].min=="function"?e.yaxis[c].min(p):e.yaxis[c].min),e.yaxis[c].max!==void 0&&(u=typeof e.yaxis[c].max=="function"?e.yaxis[c].max(u):e.yaxis[c].max),t.barGroups=t.barGroups.filter((m,w,y)=>y.indexOf(m)===w);const f=e.yaxis[c];r&&f.alignZero===!0&&!f.logarithmic&&f.min===void 0&&f.max===void 0&&t.ignoreYAxisIndexes.indexOf(c)<0&&M.isNumber(p)&&M.isNumber(u)?o.push({ai:c,minY:p,maxY:u}):(this.setYScaleForIndex(c,p,u),n.forEach(m=>{i[m]=t.yAxisScale[c].niceMin,a[m]=t.yAxisScale[c].niceMax}))}else this.setYScaleForIndex(c,0,-Number.MAX_VALUE)}),o.length>=2){o.forEach(h=>{this.setYScaleForIndex(h.ai,h.minY,h.maxY),s[h.ai].forEach(l=>{i[l]=t.yAxisScale[h.ai].niceMin,a[l]=t.yAxisScale[h.ai].niceMax})});let n=0;o.forEach(h=>{const l=t.yAxisScale[h.ai],g=l.niceMax-l.niceMin;if(g>0){const p=-l.niceMin/g;p>n&&(n=p)}}),n>1&&(n=1),n<0&&(n=0);const c=h=>{if(h<=0)return 1;const l=Math.floor(Math.log10(h)),g=Math.pow(10,l),p=h/g;let u;return u=p<=1+1e-9?1:p<=2+1e-9?2:p<=2.5+1e-9?2.5:p<=5+1e-9?5:10,u*g};o.forEach(h=>{const l=t.yAxisScale[h.ai];if(!l.result||l.result.length<2)return;const g=l.niceMax-l.niceMin;if(g<=0)return;const p=-l.niceMin/g;if(Math.abs(p-n)<=1e-9)return;const u=p<n&&n<1-1e-9,x=!u&&p>n&&n>1e-9;if(!u&&!x)return;const b=u?-n*l.niceMax/(1-n):l.niceMin,f=x?-l.niceMin*(1-n)/n:l.niceMax,m=f-b;if(m<=0)return;const w=Math.max(l.result.length,5),y=c(m/Math.max(w-1,1));if(y<=0)return;let v,C;if(u){v=Math.floor(b/y+1e-9)*y;const S=n>1e-9?v*(n-1)/n:l.niceMax,L=Math.max(S,l.niceMax);C=Math.ceil(L/y-1e-9)*y}else{C=Math.ceil(f/y-1e-9)*y;const S=n<1-1e-9?-n*C/(1-n):l.niceMin,L=Math.min(S,l.niceMin);v=Math.floor(L/y+1e-9)*y}l.result=[];for(let S=v;S<=C+1e-9*y;S=M.preciseAddition(S,y))l.result.push(M.stripNumber(S,7));l.niceMin=v,l.niceMax=C,s[h.ai].forEach(S=>{i[S]=l.niceMin,a[S]=l.niceMax})})}else if(o.length===1){const n=o[0];this.setYScaleForIndex(n.ai,n.minY,n.maxY),s[n.ai].forEach(c=>{i[c]=t.yAxisScale[n.ai].niceMin,a[c]=t.yAxisScale[n.ai].niceMax})}}}class st{constructor(e){this.w=e,this.scales=new Ct(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(e,t=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,o,r,n,c,h,l,g;const p=this.w.config,u=this.w.globals;let x=-Number.MAX_VALUE,b=Number.MIN_VALUE;i===null&&(i=e+1);const f=this.w.seriesData.series;let m=f,w=f;p.chart.type==="candlestick"?(m=this.w.candleData.seriesCandleL,w=this.w.candleData.seriesCandleH):p.chart.type==="boxPlot"?(m=this.w.candleData.seriesCandleO,w=this.w.candleData.seriesCandleC):p.chart.type==="violin"?(m=this.w.violinData.seriesViolinMin,w=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(m=this.w.rangeData.seriesRangeStart,w=this.w.rangeData.seriesRangeEnd);let y=!1;if(this.w.seriesData.seriesX.length>=i){const v=(a=u.brushSource)==null?void 0:a.w.config.chart.brush;(p.chart.zoom.enabled&&p.chart.zoom.autoScaleYaxis||v?.enabled&&v?.autoScaleYaxis)&&(y=!0)}for(let v=e;v<i;v++){u.dataPoints=Math.max(u.dataPoints,f[v].length);const C=p.series[v].type;this.w.labelData.categoryLabels.length&&(u.dataPoints=this.w.labelData.categoryLabels.filter(A=>A!==void 0).length),this.w.labelData.labels.length&&p.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((A,D)=>A+D.length,0)!==0&&(u.dataPoints=Math.max(u.dataPoints,this.w.labelData.labels.length));let S=0,L=f[v].length-1;if(y){if(p.xaxis.min)for(;S<L&&this.w.seriesData.seriesX[v][S]<p.xaxis.min;S++);if(p.xaxis.max)for(;L>S&&this.w.seriesData.seriesX[v][L]>p.xaxis.max;L--);}for(let A=S;A<=L&&A<this.w.seriesData.series[v].length;A++){let D=f[v][A];if(D!==null&&M.isNumber(D)){switch(((o=w[v])==null?void 0:o[A])!==void 0&&(x=Math.max(x,w[v][A]),t=Math.min(t,w[v][A])),((r=m[v])==null?void 0:r[A])!==void 0&&(t=Math.min(t,m[v][A]),s=Math.max(s,m[v][A])),C){case"candlestick":this.w.candleData.seriesCandleC[v][A]!==void 0&&(x=Math.max(x,this.w.candleData.seriesCandleH[v][A]),t=Math.min(t,this.w.candleData.seriesCandleL[v][A]));break;case"boxPlot":this.w.candleData.seriesCandleC[v][A]!==void 0&&(x=Math.max(x,this.w.candleData.seriesCandleC[v][A]),t=Math.min(t,this.w.candleData.seriesCandleO[v][A]));break;case"violin":((n=this.w.violinData.seriesViolinMax[v])==null?void 0:n[A])!==void 0&&(x=Math.max(x,this.w.violinData.seriesViolinMax[v][A]),t=Math.min(t,this.w.violinData.seriesViolinMin[v][A]))}if(C&&C!=="candlestick"&&C!=="boxPlot"&&C!=="violin"&&C!=="rangeArea"&&C!=="rangeBar"&&(x=Math.max(x,this.w.seriesData.series[v][A]),t=Math.min(t,this.w.seriesData.series[v][A])),this.w.seriesData.seriesGoals[v]&&this.w.seriesData.seriesGoals[v][A]&&Array.isArray(this.w.seriesData.seriesGoals[v][A])&&this.w.seriesData.seriesGoals[v][A].forEach(k=>{x=Math.max(x,k.value),t=Math.min(t,k.value)}),this.w.config.chart.type==="boxPlot"||C==="boxPlot"){const k=(h=(c=this.w.candleData.seriesBoxPoints)==null?void 0:c[v])==null?void 0:h[A];if(k)for(let P=0;P<k.length;P++){const T=k[P];typeof T=="number"&&(x=Math.max(x,T),t=Math.min(t,T))}}s=x,D=M.noExponents(D),M.isFloat(D)&&(u.yValueDecimal=Math.max(u.yValueDecimal,D.toString().split(".")[1].length)),b>((l=m[v])==null?void 0:l[A])&&((g=m[v])==null?void 0:g[A])<0&&(b=m[v][A])}else u.hasNullValues=!0}C!=="bar"&&C!=="column"||(b<0&&x<0&&(x=0,s=Math.max(s,0)),b===Number.MIN_VALUE&&(b=0,t=Math.min(t,0)))}return p.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&u.isBarHorizontal&&(b=t),p.chart.type==="bar"&&(b<0&&x<0&&(x=0),b===Number.MIN_VALUE&&(b=0)),{minY:b,maxY:x,lowestY:t,highestY:s}}setYRange(){const e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;let s,i=Number.MAX_VALUE;if(e.isMultipleYAxis){i=Number.MAX_VALUE;for(let a=0;a<this.w.seriesData.series.length;a++)s=this.getMinYMaxY(a),e.minYArr[a]=s.lowestY,e.maxYArr[a]=s.highestY,i=Math.min(i,s.lowestY)}return s=this.getMinYMaxY(0,i,void 0,this.w.seriesData.series.length),t.chart.type==="bar"?(e.minY=s.minY,e.maxY=s.maxY):(e.minY=s.lowestY,e.maxY=s.highestY),i=s.lowestY,t.chart.stacked&&this._setStackedMinMax(),t.chart.type==="line"||t.chart.type==="area"||t.chart.type==="scatter"||t.chart.type==="candlestick"||t.chart.type==="boxPlot"||t.chart.type==="violin"||t.chart.type==="rangeBar"&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==e.maxY&&(e.minY=i):e.minY=e.minY!==Number.MIN_VALUE?Math.min(s.minY,e.minY):s.minY,t.yaxis.forEach((a,o)=>{a.max!==void 0&&(typeof a.max=="number"?e.maxYArr[o]=a.max:typeof a.max=="function"&&(e.maxYArr[o]=a.max(e.isMultipleYAxis?e.maxYArr[o]:e.maxY)),e.maxY=e.maxYArr[o]),a.min!==void 0&&(typeof a.min=="number"?e.minYArr[o]=a.min:typeof a.min=="function"&&(e.minYArr[o]=a.min(e.isMultipleYAxis?e.minYArr[o]===Number.MIN_VALUE?0:e.minYArr[o]:e.minY)),e.minY=e.minYArr[o])}
30),e.isBarHorizontal&&["min","max"].forEach(a=>{t.xaxis[a]!==void 0&&typeof t.xaxis[a]=="number"&&(a==="min"?e.minY=t.xaxis[a]:e.maxY=t.xaxis[a])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=i):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],t.series.forEach(a=>{const o=a;switch(o.type||t.chart.type){case"bar":case"column":e.barGroups.push(o.group);break;case"line":e.lineGroups.push(o.group);break;case"area":e.areaGroups.push(o.group)}}),e.barGroups=e.barGroups.filter((a,o,r)=>r.indexOf(a)===o),e.lineGroups=e.lineGroups.filter((a,o,r)=>r.indexOf(a)===o),e.areaGroups=e.areaGroups.filter((a,o,r)=>r.indexOf(a)===o),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}setXRange(){const e=this.w.globals,t=this.w.config,s=t.xaxis.type==="numeric"||t.xaxis.type==="datetime"||t.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&&M.isNumber(this.w.labelData.labels[a][o])&&(e.maxX=Math.max(e.maxX,this.w.labelData.labels[a][o]),e.initialMaxX=Math.max(e.maxX,this.w.labelData.labels[a][o]),e.minX=Math.min(e.minX,this.w.labelData.labels[a][o]),e.initialMinX=Math.min(e.minX,this.w.labelData.labels[a][o]))};if(this.w.axisFlags.isXNumeric&&i(),this.w.axisFlags.noLabelsProvided&&t.xaxis.categories.length===0&&(e.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.minX=1,e.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let a=10;if(t.xaxis.tickAmount===void 0)a=Math.round(e.svgWidth/150),t.xaxis.type==="numeric"&&e.dataPoints<30&&(a=e.dataPoints-1),a>e.dataPoints&&e.dataPoints!==0&&(a=e.dataPoints-1);else if(t.xaxis.tickAmount==="dataPoints"){if(this.w.seriesData.series.length>1&&(a=this.w.seriesData.series[e.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const o=Math.round(e.maxX-e.minX);o<30&&(a=o)}}else a=t.xaxis.tickAmount;if(e.xTickAmount=a,t.xaxis.max!==void 0&&typeof t.xaxis.max=="number"&&(e.maxX=t.xaxis.max),t.xaxis.min!==void 0&&typeof t.xaxis.min=="number"&&(e.minX=t.xaxis.min),t.xaxis.range!==void 0&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const o=[];for(let r=e.minX-1;r<e.maxX;r++)o.push(r+1);e.xAxisScale={result:o,niceMin:o[0],niceMax:o[o.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,a,a,0,t.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,a-1,0,t.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&this.w.labelData.labels.length&&(e.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}setZRange(){const e=this.w.globals;if(this.w.axisFlags.isDataXYZ){for(let t=0;t<this.w.seriesData.series.length;t++)if(this.w.seriesData.seriesZ[t]!==void 0)for(let s=0;s<this.w.seriesData.seriesZ[t].length;s++)this.w.seriesData.seriesZ[t][s]!==null&&M.isNumber(this.w.seriesData.seriesZ[t][s])&&(e.maxZ=Math.max(e.maxZ,this.w.seriesData.seriesZ[t][s]),e.minZ=Math.min(e.minZ,this.w.seriesData.seriesZ[t][s]))}}_handleSingleDataPoint(){const e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){const s=new ne(this.w);if(t.xaxis.type==="datetime"){const i=s.getDate(e.minX);t.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),e.minX=new Date(i).getTime();const a=s.getDate(e.maxX);
30t.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()+2):a.setDate(a.getDate()+2),e.maxX=new Date(a).getTime()}else(t.xaxis.type==="numeric"||t.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}_getMinXDiff(){const e=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach(t=>{if(t.length){t.length===1&&t.push(this.w.seriesData.seriesX[e.maxValsInArrayIndex][this.w.seriesData.seriesX[e.maxValsInArrayIndex].length-1]);const s=t.slice();s.sort((i,a)=>i-a),s.forEach((i,a)=>{if(a>0){const o=i-s[a-1];o>0&&(e.minXDiff=Math.min(o,e.minXDiff))}}),e.dataPoints!==1&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}})}_setStackedMinMax(){const e=this.w.globals;if(!this.w.seriesData.series.length)return;let t=this.w.labelData.seriesGroups;t.length||(t=[this.w.seriesData.seriesNames.map(a=>a)]);const s={},i={};t.forEach(a=>{s[a]=[],i[a]=[],this.w.config.series.map((o,r)=>a.indexOf(this.w.seriesData.seriesNames[r])>-1?r:null).filter(o=>o!==null).forEach(o=>{var r,n,c,h;for(let l=0;l<this.w.seriesData.series[e.maxValsInArrayIndex].length;l++)s[a][l]===void 0&&(s[a][l]=0,i[a][l]=0),(this.w.config.chart.stacked&&!e.comboCharts||this.w.config.chart.stacked&&e.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=(r=this.w.config.series)==null?void 0:r[o])==null?void 0:n.type)==="bar"||((h=(c=this.w.config.series)==null?void 0:c[o])==null?void 0:h.type)==="column"))&&this.w.seriesData.series[o][l]!==null&&M.isNumber(this.w.seriesData.series[o][l])&&(this.w.seriesData.series[o][l]>0?s[a][l]+=parseFloat(String(this.w.seriesData.series[o][l]))+1e-4:i[a][l]+=parseFloat(String(this.w.seriesData.series[o][l])))})}),Object.entries(s).forEach(([a])=>{s[a].forEach((o,r)=>{e.maxY=Math.max(e.maxY,s[a][r]),e.minY=Math.min(e.minY,i[a][r])})})}}class it{constructor(e,{theme:t=null,timeScale:s=null}={},i){this.w=e,this.elgrid=i,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.axisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=e.config.chart.type==="bar"&&e.config.plotOptions.bar.horizontal,this.xAxisoffX=e.config.xaxis.position==="bottom"?e.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new xe(e,{theme:t,timeScale:s})}drawYaxis(e){const t=this.w,s=new F(this.w),i=t.config.yaxis[e].labels.style,{fontSize:a,fontFamily:o,fontWeight:r}=i,n=s.group({class:"apexcharts-yaxis",rel:e,transform:`translate(${t.globals.translateYAxisX[e]}, 0)`});if(this.axesUtils.isYAxisHidden(e))return n;const c=s.group({class:"apexcharts-yaxis-texts-g"});n.add(c);const h=t.globals.yAxisScale[e].result.length-1,l=t.layout.gridHeight/h,g=t.formatters.yLabelFormatters[e],p=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice());if(t.config.yaxis[e].labels.show){let u=t.layout.translateY+t.config.yaxis[e].labels.offsetY;t.globals.isBarHorizontal?u=0:t.config.chart.type==="heatmap"&&(u-=l/2),u+=parseInt(a,10)/3;let x=null;for(let b=h;b>=0;b--){const f=g(p[b],b,t);let m=t.config.yaxis[e].labels.padding;t.config.yaxis[e].opposite&&t.config.yaxis.length!==0&&(m*=-1);const w=this.getTextAnchor(t.config.yaxis[e].labels.align,t.config.yaxis[e].opposite),y=this.axesUtils.getYAxisForeColor(i.colors,e),v=Array.isArray(y)?y[b]:y,C=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-label tspan`)).map(L=>L.textContent),S=s.drawText({x:m,y:u,text:C.includes(f)&&!t.config.yaxis[e].labels.showDuplicates?"":f,textAnchor:w,fontSize:a,fontFamily:o,fontWeight:r,maxWidth:t.config.yaxis[e].labels.maxWidth,foreColor:v,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});c.add(S),this.addTooltip(S,f),x===null&&(x=S),t.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(s,S,x,t.config.yaxis[e].labels.rotate),u+=l}}return this.addYAxisTitle(s,n,e),this.addAxisBorder(s,n,e,h,l),n}getTextAnchor(e,t){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":t?"start":"end"}addTooltip(e,t){const s=B.createElementNS(U,"title");s.textContent=Array.isArray(t)?t.join(" "):t,e.node.appendChild(s)}
vendor: 4,303 bytes, line 30
30rotateLabel(e,t,s,i){const a=e.rotateAroundCenter(s.node),o=e.rotateAroundCenter(t.node);t.node.setAttribute("transform",`rotate(${i} ${a.x} ${o.y})`)}addYAxisTitle(e,t,s){const i=this.w;if(i.config.yaxis[s].title.text!==void 0){const a=e.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,r=e.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),t.add(a)}}addAxisBorder(e,t,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 c=e.drawLine(n,o.layout.translateY+r.offsetY-2,n,o.layout.gridHeight+o.layout.translateY+r.offsetY+2,r.color,0,r.width);t.add(c)}o.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,i,r,o.config.yaxis[s].axisTicks,s,a,t)}drawYaxisInversed(e){const t=this.w,s=new F(this.w),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});i.add(a);let o=t.globals.yAxisScale[e].result.length-1;const r=t.layout.gridWidth/o+.1;let n=r+t.config.xaxis.labels.offsetX;const c=t.formatters.xLabelFormatter;let h=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice());const l=t.labelData.timescaleLabels;if(l.length>0&&(this.xaxisLabels=l.slice(),h=l.slice(),o=h.length),t.config.xaxis.labels.show)for(let g=l.length?0:o;l.length?g<l.length:g>=0;l.length?g++:g--){let p=c?.(h[g],g,t),u=t.layout.gridWidth+t.globals.padHorizontal-(n-r+t.config.xaxis.labels.offsetX);if(l.length){const b=this.axesUtils.getLabel(h,l,u,g,this.drawnLabels,this.xaxisFontSize);u=b.x,p=b.text,this.drawnLabels.push(b.text),g===0&&t.globals.skipFirstTimelinelabel&&(p=""),g===h.length-1&&t.globals.skipLastTimelinelabel&&(p="")}const x=s.drawText({x:u,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-(t.config.xaxis.position==="top"?t.layout.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:p,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${t.config.xaxis.labels.style.cssClass}`});a.add(x),this.addTooltip(x,p),n+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(e){const t=this.w,s=new F(this.w),i=t.config.xaxis.axisBorder;if(i.show){let a=0;t.config.chart.type==="bar"&&t.axisFlags.isXNumeric&&(a-=15);const o=s.drawLine(t.globals.padHorizontal+a+i.offsetX,this.xAxisoffX,t.layout.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(o):e.add(o)}}inversedYAxisTitleText(e){const t=this.w,s=new F(this.w);if(t.config.xaxis.title.text!==void 0){const i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=s.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${t.config.xaxis.title.style.cssClass}`});i.add(a),e.add(i)}}yAxisTitleRotate(e,t){const s=this.w,i=new F(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),o=a?a.getBoundingClientRect():{width:0,height:0},r=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-title text`),n=r?r.getBoundingClientRect():{width:0,height:0};if(r){const c=this.xPaddingForYAxisTitle(e,o,n,t);r.setAttribute("x",String(c.xPos-(t?10:0)));
30const h=i.rotateAroundCenter(r);r.setAttribute("transform",`rotate(${t?-1*s.config.yaxis[e].title.rotate:s.config.yaxis[e].title.rotate} ${h.x} ${h.y})`)}}xPaddingForYAxisTitle(e,t,s,i){const a=this.w;let o=0,r=10;return a.config.yaxis[e].title.text===void 0||e<0?{xPos:o,padd:0}:(i?o=t.width+a.config.yaxis[e].title.offsetX+s.width/2+r/2:(o=-1*t.width+a.config.yaxis[e].title.offsetX+r/2+s.width/2,a.globals.isBarHorizontal&&(r=25,o=-1*t.width-a.config.yaxis[e].title.offsetX-r)),{xPos:o,padd:r})}setYAxisXPosition(e,t){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,c)=>{const h=s.globals.ignoreYAxisIndexes.includes(c)||!n.show||n.floating||e[c].width===0,l=e[c].width+t[c].width;n.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[c]=a-n.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+r,h||(r+=l+20),s.globals.translateYAxisX[c]=a-n.labels.offsetX+20):(i=s.layout.translateX-o,h||(o+=l+20),s.globals.translateYAxisX[c]=i+n.labels.offsetX)})}setYAxisTextAlignments(){const e=this.w;Array.from(e.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((t,s)=>{const i=e.config.yaxis[s];if(i&&!i.floating&&i.labels.align!==void 0){const a=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-texts-g`),o=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-label`)),r=a.getBoundingClientRect();o.forEach(n=>{n.setAttribute("text-anchor",i.labels.align)}),i.labels.align!=="left"||i.opposite?i.labels.align==="center"?a.setAttribute("transform",`translate(${r.width/2*(i.opposite?1:-1)}, 0)`):i.labels.align==="right"&&i.opposite&&a.setAttribute("transform",`translate(${r.width}, 0)`):a.setAttribute("transform",`translate(-${r.width}, 0)`)}})}}class as{constructor(e,t){this.w=e,this.ctx=t,this.documentEvent=this.documentEvent.bind(this)}addEventListener(e,t){const s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,e)?s.globals.events[e].push(t):s.globals.events[e]=[t]}removeEventListener(e,t){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,e))return;const i=s.globals.events[e].indexOf(t);i!==-1&&s.globals.events[e].splice(i,1)}fireEvent(e,t){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,e))return;t&&t.length||(t=[]);const i=s.globals.events[e],a=i.length;for(let o=0;o<a;o++)i[o].apply(null,t)}setupEventHandlers(){const e=this.w,t=this.ctx,s=e.dom.baseEl.querySelector(e.globals.chartClass);this.ctx.eventList.forEach(i=>{s?.addEventListener(i,a=>{const o=a.target.getAttribute("i")===null&&e.interact.capturedSeriesIndex!==-1?e.interact.capturedSeriesIndex:a.target.getAttribute("i"),r=a.target.getAttribute("j")===null&&e.interact.capturedDataPointIndex!==-1?e.interact.capturedDataPointIndex:a.target.getAttribute("j"),n=Object.assign({},e,{seriesIndex:e.globals.axisCharts?o:0,dataPointIndex:r});
30a.type==="keydown"?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(t.ctx.keyboardNavigation&&t.ctx.keyboardNavigation.handleKey(a),typeof e.config.chart.events.keyDown=="function"&&e.config.chart.events.keyDown(a,t,n),t.ctx.events.fireEvent("keydown",[a,t,n])):a.type==="keyup"?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(typeof e.config.chart.events.keyUp=="function"&&e.config.chart.events.keyUp(a,t,n),t.ctx.events.fireEvent("keyup",[a,t,n])):a.type==="mousemove"||a.type==="touchmove"?typeof e.config.chart.events.mouseMove=="function"&&e.config.chart.events.mouseMove(a,t,n):a.type==="mouseleave"||a.type==="touchleave"?typeof e.config.chart.events.mouseLeave=="function"&&e.config.chart.events.mouseLeave(a,t,n):(a.type==="mouseup"&&a.which===1||a.type==="touchend")&&(typeof e.config.chart.events.click=="function"&&e.config.chart.events.click(a,t,n),t.ctx.events.fireEvent("click",[a,t,n]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(i=>{e.dom.baseEl.addEventListener(i,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(e){const t=this.w,s=e.target.className;if(e.type==="click"){const i=t.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&s!=="apexcharts-menu-icon"&&i.classList.remove("apexcharts-menu-open")}t.interact.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,t.interact.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}}class os{constructor(e){this.w=e}setCurrentLocaleValues(e){let t=this.w.config.chart.locales;const s=O.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(s.chart.locales));const i=t.filter(a=>a.name===e)[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");{const a=M.extend(ft,i);this.w.globals.locale=a.options}}}class rs{constructor(e,t){this.w=e,this.ctx=t}drawAxis(e,t){const s=this.w.globals,i=this.w.config,a=new Ie(this.w,this.ctx,t),o=new it(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},t);if(s.axisCharts&&e!=="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((c,h)=>{if(s.ignoreYAxisIndexes.indexOf(h)===-1&&(n=o.drawYaxis(h),this.w.dom.Paper.add(n),this.w.config.grid.position==="back")){const l=this.w.dom.Paper.children()[1];l&&(l.remove(),this.w.dom.Paper.add(l))}}))}}}class at{constructor(e){this.w=e}drawXCrosshairs(){const e=this.w,t=new F(this.w),s=new te(this.w),i=e.config.xaxis.crosshairs.fill.gradient,a=e.config.xaxis.crosshairs.dropShadow,o=e.config.xaxis.crosshairs.fill.type,r=i.colorFrom,n=i.colorTo,c=i.opacityFrom,h=i.opacityTo,l=i.stops,g=a.enabled,p=a.left,u=a.top,x=a.blur,b=a.color,f=a.opacity;let m=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){o==="gradient"&&(m=t.drawGradient("vertical",r,n,c,h,null,l,[]));let w=t.drawRect();e.config.xaxis.crosshairs.width===1&&(w=t.drawLine(0,0,0,0));let y=e.layout.gridHeight;(!M.isNumber(y)||y<0)&&(y=0);let v=e.config.xaxis.crosshairs.width;(!M.isNumber(v)||Number(v)<0)&&(v=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:v,height:y,fill:m,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),g&&(w=s.dropShadow(w,{left:p,top:u,blur:x,color:b,opacity:f})),e.dom.elGraphical.add(w)}}drawYCrosshairs(){const e=this.w,t=new F(this.w),s=e.config.yaxis[0].crosshairs,i=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){const o=t.drawLine(-i,0,e.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),e.dom.elGraphical.add(o)}const a=t.drawLine(-i,0,e.layout.gridWidth+i,0,s.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),e.dom.elGraphical.add(a)}}function St(d,e){if(!M.isObject(d)||!M.isObject(e))return e!==void 0?e:d;const t=$({},d);for(const s of Object.keys(e)){const i=e[s];i!==void 0&&(M.isObject(i)&&M.isObject(d[s])?t[s]=St(d[s],i):t[s]=i)}return t}class ns{constructor(e){this.w=e,this._activeBreakpoint=null}checkResponsiveConfig(e){const t=this.w,s=t.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 Fe({}),o=(r={})=>{var n;const c=i[0].breakpoint,h=O.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(h>c){if(this._activeBreakpoint!==null){if(!t.globals.initialConfig)return;const l=M.clone(t.globals.initialConfig);l.series=M.clone(t.config.series);const g=J.extendArrayProps(a,l,t);r=M.extend(g,r),this.overrideResponsiveOptions(r),this._activeBreakpoint=null}}else for(let l=0;l<i.length;l++)if(h<i[l].breakpoint){const g=(n=i[l].options)!=null&&n.yaxis?M.
30clone(i[l].options.yaxis):null;if(r=J.extendArrayProps(a,i[l].options,t),r=M.extend(t.config,r),Array.isArray(t.config.yaxis)&&g){const p=Array.isArray(g)?g:[g];r=G($({},r),{yaxis:t.config.yaxis.map((u,x)=>St(u,p[x]))})}this.overrideResponsiveOptions(r),this._activeBreakpoint=i[l].breakpoint}};if(e){let r=J.extendArrayProps(a,e,t);r=M.extend(t.config,r),r=M.extend(r,e),o(r)}else o({})}overrideResponsiveOptions(e){const t=new Fe(e).init({responsiveOverride:!0});this.w.config=t}}class K{constructor(e,{toggleDataSeries:t,revertDefaultAxisMinMax:s,updateSeries:i}={}){this.w=e,this._toggleDataSeries=t||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const e=this.w;e.globals.cachedSelectors&&(delete e.globals.cachedSelectors.allSeriesEls,delete e.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const e=this.w,t="allSeriesEls";return e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=e.dom.baseEl.getElementsByClassName("apexcharts-series")),e.globals.cachedSelectors[t]}getSeriesByName(e){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${M.escapeString(e)}']`)}isSeriesHidden(e){var t;const s=this.getSeriesByName(e),i=parseInt((t=s.getAttribute("data:realIndex"))!=null?t:"0",10);return{isHidden:s.classList.contains("apexcharts-series-collapsed"),realIndex:i}}addCollapsedClassToSeries(e,t){K.addCollapsedClassToSeries(this.w,e,t)}static addCollapsedClassToSeries(e,t,s){function i(a){for(let o=0;o<a.length;o++)a[o].index===s&&t.node.classList.add("apexcharts-series-collapsed")}i(e.globals.collapsedSeries),i(e.globals.ancillaryCollapsedSeries)}toggleSeries(e){var t;const s=this.isSeriesHidden(e);return(t=this._toggleDataSeries)==null||t.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(e){var t;const s=this.isSeriesHidden(e);s.isHidden&&((t=this._toggleDataSeries)==null||t.call(this,s.realIndex,!0))}hideSeries(e){var t;const s=this.isSeriesHidden(e);s.isHidden||(t=this._toggleDataSeries)==null||t.call(this,s.realIndex,!1)}resetSeries(e=!0,t=!0,s=!0){var i,a;const o=this.w;this.clearSeriesCache();let r=M.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,e&&(t&&(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(e){const t=this.w;for(let s=0;s<e.length;s++)t.globals.collapsedSeriesIndices.indexOf(s)>-1&&(e[s].data=[]);return e}highlightSeries(e){var t;const s=this.w,i=this.getSeriesByName(e),a=parseInt((t=i?.getAttribute("data:realIndex"))!=null?t:"",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,c=null,h=null;if(s.globals.axisCharts||s.config.chart.type==="radialBar")if(s.globals.axisCharts){n=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),c=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const l=s.globals.seriesYAxisReverseMap[a];h=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${l}']`)}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 l=0;l<r.length;l++)r[l].classList.add(this.legendInactiveClass);if(n){if(!s.globals.axisCharts){const l=n.parentNode;l?.classList.remove(this.legendInactiveClass)}n.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass),h!==null&&h.classList.remove(this.legendInactiveClass)}else for(let l=0;l<r.length;l++)r[l].classList.remove(this.legendInactiveClass)}toggleSeriesOnHover(e,t){const s=this.w;t||(t=e.target);const i=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");
30if(e.type==="mousemove"){const a=parseInt(t.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[a])}else if(e.type==="mouseout")for(let a=0;a<i.length;a++)i[a].classList.remove(this.legendInactiveClass)}highlightRangeInSeries(e,t){const s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=n=>{for(let c=0;c<i.length;c++){const h=i[c].classList;typeof h[n]=="function"&&h[n](this.legendInactiveClass)}};if(t==="reset")return void a("remove");const o=s.config.plotOptions.heatmap.colorScale.ranges,r=o&&o[e];if(r){a("add");for(let n=0;n<i.length;n++){const c=Number(i[n].getAttribute("val"));c>=r.from&&c<=r.to&&i[n].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(e="asc",t=[]){const s=this.w;let i=0;if(s.config.series.length>1){const a=s.config.series.map((o,r)=>o.data&&o.data.length>0&&s.globals.collapsedSeriesIndices.indexOf(r)===-1&&(!s.globals.comboCharts||t.length===0||t.length&&t.indexOf(s.config.series[r].type)>-1)?r:-1);for(let o=e==="asc"?0:a.length-1;e==="asc"?o<a.length:o>=0;e==="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,t)=>e.type==="bar"||e.type==="column"?t:-1).filter(e=>e!==-1):this.w.config.series.map((e,t)=>t)}getPreviousPaths(){var e,t,s,i;const a=this.w;if(!a.globals.axisCharts)return void(a.globals.previousPaths=a.seriesData.series);function o(n,c,h){const l=n[c].childNodes,g={type:h,paths:[],realIndex:n[c].getAttribute("data:realIndex")};for(let p=0;p<l.length;p++)if(l[p].hasAttribute("pathTo")){const u=l[p].getAttribute("pathTo");g.paths.push({d:u})}a.globals.previousPaths.push(g)}a.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(n=>{const c=(h=n,a.dom.baseEl.querySelectorAll(`.apexcharts-${h}-series .apexcharts-series`));var h;for(let l=0;l<c.length;l++)o(c,l,n)});const r=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);if(r.length>0)for(let n=0;n<r.length;n++){const c=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${n}'] rect`),h=[];for(let l=0;l<c.length;l++){const g=u=>c[l].getAttribute(u),p={x:parseFloat((e=g("x"))!=null?e:"0"),y:parseFloat((t=g("y"))!=null?t:"0"),width:parseFloat((s=g("width"))!=null?s:"0"),height:parseFloat((i=g("height"))!=null?i:"0")};h.push({rect:p,color:c[l].getAttribute("color")})}a.globals.previousPaths.push(h)}}clearPreviousPaths(){const e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}handleNoData(){const e=this.w,t=e.config.noData,s=new F(this.w);let i=e.globals.svgWidth/2,a=e.globals.svgHeight/2,o="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,t.align==="left"?(i=10,o="start"):t.align==="right"&&(i=e.globals.svgWidth-10,o="end"),t.verticalAlign==="top"?a=50:t.verticalAlign==="bottom"&&(a=e.globals.svgHeight-50),i+=t.offsetX,a=a+parseInt(t.style.fontSize,10)+2+t.offsetY,t.text!==void 0&&t.text!==""){const r=s.drawText({x:i,y:a,text:t.text,textAnchor:o,fontSize:t.style.fontSize,fontFamily:t.style.fontFamily,foreColor:t.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});e.dom.Paper.add(r)}}setNullSeriesToZeroValues(e){const t=this.w;for(let s=0;s<e.length;s++)if(e[s].length===0)for(let i=0;i<e[t.globals.maxValsInArrayIndex].length;i++)e[s].push(0);return e}hasAllSeriesEqualX(){let e=!0;const t=this.w,s=this.filteredSeriesX();for(let i=0;i<s.length-1;i++)if(s[i][0]!==s[i+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}filteredSeriesX(){return this.w.seriesData.seriesX.map(e=>e.length>0?e:[])}}class ls{constructor(e){this.w=e,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}checkHeatmapDistributed(){const{chart:e,plotOptions:t}=this.w.config;return e.type==="treemap"&&t.treemap&&t.treemap.distributed||e.type==="heatmap"&&t.heatmap&&t.heatmap.distributed}checkBarDistributed(){const{chart:e,plotOptions:t}=this.w.config;return t.bar&&t.bar.distributed&&(e.type==="bar"||e.type==="rangeBar")}init(){this.setDefaultColors()}setDefaultColors(){var e;const t=this.w,s=new M;t.dom.elWrap.classList.add(`apexcharts-theme-${t.config.theme.mode||"light"}`);const i=(e=t.config.theme.accessibility)==null?void 0:e.colorBlindMode;if(i){t.globals.colors=this.getColorBlindColors(i),this.applySeriesColors(t.seriesData.seriesColors,t.globals.colors);const r=t.globals.colors.slice();return this.pushExtraColors(t.globals.colors),this.applyColorTypes(["fill","stroke"],r),this.applyDataLabelsColors(r),this.applyRadarPolygonsColors(),this.applyMarkersColors(r),void(i==="highContrast"&&t.dom.elWrap.classList.add("apexcharts-high-contrast"))}const a=[...t.config.colors||t.config.fill.colors||[]];t.globals.colors=this.getColors(a),this.applySeriesColors(t.seriesData.seriesColors,t.globals.colors),t.config.theme.monochrome.enabled&&(t.globals.colors=this.getMonochromeColors(t.config.theme.monochrome,t.seriesData.series,s));const o=t.globals.colors.slice();this.pushExtraColors(t.globals.colors),this.applyColorTypes(["fill","stroke"],o),this.applyDataLabelsColors(o),this.applyRadarPolygonsColors(),this.applyMarkersColors(o)}getColors(e){const t=this.w;return e&&e.length!==0?Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,t.config.series.map((s,i)=>{const a=e[i]||e[0];return typeof a=="function"?a({value:t.globals.axisCharts?t.seriesData.series[i][0]||0:t.seriesData.series[i],seriesIndex:i,dataPointIndex:i,w:this.w}):a})):e:this.predefined()}applySeriesColors(e,t){e.forEach((s,i)=>{s&&(t[i]=s)})}getMonochromeColors(e,t,s){const{color:i,shadeIntensity:a,shadeTo:o}=e,r=this.isBarDistributed||this.isHeatmapDistributed?t[0].length*t.length:t.length,n=1/(r/a);let c=0;return Array.from({length:r},()=>{const h=o==="dark"?s.shadeColor(-1*c,i):s.shadeColor(c,i);return c+=n,h})}applyColorTypes(e,t){const s=this.w;e.forEach(i=>
30{s.globals[i].colors=s.config[i].colors===void 0?this.isColorFn?s.config.colors:t:s.config[i].colors.slice(),this.pushExtraColors(s.globals[i].colors)})}applyDataLabelsColors(e){const t=this.w;t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors===void 0?e:t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){const e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#343A3F":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}applyMarkersColors(e){const t=this.w;t.globals.markers.colors=t.config.markers.colors===void 0?e:t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}pushExtraColors(e,t,s=null){const i=this.w;let a=t||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),e.length<a){const o=a-e.length;for(let r=0;r<o;r++)e.push(e[r])}}getColorBlindColors(e){const t={palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]};return({deuteranopia:t.cvdDeuteranopia,protanopia:t.cvdProtanopia,tritanopia:t.cvdTritanopia,highContrast:t.highContrast}[e]||t.palette1).slice()}updateThemeOptions(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};const t=e.theme.mode,s=t==="dark"?"palette4":t==="light"?"palette1":e.theme.palette||"palette1",i=t==="dark"?"#f6f7f8":t==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=t||"light",e.chart.foreColor=i,e.theme.palette=s,e}predefined(){const e={palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]};return e[this.w.config.theme.palette]||e.palette1}}class hs{constructor(e){this.w=e}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(e){const t=this.w,s=e==="title"?t.config.title:t.config.subtitle;let i=t.globals.svgWidth/2,a=s.offsetY,o="middle";if(s.align==="left"?(i=10,o="start"):s.align==="right"&&(i=t.globals.svgWidth-10,o="end"),i+=s.offsetX,a=a+parseInt(s.style.fontSize,10)+s.margin/2,s.text!==void 0){const r=new F(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});r.node.setAttribute("class",`apexcharts-${e}-text`),t.dom.Paper.add(r)}}}let cs=class{constructor(d){this.w=d.w,this.dCtx=d}getTitleSubtitleCoords(d){const e=this.w;let t=0,s=0;const i=d==="title"?e.config.title.floating:e.config.subtitle.floating,a=e.dom.baseEl.querySelector(`.apexcharts-${d}-text`);if(a!==null&&!i){const o=a.getBoundingClientRect();t=o.width,s=e.globals.axisCharts?o.height+5:o.height}return{width:t,height:s}}getLegendsRect(){const d=this.w,e=d.dom.elLegendWrap;d.config.legend.height||d.config.legend.position!=="top"&&d.config.legend.position!=="bottom"||e&&(e.style.maxHeight=d.globals.svgHeight/2+"px");const t=Object.assign({},M.getBoundingClientRect(e));return e!==null&&!d.config.legend.floating&&d.config.legend.show?this.dCtx.lgRect={x:t.x,y:t.y,height:t.height,width:t.height===0?0:t.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},d.config.legend.position!=="left"&&d.config.legend.position!=="right"||1.5*this.dCtx.lgRect.width>d.globals.svgWidth&&(this.dCtx.lgRect.width=d.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const d=this.w,e=[];
30d.config.series.forEach((o,r)=>{o.data.forEach((n,c)=>{const h=(l=d.seriesData.series[r][c],d.config.dataLabels.formatter(l,{seriesIndex:r,dataPointIndex:c,w:d}));var l;e.push(h)})});const t=M.getLargestStringFromArr(e),s=new F(this.w),i=d.config.dataLabels.style,a=s.getTextRects(t,parseInt(i.fontSize).toString(),i.fontFamily);return{width:1.05*a.width,height:a.height}}getLargestStringFromMultiArr(d,e){let t=d;if(this.w.axisFlags.isMultiLineX){const s=e.map(a=>Array.isArray(a)?a.length:1),i=Math.max(...s);t=e[s.indexOf(i)]}return t}};class ds{constructor(e){this.w=e.w,this.dCtx=e}getxAxisLabelsCoords(){const e=this.w;let t,s=e.labelData.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&s.length===0&&(s=e.labelData.categoryLabels),e.labelData.timescaleLabels.length>0){const i=this.getxAxisTimeScaleLabelsCoords();t={width:i.width,height:i.height},e.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=e.config.legend.position!=="left"&&e.config.legend.position!=="right"||e.config.legend.floating?0:this.dCtx.lgRect.width;const i=e.formatters.xLabelFormatter;let a=M.getLargestStringFromArr(s),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,s);e.globals.isBarHorizontal&&(a=e.globals.yAxisScale[0].result.reduce((g,p)=>g.length>p.length?g:p,0),o=a);const r=new Te(this.w),n=a;a=r.xLabelFormat(i,a,n,{i:void 0,dateFormatter:new ne(this.w).formatDate,w:e}),o=r.xLabelFormat(i,o,n,{i:void 0,dateFormatter:new ne(this.w).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&a===void 0||String(a).trim()==="")&&(a="1",o=a);const c=new F(this.w);let h=c.getTextRects(a,e.config.xaxis.labels.style.fontSize),l=h;if(a!==o&&(l=c.getTextRects(o,e.config.xaxis.labels.style.fontSize)),t={width:h.width>=l.width?h.width:l.width,height:h.height>=l.height?h.height:l.height},t.width*s.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&e.config.xaxis.labels.rotate!==0||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.layout.rotateXLabels=!0;const g=p=>c.getTextRects(p,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,`rotate(${e.config.xaxis.labels.rotate} 0 0)`,!1);h=g(a),a!==o&&(l=g(o)),t.height=(h.height>l.height?h.height:l.height)/1.5,t.width=h.width>l.width?h.width:l.width}}else e.layout.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}getxAxisGroupLabelsCoords(){var e;const t=this.w;if(!t.labelData.hasXaxisGroups)return{width:0,height:0};const s=((e=t.config.xaxis.group.style)==null?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,i=t.labelData.groups.map(l=>l.title);let a;const o=M.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,i),n=new F(this.w),c=n.getTextRects(o,s);let h=c;return o!==r&&(h=n.getTextRects(r,s)),a={width:c.width>=h.width?c.width:h.width,height:c.height>=h.height?c.height:h.height},t.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){const e=this.w;let t=0,s=0;if(e.config.xaxis.title.text!==void 0){const i=new F(this.w).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=i.width,s=i.height}return{width:t,height:s}}getxAxisTimeScaleLabelsCoords(){const e=this.w;this.dCtx.timescaleLabels=e.labelData.timescaleLabels.slice();const t=this.dCtx.timescaleLabels.map(a=>a.value),s=t.reduce((a,o)=>a===void 0?0:a.length>o.length?a:o,0),i=new F(this.w).getTextRects(s,e.config.xaxis.labels.style.fontSize);return 1.05*i.width*t.length>e.layout.gridWidth&&e.config.xaxis.labels.rotate!==0&&(e.globals.overlappingXLabels=!0),i}additionalPaddingXLabels(e){const t=this.w,s=t.globals,i=t.config,a=i.xaxis.type,o=e.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;const r=t.config.yaxis[0].opposite&&t.globals.isBarHorizontal,n=h=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const l=this.dCtx.timescaleLabels[0],g=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+o/1.75-this.dCtx.yAxisWidthRight,p=l.position-o/1.75+this.dCtx.yAxisWidthLeft,u=t.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;g>s.svgWidth-t.layout.translateX-u&&(s.skipLastTimelinelabel=!0),p<-(h.show&&!h.floating||i.chart.type!=="bar"&&i.chart.type!=="candlestick"&&i.chart.type!=="rangeBar"&&i.chart.type!=="boxPlot"&&i.chart.type!=="violin"?10:o/1.75)&&(s.skipFirstTimelinelabel=!0)}else a==="datetime"?this.dCtx.gridPad.right<o&&!t.layout.rotateXLabels&&(s.skipLastTimelinelabel=!0):a!=="datetime"&&this.dCtx.gridPad.right<o/2-this.dCtx.yAxisWidthRight&&!t.layout.rotateXLabels&&!t.config.xaxis.labels.trim&&(this.dCtx.xPadRight=o/2+1)},c=(h,l)=>{i.yaxis.length>1&&(g=>s.collapsedSeriesIndices.indexOf(g)!==-1)(l)||n(h)};i.yaxis.forEach((h,l)=>{r?(this.dCtx.gridPad.left<o&&(this.dCtx.xPadLeft=o/2+1),this.dCtx.xPadRight=o/2+1):c(h,l)})}}class gs{constructor(e){this.w=e.w,this.dCtx=e}getyAxisLabelsCoords(){const e=this.w,t=[];let s=10;const i=new xe(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return e.config.yaxis.map((a,o)=>{const r={seriesIndex:o,dataPointIndex:-1,w:e},n=e.globals.yAxisScale[o];let c=0;if(!i.isYAxisHidden(o)&&a.labels.show&&a.labels.minWidth!==void 0&&(c=a.labels.minWidth),!i.isYAxisHidden(o)&&a.labels.show&&n.result.length){const h=e.formatters.yLabelFormatters[o],l=n.niceMin===Number.MIN_VALUE?0:n.niceMin;let g=n.result.reduce((m,w)=>{var y,v;return((y=String(h(m,r)))==null?void 0:y.length)>((v=String(h(w,r)))==null?void 0:v.length)?m:w},l);g=h(g,r);let p=g;if(g!==void 0&&g.length!==0||(g=n.niceMax),String(g).length===1&&(g+=".0",p=g),e.globals.isBarHorizontal){s=0;const m=e.labelData.labels.slice();g=M.getLargestStringFromArr(m),g=h(g,{seriesIndex:o,dataPointIndex:-1,w:e}),p=this.dCtx.dimHelpers.getLargestStringFromMultiArr(g,m)}const u=new F(this.w),x="rotate(".concat(a.labels.rotate," 0 0)"),b=u.getTextRects(g,a.labels.style.fontSize,a.labels.style.fontFamily,x,!1);let f=b;
vendor: 11,332 bytes, line 30
30g!==p&&(f=u.getTextRects(p,a.labels.style.fontSize,a.labels.style.fontFamily,x,!1)),t.push({width:(c>f.width||c>b.width?c:f.width>b.width?f.width:b.width)+s,height:f.height>b.height?f.height:b.height})}else t.push({width:0,height:0})}),t}getyAxisTitleCoords(){const e=this.w,t=[];return e.config.yaxis.map(s=>{if(s.show&&s.title.text!==void 0){const i=new F(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);t.push({width:o.width,height:o.height})}else t.push({width:0,height:0})}),t}getTotalYAxisWidth(){const e=this.w;let t=0,s=0,i=0;const a=e.globals.yAxisScale.length>1?10:0,o=new xe(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),r=(n,c)=>{const h=e.config.yaxis[c].floating;let l=0;n.width>0&&!h?(l=n.width+a,(function(g){return e.globals.ignoreYAxisIndexes.indexOf(g)>-1})(c)&&(l=l-n.width-a)):l=h||o.isYAxisHidden(c)?0:5,e.config.yaxis[c].opposite?i+=l:s+=l,t+=l};return e.layout.yLabelsCoords.map((n,c)=>{r(n,c)}),e.layout.yTitleCoords.map((n,c)=>{r(n,c)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.layout.yLabelsCoords[0].width+e.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=s,this.dCtx.yAxisWidthRight=i,t}}class ps{constructor(e){this.w=e.w,this.dCtx=e}gridPadForColumnsInNumericAxis(e){const{w:t}=this,{config:s,globals:i}=t;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;const a=l=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(l),o=s.chart.type;let r=0,n=a(o)?s.series.length:1;i.comboBarCount>0&&(n=i.comboBarCount),i.collapsedSeries.forEach(l=>{a(l.type)&&(n-=1)}),s.chart.stacked&&(n=1);const c=a(o)||i.comboBarCount>0;let h=Math.abs(i.initialMaxX-i.initialMinX);if(c&&t.axisFlags.isXNumeric&&!i.isBarHorizontal&&n>0&&h!==0){h<=3&&(h=i.dataPoints);const l=h/e;let g=i.minXDiff&&i.minXDiff/l>0?i.minXDiff/l:0;g>e/2&&(g/=2),r=g*parseInt(s.plotOptions.bar.columnWidth,10)/100,r<1&&(r=1),i.barPadForNumericAxis=r}return r}gridPadFortitleSubtitle(){const{w:e}=this,{globals:t}=e;let s=this.dCtx.isSparkline||!t.axisCharts?0:10;["title","subtitle"].forEach(o=>{e.config[o].text!==void 0?s+=e.config[o].margin:s+=this.dCtx.isSparkline||!t.axisCharts?0:5}),!e.config.legend.show||e.config.legend.position!=="bottom"||e.config.legend.floating||t.axisCharts||(s+=10);const i=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");e.layout.gridHeight-=i.height+a.height+s,e.layout.translateY+=i.height+a.height+s}setGridXPosForDualYAxis(e,t){const{w:s}=this,i=new xe(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-=t[o].width+e[o].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}}class We{constructor(e,t){this.w=e,this.ctx=t,this.theme=t.theme,this.timeScale=t.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 cs(this),this.dimYAxis=new gs(this),this.dimXAxis=new ds(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 e=this.w,t=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};const s=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.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)),t.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),e.layout.gridHeight=e.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,e.layout.gridWidth=e.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;const i=this.dimGrid.gridPadForColumnsInNumericAxis(e.layout.gridWidth);return e.layout.gridWidth=e.layout.gridWidth-2*i,e.layout.translateX=e.layout.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),e.layout.translateY=e.layout.translateY+this.gridPad.top,{layout:{gridHeight:e.layout.gridHeight,gridWidth:e.layout.gridWidth,translateX:e.layout.translateX,translateY:e.layout.translateY,translateXAxisX:e.layout.translateXAxisX,translateXAxisY:e.layout.translateXAxisY,rotateXLabels:e.layout.rotateXLabels,xAxisHeight:e.layout.xAxisHeight,xAxisLabelsHeight:e.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:e.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:e.layout.xAxisLabelsWidth,yLabelsCoords:e.layout.yLabelsCoords,yTitleCoords:e.layout.yTitleCoords}}}setDimensionsForAxisCharts(){const e=this.w,t=e.globals,s=this.dimYAxis.getyAxisLabelsCoords(),i=this.dimYAxis.getyAxisTitleCoords();t.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((g,p)=>{e.layout.yLabelsCoords.push({width:s[p].width,index:p}),e.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),e.layout.translateXAxisY=e.layout.rotateXLabels?this.xAxisHeight/8:-4,e.layout.translateXAxisX=e.layout.rotateXLabels&&e.axisFlags.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(e.layout.rotateXLabels=!1,e.layout.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),e.layout.translateXAxisY=e.layout.translateXAxisY+e.config.xaxis.labels.offsetY,e.layout.translateXAxisX=e.layout.translateXAxisX+e.config.xaxis.labels.offsetX;let n=this.yAxisWidth,c=this.xAxisHeight;e.layout.xAxisLabelsHeight=this.xAxisHeight-r.height,e.layout.xAxisGroupLabelsHeight=e.layout.xAxisLabelsHeight-a.height,e.layout.xAxisLabelsWidth=this.xAxisWidth,e.layout.xAxisHeight=this.xAxisHeight;let h=10;(e.config.chart.type==="radar"||this.isSparkline)&&(n=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||e.config.chart.type==="treemap")&&(n=0,c=0,h=0),this.isSparkline||e.config.chart.type==="treemap"||this.dimXAxis.additionalPaddingXLabels(a);const l=()=>{e.layout.translateX=n+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-this.lgRect.height-c-(this.isSparkline||e.config.chart.type==="treemap"?0:e.layout.rotateXLabels?10:15),e.layout.gridWidth=t.svgWidth-n-2*this.datalabelsCoords.width};switch(e.config.xaxis.position==="top"&&(h=e.layout.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":e.layout.translateY=h,l();break;case"top":e.layout.translateY=this.lgRect.height+h,l();break;case"left":e.layout.translateY=h,e.layout.translateX=this.lgRect.width+n+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-c-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width;break;case"right":e.layout.translateY=h,e.layout.translateX=n+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-c-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(i,s),new it(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){const e=this.w,t=e.globals,s=e.config;let i=0;e.config.legend.show&&!e.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){e.layout.gridHeight=t.svgHeight;const n=e.dom.elWrap.getBoundingClientRect().width;return e.layout.gridWidth=Math.min(n,e.layout.gridHeight),e.layout.translateY=o,void(e.layout.translateX=r+(t.svgWidth-e.layout.gridWidth)/2)}switch(s.legend.position){case"bottom":e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=o-10,e.layout.translateX=r+(t.svgWidth-e.layout.gridWidth)/2;break;case"top":e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=this.lgRect.height+o+10,e.layout.translateX=r+(t.svgWidth-e.layout.gridWidth)/2;break;case"left":e.layout.gridWidth=t.svgWidth-this.lgRect.width-i,e.layout.gridHeight=s.chart.height!=="auto"?t.svgHeight:e.layout.gridWidth,e.layout.translateY=o,e.layout.translateX=r+this.lgRect.width+i;break;case"right":e.layout.gridWidth=t.svgWidth-this.lgRect.width-i-5,e.layout.gridHeight=s.chart.height!=="auto"?t.svgHeight:e.layout.gridWidth,e.layout.translateY=o,e.layout.translateX=r+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(e,t,s){const i=this.w,a=i.labelData.hasXaxisGroups?2:1,o=s.height+e.height+t.height,r=i.axisFlags.isMultiLineX?1.2:1.618,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=e.width,this.xAxisHeight-t.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,l=0;i.config.yaxis.forEach(g=>{h+=g.labels.minWidth,l+=g.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>l&&(this.yAxisWidth=l)}}const us=1e3,xs=6e4,Xe=36e5,De=24*Xe,kt=7*De,fs=30*De,bs=365*De,ms=10/86400,ot=[{unit:"second",step:1,approxMs:us},{unit:"second",step:5,approxMs:5e3},{unit:"second",step:15,approxMs:15e3},{unit:"second",step:30,approxMs:3e4},{unit:"minute",step:1,approxMs:xs},{unit:"minute",step:5,approxMs:3e5},{unit:"minute",step:15,approxMs:9e5},{unit:"minute",step:30,approxMs:18e5},{unit:"hour",step:1,approxMs:Xe},{unit:"hour",step:3,approxMs:3*Xe},{unit:"hour",step:6,approxMs:6*Xe},{unit:"hour",step:12,approxMs:12*Xe},{unit:"day",step:1,approxMs:De},{unit:"day",step:2,approxMs:2*De},{unit:"week",step:1,approxMs:kt},{unit:"week",step:2,approxMs:2*kt},{unit:"month",step:1,approxMs:fs},{unit:"month",step:3,approxMs:7776e6},{unit:"month",step:6,approxMs:15552e6},{unit:"year",step:1,approxMs:bs},{unit:"year",step:2,approxMs:63072e6},{unit:"year",step:5,approxMs:15768e7},{unit:"year",step:10,approxMs:31536e7},{unit:"year",step:25,approxMs:7884e8},{unit:"year",step:50,approxMs:15768e8},{unit:"year",step:100,approxMs:31536e8}];class ys{constructor(e,t){this.w=e,this.ctx=t,this.tickInterval=null,this.timeScaleArray=[],this.utc=e.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(e,t){const s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const i=t-e,a=i/De;
30s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<ms?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);const o=Number.isFinite(s.config.xaxis.tickAmount)?s.config.xaxis.tickAmount:10;this.tickInterval=(function(n,c){if((!Number.isFinite(c)||c<=0)&&(c=10),n<=0)return ot[0];const h=n/c;let l=ot[0],g=1/0;for(const p of ot){const u=Math.abs(Math.log(p.approxMs/h));u<g&&(g=u,l=p)}return l})(i,o);const r=this.generateBaseTicks(e,t,this.tickInterval);return this.timeScaleArray=r,r}generateBaseTicks(e,t,s){const i=this.w,a=new ne(i),o=this.utc,r=i.layout.gridWidth,n=t-e,c=[];let h=a.ceilToBoundary(e,s.unit,s.step,o),l=0;for(;h<=t&&l<5e3;){const g=a.getDateFields(h,o),p=n>0?(h-e)/n*r:0;c.push({timestamp:h,position:p,unit:s.unit,year:g.year,month:g.month+1,day:g.date,hour:g.hour,minute:g.minute,second:g.second,value:h}),h=a.addInterval(h,s.unit,s.step,o),l++}return c}recalcDimensionsBasedOnFormat(e){const t=this.w,s=this.formatDates(e),i=this.removeOverlappingTS(s);t.labelData.timescaleLabels=i.slice();const a=new We(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}formatDates(e){const t=this.w,s=new ne(t),i=t.config.xaxis.labels.format,a=t.config.xaxis.labels.datetimeFormatter,o=this.utc,r=(c,h=2)=>String(c).padStart(h,"0"),n=i||this._effectiveFormat(e,a);return e.map(c=>{const h=s.getDate(c.timestamp),l=s.formatDate(h,n);return{dateString:`${c.year}-${r(c.month)}-${r(c.day)}T${r(c.hour)}:${r(c.minute)}:${r(c.second)}.000${o?"Z":""}`,position:c.position,value:l,unit:c.unit,year:c.year,month:c.month}})}_effectiveFormat(e,t){if(e.length===0)return t.day||"dd MMM";const s=this.tickInterval&&this.tickInterval.unit||e[0].unit,i=t[s==="week"?"day":s]||t.day||"dd MMM",a=e[0],o=e[e.length-1],r=a.year!==o.year,n=r||a.month!==o.month||a.day!==o.day,c=/y/i.test(i),h=/M/.test(i),l=/d/i.test(i);return s==="month"||s==="week"||s==="day"?r&&!c?i+" yyyy":i:(s==="hour"||s==="minute"||s==="second")&&n&&!l&&!h?(r?"dd MMM yyyy":"dd MMM")+" "+i:i}removeOverlappingTS(e){if(e.length===0)return[];const t=this.w,s=new F(t);let i,a=!1;e[0].value&&e.every(r=>r.value.length===e[0].value.length)&&(a=!0,i=s.getTextRects(e[0].value,t.config.xaxis.labels.style.fontSize).width);let o=0;return e.map((r,n)=>{if(n===0||!t.config.xaxis.labels.hideOverlappingLabels)return r;const c=a?i:s.getTextRects(e[o].value,t.config.xaxis.labels.style.fontSize).width,h=e[o].position;return r.position>h+c+10?(o=n,r):null}).filter(r=>r!==null)}}const rt="__apexcharts_registry__";function Dt(){return globalThis[rt]}function ae(d){const e=Dt()[d];if(!e)throw new Error(`ApexCharts: chart type "${d}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return e}globalThis[rt]||(globalThis[rt]={});class ws{constructor(e,t,s){this.w=t,this.ctx=s,this.el=e}setupElements(){const{globals:e,config:t}=this.w,s=t.chart.type,i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],a=[...i,"radar","heatmap","treemap"];e.axisCharts=a.includes(s),e.xyCharts=i.includes(s),e.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(s)&&t.plotOptions.bar.horizontal,e.chartClass=`.apexcharts${e.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=B.createElementNS("http://www.w3.org/1999/xhtml","div"),F.setAttrs(this.w.dom.elWrap,{id:e.chartClass.substring(1),class:`apexcharts-canvas ${e.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(${t.chart.offsetX}, ${t.chart.offsetY})`}),this.w.dom.Paper.node.style.background=t.theme.mode!=="dark"||t.chart.background?t.theme.mode!=="light"||t.chart.background?t.chart.background:"#fff":"#343A3F",this.setSVGDimensions(),this.w.dom.elLegendForeign=B.createElementNS(U,"foreignObject"),F.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.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),t.chart.accessibility.enabled&&t.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(t.chart.accessibility.enabled){const r=this.getAccessibleChartLabel(),n=t.chart.accessibility.keyboard.enabled&&t.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:n,"aria-label":r}),t.chart.accessibility.description){const c=B.createElementNS(U,"desc");c.textContent=t.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(c,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}
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(e,t){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 c=null,h=0;this.w.seriesData.series.forEach((f,m)=>{var w,y;const v=((w=e[m])==null?void 0:w.type)==="column"?"bar":((y=e[m])==null?void 0:y.type)||(n==="column"?"bar":n),C=r;C[v]?(v==="rangeArea"?(C[v].series.push(this.w.rangeData.seriesRangeStart[m]),C[v].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[m])):C[v].series.push(f),C[v].i.push(m),v==="bar"&&(s.globals.columnSeries=r.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(v)&&(c=v),n!==v&&v!=="scatter"&&h++}),h>0&&r.bar.series.length>0&&a.plotOptions.bar.horizontal&&(h-=r.bar.series.length,r.bar={series:[],i:[]},s.globals.columnSeries={series:[],i:[]}),o.comboCharts||(o.comboCharts=h>0);const l=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(ae("line"))(i.w,i,t):null,g=r.candlestick.series.length>0||r.boxPlot.series.length>0||!o.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(ae("candlestick"))(i.w,i,t):null,p=r.violin.series.length>0||!o.comboCharts&&a.chart.type==="violin"?new(ae("violin"))(i.w,i,t):null,u=!o.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=u?new(ae("pie"))(i.w,i):null;const x=r.rangeBar.series.length>0||!o.comboCharts&&a.chart.type==="rangeBar";i.rangeBar=x?new(ae("rangeBar"))(i.w,i,t):null;let b=[];if(o.comboCharts){const f=new J(this.w);if(r.area.series.length>0&&b.push(...f.drawSeriesByGroup(r.area,o.areaGroups,"area",l)),r.bar.series.length>0)if(a.chart.stacked){const m=new(ae("barStacked"))(i.w,i,t);b.push(m.draw(r.bar.series,r.bar.i))}else i.bar=new(ae("bar"))(i.w,i,t),b.push(i.bar.draw(r.bar.series,r.bar.i));if(r.rangeArea.series.length>0&&b.push(l.draw(r.rangeArea.series,"rangeArea",r.rangeArea.i,r.rangeArea.seriesRangeEnd)),r.line.series.length>0&&b.push(...f.drawSeriesByGroup(r.line,o.lineGroups,"line",l)),r.candlestick.series.length>0&&b.push(g.draw(r.candlestick.series,"candlestick",r.candlestick.i)),r.boxPlot.series.length>0&&b.push(g.draw(r.boxPlot.series,"boxPlot",r.boxPlot.i)),r.violin.series.length>0&&b.push(p.draw(r.violin.series,"violin",r.violin.i)),r.rangeBar.series.length>0&&b.push(i.rangeBar.draw(r.rangeBar.series,r.rangeBar.i)),r.scatter.series.length>0){const m=new(ae("line"))(i.w,i,t,!0);b.push(m.draw(r.scatter.series,"scatter",r.scatter.i))}if(r.bubble.series.length>0){const m=new(ae("line"))(i.w,i,t,!0);b.push(m.draw(r.bubble.series,"bubble",r.bubble.i))}}else{const f=a.chart.type;switch(f){case"line":b=l.draw(this.w.seriesData.series,"line");break;case"area":b=l.draw(this.w.seriesData.series,"area");break;case"bar":a.chart.stacked?b=new(ae("barStacked"))(i.w,i,t).draw(this.w.seriesData.series):(i.bar=new(ae("bar"))(i.w,i,t),b=i.bar.draw(this.w.seriesData.series));break;case"candlestick":b=g.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":b=g.draw(this.w.seriesData.series,f);break;case"violin":b=p.draw(this.w.seriesData.series,"violin");break;case"rangeBar":b=i.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":b=l.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":b=new(ae("heatmap"))(i.w,i,t).draw(this.w.seriesData.series);break;case"treemap":b=new(ae("treemap"))(i.w,i).draw(this.w.seriesData.series);break;case"pie":case"donut":case"polarArea":b=i.pie.draw(this.w.seriesData.series);break;case"radialBar":b=new(ae("radialBar"))(i.w,i).draw(this.w.seriesData.series);break;case"radar":b=new(ae("radar"))(i.w,i).draw(this.w.seriesData.series);break;default:b=l.draw(this.w.seriesData.series)}}return b}setSVGDimensions(){var e;const{globals:t,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;t.svgWidth=NaN,t.svgHeight=NaN;let o=M.getDimensions(this.el);const r=i.toString().split(/[0-9]+/g).pop();r==="%"?M.isNumber(o[0])&&(o[0].width===0&&(o=M.getDimensions(this.el.parentNode)),t.svgWidth=o[0]*parseInt(i,10)/100):r!=="px"&&r!==""||(t.svgWidth=parseInt(i,10));const n=String(a).toString().split(/[0-9]+/g).pop();if(a!=="auto"&&a!=="")if(n==="%"){const c=M.getDimensions(this.el.parentNode);t.svgHeight=c[1]*parseInt(a,10)/100}else t.svgHeight=parseInt(a,10);else t.svgHeight=t.axisCharts?t.svgWidth/1.61:t.svgWidth/1.2;if(t.svgWidth=Math.max(t.svgWidth,0),t.svgHeight=Math.max(t.svgHeight,0),F.setAttrs(this.w.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),n!=="%"&&O.isBrowser()){const c=t.axisCharts&&(s.grid.show||s.dataLabels.enabled||s.xaxis.labels.show||s.xaxis.axisBorder.show||s.xaxis.axisTicks.show||s.yaxis.some(g=>g.show&&(g.labels.show||g.axisBorder.show||g.axisTicks.show))),h=s.chart.sparkline.enabled||!c?0:s.chart.parentHeightOffset,l=this.w.dom.Paper.node;(e=l.parentNode)!=null&&e.parentNode&&(l.parentNode.parentNode.style.minHeight=`${t.svgHeight+h}px`)}this.w.dom.elWrap.style.width=`${t.svgWidth}px`,this.w.dom.elWrap.style.height=`${t.svgHeight}px`}shiftGraphPosition(){const{globals:e}=this.w,{translateY:t,translateX:s}=e;F.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${t})`})}resizeNonAxisCharts(){var e,t,s,i,a,o;const{w:r}=this,n=r.config.chart.height?String(r.config.chart.height):"",c=n!==""&&n!=="auto",h=n.includes("%");let l=0,g=r.config.chart.sparkline.enabled?1:15;g+=r.config.grid.padding.bottom,["top","bottom"].includes(r.config.legend.position)&&r.config.legend.show&&!r.config.legend.floating&&(l=((t=(e=this.ctx.legend)==null?void 0:e.legendHelpers.getLegendDimensions().clwh)!=null?t:0)+7);const p=r.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),u=r.globals.pieExternalLabelMarginY||0;let x=u>0?2*r.globals.radialSize+2*u:2.05*r.globals.radialSize;const b=Math.abs(r.config.plotOptions.radialBar.endAngle-r.config.plotOptions.radialBar.startAngle);if(p&&!r.config.chart.sparkline.enabled&&b<360){const m=M.getBoundingClientRect(this.w.dom.Paper.node);let w=1/0,y=-1/0;const v=P=>{var T,I,E,X;if((T=P.classList)!=null&&T.contains("apexcharts-radialbar-hollow"))return;const z=(E=(I=P.tagName)==null?void 0:I.toLowerCase)==null?void 0:E.
30call(I);if(z==="text"||z==="tspan")return;const H=Array.from((X=P.children)!=null?X:[]);if(H.length>0)return void H.forEach(N=>v(N));const Y=M.getBoundingClientRect(P);if(Y.bottom-Y.top>0){const N=Y.top-m.top,W=Y.bottom-m.top;N<w&&(w=N),W>y&&(y=W)}};Array.from((s=p.children)!=null?s:[]).forEach(P=>v(P)),Number.isFinite(w)||(w=0),!Number.isFinite(y)&&(y=M.getBoundingClientRect(p).bottom-m.top);const C=Math.max(g,.2*r.globals.radialSize),S=Math.max(C-w,0);S!==0&&(r.layout.translateY=((i=r.layout.translateY)!=null?i:0)+S,F.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${(a=r.layout.translateX)!=null?a:0}, ${r.layout.translateY})`}),y+=S),x=y>0?y:2.05*r.globals.radialSize;const L=Math.max(C,w),A=Math.ceil(x+l+L),D=(o=r.config.chart.offsetY)!=null?o:0,k=A+Math.max(D,0);return void(h||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(k)),this.w.dom.elWrap.style.height=`${k}px`,F.setAttrs(this.w.dom.Paper.node,{height:A}),O.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${k}px`)))}const f=Math.ceil(x+this.w.layout.translateY+l+g);c||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(f)),this.w.dom.elWrap.style.height=`${f}px`,F.setAttrs(this.w.dom.Paper.node,{height:f}),O.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${f}px`))}coreCalculations(){new st(this.w).init()}resetGlobals(){const e=()=>this.w.config.series.map(()=>[]),t=new mt,{globals:s}=this.w,i={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:s.originalSeries};t.initGlobalVars(s),s.seriesXvalues=e(),s.seriesYvalues=e(),i.dataWasParsed&&(this.w.axisFlags.dataWasParsed=i.dataWasParsed,s.originalSeries=i.originalSeries)}isMultipleY(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}xySettings(){const{w:e}=this;let t=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new at(this.w).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new at(this.w).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new ys(this.w,this.ctx);let s=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?s=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(s=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(s)}t=new J(this.w).getCalculatedRatios()}return t}updateSourceChart(e){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:e,w:t}=this;if(t.config.chart.brush.enabled&&typeof t.config.chart.events.selection!="function"){const s=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];s.forEach(i=>{const a=e.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))}),t.config.chart.events.selection=(i,a)=>{s.forEach(o=>{e.constructor.getChartByID(o).ctx.updateHelpers._updateOptions({xaxis:{min:a.xaxis.min,max:a.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const e=this.w,t=e.config;if(t.chart.accessibility&&t.chart.accessibility.description)return t.chart.accessibility.description;const s=t.chart.type,i=[];if(t.title.text)i.push(`${t.title.text}. ${s} chart`),t.subtitle.text&&i.push(t.subtitle.text);else{const a=Array.isArray(e.seriesData.seriesNames)&&e.seriesData.seriesNames.length?e.seriesData.seriesNames.filter(Boolean):Array.isArray(t.series)?t.series.map(r=>typeof r=="object"&&r!==null?r.name:null).filter(Boolean):[],o=e.seriesData.series.length||(t.series?t.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 fe{constructor(e,{resetGlobals:t=()=>{},isMultipleY:s=()=>{}}={}){this.w=e,this.resetGlobals=t,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new J(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const e=this.w.config.series,t=new K(this.w);this.activeSeriesIndex=t.getActiveConfigSeriesIndex();const s=e[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&s.data[0]!==null&&s.data[0]!==void 0?s.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var e;const t=this.getFirstDataPoint();if(!t||t.x===void 0)return!1;const s=(e=this.w.config.series[this.activeSeriesIndex])==null?void 0:e.data;if(s){const i=a=>a&&a.x!==void 0;for(let a=1;a<Math.min(3,s.length)&&i(s[a])===!0;a++);}return!0}isFormat2DArray(){const e=this.getFirstDataPoint();return e&&Array.isArray(e)}handleFormat2DArray(e,t){const s=this.w.config,i=e[t].data,a=s.chart.type==="boxPlot"||s.series[t].type==="boxPlot";for(let o=0;o<i.length;o++){const r=i[o],n=r[0],c=r[1],h=r[2];if(c!==void 0&&(Array.isArray(c)&&c.length===4&&!a?this.twoDSeries.push(M.parseNumber(c[3])):r.length>=5?this.twoDSeries.push(M.parseNumber(r[4])):this.twoDSeries.push(M.parseNumber(c)),this.w.axisFlags.dataFormatXNumeric=!0),s.xaxis.type==="datetime"){const l=new Date(n).getTime();this.twoDSeriesX.push(l)}else this.twoDSeriesX.push(n);h!==void 0&&(this.threeDSeries.push(h),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(e,t){const s=this.w.config,i=this.w.globals,a=new ne(this.w),o=e[t].data;let r=t;i.collapsedSeriesIndices.indexOf(t)>-1&&(r=this.activeSeriesIndex);const n=e[r].data;for(let c=0;c<o.length;c++){const h=o[c];if(h.y!==void 0){const l=Array.isArray(h.y)?M.parseNumber(h.y[h.y.length-1]):M.parseNumber(h.y);this.twoDSeries.push(l)}this.seriesGoals[t]===void 0&&(this.seriesGoals[t]=[]),h.goals!==void 0&&Array.isArray(h.goals)?this.seriesGoals[t].push(h.goals):this.seriesGoals[t].push(null),h.z!==void 0&&(this.threeDSeries.push(h.z),this.w.axisFlags.isDataXYZ=!0)}for(let c=0;c<n.length;c++){const h=n[c].x,l=typeof h=="string",g=Array.isArray(h),p=!g&&!!a.isValidDate(h);if(l||p)if(l||s.xaxis.convertedCatToNumeric){const u=i.isBarHorizontal&&this.w.axisFlags.isRangeData;s.xaxis.type!=="datetime"||u?(this.fallbackToCategory=!0,this.twoDSeriesX.push(h),isNaN(h)||this.w.config.xaxis.type==="category"||typeof h=="string"||(this.w.axisFlags.isXNumeric=!0)):this.twoDSeriesX.push(a.parseDate(h))}else s.xaxis.type==="datetime"?this.twoDSeriesX.push(a.parseDate(h.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(h)));else g?(this.fallbackToCategory=!0,this.twoDSeriesX.push(h)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(h))}}handleRangeData(e,t){let s={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",e,t):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",e,t)),this.w.rangeData.seriesRangeStart[t]=s.start===void 0?[]:s.start,this.w.rangeData.seriesRangeEnd[t]=s.end===void 0?[]:s.end,this.w.rangeData.seriesRange[t]=s.rangeUniques,this.w.rangeData.seriesRange.forEach(i=>
30{i&&i.forEach(a=>{const o=a.y,r=o.length;if(!(r<=1))for(let n=0;n<r;n++){const c=o[n],h=c.y1,l=c.y2;for(let g=n+1;g<r;g++){const p=o[g],u=p.y1;if(h<=p.y2&&u<=l){const x=a;x.overlaps.add(c.rangeName),x.overlaps.add(p.rangeName)}}}})}),s}handleCandleStickBoxData(e,t){let s={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",e,t):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",e,t)),this.w.candleData.seriesCandleO[t]=s.o,this.w.candleData.seriesCandleH[t]=s.h,this.w.candleData.seriesCandleM[t]=s.m,this.w.candleData.seriesCandleL[t]=s.l,this.w.candleData.seriesCandleC[t]=s.c,this.w.candleData.seriesBoxPoints[t]=s.points||[],s}handleViolinData(e,t){var s,i,a,o,r,n;const c=this.w,h=e[t].data,l=[],g=[],p=[],u=[],x=[];for(let b=0;b<h.length;b++){const f=h[b],m=(a=(i=(s=f?.y)==null?void 0:s.density)!=null?i:f?.[1])!=null?a:[],w=(n=(r=(o=f?.y)==null?void 0:o.points)!=null?r:f?.[2])!=null?n:[],y=[],v=[];let C=0,S=null,L=1/0,A=-1/0;for(let k=0;k<m.length;k++){const P=M.parseNumber(m[k][0]),T=M.parseNumber(m[k][1]);P!==null&&T!==null&&(y.push(P),v.push(T),T>C&&(C=T,S=P),P<L&&(L=P),P>A&&(A=P))}const D=[];for(let k=0;k<w.length;k++){const P=M.parseNumber(w[k]);P!==null&&(D.push(P),P<L&&(L=P),P>A&&(A=P))}l.push({values:y,weights:v,maxWeight:C}),g.push(D),p.push(L===1/0?0:L),u.push(A===-1/0?0:A),x.push(S!==null?S:D.length?D[Math.floor(D.length/2)]:0)}c.violinData.seriesViolinDensity[t]=l,c.violinData.seriesViolinPoints[t]=g,c.violinData.seriesViolinMin[t]=p,c.violinData.seriesViolinMax[t]=u,this.twoDSeries=x}
30handleRangeDataFormat(e,t,s){const i=[],a=[],o=new Map,r=[];if(t[s].data.forEach(n=>{if(!o.has(n.x)){const c={x:n.x,overlaps:new Set,y:[]};o.set(n.x,c),r.push(c)}}),e==="array")for(let n=0;n<t[s].data.length;n++)Array.isArray(t[s].data[n])?(i.push(t[s].data[n][1][0]),a.push(t[s].data[n][1][1])):(i.push(t[s].data[n]),a.push(t[s].data[n]));else if(e==="xy")for(let n=0;n<t[s].data.length;n++){const c=Array.isArray(t[s].data[n].y),h=M.randomId(),l=t[s].data[n].x,g={y1:c?t[s].data[n].y[0]:t[s].data[n].y,y2:c?t[s].data[n].y[1]:t[s].data[n].y,rangeName:h};t[s].data[n].rangeName=h;const p=o.get(l);p&&p.y.push(g),i.push(g.y1),a.push(g.y2)}return{start:i,end:a,rangeUniques:r}}handleCandleStickBoxDataFormat(e,t,s){const i=this.w,a=i.config.chart.type==="boxPlot"||i.config.series[s].type==="boxPlot",o=[],r=[],n=[],c=[],h=[],l=[],g=t[s].data;let p;e==="array"?p=a&&g[0].length===6||!a&&g[0].length===5?u=>u.slice(1):u=>Array.isArray(u[1])?u[1]:[]:p=u=>Array.isArray(u.y)?u.y:[];for(let u=0;u<g.length;u++){const x=p(g[u]);x&&x.length>=2&&(o.push(x[0]),r.push(x[1]),a?(n.push(x[2]),c.push(x[3]),h.push(x[4])):(c.push(x[2]),h.push(x[3])));const b=g[u]&&g[u].points;l.push(Array.isArray(b)?b:[])}return{o,h:r,m:n,l:c,c:h,points:l}}parseDataAxisCharts(e){var t,s,i,a,o,r;const n=this.w.config,c=this.w.globals,h=new ne(this.w),l=n.labels.length>0?n.labels.slice():n.xaxis.categories.slice();this.w.axisFlags.isRangeBar=n.chart.type==="rangeBar"&&c.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),e.forEach((x,b)=>{x.name!==void 0?this.w.seriesData.seriesNames.push(x.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(b+1),10))}),this.coreUtils.setSeriesYAxisMappings();const g=[],p=[...new Set(n.series.map(x=>x.group))];n.series.forEach((x,b)=>{const f=p.indexOf(x.group);g[f]||(g[f]=[]),g[f].push(this.w.seriesData.seriesNames[b])}),this.w.labelData.seriesGroups=g;const u=()=>{for(let x=0;x<l.length;x++)if(typeof l[x]=="string"){if(!h.isValidDate(l[x]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");this.twoDSeriesX.push(h.parseDate(l[x]))}else this.twoDSeriesX.push(l[x])};for(let x=0;x<e.length;x++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],e[x].data===void 0)return;const b=n.chart.dataReducer,f=(s=(t=c.dataReducerRawSeries)==null?void 0:t[x])==null?void 0:s.data;if(b?.enabled&&this.isMultiFormat()&&Array.isArray(f)&&f.length>((i=b.threshold)!=null?i:500)){const m=(a=b.targetPoints)!=null?a:250,w=n.xaxis.min,y=n.xaxis.max,v=w==null&&y==null?f:fe.sliceByXRange(f,w,y);let C=v;if(v.length>m){const S=Array.isArray(v[0])?(r=v[0])==null?void 0:r[1]:(o=v[0])==null?void 0:o.y;Array.isArray(S)?S.length===4?C=fe.ohlcAggregate(v,m):S.length===2&&(C=fe.rangeAggregate(v,m)):C=fe.lttbDownsample(v,m)}e[x]=G($({},e[x]),{data:C})}if(n.chart.type!=="rangeBar"&&n.chart.type!=="rangeArea"&&e[x].type!=="rangeBar"&&e[x].type!=="rangeArea"||(this.w.axisFlags.isRangeData=!0,this.handleRangeData(e,x)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,x):this.isFormatXY()&&this.handleFormatXY(e,x),n.chart.type!=="candlestick"&&e[x].type!=="candlestick"&&n.chart.type!=="boxPlot"&&e[x].type!=="boxPlot"||this.handleCandleStickBoxData(e,x),n.chart.type!=="violin"&&e[x].type!=="violin"||this.handleViolinData(e,x),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,x!==this.activeSeriesIndex||this.fallbackToCategory||(this.w.axisFlags.isXNumeric=!0);else{n.xaxis.type==="datetime"?(this.w.axisFlags.isXNumeric=!0,u(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):n.xaxis.type==="numeric"&&(this.w.axisFlags.isXNumeric=!0,l.length>0&&(this.twoDSeriesX=l,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const m=e[x].data.map(w=>M.parseNumber(w));this.w.seriesData.series.push(m)}
30this.w.seriesData.seriesZ.push(this.threeDSeries),e[x].color!==void 0?this.w.seriesData.seriesColors.push(e[x].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(e){const t=this.w.config,s=Array.isArray(e)&&e.every(a=>typeof a=="number")&&t.labels.length>0;if(Array.isArray(e)&&e.some(a=>a&&typeof a=="object"&&a.data||a&&typeof a=="object"&&a.parsing),s){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=t.labels.slice();for(let a=0;a<this.w.seriesData.series.length;a++)this.w.seriesData.seriesNames[a]===void 0&&this.w.seriesData.seriesNames.push("series-"+(a+1));return this.w}if(Array.isArray(e)&&e.every(a=>typeof a=="number")){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=[];for(let a=0;a<this.w.seriesData.series.length;a++)this.w.seriesData.seriesNames.push(t.labels[a]||`series-${a+1}`);return this.w}const i=this.extractPieDataFromSeries(e);this.w.seriesData.series=i.values,this.w.seriesData.seriesNames=i.labels,t.chart.type==="radialBar"&&(this.w.seriesData.series=this.w.seriesData.series.map(a=>M.parseNumber(a)));for(let a=0;a<this.w.seriesData.series.length;a++)this.w.seriesData.seriesNames[a]===void 0&&this.w.seriesData.seriesNames.push("series-"+(a+1));return this.w}resetParsingFlags(){const e=this.w;e.axisFlags.dataWasParsed=!1,e.globals.originalSeries=null,e.config.series&&e.config.series.forEach(t=>{t.__apexParsed&&delete t.__apexParsed})}extractPieDataFromSeries(e){const t=[],s=[];if(!Array.isArray(e))return{values:[],labels:[]};if(e.length===0)return{values:[],labels:[]};const i=e[0];return typeof i=="object"&&i!==null&&i.data?(this.extractPieDataFromSeriesObjects(e,t,s),{values:t,labels:s}):{values:[],labels:[]}}extractPieDataFromSeriesObjects(e,t,s){e.forEach((i,a)=>{i.data&&Array.isArray(i.data)&&i.data.forEach(o=>{typeof o=="object"&&o!==null&&o.x!==void 0&&o.y!==void 0&&(s.push(String(o.x)),t.push(M.parseNumber(o.y)))})})}handleExternalLabelsData(e){const t=this.w.config;if(t.xaxis.categories.length>0)this.w.labelData.labels=t.xaxis.categories;else if(t.labels.length>0)this.w.labelData.labels=t.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())}}t.xaxis.convertedCatToNumeric&&(new Ee(t).convertCatToNumericXaxis(t,this.w.seriesData.seriesX[0]),this._generateExternalLabels(e))}else this._generateExternalLabels(e)}_generateExternalLabels(e){const t=this.w.globals,s=this.w.config;let i=[];if(t.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const a=s.series.map(r=>{const n=new Map;for(const c of r.data)n.has(c.x)||n.set(c.x,c);return Array.from(n.values())}),o=a.reduce((r,n,c,h)=>h[r].length>n.length?r:c,0);for(let r=0;r<a[o].length;r++)i.push(r+1)}else for(let a=0;a<this.w.seriesData.series[t.maxValsInArrayIndex].length;a++)i.push(a+1);this.w.seriesData.seriesX=[];for(let a=0;a<e.length;a++)this.w.seriesData.seriesX.push(i);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(i.length===0){i=t.axisCharts?[]:this.w.seriesData.series.map((a,o)=>o+1);for(let a=0;a<e.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(e){const t=this.w.config,s=this.w.globals,i=t.parsing;if(this.w.axisFlags.dataWasParsed||!i&&!e.some(o=>o.parsing))return e;const a=e.map((o,r)=>{var n,c,h;if(!o.data||!Array.isArray(o.data)||o.data.length===0)return o;const l={x:((n=o.parsing)==null?void 0:n.x)||i?.x,y:((c=o.parsing)==null?void 0:c.y)||i?.y,z:((h=o.parsing)==null?void 0:h.z)||i?.z};if(!l.x&&!l.y)return o;const g=o.data[0];if(typeof g=="object"&&g!==null&&(Object.prototype.hasOwnProperty.call(g,"x")||Object.prototype.hasOwnProperty.call(g,"y"))||Array.isArray(g)||!l.x||!l.y||Array.isArray(l.y)&&l.y.length===0)return o;const p=o.data.map((u,x)=>{if(typeof u!="object"||u===null)return u;const b=this.getNestedValue(u,l.x);let f,m;if(Array.isArray(l.y)){const y=l.y.map(v=>this.getNestedValue(u,v));this.w.config.chart.type==="bubble"?(y.length,f=y[0]):f=y}
30else f=this.getNestedValue(u,l.y);l.z&&(m=this.getNestedValue(u,l.z));const w={x:b,y:f,z:void 0};if(this.w.config.chart.type==="bubble"&&Array.isArray(l.y)&&l.y.length===2){const y=this.getNestedValue(u,l.y[1]);y!==void 0&&(w.z=y)}return m!==void 0&&(w.z=m),w});return G($({},o),{data:p,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=M.clone(e)),a}getNestedValue(e,t){if(!e||typeof e!="object"||!t)return;if(t.indexOf(".")===-1)return e[t];const s=t.split(".");let i=e;for(let a=0;a<s.length;a++){if(i==null||typeof i!="object")return;i=i[s[a]]}return i}expandScatterJitterData(e){var t,s;const i=this.w.config,a=i.chart.type==="scatter"||i.chart.type==="bubble",o=(s=(t=i.plotOptions)==null?void 0:t.scatter)==null?void 0:s.jitter;if(!(a&&o&&o.enabled&&Array.isArray(e)))return e;if(!e.some(l=>Array.isArray(l?.data)&&l.data.some(g=>g&&!Array.isArray(g)&&Array.isArray(g.y))))return i.xaxis.type!=="datetime"&&Array.isArray(i.xaxis.categories)&&i.xaxis.categories.length&&this._applyBandAxis(i.xaxis.categories.slice()),e;const r=[],n=new Map;e.forEach(l=>{Array.isArray(l?.data)&&l.data.forEach(g=>{if(g&&Array.isArray(g.y)){const p=String(g.x);n.has(p)||(n.set(p,r.length),r.push(g.x))}})});const c=o.maxPoints||5e3,h=e.map(l=>{if(!Array.isArray(l?.data))return l;const g=[];return l.data.forEach(p=>{if(p&&Array.isArray(p.y)){const u=n.get(String(p.x)),x=p.y,b=x.length>c?Math.ceil(x.length/c):1;for(let f=0;f<x.length;f+=b){const m=M.parseNumber(x[f]);m!==null&&g.push({x:u,y:m})}}else if(p&&typeof p=="object"&&!Array.isArray(p)){const u=String(p.x);g.push({x:n.has(u)?n.get(u):p.x,y:p.y})}else g.push(p)}),G($({},l),{data:g})});return this._applyBandAxis(r),h}_applyBandAxis(e){const t=this.w.config.xaxis,s=e.length;if(!s)return;const i=t._scatterBand=t._scatterBand||{};t.type="numeric",(t.min==null||i.min)&&(t.min=-1,i.min=!0),(t.max==null||i.max)&&(t.max=s,i.max=!0),(t.tickAmount==null||t.tickAmount==="dataPoints"||i.tick)&&(t.tickAmount=s+1,i.tick=!0),t.labels=t.labels||{};const a=t.labels.formatter;if(typeof a!="function"||a._scatterBand){const o=r=>{const n=Math.round(r);return Math.abs(r-n)<1e-6&&e[n]!==void 0?e[n]:""};o._scatterBand=!0,t.labels.formatter=o}}parseData(e){var t,s,i,a,o,r;const n=this.w,c=n.config,h=n.globals;if(e=this.parseRawDataIfNeeded(e),e=this.expandScatterJitterData(e),((t=c.chart.dataReducer)==null?void 0:t.enabled)&&h.axisCharts&&!h.dataReducerRawSeries){h.dataReducerRawSeries=e.map(u=>({data:Array.isArray(u?.data)?u.data.slice():u?.data}));let g=1/0,p=-1/0;for(const u of e){const x=u?.data;if(!Array.isArray(x)||x.length===0)continue;const b=!Array.isArray(x[0]),f=b?(s=x[0])==null?void 0:s.x:(i=x[0])==null?void 0:i[0],m=b?(a=x[x.length-1])==null?void 0:a.x:(o=x[x.length-1])==null?void 0:o[0];typeof f=="number"&&(g=Math.min(g,f)),typeof m=="number"&&(p=Math.max(p,m))}g!==1/0&&(h.dataReducerRawMinX=g,h.dataReducerRawMaxX=p)}if(c.series=e,h.dataReducerRawSeries&&((r=c.chart.dataReducer)==null?void 0:r.enabled)){const g=h.dataReducerRawSeries;h.initialSeries=e.map((p,u)=>{var x,b,f;return G($({},p),{data:(f=(b=(x=g[u])==null?void 0:x.data)==null?void 0:b.slice())!=null?f:p.data})})}else h.initialSeries=M.clone(e);if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),h.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),c.chart.stacked){const g=new K(this.w);this.w.seriesData.series=g.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),h.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&&(c.xaxis.type!=="numeric"||c.labels.length!==0||c.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);const l=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let g=0;g<l.length;g++)if(Array.isArray(l[g])){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:h.initialSeries,originalSeries:h.originalSeries,stackedSeriesTotals:this.w.seriesData.stackedSeriesTotals,stackedSeriesTotalsByGroups:this.w.seriesData.stackedSeriesTotalsByGroups,noLabelsProvi
30ded:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC,seriesBoxPoints:this.w.candleData.seriesBoxPoints},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static sliceByXRange(e,t,s){const i=e.length;if(i===0)return e;const a=Array.isArray(e[0])?n=>n[0]:n=>n.x;let o=0;if(t!=null){let n=0,c=i-1;for(;n<=c;){const h=n+c>>1;a(e[h])<t?n=h+1:c=h-1}o=Math.max(0,n-1)}let r=i;if(s!=null){let n=0,c=i-1;for(;n<=c;){const h=n+c>>1;a(e[h])>s?c=h-1:n=h+1}r=Math.min(i,n+1)}return o===0&&r===i?e.slice():e.slice(o,r)}static lttbDownsample(e,t){const s=e.length;if(t>=s||t<3)return e;const i=!Array.isArray(e[0]),a=i?h=>h.x:h=>h[0],o=i?h=>h.y:h=>h[1],r=[];r.push(e[0]);const n=(s-2)/(t-2);let c=0;for(let h=0;h<t-2;h++){const l=Math.floor((h+1)*n)+1,g=Math.min(Math.floor((h+2)*n)+1,s);let p=0,u=0;const x=g-l;for(let C=l;C<g;C++)p+=a(e[C]),u+=o(e[C]);p/=x,u/=x;const b=Math.floor(h*n)+1,f=Math.min(Math.floor((h+1)*n)+1,s),m=a(e[c]),w=o(e[c]);let y=-1,v=b;for(let C=b;C<f;C++){const S=.5*Math.abs((m-p)*(o(e[C])-w)-(m-a(e[C]))*(u-w));S>y&&(y=S,v=C)}r.push(e[v]),c=v}return r.push(e[s-1]),r}static ohlcAggregate(e,t){const s=e.length;if(t>=s||t<1)return e;const i=!Array.isArray(e[0]),a=i?h=>h.x:h=>h[0],o=i?h=>h.y:h=>h[1],r=i?(h,l)=>({x:h,y:l}):(h,l)=>[h,l],n=[],c=s/t;for(let h=0;h<t;h++){const l=Math.floor(h*c),g=h===t-1?s:Math.floor((h+1)*c);if(g<=l)continue;const p=o(e[l]),u=p[0];let x=p[1],b=p[2],f=p[3];for(let m=l+1;m<g;m++){const w=o(e[m]);w[1]>x&&(x=w[1]),w[2]<b&&(b=w[2]),f=w[3]}n.push(r(a(e[l]),[u,x,b,f]))}return n}static rangeAggregate(e,t){const s=e.length;if(t>=s||t<1)return e;const i=!Array.isArray(e[0]),a=i?h=>h.x:h=>h[0],o=i?h=>h.y:h=>h[1],r=i?(h,l)=>({x:h,y:l}):(h,l)=>[h,l],n=[],c=s/t;for(let h=0;h<t;h++){const l=Math.floor(h*c),g=h===t-1?s:Math.floor((h+1)*c);if(g<=l)continue;let p=1/0,u=-1/0;for(let x=l;x<g;x++){const b=o(e[x]);if(b!=null)for(let f=0;f<2;f++){const m=b[f];m!=null&&isFinite(m)&&(m<p&&(p=m),m>u&&(u=m))}}n.push(r(a(e[l]),p===1/0?[null,null]:[p,u]))}return n}excludeCollapsedSeriesInYAxis(){const e=this.w,t=[];e.globals.seriesYAxisMap.forEach((s,i)=>{let a=0;s.forEach(o=>{e.globals.collapsedSeriesIndices.indexOf(o)!==-1&&a++}),a>0&&a==s.length&&t.push(i)}),e.globals.ignoreYAxisIndexes=t.map(s=>s)}}class vs{constructor(e,t){this.w=e,this.ctx=t}_updateOptions(e,t=!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,c)=>{var h,l;const g=n.w;if(g.globals.shouldAnimate=s,t||(g.globals.resized=!0,g.globals.dataChanged=!0,s&&n.series.getPreviousPaths()),s&&e&&typeof e=="object"){const p=(h=e?.chart)==null?void 0:h.type,u=g.config.chart.requestedType||g.config.chart.type;p&&p!==u&&((l=n.morphTypeChange)==null||l.captureBeforeDestroy({fromType:u,toType:p,newSeries:e.series||g.config.series}))}if(e&&typeof e=="object"){n.config=new Fe(e);const p=e.chart&&e.chart.type,u=p==="funnel"||p==="pyramid"||p==="gauge",x=!!g.config.chart.requestedType;if(p&&!u&&x){e.chart=e.chart||{},e.chart.requestedType=p;const b=g.config.chart.requestedType;b!=="funnel"&&b!=="pyramid"||(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel===void 0&&(e.plotOptions.bar.isFunnel=!1),e.plotOptions.bar.isPyramid===void 0&&(e.plotOptions.bar.isPyramid=!1))}if(n.config.normalizeAliasedChartType(e),e=J.extendArrayProps(n.config,e,g),n.w.globals.chartID!==this.w.globals.chartID&&delete e.series,g.config=M.extend(g.config,e),a&&(g.globals.lastXAxis=e.xaxis?M.clone(e.xaxis):[],g.globals.lastYAxis=e.yaxis?M.
30clone(e.yaxis):[],g.globals.initialConfig=M.extend({},g.config),g.globals.initialSeries=M.clone(g.config.series),e.series)){for(let b=0;b<g.globals.collapsedSeriesIndices.length;b++){const f=g.config.series[g.globals.collapsedSeriesIndices[b]];g.globals.collapsedSeries[b].data=g.globals.axisCharts?f.data.slice():f}for(let b=0;b<g.globals.ancillaryCollapsedSeriesIndices.length;b++){const f=g.config.series[g.globals.ancillaryCollapsedSeriesIndices[b]];g.globals.ancillaryCollapsedSeries[b].data=g.globals.axisCharts?f.data.slice():f}n.series.emptyCollapsedSeries(g.config.series)}}return n.update(e).then(()=>{c===r.length-1&&o(n)})})})}_updateSeries(e,t,s=!1){return new Promise(i=>{const a=this.w;a.globals.shouldAnimate=t,a.globals.dataChanged=!0,tt.invalidateSelectors(a),t&&this.ctx.series.getPreviousPaths();const o=a.config.series.length;a.globals.dataReducerRawSeries=null,this.ctx.data.resetParsingFlags();const r=this.ctx.data.parseData(e);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=M.clone(a.config.series)),a.globals.initialSeries=M.clone(a.config.series)),this._canUseFastPath(e,o,a)?this.ctx.fastUpdate(t).then(()=>{i(this.ctx)}):this.ctx.update().then(()=>{i(this.ctx)})})}_canUseFastPath(e,t,s){return!!s.dom.elGraphical&&!!s.globals.axisCharts&&e.length===t&&!(s.globals.collapsedSeries.length>0)&&!(s.globals.ancillaryCollapsedSeries.length>0)&&!(s.globals.risingSeries.length>0)&&!s.globals.comboCharts&&!s.interact.zoomed}_extendSeries(e,t){const s=this.w,i=s.config.series[t];return G($({},s.config.series[t]),{name:e.name?e.name:i?.name,color:e.color?e.color:i?.color,type:e.type?e.type:i?.type,group:e.group?e.group:i?.group,hidden:e.hidden!==void 0?e.hidden:i?.hidden,data:e.data?e.data:i?.data,zIndex:e.zIndex!==void 0?e.zIndex:t})}toggleDataPointSelection(e,t){const s=this.w;let i=null;const a=`.apexcharts-series[data\\:realIndex='${e}']`;return s.globals.axisCharts?i=s.dom.Paper.findOne(`${a} path[j='${t}'], ${a} circle[j='${t}'], ${a} rect[j='${t}']`):t===void 0&&(i=s.dom.Paper.findOne(`${a} path[j='${e}']`),s.config.chart.type!=="pie"&&s.config.chart.type!=="polarArea"&&s.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),i?(new F(this.w).pathMouseDown(i,null),i.node?i.node:null):null}forceXAxisUpdate(e){const t=this.w;return["min","max"].forEach(s=>{e.xaxis[s]!==void 0&&(t.config.xaxis[s]=e.xaxis[s],t.globals.lastXAxis[s]=e.xaxis[s])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric&&(e=new Ee(e).convertCatToNumericXaxis(e,this.ctx)),e}forceYAxisUpdate(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach((t,s)=>{e.yaxis[s].min=0,e.yaxis[s].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}revertDefaultAxisMinMax(e){const t=this.w;let s=t.globals.lastXAxis,i=t.globals.lastYAxis;e&&e.xaxis&&(s=e.xaxis),e&&e.yaxis&&(i=e.yaxis);const a=s;t.config.xaxis.min=a.min,t.config.xaxis.max=a.max;const o=r=>{if(i[r]!==void 0){const n=i[r];t.config.yaxis[r].min=n.min,t.config.yaxis[r].max=n.max}};t.config.yaxis.map((r,n)=>{t.interact.zoomed||i[n]!==void 0?o(n):this.ctx.opts.yaxis[n]!==void 0&&(r.min=this.ctx.opts.yaxis[n].min,r.max=this.ctx.opts.yaxis[n].max)})}}class Lt{constructor(e){this.w=e.w,this.ttCtx=e}getNearestValues({hoverArea:e,elGrid:t,clientX:s,clientY:i}){var a,o;const r=this.w,n=t.getBoundingClientRect(),c=n.width,h=n.height;let l=c/(r.globals.dataPoints-1);const g=h/r.globals.dataPoints,p=this.hasBars();!r.globals.comboCharts&&!p||r.config.xaxis.convertedCatToNumeric||(l=c/r.globals.dataPoints);const u=s-n.left-r.globals.barPadForNumericAxis,x=i-n.top;u<0||x<0||u>c||x>h?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.interact.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.interact.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));let b=Math.round(u/l);const f=Math.floor(x/g);p&&!r.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(u/l),b-=1);let m=null,w=null,y=r.globals.seriesXvalues.map(C=>C.filter(S=>M.isNumber(S)));const v=r.globals.seriesYvalues.map(C=>C.filter(S=>M.isNumber(S)));if(r.axisFlags.isXNumeric){const C=this.ttCtx.getElGrid();if(!C)return{hoverX:u,hoverY:x};const S=C.getBoundingClientRect(),L=u*(S.width/c),A=x*(S.height/h);w=this.closestInMultiArray(L,A,y,v),m=w.index,b=(a=w.j)!=null?a:0,m!==null&&r.globals.hasNullValues&&(y=r.globals.seriesXvalues[m],w=this.closestInArray(L,y),b=(o=w.j)!=null?o:0)}return r.interact.capturedSeriesIndex=m===null?-1:m,(!b||b<1)&&(b=0),r.globals.isBarHorizontal?r.interact.capturedDataPointIndex=f:r.interact.capturedDataPointIndex=b,{c
30apturedSeries:m,j:r.globals.isBarHorizontal?f:b,hoverX:u,hoverY:x}}getFirstActiveXArray(e){const t=this.w;let s=0;const i=e.map((a,o)=>a.length>0?o:-1);for(let a=0;a<i.length;a++)if(i[a]!==-1&&t.globals.collapsedSeriesIndices.indexOf(a)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(a)===-1){s=i[a];break}return s}closestInMultiArray(e,t,s,i){const a=this.w,o=g=>a.globals.collapsedSeriesIndices.indexOf(g)===-1&&a.globals.ancillaryCollapsedSeriesIndices.indexOf(g)===-1,r=a.config.chart.type,n=!a.globals.comboCharts&&(r==="line"||r==="area");let c=1/0,h=null,l=null;if(a.globals.allSeriesHasEqualX){let g=1/0;for(let p=0;p<s.length;p++){if(!o(p))continue;const u=s[p],x=i[p],b=Math.min(u.length,x.length);for(let f=0;f<b;f++){const m=Math.abs(e-u[f]);m<g&&(g=m,l=f)}}if(l!==null)if(n){let p=1/0;for(let u=0;u<s.length;u++){if(!o(u))continue;const x=s[u],b=i[u],f=Math.min(x.length,b.length);if(f<2){const m=b[l];if(typeof m!="number")continue;const w=Math.abs(t-m);w<p&&(p=w,h=u);continue}for(let m=0;m<f-1;m++){const w=this._distanceToSegment(e,t,x[m],b[m],x[m+1],b[m+1]);w.dist<p&&(p=w.dist,h=u)}}}else{let p=1/0;for(let u=0;u<s.length;u++){if(!o(u))continue;const x=i[u][l];if(typeof x!="number")continue;const b=Math.abs(t-x);b<p&&(p=b,h=u)}}return{index:h,j:l}}for(let g=0;g<s.length;g++){if(!o(g))continue;const p=s[g],u=i[g],x=Math.min(p.length,u.length);if(n&&x>=2)for(let b=0;b<x-1;b++){const f=this._distanceToSegment(e,t,p[b],u[b],p[b+1],u[b+1]);f.dist<c&&(c=f.dist,h=g,l=f.t<.5?b:b+1)}else for(let b=0;b<x;b++){const f=e-p[b],m=t-u[b],w=Math.sqrt(f*f+m*m);w<c&&(c=w,h=g,l=b)}}return{index:h,j:l}}_distanceToSegment(e,t,s,i,a,o){const r=a-s,n=o-i,c=r*r+n*n;let h=c===0?0:((e-s)*r+(t-i)*n)/c;h<0?h=0:h>1&&(h=1);const l=e-(s+h*r),g=t-(i+h*n);return{dist:Math.sqrt(l*l+g*g),t:h}}closestInArray(e,t){const s=t[0];let i=null,a=Math.abs(e-s);for(let o=0;o<t.length;o++){const r=Math.abs(e-t[o]);r<a&&(a=r,i=o)}return{j:i}}isXoverlap(e){const t=[],s=this.w.seriesData.seriesX.filter(i=>i[0]!==void 0);if(s.length>0)for(let i=0;i<s.length-1;i++)s[i][e]!==void 0&&s[i+1][e]!==void 0&&s[i][e]!==s[i+1][e]&&t.push("unEqual");return t.length===0}isInitialSeriesSameLen(){var e,t,s;let i=!0;const a=((e=this.w.globals.initialSeries)==null?void 0:e.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(!((t=a[o])!=null&&t.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(e){return[...e].reduce((t,s)=>t+s.getBBox().height,0)}getElMarkers(e){return typeof e=="number"?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}getAllMarkers(e=!1){let t=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")];e&&(t=t.filter(i=>{const a=Number(i.getAttribute("data:realIndex"));return this.w.globals.collapsedSeriesIndices.indexOf(a)===-1})),t.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 t.forEach(i=>{s.push(i.querySelector(".apexcharts-marker"))}),s}hasMarkers(e){return this.getElMarkers(e).length>0}getPathFromPoint(e,t){const s=Number(e.getAttribute("cx")),i=Number(e.getAttribute("cy")),a=e.getAttribute("shape");return new F(this.w).getMarkerPath(s,i,a,t)}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(e){const t=this.w;let s=t.config.markers.hover.size;return s===void 0&&(s=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(e){const t=this.w,s=this.ttCtx;s.allTooltipSeriesGroups.length===0&&(s.allTooltipSeriesGroups=t.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const i=s.allTooltipSeriesGroups;for(let a=0;a<i.length;a++)e==="enable"?(i[a].classList.add("apexcharts-active"),i[a].style.display=t.config.tooltip.items.display):(i[a].classList.remove("apexcharts-active"),i[a].style.display="none")}}class As{constructor(e){this.w=e.w,this.ttCtx=e,this.tooltipUtil=new Lt(e)}drawSeriesTexts({shared:e=!0,ttItems:t,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(e,s);const c=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:c,ttItems:t,shared:e,e:r});const h=this.ttCtx.getElTooltip();h&&(this.ttCtx.tooltipRect.ttWidth=h.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=h.getBoundingClientRect().height)}printLabels({i:e,j:t,values:s,ttItems:i,shared:a,e:o}){const r=this.w,{xVal:n,zVal:c,xAxisTTVal:h}=s,l=r.seriesData.series.length,g=t!==null&&r.config.plotOptions.bar.distributed?r.globals.colors[t]:r.globals.colors[e];for(let p=0;p<l;p++){const u=r.config.tooltip.inverseOrder?l-1-p:p,x=this.computeSeriesRow({i:e,j:t,t:p,tIndex:u,shared:a,e:o,basePColor:g});this.DOMHandling({i:e,t:u,j:t,ttItems:i,values:{val:x.val,goalVals:x.goalVals,xVal:n,xAxisTTVal:h,zVal:c},seriesName:x.seriesName,shared:a,pColor:x.pColor})}}computeSeriesRow({i:e,j:t,tIndex:s,shared:i,e:a,basePColor:o}){const r=this.w;let n,c=this.getFormatters(e),h=o,l=[],g=r.config.chart.type==="treemap"?c.yLbTitleFormatter(String(r.config.series[e].data[t].x),{series:r.seriesData.series,seriesIndex:e,dataPointIndex:t,w:r}
30):this.getSeriesName({fn:c.yLbTitleFormatter,index:e,seriesIndex:e,j:t});return r.globals.axisCharts&&(i?(c=this.getFormatters(s),g=this.getSeriesName({fn:c.yLbTitleFormatter,index:s,seriesIndex:e,j:t}),h=r.globals.colors[s],n=this.formatYValue(c,s,t),l=this.formatGoalVals(c,s,t)):(h=this.resolvePatternColor(a,h),n=this.formatYValue(c,e,t),l=this.formatGoalVals(c,e,t))),t===null&&(n=c.yLbFormatter(r.seriesData.series[e],G($({},r),{seriesIndex:e,dataPointIndex:e}))),{seriesName:g,val:n,goalVals:l,pColor:h}}formatYValue(e,t,s){var i,a,o,r;const n=this.w;return n.axisFlags.isRangeData?e.yLbFormatter((a=(i=n.rangeData.seriesRangeStart)==null?void 0:i[t])==null?void 0:a[s],{series:n.rangeData.seriesRangeStart,seriesIndex:t,dataPointIndex:s,w:n})+" - "+e.yLbFormatter((r=(o=n.rangeData.seriesRangeEnd)==null?void 0:o[t])==null?void 0:r[s],{series:n.rangeData.seriesRangeEnd,seriesIndex:t,dataPointIndex:s,w:n}):e.yLbFormatter(n.seriesData.series[t][s],{series:n.seriesData.series,seriesIndex:t,dataPointIndex:s,w:n})}formatGoalVals(e,t,s){var i;const a=this.w,o=(i=a.seriesData.seriesGoals[t])==null?void 0:i[s];return Array.isArray(o)?o.map(r=>({attrs:r,val:e.yLbFormatter(r.value,{seriesIndex:t,dataPointIndex:s,w:a})})):[]}resolvePatternColor(e,t){var s,i,a;const o=this.w,r=(s=e?.target)==null?void 0:s.getAttribute("fill");if(!r)return t;if(r.indexOf("url")===-1)return r;if(r.indexOf("Pattern")===-1)return t;const n=o.dom.baseEl.querySelector(r.substr(4).slice(0,-1));return(a=(i=n?.childNodes[0])==null?void 0:i.getAttribute("stroke"))!=null?a:t}getFormatters(e){const t=this.w;let s,i=t.formatters.yLabelFormatters[e];return t.formatters.ttVal!==void 0?Array.isArray(t.formatters.ttVal)?(i=t.formatters.ttVal[e]&&t.formatters.ttVal[e].formatter,s=t.formatters.ttVal[e]&&t.formatters.ttVal[e].title&&t.formatters.ttVal[e].title.formatter):(i=t.formatters.ttVal.formatter,typeof t.formatters.ttVal.title.formatter=="function"&&(s=t.formatters.ttVal.title.formatter)):s=t.config.tooltip.y.title.formatter,typeof i!="function"&&(i=t.formatters.yLabelFormatters[0]?t.formatters.yLabelFormatters[0]:function(a){return a}),typeof s!="function"&&(s=function(a){return a?a+": ":""}),{yLbFormatter:i,yLbTitleFormatter:s}}getSeriesName({fn:e,index:t,seriesIndex:s,j:i}){const a=this.w;return e(String(a.seriesData.seriesNames[t]),{series:a.seriesData.series,seriesIndex:s,dataPointIndex:i,w:a})}DOMHandling({t:e,j:t,ttItems:s,values:i,seriesName:a,shared:o,pColor:r}){const n=this.w,c=this.ttCtx,{val:h,goalVals:l,xVal:g,xAxisTTVal:p,zVal:u}=i;if(!s||!s[e])return;let x=null;x=s[e].children,n.config.tooltip.fillSeriesColor&&(s[e].style.backgroundColor=r,x[0].style.display="none"),c.showTooltipTitle&&(c.tooltipTitle===null&&(c.tooltipTitle=n.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle&&(c.tooltipTitle.innerHTML=g)),c.isXAxisTooltipEnabled&&c.xaxisTooltipText&&(c.xaxisTooltipText.innerHTML=p!==""?p:g);const b=s[e].querySelector(".apexcharts-tooltip-text-y-label");b&&(b.innerHTML=a||"");const f=s[e].querySelector(".apexcharts-tooltip-text-y-value");f&&(f.innerHTML=h!==void 0?h:""),x[0]&&x[0].classList.contains("apexcharts-tooltip-marker")&&(n.config.tooltip.marker.fillColors&&Array.isArray(n.config.tooltip.marker.fillColors)&&(r=n.config.tooltip.marker.fillColors[e]),n.config.tooltip.fillSeriesColor?x[0].style.backgroundColor=r:x[0].style.color=r),n.config.tooltip.marker.show||(x[0].style.display="none");const m=s[e].querySelector(".apexcharts-tooltip-text-goals-label"),w=s[e].querySelector(".apexcharts-tooltip-text-goals-value");if(l.length&&n.seriesData.seriesGoals[e]){const y=()=>{let v="<div>",C="<div>";l.forEach(S=>{v+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${S.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${S.attrs.name}</div>`,C+=`<div>${S.val}</div>`}),m.innerHTML=v+"</div>",w.innerHTML=C+"</div>"};o?n.seriesData.seriesGoals[e][t]&&Array.isArray(n.seriesData.seriesGoals[e][t])?y():(m.innerHTML="",w.innerHTML=""):y()}else m.innerHTML="",w.innerHTML="";if(u!==null&&(s[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=n.config.tooltip.z.title,s[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=u!==void 0?u:""),o&&x[0]){if(n.config.tooltip.hideEmptySeries){const y=s[e].querySelector(".apexcharts-tooltip-marker"),v=s[e].querySelector(".apexcharts-tooltip-text");parseFloat(h)==0?(y.style.display="none",v.style.display="none"):(y.style.display="block",v.style.display="block")}h==null||n.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||n.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1?x[0].parentNode.style.display="none":x[0].parentNode.style.display=n.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1&&(x[0].parentNode.style.display="none")}toggleActiveInactiveSeries(e,t){const s=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const i=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${t}`);if(i){const a=i;a.classList.add("apexcharts-active"),a.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:e,j:t}){var s,i,a,o,r,n,c,h;const l=this.w,g=l.seriesData.seriesX.map(y=>y.length>0?y:[]);let p="",u="",x=null,b=null;const f={series:l.seriesData.series,seriesIndex:e,dataPointIndex:t,w:l},m=l.formatters.ttZFormatter;t===null?b=l.seriesData.series[e]:l.axisFlags.isXNumeric&&l.config.chart.type!=="treemap"?(p=g[e][t],g[e].length===0&&(p=g[this.tooltipUtil.getFirstActiveXArray(g)][t])):p=new fe(this.w).isFormatXY()?l.config.series[e].data[t]!==void 0?l.config.series[e].data[t].x:"":l.labelData.labels[t]!==void 0?l.labelData.labels[t]:"";const w=p;return l.axisFlags.isXNumeric&&l.config.xaxis.type==="datetime"?p=new Te(this.w).xLabelFormat(l.formatters.ttKeyFormatter,w,w,{i:void 0,dateFormatter:new ne(this.w).formatDate,w:this.w}
30):p=l.globals.isBarHorizontal?l.formatters.yLabelFormatters[0](w,f):(a=(i=(s=l.formatters).xLabelFormatter)==null?void 0:i.call(s,w,f))!=null?a:w,l.config.tooltip.x.formatter!==void 0&&(p=(n=(r=(o=l.formatters).ttKeyFormatter)==null?void 0:r.call(o,w,f))!=null?n:w),l.seriesData.seriesZ.length>0&&l.seriesData.seriesZ[e].length>0&&(x=m?.(l.seriesData.seriesZ[e][t],l)),u=typeof l.config.xaxis.tooltip.formatter=="function"?(h=(c=l.formatters).xaxisTooltipFormatter)==null?void 0:h.call(c,w,f):p,{val:Array.isArray(b)?b.join(" "):b,xVal:Array.isArray(p)?p.join(" "):p,xAxisTTVal:Array.isArray(u)?u.join(" "):u,zVal:x}}handleCustomTooltip({i:e,j:t,y1:s,y2:i,w:a}){const o=this.ttCtx.getElTooltip();let r=a.config.tooltip.custom;Array.isArray(r)&&r[e]&&(r=r[e]);const n=r({series:a.seriesData.series,seriesIndex:e,dataPointIndex:t,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 Mt{constructor(e){this.ttCtx=e,this.w=e.w}moveXCrosshairs(e,t=null){const s=this.ttCtx,i=this.w,a=s.getElXCrosshairs();let o=e-s.xcrosshairsWidth/2;const r=i.labelData.labels.slice().length;if(t!==null&&(o=i.layout.gridWidth/r*t),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(e){const t=this.ttCtx;t.ycrosshairs!==null&&F.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&F.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}moveXAxisTooltip(e){var t,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;if(e-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=i.layout.translateX;const r=new F(this.w).getTextRects((s=(t=a.xaxisTooltipText)==null?void 0:t.innerHTML)!=null?s:"",i.config.xaxis.labels.style.fontSize);a.xaxisTooltipText&&(a.xaxisTooltipText.style.minWidth=r.width+"px"),a.xaxisTooltip.style.left=e+"px",a.xaxisTooltip.style.top=o+"px"}}}moveYAxisTooltip(e){var t,s;const i=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);const o=parseInt((s=(t=a.ycrosshairsHidden)==null?void 0:t.getAttribute("y1"))!=null?s:"0",10);let r=i.layout.translateY+o;if(a.yaxisTTEls){const n=a.yaxisTTEls[e].getBoundingClientRect(),c=n.height;let h;const l=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),g=i.dom.elWrap.getBoundingClientRect();if(l){const p=l.getBoundingClientRect();p.width>0&&(h=p.left+p.width/2-g.left-n.width/2)}h==null&&(h=i.config.yaxis[e].opposite?i.globals.translateYAxisX[e]+4:i.globals.translateYAxisX[e]-n.width-4),r-=c/2,i.globals.ignoreYAxisIndexes.indexOf(e)===-1&&r>0&&r<i.layout.gridHeight?(a.yaxisTTEls[e].classList.add("apexcharts-active"),a.yaxisTTEls[e].style.top=r+"px",a.yaxisTTEls[e].style.left=h+i.config.yaxis[e].tooltip.offsetX+"px"):a.yaxisTTEls[e].classList.remove("apexcharts-active")}}moveTooltip(e,t,s=null){const i=this.ttCtx.getElTooltip();if(!i)return;const a=this.computeTooltipPosition(e,t,s);a!==null&&this.applyTooltipPosition(i,a)}computeTooltipPosition(e,t,s=null){var i,a,o,r,n,c,h;const l=this.w,g=this.ttCtx,p=g.tooltipRect,u=!!l.config.tooltip.arrow,x=s!==null?parseFloat(String(s)):1,b=p.ttHeight||0,f=p.ttWidth||0,m=parseFloat(String(e)),w=parseFloat(String(t));if(isNaN(m))return null;let y=m+x+5;const v=w+l.layout.translateY;let C=u?v-b/2+x/2:w+x/2,S="right";if(y>l.layout.gridWidth/2&&(y=y-f-x-10,S="left"),y>l.layout.gridWidth-f-10&&(y=l.layout.gridWidth-f),y<-20&&(y=-20),l.config.tooltip.followCursor){const D=g.getElGrid();if(!D)return null;
30const k=D.getBoundingClientRect();y=g.e.clientX-k.left,y>l.layout.gridWidth/2?(y-=f,S="left"):S="right",C=g.e.clientY+l.layout.translateY-k.top,C>l.layout.gridHeight/2&&(C-=b)}else if(!l.globals.isBarHorizontal)if(u){const D=l.layout.translateY,k=l.layout.translateY+l.layout.gridHeight;C+b>k&&(C=k-b),C<D&&(C=D)}else b/2+C>l.layout.gridHeight&&(C=l.layout.gridHeight-b+l.layout.translateY);if(isNaN(y))return null;y+=l.layout.translateX;const L=(a=(i=l.config)==null?void 0:i.chart)==null?void 0:a.accessibility;if(L?.enabled&&((r=(o=L?.keyboard)==null?void 0:o.navigation)!=null&&r.enabled)&&((h=(c=(n=l.dom)==null?void 0:n.baseEl)==null?void 0:c.querySelector)!=null&&h.call(c,".apexcharts-keyboard-focused"))){const D=u?v:w,k=(x||1)+12,P=C,T=C+b;!isNaN(D)&&b>0&&P<D+k&&T>D-k&&(C=D-b-k,C<0&&(C=D+k))}let A=null;if(u&&b>0){const D=v-C,k=10,P=b-10;A=Math.max(k,Math.min(P,D))}return{x:y,y:C,placement:S,arrowY:A}}applyTooltipPosition(e,t){if(!e)return;const s=e.dataset.positioned!=="true";s&&(e.style.transitionProperty="none"),e.style.left=t.x+"px",e.style.top=t.y+"px",t.placement&&(e.dataset.placement=t.placement),t.arrowY!=null&&e.style.setProperty("--apx-tt-arrow-y",t.arrowY+"px"),t.arrowX!=null&&e.style.setProperty("--apx-tt-arrow-x",t.arrowX+"px"),s&&(e.offsetWidth,e.dataset.positioned="true",requestAnimationFrame(()=>{e.style.transitionProperty=""}))}moveMarkers(e,t){var s;const i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0){const o=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker`);for(let r=0;r<o.length;r++)parseInt((s=o[r].getAttribute("rel"))!=null?s:"0",10)===t&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(t,o[r]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}moveDynamicPointOnHover(e,t){var s,i,a,o,r;const n=this.w,c=this.ttCtx;let h=0,l=0;const g=new F(this.w),p=n.globals.pointsArray,u=c.tooltipUtil.getHoverMarkerSize(t),x=n.config.series[t].type;if(x&&(x==="column"||x==="candlestick"||x==="boxPlot"||x==="violin"))return;h=(i=(s=p[t])==null?void 0:s[e])==null?void 0:i[0],l=((o=(a=p[t])==null?void 0:a[e])==null?void 0:o[1])||0;const b=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers path`);if(b&&l<n.layout.gridHeight&&l>0){const f=(r=b.getAttribute("shape"))!=null?r:"circle",m=g.getMarkerPath(h,l,f,1.5*u);b.setAttribute("d",m)}this.moveXCrosshairs(h),c.fixedTooltip||this.moveTooltip(h,l,u)}moveDynamicPointsOnHover(e){var t,s;const i=this.ttCtx,a=i.w;let o=0,r=0,n=0;const c=a.globals.pointsArray,h=new K(this.w),l=new F(this.w);n=h.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const g=i.tooltipUtil.getHoverMarkerSize(n);if((t=c[n])!=null&&t[e]&&(o=c[n][e][0],r=c[n][e][1]),isNaN(o))return;const p=i.tooltipUtil.getAllMarkers();if(p.length)for(let u=0;u<a.seriesData.series.length;u++){const x=c[u];if(a.globals.comboCharts&&x===void 0&&p.splice(u,0,null),x&&x.length){let b,f=c[u][e][1];p[u].setAttribute("cx",o);const m=(s=p[u].getAttribute("shape"))!=null?s:"circle";if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){const w=e+a.seriesData.series[u].length;b=c[u][w][1],f-=Math.abs(f-b)/2}if(f!==null&&!isNaN(f)&&f<a.layout.gridHeight+g&&f+g>0){const w=l.getMarkerPath(o,f,m,g);p[u].setAttribute("d",w)}else p[u].setAttribute("d","")}}this.moveXCrosshairs(o),i.fixedTooltip||this.moveTooltip(o,r||a.layout.gridHeight,g)}moveStickyTooltipOverBars(e,t){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 c=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;o.globals.isBarHorizontal&&(c=new K(this.w).getActiveConfigSeriesIndex("desc")+1);let h=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${c}'] path[j='${e}'], .apexcharts-candlestick-series .apexcharts-series[rel='${c}'] path[j='${e}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${c}'] path[j='${e}'], .apexcharts-violin-series .apexcharts-series[rel='${c}'] path[j='${e}'], .apexcharts-rangebar-series .apexcharts-series[rel='${c}'] path[j='${e}']`);h||typeof t!="number"||(h=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
31        .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
32        .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
33        .apexcharts-violin-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
34        .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`));let l=h?parseFloat((s=h.getAttribute("cx"))!=null?s:"0"):0,g=h?parseFloat((i=h.getAttribute("cy"))!=null?i:"0"):0;const p=h?parseFloat((a=h.getAttribute("barWidth"))!=null?a:"0"):0,u=r.getElGrid();if(!u)return;const x=u.getBoundingClientRect(),b=h&&(h.classList.contains("apexcharts-candlestick-area")||h.classList.contains("apexcharts-boxPlot-area"));if(o.axisFlags.isXNumeric){if(h&&!b){const f=this._datapointCenterXFromBars(e,x);f!=null?l=f:l-=n%2!=0?p/2:0}h&&b&&(l-=p/2)}else o.globals.isBarHorizontal||(l=r.xAxisTicksPositions[e-1]+r.dataPointsDividedWidth/2,isNaN(l)&&(l=r.xAxisTicksPositions[e]-r.dataPointsDividedWidth/2));if(o.globals.isBarHorizontal?g-=r.tooltipRect.ttHeight:o.config.tooltip.followCursor?g=r.e.clientY-x.top-r.tooltipRect.ttHeight/2:g+r.tooltipRect.ttHeight+15>o.layout.gridHeight&&(g=o.layout.gridHeight),o.globals.isBarHorizontal||this.moveXCrosshairs(l),!r.fixedTooltip){if(o.globals.isBarHorizontal&&!o.config.tooltip.followCursor&&this.placeHorizontalSharedTooltip(e))return;this.moveTooltip(l,g||o.layout.gridHeight)}}_datapointCenterXFromBars(e,t){var s,i;const a=this.w,o=a.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${e}'],.apexcharts-rangebar-series path[j='${e}']`);if(!o.length)return null;let r=1/0,n=-1/0;for(const c of o){const h=c.parentNode;if((i=(s=h?.classList)==null?void 0:s.contains)!=null&&i.call(s,"apexcharts-series-collapsed"))continue;const l=c.getBoundingClientRect();l.width===0&&l.height===0||(l.left<r&&(r=l.left),l.right>n&&(n=l.right))}return isFinite(r)?(r+n)/2-t.left-(a.globals.barPadForNumericAxis||
340):null}placeHorizontalSharedTooltip(e){var t,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(),c=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${e}'],.apexcharts-rangebar-series path[j='${e}'],.apexcharts-boxPlot-series path[j='${e}']`);if(!c.length)return!1;let h=1/0,l=-1/0,g=1/0,p=-1/0;for(const k of c){const P=k.parentNode;if((s=(t=P?.classList)==null?void 0:t.contains)!=null&&s.call(t,"apexcharts-series-collapsed"))continue;const T=k.getBoundingClientRect();T.width===0&&T.height===0||(T.left<h&&(h=T.left),T.right>l&&(l=T.right),T.top<g&&(g=T.top),T.bottom>p&&(p=T.bottom))}if(!isFinite(h))return!1;const u=a.tooltipRect.ttWidth||0,x=a.tooltipRect.ttHeight||0,b=(h+l)/2-n.left+i.layout.translateX,f=g-n.top+i.layout.translateY,m=p-n.top+i.layout.translateY,w=i.layout.translateY,y=i.layout.translateY+i.layout.gridHeight,v=i.layout.translateX,C=i.layout.translateX+i.layout.gridWidth;let S="top",L=f-x-7;if(L<w){const k=m+7;k+x<=y&&(S="bottom",L=k)}let A=b-u/2;A<v&&(A=v),A+u>C&&(A=C-u);const D=Math.max(10,Math.min(u-10,b-A));return this.applyTooltipPosition(o,{x:A,y:L,placement:S,arrowY:null,arrowX:D}),!0}}function Cs(d){const e=t=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${t}</svg>`;switch(d){case"square":case"rect":return e('<rect x="1" y="1" width="10" height="10" rx="1" fill="currentColor"/>');case"line":return e('<rect x="0" y="5" width="12" height="2" rx="1" fill="currentColor"/>');case"diamond":return e('<path d="M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z" fill="currentColor"/>');case"triangle":return e('<path d="M6 1 L11.2 10.5 L0.8 10.5 Z" fill="currentColor"/>');case"cross":return e('<path d="M2 2 L10 10 M10 2 L2 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"plus":return e('<path d="M6 1 L6 11 M1 6 L11 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"star":return e('<path d="M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z" fill="currentColor"/>');case"sparkle":return e('<path d="M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z" fill="currentColor"/>');default:return e('<circle cx="6" cy="6" r="5" fill="currentColor"/>')}}class Ss{constructor(e){this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new Mt(e)}drawDynamicPoints(){const e=this.w,t=new F(this.w),s=new ke(this.w,this.ctx),i=[...e.dom.baseEl.querySelectorAll(".apexcharts-series")];e.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)}`;e.config.chart.type!=="line"&&e.config.chart.type!=="area"||e.globals.comboCharts||e.config.tooltip.intersect||(r+=" no-pointer-events");const n=s.getMarkerConfig({cssClass:r,seriesIndex:Number(o.getAttribute("data:realIndex"))}),c=t.drawMarker(0,0,n);c.node.setAttribute("default-marker-size",0);const h=B.createElementNS(U,"g");h.classList.add("apexcharts-series-markers"),h.appendChild(c.node),o.appendChild(h)}}}enlargeCurrentPoint(e,t,s=null,i=null){const a=this.w;a.config.chart.type!=="bubble"&&this.newPointSize(e,t);let o=t.getAttribute("cx"),r=t.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 c=n.getBoundingClientRect();o=this.ttCtx.e.clientX-c.left}this.tooltipPosition.moveTooltip(o,r,a.config.markers.hover.size)}}enlargePoints(e){var t,s;const i=this.w,a=this,o=this.ttCtx,r=e,n=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");let c=i.config.markers.hover.size;for(let h=0;h<n.length;h++){const l=n[h].getAttribute("rel"),g=n[h].getAttribute("index");if(c===void 0&&(c=i.globals.markers.size[g]+i.config.markers.hover.sizeOffset),r===parseInt(l??"0",10)){a.newPointSize(r,n[h]);const p=(t=n[h].getAttribute("cx"))!=null?t:"0",u=(s=n[h].getAttribute("cy"))!=null?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(p)),o.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(p),parseFloat(u),c)}else a.oldPointSize(n[h])}}newPointSize(e,t){const s=this.w;let i=s.config.markers.hover.size;const a=e===0?t.parentNode.firstChild:t.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(t,i);t.setAttribute("d",r)}}oldPointSize(e){const t=parseFloat(e.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(e,t);
34e.setAttribute("d",s)}resetPointsSize(){var e;const t=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let s=0;s<t.length;s++){const i=parseFloat((e=t[s].getAttribute("default-marker-size"))!=null?e:"0");if(M.isNumber(i)&&i>0){const a=this.ttCtx.tooltipUtil.getPathFromPoint(t[s],i);t[s].setAttribute("d",a)}else t[s].setAttribute("d","M0,0")}}}class ks{constructor(e){this.w=e.w;const t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.config.chart.type==="rangeBar"&&t.config.plotOptions.bar.rangeBarGroupRows}getAttr(e,t){var s;return parseFloat((s=e.target.getAttribute(t))!=null?s:"")}handleHeatTreeTooltip({e,opt:t,x:s,y:i,type:a}){var o,r;const n=this.ttCtx,c=this.w;if(e.target.classList.contains(`apexcharts-${a}-rect`)){const h=this.getAttr(e,"i"),l=this.getAttr(e,"j"),g=this.getAttr(e,"cx"),p=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),x=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:h,j:l,shared:!1,e}),c.interact.capturedSeriesIndex=h,c.interact.capturedDataPointIndex=l,s=g+n.tooltipRect.ttWidth/2+u,i=p+n.tooltipRect.ttHeight/2-x/2,n.tooltipPosition.moveXCrosshairs(g+u/2),s>c.layout.gridWidth/2&&(s=g-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){const b=c.dom.elWrap.getBoundingClientRect();s=((o=c.interact.clientX)!=null?o:0)-b.left-(s>c.layout.gridWidth/2?n.tooltipRect.ttWidth:0),i=((r=c.interact.clientY)!=null?r:0)-b.top-(i>c.layout.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:s,y:i}}handleMarkerTooltip({e,opt:t,x:s,y:i}){const a=this.w,o=this.ttCtx;let r,n;if(e.target.classList.contains("apexcharts-marker")){const c=parseInt(t.paths.getAttribute("cx"),10),h=parseInt(t.paths.getAttribute("cy"),10),l=parseFloat(t.paths.getAttribute("val"));if(n=parseInt(t.paths.getAttribute("rel"),10),r=parseInt(t.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,o.intersect){const g=M.findAncestor(t.paths,"apexcharts-series");g&&(r=parseInt(g.getAttribute("data:realIndex"),10))}if(o.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:r,j:n,shared:!o.showOnIntersect&&a.config.tooltip.shared,e}),e.type==="mouseup"&&o.markerClick(e,r,n),a.interact.capturedSeriesIndex=r,a.interact.capturedDataPointIndex=n,s=c,a.config.tooltip.arrow?i=h:(i=h+a.layout.translateY-1.4*o.tooltipRect.ttHeight,l<0&&(i=h)),o.w.config.tooltip.followCursor){const g=o.getElGrid();if(!g)return{x:s,y:i};const p=g.getBoundingClientRect();i=o.e.clientY+a.layout.translateY-p.top}o.marker.enlargeCurrentPoint(n,t.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e,opt:t}){var s,i,a;const o=this.w,r=this.ttCtx,n=r.getElTooltip();let c,h=0,l=0,g=0,p=0;const u=this.getBarTooltipXY({e,opt:t});if(u.j===null&&u.barHeight===0&&u.barWidth===0)return;p=u.i;const x=u.j;if(o.interact.capturedSeriesIndex=p,o.interact.capturedDataPointIndex=x!==null?x:o.interact.capturedDataPointIndex,o.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||!o.config.tooltip.shared?(l=u.x,g=u.y,c=Array.isArray(o.config.stroke.width)?o.config.stroke.width[p]:o.c
34onfig.stroke.width,h=l):o.globals.comboCharts||o.config.tooltip.shared||(h/=2),isNaN(g)&&(g=o.globals.svgHeight-r.tooltipRect.ttHeight),l+r.tooltipRect.ttWidth>o.layout.gridWidth?l-=r.tooltipRect.ttWidth:l<0&&(l=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(h+c/2):r.tooltipPosition.moveXCrosshairs(h)),!r.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(g=g+o.layout.translateY-r.tooltipRect.ttHeight/2,n))){const b=r.tooltipRect.ttWidth||0,f=r.tooltipRect.ttHeight||0,m=!!o.config.tooltip.arrow,{barAnchorXInGrid:w,barAnchorYInGrid:y,barRectInGrid:v}=u,C=7,S=(s=r.getElGrid())==null?void 0:s.getBoundingClientRect(),L=o.dom.elWrap.getBoundingClientRect(),A=S?S.left-L.left:o.layout.translateX;let D,k=null,P=null,T=l+A,I=g;if(m&&o.globals.isBarHorizontal&&v!=null){const E=o.layout.translateY,X=o.layout.translateY+o.layout.gridHeight,z=A,H=A+o.layout.gridWidth,Y=(v.left+v.right)/2+A,N=v.top+o.layout.translateY,W=v.bottom+o.layout.translateY;let R=N-f-C;if(D="top",R<E){const _=W+C;_+f<=X&&(D="bottom",R=_)}I=R,T=Y-b/2,T<z&&(T=z),T+b>H&&(T=H-b),P=Math.max(10,Math.min(b-10,Y-T))}else if(m&&w!=null&&y!=null){const E=w+A,X=A+o.layout.gridWidth/2,z=((i=v?.left)!=null?i:w)+A,H=((a=v?.right)!=null?a:w)+A;if(E<X?(D="right",T=H+C):(D="left",T=z-b-C),v){I=(v.top+v.bottom)/2+o.layout.translateY-f/2;const Y=o.layout.translateY,N=o.layout.translateY+o.layout.gridHeight;I<Y&&(I=Y),I+f>N&&(I=N-f)}if(f>0&&v){const Y=(v.top+v.bottom)/2+o.layout.translateY;k=Math.max(10,Math.min(f-10,Y-I))}}r.tooltipPosition.applyTooltipPosition(n,{x:T,y:I,placement:D,arrowY:k,arrowX:P})}}getBarTooltipXY({e,opt:t}){const s=this.w;let i=null;const a=this.ttCtx;let o=0,r=0,n=0,c=0,h=0,l=null,g=null,p=null,u=null,x=null;const b=e.target.classList;if(b.contains("apexcharts-bar-area")||b.contains("apexcharts-candlestick-area")||b.contains("apexcharts-boxPlot-area")||b.contains("apexcharts-rangebar-area")){const f=e.target,m=f.getBoundingClientRect(),w=t.elGrid.getBoundingClientRect(),y=m.height;h=m.height;const v=m.width,C=parseInt(f.getAttribute("cx"),10),S=parseInt(f.getAttribute("cy"),10);l=C,g=S,c=parseFloat(f.getAttribute("barWidth"));const L=m.left-w.left,A=m.top-w.top,D=A+y/2;p=L+v/2,u=s.globals.isBarHorizontal?D:A,x={left:L,top:A,right:L+v,bottom:A+y};const k=e.type==="touchmove"?e.touches[0].clientX:e.clientX;i=parseInt(f.getAttribute("j"),10),o=parseInt(f.parentNode.getAttribute("rel"),10)-1;const P=f.getAttribute("data-range-y1"),T=f.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(f.parentNode.getAttribute("data:realIndex"),10));const I=X=>s.axisFlags.isXNumeric?C-v/2:this.isVerticalGroupedRangeBar?C+v/2:C-a.dataPointsDividedWidth+v/2,E=()=>S-a.dataPointsDividedHeight+y/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:o,j:i,y1:P?parseInt(P,10):null,y2:T?parseInt(T,10):null,shared:!a.showOnIntersect&&s.config.tooltip.shared,e}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(r=k-w.left+15,n=E()):(r=I(r),n=e.clientY-w.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(r=C,a.xyRatios&&r<a.xyRatios.baseLineInvertedY&&(r=C-a.tooltipRect.ttWidth),n=E()):(r=I(r),n=S)}return{x:r,y:n,barHeight:h,barWidth:c,i:o,j:i,barCx:l,barCy:g,barAnchorXInGrid:p,barAnchorYInGrid:u,barRectInGrid:x}}}class Ds{constructor(e){this.w=e.w,this.ttCtx=e}drawXaxisTooltip(){const e=this.w,t=this.ttCtx,s=e.config.xaxis.position==="bottom";t.xaxisOffY=s?e.layout.gridHeight+1:-e.layout.xAxisHeight-e.config.xaxis.axisTicks.height+3;const i=s?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",a=e.dom.elWrap;t.isXAxisTooltipEnabled&&e.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(t.xaxisTooltip=B.createElementNS("http://www.w3.org/1999/xhtml","div"),t.xaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+e.config.tooltip.theme),a.appendChild(t.xaxisTooltip),t.xaxisTooltipText=B.createElementNS("http://www.w3.org/1999/xhtml","div"),t.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}drawYaxisTooltip(){const e=this.w,t=this.ttCtx;for(let s=0;s<e.config.yaxis.length;s++){const i=e.config.yaxis[s].opposite||e.config.yaxis[s].crosshairs.opposite;t.yaxisOffX=i?e.layout.gridWidth+1:1;const a=i?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,o=e.dom.elWrap;e.dom.baseEl.querySelector(`.apexcharts-yaxistooltip apexcharts-yaxistooltip-${s}
34`)===null&&(t.yaxisTooltip=B.createElementNS("http://www.w3.org/1999/xhtml","div"),t.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+e.config.tooltip.theme),o.appendChild(t.yaxisTooltip),s===0&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[s]=B.createElementNS("http://www.w3.org/1999/xhtml","div"),t.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),t.yaxisTooltip.appendChild(t.yaxisTooltipText[s]))}}setXCrosshairWidth(){var e,t;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((t=o.getAttribute("barWidth"))!=null?t:"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((e=o.getAttribute("barWidth"))!=null?e:"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 e=this.w,t=this.ttCtx;t.ycrosshairs=e.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(e,t,s){const i=this.ttCtx,a=this.w,o=a.globals,r=o.seriesYAxisMap[e];if(i.yaxisTooltips[e]&&r.length>0){const n=a.formatters.yLabelFormatters[e],c=i.getElGrid();if(!c)return;const h=c.getBoundingClientRect(),l=r[0];let g=0;s.yRatio.length>1&&(g=l);const p=(t-h.top)*s.yRatio[g],u=o.maxYArr[l]-o.minYArr[l];let x=o.minYArr[l]+(u-p);a.config.yaxis[e].reversed&&(x=o.maxYArr[l]-(u-p)),i.tooltipPosition.moveYCrosshairs(t-h.top),i.yaxisTooltipText[e].innerHTML=n(x),i.tooltipPosition.moveYAxisTooltip(e)}}}class Ls{constructor(e,t){this.w=e,this.ctx=t,this.tConfig=e.config.tooltip,this.tooltipUtil=new Lt(this),this.tooltipLabels=new As(this),this.tooltipPosition=new Mt(this),this.marker=new Ss(this),this.intersect=new ks(this),this.axesTooltip=new Ds(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=!e.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 e=this.w,t=this.getElTooltip();t&&(this.updateDimensionCache(),typeof ResizeObserver>"u"||e.globals.resizeObserver||(e.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),e.globals.resizeObserver.observe(t)))}updateDimensionCache(){const e=this.w,t=this.getElTooltip();if(!t)return;const s=t.getBoundingClientRect();e.globals.dimensionCache.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}getCachedDimensions(){const e=this.w;if(e.globals.dimensionCache.tooltip){const s=e.globals.dimensionCache.tooltip;if(Date.now()-s.lastUpdate<1e3)return{ttWidth:s.width,ttHeight:s.height}}this.updateDimensionCache();const t=e.globals.dimensionCache.tooltip;return t?{ttWidth:t.width,ttHeight:t.height}:{ttWidth:0,ttHeight:0}}getElTooltip(e){return e||(e=this),e.w.dom.baseEl?e.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(e){const t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(r=>!!(r.show&&r.tooltip.enabled&&t.globals.axisCharts)),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);const s=this.getElTooltip();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"),t.config.tooltip.cssClass&&i.classList.add(t.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&&t.config.series.length>1&&!t.globals.isBarHorizontal;if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!a&&!this.tConfig.fillSeriesColor&&t.globals.axisCharts){const r=B.createElementNS("http://www.w3.org/1999/xhtml","div");r.classList.add("apexcharts-tooltip-arrow"),i.appendChild(r)}if(t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&(i.setAttribute("role","tooltip"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),i.setAttribute("aria-hidden","true")),t.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const r=new Ie(this.w,this.ctx,void 0);this.xAxisTicksPositions=r.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&t.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),t.config.markers.size!==0&&t.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(),t.globals.collapsedSeries.length===t.seriesData.series.length)return;this.dataPointsDividedHeight=t.layout.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.layout.gridWidth/t.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||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));let o=t.seriesData.series.length;
vendor: 4,955 bytes, line 34
34(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(o=this.showOnIntersect?1:t.seriesData.series.length),this.legendLabels=t.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(o),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(e){const t=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a<e;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(t.config.tooltip.inverseOrder?e-a:a+1);const r=B.createElementNS("http://www.w3.org/1999/xhtml","span");r.classList.add("apexcharts-tooltip-marker"),t.config.tooltip.fillSeriesColor?r.style.backgroundColor=t.globals.colors[a]:r.style.color=t.globals.colors[a];const n=t.config.markers.shape;let c=n;Array.isArray(n)&&(c=n[a]),r.setAttribute("shape",c),r.innerHTML=Cs(c),o.appendChild(r);const h=B.createElementNS("http://www.w3.org/1999/xhtml","div");h.classList.add("apexcharts-tooltip-text"),h.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,h.style.fontSize=this.tConfig.style.fontSize,["y","goals","z"].forEach(l=>{const g=B.createElementNS("http://www.w3.org/1999/xhtml","div");g.classList.add(`apexcharts-tooltip-${l}-group`);const p=B.createElementNS("http://www.w3.org/1999/xhtml","span");p.classList.add(`apexcharts-tooltip-text-${l}-label`),g.appendChild(p);const u=B.createElementNS("http://www.w3.org/1999/xhtml","span");u.classList.add(`apexcharts-tooltip-text-${l}-value`),g.appendChild(u),h.appendChild(g)}),o.appendChild(h),i.appendChild(o),s.push(o)}return s}addSVGEvents(){const e=this.w,t=e.config.chart.type,s=this.getElTooltip();if(!s)return;const i=!(t!=="bar"&&t!=="candlestick"&&t!=="boxPlot"&&t!=="violin"&&t!=="rangeBar"),a=t==="area"||t==="line"||t==="scatter"||t==="bubble"||t==="radar",o=e.dom.Paper.node,r=this.getElGrid();r&&(this.seriesBound=r.getBoundingClientRect());const n=[],c=[],h={hoverArea:o,elGrid:r,tooltipEl:s,tooltipY:n,tooltipX:c,ttItems:this.ttItems};let l;if(e.globals.axisCharts&&(a?l=e.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?l=e.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"):t!=="heatmap"&&t!=="treemap"||(l=e.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),l&&l.length))for(let g=0;g<l.length;g++)n.push(l[g].getAttribute("cy")),c.push(l[g].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],h);else if(i&&!e.globals.comboCharts||a&&this.showOnIntersect)this.addDatapointEventsListeners(h);else if(!e.globals.axisCharts||t==="heatmap"||t==="treemap"){const g=e.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(g,h)}if(this.showOnIntersect){const g=e.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");g.length>0&&this.addPathsEventListeners(g,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}drawFixedTooltipRect(){const e=this.w,t=this.getElTooltip();if(!t)return{x:0,y:0,ttWidth:0,ttHeight:0};const s=t.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+e.globals.svgWidth-i+10),n.indexOf("bottom")>-1&&(r=r+e.globals.svgHeight-a-10),this.tooltipPosition.applyTooltipPosition(t,{x:o,y:r}),{x:o,y:r,ttWidth:i,ttHeight:a}}addDatapointEventsListeners(e){const t=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}addPathsEventListeners(e,t){const s=this;for(let i=0;i<e.length;i++){const a={paths:e[i],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(o=>e[i].addEventListener(o,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(e,t){const s=Date.now()-this.lastHoverTime;s>=20?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(e,t)},20-s))}seriesHover(e,t){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:e.paths,tooltipEl:o,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.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:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}seriesHoverByContext({chartCtx:e,ttCtx:t,opt:s,e:i}){const a=e.w;if(!this.getElTooltip(e))return;const o=t.getCachedDimensions();t.tooltipRect={x:0,y:0,ttWidth:o.ttWidth,ttHeight:o.ttHeight},t.e=i,t.tooltipUtil.hasBars()&&!a.globals.comboCharts&&!t.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new K(e.w).toggleSeriesOnHover(i,i.target.parentNode),a.globals.axisCharts?t.axisChartsTooltips({e:i,opt:s,tooltipRect:t.tooltipRect}):t.nonAxisChartsTooltips({e:i,opt:s,tooltipRect:t.tooltipRect}),t.fixedTooltip&&t.drawFixedTooltipRect()}axisChartsTooltips({e,opt:t}){var s;const i=this.w;let a,o;const r=t.elGrid.getBoundingClientRect(),n=e.type==="touchmove"?e.touches[0].clientX:e.clientX,c=e.type==="touchmove"?e.touches[0].clientY:e.clientY;if(this.clientY=c,this.clientX=n,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,c<r.top||c>r.top+r.height)return void this.handleMouseOut(t);if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){const u=parseInt(t.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(u)<0)return void this.handleMouseOut(t)}const h=this.getElTooltip();if(!h)return;const l=this.getElXCrosshairs();let g=[];i.config.chart.group&&(g=this.ctx.getSyncedCharts());const p=i.globals.xyCharts||i.config.chart.type==="bar"&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if(e.type==="mousemove"||e.type==="touchmove"||e.type==="mouseup"){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.seriesData.series.length)return;l!==null&&l.classList.add("apexcharts-active");const u=(s=this.yaxisTooltips)==null?void 0:s.filter(b=>b===!0),x=this.ycrosshairs;if(x!==null&&u?.length&&x.classList.add("apexcharts-active"),p&&!this.showOnIntersect||g.length>1)this.handleStickyTooltip(e,n,c,t);else if(i.config.chart.type==="heatmap"||i.config.chart.type==="treemap"){const b=this.intersect.handleHeatTreeTooltip({e,opt:t,x:a,y:o,type:i.config.chart.type});a=b.x,o=b.y,h.style.left=a+"px",h.style.top=o+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e,opt:t}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e,opt:t,x:a,y:o});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let b=0;b<i.config.yaxis.length;b++)this.axesTooltip.drawYaxisTooltipText(b,c,this.xyRatios);i.dom.baseEl.classList.add("apexcharts-tooltip-active"),t.tooltipEl.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&t.tooltipEl.removeAttribute("aria-hidden")}else e.type!=="mouseout"&&e.type!=="touchend"||this.handleMouseOut(t)}nonAxisChartsTooltips({e,opt:t,tooltipRect:s}){var i,a,o,r;const n=this.w,c=t.paths.getAttribute("rel"),h=this.getElTooltip();if(!h)return;const l=n.dom.elWrap.getBoundingClientRect();if(e.type==="mousemove"||e.type==="touchmove"){let g,p;n.dom.baseEl.classList.add("apexcharts-tooltip-active"),h.classList.add("apexcharts-active"),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&h.removeAttribute("aria-hidden"),this.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:parseInt(c,10)-1,shared:!1});const u=t.paths.querySelector("path[data\\:cx]")||t.paths;if(n.config.tooltip.intersect&&u.hasAttribute("data:cx")&&u.hasAttribute("data:cy")){const x=n.dom.Paper.node.getBoundingClientRect();g=x.left-l.left+parseFloat(u.getAttribute("data:cx"))-s.ttWidth/2,p=x.top-l.top+parseFloat(u.getAttribute("data:cy"))-s.ttHeight-10}else g=((i=n.interact.clientX)!=null?i:0)-l.left-s.ttWidth/2,p=((a=n.interact.clientY)!=null?a:0)-l.top-s.ttHeight-10;if(h.style.left=g+"px",h.style.top=p+"px",n.config.legend.tooltipHoverFormatter){const x=n.config.legend.tooltipHoverFormatter,b=c-1,f=(o=this.legendLabels)==null?void 0:o[b];if(!f)return;const m=x(f.getAttribute("data:default-text"),{seriesIndex:b,dataPointIndex:b,w:n});f.innerHTML=m}}else e.type!=="mouseout"&&e.type!=="touchend"||(h.classList.remove("apexcharts-active"),n.dom.baseEl.classList.remove("apexcharts-tooltip-active"),n.config.legend.tooltipHoverFormatter&&((r=this.legendLabels)==null||r.forEach(g=>{const p=g.getAttribute("data:default-text");g.innerHTML=decodeURIComponent(p??"")})))}handleStickyTooltip(e,t,s,i){const a=this.w,o=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:t,clientY:s}),r=o.j;let n=o.capturedSeries;n!==null&&a.globals.collapsedSeriesIndices.includes(n??-1)&&(n=null);const c=i.elGrid.getBoundingClientRect();if(o.hoverX<0||o.hoverX>c.width)this.handleMouseOut(i);else if(n!==null)this.handleStickyCapturedSeries(e,n??-1,i,r??0);else if(this.tooltipUtil.isXoverlap(r??0)||a.globals.isBarHorizontal){const h=a.seriesData.series.findIndex((l,g)=>!a.globals.collapsedSeriesIndices.includes(g));this.create(e,this,h,r??0,i.ttItems)}}handleStickyCapturedSeries(e,t,s,i){const a=this.w;if(!this.tConfig.shared&&a.seriesData.series[t][i]===null)return void this.handleMouseOut(s);if(a.seriesData.series[t][i]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,i,s.ttItems):this.create(e,this,t,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(e,this,o,i,s.ttItems)}}deactivateHoverFilter(){const e=this.w,t=new F(this.w,this.ctx),s=e.dom.Paper.find(".apexcharts-bar-area");for(let i=0;i<s.length;i++)t.pathMouseLeave(s[i],void 0)}handleMouseOut(e){var t,s;const i=this.w,a=this.getElXCrosshairs();i.dom.baseEl.classList.remove("apexcharts-tooltip-active"),e.tooltipEl.classList.remove("apexcharts-active"),delete e.tooltipEl.dataset.positioned,i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&e.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&&((t=this.xaxisTooltip)==null||t.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(e,t,s){const i=this.w;typeof i.config.chart.events.markerClick=="function"&&i.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:t,dataPointIndex:s,w:i}])}create(e,t,s,i,a,o=null){var r,n,c,h,l,g,p,u,x,b,f,m,w,y,v,C,S,L,A;const D=this.w,k=t;e.type==="mouseup"&&this.markerClick(e,s,i),o===null&&(o=this.tConfig.shared);const P=this.tooltipUtil.hasMarkers(s),T=this.tooltipUtil.getElBars(),I=()=>{D.globals.markers.largestSize>0?k.marker.enlargePoints(i):k.tooltipPosition.moveDynamicPointsOnHover(i)};if(D.config.legend.tooltipHoverFormatter){const z=D.config.legend.tooltipHoverFormatter,H=Array.from((r=this.legendLabels)!=null?r:[]);H.forEach(Y=>{const N=Y.getAttribute("data:default-text");Y.innerHTML=decodeURIComponent(N??"")});for(let Y=0;Y<H.length;Y++){const N=H[Y],W=parseInt((n=N.getAttribute("i"))!=null?n:"",10),R=decodeURIComponent((c=N.getAttribute("data:default-text"))!=null?c:""),_=z(R,{seriesIndex:o?W:s,dataPointIndex:i,w:D});if(o)N.innerHTML=D.globals.collapsedSeriesIndices.indexOf(W)<0?_:R;else if(N.innerHTML=W===s?_:R,s===W)break}}const E=D.rangeData,X=$($({ttItems:a,i:s,j:i},((p=(g=(l=(h=E.seriesRange)==null?void 0:h[s])==null?void 0:l[i])==null?void 0:g.y[0])==null?void 0:p.y1)!==void 0&&{y1:(f=(b=(x=(u=E.seriesRange)==null?void 0:u[s])==null?void 0:x[i])==null?void 0:b.y[0])==null?void 0:f.y1}),((v=(y=(w=(m=E.seriesRange)==null?void 0:m[s])==null?void 0:w[i])==null?void 0:y.y[0])==null?void 0:v.y2)!==void 0&&{y2:(A=(L=(S=(C=E.seriesRange)==null?void 0:C[s])==null?void 0:S[i])==null?void 0:L.y[0])==null?void 0:A.y2});if(o){if(k.tooltipLabels.drawSeriesTexts(G($({},X),{shared:!this.showOnIntersect&&this.tConfig.shared})),P)I();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...T]),this.barSeriesHeight>0)){const z=new F(this.w,this.ctx),H=D.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter(),k.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&I(),k.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let Y=0;Y<H.length;Y++)z.pathMouseEnter(H[Y],void 0)}}else k.tooltipLabels.drawSeriesTexts($({shared:!1},X)),this.tooltipUtil.hasBars()&&k.tooltipPosition.moveStickyTooltipOverBars(i,s),P&&k.tooltipPosition.moveMarkers(s,i)}}class ee{constructor(e){this.node=e,e&&(e.instance=this),this._listeners=[],this._filter=null}attr(e,t){if(typeof e=="string"&&t===void 0)return this.node.getAttribute(e);const s=typeof e=="string"?{[e]:t}:e;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(e){for(const t in e)this.node.style[t]=e[t];return this}fill(e){return typeof e=="object"?this.attr(e):this.attr("fill",e)}stroke(e){return typeof e=="object"?(e.color!==void 0&&this.attr("stroke",e.color),e.width!==void 0&&this.attr("stroke-width",e.width),e.dasharray!==void 0&&this.attr("stroke-dasharray",e.dasharray),e.linecap!==void 0&&this.attr("stroke-linecap",e.linecap),e.opacity!==void 0&&this.attr("stroke-opacity",e.opacity),this):this.attr("stroke",e)}size(e,t){return this.attr({width:e,height:t})}move(e,t){return this.attr({x:e,y:t})}center(e,t){if(this.node.nodeName==="g"){const s=this.bbox(),i=e-(s.x+s.width/2),a=t-(s.y+s.height/2);return this.attr("transform",`translate(${i}, ${a})`)}return this.attr({cx:e,cy:t})}add(e){return this.node.appendChild(e.node||e),this}addTo(e){return(e.node||e).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(e){return Array.from(this.node.querySelectorAll(e)).map(t=>t.instance||new ee(t))}findOne(e){const t=this.node.querySelector(e);return t?t.instance||new ee(t):null}on(e,t){const s=e.split(".")[0];return this._listeners.push({event:e,eventType:s,handler:t}),this.node.addEventListener(s,t),this}off(e,t){if(e||t)if(e&&!t){const s=e.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType!==s||(this.node.removeEventListener(i.eventType,i.handler),!1))}else{const s=e.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType!==s||i.handler!==t||(this.node.removeEventListener(i.eventType,i.handler),!1))}
34else this._listeners.forEach(s=>{this.node.removeEventListener(s.eventType,s.handler)}),this._listeners=[];return this}each(e,t){return Array.from(this.node.children).forEach(s=>{const i=s.instance||new ee(s);e.call(i),t&&i.each(e,t)}),this}removeClass(e){return e==="*"?this.node.removeAttribute("class"):this.node.classList.remove(e),this}children(){return Array.from(this.node.childNodes).filter(e=>e.nodeType===1).map(e=>e.instance||new ee(e))}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(e){const t=B.createElementNS("http://www.w3.org/2000/svg","tspan");return t.textContent=e,this.node.appendChild(t),new ee(t)}plot(e){return typeof e=="string"&&this.attr("d",e),this}animate(){throw new Error("Animation module not loaded")}filterWith(){throw new Error("Filter module not loaded")}unfilter(e){return this._filter&&(this.node.removeAttribute("filter"),e&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this}filterer(){return this._filter}}let Ms=0;class Ps extends ee{constructor(e,t,s){const i=t==="radial"?"radialGradient":"linearGradient";super(B.createElementNS(U,i)),this._id="SvgjsGradient"+ ++Ms,this.attr("id",this._id),typeof s=="function"&&s(new Ts(this));let a=e.node.querySelector("defs");a||(a=B.createElementNS(U,"defs"),e.node.appendChild(a)),a.appendChild(this.node)}stop(e,t,s){const i=B.createElementNS(U,"stop");return i.setAttribute("offset",e),i.setAttribute("stop-color",t),s!==void 0&&i.setAttribute("stop-opacity",String(s)),this.node.appendChild(i),this}from(e,t){return this.attr({x1:e,y1:t})}to(e,t){return this.attr({x2:e,y2:t})}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class Ts{constructor(e){this.gradient=e}stop(e,t,s){return this.gradient.stop(e,t,s),this}}let Es=0;class Fs extends ee{constructor(e,t,s,i){super(B.createElementNS(U,"pattern")),this._id="SvgjsPattern"+ ++Es,this.attr({id:this._id,width:t,height:s,patternUnits:"userSpaceOnUse"}),typeof i=="function"&&i(new Re(this.node));let a=e.node.querySelector("defs");a||(a=B.createElementNS(U,"defs"),e.node.appendChild(a)),a.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class Re extends ee{line(e,t,s,i){const a=this._make("line");return e!==void 0&&a.attr({x1:e,y1:t,x2:s,y2:i}),a}rect(e,t){const s=this._make("rect");return e!==void 0&&s.attr({width:e,height:t}),s}circle(e){const t=this._make("circle");return e!==void 0&&t.attr({r:e/2,cx:e/2,cy:e/2}),t}path(e){const t=this._make("path");return e&&t.attr("d",e),t}polygon(e){const t=this._make("polygon");return e&&t.attr("points",e),t}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(e){const t=B.createElementNS(U,"text");t.textContent=e;const s=new ee(t);return this.node.appendChild(t),s}text(e){const t=B.createElementNS(U,"text"),s=new ee(t);return this.node.appendChild(t),typeof e=="function"&&e(new Is(t)),s}image(e,t){const s=B.createElementNS(U,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",e);const i=new ee(s);if(this.node.appendChild(s),typeof t=="function"){const a=new Image;a.onload=function(){i.size(a.width,a.height),t.call(i,{width:a.width,height:a.height})},a.src=e}return i}gradient(e,t){return new Ps(this,e,t)}pattern(e,t,s){return new Fs(this,e,t,s)}_make(e){const t=B.createElementNS(U,e);return this.node.appendChild(t),new ee(t)}_makeContainer(e){const t=B.createElementNS(U,e);return this.node.appendChild(t),new Re(t)}}class Is{constructor(e){this.textNode=e}tspan(e){const t=B.createElementNS(U,"tspan");return t.textContent=e,this.textNode.appendChild(t),new Xs(t,this.textNode)}}class Xs{constructor(e,t){this.node=e,this.textNode=t}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let Rs=0;class zs extends ee{constructor(){super(B.createElementNS(U,"filter")),this._id="SvgjsFilter"+ ++Rs,this.attr("id",this._id)}size(e,t,s,i){return this.attr({width:e,height:t,x:s,y:i})}}class Ys{constructor(e){this.filter=e}colorMatrix(e){return this._primitive("feColorMatrix",e)}offset(e){return this._primitive("feOffset",e)}gaussianBlur(e){return this._primitive("feGaussianBlur",e)}flood(e){return this._primitive("feFlood",e)}composite(e){return this._primitive("feComposite",e)}merge(e){const t=B.createElementNS(U,"feMerge");return e.forEach(s=>{const i=B.createElementNS(U,"feMergeNode");i.setAttribute("in",s),t.appendChild(i)}),this.filter.node.appendChild(t),new ee(t)}_primitive(e,t){const s=B.createElementNS(U,e);for(const i in t)s.setAttribute(i,t[i]);return this.filter.node.appendChild(s),new ee(s)}}function ze(d){if(!d||typeof d!="string")return[["M",0,0]];const e=[],t=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let i;const a=[],o=[];for(;(i=t.exec(d))!==null;)a.push(i[1]),o.push(i.index);for(let r=0;r<a.length;r++){const n=o[r]+a[r].length,c=r+1<o.length?o[r+1]:d.length,h=d.substring(n,c),l=[];let g;for(s.lastIndex=0;(g=s.exec(h))!==null;)l.push(parseFloat(g[0]));const p=a[r].toUpperCase();if(p==="Z")e.push(["Z"]);else if(p==="M"||p==="L"||p==="T")for(let u=0;u<l.length;u+=2)e.push([p,l[u],l[u+1]]);else if(p==="H")for(let u=0;u<l.length;u++)e.push([p,l[u]]);else if(p==="V")for(let u=0;u<l.length;u++)e.push([p,l[u]]);else if(p==="C")for(let u=0;u<l.length;u+=6)e.push([p,l[u],l[u+1],l[u+2],l[u+3],l[u+4],l[u+5]]);else if(p==="S"||p==="Q")for(let u=0;u<l.length;u+=4)e.push([p,l[u],l[u+1],l[u+2],l[u+3]]);else if(p==="A")for(let u=0;u<l.length;u+=7)e.push([p,l[u],l[u+1],l[u+2],l[u+3],l[u+4],l[u+5],l[u+6]])}return e.length===0&&e.push(["M",0,0]),e}
34function Oe(d){let e=1/0,t=1/0,s=-1/0,i=-1/0;return d.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<e&&(e=r),r>s&&(s=r),n<t&&(t=n),n>i&&(i=n))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:t,width:s-e,height:i-t}}function Pt(d){switch(d[0]){case"z":case"Z":d[0]="L",d[1]=this.start[0],d[2]=this.start[1];break;case"H":d[0]="L",d[2]=this.pos[1];break;case"V":d[0]="L",d[2]=d[1],d[1]=this.pos[0];break;case"T":d[0]="Q",d[3]=d[1],d[4]=d[2],d[1]=this.reflection[1],d[2]=this.reflection[0];break;case"S":d[0]="C",d[6]=d[4],d[5]=d[3],d[4]=d[2],d[3]=d[1],d[2]=this.reflection[1],d[1]=this.reflection[0]}return d}function Tt(d){var e=d.length;return this.pos=[d[e-2],d[e-1]],"SCQT".indexOf(d[0])!=-1&&(this.reflection=[2*this.pos[0]-d[e-4],2*this.pos[1]-d[e-3]]),d}function Et(d){var e,t=[d];switch(d[0]){case"M":return this.pos=this.start=[d[1],d[2]],t;case"L":d[5]=d[3]=d[1],d[6]=d[4]=d[2],d[1]=this.pos[0],d[2]=this.pos[1];break;case"Q":d[6]=d[4],d[5]=d[3],d[4]=1*d[4]/3+2*d[2]/3,d[3]=1*d[3]/3+2*d[1]/3,d[2]=1*this.pos[1]/3+2*d[2]/3,d[1]=1*this.pos[0]/3+2*d[1]/3;break;case"A":t=(function(s,i){var a,o,r,n,c,h,l,g,p,u,x,b,f,m,w,y,v,C,S,L,A,D,k,P,T,I,E=Math.abs(i[1]),X=Math.abs(i[2]),z=i[3]%360,H=i[4],Y=i[5],N=i[6],W=i[7],R=new he(s[0],s[1]),_=new he(N,W),V=[];if(E===0||X===0||R.x===_.x&&R.y===_.y)return[["C",R.x,R.y,_.x,_.y,_.x,_.y]];for(a=new he((R.x-_.x)/2,(R.y-_.y)/2).transform(new ve().rotate(z)),(o=a.x*a.x/(E*E)+a.y*a.y/(X*X))>1&&(E*=o=Math.sqrt(o),X*=o),r=new ve().rotate(z).scale(1/E,1/X).rotate(-z),R=R.transform(r),_=_.transform(r),n=[_.x-R.x,_.y-R.y],h=n[0]*n[0]+n[1]*n[1],c=Math.sqrt(h),n[0]/=c,n[1]/=c,l=h<4?Math.sqrt(1-h/4):0,H===Y&&(l*=-1),g=new he((_.x+R.x)/2+l*-n[1],(_.y+R.y)/2+l*n[0]),p=new he(R.x-g.x,R.y-g.y),u=new he(_.x-g.x,_.y-g.y),x=Math.acos(p.x/Math.sqrt(p.x*p.x+p.y*p.y)),p.y<0&&(x*=-1),b=Math.acos(u.x/Math.sqrt(u.x*u.x+u.y*u.y)),u.y<0&&(b*=-1),Y&&x>b&&(b+=2*Math.PI),!Y&&x<b&&(b-=2*Math.PI),m=Math.ceil(2*Math.abs(x-b)/Math.PI),y=[],v=x,f=(b-x)/m,w=4*Math.tan(f/4)/3,A=0;A<=m;A++)S=Math.cos(v),C=Math.sin(v),L=new he(g.x+S,g.y+C),y[A]=[new he(L.x+w*C,L.y-w*S),L,new he(L.x-w*C,L.y+w*S)],v+=f;for(y[0][0]=y[0][1].clone(),y[y.length-1][2]=y[y.length-1][1].clone(),r=new ve().rotate(z).scale(E,X).rotate(-z),A=0,D=y.length;A<D;A++)y[A][0]=y[A][0].transform(r),y[A][1]=y[A][1].transform(r),y[A][2]=y[A][2].transform(r);for(A=1,D=y.length;A<D;A++)k=(L=y[A-1][2]).x,P=L.y,T=(L=y[A][0]).x,I=L.y,N=(L=y[A][1]).x,W=L.y,V.push(["C",k,P,T,I,N,W]);return V})((e=this.pos)!=null?e:[],d),d=t[0]}return d[0]="C",this.pos=[d[5],d[6]],this.reflection=[2*d[5]-d[3],2*d[6]-d[4]],t}function Ft(d,e){if(e===!1)return!1;for(var t=e,s=d.length;t<s;++t)if(d[t][0]=="M")return t;return!1}function Bs(d,e,t,s,i,a){for(var o=d.slice(e,t||void 0),r=s.slice(i,a||void 0),n=0,c={pos:[0,0],start:[0,0]},h={pos:[0,0],start:[0,0]};o[n]=Pt.call(c,o[n]),r[n]=Pt.call(h,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(Et.call(c,o[n]))),Array.prototype.splice.apply(r,[n,1].concat(Et.call(h,r[n])))):(o[n]=Tt.call(c,o[n]),r[n]=Tt.call(h,r[n])),++n!=o.length||n!=r.length;)n==o.length&&o.push(["C",c.pos[0],c.pos[1],c.pos[0],c.pos[1],c.pos[0],c.pos[1]]),n==r.length&&r.push(["C",h.pos[0],h.pos[1],h.pos[0],h.pos[1],h.pos[0],h.pos[1]]);return{start:o,dest:r}}function Hs(d,e){var t=(function(a,o){for(var r,n=ze(a),c=ze(o),h=0,l=0,g=!1,p=!1;h!==!1||l!==!1;){if(g=Ft(n,h!==!1&&h+1),p=Ft(c,l!==!1&&l+1),h===!1){const u=Oe(r.start);h=u.height==0||u.width==0?n.push(n[0])-1:n.push(["M",u.x+u.width/2,u.y+u.height/2])-1}if(l===!1){const u=Oe(r.dest);l=u.height==0||u.width==0?c.push(c[0])-1:c.push(["M",u.x+u.width/2,u.y+u.height/2])-1}r=Bs(n,h,g,c,l,p),n=n.slice(0,h).concat(r.start,g===!1?[]:n.slice(g)),c=c.slice(0,l).concat(r.dest,p===!1?[]:c.slice(p)),h=g!==!1&&h+r.start.length,l=p!==!1&&l+r.dest.length}return{start:n,dest:c}})(d,e),s=t.start,i=t.dest;return function(a){var o=s.map(function(r,n){return i[n].map(function(c,h){return h===0?c:r[h]+(i[n][h]-r[h])*a})});return o.map(r=>r.join(" ")).join(" ")}}let Ce=null,Ye=null;function It(d,e){const t=new Array(e);if(!O.isBrowser()){const i=Oe(ze(d)),a=i.x+i.width/2,o=i.y+i.height/2;
34for(let r=0;r<e;r++)t[r]={x:a,y:o};return t}Ce||(Ce=document.createElementNS("http://www.w3.org/2000/svg","svg"),Ce.setAttribute("width","0"),Ce.setAttribute("height","0"),Ce.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),Ye=document.createElementNS("http://www.w3.org/2000/svg","path"),Ce.appendChild(Ye),document.body.appendChild(Ce)),Ye.setAttribute("d",d||"M0 0");let s=0;try{s=Ye.getTotalLength()}catch{s=0}if(!s||!isFinite(s)){const i=Oe(ze(d)),a=i.x+i.width/2,o=i.y+i.height/2;for(let r=0;r<e;r++)t[r]={x:a,y:o};return t}for(let i=0;i<e;i++)try{const a=Ye.getPointAtLength(i/e*s);t[i]={x:a.x,y:a.y}}catch{t[i]={x:0,y:0}}return t}function Xt(d){if(!d||typeof d!="string")return null;if(d[0]==="#"){let t=d.slice(1);t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const s=parseInt(t,16);return[s>>16&255,s>>8&255,255&s,1]}const e=d.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return e?[+e[1],+e[2],+e[3],e[4]!==void 0?+e[4]:1]:null}function Ns(d,e,t){return`rgba(${Math.round(d[0]+(e[0]-d[0])*t)},${Math.round(d[1]+(e[1]-d[1])*t)},${Math.round(d[2]+(e[2]-d[2])*t)},${d[3]+(e[3]-d[3])*t})`}class nt{constructor(e,t,s){this.el=e,this.duration=t??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(e){return this._attrTarget=e,this._schedule(),this}plot(e,t){return this._plotTarget=e,t&&(this._plotAlgorithm=t),this._schedule(),this}after(e){return this._afterCb=e,this._schedule(),this}during(e){return this._duringCb=e,this._schedule(),this}animate(e,t){const s=new nt(this.el,e,t);return this._next=s,s._root=this._root||this,s}_schedule(){const e=this._root||this;e._scheduled||(e._scheduled=!0,queueMicrotask(()=>e._executeChain()))}_executeChain(){const e=[];let t=this;for(;t;)e.push(t),t=t._next;let s=0;e.forEach(i=>{s+=i.delay,i._execute(s),s+=i.duration})}_execute(e){const t=this.el,s=this.duration;if(s<=1){const a=()=>{this._attrTarget&&t.attr(this._attrTarget),this._plotTarget&&t.plot(this._plotTarget),this._afterCb&&this._afterCb.call(t)};return void(e>0?setTimeout(a,e):a())}const i=()=>{const a={},o={},r={};if(this._attrTarget)for(const l of Object.keys(this._attrTarget)){const g=t.attr(l);a[l]=g;const p=Xt(g),u=Xt(String(this._attrTarget[l]));p&&u&&(o[l]=p,r[l]=u)}let n=null;if(this._plotTarget){const l=t.attr("d")||"";try{n=this._plotAlgorithm==="polygons"?(function(g,p,u=96){const x=It(g,u),b=It(p,u);let f=0,m=1/0;for(let y=0;y<u;y++){let v=0;for(let C=0;C<u;C++){const S=x[(C+y)%u],L=b[C],A=S.x-L.x,D=S.y-L.y;if(v+=A*A+D*D,v>=m)break}v<m&&(m=v,f=y)}const w=new Array(u);for(let y=0;y<u;y++)w[y]=x[(y+f)%u];return function(y){let v="";for(let C=0;C<u;C++){const S=w[C],L=b[C],A=S.x+(L.x-S.x)*y,D=S.y+(L.y-S.y)*y;v+=(C===0?"M":"L")+A.toFixed(3)+" "+D.toFixed(3)+" "}return v+"Z"}})(l,this._plotTarget):Hs(l,this._plotTarget)}catch{n=null}}const c=performance.now(),h=l=>{const g=l-c,p=Math.min(g/s,1),u=(x=p,-Math.cos(x*Math.PI)/2+.5);var x;if(this._attrTarget)if(p>=1)t.attr(this._attrTarget);else{const b={};for(const f of Object.keys(this._attrTarget))if(o[f]&&r[f])b[f]=Ns(o[f],r[f],u);else{const m=parseFloat(a[f]),w=parseFloat(this._attrTarget[f]);isNaN(m)||isNaN(w)||(b[f]=m+(w-m)*u)}t.attr(b)}n&&p<1&&t.attr("d",n(u)),this._duringCb&&this._duringCb(u),p<1?B.requestAnimationFrame(h):(this._plotTarget&&t.attr("d",this._plotTarget),this._afterCb&&this._afterCb.call(t))};B.requestAnimationFrame(h)};e>0?setTimeout(i,e):i()}}var lt;function _e(){const d=B.createElementNS(U,"svg"),e=new Re(d);return e.attr({xmlns:U}),e}(lt=ee).prototype.filterWith=function(d){const e=new zs;this._filter=e;let t=this.node;for(;t&&t.nodeName!=="svg";)t=t.parentNode;if(t){let s=t.querySelector("defs");s||(s=B.createElementNS(U,"defs"),t.insertBefore(s,t.firstChild)),s.appendChild(e.node)}return d(new Ys(e)),this.attr("filter","url(#"+e._id+")"),this},lt.prototype.unfilter=function(d){return this._filter&&(this.node.removeAttribute("filter"),d&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this},lt.prototype.filterer=function(){return this._filter},(function(d){d.prototype.animate=function(e,t){return new nt(this,e,t)}})(ee),(function(d){d.prototype.draggable=function(e){if(e===!1)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const t=this,s=e||{},i=a=>
34{if(a.button&&a.button!==0)return;a.stopPropagation();const o=a.type==="touchstart"?a.touches[0]:a,r=t.node,n=parseFloat(r.getAttribute("x"))||0,c=parseFloat(r.getAttribute("y"))||0,h=o.clientX,l=o.clientY,g=r.ownerSVGElement;let p=null;g&&(p=g.getScreenCTM());const u=b=>{const f=b.type==="touchmove"?b.touches[0]:b;let m=f.clientX-h,w=f.clientY-l;p&&(m/=p.a,w/=p.d);let y=n+m,v=c+w;const C=parseFloat(r.getAttribute("width"))||0,S=parseFloat(r.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+S>s.maxY&&(v=s.maxY-S);const L=new CustomEvent("dragmove",{detail:{handler:{move:function(A,D){r.setAttribute("x",A),r.setAttribute("y",D)}},box:{x:y,y:v,w:C,h:S,x2:y+C,y2:v+S}}});r.dispatchEvent(L)},x=()=>{O.isBrowser()&&(document.removeEventListener("mousemove",u),document.removeEventListener("touchmove",u),document.removeEventListener("mouseup",x),document.removeEventListener("touchend",x))};O.isBrowser()&&(document.addEventListener("mousemove",u),document.addEventListener("touchmove",u),document.addEventListener("mouseup",x),document.addEventListener("touchend",x))};return t.node.addEventListener("mousedown",i),t.node.addEventListener("touchstart",i),t._dragCleanup=()=>{t.node.removeEventListener("mousedown",i),t.node.removeEventListener("touchstart",i)},t}})(ee),(function(d){d.prototype.select=function(e){if(e===!1)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const t=this,{createHandle:s,updateHandle:i}=e,a=document.createElementNS(U,"g");a.setAttribute("class","svg_select_points");const o=t.node.parentNode;o&&o.appendChild(a);const r={},n=["t","b","l","r","lt","rt","lb","rb"];n.forEach((h,l)=>{const g=new Re(document.createElementNS(U,"g"));a.appendChild(g.node);const p=s(g,[0,0],l,[],h);r[h]={group:g,handle:p}});const c=()=>{const h=parseFloat(t.attr("x"))||0,l=parseFloat(t.attr("y"))||0,g=parseFloat(t.attr("width"))||0,p=parseFloat(t.attr("height"))||0,u=t.node.getAttribute("transform");u?a.setAttribute("transform",u):a.removeAttribute("transform");const x={t:[h+g/2,l],b:[h+g/2,l+p],l:[h,l+p/2],r:[h+g,l+p/2],lt:[h,l],rt:[h+g,l],lb:[h,l+p],rb:[h+g,l+p]};n.forEach(b=>{r[b]&&x[b]&&i(r[b].group,x[b])})};return c(),t._selectHandles=a,t._selectHandlesMap=r,t._updateSelectPositions=c,t._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),t._selectHandles=null,t._selectHandlesMap=null,t._updateSelectPositions=null},t},d.prototype.resize=function(e){if(e===!1)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;const t=this,s=t._selectHandlesMap;if(!s)return t;const i=[],a=o=>{const r=s[o];if(!r||!r.group||!r.group.node)return;const n=r.group.node,c=h=>{if(h.button&&h.button!==0)return;h.stopPropagation();const l=(h.type==="touchstart"?h.touches[0]:h).clientX,g=t.node.ownerSVGElement;let p=null;g&&(p=g.getScreenCTM());const u=parseFloat(t.attr("x"))||0,x=parseFloat(t.attr("width"))||0,b=m=>{let w=(m.type==="touchmove"?m.touches[0]:m).clientX-l;p&&(w/=p.a);let y=u,v=x;o==="l"?(y=u+w,v=x-w):o==="r"&&(v=x+w),v<0&&(v=0),t.attr({x:y,width:v}),t._updateSelectPositions&&t._updateSelectPositions();const C=new CustomEvent("resize",{detail:{el:t}});t.node.dispatchEvent(C)},f=()=>{O.isBrowser()&&(document.removeEventListener("mousemove",b),document.removeEventListener("touchmove",b),document.removeEventListener("mouseup",f),document.removeEventListener("touchend",f));const m=new CustomEvent("resize",{detail:{el:t}});t.node.dispatchEvent(m)};O.isBrowser()&&(document.addEventListener("mousemove",b),document.addEventListener("touchmove",b),document.addEventListener("mouseup",f),document.addEventListener("touchend",f))};n.addEventListener("mousedown",c),n.addEventListener("touchstart",c),i.push(()=>{n.removeEventListener("mousedown",c),n.removeEventListener("touchstart",c)})};return a("l"),a("r"),t._resizeCleanup=()=>{i.forEach(o=>o())},t}})(ee),_e.xlink="http://www.w3.org/1999/xlink",O.isBrowser()&&window.SVG===void 0&&(window.SVG=_e),O.isBrowser()?(window.SVG===void 0&&(window.SVG=_e),window.Apex===void 0&&(window.Apex={})):typeof global<"u"&&(global.Apex===void 0&&(global.Apex={}),global.SVG===void 0&&(global.SVG=_e));const Rt=class ut{static registerFeatures(e){for(const[t,s]of Object.entries(e))ut._featureRegistry.set(t,s)}constructor(e){this.ctx=e,this.w=e.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 Se(this.w,this.ctx),this.ctx.axes=new rs(this.w,this.ctx),this.ctx.core=new ws(this.ctx.el,this.w,this.ctx),this.ctx.config=new Fe({}),this.ctx.data=new fe(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new At(this.w,this.ctx),this.ctx.graphics=new F(this.w,this.ctx),this.ctx.coreUtils=new J(this.w),this.ctx.crosshairs=new at(this.w),this.ctx.events=new as(this.w,this.ctx),this.ctx.fill=new le(this.w),this.ctx.localization=new os(this.w),this.ctx.options=new we,this.ctx.responsive=new ns(this.w),this.ctx.series=new K(this.w,{toggleDataSeries:(...t)=>{var s;return(s=this.ctx.legend)==null?void 0:s.legendHelpers.toggleDataSeries(...t)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...t)=>this.ctx.updateHelpers._updateSeries(...t)}),this.ctx.theme=new ls(this.w),this.ctx.formatters=new Te(this.w),this.ctx.titleSubtitle=new hs(this.w),this.ctx.dimensions=new We(this.w,this.ctx),this.ctx.updateHelpers=new vs(this.w,this.ctx);const e=new Ls(this.w,this.ctx);this.w.globals.tooltip=e,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){const e=ut._featureRegistry,t=this.w,s=this.ctx,i=e.get("exports");s.exports=i?new i(t,s):null;const a=e.get("legend");s.legend=a?new a(t,s):null;const o=e.get("morphTypeChange");s.morphTypeChange=o?new o(t,s):null;const r=e.get("drilldown");s.drilldown=r?new r(t,s):null;const n=e.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var l;
34return!this._toolbar&&n&&(this._toolbar=new n(t,this)),(l=this._toolbar)!=null?l:null},configurable:!0});const c=e.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var l;return!this._zoomPanSelection&&c&&(this._zoomPanSelection=new c(t,this)),(l=this._zoomPanSelection)!=null?l:null},configurable:!0});const h=e.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var l;return!this._keyboardNavigation&&h&&(this._keyboardNavigation=new h(t,this)),(l=this._keyboardNavigation)!=null?l:null},configurable:!0})}};j(Rt,"_featureRegistry",new Map);let $e=Rt;class zt{constructor(e){this.ctx=e,this.w=e.w}clear({isUpdating:e}){e||(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),tt.invalidateAll(this.w),e?(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:e})}killSVG(e){e.each(function(){this.removeClass("*"),this.off()},!0),e.clear()}clearDomElements({isUpdating:e}){const t=this.w.dom;if(O.isBrowser()&&t.Paper){const s=t.Paper.node;s.parentNode&&s.parentNode.parentNode&&!e&&(s.parentNode.parentNode.style.minHeight="unset");const i=t.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(t.Paper),t.Paper.remove()}t.elWrap=null,t.elGraphical=null,t.elLegendWrap=null,t.elLegendForeign=null,t.baseEl=null,t.elGridRect=null,t.elGridRectMask=null,t.elGridRectBarMask=null,t.elGridRectMarkerMask=null,t.elForecastMask=null,t.elNonForecastMask=null,t.elDefs=null}}const ht=new WeakMap;class ce{constructor(e,t){j(this,"core"),j(this,"responsive"),j(this,"axes"),j(this,"grid"),j(this,"graphics"),j(this,"coreUtils"),j(this,"crosshairs"),j(this,"events"),j(this,"fill"),j(this,"localization"),j(this,"options"),j(this,"series"),j(this,"theme"),j(this,"formatters"),j(this,"titleSubtitle"),j(this,"dimensions"),j(this,"updateHelpers"),j(this,"tooltip"),j(this,"data"),j(this,"animations"),j(this,"exports"),j(this,"legend"),j(this,"toolbar"),j(this,"zoomPanSelection"),j(this,"keyboardNavigation"),j(this,"annotations"),j(this,"morphTypeChange"),j(this,"timeScale"),j(this,"_keyboardNavigation"),j(this,"windowResizeHandler"),j(this,"parentResizeHandler"),j(this,"publicMethods",[]),j(this,"eventList",[]),j(this,"config"),this.opts=t,this.ctx=this,this.w=new ss(t).init(),this.el=e,this.w.globals.cuid=M.randomId(),this.w.globals.chartID=this.w.config.chart.id?M.escapeString(this.w.config.chart.id):this.w.globals.cuid,(function(s){const i=s.config.chart.animations;i&&i.respectReducedMotion!==!1&&wt()&&(i.enabled=!1,i.dynamicAnimation&&(i.dynamicAnimation.enabled=!1))})(this.w),new $e(this).initModules(),this.lastUpdateOptions=null,this.create=this.create.bind(this),O.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){var e,t;return(t=(e=this.w)==null?void 0:e.config)!=null&&t.chart?new Promise((s,i)=>{var a;if(M.elementExists(this.el)){Apex._chartInstances===void 0&&(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]),O.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),(function(g,p){if(O.isSSR())return;let u=!1;if(g.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const b=g.getBoundingClientRect();g.style.display!=="none"&&b.width!==0||(u=!0)}const x=new ResizeObserver(b=>{u&&p.call(g,b),u=!0});g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(g.children).forEac
34h(b=>x.observe(b)):x.observe(g),ht.set(p,x)})(this.el.parentNode,this.parentResizeHandler);const n=this.el.getRootNode&&this.el.getRootNode(),c=M.is("ShadowRoot",n),h=this.el.ownerDocument;let l=c?n.getElementById("apexcharts-css"):h.getElementById("apexcharts-css");if(!l){l=B.createElementNS("http://www.w3.org/1999/xhtml","style"),l.id="apexcharts-css",l.textContent=`@keyframes opaque {
35  0% {
36    opacity: 0
37  }
38
39  to {
40    opacity: 1
41  }
42}
43
44@keyframes resizeanim {
45
46  0%,
47  to {
48    opacity: 0
49  }
50}
51
52.apexcharts-canvas {
53  position: relative;
54  direction: ltr !important;
55  user-select: none;
56  /* Focus indicator colour. Themes override below. */
57  --apexcharts-focus-color: #008FFB;
58}
59
60/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */
61.apexcharts-canvas .apexcharts-theme-dark,
62.apexcharts-theme-dark.apexcharts-canvas {
63  --apexcharts-focus-color: #FFD500;
64}
65.apexcharts-canvas.apexcharts-high-contrast,
66.apexcharts-high-contrast.apexcharts-canvas {
67  --apexcharts-focus-color: #FFFF00;
68}
69
70/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */
71.apexcharts-sr-status {
72  position: absolute;
73  width: 1px;
74  height: 1px;
75  padding: 0;
76  margin: -1px;
77  overflow: hidden;
78  clip: rect(0, 0, 0, 0);
79  white-space: nowrap;
80  border: 0;
81}
82
83/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */
84@media (prefers-reduced-motion: reduce) {
85  .apexcharts-canvas *,
86  .apexcharts-canvas *::before,
87  .apexcharts-canvas *::after {
88    animation-duration: 0.01ms !important;
89    animation-iteration-count: 1 !important;
90    transition-duration: 0.01ms !important;
91  }
92}
93
94.apexcharts-canvas ::-webkit-scrollbar {
95  -webkit-appearance: none;
96  width: 6px
97}
98
99.apexcharts-canvas ::-webkit-scrollbar-thumb {
100  border-radius: 4px;
101  background-color: rgba(0, 0, 0, .5);
102  box-shadow: 0 0 1px rgba(255, 255, 255, .5);
103  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
104}
105
106.apexcharts-inner {
107  position: relative
108}
109
110.apexcharts-text tspan {
111  font-family: inherit
112}
113
114rect.legend-mouseover-inactive,
115.legend-mouseover-inactive rect,
116.legend-mouseover-inactive path,
117.legend-mouseover-inactive circle,
118.legend-mouseover-inactive line,
119.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
120.legend-mouseover-inactive text.apexcharts-yaxis-label {
121  transition: .15s ease all;
122  opacity: .2
123}
124
125.apexcharts-legend-text {
126  padding-left: 15px;
127  margin-left: -15px;
128}
129
130.apexcharts-legend-series[role="button"]:focus {
131  outline: 2px solid var(--apexcharts-focus-color, #008FFB);
132  outline-offset: 2px;
133}
134
135.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {
136  outline: none;
137}
138
139.apexcharts-legend-series[role="button"]:focus-visible {
140  outline: 2px solid var(--apexcharts-focus-color, #008FFB);
141  outline-offset: 2px;
142}
143
144.apexcharts-series-collapsed {
145  opacity: 0
146}
147
148.apexcharts-canvas svg:focus:not(:focus-visible) {
149  outline: none;
150}
151
152/* Keyboard navigation focus indicator on SVG data elements.
153   SVG elements don't support CSS outline, so we use stroke. */
154.apexcharts-bar-area.apexcharts-keyboard-focused,
155.apexcharts-candlestick-area.apexcharts-keyboard-focused,
156.apexcharts-boxPlot-area.apexcharts-keyboard-focused,
157.apexcharts-rangebar-area.apexcharts-keyboard-focused,
158.apexcharts-pie-area.apexcharts-keyboard-focused,
159.apexcharts-heatmap-rect.apexcharts-keyboard-focused,
160.apexcharts-treemap-rect.apexcharts-keyboard-focused {
161  stroke: var(--apexcharts-focus-color, #008FFB);
162  stroke-width: 2;
163  stroke-opacity: 1;
164}
165
166.apexcharts-tooltip {
167  --apx-tt-bg: #ffffff;
168  --apx-tt-border: rgba(15, 23, 42, 0.06);
169  /* Layered shadow: tight inner contact + soft outer drop. The two Y
170   * offsets are exposed as variables so they flip in sync with the
171   * arrow when the tooltip is below the data point \u2014 see the
172   * \`[data-placement="bottom"]\` rule further down. */
173  --apx-tt-shadow-y-mid: 8px;
174  --apx-tt-shadow-y-far: 16px;
175  --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);
176  --apx-tt-arrow-bg: var(--apx-tt-bg);
177  /* Two stacked drop-shadows: the first is a tight contact halo for
178   * edge definition against light chart backgrounds; the second is a
179   * softer directional drop that lifts the arrow off the surface.
180   * \`--apx-tt-arrow-drop-y\` is the Y offset of the directional drop;
181   * a per-placement rule below flips it to negative when the tooltip
182   * is below the data point (arrow on top) so the shadow always
183   * casts outward instead of into the tooltip body. */
184  --apx-tt-arrow-drop-y: 2px;
185  --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));
186  --apx-tt-color: #0f172a;
187  --apx-tt-color-muted: rgba(15, 23, 42, 0.55);
188  border-radius: 8px;
189  background: var(--apx-tt-bg);
190  border: 1px solid var(--apx-tt-border);
191  box-shadow: var(--apx-tt-shadow);
192  color: var(--apx-tt-color);
193  cursor: default;
194  font-size: 13px;
195  left: 0;
196  top: 0;
197  opacity: 0;
198  pointer-events: none;
199  position: absolute;
200  display: flex;
201  flex-direction: column;
202  padding: 2px 0;
203  white-space: nowrap;
204  z-index: 12;
205  transition: opacity .12s ease
206}
207
208/* While the tooltip is visible, smoothly animate position changes
209 * between data points. Kept short (160 ms) and ease-out so it stays
210 * responsive \u2014 too long would feel laggy when sweeping across many
211 * points fast. The position transition is only attached after the
212 * first paint (Position.applyTooltipPosition flips \`data-positioned\`
213 * once the tooltip has been placed) so the *first* show doesn't slide
214 * the tooltip in from the previously-stale (0,0) coordinates. */
215.apexcharts-tooltip.apexcharts-active {
216  opacity: 1;
217  transition: opacity .12s ease
218}
219.apexcharts-tooltip.apexcharts-active[data-positioned="true"] {
220  transition: opacity .12s ease, left .16s ease-out, top .16s ease-out
221}
222
223.apexcharts-tooltip.apexcharts-theme-light {
224  /* defaults already set above; class kept for backward-compat selectors */
225}
226
227.apexcharts-tooltip.apexcharts-theme-dark {
228  --apx-tt-bg: #1c1c1f;
229  --apx-tt-border: rgba(255, 255, 255, 0.08);
230  --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);
231  --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));
232  --apx-tt-color: #f3f4f6;
233  --apx-tt-color-muted: rgba(243, 244, 246, 0.55);
234}
235
236.apexcharts-tooltip * {
237  font-family: inherit
238}
239
240.apexcharts-tooltip-title {
241  padding: 8px 12px 4px;
242  font-size: 12px;
243  font-weight: 600;
244  letter-spacing: 0.01em;
245  color: var(--apx-tt-color-muted);
246  background: transparent;
247  border-bottom: none;
248  margin-bottom: 0
249}
250
251.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,
252.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
253  background: transparent;
254  border-bottom: none
255}
256
257/* \`fillSeriesColor\`: each series-group already paints itself with the
258 * series colour. Drop the glass body entirely (transparent bg, no
259 * border, no backdrop-filter, no padding) and clip the coloured
260 * series-group(s) to the tooltip's rounded corners so they fill the
261 * shell edge-to-edge. Text inside the coloured group is forced to
262 * white for contrast. */
263.apexcharts-tooltip.apexcharts-tooltip-fill-series {
264  background: transparent;
265  -webkit-backdrop-filter: none;
266  backdrop-filter: none;
267  border: none;
268  padding: 0;
269  overflow: hidden;
270  color: #fff
271}
272
273.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title {
274  background: rgba(0, 0, 0, 0.22);
275  color: #fff;
276  opacity: 1;
277  padding: 6px 12px
278}
279
280.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group {
281  color: #fff
282}
283
284/* Arrow connector \u2014 sits *entirely outside* the tooltip body. Shares
285 * the body's solid fill so it reads as a single shape. \`filter:
286 * drop-shadow\` traces the clipped triangle outline (a regular
287 * \`box-shadow\` would be erased by the \`clip-path\`). */
288.apexcharts-tooltip-arrow {
289  position: absolute;
290  width: 7px;
291  height: 14px;
292  background: var(--apx-tt-arrow-bg);
293  /* The variable already contains the full \`drop-shadow(...) ...\` filter
294   * chain (stacked shadows) so it's applied raw. */
295  -webkit-filter: var(--apx-tt-arrow-shadow);
296  filter: var(--apx-tt-arrow-shadow);
297  pointer-events: none;
298  top: calc(var(--apx-tt-arrow-y, 50%) - 7px)
299}
300
301.apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow {
302  left: -7px;
303  clip-path: polygon(0 50%, 100% 0, 100% 100%)
304}
305
306.apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow {
307  right: -7px;
308  clip-path: polygon(100% 50%, 0 0, 0 100%)
309}
310
311/* Vertical arrow variants: tooltip is above/below the data point and the
312 * arrow points down/up. The base rule above uses \`--apx-tt-arrow-y\` for
313 * left/right placement; for top/bottom we re-orient the rectangle and
314 * use \`--apx-tt-arrow-x\` (set by applyTooltipPosition). */
315.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow,
316.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {
317  width: 14px;
318  height: 7px;
319  top: auto;
320  left: calc(var(--apx-tt-arrow-x, 50%) - 7px)
321}
322
323.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow {
324  bottom: -7px;
325  clip-path: polygon(50% 100%, 0 0, 100% 0)
326}
327
328.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {
329  top: -7px;
330  clip-path: polygon(50% 0, 0 100%, 100% 100%)
331}
332
333/* When the tooltip is flipped below the data point (arrow on top
334 * pointing up), the default downward-biased shadows leave the top
335 * edge of both the body *and* the arrow undefined. Flipping every
336 * Y offset to negative casts the entire elevation upward so the
337 * shadow falls between the tooltip and the bar above. */
338.apexcharts-tooltip[data-placement="bottom"] {
339  --apx-tt-shadow-y-mid: -8px;
340  --apx-tt-shadow-y-far: -16px;
341  --apx-tt-arrow-drop-y: -2px
342}
343
344.apexcharts-tooltip-text-goals-value,
345.apexcharts-tooltip-text-y-value,
346.apexcharts-tooltip-text-z-value {
347  display: inline-block;
348  margin-left: 5px;
349  font-weight: 600
350}
351
352.apexcharts-tooltip-text-goals-label:empty,
353.apexcharts-tooltip-text-goals-value:empty,
354.apexcharts-tooltip-text-y-label:empty,
355.apexcharts-tooltip-text-y-value:empty,
356.apexcharts-tooltip-text-z-value:empty,
357.apexcharts-tooltip-title:empty {
358  display: none
359}
360
361.apexcharts-tooltip-text-goals-label,
362.apexcharts-tooltip-text-goals-value {
363  padding: 6px 0 5px
364}
365
366.apexcharts-tooltip-goals-group,
367.apexcharts-tooltip-text-goals-label,
368.apexcharts-tooltip-text-goals-value {
369  display: flex
370}
371
372.apexcharts-tooltip-text-goals-label:not(:empty),
373.apexcharts-tooltip-text-goals-value:not(:empty) {
374  margin-top: -6px
375}
376
377.apexcharts-tooltip-marker {
378  display: inline-flex;
379  align-items: center;
380  justify-content: center;
381  position: relative;
382  width: 12px;
383  height: 12px;
384  margin-right: 6px;
385  vertical-align: middle;
386  color: inherit;
387}
388
389.apexcharts-tooltip-marker svg {
390  width: 100%;
391  height: 100%;
392  display: block;
393}
394
395.apexcharts-tooltip-series-group {
396  padding: 4px 12px;
397  display: none;
398  gap: 8px;
399  text-align: left;
400  justify-content: left;
401  align-items: center
402}
403
404.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
405  opacity: 1
406}
407
408.apexcharts-tooltip-series-group.apexcharts-active:last-child,
409.apexcharts-tooltip-series-group:last-child {
410  padding-bottom: 8px
411}
412
413.apexcharts-tooltip-y-group {
414  padding: 6px 0 5px
415}
416
417.apexcharts-custom-tooltip,
418.apexcharts-tooltip-box {
419  padding: 4px 8px
420}
421
422.apexcharts-tooltip-boxPlot {
423  display: flex;
424  flex-direction: column-reverse
425}
426
427.apexcharts-tooltip-box>div {
428  margin: 4px 0
429}
430
431.apexcharts-tooltip-box span.value {
432  font-weight: 700
433}
434
435.apexcharts-tooltip-rangebar {
436  padding: 5px 8px
437}
438
439.apexcharts-tooltip-rangebar .category {
440  font-weight: 600;
441  color: #777
442}
443
444.apexcharts-tooltip-rangebar .series-name {
445  font-weight: 700;
446  display: block;
447  margin-bottom: 5px
448}
449
450/* X/Y axis tooltips \u2014 small popovers that label the crosshair on the
451 * axes. Restyled to match the modern data-tooltip palette: solid white
452 * body with a subtle border + soft drop-shadow, smaller font, rounded
453 * corners. The arrows still use the CSS border-triangle technique
454 * (cheap, crisp at small sizes); their colours flow from CSS variables
455 * so light/dark themes only need one override per axis. */
456.apexcharts-xaxistooltip,
457.apexcharts-yaxistooltip {
458  --apx-axt-bg: #ffffff;
459  --apx-axt-border: rgba(15, 23, 42, 0.08);
460  --apx-axt-color: #0f172a;
461  --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12);
462  opacity: 0;
463  pointer-events: none;
464  color: var(--apx-axt-color);
465  font-size: 12px;
466  font-weight: 500;
467  text-align: center;
468  border-radius: 6px;
469  position: absolute;
470  z-index: 10;
471  background: var(--apx-axt-bg);
472  border: 1px solid var(--apx-axt-border);
473  box-shadow: var(--apx-axt-shadow)
474}
475
476.apexcharts-xaxistooltip.apexcharts-theme-dark,
477.apexcharts-yaxistooltip.apexcharts-theme-dark {
478  --apx-axt-bg: #1c1c1f;
479  --apx-axt-border: rgba(255, 255, 255, 0.1);
480  --apx-axt-color: #f3f4f6;
481  --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45)
482}
483
484.apexcharts-xaxistooltip {
485  padding: 4px 8px;
486  transition: .15s ease all
487}
488
489.apexcharts-xaxistooltip:after,
490.apexcharts-xaxistooltip:before {
491  left: 50%;
492  border: solid transparent;
493  content: " ";
494  height: 0;
495  width: 0;
496  position: absolute;
497  pointer-events: none
498}
499
500/* :before paints the 1px border outline of the triangle (slightly larger
501 * than :after); :after sits inside and paints the fill \u2014 leaves a 1px
502 * ring of :before visible at the edges. */
503.apexcharts-xaxistooltip:after {
504  border-color: transparent;
505  border-width: 5px;
506  margin-left: -5px
507}
508
509.apexcharts-xaxistooltip:before {
510  border-color: transparent;
511  border-width: 6px;
512  margin-left: -6px
513}
514
515.apexcharts-xaxistooltip-bottom:after,
516.apexcharts-xaxistooltip-bottom:before {
517  bottom: 100%
518}
519
520.apexcharts-xaxistooltip-top:after,
521.apexcharts-xaxistooltip-top:before {
522  top: 100%
523}
524
525.apexcharts-xaxistooltip-bottom:after {
526  border-bottom-color: var(--apx-axt-bg)
527}
528
529.apexcharts-xaxistooltip-bottom:before {
530  border-bottom-color: var(--apx-axt-border)
531}
532
533.apexcharts-xaxistooltip-top:after {
534  border-top-color: var(--apx-axt-bg)
535}
536
537.apexcharts-xaxistooltip-top:before {
538  border-top-color: var(--apx-axt-border)
539}
540
541.apexcharts-xaxistooltip.apexcharts-active {
542  opacity: 1;
543  transition: .15s ease all
544}
545
546.apexcharts-yaxistooltip {
547  padding: 3px 8px
548}
549
550.apexcharts-yaxistooltip:after,
551.apexcharts-yaxistooltip:before {
552  top: 50%;
553  border: solid transparent;
554  content: " ";
555  height: 0;
556  width: 0;
557  position: absolute;
558  pointer-events: none
559}
560
561.apexcharts-yaxistooltip:after {
562  border-color: transparent;
563  border-width: 5px;
564  margin-top: -5px
565}
566
567.apexcharts-yaxistooltip:before {
568  border-color: transparent;
569  border-width: 6px;
570  margin-top: -6px
571}
572
573.apexcharts-yaxistooltip-left:after,
574.apexcharts-yaxistooltip-left:before {
575  left: 100%
576}
577
578.apexcharts-yaxistooltip-right:after,
579.apexcharts-yaxistooltip-right:before {
580  right: 100%
581}
581
582
583.apexcharts-yaxistooltip-left:after {
584  border-left-color: var(--apx-axt-bg)
585}
586
587.apexcharts-yaxistooltip-left:before {
588  border-left-color: var(--apx-axt-border)
589}
590
591.apexcharts-yaxistooltip-right:after {
592  border-right-color: var(--apx-axt-bg)
593}
594
595.apexcharts-yaxistooltip-right:before {
596  border-right-color: var(--apx-axt-border)
597}
598
599.apexcharts-yaxistooltip.apexcharts-active {
600  opacity: 1
601}
602
603.apexcharts-yaxistooltip-hidden {
604  display: none
605}
606
607.apexcharts-xcrosshairs,
608.apexcharts-ycrosshairs {
609  pointer-events: none;
610  opacity: 0;
611  transition: .15s ease all
612}
613
614.apexcharts-xcrosshairs.apexcharts-active,
615.apexcharts-ycrosshairs.apexcharts-active {
616  opacity: 1;
617  transition: .15s ease all
618}
619
620.apexcharts-ycrosshairs-hidden {
621  opacity: 0
622}
623
624.apexcharts-selection-rect {
625  cursor: move
626}
627
628.svg_select_shape {
629  stroke-width: 1;
630  stroke-dasharray: 10 10;
631  stroke: black;
632  stroke-opacity: 0.1;
633  pointer-events: none;
634  fill: none;
635}
636
637.svg_select_handle {
638  stroke-width: 3;
639  stroke: black;
640  fill: none;
641}
642
643.svg_select_handle_r {
644  cursor: e-resize;
645}
646
647.svg_select_handle_l {
648  cursor: w-resize;
649}
650
651.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
652  cursor: crosshair
653}
654
655.apexcharts-svg.apexcharts-zoomable.hovering-pan {
656  cursor: move
657}
658
659.apexcharts-menu-icon,
660.apexcharts-pan-icon,
661.apexcharts-reset-icon,
662.apexcharts-selection-icon,
663.apexcharts-toolbar-custom-icon,
664.apexcharts-zoom-icon,
665.apexcharts-zoomin-icon,
666.apexcharts-zoomout-icon {
667  cursor: pointer;
668  /* WCAG 2.5.8 Target Size (Minimum): 24\xD724 CSS px hit target. */
669  width: 26px;
670  height: 24px;
671  line-height: 24px;
672  color: #6e8192;
673  text-align: center;
674  /* Reset native <button> chrome \u2014 these are styled via SVG icons. */
675  padding: 0;
676  margin: 0;
677  background: transparent;
678  border: 0;
679  border-radius: 5px;
680  display: inline-flex;
681  align-items: center;
682  justify-content: center;
683  transition: background-color .12s ease, color .12s ease;
684}
685
686.apexcharts-menu-icon svg,
687.apexcharts-pan-icon svg,
688.apexcharts-reset-icon svg,
689.apexcharts-selection-icon svg,
690.apexcharts-zoom-icon svg,
691.apexcharts-zoomin-icon svg,
692.apexcharts-zoomout-icon svg {
693  width: 18px;
694  height: 18px;
695  fill: none;
696  stroke: currentColor;
697  stroke-width: 2;
698  stroke-linecap: round;
699  stroke-linejoin: round
700}
701
702.apexcharts-theme-dark .apexcharts-menu-icon,
703.apexcharts-theme-dark .apexcharts-pan-icon,
704.apexcharts-theme-dark .apexcharts-reset-icon,
705.apexcharts-theme-dark .apexcharts-selection-icon,
706.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,
707.apexcharts-theme-dark .apexcharts-zoom-icon,
708.apexcharts-theme-dark .apexcharts-zoomin-icon,
709.apexcharts-theme-dark .apexcharts-zoomout-icon {
710  color: #d4d6dc
711}
712
713.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,
714.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,
715.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,
716.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected {
717  background: rgba(0, 143, 251, 0.12);
718  color: #008ffb
719}
720
721.apexcharts-theme-light .apexcharts-menu-icon:hover,
722.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,
723.apexcharts-theme-light .apexcharts-reset-icon:hover,
724.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,
725.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,
726.apexcharts-theme-light .apexcharts-zoomin-icon:hover,
727.apexcharts-theme-light .apexcharts-zoomout-icon:hover {
728  background: rgba(15, 23, 42, 0.06);
729  color: #1f2937
730}
731
732.apexcharts-theme-dark .apexcharts-menu-icon:hover,
733.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,
734.apexcharts-theme-dark .apexcharts-reset-icon:hover,
735.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,
736.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,
737.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,
738.apexcharts-theme-dark .apexcharts-zoomout-icon:hover {
739  background: rgba(255, 255, 255, 0.08);
740  color: #fff
741}
742
743.apexcharts-menu-icon,
744.apexcharts-selection-icon {
745  position: relative
746}
747
748.apexcharts-toolbar {
749  position: absolute;
750  z-index: 11;
751  display: inline-flex;
752  align-items: center;
753  gap: 1px;
754  padding: 3px;
755  border-radius: 8px;
756  background: rgba(255, 255, 255, 0.85);
757  backdrop-filter: blur(8px);
758  -webkit-backdrop-filter: blur(8px);
759}
760
761.apexcharts-theme-dark .apexcharts-toolbar {
762  background: rgba(28, 28, 31, 0.82);
763}
764
765.apexcharts-menu {
766  background: rgba(255, 255, 255, 0.95);
767  backdrop-filter: blur(8px);
768  -webkit-backdrop-filter: blur(8px);
769  position: absolute;
770  top: calc(100% + 4px);
771  border: 1px solid rgba(15, 23, 42, 0.08);
772  border-radius: 8px;
773  padding: 4px;
774  right: 0;
775  opacity: 0;
776  min-width: 120px;
777  transition: opacity .15s ease, transform .15s ease;
778  transform: translateY(-2px);
779  pointer-events: none;
780  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06)
781}
782
783.apexcharts-menu.apexcharts-menu-open {
784  opacity: 1;
785  transform: translateY(0);
786  pointer-events: all
787}
788
789.apexcharts-menu-item {
790  padding: 6px 9px;
791  font-size: 12px;
792  border-radius: 5px;
793  cursor: pointer
794}
795
796.apexcharts-theme-light .apexcharts-menu-item:hover {
797  background: rgba(15, 23, 42, 0.06)
798}
799
800.apexcharts-theme-dark .apexcharts-menu {
801  background: rgba(28, 28, 31, 0.92);
802  border-color: rgba(255, 255, 255, 0.08);
803  color: #f3f4f6;
804  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4)
805}
806
807.apexcharts-theme-dark .apexcharts-menu-item:hover {
808  background: rgba(255, 255, 255, 0.08)
809}
810
811@media screen and (min-width:768px) {
812  .apexcharts-canvas:hover .apexcharts-toolbar {
813    opacity: 1
814  }
815}
816
817/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */
818.apexcharts-toolbar:focus-within {
819  opacity: 1
820}
821
822/* Focus indicator for toolbar icon buttons */
823.apexcharts-menu-icon:focus-visible,
824.apexcharts-pan-icon:focus-visible,
825.apexcharts-reset-icon:focus-visible,
826.apexcharts-selection-icon:focus-visible,
827.apexcharts-toolbar-custom-icon:focus-visible,
828.apexcharts-zoom-icon:focus-visible,
829.apexcharts-zoomin-icon:focus-visible,
830.apexcharts-zoomout-icon:focus-visible {
831  outline: 2px solid var(--apexcharts-focus-color, #008FFB);
832  outline-offset: 1px;
833  border-radius: 5px
834}
835
836/* Focus indicator for hamburger menu items */
837.apexcharts-menu-item:focus-visible {
838  outline: 2px solid var(--apexcharts-focus-color, #008FFB);
839  outline-offset: -2px;
840  background: #eee
841}
842
843.apexcharts-canvas .apexcharts-element-hidden,
844.apexcharts-datalabel.apexcharts-element-hidden,
845.apexcharts-hide .apexcharts-series-points {
846  opacity: 0;
847}
848
849.apexcharts-hidden-element-shown {
850  opacity: 1;
851  transition: 0.25s ease all;
852}
853
854.apexcharts-datalabel,
855.apexcharts-datalabel-label,
856.apexcharts-datalabel-value,
857.apexcharts-datalabels,
858.apexcharts-pie-label,
859.apexcharts-pie-name-label,
860.apexcharts-pie-name-label-group,
861.apexcharts-pie-label-connector {
862  cursor: default;
863  pointer-events: none
864}
865
866.apexcharts-pie-label-connector {
867  fill: none
868}
869
870.apexcharts-pie-label-delay {
871  opacity: 0;
872  animation-name: opaque;
873  animation-duration: .3s;
874  animation-fill-mode: forwards;
875  animation-timing-function: ease
876}
877
878.apexcharts-radialbar-label {
879  cursor: pointer;
880}
881
882.apexcharts-annotation-rect,
883.apexcharts-area-series .apexcharts-area,
884.apexcharts-gridline,
885.apexcharts-line,
886.apexcharts-point-annotation-label,
887.apexcharts-radar-series path:not(.apexcharts-marker),
888.apexcharts-radar-series polygon,
889.apexcharts-toolbar svg,
890.apexcharts-tooltip .apexcharts-marker,
891.apexcharts-xaxis-annotation-label,
892.apexcharts-yaxis-annotation-label,
893.apexcharts-zoom-rect,
894.no-pointer-events {
895  pointer-events: none
896}
897
898.apexcharts-tooltip-active .apexcharts-marker {
899  transition: .15s ease all
900}
901
902.apexcharts-radar-series .apexcharts-yaxis {
903  pointer-events: none;
904}
905
906.resize-triggers {
907  animation: 1ms resizeanim;
908  visibility: hidden;
909  opacity: 0;
910  height: 100%;
911  width: 100%;
912  overflow: hidden
913}
914
915.contract-trigger:before,
916.resize-triggers,
917.resize-triggers>div {
918  content: " ";
919  display: block;
920  position: absolute;
921  top: 0;
922  left: 0
923}
924
925.resize-triggers>div {
926  height: 100%;
927  width: 100%;
928  background: #eee;
929  overflow: auto
930}
931
932.contract-trigger:before {
933  overflow: hidden;
934  width: 200%;
935  height: 200%
936}
937
938.apexcharts-bar-goals-markers {
939  pointer-events: none
940}
941
942.apexcharts-bar-shadows {
943  pointer-events: none
944}
945
946.apexcharts-rangebar-goals-markers {
947  pointer-events: none
948}
949
950.apexcharts-drilldown-target {
951  cursor: pointer
952}
953
954.apexcharts-breadcrumb {
955  position: absolute;
956  z-index: 11;
957  display: inline-flex;
958  align-items: center;
959  gap: 2px;
960  font-size: 12px;
961  font-family: inherit;
962  padding: 2px 4px
963}
964
965.apexcharts-breadcrumb-item {
966  background: transparent;
967  border: none;
968  padding: 2px 6px;
969  border-radius: 3px;
970  font: inherit;
971  color: inherit;
972  cursor: pointer;
973  line-height: 1.2
974}
975
976.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {
977  background: rgba(0, 0, 0, 0.08)
978}
979
980.apexcharts-breadcrumb-arrow {
981  margin-right: 4px;
982  font-weight: 600;
983  user-select: none
984}
985
986.apexcharts-breadcrumb-current {
987  cursor: default;
988  font-weight: 600;
989  opacity: 0.85
990}
991
992.apexcharts-breadcrumb-separator {
993  opacity: 0.5;
994  user-select: none
995}
996
997.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {
998  background: rgba(255, 255, 255, 0.12)
999}
1000
1001.apexcharts-disable-transitions * {
1002  transition: none !important;
1003}`;const g=((a=this.opts.chart)==null?void 0:a.nonce)||this.w.config.chart.nonce;g&&l.setAttribute("nonce",g),c?n.prepend(l):this.w.config.chart.injectStyleSheet!==!1&&h.head.appendChild(l)}}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 c,h;const l=n instanceof Error?n:new Error(String(n)),g=l;g.chartId=(h=(c=this.w)==null?void 0:c.globals)==null?void 0:h.chartID,g.el=this.el,i(l)})}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(e,t){var s,i,a;const o=this.w;this.core||new $e(this).initModules();const r=this.w.globals;if(r.noData=!1,r.animationEnded=!1,!M.elementExists(this.el)||(this.responsive.checkResponsiveConfig(t),o.config.xaxis.convertedCatToNumeric&&new Ee(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=e;e.forEach((b,f)=>{b.hidden&&(n=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:f}))});const c=J.checkComboSeries(n,o.config.chart.type);r.comboCharts=c.comboCharts,r.comboBarCount=c.comboBarCount;const h=n.every(b=>b.data&&b.data.length===0);(n.length===0||h&&r.collapsedSeries.length<1)&&this.series.handleNoData(),O.isBrowser()&&this.events.setupEventHandlers();const l=this.data.parseData(n);this._writeParsedSeriesData(l.seriesData),this._writeParsedRangeData(l.rangeData),this._writeParsedCandleData(l.candleData),this._writeParsedLabelData(l.labelData),this._writeParsedAxisFlags(l.axisFlags),this.theme.init(),new ke(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 J(this.w).getLargestMarkerSize();const g=this.dimensions.plotCoords();this._writeLayoutCoords(g.layout);const p=this.core.xySettings();this.grid.createGridMask();const u=this.core.plotChartType(n,p),x=new Ae(this.w,this);return x.bringForward(),o.config.dataLabels.background.enabled&&x.dataLabelsBackgroun
1003d(),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"),{elGraph:u,xyRatios:p,dimensions:{plot:{left:o.layout.translateX,top:o.layout.translateY,width:o.layout.gridWidth,height:o.layout.gridHeight}}}}mount(e=null){const t=this,s=t.w;return new Promise((i,a)=>{var o,r,n,c,h,l,g,p,u;if(t.el===null)return a(new Error("Not enough data to display or target element not found"));(e===null||s.globals.allSeriesCollapsed)&&t.series.handleNoData(),t.grid=new At(t.w,t);const x=t.grid.drawGrid(),b=$e._featureRegistry.get("annotations");if(t.annotations=b?new b(t.w,{theme:t.theme,timeScale:t.timeScale}):null,(o=t.annotations)==null||o.drawImageAnnos(),(r=t.annotations)==null||r.drawTextAnnos(),s.config.grid.position==="back"&&(x&&s.dom.elGraphical.add(x.el),(n=x?.elGridBorders)!=null&&n.node&&s.dom.elGraphical.add(x.elGridBorders)),Array.isArray(e.elGraph))for(let w=0;w<e.elGraph.length;w++)s.dom.elGraphical.add(e.elGraph[w]);else s.dom.elGraphical.add(e.elGraph);s.config.grid.position==="front"&&(x&&s.dom.elGraphical.add(x.el),(c=x?.elGridBorders)!=null&&c.node&&s.dom.elGraphical.add(x.elGridBorders)),s.config.xaxis.crosshairs.position==="front"&&t.crosshairs.drawXCrosshairs(),s.config.yaxis[0].crosshairs.position==="front"&&t.crosshairs.drawYCrosshairs(),s.config.chart.type!=="treemap"&&t.axes.drawAxis(s.config.chart.type,x);const f=new Ie(this.w,this.ctx,x),m=new it(this.w,{theme:this.theme,timeScale:this.timeScale},x);if(x!==null&&(f.xAxisLabelCorrections(),m.setYAxisTextAlignments(),s.config.yaxis.map((w,y)=>{s.globals.ignoreYAxisIndexes.indexOf(y)===-1&&m.yAxisTitleRotate(y,w.opposite)})),(h=t.annotations)==null||h.drawAxesAnnotations(),!s.globals.noData){if(O.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&((l=t.w.globals.tooltip)==null||l.drawTooltip(e.xyRatios)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&((g=t.keyboardNavigation)==null||g.init()),O.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
1003onfig.chart.pan.enabled)&&((p=t.zoomPanSelection)==null||p.init({xyRatios:e.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&&((u=t.toolbar)==null||u.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||t.core.resizeNonAxisCharts(),i(t)})}destroy(){var e;O.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),(function(s,i){if(O.isSSR())return;const a=ht.get(i);a&&(a.disconnect(),ht.delete(i))})(this.el.parentNode,this.parentResizeHandler),clearTimeout((e=this.w.globals.resizeTimer)!=null?e:void 0));const t=this.w.config.chart.id;t&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEach((s,i)=>{s.id===M.escapeString(t)&&Apex._chartInstances.splice(i,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new zt(this.ctx).clear({isUpdating:!1})}updateOptions(e,t=!1,s=!0,i=!0,a=!0){const o=this.w;if(o.interact.selection=void 0,this.lastUpdateOptions){if(M.shallowEqual(this.lastUpdateOptions,e))return Promise.resolve(this);if(e.series&&this.lastUpdateOptions.series&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(e.series)){const r=$({},e),n=$({},this.lastUpdateOptions);if(delete r.series,delete n.series,M.shallowEqual(r,n))return Promise.resolve(this)}}return e.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((r,n)=>this.updateHelpers._extendSeries(r,n))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,t,s,i,a)}updateSeries(e=[],t=!0,s=!0){return this.data.resetParsingFlags(),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,s)}appendSeries(e,t=!0,s=!0){this.data.resetParsingFlags();const i=this.w.config.series.slice();return i.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,t,s)}appendData(e,t=!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(e[a]!==null&&e[a]!==void 0){const o=e[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,t&&(s.w.globals.initialSeries=M.clone(s.w.config.series)),this.update()}update(e){return new Promise((t,s)=>{if(this.lastUpdateOptions&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(e))return t(this);this.lastUpdateOptions=M.clone(e),new zt(this.ctx).clear({isUpdating:!0});const i=this.create(this.w.config.series,e??{});if(!i)return t(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,t(this)}).catch(a=>{s(a)})})}fastUpdate(e){return new Promise((t,s)=>{var i;try{const a=this.w,o=a.globals;o.shouldAnimate=e,o.dataChanged=!0,o.animationEnded=!1,tt.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(),c=a.dom.elGraphical.node;
1003c.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(u=>{var x;return(x=u.parentNode)==null?void 0:x.removeChild(u)});const h=this.core.plotChartType(a.config.series,n),l=c.querySelector(".apexcharts-grid"),g=Array.isArray(h)?h:[h];l&&a.config.grid.position==="front"?g.forEach(u=>{const x=u&&u.node?u.node:u;x&&c.insertBefore(x,l)}):g.forEach(u=>{a.dom.elGraphical.add(u)});const p=new Ae(a,this);p.bringForward(),a.config.dataLabels.background.enabled&&p.dataLabelsBackground(),O.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,t(this)}catch(a){s(a)}})}getSyncedCharts(){const e=this.getGroupedCharts();let t=[this];return e.length&&(t=[],e.forEach(s=>{t.push(s)})),t}getGroupedCharts(){return Apex._chartInstances.filter(e=>{if(e.group)return!0}).map(e=>this.w.config.chart.group===e.group?e.chart:this)}static getChartByID(e){const t=M.escapeString(e);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(i=>i.id===t)[0];return s&&s.chart}static initOnLoad(){var e;const t=document.querySelectorAll("[data-apexcharts]");for(let s=0;s<t.length;s++){const i=t[s],a=JSON.parse((e=t[s].getAttribute("data-options"))!=null?e:"");new ce(i,a).render()}}static exec(e,t,...s){const i=this.getChartByID(e);if(!i)return;i.w.globals.isExecCalled=!0;let a=null;return i.publicMethods.indexOf(t)!==-1&&(a=i[t](...s)),a}static merge(e,t){return M.extend(e,t)}static getThemePalettes(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}static use(e){(function(t){Object.assign(Dt(),t)})(e)}static registerFeatures(e){$e.registerFeatures(e)}toggleSeries(e){return this.series.toggleSeries(e)}highlightSeriesOnLegendHover(e,t){return this.series.toggleSeriesOnHover(e,t)}showSeries(e){this.series.showSeries(e)}hideSeries(e){this.series.hideSeries(e)}highlightSeries(e){this.series.highlightSeries(e)}isSeriesHidden(e){return this.series.isSeriesHidden(e)}resetSeries(e=!0,t=!0){this.series.resetSeries(e,t)}addEventListener(e,t){this.events.addEventListener(e,t)}removeEventListener(e,t){this.events.removeEventListener(e,t)}addXaxisAnnotation(e,t=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addXaxisAnnotationExternal(e,t,a)}addYaxisAnnotation(e,t=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addYaxisAnnotationExternal(e,t,a)}addPointAnnotation(e,t=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addPointAnnotationExternal(e,t,a)}clearAnnotations(e=void 0){var t;let s=this;e&&(s=e),(t=s.annotations)==null||t.clearAnnotations(s)}removeAnnotation(e,t=void 0){var s;let i=this;t&&(i=t),(s=i.annotations)==null||s.removeAnnotation(i,e)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}getHighestValueInSeries(e=0){return new st(this.w).getMinYMaxY(e).highestY}getLowestValueInSeries(e=0){return new st(this.w).getMinYMaxY(e).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const e=this.w,t=e.globals;return{series:e.seriesData.series,seriesNames:e.seriesData.seriesNames,colors:t.colors,labels:e.labelData.labels,seriesTotals:t.seriesTotals,seriesPercent:t.seriesPercent,seriesXvalues:t.seriesXvalues,seriesYvalues:t.seriesYvalues,minX:t.minX,maxX:t.maxX,minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,minXDiff:t.minXDiff,dataPoints:t.dataPoints,xAxisScale:t.xAxisScale,yAxisScale:t.yAxisScale,xTickAmount:t.xT
1003ickAmount,isXNumeric:e.axisFlags.isXNumeric,seriesYAxisMap:t.seriesYAxisMap,seriesYAxisReverseMap:t.seriesYAxisReverseMap,svgWidth:t.svgWidth,svgHeight:t.svgHeight,gridWidth:e.layout.gridWidth,gridHeight:e.layout.gridHeight,selectedDataPoints:e.interact.selectedDataPoints,collapsedSeriesIndices:t.collapsedSeriesIndices,zoomed:e.interact.zoomed,seriesX:e.seriesData.seriesX,seriesZ:e.seriesData.seriesZ,seriesCandleO:e.candleData.seriesCandleO,seriesCandleH:e.candleData.seriesCandleH,seriesCandleM:e.candleData.seriesCandleM,seriesCandleL:e.candleData.seriesCandleL,seriesCandleC:e.candleData.seriesCandleC,seriesRangeStart:e.rangeData.seriesRangeStart,seriesRangeEnd:e.rangeData.seriesRangeEnd,seriesGoals:e.seriesData.seriesGoals}}toggleDataPointSelection(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}zoomX(e,t){var s;(s=this.ctx.toolbar)==null||s.zoomUpdateOptions(e,t)}setLocale(e){this.localization.setCurrentLocaleValues(e)}dataURI(e){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.dataURI(e)}getSvgString(e){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.getSvgString(e)}exportToCSV(e={}){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.exportToCSV(e)}paper(){return this.w.dom.Paper}drillDown(e){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillDown(e)}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(e){Object.assign(this.w.seriesData,e)}_writeParsedRangeData(e){Object.assign(this.w.rangeData,e)}_writeParsedCandleData(e){Object.assign(this.w.candleData,e)}_writeParsedLabelData(e){Object.assign(this.w.labelData,e)}_writeParsedAxisFlags(e){Object.assign(this.w.axisFlags,e)}_writeLayoutCoords(e){Object.assign(this.w.layout,e)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{this.w.globals.resized=!0,this.w.globals.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){var e;clearTimeout((e=this.w.globals.resizeTimer)!=null?e:void 0);let{redrawOnWindowResize:t}=this.w.config.chart;typeof t=="function"&&(t=t()),t&&this._windowResize()}}const Yt=`.apexcharts-flip-y {
1004  transform: scaleY(-1) translateY(-100%);
1005  transform-origin: top;
1006  transform-box: fill-box;
1007}
1008.apexcharts-flip-x {
1009  transform: scaleX(-1);
1010  transform-origin: center;
1011  transform-box: fill-box;
1012}
1013.apexcharts-legend {
1014  display: flex;
1015  overflow: auto;
1016  padding: 0 10px;
1017}
1018.apexcharts-legend.apexcharts-legend-group-horizontal {
1019  flex-direction: column;
1020}
1021.apexcharts-legend-group {
1022  display: flex;
1023}
1024.apexcharts-legend-group-vertical {
1025  flex-direction: column-reverse;
1026}
1027.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
1028  flex-wrap: wrap
1029}
1030.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
1031  flex-direction: column;
1032  bottom: 0;
1033}
1034.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 {
1035  justify-content: flex-start;
1036  align-items: flex-start;
1037}
1038.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
1039  justify-content: center;
1040  align-items: center;
1041}
1042.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
1043  justify-content: flex-end;
1044  align-items: flex-end;
1045}
1046.apexcharts-legend-series {
1047  cursor: pointer;
1048  line-height: normal;
1049  display: flex;
1050  align-items: center;
1051}
1052.apexcharts-legend-text {
1053  position: relative;
1054  font-size: 14px;
1055}
1056.apexcharts-legend-text *, .apexcharts-legend-marker * {
1057  pointer-events: none;
1058}
1059.apexcharts-legend-marker {
1060  position: relative;
1061  display: flex;
1062  align-items: center;
1063  justify-content: center;
1064  cursor: pointer;
1065  margin-right: 1px;
1066}
1067
1068.apexcharts-legend-series.apexcharts-no-click {
1069  cursor: auto;
1070}
1071.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
1072  display: none !important;
1073}
1074.apexcharts-inactive-legend {
1075  opacity: 0.45;
1076} `;class Bt{constructor(e,t){this.w=e,this.ctx=t}svgStringToNode(e){return new DOMParser().parseFromString(e,"image/svg+xml").documentElement}scaleSvgNode(e,t){const s=parseFloat(e.getAttributeNS(null,"width")),i=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",s*t),e.setAttributeNS(null,"height",i*t),e.setAttributeNS(null,"viewBox","0 0 "+s+" "+i)}getSvgString(e){return new Promise(t=>{const s=this.w;let i=e||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);let c=`
1077        .apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect {
1078          display: none;
1079        }
1080      `;s.config.legend.show&&s.dom.elLegendWrap&&s.dom.elLegendWrap.children.length>0&&(c+=Yt);let h=`
1081        <svg xmlns="http://www.w3.org/2000/svg"
1082          version="1.1"
1083          xmlns:xlink="http://www.w3.org/1999/xlink"
1084          class="apexcharts-svg"
1085          xmlns:data="ApexChartsNS"
1086          transform="translate(0, 0)"
1087          width="${s.globals.svgWidth}px" height="${s.globals.svgHeight}px">
1088          <foreignObject width="100%" height="100%">
1089            <div xmlns="http://www.w3.org/1999/xhtml" style="width:${a}px; height:${o}px;">
1090            <style type="text/css">
1091              ${c}
1092            </style>
1093              ${n}
1094            </div>
1095          </foreignObject>
1096        </svg>
1097      `;const l=this.svgStringToNode(h);i!==1&&this.scaleSvgNode(l,i),this.convertImagesToBase64(l).then(()=>{h=new XMLSerializer().serializeToString(l),t(h.replace(/&nbsp;/g,"&#160;"))})})}convertImagesToBase64(e){const t=e.getElementsByTagName("image"),s=Array.from(t).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=>{}):Promise.resolve()});return Promise.all(s)}getBase64FromUrl(e){return O.isSSR()?Promise.resolve(e):new Promise((t,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),t(a.toDataURL())},i.onerror=s,i.src=e})}svgUrl(){return new Promise(e=>
1097{this.getSvgString().then(t=>{const s=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(s))})})}dataURI(e){return O.isSSR()?Promise.resolve({imgURI:""}):new Promise(t=>{const s=this.w,i=e?e.scale||e.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?s.config.chart.background:"#fff",r=a.getContext("2d");r&&(r.fillStyle=o,r.fillRect(0,0,a.width*i,a.height*i),this.getSvgString(i).then(n=>{const c="data:image/svg+xml,"+encodeURIComponent(n),h=new Image;h.crossOrigin="anonymous",h.onload=()=>{r.drawImage(h,0,0);const l=a;if(l.msToBlob){const g=l.msToBlob();t({blob:g})}else{const g=a.toDataURL("image/png");t({imgURI:g})}},h.src=c}))})}exportToSVG(){this.svgUrl().then(e=>{this.triggerDownload(e,this.w.config.chart.toolbar.export.svg.filename,".svg")})}exportToPng(){const e=this.w.config.chart.toolbar.export.scale,t=this.w.config.chart.toolbar.export.width,s=e?{scale:e}:t?{width:t}: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:e,fileName:t,columnDelimiter:s=",",lineDelimiter:i=`
1098`}){const a=this.w;e||(e=a.config.series);let o=[];const r=[];let n="";const c=a.seriesData.series.map((f,m)=>a.globals.collapsedSeriesIndices.indexOf(m)===-1?f:[]),h=f=>typeof a.config.chart.toolbar.export.csv.categoryFormatter=="function"?a.config.chart.toolbar.export.csv.categoryFormatter(f):a.config.xaxis.type==="datetime"&&String(f).length>=10?new Date(f).toDateString():M.isNumber(f)?f:f.split(s).join(""),l=f=>typeof a.config.chart.toolbar.export.csv.valueFormatter=="function"?a.config.chart.toolbar.export.csv.valueFormatter(f):f,g=Math.max(...e.map(f=>f.data?f.data.length:0)),p=new fe(this.w),u=new xe(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),x=f=>{let m="";if(a.globals.axisCharts){if(a.config.xaxis.type==="category"||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){const w=a.formatters.yLabelFormatters[0],y=new K(this.ctx.w).getActiveConfigSeriesIndex();m=w(a.labelData.labels[f],{seriesIndex:y,dataPointIndex:f,w:a})}else m=u.getLabel(a.labelData.labels,a.labelData.timescaleLabels,0,f).text;a.config.xaxis.type==="datetime"&&(a.config.xaxis.categories.length?m=a.config.xaxis.categories[f]:a.config.labels.length&&(m=a.config.labels[f]))}else m=a.config.labels[f];return m===null?"nullvalue":(Array.isArray(m)&&(m=m.join(" ")),M.isNumber(m)?m:m.split(s).join(""))},b=(f,m)=>{var w,y,v,C,S,L;if(o.length&&m===0&&r.push(o.join(s)),f.data){f.data=f.data.length&&f.data||[...Array(g)].map(()=>"");for(let A=0;A<f.data.length;A++){o=[];let D=x(A);if(D!=="nullvalue"){if(D||(p.isFormatXY()?D=e[m].data[A].x:p.isFormat2DArray()&&(D=e[m].data[A]?e[m].data[A][0]:"")),m===0){o.push(h(D));for(let k=0;k<a.seriesData.series.length;k++){const P=p.isFormatXY()?(w=e[k].data[A])==null?void 0:w.y:c[k][A];o.push(l(P))}}(a.config.chart.type==="candlestick"||f.type&&f.type==="candlestick")&&(o.pop(),o.push(a.candleData.seriesCandleO[m][A]),o.push(a.candleData.seriesCandleH[m][A]),o.push(a.candleData.seriesCandleL[m][A]),o.push(a.candleData.seriesCandleC[m][A])),(a.config.chart.type==="boxPlot"||f.type&&f.type==="boxPlot")&&(o.pop(),o.push(a.candleData.seriesCandleO[m][A]),o.push(a.candleData.seriesCandleH[m][A]),o.push(a.candleData.seriesCandleM[m][A]),o.push(a.candleData.seriesCandleL[m][A]),o.push(a.candleData.seriesCandleC[m][A])),a.config.chart.type==="rangeBar"&&(o.pop(),o.push(a.rangeData.seriesRangeStart[m][A]),o.push(a.rangeData.seriesRangeEnd[m][A])),(a.config.chart.type==="violin"||f.type&&f.type==="violin")&&(o.pop(),o.push((y=a.violinData.seriesViolinMin[m])==null?void 0:y[A]),o.push((v=a.violinData.seriesViolinMax[m])==null?void 0:v[A]),o.push((L=(S=(C=a.violinData.seriesViolinPoints[m])==null?void 0:C[A])==null?void 0:S.length)!=null?L:0)),o.length&&r.push(o.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")):e.map((f,m)=>{const w=(f.name?f.name:`series-${m}`)+"";a.globals.axisCharts&&o.push(w.split(s).join("")?w.split(s).join(""):`series-${m}`)}),a.globals.axisCharts||(o.push(a.config.chart.toolbar.export.csv.headerValue),r.push(o.join(s))),a.globals.allSeriesHasEqualX||
1098!a.globals.axisCharts||a.config.xaxis.categories.length||a.config.labels.length?e.map((f,m)=>{a.globals.axisCharts?b(f,m):(o=[],o.push(h(a.labelData.labels[m])),o.push(l(c[m])),r.push(o.join(s)))}):(()=>{const f=new Set,m={};e.forEach((w,y)=>{w?.data.forEach(v=>{let C,S;if(p.isFormatXY())C=v.x,S=v.y;else{if(!p.isFormat2DArray())return;C=v[0],S=v[1]}m[C]||(m[C]=Array(e.length).fill("")),m[C][y]=l(S),f.add(C)})}),o.length&&r.push(o.join(s)),Array.from(f).sort().forEach(w=>{r.push([h(w),m[w].join(s)])})})(),n+=r.join(i),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+n),t||a.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(e,t,s){if(O.isSSR())return;const i=document.createElement("a");i.href=e,i.download=(t||this.w.globals.chartID)+s,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}ce.registerFeatures({exports:Bt});let Ws=class{constructor(d){this.w=d.w,this.lgCtx=d}getLegendStyles(){if(O.isSSR())return null;const d=document.createElement("style");d.setAttribute("type","text/css");const e=this.w.config.chart.nonce;e&&d.setAttribute("nonce",e);const t=document.createTextNode(Yt);return d.appendChild(t),d}getLegendDimensions(){const d=this.w.dom.baseEl.querySelector(".apexcharts-legend");if(!d)return{clwh:0,clww:0};const{width:e,height:t}=d.getBoundingClientRect();return{clwh:t,clww:e}}appendToForeignObject(){var d;const e=this.getLegendStyles();this.w.config.chart.injectStyleSheet!==!1&&e&&((d=this.w.dom.elLegendForeign)==null||d.appendChild(e))}toggleDataSeries(d,e){var t,s;const i=this.w;if(i.globals.axisCharts||i.config.chart.type==="radialBar"){i.globals.resized=!0;let a=null,o=null;if(i.globals.risingSeries=[],i.globals.axisCharts){if(a=i.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${d}']`),!a)return;o=parseInt((t=a.getAttribute("data:realIndex"))!=null?t:"",10)}else{if(a=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${d+1}']`),!a)return;o=parseInt((s=a.getAttribute("rel"))!=null?s:"",10)-1}if(e?[{cs:i.globals.collapsedSeries,csi:i.globals.collapsedSeriesIndices},{cs:i.globals.ancillaryCollapsedSeries,csi:i.globals.ancillaryCollapsedSeriesIndices}].forEach(r=>{const n=r.cs,c=r.csi;this.riseCollapsedSeries(n,c,o)}):this.hideSeries({seriesEl:a,realIndex:o}),i.config.chart.accessibility.enabled){const r=i.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${d+1}"]`);if(r){const n=i.globals.collapsedSeriesIndices.includes(o)||i.globals.ancillaryCollapsedSeriesIndices.includes(o);r.setAttribute("aria-pressed",n?"true":"false");const c=r.querySelector(".apexcharts-legend-text"),h=c?c.textContent:i.seriesData.seriesNames[d],l=n?"hidden":"visible";r.setAttribute("aria-label",`${h}, ${l}. Press Enter or Space to toggle.`)}}}else{const a=i.dom.Paper.findOne(` .apexcharts-series[rel='${d+1}'] path`),o=i.config.chart.type;if(o==="pie"||o==="polarArea"||o==="donut"){const r=i.config.plotOptions.pie.donut.labels;new F(this.w).pathMouseDown(a,null),this.lgCtx.printDataLabelsInner(a.node,r)}if(i.config.chart.accessibility.enabled){const r=i.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${d+1}"]`);if(r){const n=i.globals.collapsedSeriesIndices.includes(d);r.setAttribute("aria-pressed",n?"true":"false");const c=r.querySelector(".apexcharts-legend-text"),h=c?c.textContent:i.seriesData.seriesNames[d],l=n?"hidden":"visible";r.setAttribute("aria-label",`${h}, ${l}. Press Enter or Space to toggle.`)}}}}getSeriesAfterCollapsing({realIndex:d}){var e;const t=this.w,s=t.globals,i=M.clone(t.config.series);if(s.axisCharts){const a=t.config.yaxis[s.seriesYAxisReverseMap[d]],o={index:d,data:i[d].data.slice(),type:i[d].type||t.config.chart.type};if(a&&a.show&&a.showAlways)s.ancillaryCollapsedSeriesIndices.indexOf(d)<0&&(s.ancillaryCollapsedSeries.push(o),s.ancillaryCollapsedSeriesIndices.push(d));else if(s.collapsedSeriesIndices.indexOf(d)<0){s.collapsedSeries.push(o),s.collapsedSeriesIndices.push(d);const r=s.risingSeries.indexOf(d);s.risingSeries.splice(r,1)}}else s.collapsedSeries.push({index:d,data:i[d],type:(e=t.config.series[d].type)!=null?e:"line"}),s.collapsedSeriesIndices.push(d);return s.allSeriesCollapsed=s.collapsedSeries.length+s.ancillaryCollapsedSeries.length===t.config.series.length,this._getSeriesBasedOnCollapsedState(i)}
1098hideSeries({seriesEl:d,realIndex:e}){const t=this.w,s=this.getSeriesAfterCollapsing({realIndex:e}),i=d.childNodes;for(let a=0;a<i.length;a++)i[a].classList.contains("apexcharts-series-markers-wrap")&&(i[a].classList.contains("apexcharts-hide")?i[a].classList.remove("apexcharts-hide"):i[a].classList.add("apexcharts-hide"));this.lgCtx.updateSeries(s,t.config.chart.animations.dynamicAnimation.enabled)}riseCollapsedSeries(d,e,t){const s=this.w;let i=M.clone(s.config.series);if(d.length>0){for(let a=0;a<d.length;a++)d[a].index===t&&(s.globals.axisCharts?i[t].data=d[a].data.slice():i[t]=d[a].data,typeof i[t]!="number"&&(i[t].hidden=!1),d.splice(a,1),e.splice(a,1),s.globals.risingSeries.push(t),a--);i=this._getSeriesBasedOnCollapsedState(i),this.lgCtx.updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(d){const e=this.w;let t=0;return e.globals.axisCharts?d.forEach((s,i)=>{e.globals.collapsedSeriesIndices.indexOf(i)<0&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0||(d[i].data=[],t++)}):d.forEach((s,i)=>{e.globals.collapsedSeriesIndices.indexOf(i)<0||(d[i]=0,t++)}),e.globals.allSeriesCollapsed=t===d.length,d}};const be="http://www.w3.org/2000/svg";class Ht{constructor(e,t){this.w=e,this.ctx=t,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 e=this.w.config.plotOptions.heatmap.colorScale.gradientLegend;return typeof e.formatter=="function"?e.formatter:t=>{if(!Number.isFinite(t))return String(t);const s=Math.abs(t);return s>=1e3?t.toFixed(0):s>=10?t.toFixed(1):t.toFixed(2)}}static isEnabled(e){var t,s,i,a;const o=(a=(i=(s=(t=e?.config)==null?void 0:t.plotOptions)==null?void 0:s.heatmap)==null?void 0:i.colorScale)==null?void 0:a.gradientLegend;return!(!o||!o.enabled)}draw(){var e,t,s,i,a,o,r,n;const c=this.w,h=c.dom.elLegendWrap;if(!h)return;const l=c.config.plotOptions.heatmap.colorScale.gradientLegend,g=c.config.legend.position,p=g==="left"||g==="right",u=(t=(e=l.arrow)==null?void 0:e.size)!=null?t:8,x=u+4,b=l.showLabels?28:4,f=l.showLabels?20:4,m=l.showLabels?44:0,w=this._resolveStripLength(p?l.height:l.width,p),y=l.thickness,v=p?Math.max(y+x+4,m):w+2*b,C=p?w+2*f:y+x+4,S=(v-(y+x))/2,L=p?g==="left"?S:S+x:b,A=p?f:g==="top"?x:4,D=B.createElementNS(be,"svg");D.setAttribute("class","apexcharts-heatmap-gradient-legend"),D.setAttribute("width",String(v)),D.setAttribute("height",String(C)),D.setAttribute("overflow","visible");const k=B.createElementNS(be,"defs"),P=`apexcharts-heatmap-gradient-${c.globals.cuid}`,T=B.createElementNS(be,"linearGradient");T.setAttribute("id",P),p?(T.setAttribute("x1","0"),T.setAttribute("y1","1"),T.setAttribute("x2","0"),T.setAttribute("y2","0")):(T.setAttribute("x1","0"),T.setAttribute("y1","0"),T.setAttribute("x2","1"),T.setAttribute("y2","0"));const{min:I,max:E,stops:X,bands:z}=this._computeStops();this._min=I,this._max=E,X.forEach(W=>{const R=B.createElementNS(be,"stop");R.setAttribute("offset",`${(100*W.percent).toFixed(2)}%`),R.setAttribute("stop-color",W.color),T.appendChild(R)}),k.appendChild(T),D.appendChild(k);const H=B.createElementNS(be,"rect");if(H.setAttribute("x",String(L)),H.setAttribute("y",String(A)),H.setAttribute("width",String(p?y:w)),H.setAttribute("height",String(p?w:y)),H.setAttribute("rx","2"),H.setAttribute("fill",`url(#${P})`),D.appendChild(H),l.showLabels){const W=((s=l.labelStyle)==null?void 0:s.colors)||(Array.isArray(c.config.legend.labels.colors)?c.config.legend.labels.colors[0]:c.config.legend.labels.colors)||c.config.chart.foreColor,R=((i=l.labelStyle)==null?void 0:i.fontSize)||"11px",_=((a=l.labelStyle)==null?void 0:a.fontFamily)||c.config.chart.fontFamily,V=this._getFormatter(),Q=(q,oe,Z,re)=>{const se=B.createElementNS(be,"text");return se.setAttribute("x",String(oe)),se.setAttribute("y",String(Z)),se.setAttribute("text-anchor",re),se.setAttribute("dominant-baseline","middle"),se.setAttribute("fill",W),se.setAttribute("font-size",R),_&&se.setAttribute("font-family",_),se.textContent=String(q),se};if(p){const q=L+y/2;D.appendChild(Q(V(I),q,A+w+10,"middle")),D.appendChild(Q(V(E),q,A-10,"middle"))}else{const q=A+y/2;D.appendChild(Q(V(I),L-6,q,"end")),D.appendChild(Q(V(E),L+w+6,q,"start"))}}
1098const Y=((o=l.arrow)==null?void 0:o.color)||c.config.chart.foreColor,N=this._buildArrow(u,Y,g);if(D.appendChild(N),this.arrowEl=N,this._bandHitEls=[],c.config.legend.onItemHover.highlightDataSeries&&z.length>0&&z.forEach(W=>{const R=B.createElementNS(be,"rect");if(p){const _=A+w-W.p2*w,V=A+w-W.p1*w;R.setAttribute("x",String(L)),R.setAttribute("y",String(_)),R.setAttribute("width",String(y)),R.setAttribute("height",String(Math.max(0,V-_)))}else R.setAttribute("x",String(L+W.p1*w)),R.setAttribute("y",String(A)),R.setAttribute("width",String(Math.max(0,(W.p2-W.p1)*w))),R.setAttribute("height",String(y));R.setAttribute("fill","transparent"),R.setAttribute("class","apexcharts-heatmap-gradient-band"),R.setAttribute("data:range-index",String(W.index)),R.style.cursor="pointer",D.appendChild(R),this._bandHitEls.push(R)}),this._geom={isVertical:p,position:g,stripX:L,stripY:A,stripLength:w,stripThickness:y,arrowSize:u,svgWidth:v,svgHeight:C},l.showHoverValue){const W=B.createElement("div");W.classList.add("apexcharts-heatmap-gradient-legend-value"),W.style.position="absolute",W.style.fontSize=((r=l.labelStyle)==null?void 0:r.fontSize)||"11px",W.style.fontFamily=((n=l.labelStyle)==null?void 0:n.fontFamily)||c.config.chart.fontFamily||"",W.style.color=c.config.chart.foreColor,W.style.background="rgba(0,0,0,0.65)",W.style.color="#fff",W.style.padding="2px 6px",W.style.borderRadius="3px",W.style.pointerEvents="none",W.style.whiteSpace="nowrap",W.style.opacity="0",W.style.transition="opacity 120ms ease",this.hoverValueEl=W}h.classList.add("apexcharts-heatmap-gradient-legend-wrap"),h.classList.add("apx-legend-position-"+g),h.appendChild(D),this.hoverValueEl&&h.appendChild(this.hoverValueEl),this.svgEl=D,this._applyWrapAlignment(h,g,p,v,C),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(e,t){const s=this.w,i=t?s.globals.svgHeight||s.config.chart.height||300:s.globals.svgWidth||s.config.chart.width||600;if(typeof e=="string"){const a=e.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 e=="number"&&Number.isFinite(e)?e:200}_applyWrapAlignment(e,t,s,i,a){const o=this.w,r=o.config.plotOptions.heatmap.colorScale.gradientLegend.align||"center",n=12,c=o.globals.svgWidth||o.config.chart.width||600,h=o.globals.svgHeight||o.config.chart.height||300,l=o.config.legend.offsetX||0,g=o.config.legend.offsetY||0;if(e.style.position="absolute",e.style.display="block",e.style.overflow="visible",e.style.padding="0",e.style.width=i+"px",e.style.height=a+"px",e.style.right="auto",e.style.bottom="auto",s){const p=h-a-24;let u;u=r==="start"?n:r==="end"?n+Math.max(0,p):n+Math.max(0,p)/2,e.style.top=u+g+"px",e.style.left=t==="left"?n+l+"px":c-i-n+l+"px"}else{const p=c-i-24;let u;u=r==="start"?n:r==="end"?n+Math.max(0,p):n+Math.max(0,p)/2,e.style.left=u+l+"px",e.style.top=t==="top"?n+g+"px":h-a-n+g+"px"}}repositionToPlot(){var e,t;if(!O.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:c,stripX:h,stripY:l,stripThickness:g}=this._geom,p=s.config.plotOptions.heatmap.colorScale.gradientLegend.align||"center",u=s.config.legend.offsetX||0,x=s.config.legend.offsetY||0,b=(t=(e=this.ctx)==null?void 0:e.dimensions)==null?void 0:t.dimHelpers,f=b?b.getTitleSubtitleCoords("title").height+b.getTitleSubtitleCoords("subtitle").height:0,m=s.layout.xAxisHeight||0,w=(y,v)=>{const C=Math.max(0,y-v);return p==="start"?0:p==="end"?C:C/2};if(o){a.style.top=i.translateY+w(i.gridHeight,c)+x+"px";const y=((r==="left"?0:i.translateX+i.gridWidth)+(r==="left"?i.translateX:i.svgWidth))/2;a.style.left=y-h-g/2+u+"px"}else{a.style.left=i.translateX+w(i.gridWidth,n)+u+"px";const y=((r==="top"?f:i.translateY+i.gridHeight+m)+(r==="top"?i.translateY:i.svgHeight))/2;a.style.top=y-l-g/2+x+"px"}B.requestAnimationFrame(()=>this._enforceMinPlotGap())}_enforceMinPlotGap(){const e=this.w,t=e.dom.elLegendWrap,s=this.svgEl&&this.svgEl.querySelector("rect"),i=e.dom.baseEl.querySelector(".apexcharts-grid");if(!(t&&s&&i&&this._geom))return;const a=s.getBoundingClientRect(),o=i.getBoundingClientRect();if(!(a.width&&a.height&&o.width&&o.height))return;const{isVertical:r,position:n}=this._geom;if(r){const c=n==="left"?o.left-a.right:a.left-o.right;if(c<16){const h=parseFloat(t.style.left)||0,l=16-c;t.style.left=h+(n==="left"?-l:l)+"px"}}else{const c=n==="top"?o.top-a.bottom:a.top-o.bottom;if(c<16){const h=parseFloat(t.style.top)||0,l=16-c;t.style.top=h+(n==="top"?-l:l)+"px"}}}destroy(){var e,t,s,i,a,o,r;for(let n=0;n<this._bandHitEls.length;n++){const c=this._bandHitEls[n];(e=c.removeEventListener)==null||e.call(c,"mousemove",this._onBandEnter),(t=c.removeEventListener)==null||t.call(c,"mouseout",this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,(s=this.ctx)==null?void 0: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(O.isBrowser())for(let e=0;e<this._bandHitEls.length;e++){const t=this._bandHitEls[e];t.addEventListener("mousemove",this._onBandEnter),t.addEventListener("mouseout",this._onBandLeave)}}_onBandEnter(e){var t,s,i,a;const o=this.w,r=e.currentTarget,n=parseInt((t=r.getAttribute("data:range-index"))!=null?t:"-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 K(o).highlightRangeInSeries(n,"highlight"))}_onBandLeave(){if(this._activeBandIndex<0)return;const e=this._activeBandIndex;this._activeBandIndex=-1,new K(this.w).highlightRangeInSeries(e,"reset")}_attachHoverListeners(){var e,t;O.isBrowser()&&((t=(e=this.ctx)==null?void 0:e.events)!=null&&t.addEventListener)&&(this.ctx.events.addEventListener("dataPointMouseEnter",this._onCellEnter),this.ctx.events.addEventListener("dataPointMouseLeave",this._onCellLeave))}_onCellEnter(...e){var t,s;const i=this.w;if(!this.arrowEl)return;const a=e[e.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=(t=i.seriesData)==null?void 0:t.series)==null?void 0:s[o],c=n?.[r];c==null||Number.isNaN(c)||this._positionArrow(c)}
1098_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute("opacity","0"),this.hoverValueEl&&(this.hoverValueEl.style.opacity="0"))}_positionArrow(e){if(!this.arrowEl||!this._geom)return;const{isVertical:t,position:s,stripX:i,stripY:a,stripLength:o,stripThickness:r,arrowSize:n}=this._geom,c=this._min,h=this._max-c;let l;if(l=h===0?.5:(e-c)/h,l<0&&(l=0),l>1&&(l=1),t){const g=a+o-l*o;let p,u;s==="left"?(p=i+r,u=p+n):(p=i,u=p-n);const x=[`${p},${g}`,`${u},${g-n/2}`,`${u},${g+n/2}`].join(" ");this.arrowEl.setAttribute("points",x)}else{const g=i+l*o;let p,u;s==="top"?(p=a+r,u=p+n):(p=a,u=p-n);const x=[`${g},${p}`,`${g-n/2},${u}`,`${g+n/2},${u}`].join(" ");this.arrowEl.setAttribute("points",x)}if(this.arrowEl.setAttribute("opacity","1"),this.hoverValueEl){const g=this._getFormatter();if(this.hoverValueEl.textContent=g(e),t){const p=a+o-l*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+l*o;this.hoverValueEl.style.left=`${p}px`,this.hoverValueEl.style.transform="translateX(-50%)",this.hoverValueEl.style.top=s==="top"?`${a+r+n+8}px`:a-n-18+"px"}this.hoverValueEl.style.opacity="1"}}_buildArrow(e,t,s){const i=B.createElementNS(be,"polygon");return i.setAttribute("fill",t),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 e,t;const s=this.w,i=s.config.plotOptions.heatmap.colorScale,a=i.gradientLegend;let o=1/0,r=-1/0;const n=((e=s.seriesData)==null?void 0:e.series)||[];for(let p=0;p<n.length;p++){const u=n[p];if(u)for(let x=0;x<u.length;x++){const b=u[x];b==null||Number.isNaN(b)||(b<o&&(o=b),b>r&&(r=b))}}Number.isFinite(o)||(o=0),Number.isFinite(r)||(r=0);let c=o,h=r;i.min!==void 0&&(c=i.min<o?i.min:o),i.max!==void 0&&(h=i.max>r?i.max:r);const l=[],g=[];if(i.ranges&&i.ranges.length>0){const p=i.ranges.map((f,m)=>G($({},f),{_originalIndex:m})).sort((f,m)=>f.from-m.from),u=p[0].from,x=p[p.length-1].to;c=u,h=x;const b=x-u||1;p.forEach(f=>{const m=(f.from-u)/b,w=(f.to-u)/b;l.push({percent:(m+w)/2,color:f.color}),g.push({index:f._originalIndex,p1:m,p2:w})})}else{const p=s.globals.colors[0]||"#008FFB",u=new M,x=(t=s.config.plotOptions.heatmap.shadeIntensity)!=null?t:.5,b=s.globals.hasNegs,f=Math.max(2,a.stops||16);for(let m=0;m<f;m++){const w=m/(f-1),y=c+w*(h-c),v=Math.abs(h)+Math.abs(c),C=v===0?0:100*y/v;let S;S=b?s.config.plotOptions.heatmap.reverseNegativeShade?C<0?C/100*(1.25*x):1.25*x*(1-C/100):C<=0?1-(1+C/100)*x:(1-C/100)*x:1-C/100,S>1&&(S=1),S<-1&&(S=-1);const L=s.config.plotOptions.heatmap.enableShades?u.shadeColor(s.config.theme.mode==="dark"?-1*S:S,p):p;l.push({percent:w,color:L})}}return{min:c,max:h,stops:l,bands:g}}}ce.registerFeatures({legend:class{constructor(d,e){this.w=d,this.ctx=e,this.printDataLabelsInner=(...t)=>{var s;return(s=e.pie)==null?void 0:s.printDataLabelsInner(...t)},this.updateSeries=(...t)=>e.updateHelpers._updateSeries(...t),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 Ws(this)}init(){const d=this.w,e=d.globals,t=d.config;this.isBarsDistributed=t.chart.type==="bar"&&t.plotOptions.bar.distributed&&t.series.length===1;const s=t.legend.showForSingleSeries&&this.w.seriesData.series.length===1||this.isBarsDistributed||t.chart.type==="heatmap"||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(s||!e.axisCharts)&&t.legend.show){const i=d.dom.elLegendWrap;for(;i.firstChild;)i.removeChild(i.firstChild);this.heatmapGradientLegend&&(this.heatmapGradientLegend.destroy(),this.heatmapGradientLegend=null),t.chart.type==="heatmap"&&Ht.isEnabled(d)?(this.heatmapGradientLegend=new Ht(d,this.ctx),this.heatmapGradientLegend.draw()):(this.drawLegends(),t.legend.position==="bottom"||t.legend.position==="top"?this.legendAlignHorizontal():t.legend.position!=="right"&&t.legend.position!=="left"||this.legendAlignVertical())}}createLegendMarker({i:d,fillcolor:e}){const t=this.w,s=B.createElement("span");s.classList.add("apexcharts-legend-marker");const i=t.config.legend.markers.shape||t.config.markers.shape;let a=i;Array.isArray(i)&&(a=i[d]);const o=Array.isArray(t.config.legend.markers.size)?parseFloat(t.config.legend.markers.size[d]):parseFloat(t.config.legend.markers.size),r=Array.isArray(t.config.legend.markers.offsetX)?parseFloat(t.config.legend.markers.offsetX[d]):parseFloat(t.config.legend.markers.offsetX),n=Array.isArray(t.config.legend.markers.offsetY)?parseFloat(t.config.legend.markers.offsetY[d]):parseFloat(t.config.legend.markers.offsetY),c=Array.isArray(t.config.legend.markers.strokeWidth)?parseFloat(t.config.legend.markers.strokeWidth[d]):parseFloat(t.config.legend.markers.strokeWidth),h=s.style;
vendor: 11,411 bytes, lines 1098-1115
1098if(h.height=2*(o+c)+"px",h.width=2*(o+c)+"px",h.left=r+"px",h.top=n+"px",t.config.legend.markers.customHTML)h.background="transparent",h.color=e[d],Array.isArray(t.config.legend.markers.customHTML)?t.config.legend.markers.customHTML[d]&&(s.innerHTML=t.config.legend.markers.customHTML[d]()):s.innerHTML=t.config.legend.markers.customHTML();else{const l=new ke(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${a}`,seriesIndex:d,strokeWidth:c,size:o}),g=(O.isBrowser()?window.SVG:global.SVG)().addTo(s).size("100%","100%"),p=new F(this.w).drawMarker(0,0,G($({},l),{pointFillColor:Array.isArray(e)?e[d]:l.pointFillColor,shape:a}));t.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(u=>{u.node.classList.contains("apexcharts-marker-triangle")?u.node.style.transform="translate(50%, 45%)":u.node.style.transform="translate(50%, 50%)"}),g.add(p)}return s}drawLegends(){var d;const e=this,t=this.w,s=t.dom.elLegendWrap,i=t.config.legend.fontFamily;let a=t.seriesData.seriesNames,o=t.config.legend.markers.fillColors?t.config.legend.markers.fillColors.slice():t.globals.colors.slice();if(t.config.chart.type==="heatmap"){const h=t.config.plotOptions.heatmap.colorScale.ranges;a=h.map(l=>l.name?l.name:l.from+" - "+l.to),o=h.map(l=>l.color)}else this.isBarsDistributed&&(a=t.labelData.labels.slice());t.config.legend.customLegendItems.length&&(a=t.config.legend.customLegendItems);const r=t.formatters.legendFormatter,n=t.config.legend.inverseOrder,c=[];t.labelData.seriesGroups.length>1&&t.config.legend.clusterGroupedSeries&&t.labelData.seriesGroups.forEach((h,l)=>{c[l]=B.createElement("div"),c[l].classList.add("apexcharts-legend-group",`apexcharts-legend-group-${l}`),t.config.legend.clusterGroupedSeriesOrientation==="horizontal"?s.classList.add("apexcharts-legend-group-horizontal"):c[l].classList.add("apexcharts-legend-group-vertical")});for(let h=n?a.length-1:0;n?h>=0:h<=a.length-1;n?h--:h++){const l=r(a[h],{seriesIndex:h,w:t});let g=!1,p=!1;if(t.globals.collapsedSeries.length>0)for(let w=0;w<t.globals.collapsedSeries.length;w++)t.globals.collapsedSeries[w].index===h&&(g=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(let w=0;w<t.globals.ancillaryCollapsedSeriesIndices.length;w++)t.globals.ancillaryCollapsedSeriesIndices[w]===h&&(p=!0);const u=this.createLegendMarker({i:h,fillcolor:o});F.setAttrs(u,{rel:h+1,"data:collapsed":g||p}),(g||p)&&u.classList.add("apexcharts-inactive-legend");const x=B.createElement("div");if(t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled){x.setAttribute("role","button"),x.setAttribute("tabindex","0");const w=Array.isArray(l)?l.join(" "):l,y=g||p,v=y?"hidden":"visible";x.setAttribute("aria-label",`${w}, ${v}. Press Enter or Space to toggle.`),x.setAttribute("aria-pressed",y?"true":"false")}const b=B.createElement("span");b.classList.add("apexcharts-legend-text"),b.innerHTML=Array.isArray(l)?l.join(" "):l;let f=t.config.legend.labels.useSeriesColors?t.globals.colors[h]:Array.isArray(t.config.legend.labels.colors)?(d=t.config.legend.labels.colors)==null?void 0:d[h]:t.config.legend.labels.colors;f||(f=t.config.chart.foreColor),b.style.color=f,b.style.fontSize=t.config.legend.fontSize,b.style.fontWeight=t.config.legend.fontWeight,b.style.fontFamily=i||t.config.chart.fontFamily,F.setAttrs(b,{rel:h+1,i:h,"data:default-text":encodeURIComponent(l),"data:collapsed":g||p}),x.appendChild(u),x.appendChild(b);const m=new J(this.w);t.config.legend.showForZeroSeries||m.getSeriesTotalByIndex(h)===0&&m.seriesHaveSameValues(h)&&!m.isSeriesNull(h)&&t.globals.collapsedSeriesIndices.indexOf(h)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&x.classList.add("apexcharts-hidden-zero-series"),t.config.legend.showForNullSeries||m.isSeriesNull(h)&&t.globals.collapsedSeriesIndices.indexOf(h)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&x.classList.add("apexcharts-hidden-null-series"),c.length?t.labelData.seriesGroups.forEach((w,y)=>{var v,C;w.includes((C=(v=t.config.series[h])==null?void 0:v.name)!=null?C:"")&&(s.appendChild(c[y]),c[y].appendChild(x))}):s.appendChild(x),s.classList.add(`apexcharts-align-${t.config.legend.horizontalAlign}`),s.classList.add("apx-legend-position-"+t.config.legend.position),x.classList.add("apexcharts-legend-series"),x.style.margin=`${t.config.legend.itemMargin.vertical}px ${t.config.legend.itemMargin.horizontal}px`,s.style.width=t.config.legend.width?t.config.legend.width+"px":"",s.style.height=t.config.legend.height?t.config.legend.height+"px":"",F.setAttrs(x,{rel:h+1,seriesName:M.escapeString(a[h]),"data:collapsed":g||p}),(g||p)&&x.classList.add("apexcharts-inactive-legend"),t.config.legend.onItemClick.toggleDataSeries||x.classList.add("apexcharts-no-click")}t.dom.elWrap.addEventListener("click",e.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&t.config.legend.customLegendItems.length===0&&(t.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),t.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0)),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&t.dom.elWrap.addEventListener("keydown",e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(d,e){const t=this.w,s=t.dom.elLegendWrap,i=s.clientHeight;let a=0,o=0;if(t.config.legend.position==="bottom")o=t.globals.svgHeight-Math.min(i,t.globals.svgHeight/2)-5;else if(t.config.legend.position==="top"){const r=new We(this.w,this.ctx),n=r.dimHelpers.getTitleSubtitleCoords("title").height,c=r.dimHelpers.getTitleSubtitleCoords("subtitle").height;o=(n>0?n-10:0)+(c>0?c-10:0)}s.style.position="absolute",a=a+d+t.config.legend.offsetX,o=o+e+t.config.legend.offsetY,s.style.left=a+"px",s.style.top=o+"px",t.config.legend.position==="right"&&(s.style.left="auto",s.style.right=25+t.config.legend.offsetX+"px"),["width","height"].forEach(r=>{s&&s.style[r]&&(s.style[r]=parseInt(String(t.config.legend[r]),10)+"px")})}legendAlignHorizontal(){const d=this.w;d.dom.elLegendWrap.style.right="0";const e=new We(this.w,this.ctx),t=e.dimHelpers.getTitleSubtitleCoords("title"),s=e.dimHelpers.getTitleSubtitleCoords("subtitle");let i=0;d.config.legend.position==="top"&&(i=t.height+s.height+d.config.title.margin+d.config.subtitle.margin-10),this.setLegendWrapXY(20,i)}legendAlignVertical(){const d=this.w,e=this.legendHelpers.getLegendDimensions();let t=0;d.config.legend.position==="left"&&(t=20),d.config.legend.position==="right"&&(t=d.globals.svgWidth-e.clww-10),this.setLegendWrapXY(t,20)}onLegendHovered(d){var e;const t=this.w,s=d.target,i=s.classList.contains("apexcharts-legend-series")||s.classList.contains("apexcharts-legend-text")||s.classList.contains("apexcharts-legend-marker");if(t.config.chart.type==="heatmap"||this.isBarsDistributed){if(i){const a=parseInt((e=s.getAttribute("rel"))!=null?e:"0",10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]);const o=new K(this.ctx.w);d.type==="mousemove"?o.highlightRangeInSeries(a,"highlight"):d.type==="mouseout"&&o.highlightRangeInSeries(a,"reset")}}else!s.classList.contains("apexcharts-inactive-legend")&&i&&new K(this.ctx.w).toggleSeriesOnHover(d,s)}onLegendKeyDown(d){const e=this,t=this.w,s=d.target;if((s.classList.contains("apexcharts-legend-series")||s.classList.contains("apexcharts-legend-text")||s.classList.contains("apexcharts-legend-marker"))&&(d.key==="Enter"||d.key===" ")){d.preventDefault();const i=s.getAttribute("rel");e.onLegendClick(d),i!==null&&t.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{const a=t.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${i}"]`);a&&a.focus()})}}onLegendClick(d){var e;const t=this.w,s=d.target;if(!t.config.legend.customLegendItems.length&&(s.classList.contains("apexcharts-legend-series")||s.classList.contains("apexcharts-legend-text")||s.classList.contains("apexcharts-legend-marker"))){const i=parseInt((e=s.getAttribute("rel"))!=null?e:"0",10)-1,a=s.getAttribute("data:collapsed")==="true",o=this.w.config.chart.events.legendClick;typeof o=="function"&&o(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);const r=this.w.config.legend.markers.onClick;typeof r=="function"&&s.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),t.config.chart.type!=="treemap"&&t.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}});class Nt{constructor(e,t){this.w=e,this.ctx=t,this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=e.globals.minX,this.maxX=e.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 e=this.w,t=()=>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=t();if(i.setAttribute("class","apexcharts-toolbar"),i.style.top=e.config.chart.toolbar.offsetY+"px",i.style.right=3-e.config.chart.toolbar.offsetX+"px",e.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=t(),this.elCustomIcons=[],this.t=e.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,c,h)=>{const l=n.toLowerCase();this.t[l]&&e.config.chart.zoom.enabled&&a.push({el:c,icon:typeof this.t[l]=="string"?this.t[l]:h,title:this.localeValues[n],class:`apexcharts-${l}-icon`})};o("zoomIn",this.elZoomIn,`<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">
1099    <path d="M12 5v14M5 12h14"/>
1100</svg>
1101`),o("zoomOut",this.elZoomOut,`<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">
1102    <path d="M5 12h14"/>
1103</svg>
1104`);const r=n=>{this.t[n]&&e.config.chart[n].enabled&&a.push({el:n==="zoom"?this.elZoom:this.elSelection,icon:typeof this.t[n]=="string"?this.t[n]:n==="zoom"?`<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">
1105    <circle cx="11" cy="11" r="7"/>
1106    <path d="m21 21-4.3-4.3M8 11h6M11 8v6"/>
1107</svg>
1108`:`<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">
1109    <path d="M5 3a2 2 0 0 0-2 2"/>
1110    <path d="M19 3a2 2 0 0 1 2 2"/>
1111    <path d="M21 19a2 2 0 0 1-2 2"/>
1112    <path d="M5 21a2 2 0 0 1-2-2"/>
1113    <path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/>
1114</svg>
1115`,title:this.localeValues[n==="zoom"?"selectionZoom":"selection"],class:`apexcharts-${n}-icon`})};r("zoom"),r("selection"),this.t.pan&&e.config.chart.zoom.enabled&&a.push({el:this.elPan,icon:typeof this.t.pan=="str
1115ing"?this.t.pan:`<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">
1116    <path d="M5 9 2 12l3 3"/>
1117    <path d="M9 5l3-3 3 3"/>
1118    <path d="M15 19l-3 3-3-3"/>
1119    <path d="M19 9l3 3-3 3"/>
1120    <path d="M2 12h20"/>
1121    <path d="M12 2v20"/>
1122</svg>
1123`,title:this.localeValues.pan,class:"apexcharts-pan-icon"}),o("reset",this.elZoomReset,`<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`),this.t.download&&a.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:`<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="M4 6h16M4 12h16M4 18h16"/>
1129</svg>
1130`,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,c)=>{n.index&&M.moveIndexInArray(a,c,n.index)});for(let n=0;n<a.length;n++)F.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(!!e.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!e.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!e.interact.panEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","false")),this._createHamburgerMenu(i),e.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):e.interact.panEnabled?this.elPan.classList.add(this.selectedClass):e.interact.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}_createHamburgerMenu(e){this.elMenuItems=[],e.appendChild(this.elMenu),F.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});const t=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let s=0;s<t.length;s++)this.elMenuItems.push(B.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[s].innerHTML=t[s].title,F.setAttrs(this.elMenuItems[s],{class:`apexcharts-menu-item ${t[s].name}`,title:t[s].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[s])}addToolbarEventListeners(){var e,t,s,i,a,o,r,n;(e=this.elZoomReset)==null||e.addEventListener("click",this.handleZoomReset.bind(this)),(t=this.elSelection)==null||t.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].forEac
1130h(c=>{c.addEventListener("keydown",h=>{if(h.key==="Enter"||h.key===" "){h.preventDefault();const l=c.className;c.click(),requestAnimationFrame(()=>{const g=this.w.dom.baseEl;if(!g)return;const p=l.split(" ").find(x=>x.startsWith("apexcharts-"));if(!p)return;const u=g.querySelector(`.${p}`);u&&u.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 l=c.key==="ArrowDown"?0:this.elMenuItems.length-1;this.elMenuItems[l]&&this.elMenuItems[l].focus()},20))}),this.elMenuItems.forEach((c,h)=>{c.addEventListener("keydown",l=>{var g;l.key==="ArrowDown"?(l.preventDefault(),(this.elMenuItems[h+1]||this.elMenuItems[0]).focus()):l.key==="ArrowUp"?(l.preventDefault(),(this.elMenuItems[h-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):l.key==="Escape"||l.key==="Tab"?(this._closeMenu(),(g=this.elMenuIcon)==null||g.focus(),l.key==="Tab"||l.preventDefault()):l.key!=="Enter"&&l.key!==" "||(l.preventDefault(),c.click())})})}toggleZoomSelection(e){this.ctx.getSyncedCharts().forEach(t=>{t.ctx.toolbar.toggleOtherControls();const s=e==="selection"?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,i=e==="selection"?"selectionEnabled":"zoomEnabled";t.w.globals[i]=!t.w.globals[i],s.classList.contains(t.ctx.toolbar.selectedClass)?s.classList.remove(t.ctx.toolbar.selectedClass):s.classList.add(t.ctx.toolbar.selectedClass),s.setAttribute("aria-pressed",String(t.w.globals[i]))})}getToolbarIconsReference(){const e=this.w;this.elZoom||(this.elZoom=e.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.dom.baseEl.querySelector(".apexcharts-selection-icon"))}enableZoomPanFromToolbar(e){this.toggleOtherControls(),e==="pan"?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;const t=e==="pan"?this.elPan:this.elZoom,s=e==="pan"?this.elZoom:this.elPan;t&&t.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 e=this.w;e.interact.panEnabled=!1,e.interact.zoomEnabled=!1,e.interact.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(t=>{t&&t.classList.remove(this.selectedClass)})}_currentXRange(){const e=this.w;return e.axisFlags.isRangeBar?{minX:e.globals.minY,maxX:e.globals.maxY}:{minX:e.globals.minX,maxX:e.globals.maxX}}handleZoomIn(){const e=this.w,{minX:t,maxX:s}=this._currentXRange();this.minX=t,this.maxX=s;const i=(t+s)/2,a=(t+i)/2,o=(s+i)/2,r=this._getNewMinXMaxX(a,o);e.interact.disableZoomIn||this.zoomUpdateOptions(r.minX,r.maxX)}handleZoomOut(){const e=this.w,{minX:t,maxX:s}=this._currentXRange();if(this.minX=t,this.maxX=s,e.config.xaxis.type==="datetime"&&new Date(t).getUTCFullYear()<1e3)return;const i=(t+s)/2,a=t-(i-t),o=s-(i-s),r=this._getNewMinXMaxX(a,o);e.interact.disableZoomOut||this.zoomUpdateOptions(r.minX,r.maxX)}_getNewMinXMaxX(e,t){const s=this.w.config.xaxis.convertedCatToNumeric;return{minX:s?Math.floor(e):e,maxX:s?Math.floor(t):t}}zoomUpdateOptions(e,t){const s=this.w;if(e===void 0&&t===void 0)return void this.handleZoomReset();if(s.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=s.globals.dataPoints),t-e<2))return;let i={min:e,max:t};const a=this.getBeforeZoomRange(i,void 0);a&&(i=a.xaxis);const o={xaxis:i};if(!s.globals.initialConfig)return;const r=M.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(e,t){typeof this.ev.zoomed=="function"&&(this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t}),this.ctx.events.fireEvent("zoomed",{xaxis:e,yaxis:t}))}getBeforeZoomRange(e,t){let s=null;return typeof this.ev.beforeZoom=="function"&&(s=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),s}toggleMenu(){window.setTimeout(()=>{var e,t,s;(e=this.elMenu)!=null&&e.classList.contains("apexcharts-menu-open")?this._closeMenu():((t=this.elMenu)==null||t.classList.add("apexcharts-menu-open"),(s=this.elMenuIcon)==null||s.setAttribute("aria-expanded","true"))},0)}_closeMenu(){var e,t;(e=this.elMenu)==null||e.classList.remove("apexcharts-menu-open"),(t=this.elMenuIcon)==null||t.setAttribute("aria-expanded","fal
1130se")}handleDownload(e){const t=this.w,s=new Bt(this.w,this.ctx);switch(e){case"svg":s.exportToSVG();break;case"png":s.exportToPng();break;case"csv":s.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter})}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{const t=e.w;if(!t.interact.zoomed)return;if(t.globals.lastXAxis.min=t.globals.initialConfig.xaxis.min,t.globals.lastXAxis.max=t.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof t.config.chart.events.beforeResetZoom=="function"){const i=t.config.chart.events.beforeResetZoom(e,t);i&&e.updateHelpers.revertDefaultAxisMinMax(i)}typeof t.config.chart.events.zoomed=="function"&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max});const s=e.ctx.series.emptyCollapsedSeries(M.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(s,t.config.chart.animations.dynamicAnimation.enabled),t.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}}ce.registerFeatures({toolbar:Nt,zoomPanSelection:class extends Nt{constructor(d,e){super(d,e),this.w=d,this.ctx=e,this.dragged=!1,this.graphics=new F(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:d}){const e=this.w,t=this;this.xyRatios=d,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 is(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(s=>{var i;(i=this.hoverArea)==null||i.addEventListener(s,t.svgMouseEvents.bind(t,d),{capture:!1,passive:!0})}),e.config.chart.zoom.enabled&&e.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",t.mouseWheelEvent.bind(t),{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(d,e){var t;const s=this.w,i=this.ctx.toolbar,a=s.interact.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type,o=s.config.chart.toolbar.autoSelected;if(e.shiftKey?(this.shiftWasPressed=!0,i.enableZoomPanFromToolbar(o==="pan"?"zoom":"pan")):this.shiftWasPressed&&(i.enableZoomPanFromToolbar(o),this.shiftWasPressed=!1),!e.target)return;const r=e.target.classList;let n;if(e.target.parentNode&&e.target.parentNode!==null&&(n=e.target.parentNode.classList),!(r.contains("apexcharts-legend-marker")||r.contains("apexcharts-legend-text")||n&&n.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 c=(t=this.gridRect)==null?void 0:t.getBoundingClientRect();if(!c)return;this.startX=this.clientX-c.left-s.globals.barPadForNumericAxis,this.startY=this.clientY-c.top,this.dragged=!1,this.w.interact.mousedown=!0}(e.type==="mousemove"&&e.which===1||e.type==="touchmove")&&(this.dragged=!0,s.interact.panEnabled?(s.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:a,xyRatios:d})):(this.w.interact.mousedown&&s.interact.zoomEnabled||this.w.interact.mousedown&&s.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:a}))),e.type!=="mouseup"&&e.type!=="touchend"&&e.type!=="mouseleave"||this.handleMouseUp({zoomtype:a}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:d,isResized:e}){var t;const s=this.w,i=(t=this.gridRect)==null?void 0:t.getBoundingClientRect();i&&(this.w.interact.mousedown||e)&&(this.endX=this.clientX-i.left-s.globals.barPadForNumericAxis,this.endY=this.clientY-i.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(s.interact.zoomEnabled||s.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:d}
1130)),s.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}mouseWheelEvent(d){const e=this.w;d.preventDefault();const t=Date.now();t-e.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(d),e.interact.lastWheelExecution=t),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{t-e.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(d),e.interact.lastWheelExecution=t)},this.debounceDelay)}executeMouseWheelZoom(d){var e,t,s;const i=this.w;this.minX=i.axisFlags.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.axisFlags.isRangeBar?i.globals.maxY:i.globals.maxX;const a=(e=this.gridRect)==null?void 0:e.getBoundingClientRect();if(!a)return;const o=(d.clientX-a.left)/a.width,r=this.minX,n=this.maxX,c=n-r;let h,l,g;if(d.deltaY<0){h=.5*c;const u=r+o*c;l=u-h/2,g=u+h/2}else h=1.5*c,l=r-h/2,g=n+h/2;if(!i.axisFlags.isRangeBar){const u=(t=i.globals.dataReducerRawMinX)!=null?t:i.globals.initialMinX,x=(s=i.globals.dataReducerRawMaxX)!=null?s:i.globals.initialMaxX;l=Math.max(l,u),g=Math.min(g,x);const b=i.globals.minXDiff>0&&isFinite(i.globals.minXDiff)?i.globals.minXDiff:0,f=Math.max(2*b,1e-6*(x-u));if(g-l<f){const m=(l+g)/2;l=m-f/2,g=m+f/2}}const p=this._getNewMinXMaxX(l,g);isNaN(p.minX)||isNaN(p.maxX)||this.zoomUpdateOptions(p.minX,p.maxX)}makeSelectionRectDraggable(){const d=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:(t,s,i,a,o)=>o==="l"||o==="r"?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0),updateHandle:(t,s)=>t.center(s[0],s[1])}).resize().on("resize",()=>{const t=d.interact.zoomEnabled?d.config.chart.zoom.type:d.config.chart.selection.type;this.handleMouseUp({zoomtype:t,isResized:!0})}))}preselectedSelection(){const d=this.w,e=this.xyRatios;if(!d.interact.zoomEnabled){if(d.interact.selection!==void 0&&d.interact.selection!==null)this.drawSelectionRect(G($({},d.interact.selection),{translateX:d.layout.translateX,translateY:d.layout.translateY}));else if(d.config.chart.selection.xaxis.min!==void 0&&d.config.chart.selection.xaxis.max!==void 0){let t=(d.config.chart.selection.xaxis.min-d.globals.minX)/e.xRatio,s=d.layout.gridWidth-(d.globals.maxX-d.config.chart.selection.xaxis.max)/e.xRatio-t;d.axisFlags.isRangeBar&&(t=(d.config.chart.selection.xaxis.min-d.globals.yAxisScale[0].niceMin)/e.invertedYRatio,s=(d.config.chart.selection.xaxis.max-d.config.chart.selection.xaxis.min)/e.invertedYRatio);const i={x:t,y:0,width:s,height:d.layout.gridHeight,translateX:d.layout.translateX,translateY:d.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(i),this.makeSelectionRectDraggable(),typeof d.config.chart.events.selection=="function"&&d.config.chart.events.selection(this.ctx,{xaxis:{min:d.config.chart.selection.xaxis.min,max:d.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:d,y:e,width:t,height:s,translateX:i=0,translateY:a=0}){const o=this.w,r=this.zoomRect,n=this.selectionRect;if(this.dragged||o.interact.selection!==null){const c={transform:"translate("+i+", "+a+")"};o.interact.zoomEnabled&&this.dragged&&(t<0&&(t=1),r.attr({x:d,y:e,width:t,height:s,fill:o.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":o.config.chart.zoom.zoomedArea.fill.opacity,stroke:o.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":o.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":o.config.chart.zoom.zoomedArea.stroke.opacity}),F.setAttrs(r.node,c)),o.interact.selectionEnabled&&(n.attr({x:d,y:e,width:t>0?t:0,height:s>0?s:0,fill:o.config.chart.selection.fill.color,"fill-opacity":o.config.chart.selection.fill.opacity,stroke:o.config.chart.selection.stroke.color,"stroke-width":o.config.chart.selection.stroke.width,"stroke-dasharray":o.config.chart.selection.stroke.dashArray,"stroke-opacity":o.config.chart.selection.stroke.opacity}),F.setAttrs(n.node,c))}}hideSelectionRect(d){d&&d.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:d,zoomtype:e}){var t;const s=this.w,i=d,a=(t=this.gridRect)==null?void 0:t.getBoundingClientRect();if(!a)return;const o=i.startX-1,r=i.startY;let n=!1,c=!1;const h=i.clientX-a.left-s.globals.barPadForNumericAxis,l=i.clientY-a.top;let g=h-o,p=l-r,u={translateX:s.layout.translateX,translateY:s.layout.translateY};return Math.abs(g+o)>s.layout.gridWidth?g=s.layout.gridWidth-o:h<0&&(g=o),o>h&&(n=!0,g=Math.abs(g)),r>l&&(c=!0,p=Math.abs(p)),u=e==="x"?{x:n?o-g:o,y:0,width:g,height:s.layout.gridHeight}:e==="y"?{x:0,y:c?r-p:r,width:s.layout.gridWidth,height:p}:{x:n?o-g:o,y:c?r-p:r,width:g,height:p},u=G($({},u),{translateX:s.layout.translateX,translateY:s.layout.translateY}),i.drawSelectionRect(u),i.selectionDragging("resizing"),u}selectionDragging(d,e){var t;const s=this.w;if(!e)return;e.preventDefault();const{handler:i,box:a}=e.detail,o=this.constraints;let{x:r,y:n}=a;r<o.x&&(r=o.x),n<o.y&&(n=o.y),a.x2>o.x2&&(r=o.x2-a.w),a.y2>o.y2&&(n=o.y2-a.h),i.move(r,n);const c=this.xyRatios,h=this.selectionRect;let l=0;d==="resizing"&&(l=30);const g=u=>parseFloat(h.node.getAttribute(u)),p={x:g("x"),y:g("y"),width:g("width"),height:g("height")};s.interact.selection=p,typeof s.config.chart.events.selection=="function"&&s.interact.selectionEnabled&&(clearTimeout((t=this.w.globals.selectionResizeTimer)!=null?t:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{var u;const x=(u=this.gridRect)==null?void 0:u.getBoundingClientRect();if(!x)return;const b=h.node.getBoundingClientRect();
1130let f,m,w,y;if(s.axisFlags.isRangeBar)f=s.globals.yAxisScale[0].niceMin+(b.left-x.left)*c.invertedYRatio,m=s.globals.yAxisScale[0].niceMin+(b.right-x.left)*c.invertedYRatio,w=0,y=1;else{if(!s.globals.xAxisScale)return;f=s.globals.xAxisScale.niceMin+(b.left-x.left)*c.xRatio,m=s.globals.xAxisScale.niceMin+(b.right-x.left)*c.xRatio,w=s.globals.yAxisScale[0].niceMin+(x.bottom-b.bottom)*c.yRatio[0],y=s.globals.yAxisScale[0].niceMax-(b.top-x.top)*c.yRatio[0]}const v={xaxis:{min:f,max:m},yaxis:{min:w,max:y}};s.config.chart.events.selection(this.ctx,v),s.config.chart.brush.enabled&&s.config.chart.events.brushScrolled!==void 0&&s.config.chart.events.brushScrolled(this.ctx,v)},l))}selectionDrawn({context:d,zoomtype:e}){var t,s;const i=this.w,a=d,o=this.xyRatios,r=this.ctx.toolbar,n=i.interact.zoomEnabled?a.zoomRect.node.getBoundingClientRect():a.selectionRect.node.getBoundingClientRect(),c=a.gridRect.getBoundingClientRect(),h=n.left-c.left-i.globals.barPadForNumericAxis,l=n.right-c.left-i.globals.barPadForNumericAxis,g=n.top-c.top,p=n.bottom-c.top;let u,x;if(i.axisFlags.isRangeBar)u=i.globals.yAxisScale[0].niceMin+h*o.invertedYRatio,x=i.globals.yAxisScale[0].niceMin+l*o.invertedYRatio;else{const m=(s=(t=i.globals.xAxisScale)==null?void 0:t.niceMin)!=null?s:0;u=m+h*o.xRatio,x=m+l*o.xRatio}const b=[],f=[];if(i.config.yaxis.forEach((m,w)=>{const y=i.globals.seriesYAxisMap[w][0],v=i.globals.yAxisScale[w].niceMax-o.yRatio[y]*g,C=i.globals.yAxisScale[w].niceMax-o.yRatio[y]*p;b.push(v),f.push(C)}),a.dragged&&(a.dragX>10||a.dragY>10)&&u!==x){if(i.interact.zoomEnabled){if(!i.globals.initialConfig)return;let m=M.clone(i.globals.initialConfig.yaxis),w=M.clone(i.globals.initialConfig.xaxis);if(i.interact.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(u=Math.floor(u),x=Math.floor(x),u<1&&(u=1,x=i.globals.dataPoints),x-u<2&&(x=u+1)),e!=="xy"&&e!=="x"||(w={min:u,max:x}),e!=="xy"&&e!=="y"||m.forEach((v,C)=>{m[C].min=f[C],m[C].max=b[C]}),r){const v=r.getBeforeZoomRange(w,m);v&&(w=v.xaxis?v.xaxis:w,m=v.yaxis?v.yaxis:m)}const y={xaxis:w};i.config.chart.group||(y.yaxis=m),a.ctx.updateHelpers._updateOptions(y,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof i.config.chart.events.zoomed=="function"&&r.zoomCallback(w,m)}else if(i.interact.selectionEnabled){let m=null,w=null;if(w={min:u,max:x},e==="xy"||e==="y"){const y=M.clone(i.config.yaxis);m=y,y.forEach((v,C)=>{y[C].min=f[C],y[C].max=b[C]})}i.interact.selection=a.selection,typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(a.ctx,{xaxis:w,yaxis:m})}}}panDragging({context:d}){var e;const t=this.w,s=d;if(t.interact.lastClientPosition.x!==void 0){const o=t.interact.lastClientPosition.x-s.clientX,r=((e=t.interact.lastClientPosition.y)!=null?e:0)-s.clientY;Math.abs(o)>Math.abs(r)&&o>0?this.moveDirection="left":Math.abs(o)>Math.abs(r)&&o<0?this.moveDirection="right":Math.abs(r)>Math.abs(o)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(o)&&r<0&&(this.moveDirection="down")}t.interact.lastClientPosition={x:s.clientX,y:s.clientY};const i=t.axisFlags.isRangeBar?t.globals.minY:t.globals.minX,a=t.axisFlags.isRangeBar?t.globals.maxY:t.globals.maxX;s.panScrolled(i,a)}panScrolled(d,e){var t,s;const i=this.w,a=this.xyRatios;if(!i.globals.initialConfig)return;const o=M.clone(i.globals.initialConfig.yaxis);let r=a.xRatio,n=i.globals.minX,c=i.globals.maxX;if(i.axisFlags.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,c=i.globals.maxY),this.moveDirection==="left"?(d=n+i.layout.gridWidth/15*r,e=c+i.layout.gridWidth/15*r):this.moveDirection==="right"&&(d=n-i.layout.gridWidth/15*r,e=c-i.layout.gridWidth/15*r),!i.axisFlags.isRangeBar){const l=(t=i.globals.dataReducerRawMinX)!=null?t:i.globals.initialMinX,g=(s=i.globals.dataReducerRawMaxX)!=null?s:i.globals.initialMaxX;(d<l||e>g)&&(d=n,e=c)}const h={xaxis:{min:d,max:e}};i.config.chart.group||(h.yaxis=o),this.updateScrolledChart(h,d,e)}updateScrolledChart(d,e,t){const s=this.w;if(this.ctx.updateHelpers._updateOptions(d,!1,!1),typeof s.config.chart.events.scrolled=="function"){const i={xaxis:{min:e,max:t}};s.config.chart.events.scrolled(this.ctx,i),this.ctx.events.fireEvent("scrolled",i)}}}});let Ge=class{constructor(d){this.w=d.w,this.annoCtx=d}setOrientations(d,e=null){var t,s;const i=this.w;if(d.label.orientation==="vertical"){const a=e!==null?e:0,o=i.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${a}']`);if(o!==null){const r=o.getBBox();o.setAttribute("x",String(parseFloat((t=o.getAttribute("x"))!=null?t:"0")-r.height+4));const n=d.label.position==="top"?r.width:-r.width;o.setAttribute("y",String(parseFloat((s=o.getAttribute("y"))!=null?s:"0")+n));const{x:c,y:h}
1130=this.annoCtx.graphics.rotateAroundCenter(o);o.setAttribute("transform",`rotate(-90 ${c} ${h})`)}}}addBackgroundToAnno(d,e){const t=this.w;if(!d||!e.label.text||!String(e.label.text).trim())return null;const s=t.dom.baseEl.querySelector(".apexcharts-grid");if(!s)return null;const i=s.getBoundingClientRect(),a=s.getBBox(),o=i.width/a.width||1,r=d.getBoundingClientRect();let{left:n,right:c,top:h,bottom:l}=e.label.style.padding;e.label.orientation==="vertical"&&([h,l,n,c]=[n,c,h,l]);const g=(r.left-i.left)/o-n,p=(r.top-i.top)/o-h,u=this.annoCtx.graphics.drawRect(g-t.globals.barPadForNumericAxis,p,r.width/o+n+c,r.height/o+h+l,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&u.node.classList.add(e.id),u}annotationsBackground(){const d=this.w,e=(t,s,i)=>{const a=d.dom.baseEl.querySelector(`.apexcharts-${i}-annotations .apexcharts-${i}-annotation-label[rel='${s}']`);if(a){const o=a.parentNode,r=this.addBackgroundToAnno(a,t);if(r){o?.insertBefore(r.node,a);const n=a.getAttribute("x");n!==null&&ue(r,parseFloat(n),d),t.label.mouseEnter&&r.node.addEventListener("mouseenter",t.label.mouseEnter.bind(this,t)),t.label.mouseLeave&&r.node.addEventListener("mouseleave",t.label.mouseLeave.bind(this,t)),t.label.click&&r.node.addEventListener("click",t.label.click.bind(this,t))}}};d.config.annotations.xaxis.forEach((t,s)=>e(t,s,"xaxis")),d.config.annotations.yaxis.forEach((t,s)=>e(t,s,"yaxis")),d.config.annotations.points.forEach((t,s)=>e(t,s,"point"))}getY1Y2(d,e){var t,s;const i=this.w,a=d==="y1"?e.y:e.y2;let o,r=!1;if(this.annoCtx.invertAxis){const n=i.config.xaxis.convertedCatToNumeric?i.labelData.categoryLabels:i.labelData.labels,c=n.indexOf(a),h=i.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${c+1})`);o=h?parseFloat((t=h.getAttribute("y"))!=null?t:"0"):(i.layout.gridHeight/n.length-1)*(c+1)-i.globals.barHeight,e.seriesIndex!==void 0&&i.globals.barHeight&&(o-=i.globals.barHeight/2*(i.seriesData.series.length-1)-i.globals.barHeight*e.seriesIndex)}else{const n=i.globals.seriesYAxisMap[e.yAxisIndex][0],c=i.config.yaxis[e.yAxisIndex].logarithmic?new J(this.w).getLogVal(i.config.yaxis[e.yAxisIndex].logBase,a,n)/i.globals.yLogRatio[n]:(a-i.globals.minYArr[n])/(i.globals.yRange[n]/i.layout.gridHeight);o=i.layout.gridHeight-Math.min(Math.max(c,0),i.layout.gridHeight),r=c>i.layout.gridHeight||c<0,!e.marker||e.y!==void 0&&e.y!==null||(o=0),(s=i.config.yaxis[e.yAxisIndex])!=null&&s.reversed&&(o=c)}return typeof a=="string"&&a.includes("px")&&(o=parseFloat(a)),{yP:o,clipped:r}}getX1X2(d,e){const t=this.w,s=d==="x1"?e.x:e.x2,i=this.annoCtx.invertAxis?t.globals.minY:t.globals.minX,a=this.annoCtx.invertAxis?t.globals.maxY:t.globals.maxX,o=this.annoCtx.invertAxis?t.globals.yRange[0]:t.globals.xRange;let r=!1,n=this.annoCtx.inversedReversedAxis?(a-s)/(o/t.layout.gridWidth):(s-i)/(o/t.layout.gridWidth);return t.config.xaxis.type!=="category"&&!t.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||t.axisFlags.dataFormatXNumeric||t.config.chart.sparkline.enabled||(n=this.getStringX(s)),typeof s=="string"&&s.includes("px")&&(n=parseFloat(s)),s==null&&e.marker&&(n=t.layout.gridWidth),e.seriesIndex!==void 0&&t.globals.barWidth&&!this.annoCtx.invertAxis&&(n-=t.globals.barWidth/2*(t.seriesData.series.length-1)-t.globals.barWidth*e.seriesIndex),typeof n!="number"&&(n=0,r=!0),parseFloat(n.toFixed(10))>parseFloat(t.layout.gridWidth.toFixed(10))?(n=t.layout.gridWidth,r=!0):n<0&&(n=0,r=!0),{x:n,clipped:r}}getStringX(d){var e;const t=this.w;let s=d;if(t.config.xaxis.convertedCatToNumeric&&t.labelData.categoryLabels.length){const o=String(d);d=t.labelData.categoryLabels.findIndex(r=>String(r)===o)+1}const i=t.labelData.labels.map(o=>Array.isArray(o)?o.join(" "):o).indexOf(d),a=t.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${i+1})`);return a&&(s=parseFloat((e=a.getAttribute("x"))!=null?e:"0")),s}};class Os{constructor(e){this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ge(this.annoCtx)}addXaxisAnnotation(e,t,s){const i=this.w,a=this.helpers.getX1X2("x1",e);let o=a.x;const r=a.clipped;let n,c=!0;const h=e.label.text,l=e.strokeDashArray;if(M.isNumber(o)){if(e.x2===null||e.x2===void 0){if(!r){const g=this.annoCtx.graphics.drawLine(o+e.offsetX,0+e.offsetY,o+e.offsetX,i.layout.gridHeight+e.offsetY,e.borderColor,l,e.borderWidth);t.appendChild(g.node),e.id&&g.node.classList.add(e.id),ue(g,o+e.offsetX,i)}}else{const g=this.helpers.getX1X2("x2",e);if(n=g.x,c=g.clipped,n<o){const u=o;o=n,n=u}const p=this.annoCtx.graphics.drawRect(o+e.offsetX,0+e.offsetY,n-o,i.layout.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,l);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),t.appendChild(p.node),e.id&&p.node.classList.add(e.id),ue(p,o+e.offsetX,i)}if(!r||!c){const g=this.annoCtx.graphics.getTextRects(h,e.label.style.fontSize),p=e.label.position==="top"?4:e.label.position==="center"?i.layout.gridHeight/2+(e.label.orientation==="vertical"?g.width/2:0):i.layout.gridHeight,u=this.annoCtx.graphics.drawText({x:o+e.label.offsetX,y:p+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?g.width/2-12:-g.width/2:0),text:h,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:""}`});u.attr({rel:s}),t.appendChild(u.node),ue(u,o+e.label.offsetX,i),this.annoCtx.helpers.setOrientations(e,s)}}}drawXAxisAnnotations(){const e=this.w,t=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return e.config.annotations.xaxis.map((s,i)=>{this.addXaxisAnnotation(s,t.node,i)}),t}}class _s{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Ge(this.annoCtx),this.axesUtils=new xe(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(e,t,s){const i=this.w,a=e.strokeDashArray;let o=this.helpers.getY1Y2("y1",e),r=o.yP;const n=o.clipped;let c,h=!0,l=!1;const g=e.label.text;if(e.y2===null||e.y2===void 0){if(!n){l=!0;const p=this.annoCtx.graphics.drawLine(0+e.offsetX,r+e.offsetY,this._getYAxisAnnotationWidth(e),r+e.offsetY,e.borderColor,a,e.borderWidth);t.appendChild(p.node),e.id&&p.node.classList.add(e.id)}}else{if(o=this.helpers.getY1Y2("y2",e),c=o.yP,h=o.clipped,c>r){const p=r;r=c,c=p}if(!n||!h){l=!0;const p=this.annoCtx.graphics.drawRect(0+e.offsetX,c+e.offsetY,this._getYAxisAnnotationWidth(e),r-c,0,e.fillColor,e.opacity,1,e.borderColor,a);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),t.appendChild(p.node),e.id&&p.node.classList.add(e.id)}}if(l){const p=e.label.position==="right"?i.layout.gridWidth:e.label.position==="center"?i.layout.gridWidth/2:0,u=this.annoCtx.graphics.drawText({x:p+e.label.offsetX,y:(c??r)+e.label.offsetY-3,text:g,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:""}`});u.attr({rel:s}),t.appendChild(u.node)}}_getYAxisAnnotationWidth(e){const t=this.w;let s=t.layout.gridWidth;return s=e.width.indexOf("%")>-1?t.layout.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10),s+e.offsetX}drawYAxisAnnotations(){const e=this.w,t=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.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,t.node,i)}),t}}class $s{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Ge(this.annoCtx)}addPointAnnotation(e,t,s){const i=this.w;if(i.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)return;const a=this.helpers.getX1X2("x1",e),o=a.x,r=a.clipped,n=this.helpers.getY1Y2("y1",e),c=n.yP,h=n.clipped;if(M.isNumber(o)&&!h&&!r){const l={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radiu
vendor: 12,341 bytes, line 1130
1130s,class:`apexcharts-point-annotation-marker ${e.marker.cssClass} ${e.id?e.id:""}`};let g=this.annoCtx.graphics.drawMarker(o+e.marker.offsetX,c+e.marker.offsetY,l);t.appendChild(g.node),ue(g,o,i);const p=e.label.text?e.label.text:"",u=this.annoCtx.graphics.drawText({x:o+e.label.offsetX,y:c+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:p,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-point-annotation-label ${e.label.style.cssClass} ${e.id?e.id:""}`});if(u.attr({rel:s}),t.appendChild(u.node),ue(u,o,i),e.customSVG.SVG){const x=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});x.attr({transform:`translate(${o+e.customSVG.offsetX}, ${c+e.customSVG.offsetY})`}),x.node.innerHTML=e.customSVG.SVG,t.appendChild(x.node)}if(e.image.path){const x=e.image.width?e.image.width:20,b=e.image.height?e.image.height:20;g=this.annoCtx.addImage({x:o+e.image.offsetX-x/2,y:c+e.image.offsetY-b/2,width:x,height:b,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&g.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&g.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&g.node.addEventListener("click",e.click.bind(this,e))}}drawPointAnnotations(){const e=this.w,t=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((s,i)=>{this.addPointAnnotation(s,t.node,i)}),t}}ce.registerFeatures({annotations:class{constructor(d,{theme:e=null,timeScale:t=null}={}){this.w=d,this.theme=e,this.timeScale=t,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new F(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ge(this),this.xAxisAnnotations=new Os(this),this.yAxisAnnotations=new _s(this),this.pointsAnnotations=new $s(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 d=this.w;if(d.globals.axisCharts&&d.globals.dataPoints){const e=this.yAxisAnnotations.drawYAxisAnnotations(),t=this.xAxisAnnotations.drawXAxisAnnotations(),s=this.pointsAnnotations.drawPointAnnotations(),i=d.config.chart.animations.enabled,a=[e,t,s],o=[t.node,e.node,s.node],r=d.config.chart.type==="line"||d.config.chart.type==="area"||d.config.chart.type==="rangeArea",n=[r,!1,r];for(let c=0;c<3;c++)d.dom.elGraphical.add(a[c]),!i||d.globals.resized||d.globals.dataChanged||d.config.chart.type!=="scatter"&&d.config.chart.type!=="bubble"&&d.globals.dataPoints>1&&!n[c]&&o[c].classList.add("apexcharts-element-hidden"),d.globals.delayedElements.push({el:o[c],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(d=>{this.addImage(d)})}drawTextAnnos(){this.w.config.annotations.texts.map(d=>{this.addText(d)})}addXaxisAnnotation(d,e,t){this.xAxisAnnotations.addXaxisAnnotation(d,e,t)}addYaxisAnnotation(d,e,t){this.yAxisAnnotations.addYaxisAnnotation(d,e,t)}addPointAnnotation(d,e,t){this.pointsAnnotations.addPointAnnotation(d,e,t)}addText(d){const{x:e,y:t,text:s,textAnchor:i,foreColor:a,fontSize:o,fontFamily:r,fontWeight:n,cssClass:c,backgroundColor:h,borderWidth:l,strokeDashArray:g,borderRadius:p,borderColor:u,appendTo:x=".apexcharts-svg",paddingLeft:b=4,paddingRight:f=4,paddingBottom:m=2,paddingTop:w=2}=d,y=this.w,v=this.graphics.drawText({x:e,y:t,text:s,textAnchor:i||"start",fontSize:o||"12px",fontWeight:n||"regular",fontFamily:r||y.config.chart.fontFamily,foreColor:a||y.config.chart.foreColor,cssClass:c}),C=y.dom.baseEl.querySelector(x);C&&C.appendChild(v.node);const S=v.bbox();if(s){const L=this.graphics.drawRect(S.x-b,S.y-w,S.width+b+f,S.height+m+w,p,h||"transparent",1,l,u,g);C.insertBefore(L.node,v.node)}}addImage(d){const e=this.w,{path:t,x:s=0,y:i=0,width:a=20,height:o=20,appendTo:r=".apexcharts-svg"}=d,n=e.dom.Paper.image(t);n.size(a,o).move(s,i);const c=e.dom.baseEl.querySelector(r);return c&&c.appendChild(n.node),n}addXaxisAnnotationExternal(d,e,t){return this.addAnnotationExternal({params:d,pushToMemory:e,context:t,type:"xaxis",contextMethod:t.addXaxisAnnotation}),t}addYaxisAnnotationExternal(d,e,t){return this.addAnnotationExternal({params:d,pushToMemory:e,context:t,type:"yaxis",contextMethod:t.addYaxisAnnotation}),t}addPointAnnotationExternal(d,e,t){return this.invertAxis===void 0&&(this.invertAxis=t.w.globals.isBarHorizontal),this.addAnnotationExternal({params:d,pushToMemory:e,context:t,type:"point",contextMethod:t.addPointAnnotation}),t}addAnnotationExternal({params:d,pushToMemory:e,context:t,type:s,contextMethod:i}){const a=t,o=a.w,r=o.dom.baseEl.querySelector(`.apexcharts-${s}-annotations`),n=r.childNodes.length+1,c=new we,h=Object.assign({},s==="xaxis"?c.xAxisAnnotation:s==="yaxis"?c.yAxisAnnotation:c.pointAnnotation),l=M.extend(h,d);switch(s){case"xaxis":this.addXaxisAnnotation(l,r,n);break;case"yaxis":this.addYaxisAnnotation(l,r,n);break;case"point":this.addPointAnnotation(l,r,n)}const g=o.dom.baseEl.querySelector(`.apexcharts-${s}-annotations .apexcharts-${s}-annotation-label[rel='${n}']`),p=this.helpers.addBackgroundToAnno(g,l);return p&&r.insertBefore(p.node,g),e&&o.globals.memory.methodsToExec.push({context:a,id:l.id?l.id:M.randomId(),method:i,label:"addAnnotation",params:d}),t}clearAnnotations(d){const e=d.w,t=e.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");for(let s=e.globals.memory.methodsToExec.length-1;s>=0;s--)e.globals.memory.methodsToExec[s].label!=="addText"&&e.globals.memory.methodsToExec[s].label!=="addAnnotation"||e.globals.memory.methodsToExec.splice(s,1);Array.prototype.forEach.call(t,s=>{for(;s.firstChild;)s.removeChild(s.firstChild)})}removeAnnotation(d,e){const t=d.w,s=t.dom.baseEl.querySelectorAll(`.${e}`);s&&(t.globals.memory.methodsToExec.map((i,a)=>{i.id===e&&t.globals.memory.methodsToExec.splice(a,1)}),Object.keys(t.config.annotations).forEach(i=>{const a=t.config.annotations[i];Array.isArray(a)&&(t.config.annotations[i]=a.filter(o=>o.id!==e))}),Array.prototype.forEach.call(s,i=>{i.parentElement.removeChild(i)}))}}}),ce.registerFeatures({keyboardNavigation:class{constructor(d,e){this.w=d,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 d=this.w.dom.Paper.node;d&&(d.setAttribute("tabindex","0"),d.addEventListener("focus",this._onFocus),d.addEventListener("blur",this._onBlur),d.addEventListener("mousedown",this._onPointerDown,{capture:!0}),d.addEventListener("pointerdown",this._onPointerDown,{capture:!0}),d.addEventListener("touchstart",this._onPointerDown,{capture:!0,passive:!0}),d.addEventListener("keydown",this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener("legendClick",this._onLegendClick))}destroy(){const d=this.w,e=d.dom.Paper&&d.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(d){}_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(d){var e,t,s;if(this._isNavEnabled()&&this.active){if(d.shiftKey&&(d.key==="ArrowRight"||d.key==="ArrowLeft")&&this._canPan())return d.preventDefault(),void this._panBy(d.key==="ArrowRight"?1:-1);switch(d.key){case"ArrowRight":d.preventDefault(),this._move(0,1);break;case"ArrowLeft":d.preventDefault(),this._move(0,-1);break;case"ArrowUp":d.preventDefault(),this._move(-1,0);break;case"ArrowDown":d.preventDefault(),this._move(1,0);break;case"Home":d.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case"End":d.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case"Enter":case" ":d.preventDefault(),this._fireClick();break;case"+":case"=":this._canZoom()&&(d.preventDefault(),(e=this.ctx.toolbar)==null||e.handleZoomIn(),this._announce("Zoomed in"));break;case"-":case"_":this._canZoom()&&(d.preventDefault(),(t=this.ctx.toolbar)==null||t.handleZoomOut(),this._announce("Zoomed out"));break;case"0":this._canZoom()&&this.w.interact.zoomed&&(d.preventDefault(),(s=this.ctx.toolbar)==null||s.handleZoomReset(),this._announce("Zoom reset"));break;case"Escape":d.preventDefault(),this._tooltipDismissed?(this.active=!1,this._tooltipDismissed=!1,this._hideFocus()):(this._tooltipDismissed=!0,this._hideFocus())}}}_canZoom(){const d=this.w;return!!(d.globals.axisCharts&&d.config.chart.zoom&&d.config.chart.zoom.enabled)}_canPan(){return this._canZoom()}_panBy(d){const e=this.w,t=this.ctx.toolbar;if(!t)return;const s=Number(e.globals.minX),i=Number(e.globals.maxX);if(!isFinite(s)||!isFinite(i)||s===i)return;const a=.1*(i-s)*d;t.zoomUpdateOptions(s+a,i+a),this._announce(d>0?"Panned right":"Panned left")}_move(d,e){const t=this.w,s=t.config.chart.accessibility.keyboard.navigation.wrapAround;if(d!==0){const i=this.w.globals.tooltip;if(i&&i.tConfig&&i.tConfig.shared){const c=this.dataPointIndex;if(i.tooltipUtil&&i.tooltipUtil.isXoverlap(c)&&i.tooltipUtil.isInitialSeriesSameLen())return}const a=this._getSeriesCount();let o=this.seriesIndex+d,r=0;for(;r<a&&(o<0&&(o=s?a-1:0),o>=a&&(o=s?0:a-1),t.globals.collapsedSeriesIndices.includes(o));)o+=d,r++;this.seriesIndex=o;const n=this._getDataPointCount(o);this.dataPointIndex>=n&&(this.dataPointIndex=n-1)}if(e!==0){const i=this._getDataPointCount(this.seriesIndex);let a=this.dataPointIndex+e;a<0&&(a=s?i-1:0),a>=i&&(a=s?0:i-1),this.dataPointIndex=a,e>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(e)}this._showCurrentPoint()}_skipNullForward(){const d=this.w,e=this.seriesIndex,t=this._getDataPointCount(e);let s=this.dataPointIndex,i=0;if(Array.isArray(d.seriesData.series[e])){for(;i<t&&d.seriesData.series[e][s]===null;)s=(s+1)%t,i++;this.dataPointIndex=s}}_skipNullBackward(){const d=this.w,e=this.seriesIndex,t=this._getDataPointCount(e);let s=this.dataPointIndex,i=0;if(Array.isArray(d.seriesData.series[e])){for(;i<t&&d.seriesData.series[e][s]===null;)s=(s-1+t)%t,i++;this.dataPointIndex=s}}_showCurrentPoint(){const{seriesIndex:d,dataPointIndex:e}=this,t=this.w,s=t.globals.tooltip;s&&s.ttItems&&(t.interact.capturedSeriesIndex=d,t.interact.capturedDataPointIndex=e,this._applyFocusClass(d,e),this._showTooltip(d,e,s))}_hideFocus(){const d=this.w,e=d.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!e)return;e.marker&&e.marker.resetPointsSize(),this._enlargedScatterMarker=null;const t=e.getElTooltip();t&&(t.classList.remove("apexcharts-active"),d.config.chart.accessibility.enabled&&d.config.chart.accessibility.announcements.enabled&&t.setAttribute("aria-hidden","true")),d.dom.baseEl.classList.remove("apexcharts-tooltip-active");const s=e.getElXCrosshairs();s&&s.classList.remove("apexcharts-active")}_showTooltip(d,e,t){const s=this.w,i=s.config.chart.type,a=t.getElTooltip();if(!a)return;const o=t.getCachedDimensions();t.tooltipRect={x:0,y:0,ttWidth:o.ttWidth||0,ttHeight:o.ttHeight||0},this._setSyntheticEvent(d,e,t),s.dom.baseEl.classList.add("apexcharts-tooltip-active"),a.classList.add("apexcharts-active"),s.config.chart.accessibility.enabled&&s.c
1130onfig.chart.accessibility.announcements.enabled&&a.removeAttribute("aria-hidden"),i==="pie"||i==="donut"||i==="polarArea"?this._showTooltipNonAxis(d,e,t,a):i==="radialBar"?this._showTooltipRadialBar(d,e,t,a):i==="heatmap"||i==="treemap"?this._showTooltipHeatTree(d,e,t,a,i):i==="bar"||i==="candlestick"||i==="boxPlot"||i==="violin"||i==="rangeBar"?this._showTooltipBar(d,e,t):this._showTooltipAxisLine(d,e,t)}_setSyntheticEvent(d,e,t){const s=this.w,i=s.config.chart.type;let a=0,o=0;const r=this._getFocusableElement(d,e);if(r){const n=r.getBoundingClientRect();a=n.left+n.width/2,o=n.top+n.height/2}else if(s.globals.pointsArray&&s.globals.pointsArray[d]&&s.globals.pointsArray[d][e]){const n=s.globals.pointsArray[d][e],c=t.getElGrid&&t.getElGrid();if(c){const h=c.getBoundingClientRect();a=h.left+(n[0]||0),o=h.top+(n[1]||0)}}else{const n=s.dom.Paper&&s.dom.Paper.node;if(n){const c=n.getBoundingClientRect();a=c.left+c.width/2,o=c.top+c.height/2}}if((i==="line"||i==="area"||i==="rangeArea"||i==="scatter"||i==="bubble"||i==="radar")&&s.globals.pointsArray&&s.globals.pointsArray[d]&&s.globals.pointsArray[d][e]){const n=s.globals.pointsArray[d][e],c=t.getElGrid&&t.getElGrid();if(c){const h=c.getBoundingClientRect();a=h.left+(n[0]||0),o=h.top+(n[1]||0)}}t.e={type:"mousemove",clientX:a,clientY:o}}_showTooltipBar(d,e,t){var s,i,a,o;const r=this.w,n=t.tConfig.shared&&(t.tooltipUtil.isXoverlap(e)||r.globals.isBarHorizontal)&&t.tooltipUtil.isInitialSeriesSameLen(),c=(o=(a=(i=(s=r.rangeData.seriesRange)==null?void 0:s[d])==null?void 0:i[e])==null?void 0:a.y)==null?void 0:o[0];t.tooltipLabels.drawSeriesTexts(G($($({ttItems:t.ttItems,i:d,j:e},c?.y1!==void 0&&{y1:c.y1}),c?.y2!==void 0&&{y2:c.y2}),{shared:n}));const h=`.apexcharts-series[data\\:realIndex='${d}']`,l=r.dom.Paper.findOne(`${h} path[j='${e}'], ${h} circle[j='${e}'], ${h} rect[j='${e}']`);if(l&&(this._leaveHoveredBar(),new F(this.w,this.ctx).pathMouseEnter(l,null),this._hoveredBarEl=l),r.globals.isBarHorizontal){const g=l&&l.node;if(g){const p=r.dom.elWrap.getBoundingClientRect(),u=g.getBoundingClientRect(),x=u.left-p.left,b=u.top-p.top,f=u.height,m=u.width,w=t.tooltipRect.ttWidth||0,y=b+f/2-(t.tooltipRect.ttHeight||0)/2;let v=x+m;x<(t.xyRatios&&t.xyRatios.baseLineInvertedY!=null?t.xyRatios.baseLineInvertedY:p.width/2)&&(v=x-w);const C=t.getElTooltip();C&&(C.style.left=v+"px",C.style.top=y+"px")}}else t.tooltipPosition.moveStickyTooltipOverBars(e,d)}_showTooltipAxisLine(d,e,t){const s=this.w,i=s.config.chart.type,a=t.tConfig.shared&&t.tooltipUtil.isXoverlap(e)&&t.tooltipUtil.isInitialSeriesSameLen();t.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:d,j:e,shared:a});const o=i==="scatter"||i==="bubble",r=s.globals.markers.largestSize>0;o?this._showScatterBubblePoint(d,e,t):r?a?t.marker.enlargePoints(e):t.tooltipPosition.moveDynamicPointOnHover(e,d):a?t.tooltipPosition.moveDynamicPointsOnHover(e):t.tooltipPosition.moveDynamicPointOnHover(e,d)}_showScatterBubblePoint(d,e,t){const s=this.w.dom.baseEl;this._enlargedScatterMarker&&(t.marker.oldPointSize(this._enlargedScatterMarker),this._enlargedScatterMarker=null);const i=s.querySelector(`.apexcharts-series[data\\:realIndex='${d}']`);if(!i)return;const a=i.querySelector(`.apexcharts-marker[rel='${e}']`);a&&(t.marker.enlargeCurrentPoint(e,a),this._enlargedScatterMarker=a)}_showTooltipNonAxis(d,e,t,s){var i,a;const o=this.w;t.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:e,shared:!1});const r=s.getBoundingClientRect(),n=r.width||t.tooltipRect.ttWidth||0,c=r.height||t.tooltipRect.ttHeight||0,h=o.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${e}']`);if(h){const l=parseFloat((i=h.getAttribute("data:cx"))!=null?i:""),g=parseFloat((a=h.getAttribute("data:cy"))!=null?a:"");if(!isNaN(l)&&!isNaN(g)){const p=o.dom.Paper.node.getBoundingClientRect(),u=o.dom.elWrap.getBoundingClientRect(),x=p.left-u.left,b=p.top-u.top;s.style.left=x+l-n/2+"px",s.style.top=b+g-c-10+"px"}}}_showTooltipRadialBar(d,e,t,s){var i;const a=this.w;t.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:d,shared:!1});const{ttWidth:o=0,ttHeight:r=0}=t.getCachedDimensions(),n=a.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${d}'] path`);if(n){const c=parseFloat((i=n.getAttribute("data:angle"))!=null?i:"")||0,h=(a.config.plotOptions.radialBar.startAngle||0)+c/2,l=a.layout.gridWidth/2,g=a.layout.gridHeight/2,p=a.globals.radialSize||Math.min(a.layout.gridWidth,a.layout.gridHeight)/2,u=a.seriesData.series.length,x=p/M
1130ath.max(u,1),b=p-d*x,f=(b+(b-x))/2,m=M.polarToCartesian(l,g,f,h),w=m.x+(a.layout.translateX||0),y=m.y+(a.layout.translateY||0);s.style.left=w-o/2+"px",s.style.top=y-r-10+"px"}}_showTooltipHeatTree(d,e,t,s,i){var a,o;const r=this.w;t.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:d,j:e,shared:!1});const n=s.getBoundingClientRect(),c=n.width||t.tooltipRect.ttWidth||0,h=n.height||t.tooltipRect.ttHeight||0,l=i==="heatmap"?"apexcharts-heatmap-rect":"apexcharts-treemap-rect",g=r.dom.baseEl.querySelector(`.${l}[i='${d}'][j='${e}']`);if(g){const p=r.dom.elWrap.getBoundingClientRect(),u=g.getBoundingClientRect(),x=u.left-p.left,b=u.top-p.top,f=u.width,m=u.height,w=parseFloat((a=g.getAttribute("cx"))!=null?a:""),y=parseFloat((o=g.getAttribute("width"))!=null?o:"");t.tooltipPosition.moveXCrosshairs(w+y/2);let v=x+f+c/2;const C=b+m/2-h/2;x+f>r.layout.gridWidth/2&&(v=x-c/2),s.style.left=v+"px",s.style.top=C+"px"}}_applyFocusClass(d,e){this._removeFocusClass();const t=this._getFocusableElement(d,e);if(t){t.classList.add("apexcharts-keyboard-focused"),t.setAttribute("role","img");const s=this._buildPointLabel(d,e);s&&t.setAttribute("aria-label",s),this._focusedEl=t}}_removeFocusClass(){this._focusedEl&&(this._focusedEl.classList.remove("apexcharts-keyboard-focused"),this._focusedEl.removeAttribute("role"),this._focusedEl.removeAttribute("aria-label"),this._focusedEl=null)}_buildPointLabel(d,e){var t,s,i,a,o,r,n,c;const h=this.w,l=h.config.chart.type,g=h.seriesData.seriesNames||[],p=h.seriesData.series||[];if(l==="pie"||l==="donut"||l==="polarArea"){const v=(s=((t=h.labelData)==null?void 0:t.labels)&&h.labelData.labels[e])!=null?s:"",C=Array.isArray(p)?p[e]:"";return v?`${v}: ${C}`:`${C}`}if(l==="radialBar")return`${g[d]||`Series ${d+1}`}: ${Array.isArray(p)?p[d]:""}`;const u=g[d]||`Series ${d+1}`,x=(Array.isArray(p[d])?p[d]:[])[e];let b=x==null?"":String(x);const f=(a=(i=h.formatters)==null?void 0:i.yLabelFormatters)==null?void 0:a[d];if(typeof f=="function")try{b=f(x,{seriesIndex:d,dataPointIndex:e,w:h})}catch{}let m="";const w=(o=h.labelData)==null?void 0:o.categoryLabels,y=(n=(r=h.seriesData)==null?void 0:r.seriesX)==null?void 0:n[d];if(Array.isArray(w)&&w[e]!=null)m=String(w[e]);else if(Array.isArray(y)&&y[e]!=null){const v=(c=h.formatters)==null?void 0:c.xLabelFormatter;if(typeof v=="function")try{m=String(v(y[e],{seriesIndex:d,dataPointIndex:e,w:h}))}catch{m=String(y[e])}else m=String(y[e])}return m?`${u}: ${b}, ${m}`:`${u}: ${b}`}_leaveHoveredBar(){this._hoveredBarEl&&(new F(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),this._hoveredBarEl=null)}_getFocusableElement(d,e){const t=this.w,s=t.config.chart.type,i=t.dom.baseEl;return s==="pie"||s==="donut"||s==="polarArea"?i.querySelector(`.apexcharts-pie-area[j='${e}']`):s==="heatmap"?i.querySelector(`.apexcharts-heatmap-rect[i='${d}'][j='${e}']`):s==="treemap"?i.querySelector(`.apexcharts-treemap-rect[i='${d}'][j='${e}']`):s==="radialBar"?i.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${d}'] path`):s==="bar"||s==="candlestick"||s==="boxPlot"||s==="violin"||s==="rangeBar"?i.querySelector(`.apexcharts-series[data\\:realIndex='${d}'] path[j='${e}']`):i.querySelector(`.apexcharts-series[data\\:realIndex='${d}'] .apexcharts-marker[rel='${e}']`)||null}_fireClick(){const d=this.w.globals.tooltip;d&&d.markerClick({type:"mouseup",clientX:0,clientY:0},this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){const d=this.w.config.chart.accessibility;return d.enabled&&d.keyboard.enabled&&d.keyboard.navigation.enabled}_getSeriesCount(){const d=this.w,e=d.config.chart.type;return e==="pie"||e==="donut"||e==="polarArea"?1:d.seriesData.series.length}_getDataPointCount(d){const e=this.w,t=e.config.chart.type;if(t==="pie"||t==="donut"||t==="polarArea")return e.seriesData.series.length;const s=e.seriesData.series;return s[d]&&Array.isArray(s[d])?s[d].length:0}_clampCursor(){const d=this._getSeriesCount();this.seriesIndex>=d&&(this.seriesIndex=d-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 d=this.w,e=d.globals,t=this.seriesIndex;if(!d.interact.zoomed)return;const s=d.seriesData.seriesX&&d.seriesData.seriesX[t];if(!s||!s.length)return;const i=e.minX,a=e.maxX;if(i===void 0||a===void 0)return;const o=s[this.dataPointIndex];if(o>=i&&o<=a)return;const r=s.length;for(let n=0;n<r;n++)if(s[n]>=i&&s[n]<=a)return void(this.dataPointIndex=n)}_snapToVisibleRangeInDirection(d){const e=this.w,t=e.globals,s=this.seriesIndex,i=e.seriesData.seriesX&&e.seriesData.seriesX[s];if(!i||!i.length)return;const a=t.minX,o=t.maxX;if(a===void 0||o===void 0)return;const r=i.length;if(d>=0){for(let n=0;n<r;n++)if(i[n]>=a&&i[n]<=o)return void(this.dataPointIndex=n)}else for(let n=r-1;n>=0;n--)if(i[n]>=a&&i[n]<=o)return void(this.dataPointIndex=n)}_isDataPointVisible(d,e){const t=this.w,s=t.globals;if(!t.interact.zoomed)return!0;const i=t.seriesData.seriesX&&t.seriesData.seriesX[d];if(!i)return!0;const a=i[e];return a===void 0||a>=s.minX&&a<=s.maxX}_announce(d){const e=this.w;if(!e.config.chart.accessibility.announcements.enabled)return;const t=e.dom.baseEl;if(!t)return;const s=t.querySelector(".apexcharts-sr-status");s&&(s.textContent="",setTimeout(()=>{s.textContent=d},0))}}});const Gs=new Set(["bar","funnel","pyramid"]),js=new Set(["pie","donut","polarArea","radialBar","gauge"]);
1130function Le(d){return Gs.has(d)?"bar":js.has(d)?"radial":null}ce.registerFeatures({morphTypeChange:class{constructor(d,e){this.w=d,this.ctx=e,this._snapshot=null}canMorphTypes(d,e){if(d===e)return!1;const t=Le(d),s=Le(e);return!(!t||!s)}isCompatibleSeriesShape(d,e,t){if(!Array.isArray(t)||t.length===0)return!1;const s=Le(d),i=Le(e);return i==="radial"?!!t.every(a=>typeof a=="number")||t.length===1&&t[0]&&typeof t[0]=="object"&&Array.isArray(t[0].data):i==="bar"?t.every(a=>a&&typeof a=="object"&&Array.isArray(a.data)):s!==null&&i!==null}captureBeforeDestroy({fromType:d,toType:e,newSeries:t}){if(this._snapshot=null,!O.isBrowser())return!1;const s=this.w.config.chart.animations;if(!s||s.enabled===!1||s.chartTypeMorph&&s.chartTypeMorph.enabled===!1||s.respectReducedMotion&&wt()||!this.canMorphTypes(d,e)||!this.isCompatibleSeriesShape(d,e,t))return!1;const i=this._captureFromDOM(d);if(!i.length)return!1;const a=this._buildMapping(i,d,e,t);return a.size!==0&&(this._snapshot={fromType:d,toType:e,mapping:a,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}},this.w.globals.previousPaths=[],!0)}_captureFromDOM(d){var e;const t=(e=this.w.globals.dom)==null?void 0:e.baseEl;if(!t)return[];const s=[],i=Le(d);if(i==="bar")t.querySelectorAll(".apexcharts-bar-series .apexcharts-series").forEach(a=>{var o;const r=parseInt((o=a.getAttribute("data:realIndex"))!=null?o:"0",10);a.querySelectorAll("path[pathTo]").forEach((n,c)=>{const h=n.getAttribute("pathTo")||n.getAttribute("d");h&&s.push({realIndex:r,j:c,d:h,fill:n.getAttribute("fill")})})});else if(i==="radial")if(d==="radialBar"||d==="gauge"){const a=this.w.layout.gridWidth/2,o=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;t.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(r=>{var n;const c=r.parentElement,h=parseInt((n=c?.getAttribute("data:realIndex"))!=null?n:"0",10),l=r.getAttribute("d");if(!l)return;const g=parseFloat(r.getAttribute("stroke-width")||"0"),p=g>1&&this._radialArcToFilledSegment(l,g,a,o)||l;s.push({realIndex:h,j:0,d:p,fill:r.getAttribute("stroke")})})}else t.querySelectorAll(".apexcharts-pie-series .apexcharts-pie-area").forEach((a,o)=>{const r=a.getAttribute("d");r&&s.push({realIndex:o,j:0,d:r,fill:a.getAttribute("fill")})});return s}_radialArcToFilledSegment(d,e,t,s){const i=d.match(/M\s*(-?[\d.]+)\s+(-?[\d.]+)\s+A\s*(-?[\d.]+)\s+(?:-?[\d.]+)\s+(?:-?[\d.]+)\s+(\d)\s+(\d)\s+(-?[\d.]+)\s+(-?[\d.]+)/);if(!i)return null;const a=parseFloat(i[1]),o=parseFloat(i[2]),r=parseFloat(i[3]),n=parseInt(i[4],10),c=parseInt(i[5],10),h=parseFloat(i[6]),l=parseFloat(i[7]);if(!isFinite(r)||r<=0)return null;const g=e/2,p=r+g,u=Math.max(0,r-g),x=(v,C,S)=>{const L=v-t,A=C-s,D=Math.sqrt(L*L+A*A);if(D===0)return{x:t,y:s};const k=S/D;return{x:t+L*k,y:s+A*k}},b=x(a,o,p),f=x(h,l,p),m=x(a,o,u),w=x(h,l,u),y=c?0:1;return`M ${b.x} ${b.y} A ${p} ${p} 0 ${n} ${c} ${f.x} ${f.y} L ${w.x} ${w.y} A ${u} ${u} 0 ${n} ${y} ${m.x} ${m.y} Z`}buildRingSegmentPath(d,e,t,s,i,a){const o=s/2,r=t+o,n=Math.max(0,t-o),c=(i-90)*Math.PI/180,h=(a-90)*Math.PI/180,l=d+r*Math.cos(c),g=e+r*Math.sin(c),p=d+r*Math.cos(h),u=e+r*Math.sin(h),x=d+n*Math.cos(c),b=e+n*Math.sin(c),f=d+n*Math.cos(h),m=e+n*Math.sin(h),w=a>i?1:0,y=Math.abs(a-i)>180?1:0;return`M ${l} ${g} A ${r} ${r} 0 ${y} ${w} ${p} ${u} L ${f} ${m} A ${n} ${n} 0 ${y} ${1-w} ${x} ${b} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(d,e,t,s){const i=new Map,a=Le(t),o=d.slice().sort((r,n)=>r.realIndex-n.realIndex||r.j-n.j);if(a==="radial")return o.forEach((r,n)=>{i.set(`${n}:0`,{d:r.d,fill:r.fill})}),i;if(a==="bar"){const r=[];return(Array.isArray(s)?s:[]).forEach((n,c)=>{const h=n&&Array.isArray(n.data)?n.data:[];for(let l=0;l<h.length;l++)r.push({realIndex:c,j:l})}),o.forEach((n,c)=>{const h=r[c];h&&i.set(`${h.realIndex}:${h.j}`,{d:n.d,fill:n.fill})}),i}return i}isActive(){return this._snapshot!==null}getInitialPathFor(d,e){if(!this._snapshot)return null;const t=this._snapshot.mapping.get(`${d}:${e}`);if(!t)return null;const s=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),i=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return s===0&&i===0?t.d:this._translatePathD(t.d,s,i)}_translatePathD(d,e,t){return e===0&&t===0?d:ze(d).map(s=>{const i=s[0];return i==="Z"?"Z":i==="M"||i==="L"||i==="T"?`${i} ${s[1]+e} ${s[2]+t}`:i==="H"?`${i} ${s[1]+e}`:i==="V"?`${i} ${s[1]+t}`:i==="C"?`${i} ${s[1]+e} ${s[2]+t} ${s[3]+e} ${s[4]+t} ${s[5]+e} ${s[6]+t}`:i==="S"||i==="Q"?`${i} ${s[1]+e} ${s[2]+t} ${s[3]+e} ${s[4]+t}`:i==="A"?`${i} ${s[1]} ${s[2]} ${s[3]} ${s[4]} ${s[5]} ${s[6]+e} ${s[7]+t}`:s.join(" ")}).join(" ")}getInitialFillFor(d,e){if(!this._snapshot)return null;const t=this._snapshot.mapping.get(`${d}:${e}`);return t?t.fill:null}getSpeed(){const d=this.w.config.chart.animations;return d.chartTypeMorph&&d.chartTypeMorph.speed||d.speed||600}applyChromeFade(){var d;if(!this._snapshot||!O.isBrowser())return;const e=(d=this.w.globals.dom)==null?void 0:d.baseEl;if(!e)return;const t=this.getSpeed();[".apexcharts-xaxis",".apexcharts-yaxis",".apexcharts-grid",".apexcharts-gridlines-h
1130orizontal",".apexcharts-gridlines-vertical",".apexcharts-legend",".apexcharts-title-text",".apexcharts-subtitle-text"].forEach(s=>{e.querySelectorAll(s).forEach(i=>{i.style&&(i.style.opacity="0",i.style.transition=`opacity ${t}ms ease-out`,B.requestAnimationFrame(()=>{i.style.opacity="1"}),setTimeout(()=>{i.style.transition="",i.style.opacity=""},t+80))})}),setTimeout(()=>this.cleanup(),t+100)}cleanup(){this._snapshot=null}}});const Me="http://www.w3.org/1999/xhtml";class Vs{constructor(e,t,s){this.w=e,this.ctx=t,this.drilldown=s}render(e){if(!O.isBrowser())return;const t=this.w,s=t.dom.elWrap;if(!s)return;const i=s.querySelector(".apexcharts-breadcrumb");i&&i.parentNode&&i.parentNode.removeChild(i);const a=t.config.drilldown&&t.config.drilldown.breadcrumb;if(!a||a.show===!1||this.drilldown.depth===0)return;const o=B.createElementNS(Me,"nav");o.setAttribute("class","apexcharts-breadcrumb"),o.setAttribute("aria-label","Drilldown breadcrumb"),this._position(o,a);const r=a.separator!=null?a.separator:" / ";e.forEach((n,c)=>{if(c>0){const l=B.createElementNS(Me,"span");l.setAttribute("class","apexcharts-breadcrumb-separator"),l.setAttribute("aria-hidden","true"),l.textContent=r,o.appendChild(l)}const h=this._label(n,c);if(c===e.length-1){const l=B.createElementNS(Me,"span");l.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),l.setAttribute("aria-current","page"),l.textContent=h,o.appendChild(l)}else{const l=B.createElementNS(Me,"button");if(l.setAttribute("type","button"),l.setAttribute("class","apexcharts-breadcrumb-item"),c===0){const p=B.createElementNS(Me,"span");p.setAttribute("class","apexcharts-breadcrumb-arrow"),p.setAttribute("aria-hidden","true"),p.textContent="\u2190",l.appendChild(p)}const g=B.createElementNS(Me,"span");g.setAttribute("class","apexcharts-breadcrumb-label"),g.textContent=h,l.appendChild(g),l.addEventListener("click",()=>this.drilldown.drillToLevel(c)),o.appendChild(l)}}),s.appendChild(o)}_label(e,t){const s=this.w.config.drilldown.breadcrumb;let i;if(t===0)i=s.rootLabel!=null?s.rootLabel:"All";else{const a=(this.w.config.drilldown.series||[]).find(o=>o&&o.id===e);i=a&&a.name||String(e)}return typeof s.formatter=="function"?s.formatter(i,{index:t,depth:this.drilldown.depth}):i}_position(e,t){const s=t.offsetX||0,i=t.offsetY||0;e.style.position="absolute",e.style.top=i+"px",t.position==="top-right"?e.style.right=3-s+"px":e.style.left=s+"px"}}ce.registerFeatures({drilldown:class{constructor(d,e){this.w=d,this.ctx=e,this.stack=[],this.rootSnapshot=null,this._wired=!1,this.breadcrumb=new Vs(d,e,this),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this.init()}init(){const d=this.w;d.config.drilldown&&d.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(d=>d.id)]}get depth(){return this.stack.length}drillDown(d,e,t){const s=this._resolveChild(d);return s?this._drillInto(s,e,t):typeof this.w.config.drilldown.onDrillDown=="function"?this._drillDownAsync(d,e,t):Promise.resolve(this.ctx)}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(d){const e=this.stack.length;if(d<0||d>=e)return Promise.resolve(this.ctx);const t=this.path[this.path.length-1],s=d===0?this.rootSnapshot:this.stack[d].restore;this.stack=this.stack.slice(0,d);const i=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(s),"up",{from:t,to:i})}_resolveChild(d){const e=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(e)&&e.find(t=>t&&t.id===d)||null}_drillInto(d,e,t){if(this.stack.length>=32)return Promise.resolve(this.ctx);this.rootSnapshot||(this.rootSnapshot=this._snapshot());const s=this.path[this.path.length-1];return this.stack.push({id:d.id,name:d.name,restore:this._snapshot()}),this._apply(this._viewFromChild(d),"down",{from:s,to:d.id,point:e,seriesIndex:t&&t.seriesIndex,dataPointIndex:t&&t.dataPointIndex})}_drillDownAsync(d,e,t){const s=this.w.config.drilldown.onDrillDown;let i;try{i=s({point:e,seriesIndex:t&&t.seriesIndex,dataPointIndex:t&&t.dataPointIndex})}catch(a){return this._fire("drillDownError",{id:d,error:a}),Promise.resolve(this.ctx)}return Promise.resolve(i).then(a=>a&&a.data?this._drillInto(a,e,t):this.ctx,a=>(this._fire("drillDownError",{id:d,error:a}),this.ctx))}_snapshot(){const d=this.w.config,e=this._overrideFields(),t={series:M.clone(d.series)};return Array.isArray(d.labels)&&d.labels.length&&(t.labels=M.clone(d.labels)),t.chart={type:d.chart.type,stacked:d.chart.stacked},e.has("xaxis")&&(t.xaxis=M.clone(d.xaxis)),e.has("yaxis")&&(t.yaxis=M.clone(d.yaxis)),e.has("colors")&&(t.colors=d.colors?M.clone(d.colors):void 0),e.has("plotOptions")&&(t.plotOptions=M.clone(d.plotOptions)),e.has("fill")&&(t.fill=M.clone(d.fill)),e.has("legend")&&(t.legend=M.clone(d.legend)),t}_overrideFields(){const d=new Set,e=this.w.config.drilldown&&this.w.config.drilldown.series||[];for(const t of e)t&&(t.xaxis&&d.add("xaxis"),t.yaxis&&d.add("yaxis"),t.colors&&d.add("colors"),t.plotOptions&&d.add("plotOptions"),t.fill&&d.add("fill"),t.legend&&d.add("legend"));return d}_viewFromChild(d){const e={};Array.isArray(d.series)?e.series=d.series:e.series=[{name:d.name||"",data:d.data}];const t={};return d.chart&&d.chart.type&&(t.type=d.chart.type),d.chart&&d.chart.stacked!=null&&(t.stacked=d.chart.stacked),Object.keys(t).length&&(e.chart=t),d.xaxis&&(e.xaxis=d.xaxis),d.yaxis&&(e.yaxis=d.yaxis),d.colors&&(e.colors=d.colors),d.plotOptions&&(e.plotOptions=d.plotOptions),d.fill&&(e.fill=d.fill),d.legend&&(e.legend=d.legend),e}_viewFromSnapshot(d){const e={series:d.series,chart:d.chart};return d.labels&&d.labels.length&&(e.labels=d.labels),d.xaxis&&(e.xaxis=d.xaxis),d.yaxis&&(e.yaxis=d.yaxis),d.colors&&(e.colors=d.colors),d.plotOptions&&(e.plotOptions=d.plotOptions),d.fill&&(e.fill=d.fill),d.legend&&(e.legend=d.legend),e}_apply(d,e,t){const s=this.w;s.interact.selectedDataPoints=[],s.globals.collapsedSeries=[],s.globals.collapsedSeriesIndices=[],s.globals.ancillaryCollapsedSeries=[],s.globals.ancillaryCollapsedSeriesIndices=[],s.globals.allSeriesCollapsed=!1,s.globals.risingSeries=[];
1130const i=(!s.config.drilldown.animation||s.config.drilldown.animation.enabled!==!1)&&s.config.chart.animations.enabled!==!1;e==="down"&&this._fire("drillDownStart",t);const a=r=>this.ctx.updateOptions(d,!1,r,!1,!1),o=()=>(this._fire(e==="down"?"drillDownEnd":"drillUp",t),this.ctx);if(i&&this._zoomEnabled()){const r=this._triggerOrigin(t);if(r)return this._zoomDrill(r,e,()=>a(!1)).then(o)}return a(i).then(o)}_zoomEnabled(){const d=this.w.config.drilldown&&this.w.config.drilldown.animation;return!(!d||!d.zoomFromPoint)}_svgNode(){const d=this.w.dom&&this.w.dom.Paper;return d&&d.node?d.node:null}_markGroup(){const d=this._svgNode();return d&&typeof d.querySelector=="function"?d.querySelector(".apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap"):null}_triggerOrigin(d){if(!O.isBrowser())return null;const e=this._svgNode(),t=this._markGroup();if(!e||!t||typeof t.animate!="function"||typeof e.getBoundingClientRect!="function")return null;const s=e.getBoundingClientRect();let i=null;if(d&&d.seriesIndex!=null&&d.dataPointIndex!=null&&this.w.dom.baseEl&&(i=this.w.dom.baseEl.querySelector(`[index="${d.seriesIndex}"][j="${d.dataPointIndex}"]`)),i&&typeof i.getBoundingClientRect=="function"){const o=i.getBoundingClientRect();return{x:o.left+o.width/2-s.left,y:o.top+o.height/2-s.top}}const a=t.getBoundingClientRect();return{x:a.left+a.width/2-s.left,y:a.top+a.height/2-s.top}}_zoomDrill(d,e,t){return s=this,i=null,a=function*(){const o=this._zoomDuration(),r=e==="down",n=Math.round(.55*o),c=r?"scale(1.03)":"scale(0.97)",h=r?"scaleX(0.55) scaleY(0.85)":"scale(1.04)",l=b=>{b.style.transformBox="view-box",b.style.transformOrigin=`${d.x}px ${d.y}px`},g=this._markGroup();let p=null;if(g){l(g),p=g.animate([{transform:"scale(1)",opacity:1},{transform:c,opacity:0}],{duration:n,easing:"ease-in",fill:"forwards"});try{yield p.finished}catch{}}yield t();const u=this._markGroup();if(u){l(u),u.style.opacity="0",u.style.transform=h,p&&g===u&&p.cancel();const b=u.animate([{transform:h,opacity:0},{transform:"scale(1)",opacity:1}],{duration:o,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"});try{yield b.finished}catch{}(x=u).style.transform="",x.style.opacity="",x.style.transformOrigin="",x.style.transformBox="",b.cancel()}var x},new Promise((o,r)=>{var n=l=>{try{h(a.next(l))}catch(g){r(g)}},c=l=>{try{h(a.throw(l))}catch(g){r(g)}},h=l=>l.done?o(l.value):Promise.resolve(l.value).then(n,c);h((a=a.apply(s,i)).next())});var s,i,a}_zoomDuration(){const d=this.w.config.drilldown&&this.w.config.drilldown.animation,e=d&&typeof d.speed=="number"?d.speed:260;return Math.max(80,e)}_fire(d,e){const t=this.w.config.chart.events&&this.w.config.chart.events[d];typeof t=="function"&&t(e,this.ctx,this.w),this.ctx.events.fireEvent(d,[e,this.ctx,this.w])}_onPointSelect(d,e,t){if(!t)return;const s=this._pointAt(t.seriesIndex,t.dataPointIndex);return s&&typeof s=="object"&&s.drilldown!=null?this.drillDown(s.drilldown,s,t):typeof this.w.config.drilldown.onDrillDown=="function"?this._drillDownAsync(null,s,t):void 0}_pointAt(d,e){const t=this.w.config.series;if(!Array.isArray(t)||d==null||e==null)return null;const s=t[d];return s&&Array.isArray(s.data)&&s.data[e]!=null?s.data[e]:null}_afterRender(){this.w.config.drilldown&&this.w.config.drilldown.enabled&&(this._markDrillableTargets(),this.breadcrumb.render(this.path))}_markDrillableTargets(){if(!O.isBrowser())return;const d=this.w,e=d.dom.baseEl,t=d.config.series;e&&Array.isArray(t)&&t.forEach((s,i)=>{const a=s&&Array.isArray(s.data)?s.data:null;a&&a.forEach((o,r)=>{!o||typeof o!="object"||o.drilldown==null||e.querySelectorAll(`[index="${i}"][j="${r}"]`).forEach(n=>n.classList.add("apexcharts-drilldown-target"))})})}}});class Us{constructor(e){this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(e){const{x:t,y:s,y1:i,y2:a,i:o,j:r,realIndex:n,columnGroupIndex:c,series:h,barHeight:l,barWidth:g,barXPosition:p,barYPosition:u,visibleSeries:x}=e,b=this.w,f=new F(this.barCtx.w),m=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth;let w,y;b.axisFlags.isXNumeric&&!b.globals.isBarHorizontal?(w=t+g*(x+1),y=s+l*(x+1)-m):(w=t+g*x,y=s+l*x);let v=null,C=null,S=t,L=s,A={};const D=b.config.dataLabels,k=this.barCtx.barOptions.dataLabels,P=this.barCtx.barOptions.dataLabels.total;
1130u!==void 0&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(y=u,L=u),p!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(w=p,S=p);const T=D.offsetX,I=D.offsetY;let E={width:0,height:0};if(b.config.dataLabels.enabled){const z=b.seriesData.series[o][r];E=f.getTextRects(b.config.dataLabels.formatter?b.config.dataLabels.formatter(z,G($({},b),{seriesIndex:o,dataPointIndex:r,w:b})):b.formatters.yLabelFormatters[0](z),parseFloat(D.style.fontSize).toString())}const X={x:t,y:s,i:o,j:r,realIndex:n,columnGroupIndex:c,bcx:w,bcy:y,barHeight:l,barWidth:g,textRects:E,strokeWidth:m,dataLabelsX:S,dataLabelsY:L,dataLabelsConfig:D,barDataLabelsConfig:k,barTotalDataLabelsConfig:P,offX:T,offY:I};return A=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(X):this.calculateColumnsDataLabelsPosition(X),v=this.drawCalculatedDataLabels({x:A.dataLabelsX,y:A.dataLabelsY,val:this.barCtx.isRangeBar?[i,a]:b.config.chart.stackType==="100%"?h[n][r]:b.seriesData.series[n][r],i:n,j:r,barWidth:g,barHeight:l,textRects:E,dataLabelsConfig:D}),b.config.chart.stacked&&P.enabled&&(C=this.drawTotalDataLabels({x:A.totalDataLabelsX,y:A.totalDataLabelsY,barWidth:g,barHeight:l,realIndex:n,textAnchor:A.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:n,j:r}),dataLabelsConfig:D,barTotalDataLabelsConfig:P})),{dataLabelsPos:A,dataLabels:v,totalDataLabels:C}}getStackedTotalDataLabel({realIndex:e,j:t}){const s=this.w;let i=this.barCtx.stackedSeriesTotals[t];return this.totalFormatter&&(i=this.totalFormatter(i,G($({},s),{seriesIndex:e,dataPointIndex:t,w:s}))),i}calculateColumnsDataLabelsPosition(e){const t=this.w;let s,i,{i:a,j:o,realIndex:r,y:n,bcx:c,barWidth:h,barHeight:l,textRects:g,dataLabelsX:p,dataLabelsY:u,dataLabelsConfig:x,barDataLabelsConfig:b,barTotalDataLabelsConfig:f,strokeWidth:m,offX:w,offY:y}=e;const v=c;l=Math.abs(l);const C=t.config.plotOptions.bar.dataLabels.orientation==="vertical",{zeroEncounters:S}=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:o});c-=m/2;const L=t.layout.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?p+=h/2:(p=t.axisFlags.isXNumeric?c-h/2+w:c-L+h/2+w,!t.config.chart.stacked&&S>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(p-=h*S)),C&&(p=p+g.height/2-m/2-2);const A=t.seriesData.series[a][o]<0;let D=n;switch(this.barCtx.isReversed&&(D=n+(A?l:-l)),b.position){case"center":u=C?A?D-l/2+y:D+l/2-y:A?D-l/2+g.height/2+y:D+l/2+g.height/2-y;break;case"bottom":u=C?A?D-l+y:D+l-y:A?D-l+g.height+m+y:D+l-g.height/2+m-y;break;case"top":u=C?A?D+y:D-y:A?D-g.height/2-y:D+g.height+y}let k=D;if(t.labelData.seriesGroups.forEach(P=>{var T;(T=this.barCtx[P.join(",")])==null||T.prevY.forEach(I=>{k=A?Math.max(I[o],k):Math.min(I[o],k)})}),this.barCtx.lastActiveBarSerieIndex===r&&f.enabled){const T=new F(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),x.fontSize);s=A?k-T.height/2-y-f.offsetY+18:k+T.height+y+f.offsetY-18;const I=L;i=v+(t.axisFlags.isXNumeric?-h*t.globals.barGroups.length/2:t.globals.barGroups.length*h/2-(t.globals.barGroups.length-1)*h-I)+f.offsetX}return t.config.chart.stacked||(u<0?u=0+m:u+g.height/3>t.layout.gridHeight&&(u=t.layout.gridHeight-m)),{bcx:c,bcy:n,dataLabelsX:p,dataLabelsY:u,totalDataLabelsX:i,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(e){var t;const s=this.w;let{x:i,i:a,j:o,realIndex:r,bcy:n,barHeight:c,barWidth:h,textRects:l,dataLabelsX:g,strokeWidth:p,dataLabelsConfig:u,barDataLabelsConfig:x,barTotalDataLabelsConfig:b,offX:f,offY:m}=e;const w=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:y}=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:o});let v,C,S;h=Math.abs(h),this.barCtx.isPyramid?v=n+c/2+m-((t=l.centerOffset)!=null?t:0):v=n-(this.barCtx.isRangeBar?0:w)+c/2+l.height/2+m-3,!s.config.chart.stacked&&y>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v-=c*y);let L="start";const A=s.seriesData.series[a][o]<0;let D=i;if(this.barCtx.isReversed&&(D=i+(A?-h:h),L=A?"start":"end"),this.barCtx.isPyramid)g=s.layout.gridWidth/2+f;else switch(x.position){case"center":g=A?D+h/2-f:Math.max(l.width/2,D-h/2)+f;break;case"bottom":g=A?D+h-p-f:D-h+p+f;break;case"top":g=A?D-p-f:D-p+f}let k=D;if(s.labelData.seriesGroups.forEach(P=>{var T;
1130(T=this.barCtx[P.join(",")])==null||T.prevX.forEach(I=>{k=A?Math.min(I[o],k):Math.max(I[o],k)})}),this.barCtx.lastActiveBarSerieIndex===r&&b.enabled){const P=new F(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),u.fontSize);A?(C=k-p-f-b.offsetX,L="end"):C=k+f+b.offsetX+(this.barCtx.isReversed?-(h+p):p),S=v-l.height/2+P.height/2+b.offsetY+p,s.globals.barGroups.length>1&&(S-=s.globals.barGroups.length/2*(c/2))}return s.config.chart.stacked||(u.textAnchor==="start"?g-l.width<0?g=A?l.width+p:p:g+l.width>s.layout.gridWidth&&(g=A?s.layout.gridWidth-p:s.layout.gridWidth-l.width-p):u.textAnchor==="middle"?g-l.width/2<0?g=l.width/2+p:g+l.width/2>s.layout.gridWidth&&(g=s.layout.gridWidth-l.width/2-p):u.textAnchor==="end"&&(g<1?g=l.width+p:g+1>s.layout.gridWidth&&(g=s.layout.gridWidth-l.width-p))),{bcx:i,bcy:n,dataLabelsX:g,dataLabelsY:v,totalDataLabelsX:C,totalDataLabelsY:S,totalDataLabelsAnchor:L}}drawCalculatedDataLabels({x:e,y:t,val:s,i,j:a,textRects:o,barHeight:r,barWidth:n,dataLabelsConfig:c}){const h=this.w;let l="rotate(0)";h.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(l=`rotate(-90, ${e}, ${t})`);const g=new Ae(this.barCtx.w,this.barCtx.ctx),p=new F(this.barCtx.w),u=c.formatter;let x=null;const b=h.globals.collapsedSeriesIndices.indexOf(i)>-1;if(c.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:l});let f="";s!==void 0&&(f=u(s,G($({},h),{seriesIndex:i,dataPointIndex:a,w:h}))),!s&&h.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f="");const m=h.seriesData.series[i][a]<0,w=h.config.plotOptions.bar.dataLabels.position;h.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(w==="top"&&(c.textAnchor=m?"end":"start"),w==="center"&&(c.textAnchor="middle"),w==="bottom"&&(c.textAnchor=m?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&n<p.getTextRects(f,parseFloat(c.style.fontSize).toString()).width&&(f=""),h.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?o.width/1.6>Math.abs(n)&&(f=""):o.height/1.6>Math.abs(r)&&(f=""));const y=$({},c);this.barCtx.isHorizontal&&s<0&&(c.textAnchor==="start"?y.textAnchor="end":c.textAnchor==="end"&&(y.textAnchor="start")),g.plotDataLabelsText({x:e,y:t,text:f,i,j:a,parent:x,dataLabelsConfig:y,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}drawTotalDataLabels({x:e,y:t,val:s,realIndex:i,textAnchor:a,barTotalDataLabelsConfig:o}){const r=new F(this.barCtx.w);let n;return o.enabled&&e!==void 0&&t!==void 0&&this.barCtx.lastActiveBarSerieIndex===i&&(n=r.drawText({x:e,y:t,foreColor:o.style.color,text:s,textAnchor:a,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight})),n}}let qs=class{constructor(d){this.w=d.w,this.barCtx=d}initVariables(d){const e=this.w;this.barCtx.series=d,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let t=0;t<d.length;t++)if(d[t].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=d[t].length),e.axisFlags.isXNumeric)for(let s=0;s<d[t].length;s++)e.seriesData.seriesX[t][s]>e.globals.minX&&e.seriesData.seriesX[t][s]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),M.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(s=>"none"))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],e.globals.comboCharts||this.checkZeroSeries({series:d})}initialPositions(d){const e=this.w;let t,s,i,a,o,r,n,c,h=e.globals.dataPoints;this.barCtx.isRangeBar&&(h=e.labelData.labels.length);let l=this.barCtx.seriesLen;if(e.config.plotOptions.bar.rangeBarGroupRows&&(l=1),this.barCtx.isHorizontal)i=e.layout.gridHeight/h,o=i/l,e.axisFlags.isXNumeric&&(i=e.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),c=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(c=e.layout.gridWidth/2),s=(i-o*this.barCtx.seriesLen)/2;else{if(a=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(a=e.layout.gridWidth/e.globals.dataPoints),r=a/l*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const g=this.barCtx.xRatio;e.globals.minXDiff&&e.globals.minXDiff!==.5&&e.globals.minXDiff/g>0&&(a=e.globals.minXDiff/g),r=a/l*parseInt(this.barCtx.barOptions.columnWidth,10)/100,r<1&&(r=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric?t=this.barCtx.getBarXForNumericXAxis({x:t,j:0,realIndex:d,barWidth:r}).x:t=e.globals.padHorizontal+M.noExponents(a-r*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=r,{x:t,y:s,yDivision:i,xDivision:a,barHeight:o,barWidth:r,zeroH:n,zeroW:c}}initializeStackedPrevVars(d){d.w.labelData.seriesGroups.forEach(e
1130=>{d[e]||(d[e]={}),d[e].prevY=[],d[e].prevX=[],d[e].prevYF=[],d[e].prevXF=[],d[e].prevYVal=[],d[e].prevXVal=[]})}initializeStackedXYVars(d){d.w.labelData.seriesGroups.forEach(e=>{d[e]||(d[e]={}),d[e].xArrj=[],d[e].xArrjF=[],d[e].xArrjVal=[],d[e].yArrj=[],d[e].yArrjF=[],d[e].yArrjVal=[]})}getPathFillColor(d,e,t,s){var i,a,o,r;const n=this.w,c=new le(this.barCtx.w);let h=null;const l=this.barCtx.barOptions.distributed?t:e;let g=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(p=>{d[e][t]>=p.from&&d[e][t]<=p.to&&(h=p.color,g=!0)}),{color:c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:s,dataPointIndex:t,color:h,value:d[e][t],fillConfig:(i=n.config.series[e].data[t])==null?void 0:i.fill,fillType:(o=(a=n.config.series[e].data[t])==null?void 0:a.fill)!=null&&o.type?(r=n.config.series[e].data[t])==null?void 0:r.fill.type:Array.isArray(n.config.fill.type)?n.config.fill.type[s]:n.config.fill.type}),useRangeColor:g}}getStrokeWidth(d,e,t){let s=0;const i=this.w;return this.barCtx.series[d][e]===void 0||this.barCtx.series[d][e]===null||i.config.chart.type==="bar"&&!this.barCtx.series[d][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(s=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[t]:this.barCtx.strokeWidth)),s}createBorderRadiusArr(d){var e;const t=this.w,s=!this.w.config.chart.stacked||t.config.plotOptions.bar.borderRadius<=0,i=d.length,a=0|((e=d[0])==null?void 0:e.length),o=Array.from({length:i},()=>Array(a).fill(s?"top":"none"));if(s)return o;const r=this.w.config.chart.type;for(let n=0;n<a;n++){const c=[],h=[];let l=0;for(let g=0;g<i;g++){const p=d[g][n];p>0?(c.push(g),l++):p<0&&(h.push(g),l++)}if(c.length>0&&h.length===0)if(c.length===1)o[c[0]][n]=r==="bar"&&a===1?"top":"both";else{const g=c[0],p=c[c.length-1];for(const u of c)o[u][n]=u===g?r==="bar"&&a===1?"top":"bottom":u===p?"top":"none"}else if(h.length>0&&c.length===0)if(h.length===1)o[h[0]][n]="both";else{const g=Math.max(...h),p=Math.min(...h);for(const u of h)o[u][n]=u===g?"bottom":u===p?"top":"none"}else if(c.length>0&&h.length>0){const g=c[c.length-1];for(const u of c)o[u][n]=u===g?"top":"none";const p=Math.max(...h);for(const u of h)o[u][n]=u===p?"bottom":"none"}else l===1&&(o[c[0]||h[0]][n]="both")}return o}barBackground({j:d,i:e,x1:t,x2:s,y1:i,y2:a,elSeries:o}){const r=this.w,n=new F(this.barCtx.w),c=new K(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===e){d>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(d%=this.barCtx.barOptions.colors.backgroundBarColors.length);const h=this.barCtx.barOptions.colors.backgroundBarColors[d],l=n.drawRect(t!==void 0?t:0,i!==void 0?i:0,s!==void 0?s:r.layout.gridWidth,a!==void 0?a:r.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(l),l.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:d,barXPosition:e,y1:t,y2:s,strokeWidth:i,isReversed:a,series:o,seriesGroup:r,realIndex:n,i:c,j:h,w:l}){var g,p,u;const x=new F(this.barCtx.w);(i=Array.isArray(i)?i[n]:i)||(i=0);let b=d,f=e;(g=l.config.series[n].data[h])!=null&&g.columnWidthOffset&&(f=e-l.config.series[n].data[h].columnWidthOffset/2,b=d+l.config.series[n].data[h].columnWidthOffset);const m=i/2,w=f+m,y=f+b-m,v=(o[c][h]>=0?1:-1)*(a?-1:1);t+=.001-m*v,s+=.001+m*v;const C=x.line(y,t),S=l.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[n][h]==="both"?" Z":" z";let L,A=x.move(w,t)+x.line(w,s)+x.line(y,s)+C+S;if(this.arrBorderRadius[n][h]!=="none"&&(A=x.roundPathCorners(A,l.config.plotOptions.bar.borderRadius)),L=((u=(p=this.barCtx.ctx)==null?void 0:p.morphTypeChange)==null?void 0:u.getInitialPathFor(n,h))||(l.globals.previousPaths.length>0?this.barCtx.getPreviousPath(n,h,A):x.move(w,t)+x.line(w,t)+C+C+C+C+C+x.line(w,t)+S),l.config.chart.stacked){let k=this.barCtx;k=this.barCtx[r],k.yArrj.push(s-m*v),k.yArrjF.push(Math.abs(t-s+i*v)),k.yArrjVal.push(this.barCtx.series[c][h])}return{pathTo:A,pathFrom:L}}getFunnelTrapezoidPaths({barYPosition:d,barHeight:e,series:t,i:s,j:i,realIndex:a,strokeWidth:o,w:r}){var n,c;const h=new F(this.barCtx.w),l=r.layout.gridWidth/2,g=k=>
1130Math.abs(k/this.barCtx.invertedYRatio)/2,p=g(t[s][i]),u=i===t[s].length-1,x=r.config.plotOptions.funnel.lastShape==="taper"?"taper":"flat";let b;b=u?x==="taper"?0:p:g(t[s][i+1]);const f=o/2,m=d+f,w=d+e-f,y=l-p,v=l+p,C=l-b,S=l+b,L=h.move(y,m)+h.line(v,m)+h.line(S,w)+h.line(C,w)+" Z";let A;return A=((c=(n=this.barCtx.ctx)==null?void 0:n.morphTypeChange)==null?void 0:c.getInitialPathFor(a,i))||(r.globals.previousPaths.length>0?this.barCtx.getPreviousPath(a,i,L):h.move(l,m)+h.line(l,m)+h.line(l,w)+h.line(l,w)+" Z"),{pathTo:L,pathFrom:A,x:v,x1:y,barXPosition:l}}computePyramidLayout(d){const e=this.w,t=e.layout.gridHeight,s=e.layout.gridWidth,i=d.map(c=>Math.abs(Number(c)||0)),a=i.reduce((c,h)=>c+h,0);if(a===0||t<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=s/2;let r=0;const n=[];for(let c=0;c<i.length;c++){const h=r/a;r+=i[c];const l=r/a,g=h*t,p=l*t;n.push({y:g,height:p-g,topHalf:h*o,bottomHalf:l*o})}return n}getPyramidPaths({barYPosition:d,barHeight:e,topHalf:t,bottomHalf:s,realIndex:i,j:a,strokeWidth:o,w:r}){var n,c;const h=new F(this.barCtx.w),l=r.layout.gridWidth/2,g=o/2,p=d+g,u=d+e-g,x=l-t,b=l+t,f=l-s,m=l+s,w=h.move(x,p)+h.line(b,p)+h.line(m,u)+h.line(f,u)+" Z";let y;return y=((c=(n=this.barCtx.ctx)==null?void 0:n.morphTypeChange)==null?void 0:c.getInitialPathFor(i,a))||(r.globals.previousPaths.length>0?this.barCtx.getPreviousPath(i,a,w):h.move(l,p)+h.line(l,p)+h.line(l,u)+h.line(l,u)+" Z"),{pathTo:w,pathFrom:y,x:b,x1:x,barXPosition:l}}getBarpaths({barYPosition:d,barHeight:e,x1:t,x2:s,strokeWidth:i,isReversed:a,series:o,seriesGroup:r,realIndex:n,i:c,j:h,w:l}){var g,p,u;const x=new F(this.barCtx.w);(i=Array.isArray(i)?i[n]:i)||(i=0);let b=d,f=e;(g=l.config.series[n].data[h])!=null&&g.barHeightOffset&&(b=d-l.config.series[n].data[h].barHeightOffset/2,f=e+l.config.series[n].data[h].barHeightOffset);const m=i/2,w=b+m,y=b+f-m,v=(o[c][h]>=0?1:-1)*(a?-1:1);t+=.001+m*v,s+=.001-m*v;const C=this.barCtx.isFunnel,S=C?(t+s)/2:t,L=x.line(t,y),A=l.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[n][h]==="both"?" Z":" z";let D,k=x.move(t,w)+x.line(s,w)+x.line(s,y)+L+A;this.arrBorderRadius[n][h]!=="none"&&(k=x.roundPathCorners(k,l.config.plotOptions.bar.borderRadius));const P=(u=(p=this.barCtx.ctx)==null?void 0:p.morphTypeChange)==null?void 0:u.getInitialPathFor(n,h);if(P)D=P;else if(l.globals.previousPaths.length>0)D=this.barCtx.getPreviousPath(n,h,k);else{const T=C?x.line(S,y):L;D=x.move(S,w)+x.line(S,w)+T+T+T+T+T+x.line(S,w)+A}if(l.config.chart.stacked){let T=this.barCtx;T=this.barCtx[r],T.xArrj.push(s+m*v),T.xArrjF.push(Math.abs(t-s-i*v)),T.xArrjVal.push(this.barCtx.series[c][h])}return{pathTo:k,pathFrom:D}}checkZeroSeries({series:d}){const e=this.w;for(let t=0;t<d.length;t++){let s=0;for(let i=0;i<d[e.globals.maxValsInArrayIndex].length;i++)s+=d[t][i];s===0&&this.barCtx.zeroSerieses.push(t)}}getXForValue(d,e,t=!0){let s=t?e:null;return d!=null&&(s=e+d/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?d/this.barCtx.invertedYRatio:0)),s}getYForValue(d,e,t,s=!0){let i=s?e:null;return d!=null&&(i=e-d/this.barCtx.yRatio[t]+2*(this.barCtx.isReversed?d/this.barCtx.yRatio[t]:0)),i}getGoalValues(d,e,t,s,i,a){const o=this.w,r=[],n=(c,h)=>{r.push({[d]:d==="x"?this.getXForValue(c,e,!1):this.getYForValue(c,t,a,!1),attrs:h})};if(o.seriesData.seriesGoals[s]&&o.seriesData.seriesGoals[s][i]&&Array.isArray(o.seriesData.seriesGoals[s][i])&&o.seriesData.seriesGoals[s][i].forEach(c=>{n(c.value,c)}),this.barCtx.barOptions.isDumbbell&&o.rangeData.seriesRange.length){const c=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,h={strokeHeight:d==="x"?0:o.globals.markers.size[s],strokeWidth:d==="x"?o.globals.markers.size[s]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(c[s])?c[s][0]:c[s]};n(o.rangeData.seriesRangeStart[s][i],h),n(o.rangeData.seriesRangeEnd[s][i],G($({},h),{strokeColor:Array.isArray(c[s])?c[s][1]:c[s]}))}return r}drawGoalLine({barXPosition:d,barYPosition:e,goalX:t,goalY:s,barWidth:i,barHeight:a}){const o=new F(this.barCtx.w),r=o.group({className:"apexcharts-bar-goals-groups"});r.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:r.node}),r.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let n=null;return this.barCtx.isHorizontal?Array.isArray(t)&&t.forEach(c=>{if(c.x>=-1&&c.x<=o.w.layout.gridWidth+1){const h=c.attrs.strokeHeight!==void 0?c.attrs.strokeHeight:a/2,l=e+h+a/2;n=o.drawLine(c.x,l-2*h,c.x,l,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeWidth?c.attrs.strokeWidth:2,c.attrs.strokeLineCap),r.add(n)}}
1130):Array.isArray(s)&&s.forEach(c=>{if(c.y>=-1&&c.y<=o.w.layout.gridHeight+1){const h=c.attrs.strokeWidth!==void 0?c.attrs.strokeWidth:i/2,l=d+h+i/2;n=o.drawLine(l-2*h,c.y,l,c.y,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeHeight?c.attrs.strokeHeight:2,c.attrs.strokeLineCap),r.add(n)}}),r}drawBarShadow({prevPaths:d,currPaths:e,color:t,realIndex:s,j:i}){const a=this.w,{x:o,x1:r,barYPosition:n}=d,{x:c,x1:h,barYPosition:l}=e,g=n+e.barHeight,p=new F(this.barCtx.w),u=new M,x=p.move(r,g)+p.line(o,g)+p.line(c,l)+p.line(h,l)+p.line(r,g)+(a.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[s][i]==="both"?" Z":" z");return p.drawPath({d:x,fill:u.shadeColor(.5,M.rgb2hex(t)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:d,j:e}){var t;const s=this.w;let i=0,a=0;return(s.config.plotOptions.bar.horizontal?s.seriesData.series.map((o,r)=>r):((t=s.globals.columnSeries)==null?void 0:t.i.map(o=>o))||[]).forEach(o=>{const r=s.globals.seriesPercent[o][e];r&&i++,o<d&&r===0&&a++}),{nonZeroColumns:i,zeroEncounters:a}}getGroupIndex(d){const e=this.w,t=e.labelData.seriesGroups.findIndex(a=>a.indexOf(e.seriesData.seriesNames[d])>-1),s=this.barCtx.columnGroupIndices;let i=s.indexOf(t);return i<0&&(s.push(t),i=s.length-1),{groupIndex:t,columnGroupIndex:i}}};class de{constructor(e,t,s){this.ctx=t,this.w=e,this.barOptions=e.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=e.config.stroke.width,this.isNullValue=!1,this.isRangeBar=e.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.rangeData.seriesRange.length&&e.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 K(this.w);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];const a=i.getBarSeriesIndices(),o=new J(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 qs(this)}draw(e,t){var s,i;const a=this.w,o=new F(this.w),r=new J(this.w);e=r.getLogSeries(e),this.series=e,this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);const n=o.group({class:"apexcharts-bar-series apexcharts-plot-series"});a.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let c=0,h=0;c<e.length;c++,h++){let l,g;const p=[],u=[],x=a.globals.comboCharts?t[c]:c,{columnGroupIndex:b}=this.barHelpers.getGroupIndex(x),f=o.group({class:"apexcharts-series",rel:c+1,seriesName:M.escapeString(a.seriesData.seriesNames[x]),"data:realIndex":x});K.addCollapsedClassToSeries(this.w,f,x),e[c].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[x],this.translationsIndex=x);const m=this.translationsIndex;this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(e[c]));const w=this.barHelpers.initialPositions(x),{y,yDivision:v,zeroW:C,x:S,xDivision:L,zeroH:A}=w;let D=w.barHeight,k=w.barWidth;g=y,l=S,this.isHorizontal||u.push(l+(k??0)/2);const P=o.group({class:"apexcharts-datalabels","data:realIndex":x});a.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");const T=o.group({class:"apexcharts-bar-goals-markers"}),I=o.group({class:"apexcharts-bar-shadows"});a.globals.delayedElements.push({el:I.node}),I.node.classList.add("apexcharts-element-hidden");for(let E=0;E<e[c].length;E++){const X=this.barHelpers.getStrokeWidth(c,E,x);let z=null;const H={indexes:{i:c,j:E,realIndex:x,translationsIndex:m,bc:h},x:l,y:g,strokeWidth:X,elSeries:f};this.isHorizontal?(z=this.drawBarPaths(G($({},H),{barHeight:D,zeroW:C,yDivision:v})),k=this.series[c][E]/this.invertedYRatio):(z=this.drawColumnPaths(G($({},H),{xDivision:L,barWidth:k,zeroH:A})),D=this.series[c][E]/this.yRatio[m]);const Y=this.barHelpers.getPathFillColor(e,c,E,x);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&((s=a.config.plotOptions.funnel)==null?void 0:s.shape)!=="trapezoid"&&this.pathArr.length&&E>0){const W=this.barHelpers.drawBarShadow({color:typeof Y.color=="string"&&((i=Y.color)==null?void 0:i.indexOf("url"))===-1?Y.color:M.hexToRgba(a.globals.colors[c]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:z,realIndex:x,j:E});I.add(W),a.config.chart.dropShadow.enabled&&new te(this.w).dropShadow(W,a.config.chart.dropShadow,x)}this.pathArr.push(z);const N=this.barHelpers.drawGoalLine({barXPosition:z.barXPosition,barYPosition:z.barYPosition,goalX:z.goalX,goalY:z.goalY,barHeight:D,barWidth:k});N&&T.add(N),g=z.y,l=z.x,E>0&&u.push(l+(k??0)/2),p.push(g),this.renderSeries(G($({realIndex:x,pathFill:Y.color},Y.useRangeColor?{lineFill:Y.color}:{}),{j:E,i:c,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:X,elSeries:f,x:l,y:g,series:e,barHeight:Math.abs(z.barHeight?z.barHeight:D),barWidth:Math.abs(z.barWidth?z.barWidth:k),elDataLabelsWrap:P,elGoalsMarkers:T,elBarShadows:I,visibleSeries:this.visibleI,type:"bar"}))}a.globals.seriesXvalues[x]=u,a.globals.seriesYvalues[x]=p,n.add(f)}return n}renderSeries({realIndex:e,pathFill:t,lineFill:s,j:i,i:a,columnGroupIndex:o,pathFrom:r,pathTo:n,strokeWidth:c,elSeries:h,x:l,y:g,y1:p,y2:u,series:x,barHeight:b,barWidth:f,barXPosition:m,barYPosition:w,elDataLabelsWrap:y,elGoalsMarkers:v,elBarShadows:C,visibleSeries:S,type:L,classes:A}){var D;const k=this.w,P=new F(this.w,this.ctx);let T=!1;if(h._bindingsDelegated||(h._bindingsDelegated=!0,P.setupEventDelegation(h,`.apexcharts-${L}-area`)),!s){let H=function(N){const W=k.config.stroke.colors;let R;return Array.isArray(W)&&W.length>0&&(R=W[N],R||(R=""),typeof R=="function")?R({value:k.seriesData.series[N][i],dataPointIndex:i,w:k}):R};const Y=typeof k.globals.stroke.colors[e]=="function"?H(e):k.globals.stroke.colors[e];s=this.barOptions.distributed?k.globals.stroke.colors[i]:Y}const I=new Us(this).handleBarDataLabels({x:l,y:g,y1:p,y2:u,i:a,j:i,series:x,realIndex:e,columnGroupIndex:o,barHeight:b,barWidth:f,barXPosition:m,barYPosition:w,visibleSeries:S});k.globals.isBarHorizontal||(I.dataLabelsPos.dataLabelsX+Math.max(f,k.globals.barPadForNumericAxis)<0||I.dataLabelsPos.dataLabelsX-Math.max(f,k.globals.barPadForNumericAxis)>k.layout.gridWidth)&&(T=!0),k.config.series[a].data[i]&&k.config.series[a].data[i].strokeColor&&(s=k.config.series[a].data[i].strokeColor),this.isNullValue&&(t="none");const E=k.config.chart.animations,X=E.animateGradually;let z=0;if(X&&X.enabled!==!1){const H=k.globals.dataPoints||1,Y=X.delay||0,N=Math.min(Y,.5*E.speed/Math.max(1,H));let W=et({style:"sequential",index:i,baseDelay:N}
1130);k.config.chart.stacked&&(W+=a*N*.5),z=W/(Y||1)}if(!T){const H=((D=this.ctx.morphTypeChange)==null?void 0:D.isActive())===!0?this.ctx.morphTypeChange.getSpeed():k.config.chart.animations.dynamicAnimation.speed,Y=P.renderPaths({i:a,j:i,realIndex:e,pathFrom:r,pathTo:n,stroke:s,strokeWidth:c,strokeLineCap:k.config.stroke.lineCap,fill:t,animationDelay:z,initialSpeed:k.config.chart.animations.speed,dataChangeSpeed:H,className:`apexcharts-${L}-area ${A}`,chartType:L,bindEventsOnPaths:!1});Y.attr("clip-path",`url(#gridRectBarMask${k.globals.cuid})`);const N=k.config.forecastDataPoints;N.count>0&&i>=k.globals.dataPoints-N.count&&(Y.node.setAttribute("stroke-dasharray",N.dashArray),Y.node.setAttribute("stroke-width",N.strokeWidth),Y.node.setAttribute("fill-opacity",N.fillOpacity)),p!==void 0&&u!==void 0&&(Y.attr("data-range-y1",p),Y.attr("data-range-y2",u)),new te(this.w).setSelectionFilter(Y,e,i),h.add(Y),Y.attr({cy:I.dataLabelsPos.bcy,cx:I.dataLabelsPos.bcx,j:i,val:k.seriesData.series[a][i],barHeight:b,barWidth:f}),I.dataLabels!==null&&y.add(I.dataLabels),I.totalDataLabels&&y.add(I.totalDataLabels),h.add(y),v&&h.add(v),C&&h.add(C)}return h}drawBarPaths({indexes:e,barHeight:t,strokeWidth:s,zeroW:i,x:a,y:o,yDivision:r,elSeries:n}){const c=this.w,h=e.i,l=e.j;let g;if(c.axisFlags.isXNumeric)g=(o=(c.seriesData.seriesX[h][l]-c.globals.minX)/this.invertedXRatio-t)+t*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:f,zeroEncounters:m}=this.barHelpers.getZeroValueEncounters({i:h,j:l});f>0&&(t=this.seriesLen*t/f),g=o+t*this.visibleI,g-=t*m}else g=o+t*this.visibleI;const p=this.isFunnel&&c.config.plotOptions.funnel.shape==="trapezoid",u=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[l]:null,x=!!u;if(u)g=u.y,t=u.height;else if(this.isFunnel&&!p){const f=i??0;i=f-(this.barHelpers.getXForValue(this.series[h][l],f)-f)/2}let b;return a=this.barHelpers.getXForValue(this.series[h][l],i??0),b=u?this.barHelpers.getPyramidPaths({barYPosition:g,barHeight:t,topHalf:u.topHalf,bottomHalf:u.bottomHalf,realIndex:e.realIndex,j:l,strokeWidth:s,w:c}):p?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:g,barHeight:t,series:this.series,i:h,j:l,realIndex:e.realIndex,strokeWidth:s,w:c}):this.barHelpers.getBarpaths({barYPosition:g,barHeight:t,x1:i,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,i:h,j:l,w:c}),(p||x)&&(i=b.x1,a=b.x),c.axisFlags.isXNumeric||x||(o+=r),x&&(o=g),this.barHelpers.barBackground({j:l,i:h,y1:g-t*this.visibleI,y2:t*this.seriesLen,elSeries:n}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x1:i,x:a,y:o,goalX:this.barHelpers.getGoalValues("x",i,null,h,l,0),barYPosition:g,barHeight:t}}drawColumnPaths({indexes:e,x:t,y:s,xDivision:i,barWidth:a,zeroH:o,strokeWidth:r,elSeries:n}){const c=this.w,h=e.realIndex,l=e.translationsIndex,g=e.i,p=e.j,u=e.bc;let x;if(c.axisFlags.isXNumeric){const f=this.getBarXForNumericXAxis({x:t,j:p,realIndex:h,barWidth:a});t=f.x,x=f.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:f,zeroEncounters:m}=this.barHelpers.getZeroValueEncounters({i:g,j:p});f>0&&(a=this.seriesLen*a/f),x=t+a*this.visibleI,x-=a*m}else x=t+a*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,l);const b=this.barHelpers.getColumnPaths({barXPosition:x,barWidth:a,y1:o,y2:s,strokeWidth:r,isReversed:this.isReversed,series:this.series,realIndex:h,i:g,j:p,w:c});return c.axisFlags.isXNumeric||(t+=i),this.barHelpers.barBackground({bc:u,j:p,i:g,x1:x-r/2-a*this.visibleI,x2:a*this.seriesLen+r/2,elSeries:n}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x:t,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,l),barXPosition:x,barWidth:a}}getBarXForNumericXAxis({x:e,barWidth:t,realIndex:s,j:i}){const a=this.w;let o=s;return a.seriesData.seriesX[s].length||(o=a.globals.maxValsInArrayIndex),M.isNumber(a.seriesData.seriesX[o][i])&&(e=(a.seriesData.seriesX[o][i]-a.globals.minX)/this.xRatio-t*this.seriesLen/2),{barXPosition:e+t*this.visibleI,x:e}}getPreviousPath(e,t,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(e),10)&&r.paths[t]!==void 0&&(a=r.paths[t].d)}return a&&de.pathCommandCount(a)===de.pathCommandCount(s)?a:s}static pathCommandCount(e){if(!e)return 0;const t=e.match(/[A-Za-z]/g);return t?t.length:0}}function Wt({w:d,points:e,seedA:t,seedB:s,center:i,halfExtent:a,alongFn:o,isHorizontal:r,options:n,clampAt:c}){const h=n;if(!h||h.show===!1)return[];if(!e||!e.length)return[];const l=h.maxPoints||3e3,g=e.length>l?Math.ceil(e.length/l):1,p=h.size!=null?h.size:2.5,u=a*(h.jitter!=null?h.jitter:.5),x=h.constrainToViolin!==!1&&typeof c=="function",b=h.shape==="square",f=h.colorScale,m=f&&Array.isArray(f.colors)&&f.colors.length>0,w=m?Math.max(2,f.steps||24):1,y=m&&f.min!=null?f.min:d.globals.minY,v=(m&&f.max!=null?f.max:d.globals.maxY)-y||1,C=m?new Array(w).fill(""):[""];for(let L=0;L<e.length;L+=g){const A=e[L],D=o(A);let k=2*(ct(7919*t+100003*s+L)-.5)*u;if(x){const E=c(A);k>E&&(k=E),k<-E&&(k=-E)}const P=r?D:i+k,T=r?i+k:D,I=b?Js(P,T,p):Ks(P,T,p);if(m){let E=(A-y)/v;E<0&&(E=0),E>1&&(E=1),C[Math.round(E*(w-1))]+=I}else C[0]+=I}if(!m)return C[0]?[{fill:null,d:C[0]}]:[];const S=[];for(let L=0;L<w;
1130L++)C[L]&&S.push({fill:Zs(f.colors,L/(w-1)),d:C[L]});return S}function Ot({graphics:d,w:e,elSeries:t,pointsByCat:s,options:i,distributed:a,realIndex:o,wrapClass:r,pointClass:n}){if(!i||i.show===!1||!s.length)return;const c=i.opacity!=null?i.opacity:.9,h=i.strokeColor!=null?i.strokeColor:"#fff",l=i.strokeWidth!=null?i.strokeWidth:1,g=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,p=d.group({class:g?`${r} apexcharts-element-hidden`:r});g&&e.globals.delayedElements.push({el:p.node}),s.forEach(({groups:u,j:x})=>{const b=a?e.globals.colors[x]:e.globals.colors[o],f=i.fillColor,m=f==="series"?b:f==="series-dark"?_t(b,.45):f||_t(b,.45);u.forEach(w=>{const y=d.drawPath({d:w.d,fill:w.fill!=null?w.fill:m,stroke:l>0?h:"none",strokeWidth:l,fillOpacity:c,classes:n});y.attr("data:realIndex",o),y.attr("j",x),y.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),y.node.style.pointerEvents="none",p.add(y)})}),t.add(p)}function _t(d,e){const t=M.parseHex(d);if(!t)return d;const s=Math.max(0,1-e);return`rgb(${Math.round(t[0]*s)},${Math.round(t[1]*s)},${Math.round(t[2]*s)})`}function Zs(d,e){if(!d.length)return"#000";if(d.length===1)return d[0];const t=Math.max(0,Math.min(1,e))*(d.length-1),s=Math.floor(t),i=t-s,a=M.parseHex(d[s])||[0,0,0],o=M.parseHex(d[Math.min(s+1,d.length-1)])||a,r=(n,c)=>Math.round(n+(c-n)*i);return`rgb(${r(a[0],o[0])},${r(a[1],o[1])},${r(a[2],o[2])})`}function ct(d){let e=(2654435769^d)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function Ks(d,e,t){return`M ${d-t} ${e} a ${t} ${t} 0 1 0 ${2*t} 0 a ${t} ${t} 0 1 0 ${-2*t} 0 `}function Js(d,e,t){return`M ${d-t} ${e-t} h ${2*t} v ${2*t} h ${-2*t} z `}class $t extends de{draw(e,t,s){var i;const a=this.w,o=new F(this.w),r=a.globals.comboCharts?t:a.config.chart.type,n=new le(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 J(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);const c=o.group({class:`apexcharts-${r}-series apexcharts-plot-series`});for(let h=0;h<e.length;h++){let l,g;this.isBoxPlot=a.config.chart.type==="boxPlot"||a.config.series[h].type==="boxPlot";const p=[],u=[],x=a.globals.comboCharts?s[h]:h,{columnGroupIndex:b}=this.barHelpers.getGroupIndex(x),f=o.group({class:"apexcharts-series",seriesName:M.escapeString(a.seriesData.seriesNames[x]),rel:h+1,"data:realIndex":x});K.addCollapsedClassToSeries(this.w,f,x),e[h].length>0&&(this.visibleI=this.visibleI+1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[x][0],m=x);const w=this.barHelpers.initialPositions(x),{y,barHeight:v,yDivision:C,zeroW:S,x:L,barWidth:A,xDivision:D,zeroH:k}=w;g=y,l=L,u.push(l+(A??0)/2);const P=o.group({class:"apexcharts-datalabels","data:realIndex":x}),T=o.group({class:"apexcharts-bar-goals-markers"}),I=this.isBoxPlot?this.boxOptions.points:null,E=[],X=a.layout.gridWidth,z=A??0;for(let H=0;H<a.globals.dataPoints;H++){const Y=this.barHelpers.getStrokeWidth(h,H,x);let N=null;const W={indexes:{i:h,j:H,realIndex:x,translationsIndex:m},x:l,y:g,strokeWidth:Y,elSeries:f};if(N=this.isHorizontal?this.drawHorizontalBoxPaths(G($({},W),{yDivision:C,barHeight:v,zeroW:S})):this.drawVerticalBoxPaths(G($({},W),{xDivision:D,barWidth:A,zeroH:k,cullBounds:{lo:-z,hi:X+z}})),g=N.y,l=N.x,H>0&&u.push(l+(A??0)/2),p.push(g),N.culled)continue;const R=this.barHelpers.drawGoalLine({barXPosition:N.barXPosition,barYPosition:N.barYPosition,goalX:N.goalX,goalY:N.goalY,barHeight:v,barWidth:A});if(R&&T.add(R),N.pathTo.forEach((_,V)=>{const Q=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?N.color[V]:a.globals.stroke.colors[h],q=n.fillPath({seriesNumber:x,dataPointIndex:H,color:N.color[V],value:e[h][H]});this.renderSeries({realIndex:x,pathFill:q,lineFill:Q,j:H,i:h,pathFrom:N.pathFrom,pathTo:_,strokeWidth:Y,elSeries:f,x:l,y:g,series:e,columnGroupIndex:b,barHeight:v,barWidth:A,elDataLabelsWrap:P,elGoalsMarkers:T,visibleSeries:this.visibleI,type:a.config.chart.type})}
vendor: 5,124 bytes, line 1130
1130),I&&I.show!==!1){const _=(i=a.candleData.seriesBoxPoints[x])==null?void 0:i[H];if(_&&_.length){const V=re=>this.coreUtils.getLogValAtSeriesIndex(re,x);let Q,q,oe;if(this.isHorizontal){const re=this.invertedYRatio,se=v??0,ge=S??0;Q=N.barYPosition+se/2,q=se/2,oe=pt=>ge+V(pt)/re}else{const re=this.yRatio[m],se=A??0,ge=k??0;Q=N.barXPosition+se/2,q=se/2,oe=pt=>ge-V(pt)/re}const Z=Wt({w:a,points:_,seedA:x,seedB:H,center:Q,halfExtent:q,alongFn:oe,isHorizontal:this.isHorizontal,options:I});Z.length&&E.push({groups:Z,j:H})}}}I&&Ot({graphics:o,w:a,elSeries:f,pointsByCat:E,options:I,distributed:a.config.plotOptions.bar.distributed,realIndex:x,wrapClass:"apexcharts-boxPlot-points-wrap",pointClass:"apexcharts-boxPlot-points"}),a.globals.seriesXvalues[x]=u,a.globals.seriesYvalues[x]=p,c.add(f)}return c}drawVerticalBoxPaths({indexes:e,x:t,xDivision:s,barWidth:i,zeroH:a,strokeWidth:o,cullBounds:r=null}){var n,c;const h=this.w,l=new F(this.w),g=e.i,p=e.j,{colors:u}=h.config.plotOptions.candlestick,{colors:x}=this.boxOptions,b=e.realIndex,f=E=>Array.isArray(E)?E[b]:E,m=f(u.upward),w=f(u.downward),y=this.yRatio[e.translationsIndex],v=this.getOHLCValue(b,p);let C=a,S=a,L=v.o<v.c?[m]:[w];this.isBoxPlot&&(L=[f(x.lower),f(x.upper)]);let A=Math.min(v.o,v.c),D=Math.max(v.o,v.c),k=v.m;h.axisFlags.isXNumeric&&(t=(h.seriesData.seriesX[b][p]-h.globals.minX)/this.xRatio-i/2);const P=t+i*this.visibleI;if(((n=this.series[g])==null?void 0:n[p])===void 0||((c=this.series[g])==null?void 0:c[p])===null?(A=a,D=a):(A=a-A/y,D=a-D/y,C=a-v.h/y,S=a-v.l/y,k=a-v.m/y),r&&(P+i<r.lo||P>r.hi))return{pathTo:null,pathFrom:null,x:h.axisFlags.isXNumeric?t:t+s,y:D,barXPosition:P,color:L,culled:!0};let T,I;if(this.isOHLC){const E=P+i/2,X=a-v.o/y,z=a-v.c/y;T=[l.move(E,C)+l.line(E,S)+l.move(E,X)+l.line(P,X)+l.move(E,z)+l.line(P+i,z)]}else T=this.isBoxPlot?[l.move(P,A)+l.line(P+i/2,A)+l.line(P+i/2,C)+l.line(P+i/4,C)+l.line(P+i-i/4,C)+l.line(P+i/2,C)+l.line(P+i/2,A)+l.line(P+i,A)+l.line(P+i,k)+l.line(P,k)+l.line(P,A+o/2),l.move(P,k)+l.line(P+i,k)+l.line(P+i,D)+l.line(P+i/2,D)+l.line(P+i/2,S)+l.line(P+i-i/4,S)+l.line(P+i/4,S)+l.line(P+i/2,S)+l.line(P+i/2,D)+l.line(P,D)+l.line(P,k)+"z"]:[l.move(P,D)+l.line(P+i/2,D)+l.line(P+i/2,C)+l.line(P+i/2,D)+l.line(P+i,D)+l.line(P+i,A)+l.line(P+i/2,A)+l.line(P+i/2,S)+l.line(P+i/2,A)+l.line(P,A)+l.line(P,D-o/2)];return I=h.globals.previousPaths.length>0?this.getPreviousPath(b,p,T[0]):l.move(P+i/2,A)+l.move(P,A),h.axisFlags.isXNumeric||(t+=s),{pathTo:T,pathFrom:I,x:t,y:D,goalY:this.barHelpers.getGoalValues("y",null,a,g,p,e.translationsIndex),barXPosition:P,color:L}}drawHorizontalBoxPaths({indexes:e,y:t,yDivision:s,barHeight:i,zeroW:a,strokeWidth:o}){var r,n;const c=this.w,h=new F(this.w),l=e.i,g=e.j,p=e.realIndex,{colors:u}=c.config.plotOptions.candlestick,{colors:x}=this.boxOptions,b=P=>Array.isArray(P)?P[p]:P,f=this.invertedYRatio,m=this.getOHLCValue(p,g);let w=m.o<m.c?[b(u.upward)]:[b(u.downward)];this.isBoxPlot&&(w=[b(x.lower),b(x.upper)]);let y=a,v=a,C=Math.min(m.o,m.c),S=Math.max(m.o,m.c),L=m.m;c.axisFlags.isXNumeric&&(t=(c.seriesData.seriesX[p][g]-c.globals.minX)/this.invertedXRatio-i/2);const A=t+i*this.visibleI;((r=this.series[l])==null?void 0:r[g])===void 0||((n=this.series[l])==null?void 0:n[g])===null?(C=a,S=a):(C=a+C/f,S=a+S/f,y=a+m.h/f,v=a+m.l/f,L=a+m.m/f);const D=[h.move(C,A)+h.line(C,A+i/2)+h.line(y,A+i/2)+h.line(y,A+i/2-i/4)+h.line(y,A+i/2+i/4)+h.line(y,A+i/2)+h.line(C,A+i/2)+h.line(C,A+i)+h.line(L,A+i)+h.line(L,A)+h.line(C+o/2,A),h.move(L,A)+h.line(L,A+i)+h.line(S,A+i)+h.line(S,A+i/2)+h.line(v,A+i/2)+h.line(v,A+i-i/4)+h.line(v,A+i/4)+h.line(v,A+i/2)+h.line(S,A+i/2)+h.line(S,A)+h.line(L,A)+"z"];let k;return k=c.globals.previousPaths.length>0?this.getPreviousPath(p,g,D[0]):h.move(C,A+i/2)+h.move(C,A),c.axisFlags.isXNumeric||(t+=s),{pathTo:D,pathFrom:k,x:S,y:t,goalX:this.barHelpers.getGoalValues("x",a,null,l,g,0),barYPosition:A,color:w}}getOHLCValue(e,t){const s=this.w,i=this.coreUtils,a=l=>l[e]&&l[e][t]!=null?i.getLogValAtSeriesIndex(l[e][t],e):0,o=a(s.candleData.seriesCandleH),r=a(s.candleData.seriesCandleO),n=a(s.candleData.seriesCandleM),c=a(s.candleData.seriesCandleC),h=a(s.candleData.seriesCandleL);return{o:this.isBoxPlot?o:r,h:this.isBoxPlot?r:o,m:n,l:this.isBoxPlot?c:h,c:this.isBoxPlot?h:c}}}const Qs=d=>{const e=(function(n){const c=[];let h=n[0],l=n[1],g=c[0]=gt(h,l),p=1;for(let u=n.length-1;p<u;p++)h=l,l=n[p+1],c[p]=.5*(g+(g=gt(h,l)));return c[p]=g,c})(d),t=d.length-1,s=[];let i,a,o,r;for(let n=0;n<t;n++)o=gt(d[n],d[n+1]),Math.abs(o)<1e-6?e[n]=e[n+1]=0:(i=e[n]/o,a=e[n+1]/o,r=i*i+a*a,r>9&&(r=3*o/Math.sqrt(r),e[n]=r*i,e[n+1]=r*a));for(let n=0;n<=t;n++)r=(d[Math.min(t,n+1)][0]-d[Math.max(0,n-1)][0])/(6*(1+e[n]*e[n])),s.push([r||0,e[n]*r||0]);return s},Gt=d=>{let e="";for(let t=0;t<d.length;t++){const s=d[t],i=s.length;i>4?(e+=`C${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`,e+=`, ${s[4]}, ${s[5]}`):i>2&&(e+=`S${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`)}return e},dt={points(d){const e=Qs(d),t=d[1],s=d[0],i=[],a=e[1],o=e[0];i.push(s,[s[0]+o[0],s[1]+o[1],t[0]-a[0],t[1]-a[1],t[0],t[1]]);for(let r=2,n=e.length;r<n;r++){const c=d[r],h=e[r];
1130i.push([c[0]-h[0],c[1]-h[1],c[0],c[1]])}return i},slice(d,e,t){const s=d.slice(e,t);if(e){if(t-e>1&&s[1].length<6){const i=s[0].length;s[1]=[2*s[0][i-2]-s[0][i-4],2*s[0][i-1]-s[0][i-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s}};function gt(d,e){return(e[1]-d[1])/(e[0]-d[0])}function ei(d){const e=[];for(let t=0;t<d.length;t+=2)e.push(d[t+1],d[t]);return e}class jt{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){const e=this.w;let t=!1;const s=e.config.plotOptions[e.config.chart.type];return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(i=>{i.from<=0&&(t=!0)}),t}getShadeColor(e,t,s,i){const a=this.w;let o=1;const r=a.config.plotOptions[e].shadeIntensity,n=this.determineColor(e,t,s);a.globals.hasNegs||i?o=a.config.plotOptions[e].reverseNegativeShade?n.percent<0?n.percent/100*(1.25*r):(1-n.percent/100)*(1.25*r):n.percent<=0?1-(1+n.percent/100)*r:(1-n.percent/100)*r:(o=1-n.percent/100,e==="treemap"&&(o=(1-n.percent/100)*(1.25*r)));let c=n.color;const h=new M;if(a.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){const l=h.shadeColor(-1*o,n.color);c=M.hexToRgba(M.isColorHex(l)?l:M.rgb2hex(l),a.config.fill.opacity)}else{const l=h.shadeColor(o,n.color);c=M.hexToRgba(M.isColorHex(l)?l:M.rgb2hex(l),a.config.fill.opacity)}return{color:c,colorProps:n}}determineColor(e,t,s){const i=this.w,a=i.seriesData.series[t][s],o=i.config.plotOptions[e];let r=o.colorScale.inverse?s:t;o.distributed&&i.config.chart.type==="treemap"&&(r=s);let n=i.globals.colors[r],c=null,h=Math.min(...i.seriesData.series[t]),l=Math.max(...i.seriesData.series[t]);o.distributed||e!=="heatmap"||(h=i.globals.minY,l=i.globals.maxY),o.colorScale.min!==void 0&&(h=o.colorScale.min<i.globals.minY?o.colorScale.min:i.globals.minY,l=o.colorScale.max>i.globals.maxY?o.colorScale.max:i.globals.maxY);const g=Math.abs(l)+Math.abs(h);let p=g===0?0:100*a/g;return o.colorScale.ranges.length>0&&o.colorScale.ranges.map(u=>{if(a>=u.from&&a<=u.to){n=u.color,c=u.foreColor?u.foreColor:null,h=u.from,l=u.to;const x=Math.abs(l)+Math.abs(h);p=x===0?0:100*a/x}}),{color:n,foreColor:c,percent:p}}calculateDataLabels({text:e,x:t,y:s,i,j:a,colorProps:o,fontSize:r}){const n=this.w.config.dataLabels,c=new F(this.w),h=new Ae(this.w,this.ctx);let l=null;if(n.enabled){l=c.group({class:"apexcharts-data-labels"});const g=n.offsetX,p=n.offsetY,u=t+g,x=s+parseFloat(n.style.fontSize)/3+p;h.plotDataLabelsText({x:u,y:x,text:e,i,j:a,color:o.foreColor,parent:l,fontSize:r,dataLabelsConfig:n})}return l}}class ti{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){const s=this.w;if((s.config.fill.type==="gradient"||s.config.fill.type[e]==="gradient")&&new J(this.lineCtx.w).seriesHaveSameValues(e)){const i=t[e].slice();i[i.length-1]=i[i.length-1]+1e-6,t[e]=i}return t}calculatePoints({series:e,realIndex:t,x:s,y:i,i:a,j:o,prevY:r}){const n=this.w,c=[],h=[];let l=this.lineCtx.categoryAxisCorrection+n.config.markers.offsetX;return n.axisFlags.isXNumeric&&(l=(n.seriesData.seriesX[t][0]-n.globals.minX)/this.lineCtx.xRatio+n.config.markers.offsetX),o===0&&(c.push(l),h.push(M.isNumber(e[a][0])?r+n.config.markers.offsetY:null)),c.push(s+n.
1130config.markers.offsetX),h.push(M.isNumber(e[a][o+1])?i+n.config.markers.offsetY:null),{x:c,y:h}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,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,e=i.globals.previousPaths[a].paths[0].d):o.type==="area"&&(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[a].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[a].paths[1]&&(e=i.globals.previousPaths[a].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:s,prevY:i,lineYPosition:a,translationsIndex:o}){var r,n,c;const h=this.w,l=h.config.chart.stacked&&!h.globals.comboCharts||h.config.chart.stacked&&h.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((r=this.w.config.series[t])==null?void 0:r.type)==="bar"||((n=this.w.config.series[t])==null?void 0:n.type)==="column");if(((c=s[e])==null?void 0:c[0])!==void 0)i=(a=l&&e>0?this.lineCtx.prevSeriesY[e-1][0]:this.lineCtx.zeroY)-s[e][0]/this.lineCtx.yRatio[o]+2*(this.lineCtx.isReversed?s[e][0]/this.lineCtx.yRatio[o]:0);else if(l&&e>0&&s[e][0]===void 0){for(let g=e-1;g>=0;g--)if(s[g][0]!==null&&s[g][0]!==void 0){i=a=this.lineCtx.prevSeriesY[g][0];break}}return{prevY:i,lineYPosition:a}}}class Be{constructor(e,t,s,i){this.ctx=t,this.w=e,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 vt(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new ti(this),this.markers=new ke(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(e,t,s,i){var a;const o=this.w,r=new F(this.w),n=o.globals.comboCharts?t:o.config.chart.type,c=r.group({class:`apexcharts-${n}-series apexcharts-plot-series`}),h=new J(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=h.getLogSeries(e),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];const l=[];for(let g=0;g<e.length;g++){e=this.lineHelpers.sameValueSeriesFix(g,e);const p=o.globals.comboCharts?s[g]:g,u=this.yRatio.length>1?p:0;this._initSerieVariables(e,g,p);const x=[],b=[],f=[];let m=o.globals.padHorizontal+this.categoryAxisCorrection;const w=1,y=[],v=[];K.addCollapsedClassToSeries(this.w,this.elSeries,p),o.axisFlags.isXNumeric&&o.seriesData.seriesX.length>0&&(m=(o.seriesData.seriesX[p][0]-o.globals.minX)/this.xRatio),f.push(m);const C=m;let S;const L=C;let A=this.zeroY,D=this.zeroY;const k=0;A=this.lineHelpers.determineFirstPrevY({i:g,realIndex:p,series:e,prevY:A,lineYPosition:k,translationsIndex:u}).prevY,o.config.stroke.curve==="monotoneCubic"&&e[g][0]===null?x.push(null):x.push(A);const P=A;let T;n==="rangeArea"&&(T=this.lineHelpers.determineFirstPrevY({i:g,realIndex:p,series:i,prevY:D,lineYPosition:k,translationsIndex:u}),D=T.prevY,S=D,b.push(x[0]!==null?D:null));const I=this._calculatePathsFrom({type:n,series:e,i:g,realIndex:p,translationsIndex:u,prevX:L,prevY:A,prevY2:D}),E=[x[0]],X=[b[0]],z={type:n,series:e,realIndex:p,translationsIndex:u,i:g,x:m,y:w,pX:C,pY:P,pathsFrom:I,linePaths:y,areaPaths:v,seriesIndex:s,lineYPosition:k,xArrj:f,yArrj:x,y2Arrj:b,seriesRangeEnd:i},H=this._iterateOverDataPoints(G($({},z),{iterations:n==="rangeArea"?e[g].length-1:void 0,isRangeStart:!0}));if(n==="rangeArea"){const Y=this._calculatePathsFrom({series:i,i:g,realIndex:p,prevX:L,prevY:D}),N=this._iterateOverDataPoints(G($({},z),{series:i,xArrj:[m],yArrj:E,y2Arrj:X,pY:S,areaPaths:H.areaPaths,pathsFrom:Y,iterations:i[g].length-1,isRangeStart:!1})),W=H.linePaths.length/2;for(let R=0;R<W;R++)H.linePaths[R]=N.linePaths[R+W]+H.linePaths[R];H.linePaths.splice(W),H.pathFromLine=N.pathFromLine+H.pathFromLine}else H.pathFromArea+="z";this._handlePaths({type:n,realIndex:p,i:g,paths:H}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(((a=o.config.series[0])==null?void 0:a.zIndex)!==void 0&&l.sort((g,p)=>Number(g.node.getAttribute("zIndex"))-Number(p.node.getAttribute("zIndex"))),o.config.chart.stacked)for(let g=l.length-1;g>=0;g--)c.add(l[g]);else for(let g=0;g<l.length;g++)c.add(l[g]);return c}_initSerieVariables(e,t,s){const i=this.w,a=new F(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?2*this.baseLineY[o]: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:r.zIndex!==void 0?r.zIndex:s,seriesName:M.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=a.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),i.globals.hasNullValues){const c=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]}
1130,seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});c!==null&&this.elPointsMain.add(c)}this.elDataLabelsWrap=a.group({class:"apexcharts-datalabels","data:realIndex":s});const n=e[t].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:t+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:s,realIndex:i,translationsIndex:a,prevX:o,prevY:r,prevY2:n}){const c=this.w,h=new F(this.w);let l,g,p,u;if(t[s][0]===null){for(let x=0;x<t[s].length;x++)if(t[s][x]!==null){o=this.xDivision*x,r=this.zeroY-t[s][x]/this.yRatio[a],l=h.move(o,r),g=h.move(o,this.areaBottomY);break}}else l=h.move(o,r),e==="rangeArea"&&(l=h.move(o,n)+h.line(o,r)),g=h.move(o,this.areaBottomY)+h.line(o,r);if(p=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),u=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),c.globals.previousPaths.length>0){const x=this.lineHelpers.checkPreviousPaths({pathFromLine:p,pathFromArea:u,realIndex:i});p=x.pathFromLine,u=x.pathFromArea}return{prevX:o,prevY:r,linePath:l,areaPath:g,pathFromLine:p,pathFromArea:u}}_handlePaths({type:e,realIndex:t,i:s,paths:i}){const a=this.w,o=new F(this.w),r=new le(this.w);this.prevSeriesY.push(i.yArrj),a.globals.seriesXvalues[t]=i.xArrj,a.globals.seriesYvalues[t]=i.yArrj;const n=a.config.forecastDataPoints;if(n.count>0&&e!=="rangeArea"){const h=a.globals.seriesXvalues[t][a.globals.seriesXvalues[t].length-n.count-1],l=o.drawRect(h,0,a.layout.gridWidth,a.layout.gridHeight,0);a.dom.elForecastMask.appendChild(l.node);const g=o.drawRect(0,0,h,a.layout.gridHeight,0);a.dom.elNonForecastMask.appendChild(g.node)}this.pointsChart||a.globals.delayedElements.push({el:this.elPointsMain.node,index:t});const c={i:s,realIndex:t,animationDelay:s,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`};if(e==="area"){const h=r.fillPath({seriesNumber:t});for(let l=0;l<i.areaPaths.length;l++){const g=o.renderPaths(G($({},c),{pathFrom:i.pathFromArea,pathTo:i.areaPaths[l],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:h}));this.elSeries.add(g)}}if(a.config.stroke.show&&!this.pointsChart){let h=null;if(e==="line")h=r.fillPath({seriesNumber:t,i:s});else if(a.config.stroke.fill.type==="solid")h=a.globals.stroke.colors[t];else{const l=a.config.fill;a.config.fill=a.config.stroke.fill,h=r.fillPath({seriesNumber:t,i:s}),a.config.fill=l}for(let l=0;l<i.linePaths.length;l++){let g=h;e==="rangeArea"&&(g=r.fillPath({seriesNumber:t}));const p=G($({},c),{pathFrom:i.pathFromLine,pathTo:i.linePaths[l],stroke:h,strokeWidth:this.strokeWidth,strokeLineCap:a.config.stroke.lineCap,fill:e==="rangeArea"?g:"none"}),u=o.renderPaths(p);if(this.elSeries.add(u),u.attr("fill-rule","evenodd"),n.count>0&&e!=="rangeArea"){const x=o.renderPaths(p);x.node.setAttribute("stroke-dasharray",n.dashArray),n.strokeWidth&&x.node.setAttribute("stroke-width",n.strokeWidth),this.elSeries.add(x),x.attr("clip-path",`url(#forecastMask${a.globals.cuid})`),u.attr("clip-path",`url(#nonForecastMask${a.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:s,realIndex:i,translationsIndex:a,i:o,x:r,y:n,pX:c,pY:h,pathsFrom:l,linePaths:g,areaPaths:p,seriesIndex:u,lineYPosition:x,xArrj:b,yArrj:f,y2Arrj:m,isRangeStart:w,seriesRangeEnd:y}){var v,C;const S=this.w,L=new F(this.w),A=this.yRatio;let{prevY:D,linePath:k,areaPath:P,pathFromLine:T,pathFromArea:I}=l;const E=M.isNumber(S.globals.minYArr[i])?S.globals.minYArr[i]:S.globals.minY;s||(s=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);const X=(_,V)=>V-_/A[a]+2*(this.isReversed?_/A[a]:0);let z=n;const H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((v=this.w.config.series[i])==null?void 0:v.type)==="bar"||((C=this.w.config.series[i])==null?void 0:C.type)==="column");let Y=S.config.stroke.curve;Array.isArray(Y)&&(Y=Array.isArray(u)?Y[u[o]]:Y[o]);let N,W=0;const R=this.pointsChart?this._scatterJitterPx(i):null;for(let _=0;_<s&&t[o].length!==0;_++){const V=t[o][_+1]===void 0||t[o][_+1]===null;if(S.axisFlags.isXNumeric){let re=S.seriesData.seriesX[i][_+1];S.seriesData.seriesX[i][_+1]===void 0&&(re=S.seriesData.seriesX[i][s-1]),r=(re-S.globals.minX)/this.xRatio}else r+=this.xDivision;if(H)if(o>0&&S.globals.collapsedSeries.length<S.config.series.length-1){const re=se=>{for(let ge=se;ge>0;ge--){if(!(S.globals.collapsedSeriesIndices.indexOf(u?.[ge]||ge)>-1))return ge;ge--}return 0};x=this.prevSeriesY[re(o-1)][_+1]}else x=this.zeroY;else x=this.zeroY;
1130V?n=X(E,x):(n=X(t[o][_+1],x),e==="rangeArea"&&(z=X(y[o][_+1],x)));let Q=r,q=n;if(R){const re=100003*i+(_+1);R.x&&(Q=r+2*(ct(7919*re+13)-.5)*R.x),R.y&&(q=n+2*(ct(6271*re+97)-.5)*R.y)}b.push(t[o][_+1]===null?null:Q),!V||S.config.stroke.curve!=="smooth"&&S.config.stroke.curve!=="monotoneCubic"?(f.push(q),m.push(z)):(f.push(null),m.push(null));const oe=this.lineHelpers.calculatePoints({series:t,x:Q,y:q,realIndex:i,i:o,j:_,prevY:D}),Z=this._createPaths({type:e,series:t,i:o,j:_,x:r,y:n,y2:z,xArrj:b,yArrj:f,y2Arrj:m,pX:c,pY:h,pathState:W,segmentStartX:N,linePath:k,areaPath:P,linePaths:g,areaPaths:p,curve:Y,isRangeStart:w});p=Z.areaPaths,g=Z.linePaths,c=Z.pX,h=Z.pY,W=Z.pathState,N=Z.segmentStartX,P=Z.areaPath,k=Z.linePath,!this.appendPathFrom||S.globals.hasNullValues||Y==="monotoneCubic"&&e==="rangeArea"||(T+=L.line(r,this.areaBottomY),I+=L.line(r,this.areaBottomY)),this.handleNullDataPoints(t,oe,o,_,i),this._handleMarkersAndLabels({type:e,pointsPos:oe,i:o,j:_,realIndex:i,isRangeStart:w})}return{yArrj:f,xArrj:b,pathFromArea:I,areaPaths:p,pathFromLine:T,linePaths:g,linePath:k,areaPath:P}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:s,i,j:a,realIndex:o}){const r=this.w,n=new Ae(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:o,pointsPos:t,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:t,seriesIndex:o,j:a+1});h!==null&&this.elPointsMain.add(h)}const c=n.drawDataLabel({type:e,isRangeStart:s,pos:t,i:o,j:a+1});c!==null&&this.elDataLabelsWrap.add(c)}_scatterJitterPx(e){var t;const s=this.w,i=(t=s.config.plotOptions.scatter)==null?void 0:t.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?e:0,r=this.yRatio[o]?1/this.yRatio[o]:0;return{x:(i.x||0)*a,y:(i.y||0)*r}}_createPaths({type:e,series:t,i:s,j:i,x:a,y:o,xArrj:r,yArrj:n,y2:c,y2Arrj:h,pX:l,pY:g,pathState:p,segmentStartX:u,linePath:x,areaPath:b,linePaths:f,areaPaths:m,curve:w,isRangeStart:y}){const v=new F(this.w),C=this.areaBottomY,S=e==="rangeArea",L=e==="rangeArea"&&y;switch(w){case"monotoneCubic":{const A=y?n:h,D=(T,I)=>T.map((E,X)=>[E,I[X]]).filter(E=>E[1]!==null),k=T=>{const I=[];let E=0;return T.forEach(X=>{X!==null?E++:E>0&&(I.push(E),E=0)}),E>0&&I.push(E),I},P=(T,I)=>{const E=k(T),X=[];for(let z=0,H=0;z<E.length;H+=E[z++])X[z]=dt.slice(I,H,H+E[z]);return X};switch(p){case 0:if(A[i+1]===null)break;p=1;case 1:if(!(S?r.length===t[s].length:i===t[s].length-2))break;case 2:{const T=y?r:r.slice().reverse(),I=y?A:A.slice().reverse(),E=D(T,I),X=E.length>1?dt.points(E):E;let z=[];S&&(L?m=E:z=m.reverse());let H=0,Y=0;if(P(I,X).forEach(N=>{H++;const W=Gt(N),R=Y;Y+=N.length;const _=Y-1;L?x=v.move(E[R][0],E[R][1])+W:S?x=v.move(z[R][0],z[R][1])+v.line(E[R][0],E[R][1])+W+v.line(z[_][0],z[_][1]):(x=v.move(E[R][0],E[R][1])+W,b=x+v.line(E[_][0],C)+v.line(E[R][0],C)+"z",m.push(b)),f.push(x)}),S&&H>1&&!L){const N=f.slice(H).reverse();f.splice(H),N.forEach(W=>f.push(W))}p=0;break}}break}case"smooth":{const A=.35*(a-l);if(t[s][i]===null)p=0;else switch(p){case 0:if(u=l,x=L?v.move(l,h[i])+v.line(l,g):v.move(l,g),b=v.move(l,g),t[s][i+1]===null||t[s][i+1]===void 0){f.push(x),m.push(b);break}if(p=1,i<t[s].length-2){const D=v.curve(l+A,g,a-A,o,a,o);x+=D,b+=D;break}case 1:if(t[s][i+1]===null)x+=L?v.line(l,c):v.move(l,g),b+=v.line(l,C)+v.line(u,C)+"z",f.push(x),m.push(b),p=-1;else{const D=v.curve(l+A,g,a-A,o,a,o);x+=D,b+=D,i>=t[s].length-2&&(L&&(x+=v.curve(a,o,a,o,a,c)+v.move(a,c)),b+=v.curve(a,o,a,o,a,C)+v.line(u,C)+"z",f.push(x),m.push(b),p=-1)}}l=a,g=o;break}default:{const A=(D,k,P)=>{let T="";switch(D){case"stepline":T=v.line(k,null,"H")+v.line(null,P,"V");break;case"linestep":T=v.line(null,P,"V")+v.line(k,null,"H");break;case"straight":T=v.line(k,P)}return T};if(t[s][i]===null)p=0;else switch(p){case 0:if(u=l,x=L?v.move(l,h[i])+v.line(l,g):v.move(l,g),b=v.move(l,g),t[s][i+1]===null||t[s][i+1]===void 0){f.push(x),m.push(b);break}if(p=1,i<t[s].length-2){const D=A(w,a,o);x+=D,b+=D;break}case 1:if(t[s][i+1]===null)x+=L?v.line(l,c):v.move(l,g),b+=v.line(l,C)+v.line(u,C)+"z",f.push(x),m.push(b),p=-1;else{const D=A(w,a,o);x+=D,b+=D,i>=t[s].length-2&&(L&&(x+=v.line(a,c)),b+=v.line(a,C)+v.line(u,C)+"z",f.push(x),m.push(b),p=-1)}}l=a,g=o;break}}return{linePaths:f,areaPaths:m,pX:l,pY:g,pathState:p,segmentStartX:u,linePath:x,areaPath:b}}handleNullDataPoints(e,t,s,i,a){const o=this.w;if(e[s][i]===null&&o.config.markers.showNullDataPoints||e[s].length===1){let r=this.strokeWidth-o.config.markers.strokeWidth/2;r>0||(r=0);const n=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:a,j:i+1,pSize:r,alwaysDrawMarker:!0});n!==null&&this.elPointsMain.add(n)}}}class je{constructor(e){this.w=e}drawYAxisTexts(e,t,s,i){const a=this.w,o=a.config.yaxis[0],r=a.formatters.yLabelFormatters[
11300];return new F(this.w).drawText({x:e+o.labels.offsetX,y:t+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(e,{fontSize:t,fontFamily:s}={}){const i=new F(this.w);let a=0;return e.forEach(o=>{if(o==null||o==="")return;const r=i.getTextRects(`${o}`,t||"12px",s,"");a=Math.max(a,r.width)}),a}drawExternalLabel({lines:e,lineHeight:t,anchor:s,elbow:i,labelX:a,labelY:o,side:r,connector:n,style:c,foreColor:h}){const l=new F(this.w),g=l.group({class:"apexcharts-pie-name-label-group"});if(n.show){const f=`M ${s.x} ${s.y} L ${i.x} ${i.y} L ${a} ${o}`,m=l.drawPath({d:f,stroke:n.color,strokeWidth:n.width,fill:"none",strokeLinecap:"round"});m.node.classList.add("apexcharts-pie-label-connector"),g.add(m)}const p=r==="right"?a+4:a-4,u=e.length,x=o-(u-1)*t/2,b=l.drawText({x:p,y:x,text:u===1?e[0]:e,textAnchor:r==="right"?"start":"end",fontSize:c.fontSize,fontFamily:c.fontFamily,fontWeight:c.fontWeight,foreColor:h,dominantBaseline:"central",cssClass:"apexcharts-pie-name-label"});if(u>1){const f=b.node.getElementsByTagName("tspan");for(let m=0;m<f.length;m++)f[m].setAttribute("x",`${p}`),f[m].setAttribute("dy",m===0?"0":`${t}`)}return g.add(b),g}}class Ve{constructor(e,t){this.ctx=t,this.w=e,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=e.globals.stroke.colors!==void 0?e.globals.stroke.colors:e.globals.colors,this.defaultSize=Math.min(e.layout.gridWidth,e.layout.gridHeight),this.centerY=this.defaultSize/2,this.centerX=e.layout.gridWidth/2,e.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(e.config.plotOptions.pie.endAngle-e.config.plotOptions.pie.startAngle),this.initialAngle=e.config.plotOptions.pie.startAngle%this.fullAngle,e.globals.radialSize=this.defaultSize/2.05-e.config.stroke.width-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.externalCfg=e.config.plotOptions.pie.dataLabels.external;const s=e.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,e.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&this.chartType!=="polarArea",this.showExternalLabels&&!e.globals.noData&&this.reserveExternalLabelSpace(),this.donutSize=e.globals.radialSize*parseInt(e.config.plotOptions.pie.donut.size,10)/100;const i=e.config.plotOptions.pie.customScale,a=e.layout.gridWidth/2,o=e.layout.gridHeight/2;this.translateX=a-a*i,this.translateY=o-o*i,this.dataLabelsGroup=new F(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(e){var t,s,i;const a=this.w,o=a.seriesData.seriesNames[e],r=this.externalCfg.formatter;return typeof r=="function"?r(o,{seriesIndex:e,percent:(s=(t=a.globals.seriesPercent)==null?void 0:t[e])==null?void 0:s[0],value:(i=a.globals.seriesTotals)==null?void 0:i[e],w:a}):o==null?"":`${o}`}getExternalLabelLines(e){const t=this.getExternalLabelText(e);return(Array.isArray(t)?t:`${t??""}`.split(`
1131`)).map(s=>s==null?"":`${s}`)}reserveExternalLabelSpace(){const e=this.w,t=new je(e),s=(e.seriesData.seriesNames||[]).map((g,p)=>this.getExternalLabelLines(p)),i=t.getMaxLabelWidth(s.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=s.reduce((g,p)=>Math.max(g,p.length),1),this.externalLabelLineH=Math.round(1.35*(parseFloat(this.externalLabelStyle.fontSize)||12));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,c=Math.min(e.globals.radialSize,e.layout.gridWidth/2-r,e.layout.gridHeight/2-n);e.globals.radialSize=Math.max(c,.15*this.defaultSize),e.globals.pieExternalLabelMarginY=n;const h=e.config.chart.height?String(e.config.chart.height):"",l=h!==""&&h!=="auto";this.centerY=l?e.layout.gridHeight/2:e.globals.radialSize+n}draw(e){var t;const s=this.w,i=new F(this.w),a=i.group({class:"apexcharts-pie"});if(s.globals.noData)return a;let o=0;for(let l=0;l<e.length;l++)o+=M.negToZero(e[l]);const r=[],n=i.group();o===0&&(o=1e-5),e.forEach(l=>{this.maxY=Math.max(this.maxY,l)}),s.config.yaxis[0].max&&(this.maxY=s.config.yaxis[0].max),s.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(a);for(let l=0;l<e.length;l++){const g=this.fullAngle*M.negToZero(e[l])/o;r.push(g),this.chartType==="polarArea"?(r[l]=this.fullAngle/e.length,this.sliceSizes.push(s.globals.radialSize*e[l]/this.maxY)):this.sliceSizes.push(s.globals.radialSize)}const c=((t=this.ctx.morphTypeChange)==null?void 0:t.isActive())===!0;if(s.globals.dataChanged&&!c){let l,g=0;for(let p=0;p<s.globals.previousPaths.length;p++)g+=M.negToZero(s.globals.previousPaths[p]);for(let p=0;p<s.globals.previousPaths.length;p++)l=this.fullAngle*M.negToZero(s.globals.previousPaths[p])/g,this.prevSectorAngleArr.push(l)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){const l=i.drawCircle(this.donutSize);l.attr({cx:this.centerX,cy:this.centerY,fill:s.config.plotOptions.pie.donut.background?s.config.plotOptions.pie.donut.background:"transparent"}),n.add(l)}const h=this.drawArcs(r,e);
1131if(this.sliceLabels.forEach(l=>{h.add(l)}),n.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${s.config.plotOptions.pie.customScale})`}),n.add(h),a.add(n),this.donutDataLabels.show){const l=this.initialAnim&&!s.globals.resized&&!s.globals.dataChanged&&this.animDur>0,g=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:l?0:this.donutDataLabels.show});if(l){const p=this.dataLabelsGroup.node;p.style.transition="opacity 280ms ease-out",setTimeout(()=>{p.style.opacity="1"},this.animDur)}a.add(g)}return s.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(a),a}drawArcs(e,t){var s,i;const a=this.w,o=new te(this.w),r=new F(this.w),n=new le(this.w),c=r.group({class:"apexcharts-slices"});let h=this.initialAngle,l=this.initialAngle,g=this.initialAngle,p=this.initialAngle;this.strokeWidth=a.config.stroke.show?a.config.stroke.width:0;const u=((s=this.ctx.morphTypeChange)==null?void 0:s.isActive())===!0;for(let x=0;x<e.length;x++){const b=r.group({class:"apexcharts-series apexcharts-pie-series",seriesName:M.escapeString(a.seriesData.seriesNames[x]),rel:x+1,"data:realIndex":x});c.add(b),h=g,l=p,g=h+e[x],p=l+this.prevSectorAngleArr[x];const f=g<h?this.fullAngle+g-h:g-h,m=n.fillPath({seriesNumber:x,size:this.sliceSizes[x],value:t[x]}),w=u?this.ctx.morphTypeChange.getInitialPathFor(x,0):null,y=w||this.getChangedPath(l,p),v=r.drawPath({d:y,stroke:Array.isArray(this.lineColorArr)?(i=this.lineColorArr[x])!=null?i:this.lineColorArr[x%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:m,fillOpacity:a.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${x}`});if(v.attr({index:0,j:x}),o.setSelectionFilter(v,0,x),a.config.chart.dropShadow.enabled){const D=a.config.chart.dropShadow;o.dropShadow(v,D,x)}this.addListeners(v,this.donutDataLabels);let C={x:0,y:0};const S=(h+f/2)%this.fullAngle;let L={x:this.centerX,y:this.centerY};this.chartType==="pie"||this.chartType==="polarArea"?(C=M.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize/1.25+a.config.plotOptions.pie.dataLabels.offset,S),L=M.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize/2,S)):this.chartType==="donut"&&(C=M.polarToCartesian(this.centerX,this.centerY,(a.globals.radialSize+this.donutSize)/2+a.config.plotOptions.pie.dataLabels.offset,S),L=M.polarToCartesian(this.centerX,this.centerY,(a.globals.radialSize+this.donutSize)/2,S)),F.setAttrs(v.node,{"data:angle":f,"data:startAngle":h,"data:strokeWidth":this.strokeWidth,"data:value":t[x],"data:cx":L.x,"data:cy":L.y}),b.add(v);let A=0;if(!this.initialAnim||a.globals.resized||a.globals.dataChanged?this.animBeginArr.push(0):(A=f/this.fullAngle*a.config.chart.animations.speed,A===0&&(A=1),this.animDur=A+this.animDur,this.animBeginArr.push(this.animDur)),u&&w){const D=this.getPiePath({me:this,startAngle:h,angle:f,size:this.sliceSizes[x]}),k=this.ctx.morphTypeChange.getSpeed(),P=this.ctx.animations;v.node.setAttribute("data:pathOrig",D);const T=v.animate(k).plot(D,"polygons").attr({"stroke-width":this.strokeWidth});T&&typeof T.after=="function"?T.after(()=>P.animationCompleted(v)):P.animationCompleted(v)}else this.dynamicAnim&&a.globals.dataChanged?this.animatePaths(v,{size:this.sliceSizes[x],endAngle:g,startAngle:h,prevStartAngle:l,prevEndAngle:p,animateStartingPos:!0,i:x,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:
1131a.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(v,{size:this.sliceSizes[x],endAngle:g,startAngle:h,i:x,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:A});if(a.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&v.node.addEventListener("mouseup",this.pieClicked.bind(this,x)),a.interact.selectedDataPoints[0]!==void 0&&a.interact.selectedDataPoints[0].indexOf(x)>-1)if(this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged&&this.animDur>0){const D=this,k=x;setTimeout(()=>D.pieClicked(k),this.animDur)}else this.pieClicked(x);if(a.config.dataLabels.enabled){const D=C.x,k=C.y;let P=100*f/this.fullAngle+"%";if(f!==0&&a.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[x]){const T=a.config.dataLabels.formatter;T!==void 0&&(P=T(a.globals.seriesPercent[x][0],{seriesIndex:x,w:a}));const I=a.globals.dataLabels.style.colors[x],E=r.group({class:"apexcharts-datalabels"}),X=r.drawText({x:D,y:k,text:P,textAnchor:"middle",fontSize:a.config.dataLabels.style.fontSize,fontFamily:a.config.dataLabels.style.fontFamily,fontWeight:a.config.dataLabels.style.fontWeight,foreColor:I});if(E.add(X),a.config.dataLabels.dropShadow.enabled){const z=a.config.dataLabels.dropShadow;o.dropShadow(X,z)}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(E)}}if(this.showExternalLabels&&f!==0){const D=this.getExternalLabelLines(x);if(D.some(k=>k!=="")){const k=M.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize,S),P=M.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize+(this.externalCfg.connector.gap||0),S),T=P.x>=this.centerX,I=T?P.x+(this.externalCfg.connector.length||0):P.x-(this.externalCfg.connector.length||0);this.externalLabels.push({lines:D,anchor:k,elbow:P,side:T?"right":"left",labelX:I+parseFloat(this.externalCfg.offsetX||0),idealY:P.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||a.globals.colors[x],foreColor:this.externalCfg.color||a.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();const x=O.isBrowser()&&(u||this.dynamicAnim&&a.globals.dataChanged||this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged);
1131this.externalLabels.forEach(b=>{const f=new je(a).drawExternalLabel({lines:b.lines,lineHeight:this.externalLabelLineH,anchor:b.anchor,elbow:b.elbow,labelX:b.labelX,labelY:b.labelY,side:b.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:b.connectorColor},style:this.externalLabelStyle,foreColor:b.foreColor});x&&(f.node.classList.add("apexcharts-element-hidden"),a.globals.delayedElements.push({el:f.node})),c.add(f)})}return c}placeExternalLabels(){const e=this.w,t=this.externalLabelMaxLines*this.externalLabelLineH+2,s=this.centerY+e.globals.radialSize+e.globals.pieExternalLabelMarginY;["left","right"].forEach(i=>{const a=this.externalLabels.filter(n=>n.side===i).sort((n,c)=>n.idealY-c.idealY);a.forEach(n=>{n.labelY=n.idealY});for(let n=1;n<a.length;n++)a[n].labelY-a[n-1].labelY<t&&(a[n].labelY=a[n-1].labelY+t);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<t&&(a[n].labelY=a[n+1].labelY-t)})}addListeners(e,t){const s=new F(this.w);e.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),e.node.addEventListener("mousedown",s.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}animatePaths(e,t){const s=this.w;let i=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,a=i,o=t.startAngle;const r=t.startAngle;t.prevStartAngle!==void 0&&t.prevEndAngle!==void 0&&(o=t.prevEndAngle,a=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===s.config.series.length-1&&(i+r>this.fullAngle?t.endAngle=t.endAngle-(i+r):i+r<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(i+r)))),i===this.fullAngle&&(i=this.fullAngle-.01),this.animateArc(e,o,r,i,a,t)}animateArc(e,t,s,i,a,o){const r=this,n=this.w,c=new Se(this.w),h=o.size;let l;(isNaN(t)||isNaN(a))&&(t=s,a=i,o.dur=0);let g=i,p=s;const u=t<s?this.fullAngle+t-s:t-s;n.globals.dataChanged&&o.shouldSetPrevPaths&&o.prevEndAngle&&(l=r.getPiePath({me:r,startAngle:o.prevStartAngle,angle:o.prevEndAngle<o.prevStartAngle?this.fullAngle+o.prevEndAngle-o.prevStartAngle:o.prevEndAngle-o.prevStartAngle,size:h}),e.attr({d:l})),o.dur!==0?e.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&&c.animationCompleted(e)}).during(x=>{g=u+(i-u)*x,o.animateStartingPos&&(g=a+(i-a)*x,p=t-a+(s-(t-a))*x),l=r.getPiePath({me:r,startAngle:p,angle:g,size:h}),e.node.setAttribute("data:pathOrig",l),e.attr({d:l})}):(l=r.getPiePath({me:r,startAngle:p,angle:i,size:h}),o.isTrack||(n.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",l),e.attr({d:l,"stroke-width":r.strokeWidth}))}pieClicked(e){const t=this.w,s=this,i=s.sliceSizes[e]+(t.config.plotOptions.pie.expandOnClick?4:0),a=t.dom.Paper.findOne(`.apexcharts-${s.chartType.toLowerCase()}-slice-${e}`);if(a.attr("data:pieClicked")==="true"){a.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner();const c=a.attr("data:pathOrig");return void a.attr({d:c})}{const c=t.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(c,h=>{h.setAttribute("data:pieClicked","false");const l=h.getAttribute("data:pathOrig");l&&h.setAttribute("d",l)}),t.interact.capturedDataPointIndex=e,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(e,t){let s="";return this.dynamicAnim&&this.w.globals.dataChanged&&(s=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),s}getPiePath({me:e,startAngle:t,angle:s,size:i}){let a;const o=new F(this.w),r=t,n=Math.PI*(r-90)/180;let c=s+t;Math.ceil(c)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);const h=Math.PI*(c-90)/180,l=e.centerX+i*Math.cos(n),g=e.centerY+i*Math.sin(n),p=e.centerX+i*Math.cos(h),u=e.centerY+i*Math.sin(h),x=M.polarToCartesian(e.centerX,e.centerY,e.donutSize,c),b=M.polarToCartesian(e.centerX,e.centerY,e.donutSize,r),f=s>180?1:0,m=["M",l,g,"A",i,i,0,f,1,p,u];return a=e.chartType==="donut"?[...m,"L",x.x,x.y,"A",e.donutSize,e.donutSize,0,f,0,b.x,b.y,"L",l,g,"z"].join(" "):e.chartType==="pie"||e.chartType==="polarArea"?[...m,"L",e.centerX,e.centerY,"L",l,g].join(" "):[...m].join(" "),o.roundPathCorners(a,2*this.strokeWidth)}drawPolarElements(e){const t=this.w,s=new Ct(this.w),i=new F(this.w),a=new je(this.w),o=i.group(),r=i.group(),n=s.niceScale(0,Math.ceil(this.maxY),0),c=n.result.reverse(),h=n.result.length;this.maxY=n.niceMax;let l=t.globals.radialSize;const g=l/(h-1);for(let p=0;p<h-1;p++){const u=i.drawCircle(l);
vendor: 9,919 bytes, line 1131
1131if(u.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){const x=a.drawYAxisTexts(this.centerX,this.centerY-l+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,p,c[p]);r.add(x)}o.add(u),l-=g}this.drawSpokes(e),e.add(o),e.add(r)}renderInnerDataLabels(e,t,s){const i=this.w,a=new F(this.w),o=t.total.show;e.node.innerHTML="",e.node.style.opacity=s.opacity;const r=s.centerX,n=this.donutDataLabels.total.label?s.centerY:s.centerY-s.centerY/6;let c,h;c=t.name.color===void 0?i.globals.colors[0]:t.name.color;let l=t.name.fontSize,g=t.name.fontFamily,p=t.name.fontWeight;h=t.value.color===void 0?i.config.chart.foreColor:t.value.color;const u=t.value.formatter;let x="",b="";if(o?(c=t.total.color,l=t.total.fontSize,g=t.total.fontFamily,p=t.total.fontWeight,b=this.donutDataLabels.total.label?t.total.label:"",x=t.total.formatter(i)):i.seriesData.series.length===1&&(x=u(i.seriesData.series[0],i),b=i.seriesData.seriesNames[0]),b&&(b=t.name.formatter(b,t.total.show,i)),t.name.show){const f=a.drawText({x:r,y:n+parseFloat(t.name.offsetY),text:b,textAnchor:"middle",foreColor:c,fontSize:l,fontWeight:p,fontFamily:g});f.node.classList.add("apexcharts-datalabel-label"),e.add(f)}if(t.value.show){const f=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,m=a.drawText({x:r,y:n+f,text:x,textAnchor:"middle",foreColor:h,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});m.node.classList.add("apexcharts-datalabel-value"),e.add(m)}return e}printInnerLabels(e,t,s,i){const a=this.w;let o;i?o=e.name.color===void 0?a.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:e.name.color:a.seriesData.series.length>1&&e.total.show&&(o=e.total.color);const r=a.dom.baseEl.querySelector(".apexcharts-datalabel-label"),n=a.dom.baseEl.querySelector(".apexcharts-datalabel-value");s=(0,e.value.formatter)(s,a),i||typeof e.total.formatter!="function"||(s=e.total.formatter(a));const c=t===e.total.label;t=this.donutDataLabels.total.label?e.name.formatter(t,c,a):"",r!==null&&(r.textContent=t),n!==null&&(n.textContent=s),r!==null&&(r.style.fill=o)}printDataLabelsInner(e,t){const s=this.w,i=e.getAttribute("data:value"),a=s.seriesData.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];s.seriesData.series.length>1&&this.printInnerLabels(t,a,i,e);const o=s.dom.baseEl.querySelector(".apexcharts-datalabels-group");o!==null&&(o.style.opacity="1")}drawSpokes(e){const t=this.w,s=new F(this.w),i=t.config.plotOptions.polarArea.spokes;if(i.strokeWidth===0)return;const a=[],o=360/t.seriesData.series.length;for(let r=0;r<t.seriesData.series.length;r++)a.push(M.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+o*r));a.forEach((r,n)=>{const c=s.drawLine(r.x,r.y,this.centerX,this.centerY,Array.isArray(i.connectorColors)?i.connectorColors[n]:i.connectorColors);e.add(c)})}revertDataLabelsInner(){const e=this.w;if(this.donutDataLabels.show){const t=e.dom.Paper.findOne(".apexcharts-datalabels-group"),s=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(s)}}}function Vt(d,e){let t=0;for(let a=0;a<d.length;a++)t+=d[a];const s=e/t,i=new Array(d.length);for(let a=0;a<d.length;a++)i[a]=d[a]*s;return i}function Ut(d,e,t,s){const i=s*s,a=t*t;return Math.max(i*e/a,a/(i*d))}function si(d,e,t,s,i,a){return d===0?!0:Ut(e,t,s,a)>=Ut(Math.min(e,i),Math.max(t,i),s+i,a)}function qt(d,e,t,s,i,a,o,r){if(o>=r){const n=s/r;let c=a;for(let h=0;h<t;h++){const l=e[h]/n;d.push([i,c,i+n,c+l]),c+=l}}else{const n=s/o;let c=i;for(let h=0;h<t;h++){const l=e[h]/n;d.push([c,a,c+l,a+n]),c+=l}}}function Zt(d,e,t,s,i){const a=[],o=d.length;if(o===0)return a;const r=new Array(o);let n=0,c=0,h=1/0,l=-1/0,g=0;for(;g<o;){const p=Math.min(s,i),u=d[g];if(si(n,h,l,c,u,p))r[n]=u,n++,c+=u,u<h&&(h=u),u>l&&(l=u),g++;else{if(qt(a,r,n,c,e,t,s,i),s>=i){const x=c/i;e+=x,s-=x}else{const x=c/s;t+=x,i-=x}n=0,c=0,h=1/0,l=-1/0}}return n>0&&qt(a,r,n,c,e,t,s,i),a}const ii={generate:function(d,e,t){const s=d.length,i=new Array(s);for(let r=0;r<s;r++){let n=0;const c=d[r];for(let h=0;h<c.length;h++)n+=c[h];i[r]=n}const a=Zt(Vt(i,e*t),0,0,e,t),o=new Array(s);for(let r=0;r<s;r++){const n=a[r],c=n[0],h=n[1],l=n[2]-c,g=n[3]-h;o[r]=Zt(Vt(d[r],l*g),c,h,l,g)}return o}};return ce.use({line:Be,area:Be,scatter:Be,bubble:Be,rangeArea:Be,bar:de,column:de,barStacked:class extends de{draw(d,e){const t=this.w;this.graphics=new F(this.w),this.bar=new de(this.w,this.ctx,this.xyRatios);const s=new J(this.w);d=s.getLogSeries(d),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(d),t.config.chart.stackType==="100%"&&(d=t.globals.comboCharts?e.map(r=>t.globals.seriesPercent[r]):t.globals.seriesPercent.slice()),this.series=d,this.barHelpers.initializeStackedPrevVars(this);const i=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let a=0,o=0;for(let r=0,n=0;r<d.length;r++,n++){const c=t.globals.comboCharts?e[r]:r,{groupIndex:h,columnGroupIndex:l}=this.barHelpers.getGroupIndex(c);this.groupCtx=this[t.labelData.seriesGroups[h]];const g=[],p=[];let u=0;this.yRatio.length>1&&(this.yaxisIndex=t.globals.seriesYAxisReverseMap[c][0],u=c),this.isReversed=t.config.yaxis[this.yaxisIndex]&&t.config.yaxis[this.yaxisIndex].reversed;let x=this.graphics.group({class:"apexcharts-series",seriesName:M.escapeString(t.seriesData.seriesNames[c]),rel:r+1,"data:realIndex":c});K.addCollapsedClassToSeries(this.w,x,c);const b=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":c}),f=this.graphics.group({class:"apexcharts-bar-goals-markers"}),m=this.initialPositions(a,o,void 0,void 0,void 0,void 0,u),{xDivision:w,yDivision:y,zeroH:v,zeroW:C}=m;let S=m.barHeight,L=m.barWidth;o=m.y,a=m.x,t.globals.barHeight=S,t.globals.barWidth=L,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(A=>isNaN(A))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>v),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let A=0;A<t.globals.dataPoints;A++){const D=this.barHelpers.getStrokeWidth(r,A,c),k={indexes:{i:r,j:A,realIndex:c,translationsIndex:u,bc:n},strokeWidth:D,x:a,y:o,elSeries:x,columnGroupIndex:l,seriesGroup:t.labelData.seriesGroups[h]};let P=null;this.isHorizontal?(P=this.drawStackedBarPaths(G($({},k),{zeroW:C,barHeight:S,yDivision:y})),L=this.series[r][A]/this.invertedYRatio):(P=this.drawStackedColumnPaths(G($({},k),{xDivision:w,barWidth:L,zeroH:v})),S=this.series[r][A]/this.yRatio[u]);const T=this.barHelpers.drawGoalLine({barXPosition:P.barXPosition,barYPosition:P.barYPosition,goalX:P.goalX,goalY:P.goalY,barHeight:S,barWidth:L});T&&f.add(T),o=P.y,a=P.x,g.push(a),p.push(o);const I=this.barHelpers.getPathFillColor(d,r,A,c);let E="";const X=t.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(this.barHelpers.arrBorderRadius[c][A]==="bottom"&&t.seriesData.series[c][A]>0||this.barHelpers.arrBorderRadius[c][A]==="top"&&t.seriesData.series[c][A]<0)&&(E=X),x=this.renderSeries(G($({realIndex:c,pathFill:I.color},I.useRangeColor?{lineFill:I.color}:{}),{j:A,i:r,columnGroupIndex:l,pathFrom:P.pathFrom,pathTo:P.pathTo,strokeWidth:D,elSeries:x,x:a,y:o,series:d,barHeight:S,barWidth:L,elDataLabelsWrap:b,elGoalsMarkers:f,type:"bar",visibleSeries:l,classes:E}))}t.globals.seriesXvalues[c]=g,t.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),i.add(x)}return i}initialPositions(d,e,t,s,i,a,o){const r=this.w;let n,c;if(this.isHorizontal){s=r.layout.gridHeight/r.globals.dataPoints;const l=r.config.plotOptions.bar.barHeight;n=String(l).indexOf("%")===-1?parseInt(l,10):s*parseInt(l,10)/100,a=r.globals.padHorizontal+(this.isReversed?r.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(s-n)/2}else{c=t=r.layout.gridWidth/r.globals.dataPoints;const l=r.config.plotOptions.bar.columnWidth;r.axisFlags.isXNumeric&&r.globals.dataPoints>1?c=(t=r.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(l).indexOf("%")===-1?c=parseInt(l,10):c*=parseInt(l,10)/100,i=this.isReversed?this.baseLineY[o]:r.layout.gridHeight-this.baseLineY[o],d=r.globals.padHorizontal+(t-c)/2}const h=r.globals.barGroups.length||1;return{x:d,y:e,yDivision:s,xDivision:t,barHeight:(n??0)/h,barWidth:(c??0)/h,zeroH:i,zeroW:a}}drawStackedBarPaths({indexes:d,barHeight:e,strokeWidth:t,zeroW:s,x:i,y:a,columnGroupIndex:o,seriesGroup:r,yDivision:n,elSeries:c}){var h,l,g,p,u;const x=this.w,b=a+o*e;let f;const m=d.i,w=d.j,y=d.realIndex,v=d.translationsIndex;let C=0;for(let A=0;A<this.groupCtx.prevXF.length;A++)C+=this.groupCtx.prevXF[A][w];let S=m;if(x.config.series[y].name&&(S=r.indexOf(x.config.series[y].name)),S>0){let A=s;this.groupCtx.prevXVal[S-1][w]<0?A=((h=this.series[m])==null?void 0:h[w])>=0?this.groupCtx.prevX[S-1][w]+C-2*(this.isReversed?C:0):this.groupCtx.prevX[S-1][w]:this.groupCtx.prevXVal[S-1][w]>=0&&(A=((l=this.series[m])==null?void 0:l[w])>=0?this.groupCtx.prevX[S-1][w]:this.groupCtx.prevX[S-1][w]-C+2*(this.isReversed?C:0)),f=A}else f=s;i=((g=this.series[m])==null?void 0:g[w])===null?f:f+((p=this.series[m])==null?void 0:p[w])/this.invertedYRatio-2*(this.isReversed?((u=this.series[m])==null?void 0:u[w])/this.invertedYRatio:0);const L=this.barHelpers.getBarpaths({barYPosition:b,barHeight:e,x1:f,x2:i,strokeWidth:t,isReversed:this.isReversed,series:this.series,realIndex:d.realIndex,seriesGroup:r,i:m,j:w,w:x});
1131return this.barHelpers.barBackground({j:w,i:m,y1:b,y2:e,elSeries:c}),a+=n,{pathTo:L.pathTo,pathFrom:L.pathFrom,goalX:this.barHelpers.getGoalValues("x",s,null,m,w,v),barXPosition:f,barYPosition:b,x:i,y:a}}drawStackedColumnPaths({indexes:d,x:e,y:t,xDivision:s,barWidth:i,zeroH:a,columnGroupIndex:o,seriesGroup:r,elSeries:n}){var c,h,l,g,p,u,x,b,f;const m=this.w,w=d.i,y=d.j,v=d.bc,C=d.realIndex,S=d.translationsIndex;if(m.axisFlags.isXNumeric){let T=m.seriesData.seriesX[C][y];T||(T=0),e=(T-m.globals.minX)/this.xRatio-i/2*m.globals.barGroups.length}const L=e+o*i;let A,D=0;for(let T=0;T<this.groupCtx.prevYF.length;T++)D+=isNaN(this.groupCtx.prevYF[T][y])?0:this.groupCtx.prevYF[T][y];let k=w;if(r&&(k=r.indexOf(m.seriesData.seriesNames[C])),k>0&&!m.axisFlags.isXNumeric||k>0&&m.axisFlags.isXNumeric&&m.seriesData.seriesX[C-1][y]===m.seriesData.seriesX[C][y]){let T,I;const E=Math.min(this.yRatio.length+1,C+1);if(this.groupCtx.prevY[k-1]!==void 0&&this.groupCtx.prevY[k-1].length){for(let X=1;X<E;X++)if(!isNaN((c=this.groupCtx.prevY[k-X])==null?void 0:c[y])){I=this.groupCtx.prevY[k-X][y];break}}for(let X=1;X<E;X++){if(((h=this.groupCtx.prevYVal[k-X])==null?void 0:h[y])<0){T=((l=this.series[w])==null?void 0:l[y])>=0?I-D+2*(this.isReversed?D:0):I;break}if(((g=this.groupCtx.prevYVal[k-X])==null?void 0:g[y])>=0){T=((p=this.series[w])==null?void 0:p[y])>=0?I:I+D-2*(this.isReversed?D:0);break}}T===void 0&&(T=m.layout.gridHeight),A=(u=this.groupCtx.prevYF[0])!=null&&u.every(X=>X===0)&&this.groupCtx.prevYF.slice(1,k).every(X=>X.every(z=>isNaN(z)))?a:T}else A=a;t=(x=this.series[w])!=null&&x[y]?A-((b=this.series[w])==null?void 0:b[y])/this.yRatio[S]+2*(this.isReversed?((f=this.series[w])==null?void 0:f[y])/this.yRatio[S]:0):A;const P=this.barHelpers.getColumnPaths({barXPosition:L,barWidth:i,y1:A,y2:t,yRatio:this.yRatio[S],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:r,realIndex:d.realIndex,i:w,j:y,w:m});return this.barHelpers.barBackground({bc:v,j:y,i:w,x1:L,x2:i,elSeries:n}),{pathTo:P.pathTo,pathFrom:P.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,a,w,y,0),barXPosition:L,x:m.axisFlags.isXNumeric?e:e+s,y:t}}},rangeBar:class extends de{draw(d,e){var t,s,i,a,o,r,n,c,h;const l=this.w,g=new F(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=d,this.seriesRangeStart=l.rangeData.seriesRangeStart,this.seriesRangeEnd=l.rangeData.seriesRangeEnd,this.barHelpers.initVariables(d);const p=g.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let u=0;u<d.length;u++){let x,b;const f=l.globals.comboCharts?e[u]:u,{columnGroupIndex:m}=this.barHelpers.getGroupIndex(f),w=g.group({class:"apexcharts-series",seriesName:M.escapeString(l.seriesData.seriesNames[f]),rel:u+1,"data:realIndex":f});K.addCollapsedClassToSeries(this.w,w,f),d[u].length>0&&(this.visibleI=this.visibleI+1);let y=0;this.yRatio.length>1&&(this.yaxisIndex=l.globals.seriesYAxisReverseMap[f][0],y=f);const v=this.barHelpers.initialPositions(f),{y:C,zeroW:S,x:L,zeroH:A}=v;let D=(t=v.barWidth)!=null?t:0,k=(s=v.barHeight)!=null?s:0;const P=(i=v.yDivision)!=null?i:0,T=(a=v.xDivision)!=null?a:0;b=C,x=L;const I=g.group({class:"apexcharts-datalabels","data:realIndex":f}),E=g.group({class:"apexcharts-rangebar-goals-markers"});for(let X=0;X<l.globals.dataPoints;X++){const z=this.barHelpers.getStrokeWidth(u,X,f),H=this.seriesRangeStart[u][X],Y=this.seriesRangeEnd[u][X];let N=null,W=null,R=null;const _={x,y:b,strokeWidth:z,elSeries:w};let V=this.seriesLen;if(l.config.plotOptions.bar.rangeBarGroupRows&&(V=1),((o=l.config.series[u].data)==null?void 0:o[X])===void 0)break;if(this.isHorizontal){R=b+k*this.visibleI;const oe=(P-k*V)/2;if((n=(r=l.config.series[u].data)==null?void 0:r[X])!=null&&n.x){const Z=this.detectOverlappingBars({i:u,j:X,barYPosition:R,srty:oe,barHeight:k,yDivision:P,initPositions:v});k=Z.barHeight,R=Z.barYPosition}N=this.drawRangeBarPaths($({indexes:{i:u,j:X,realIndex:f},barHeight:k,barYPosition:R,zeroW:S,yDivision:P,y1:H,y2:Y},_)),D=N.barWidth}else{l.axisFlags.isXNumeric&&(x=(l.seriesData.seriesX[u][X]-l.globals.minX)/this.xRatio-D/2),W=x+D*this.visibleI;const oe=(T-D*V)/2;
vendor: 21,723 bytes, line 1131
1131if((h=(c=l.config.series[u].data)==null?void 0:c[X])!=null&&h.x){const Z=this.detectOverlappingBars({i:u,j:X,barXPosition:W,srtx:oe,barWidth:D,xDivision:T,initPositions:v});D=Z.barWidth,W=Z.barXPosition}N=this.drawRangeColumnPaths($({indexes:{i:u,j:X,realIndex:f,translationsIndex:y},barWidth:D,barXPosition:W,zeroH:A,xDivision:T},_)),k=N.barHeight}const Q=this.barHelpers.drawGoalLine({barXPosition:N.barXPosition,barYPosition:R,goalX:N.goalX,goalY:N.goalY,barHeight:k,barWidth:D});Q&&E.add(Q),b=N.y,x=N.x;const q=this.barHelpers.getPathFillColor(d,u,X,f);this.renderSeries({realIndex:f,pathFill:q.color,lineFill:q.useRangeColor?q.color:l.globals.stroke.colors[f],j:X,i:u,x,y:b,y1:H,y2:Y,pathFrom:N.pathFrom,pathTo:N.pathTo,strokeWidth:z,elSeries:w,series:d,barHeight:k,barWidth:D,barXPosition:W,barYPosition:R,columnGroupIndex:m,elDataLabelsWrap:I,elGoalsMarkers:E,visibleSeries:this.visibleI,type:"rangebar"})}p.add(w)}return p}detectOverlappingBars({i:d,j:e,barYPosition:t,barXPosition:s,srty:i,srtx:a,barHeight:o,barWidth:r,yDivision:n,xDivision:c,initPositions:h}){var l,g,p,u;const x=this.w;let b=[];const f=(g=(l=x.config.series[d].data)==null?void 0:l[e])==null?void 0:g.rangeName,m=(u=(p=x.config.series[d].data)==null?void 0:p[e])==null?void 0:u.x,w=Array.isArray(m)?m.join(" "):m,y=x.labelData.labels.map(C=>Array.isArray(C)?C.join(" "):C).indexOf(w),v=x.rangeData.seriesRange[d].findIndex(C=>{var S;return C.x===w&&((S=C.overlaps)==null?void 0:S.size)>0});return this.isHorizontal?(t=x.config.plotOptions.bar.rangeBarGroupRows?i+n*y:i+o*this.visibleI+n*y,v>-1&&!x.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(x.rangeData.seriesRange[d][v].overlaps),b.indexOf(f)>-1&&(t=(o=h.barHeight/b.length)*this.visibleI+n*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+b.indexOf(f))+n*y))):(y>-1&&!x.labelData.timescaleLabels.length&&(s=x.config.plotOptions.bar.rangeBarGroupRows?a+c*y:a+r*this.visibleI+c*y),v>-1&&!x.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(x.rangeData.seriesRange[d][v].overlaps),b.indexOf(f)>-1&&(s=(r=h.barWidth/b.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+r*(this.visibleI+b.indexOf(f))+c*y))),{barYPosition:t,barXPosition:s,barHeight:o,barWidth:r}}drawRangeColumnPaths({indexes:d,x:e,xDivision:t,barWidth:s,barXPosition:i,zeroH:a}){var o,r;const n=this.w,{i:c,j:h,realIndex:l,translationsIndex:g}=d,p=this.yRatio[g],u=this.getRangeValue(l,h);let x=Math.min(u.start,u.end),b=Math.max(u.start,u.end);((o=this.series[c])==null?void 0:o[h])===void 0||((r=this.series[c])==null?void 0:r[h])===null?x=a:(x=a-x/p,b=a-b/p);const f=Math.abs(b-x),m=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:s,y1:x,y2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l,i:l,j:h,w:n});if(n.axisFlags.isXNumeric){const w=this.getBarXForNumericXAxis({x:e,j:h,realIndex:l,barWidth:s});e=w.x,i=w.barXPosition}else e+=t;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:f,x:e,y:u.start<0&&u.end<0?x:b,goalY:this.barHelpers.getGoalValues("y",null,a,c,h,g),barXPosition:i}}preventBarOverflow(d){const e=this.w;return d<0&&(d=0),d>e.layout.gridWidth&&(d=e.layout.gridWidth),d}drawRangeBarPaths({indexes:d,y:e,y1:t,y2:s,yDivision:i,barHeight:a,barYPosition:o,zeroW:r}){const n=this.w,{realIndex:c,j:h}=d,l=this.preventBarOverflow(r+t/this.invertedYRatio),g=this.preventBarOverflow(r+s/this.invertedYRatio),p=this.getRangeValue(c,h),u=Math.abs(g-l),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:a,x1:l,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:h,w:n});return n.axisFlags.isXNumeric||(e+=i),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:u,x:p.start<0&&p.end<0?l:g,goalX:this.barHelpers.getGoalValues("x",r,null,c,h,0),y:e}}getRangeValue(d,e){const t=this.w;return{start:t.rangeData.seriesRangeStart[d][e],end:t.rangeData.seriesRangeEnd[d][e]}}},candlestick:$t,boxPlot:$t,violin:class extends de{draw(d,e,t){const s=this.w,i=new F(this.w),a=new le(this.w);this.violinOptions=s.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=s.config.plotOptions.bar.distributed,this.isHorizontal=s.config.plotOptions.bar.horizontal,this.coreUtils=new J(this.w),d=this.coreUtils.getLogSeries(d),this.series=d,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(d);const o=i.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let r=0;r<d.length;r++){let n,c;const h=[],l=[],g=s.globals.comboCharts?t[r]:r,{columnGroupIndex:p}=this.barHelpers.getGroupIndex(g),u=i.group({class:"apexcharts-series",seriesName:M.escapeString(s.seriesData.seriesNames[g]),rel:r+1,"data:realIndex":g});K.addCollapsedClassToSeries(this.w,u,g),d[r].length>0&&(this.visibleI=this.visibleI+1);let x=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[g][0],x=g);const b=this.barHelpers.initialPositions(g),{y:f,barHeight:m,yDivision:w,zeroW:y,x:v,barWidth:C,xDivision:S,zeroH:L}=b;c=f,n=v,l.push(n+(C??0)/2);const A=i.group({class:"apexcharts-datalabels","data:realIndex":g});this.seriesMaxWeight=0,this.normalize==="group"&&(s.violinData.seriesViolinDensity[g]||[]).forEach(k=>{k&&k.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=k.maxWeight)});const D=[];for(let k=0;k<s.globals.dataPoints;k++){const P=this.barHelpers.getStrokeWidth(r,k,g),T=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:r,j:k,realIndex:g,translationsIndex:x},y:c,yDivision:w,barHeight:m,zeroW:y}):this.drawVerticalViolin({indexes:{i:r,j:k,realIndex:g,translationsIndex:x},x:n,xDivision:S,barWidth:C,zeroH:L});n=T.x,c=T.y,k>0&&l.push(T.center),h.push(T.alongRepresentative);const I=this.buildPointsSubPath({realIndex:g,j:k,center:T.center,halfExtent:T.halfExtent,alongFn:T.alongFn,density:T.density,maxWeight:T.maxWeight});I.length&&D.push({groups:I,j:k});const E=a.fillPath({seriesNumber:this.distributed?k:g,dataPointIndex:k,color:this.distributed?s.globals.colors[k]:void 0,value:d[r][k]});this.renderSeries({realIndex:g,pathFill:E,lineFill:s.globals.stroke.colors[g],j:k,i:r,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:P,elSeries:u,x:n,y:c,series:d,columnGroupIndex:p,barHeight:m,barWidth:C,elDataLabelsWrap:A,visibleSeries:this.visibleI,type:"violin"});const X=u.node.querySelector(`path.apexcharts-violin-area[j='${k}']`);X&&isFinite(T.alongRepresentative)&&X.setAttribute(this.isHorizontal?"cx":"cy",`${T.alongRepresentative}`)}Ot({graphics:i,w:s,elSeries:u,pointsByCat:D,options:this.pointsOptions,distributed:this.distributed,realIndex:g,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),s.globals.seriesXvalues[g]=l,s.globals.seriesYvalues[g]=h,o.add(u)}return o}drawVerticalViolin({indexes:d,x:e,xDivision:t,barWidth:s,zeroH:i}){var a;const o=this.w,{realIndex:r,j:n,translationsIndex:c}=d,h=this.yRatio[c];o.axisFlags.isXNumeric&&(e=(o.seriesData.seriesX[r][n]-o.globals.minX)/this.xRatio-s/2);const l=e+s*this.visibleI+s/2,g=s/2,p=this.getDensity(r,n),u=this.effectiveMaxWeight(p),x=m=>i-this.logVal(m,r)/h,b=this.buildBodyPath({nodes:p.nodes,center:l,halfExtent:g,maxWeight:u,vertical:!0,alongFn:x,collapsed:!1});let f;return f=o.globals.previousPaths.length>0?this.getPreviousPath(r,n,b):this.buildBodyPath({nodes:p.nodes,center:l,halfExtent:g,maxWeight:u,vertical:!0,alongFn:x,collapsed:!0}),o.axisFlags.isXNumeric||(e+=t),{pathTo:b,pathFrom:f,x:e,y:i,center:l,halfExtent:g,alongFn:x,density:p,maxWeight:u,alongRepresentative:x((a=this.series[d.i][n])!=null?a:0)}}drawHorizontalViolin({indexes:d,y:e,yDivision:t,barHeight:s,zeroW:i}){var a;const o=this.w,{realIndex:r,j:n}=d,c=this.invertedYRatio;o.axisFlags.isXNumeric&&(e=(o.seriesData.seriesX[r][n]-o.globals.minX)/this.invertedXRatio-s/2);const h=e+s*this.visibleI+s/2,l=s/2,g=this.getDensity(r,n),p=this.effectiveMaxWeight(g),u=f=>i+this.logVal(f,r)/c,x=this.buildBodyPath({nodes:g.nodes,center:h,halfExtent:l,maxWeight:p,vertical:!1,alongFn:u,collapsed:!1});let b;return b=o.globals.previousPaths.length>0?this.getPreviousPath(r,n,x):this.buildBodyPath({nodes:g.nodes,center:h,halfExtent:l,maxWeight:p,vertical:!1,alongFn:u,collapsed:!0}),o.axisFlags.isXNumeric||(e+=t),{pathTo:x,pathFrom:b,x:i,y:e,center:h,halfExtent:l,alongFn:u,maxWeight:p,density:g,alongRepresentative:u((a=this.series[d.i][n])!=null?a:0)}}getDensity(d,e){var t;const s=(t=this.w.violinData.seriesViolinDensity[d])==null?void 0:t[e];if(!s||!s.values.length)return{nodes:[],maxWeight:0};const i=s.values.map((r,n)=>n);i.sort((r,n)=>s.values[r]-s.values[n]);const a=[];let o=null;for(const r of i){const n=s.values[r];o!==null&&n===o||(a.push({v:n,w:s.weights[r]}),o=n)}return{nodes:a,maxWeight:s.maxWeight}}effectiveMaxWeight(d){return this.normalize==="group"&&this.seriesMaxWeight>0?this.seriesMaxWeight:d.maxWeight}buildBodyPath({nodes:d,center:e,halfExtent:t,maxWeight:s,vertical:i,alongFn:a,collapsed:o}){const r=new F(this.w);if(d.length===0){const l=a(0);return i?r.move(e,l)+r.line(e,l):r.move(l,e)+r.line(l,e)}const n=l=>{if(o||s<=0)return 0;const g=l/s*t*this.bandwidthScale;return Math.min(t,Math.max(0,g))},c=[],h=[];for(let l=0;l<d.length;l++){const g=a(d[l].v),p=n(d[l].w);i?(c.push([e+p,g]),h.push([e-p,g])):(c.push([g,e+p]),h.push([g,e-p]))}return h.reverse(),this.smoothSegment(c,i,!1)+this.smoothSegment(h,i,!0)+"z"}smoothSegment(d,e,t){const s=new F(this.w),i=d[0];let a=t?s.line(i[0],i[1]):s.move(i[0],i[1]);if(d.length<3||!this.strictlyMonotonic(d,e)){for(let c=1;c<d.length;c++)a+=s.line(d[c][0],d[c][1]);return a}const o=d.map(([c,h])=>e?[h,c]:[c,h]),r=dt.points(o),n=e?r.map(ei):r;return a+=Gt(n),a}strictlyMonotonic(d,e){const t=e?1:0;for(let s=1;s<d.length;s++)if(d[s][t]===d[s-1][t])return!1;return!0}buildPointsSubPath({realIndex:d,j:e,center:t,halfExtent:s,alongFn:i,density:a,maxWeight:o}){var r;return Wt({w:this.w,points:(r=this.w.violinData.seriesViolinPoints[d])==null?void 0:r[e],seedA:d,seedB:e,center:t,halfExtent:s,alongFn:i,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:n=>this.halfWidthAtValue(n,a,s,o)})}halfWidthAtValue(d,e,t,s){const{nodes:i}=e,a=s??e.maxWeight;if(!i.length||a<=0)return 0;const o=r=>Math.min(t,r/a*t*this.bandwidthScale);if(d<=i[0].v)return o(i[0].w);if(d>=i[i.length-1].v)return o(i[i.length-1].w);for(let r=1;r<i.length;r++)if(d<=i[r].v){const n=i[r-1],c=i[r],h=c.v===n.v?0:(d-n.v)/(c.v-n.v);return o(n.w+(c.w-n.w)*h)}return 0}logVal(d,e){return this.coreUtils.getLogValAtSeriesIndex(d,e)}},pie:Ve,donut:Ve,polarArea:Ve,radialBar:class extends Ve{constructor(d,e){super(d,e),this.ctx=e,this.w=d,this.animBeginArr=[0],this.animDur=0,this.startAngle=d.config.plotOptions.radialBar.startAngle,this.endAngle=d.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(d.config.plotOptions.radialBar.endAngle-d.config.plotOptions.radialBar.startAngle),this.trackStartAngle=d.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=d.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(d.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(d){var e;const t=this.w,s=new F(this.w),i=s.group({class:"apexcharts-radialbar"});if(t.globals.noData)return i;const a=s.group(),o=this.defaultSize/2,r=t.layout.gridWidth/2;let n=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(n=n-t.config.stroke.width-t.config.chart.dropShadow.blur);const c=t.globals.fill.colors,h=t.config.plotOptions.radialBar,l=Array.isArray(h.bands)&&h.bands.length>0,g=l&&h.bandsStyle&&h.bandsStyle.hideTrackWhenPresent,p=h.shape==="needle";if(h.track.show&&!g){const f=this.drawTracks({size:n,centerX:r,centerY:o,colorArr:c,series:d});a.add(f)}if(l){const f=this.drawBands({size:n,centerX:r,centerY:o,series:d});a.add(f)}const u=this.drawArcs({size:n,centerX:r,centerY:o,colorArr:c,series:d,skipValueArc:p&&!((e=h.needle)!=null&&e.showValueArc)});if(h.ticks&&h.ticks.show){const f=this.drawTicks({size:n,centerX:r,centerY:o,series:d});if(this.initialAnim&&!t.globals.dataChanged&&!t.globals.resized&&O.isBrowser()&&t.globals.shouldAnimate){const m=f.node;m.style.opacity="0",m.style.transition="opacity 280ms ease-out";const w=t.config.chart.animations.speed||800;setTimeout(()=>{m.style.opacity="1"},w)}a.add(f)}if(p){const f=this.drawNeedle({size:n,centerX:r,centerY:o,series:d});a.add(f)}let x=360;t.config.plotOptions.radialBar.startAngle<0&&(x=this.totalAngle);const b=(360-x)/360;if(t.globals.radialSize=n-n*b,this.radialDataLabels.value.show){const f=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=f*b}return a.add(u.g),t.config.plotOptions.radialBar.hollow.position==="front"&&(u.g.add(u.elHollow),u.dataLabels&&u.g.add(u.dataLabels)),i.add(a),i}drawTracks(d){const e=this.w,t=new F(this.w),s=t.group({class:"apexcharts-tracks"}),i=new te(this.w),a=new le(this.w),o=this.getStrokeWidth(d);d.size=d.size-o/2;for(let r=0;r<d.series.length;r++){const n=t.group({class:"apexcharts-radialbar-track apexcharts-track"});s.add(n),n.attr({rel:r+1}),d.size=d.size-o-this.margin;const c=e.config.plotOptions.radialBar.track,h=a.fillPath({seriesNumber:0,size:d.size,fillColors:Array.isArray(c.background)?c.background[r]:c.background,solid:!0}),l=this.trackStartAngle;let g=this.trackEndAngle;Math.abs(g)+Math.abs(l)>=360&&(g=360-Math.abs(this.startAngle)-.1);const p=t.drawPath({d:"",stroke:h,strokeWidth:o*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){const u=c.dropShadow;i.dropShadow(p,u)}n.add(p),p.attr("id","apexcharts-radialbarTrack-"+r),this.animatePaths(p,{centerX:d.centerX,centerY:d.centerY,endAngle:g,startAngle:l,size:d.size,i:r,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return s}drawArcs(d){var e;const t=this.w,s=new F(this.w),i=new le(this.w),a=new te(this.w),o=s.group(),r=this.getStrokeWidth(d);d.size=d.size-r/2;let n=t.config.plotOptions.radialBar.hollow.background;const c=d.size-r*d.series.length-this.margin*d.series.length-r*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=c-t.config.plotOptions.radialBar.hollow.margin;t.config.plotOptions.radialBar.hollow.image!==void 0&&(n=this.drawHollowImage(d,o,c,n));const l=this.drawHollow({size:h,centerX:d.centerX,centerY:d.centerY,fill:n||"transparent"});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){const b=t.config.plotOptions.radialBar.hollow.dropShadow;a.dropShadow(l,b)}let g=1;!this.radialDataLabels.total.show&&t.seriesData.series.length>1&&(g=0);let p=null;if(this.radialDataLabels.show){const b=t.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(b,this.radialDataLabels,{hollowSize:c,centerX:d.centerX,centerY:d.centerY,opacity:g})}t.config.plotOptions.radialBar.hollow.position==="back"&&(o.add(l),p&&o.add(p));let u=!1;t.config.plotOptions.radialBar.inverseOrder&&(u=!0);const x=((e=this.ctx.morphTypeChange)==null?void 0:e.isActive())===!0;for(let b=u?d.series.length-1:0;u?b>=0:b<d.series.length;u?b--:b++){const f=s.group({class:"apexcharts-series apexcharts-radial-series",seriesName:M.escapeString(t.seriesData.seriesNames[b])});o.add(f),f.attr({rel:b+1,"data:realIndex":b}),K.addCollapsedClassToSeries(this.w,f,b),d.size=d.size-r-this.margin;const m=i.fillPath({seriesNumber:b,size:d.size,value:d.series[b]}),w=this.startAngle;let y;const v=t.config.plotOptions.radialBar,C=typeof v.min=="number"?v.min:0,S=typeof v.max=="number"?v.max:100,L=S===C?1:S-C,A=R=>{const _=Math.min(Math.max(R,C),S);return Math.max(0,(_-C)/L)},D=A(M.negToZero(d.series[b]));let k,P=Math.round(this.totalAngle*D)+this.startAngle;t.globals.dataChanged&&(y=this.startAngle,k=Math.round(this.totalAngle*A(M.negToZero(t.globals.previousPaths[b])))+y),Math.abs(P)+Math.abs(w)>360&&(P-=.01),Math.abs(k)+Math.abs(y)>360&&(k-=.01);const T=P-w,I=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[b]:t.config.stroke.dashArray,E=x?this.ctx.morphTypeChange.getInitialPathFor(b,0):null,X=x?this.ctx.morphTypeChange.getFromType():null,z=!!E&&(X==="bar"||X==="funnel"||X==="pyramid"||X==="pie"||X==="donut"||X==="polarArea"),H=s.drawPath({d:E||"",stroke:z||d.skipValueArc?"transparent":m,strokeWidth:z||d.skipValueArc?0:r,fill:z?m:"none",fillOpacity:t.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+b,strokeDashArray:I}),Y=w+T/2,N=M.polarToCartesian(d.centerX,d.centerY,d.size,Y);if(F.setAttrs(H.node,{"data:angle":T,"data:value":d.series[b],"data:cx":N.x,"data:cy":N.y}),t.config.chart.dropShadow.enabled){const R=t.config.chart.dropShadow;a.dropShadow(H,R,b)}if(a.setSelectionFilter(H,0,b),this.addListeners(H,this.radialDataLabels),f.add(H),H.attr({index:0,j:b}),this.barLabels.enabled){const R=M.polarToCartesian(d.centerX,d.centerY,d.size,w),_=this.barLabels.formatter(t.seriesData.seriesNames[b],{seriesIndex:b,w:t}),V=["apexcharts-radialbar-label"];this.barLabels.onClick||V.push("apexcharts-no-click");let Q=this.barLabels.useSeriesColors?t.globals.colors[b]:t.config.chart.foreColor;Q||(Q=t.config.chart.foreColor);const q=R.x+this.barLabels.offsetX,oe=R.y+this.barLabels.offsetY,Z=s.drawText({x:q,y:oe,text:_,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:Q,cssClass:V.join(" ")});Z.on("click",this.onBarLabelClick),Z.attr({rel:b+1}),w!==0&&Z.attr({"transform-origin":`${q} ${oe}`,transform:`rotate(${w} 0 0)`}),f.add(Z)}let W=0;if(!this.initialAnim||t.globals.resized||t.globals.dataChanged||(W=t.config.chart.animations.speed),t.globals.dataChanged&&(W=t.config.chart.animations.dynamicAnimation.speed),this.animDur=W/(1.2*d.series.length)+this.animDur,this.animBeginArr.push(this.animDur),x&&E){const R=this.ctx.morphTypeChange.getSpeed(),_=this.getPiePath({me:this,startAngle:w,angle:T,size:d.size});if(z){const V=this.ctx.morphTypeChange.buildRingSegmentPath(d.centerX,d.centerY,d.size,r,w,w+T);H.animate(R).plot(V,"polygons").after(function(){this.attr({d:_,fill:"none",stroke:d.skipValueArc?"transparent":m,"stroke-width":d.skipValueArc?0:r})})}else H.animate(R).plot(_,"polygons").attr({"stroke-width":r})}else this.animatePaths(H,{centerX:d.centerX,centerY:d.centerY,endAngle:P,startAngle:w,prevEndAngle:k,prevStartAngle:y,size:d.size,i:b,totalItems:2,animBeginArr:this.animBeginArr,dur:W,shouldSetPrevPaths:!0})}return{g:o,elHollow:l,dataLabels:p}}_angleAtValue(d){const e=this.w.config.plotOptions.radialBar,t=typeof e.min=="number"?e.min:0,s=typeof e.max=="number"?e.max:100,i=s===t?t+1:s,a=(Math.max(t,Math.min(i,Number(d)))-t)/(i-t);return this.startAngle+a*(this.endAngle-this.startAngle)}_describeArc(d,e,t,s,i){const a=M.polarToCartesian(d,e,t,i),o=M.polarToCartesian(d,e,t,s),r=i-s,n=Math.abs(r)>180?1:0;return`M ${a.x} ${a.y} A ${t} ${t} 0 ${n} 0 ${o.x} ${o.y}`}drawBands(d){const e=this.w,t=new F(this.w),s=e.config.plotOptions.radialBar,i=s.bands||[],a=t.group({class:"apexcharts-gauge-bands"}),o=this.getStrokeWidth(d),r=d.size-o/2-o-this.margin,n=o*parseInt(s.bandsStyle.strokeWidth,10)/100,c=typeof s.min=="number"?s.min:0,h=typeof s.max=="number"?s.max:100,l=h===c?0:(s.bandsStyle.gap||0)*((this.endAngle-this.startAngle)/(h-c));for(let g=0;g<i.length;g++){const p=i[g];if(p.from===void 0||p.to===void 0)continue;const u=this._angleAtValue(p.from),x=this._angleAtValue(p.to),b=Math.min(u,x)+l/2,f=Math.max(u,x)-l/2;if(f-b<=0)continue;const m=t.drawPath({d:this._describeArc(d.centerX,d.centerY,r,b,f),stroke:p.color||"#ccc",strokeWidth:n,fill:"none",strokeLinecap:s.bandsStyle.linecap||"butt",classes:"apexcharts-gauge-band"});m.node.setAttribute("data-band-index",String(g)),a.add(m)}return a}drawTicks(d){var e,t,s,i;const a=this.w,o=new F(this.w),r=a.config.plotOptions.radialBar,n=r.ticks,c=o.group({class:"apexcharts-gauge-ticks"}),h=this.getStrokeWidth(d),l=d.size-h/2-h-this.margin,g=typeof r.min=="number"?r.min:0,p=typeof r.max=="number"?r.max:100,u=Math.max(2,(t=(e=n.major)==null?void 0:e.count)!=null?t:11),x=Math.max(0,(i=(s=n.minor)==null?void 0:s.count)!=null?i:0),b=(f,m,w)=>{var y,v,C;const S=this._angleAtValue(f),L=(y=m.length)!=null?y:8,A=m.placement==="inside"?l-L:l,D=m.placement==="inside"?l:l+L,k=M.polarToCartesian(d.centerX,d.centerY,A,S),P=M.polarToCartesian(d.centerX,d.centerY,D,S),T=o.drawLine(k.x,k.y,P.x,P.y,m.color||(w?"#666":"#999"),0,m.width||(w?2:1));if(c.add(T),w&&((v=n.labels)==null?void 0:v.show)){const I=(m.placement==="inside"?A:D)+(m.placement==="inside"?-1:1)*((C=n.labels.offset)!=null?C:6),E=M.polarToCartesian(d.centerX,d.centerY,I,S),X=typeof n.labels.formatter=="function"?n.labels.formatter(f):String(f),z=o.drawText({x:E.x,y:E.y,text:X,textAnchor:"middle",dominantBaseline:"middle",fontFamily:n.labels.fontFamily,fontSize:n.labels.fontSize,fontWeight:n.labels.fontWeight,foreColor:n.labels.color,cssClass:"apexcharts-gauge-tick-label"});c.add(z)}};for(let f=0;f<u;f++)if(b(g+f/(u-1)*(p-g),n.major||{},!0),f<u-1&&x>0)for(let m=1;m<=x;m++)b(g+(f+m/(x+1))/(u-1)*(p-g),n.minor||{},!1);return c}drawNeedle(d){var e,t,s,i,a;const o=this.w,r=new F(this.w),n=o.config.plotOptions.radialBar.needle||{},c=r.group({class:"apexcharts-gauge-needle"});if(!d.series||d.series.length===0)return c;const h=this.getStrokeWidth(d),l=d.size-h/2-h-this.margin,g=typeof n.length=="str
1131ing"&&n.length.endsWith("%")?l*parseInt(n.length,10)/100:Number(n.length||.85*l),p=(e=n.baseWidth)!=null?e:4,u=(t=n.tipWidth)!=null?t:1,x=n.color||"#333",b=d.centerX,f=Number((s=n.offsetY)!=null?s:0),m=d.centerY+f,w=`M ${b+p/2} ${m} A ${p/2} ${p/2} 0 0 1 ${b-p/2} ${m} L ${b-u/2} ${m-g} L ${b+u/2} ${m-g} Z`,y=r.drawPath({d:w,stroke:x,strokeWidth:0,fill:x,classes:"apexcharts-gauge-needle-shape"});c.add(y);const v=Number(d.series[0]),C=this._angleAtValue(v),S=this.initialAnim&&!o.globals.dataChanged&&!o.globals.resized,L=this.ctx,A=typeof L._lastNeedleAngle=="number"?L._lastNeedleAngle:this.startAngle;if(L._lastNeedleAngle=C,O.isBrowser()&&o.globals.shouldAnimate&&(S||o.globals.dataChanged)&&A!==C){const D=c.node;D.setAttribute("transform-origin",`${b} ${m}`),D.setAttribute("transform",`rotate(${A})`);const k=((i=n.animation)==null?void 0:i.duration)&&Number(n.animation.duration)||n.animationSpeed&&Number(n.animationSpeed)||((a=o.config.chart.animations.dynamicAnimation)==null?void 0:a.speed)||o.config.chart.animations.speed||800,P=1.70158,T=P+1,I=S?z=>1+T*Math.pow(z-1,3)+P*Math.pow(z-1,2):z=>1-Math.pow(1-z,3),E=performance.now(),X=z=>{const H=Math.max(0,Math.min(1,(z-E)/k)),Y=A+(C-A)*I(H);D.setAttribute("transform",`rotate(${Y})`),H<1&&B.requestAnimationFrame(X)};B.requestAnimationFrame(X)}else c.attr({"transform-origin":`${b} ${m}`,transform:`rotate(${C})`});return c}drawHollow(d){var e;const t=new F(this.w),s=this.w.config.plotOptions.radialBar.hollow,i=t.drawCircle(2*d.size),a={class:"apexcharts-radialbar-hollow",cx:d.centerX,cy:d.centerY,r:d.size,fill:d.fill};return(s.stroke||s.strokeDasharray)&&(a.stroke=s.stroke||"transparent",a["stroke-width"]=(e=s.strokeWidth)!=null?e:1,s.strokeDasharray&&(a["stroke-dasharray"]=s.strokeDasharray)),i.attr(a),i}drawHollowImage(d,e,t,s){const i=this.w,a=new le(this.w),o=M.randomId(),r=i.config.plotOptions.radialBar.hollow.image;if(i.config.plotOptions.radialBar.hollow.imageClipped)a.clippedImgArea({width:t,height:t,image:r,patternID:`pattern${i.globals.cuid}${o}`}),s=`url(#pattern${i.globals.cuid}${o})`;else{const n=i.config.plotOptions.radialBar.hollow.imageWidth,c=i.config.plotOptions.radialBar.hollow.imageHeight;if(n===void 0&&c===void 0){const h=i.dom.Paper.image(r,function(l){this.move(d.centerX-l.width/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,d.centerY-l.height/2+i.config.plotOptions.radialBar.hollow.imageOffsetY)});e.add(h)}else{const h=i.dom.Paper.image(r,function(){this.move(d.centerX-n/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,d.centerY-c/2+i.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(n,c)});e.add(h)}}return s}getStrokeWidth(d){const e=this.w;return d.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(d.series.length+1)-this.margin}onBarLabelClick(d){var e;const t=d.target,s=parseInt((e=t.getAttribute("rel"))!=null?e:"",10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.seriesData.seriesNames[s],{w:a,seriesIndex:s})}},radar:class{constructor(d,e){this.ctx=e,this.w=d,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 F(this.w),this.lineColorArr=d.globals.stroke.colors!==void 0?d.globals.stroke.colors:d.globals.colors,this.defaultSize=d.globals.svgHeight<d.globals.svgWidth?d.layout.gridHeight:d.layout.gridWidth,this.isLog=d.config.yaxis[0].logarithmic,this.logBase=d.config.yaxis[0].logBase,this.coreUtils=new J(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,d.globals.maxY,0):d.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):d.globals.minY,this.polygons=d.config.plotOptions.radar.polygons,this.strokeWidth=d.config.stroke.show?d.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-d.config.chart.dropShadow.blur,d.config.xaxis.labels.show&&(this.size=this.size-d.layout.xAxisLabelsWidth/1.75),d.config.plotOptions.radar.size!==void 0&&(this.size=d.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(d){const e=this.w,t=new le(this.w),s=[],i=new Ae(this.w,this.ctx);d.length&&(this.dataPointsLen=d[e.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;const a=e.layout.gridWidth/2,o=e.layout.gridHeight/2,r=a+e.config.plotOptions.radar.offsetX,n=o+e.config.plotOptions.radar.offsetY,c=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:`translate(${r||0}, ${n||0})`});let h=[],l=null,g=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),d.forEach((p,u)=>{const x=p.length===e.globals.dataPoints,b=this.graphics.group().attr({class:"apexcharts-series","data:longestSeries":x,seriesName:M.escapeString(e.seriesData.seriesNames[u]),rel:u+1,"data:realIndex":u});this.dataRadiusOfPercent[u]=[],this.dataRadius[u]=[],this.angleArr[u]=[],p.forEach((y,v)=>{const C=Math.abs(this.maxValue-this.minValue);y-=this.minValue,this.isLog&&(y=this.coreUtils.getLogVal(this.logBase,y,0)),this.dataRadiusOfPercent[u][v]=y/C,this.dataRadius[u][v]=this.dataRadiusOfPercent[u][v]*this.size,this.angleArr[u][v]=v*this.disAngle}),h=this.getDataPointsPos(this.dataRadius[u],this.angleArr[u]);const f=this.createPaths(h,{x:0,y:0});l=this.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),g=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":u}),e.globals.delayedElements.push({el:l.node,index:u});const m={i:u,realIndex:u,animationDelay:u,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[u],strokeLineCap:e.config.stroke.lineCap};let w=null;e.globals.previousPaths.length>0&&(w=this.getPreviousPath(u));for(let y=0;y<f.linePathsTo.length;y++){const v=this.graphics.renderPaths(G($({},m),{pathFrom:w===null?f.linePathsFrom[y]:w,pathTo:f.linePathsTo[y],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[u]:this.strokeWidth,fill:"none",drawShadow:!1}));b.add(v);const C=t.fillPath({seriesNumber:u}),S=this.graphics.renderPaths(G($({},m),{pathFrom:w===null?f.areaPathsFrom[y]:w,pathTo:f.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 L=new te(this.w),A=e.config.chart.dropShadow;L.dropShadow(S,Object.assign({},A,{noUserSpaceOnUse:!0}),u)}b.add(S)}
vendor: 5,589 bytes, line 1131
1131p.forEach((y,v)=>{const C=new ke(this.w,this.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:u,dataPointIndex:v}),S=this.graphics.drawMarker(h[v].x,h[v].y,C);S.attr("rel",v),S.attr("j",v),S.attr("index",u),S.node.setAttribute("default-marker-size",C.pSize);const L=this.graphics.group({class:"apexcharts-series-markers"});L&&L.add(S),l.add(L),b.add(l);const A=e.config.dataLabels;if(A.enabled){const D=A.formatter(e.seriesData.series[u][v],{seriesIndex:u,dataPointIndex:v,w:e});i.plotDataLabelsText({x:h[v].x,y:h[v].y,text:D,textAnchor:"middle",i:u,j:u,parent:g,offsetCorrection:!1,dataLabelsConfig:$({},A)})}b.add(g)}),s.push(b)}),this.drawPolygons({parent:c}),e.config.xaxis.labels.show){const p=this.drawXAxisTexts();c.add(p)}return s.forEach(p=>{c.add(p)}),c.add(this.yaxisLabels),c}drawPolygons(d){const e=this.w,{parent:t}=d,s=new je(this.w),i=e.globals.yAxisScale[0].result.reverse(),a=i.length,o=[],r=this.size/(a-1);for(let h=0;h<a;h++)o[h]=r*h;o.reverse();const n=[],c=[];o.forEach((h,l)=>{const g=M.getPolygonPos(h,this.dataPointsLen);let p="";g.forEach((u,x)=>{if(l===0){const b=this.graphics.drawLine(u.x,u.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[x]:this.polygons.connectorColors);c.push(b)}x===0&&this.yaxisLabelsTextsPos.push({x:u.x,y:u.y}),p+=u.x+","+u.y+" "}),n.push(p)}),n.forEach((h,l)=>{const g=this.polygons.strokeColors,p=this.polygons.strokeWidth,u=this.graphics.drawPolygon(h,Array.isArray(g)?g[l]:g,Array.isArray(p)?p[l]:p,e.globals.radarPolygons.fill.colors[l]);t.add(u)}),c.forEach(h=>{t.add(h)}),e.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((h,l)=>{const g=s.drawYAxisTexts(h.x,h.y,l,i[l]);this.yaxisLabels.add(g)})}drawXAxisTexts(){const d=this.w,e=d.config.xaxis.labels,t=this.graphics.group({class:"apexcharts-xaxis"}),s=M.getPolygonPos(this.size,this.dataPointsLen);return d.labelData.labels.forEach((i,a)=>{const o=d.config.xaxis.labels.formatter,r=new Ae(this.w,this.ctx);if(s[a]){const n=this.getTextPos(s[a],this.size),c=o(i,{seriesIndex:-1,dataPointIndex:a,w:d});r.plotDataLabelsText({x:n.newX,y:n.newY,text:c,textAnchor:n.textAnchor,i:a,j:a,parent:t,className:"apexcharts-xaxis-label",color:Array.isArray(e.style.colors)&&e.style.colors[a]?e.style.colors[a]:"#a8a8a8",dataLabelsConfig:$({textAnchor:n.textAnchor,dropShadow:{enabled:!1}},e),offsetCorrection:!1}).on("click",h=>{if(typeof d.config.chart.events.xAxisLabelClick=="function"){const l=Object.assign({},d,{labelIndex:a});d.config.chart.events.xAxisLabelClick(h,this.ctx,l)}})}}),t}createPaths(d,e){const t=[];let s=[];const i=[];let a=[];if(d.length){s=[this.graphics.move(e.x,e.y)],a=[this.graphics.move(e.x,e.y)];let o=this.graphics.move(d[0].x,d[0].y),r=this.graphics.move(d[0].x,d[0].y);d.forEach((n,c)=>{o+=this.graphics.line(n.x,n.y),r+=this.graphics.line(n.x,n.y),c===d.length-1&&(o+="Z",r+="Z")}),t.push(o),i.push(r)}return{linePathsFrom:s,linePathsTo:t,areaPathsFrom:a,areaPathsTo:i}}getTextPos(d,e){let t="middle",s=d.x,i=d.y;return Math.abs(d.x)>=10?d.x>0?(t="start",s+=10):d.x<0&&(t="end",s-=10):t="middle",Math.abs(d.y)>=e-10&&(d.y<0?i-=10:d.y>0&&(i+=10)),{textAnchor:t,newX:s,newY:i}}getPreviousPath(d){const e=this.w;let t=null;for(let s=0;s<e.globals.previousPaths.length;s++){const i=e.globals.previousPaths[s];i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(d),10)&&e.globals.previousPaths[s].paths[0]!==void 0&&(t=e.globals.previousPaths[s].paths[0].d)}return t}getDataPointsPos(d,e,t=this.dataPointsLen){d=d||[],e=e||[];const s=[];for(let i=0;i<t;i++){const a={};a.x=d[i]*Math.sin(e[i]),a.y=-d[i]*Math.cos(e[i]),s.push(a)}return s}},heatmap:class{constructor(d,e,t){this.ctx=e,this.w=d,this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new jt(d,e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(d){const e=this.w,t=new F(this.w,this.ctx),s=t.group({class:"apexcharts-heatmap"});s.attr("clip-path",`url(#gridRectMask${e.globals.cuid})`);const i=e.layout.gridWidth/e.globals.dataPoints,a=e.layout.gridHeight/e.seriesData.series.length;let o=0,r=!1;this.negRange=this.helpers.checkColorRange();const n=d.slice();e.config.yaxis[0].reversed&&(r=!0,n.reverse());for(let h=r?0:n.length-1;r?h<n.length:h>=0;r?h++:h--){const l=t.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:M.escapeString(e.seriesData.seriesNames[h]),rel:h+1,"data:realIndex":h});if(K.addCollapsedClassToSeries(this.w,l,h),t.setupEventDelegation(l,".apexcharts-heatmap-rect"),e.config.chart.dropShadow.enabled){const x=e.config.chart.dropShadow;new te(this.w).dropShadow(l,x,h)}let g=0;const p=e.config.plotOptions.heatmap.shadeIntensity;let u=0;for(let x=0;x<e.globals.dataPoints;x++){if(e.seriesData.seriesX.length&&!e.globals.allSeriesHasEqualX&&e.globals.minX+e.globals.minXDiff*x<e.seriesData.seriesX[h][u]){g+=i;continue}if(u>=n[h].length)break;const b=this.helpers.getShadeColor(e.config.chart.type,h,u,this.negRange);let f=b.color;const m=b.colorProps;e.config.fill.type==="image"&&(f=new le(this.w).fillPath({seriesNumber:h,dataPointIndex:u,opacity:e.globals.hasNegs?m.percent<0?1-(1+m.percent/100):p+m.percent/100:m.percent/100,patternID:M.randomId(),width:e.config.fill.image.width?e.config.fill.image.width:i,height:e.config.fill.image.height?e.config.fill.image.height:a}));const w=this.rectRadius,y=t.drawRect(g,o,i,a,w);if(y.attr({cx:g,cy:o}),y.node.classList.add("apexcharts-heatmap-rect"),l.add(y),y.attr({fill:f,i:h,index:h,j:u,val:
1131d[h][u],"stroke-width":this.strokeWidth,stroke:e.config.plotOptions.heatmap.useFillColorAsStroke?f:e.globals.stroke.colors[0],color:f}),e.config.chart.animations.enabled&&!e.globals.dataChanged){let S=1;e.globals.resized||(S=e.config.chart.animations.speed),this.animateHeatMap(y,g,o,i,a,S,h,u)}if(e.globals.dataChanged){let S=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){S=this.dynamicAnim.speed;let L=e.globals.previousPaths[h]&&e.globals.previousPaths[h][u]&&e.globals.previousPaths[h][u].color;L||(L="rgba(255, 255, 255, 0)"),this.animateHeatColor(y,M.isColorHex(L)?L:M.rgb2hex(L),M.isColorHex(f)?f:M.rgb2hex(f),S)}}const v=(0,e.config.dataLabels.formatter)(e.seriesData.series[h][u],{value:e.seriesData.series[h][u],seriesIndex:h,dataPointIndex:u,w:e}),C=this.helpers.calculateDataLabels({text:v,x:g+i/2,y:o+a/2,i:h,j:u,colorProps:m,series:n});C!==null&&l.add(C),g+=i,u++}o+=a,s.add(l)}const c=e.globals.yAxisScale[0].result.slice();return e.config.yaxis[0].reversed?c.unshift(""):c.push(""),e.globals.yAxisScale[0].result=c,s}animateHeatMap(d,e,t,s,i,a,o=0,r=0){const n=this.w,c=new Se(this.w),h=n.config.chart.animations.animateGradually;let l=0;if(h&&h.enabled!==!1){const g=((n.seriesData.series||[]).length||1)+(n.globals.dataPoints||1)-2;l=et({style:"diagonal",index:r,row:o,col:r,baseDelay:Math.min(h.delay||0,.5*a/Math.max(1,g))})}c.animateRect(d,{x:e+s/2,y:t+i/2,width:0,height:0},{x:e,y:t,width:s,height:i},a,()=>{c.animationCompleted(d)},l)}animateHeatColor(d,e,t,s){d.attr({fill:e}).animate(s).attr({fill:t})}},treemap:class{constructor(d,e){this.ctx=e,this.w=d,this.strokeWidth=this.w.config.stroke.width,this.helpers=new jt(d,e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}draw(d){const e=this.w,t=new F(this.w,this.ctx),s=new le(this.w),i=t.group({class:"apexcharts-treemap"});if(e.globals.noData)return i;const a=[];return d.forEach(o=>{const r=o.map(n=>Math.abs(n));a.push(r)}),this.negRange=this.helpers.checkColorRange(),e.config.series.forEach((o,r)=>{o.data.forEach(n=>{Array.isArray(this.labels[r])||(this.labels[r]=[]),this.labels[r].push(n.x)})}),ii.generate(a,e.layout.gridWidth,e.layout.gridHeight).forEach((o,r)=>{var n;const c=t.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:M.escapeString(e.seriesData.seriesNames[r]),rel:r+1,"data:realIndex":r});if(t.setupEventDelegation(c,".apexcharts-treemap-rect"),e.config.chart.dropShadow.enabled){const f=e.config.chart.dropShadow;new te(this.w).dropShadow(i,f,r)}const h=t.group({class:"apexcharts-data-labels"}),l={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},g=e.config.chart.animations,p=g.animateGradually,u=p&&p.enabled!==!1,x=new Array(o.length).fill(0);if(u){const f=o.length||1,m=Math.min(p.delay||0,.5*g.speed/f);o.map((w,y)=>({j:y,area:(w[2]-w[0])*(w[3]-w[1])})).sort((w,y)=>y.area-w.area).forEach((w,y)=>{x[w.j]=y*m})}o.forEach((f,m)=>{const w=f[0],y=f[1],v=f[2],C=f[3];l.xMin=Math.min(l.xMin,w),l.yMin=Math.min(l.yMin,y),l.xMax=Math.max(l.xMax,v),l.yMax=Math.max(l.yMax,C);const S=this.helpers.getShadeColor(e.config.chart.type,r,m,this.negRange),L=S.color,A=s.fillPath({color:L,seriesNumber:r,dataPointIndex:m}),D=t.drawRect(w,y,v-w,C-y,e.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,e.config.plotOptions.treemap.useFillColorAsStroke?L:e.globals.stroke.colors[r]);D.attr({cx:w,cy:y,index:r,i:r,j:m,width:v-w,height:C-y,fill:A}),D.node.classList.add("apexcharts-treemap-rect");let k={x:w+(v-w)/2,y:y+(C-y)/2,width:0,height:0};const P={x:w,y,width:v-w,height:C-y};if(e.config.chart.animations.enabled&&!e.globals.dataChanged){let X=1;e.globals.resized||(X=e.config.chart.animations.speed),this.animateTreemap(D,k,P,X,x[m]||0)}if(e.globals.dataChanged){let X=1;this.dynamicAnim.enabled&&e.globals.shouldAnimate&&(X=this.dynamicAnim.speed,e.globals.previousPaths[r]&&e.globals.previousPaths[r][m]&&e.globals.previousPaths[r][m].rect&&(k=e.globals.previousPaths[r][m].rect),this.animateTreemap(D,k,P,X))}let T=this.getFontSize(f),I=e.config.dataLabels.formatter(this.labels[r][m],{value:e.seriesData.series[r][m],seriesIndex:r,dataPointIndex:m,w:e});e.config.plotOptions.treemap.dataLabels.format==="truncate"&&(T=parseInt(String(e.config.dataLabels.style.fontSize),10),I=this.truncateLabels(String(I),T,w,y,v,C));let E=null;e.seriesData.series[r][m]&&(E=this.helpers.calculateDataLabels({text:I,x:(w+v)/2,y:(y+C)/2+this.strokeWidth/2+T/3,i:r,j:m,colorProps:S,fontSize:T,series:d})),e.config.dataLabels.enabled&&E&&this.rotateToFitLabel(E,T,I,w,y,v,C),c.add(D),E!==null&&c.add(E)});const b=e.config.plotOptions.treemap.seriesTitle;if(e.config.series.length>1&&b&&b.show){const f=e.config.series[r].name||"";if(f&&l.xMin<1/0&&l.yMin<1/0){const{offsetX:m,offsetY:w,borderColor:y,borderWidth:v,borderRadius:C,style:S}=b,L=S.color||e.config.chart.foreColor,A={left:S.padding.left,right:S.padding.right,top:S.padding.top,bottom:S.padding.bottom},D=t.getTextRects(f,S.fontSize,S.fontFamily),k=D.width+A.left+A.right,P=D.height+A.top+A.bottom,T=l.xMin+(m||0),I=l.yMin+(w||0),E=t.drawRect(T,I,k,P,C,S.background,1,v,y),X=t.drawText({x:T+A.left,y:I+A.top+.75*((n=D?.height)!=null?n:0),text:f,fontSize:S.fontSize,fontFamily:S.fontFamily,fontWeight:S.fontWeight,foreColor:L,cssClass:S.cssClass||""});c.add(E),c.add(X)}}c.add(h),i.add(c)}),i}getFontSize(d){const e=this.w,t=(function s(i){let a,o=0;if(Array.isArray(i[0]))for(a=0;a<i.length;a++)o+=s(i[a]);else for(a=0;a<i.length;a++)o+=i[a].length;return o}
1131)(this.labels)/(function s(i){let a,o=0;if(Array.isArray(i[0]))for(a=0;a<i.length;a++)o+=s(i[a]);else for(a=0;a<i.length;a++)o+=1;return o})(this.labels);return(function(s,i){const a=s*i,o=Math.pow(a,.5);return Math.min(o/t,parseInt(e.config.dataLabels.style.fontSize,10))})(d[2]-d[0],d[3]-d[1])}rotateToFitLabel(d,e,t,s,i,a,o){const r=new F(this.w),n=r.getTextRects(t,String(e));if(n.width+this.w.config.stroke.width+5>a-s&&n.width<=o-i){const c=r.rotateAroundCenter(d.node);d.node.setAttribute("transform",`rotate(-90 ${c.x} ${c.y}) translate(${n.height/3})`)}}truncateLabels(d,e,t,s,i,a){const o=new F(this.w),r=o.getTextRects(d,String(e)).width+this.w.config.stroke.width+5>i-t&&a-s>i-t?a-s:i-t,n=o.getTextBasedOnMaxWidth({text:d,maxWidth:r,fontSize:e});return d.length!==n.length&&r/e<5?"":n}animateTreemap(d,e,t,s,i=0){const a=new Se(this.w);a.animateRect(d,e,t,s,()=>{a.animationCompleted(d)},i)}}}),ce});

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.