generated from boboko/starter
1505 lines
938 KiB
JavaScript
1505 lines
938 KiB
JavaScript
var Zo=(u,t)=>()=>{try{return t||u((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var qo=Zo((Ve,ve)=>{var Td=200,Do="__lodash_hash_undefined__",Pd=800,Rd=16,Eo=9007199254740991,To="[object Arguments]",Fd="[object Array]",Id="[object AsyncFunction]",Nd="[object Boolean]",Xd="[object Date]",Od="[object Error]",Po="[object Function]",Bd="[object GeneratorFunction]",Yd="[object Map]",zd="[object Number]",Wd="[object Null]",Ro="[object Object]",Hd="[object Proxy]",$d="[object RegExp]",Gd="[object Set]",Vd="[object String]",Ud="[object Undefined]",qd="[object WeakMap]",jd="[object ArrayBuffer]",Zd="[object DataView]",Kd="[object Float32Array]",Jd="[object Float64Array]",Qd="[object Int8Array]",tu="[object Int16Array]",eu="[object Int32Array]",su="[object Uint8Array]",iu="[object Uint8ClampedArray]",au="[object Uint16Array]",nu="[object Uint32Array]",ru=/[\\^$.*+?()[\]{}|]/g,ou=/^\[object .+?Constructor\]$/,lu=/^(?:0|[1-9]\d*)$/,nt={};nt[Kd]=nt[Jd]=nt[Qd]=nt[tu]=nt[eu]=nt[su]=nt[iu]=nt[au]=nt[nu]=!0;nt[To]=nt[Fd]=nt[jd]=nt[Nd]=nt[Zd]=nt[Xd]=nt[Od]=nt[Po]=nt[Yd]=nt[zd]=nt[Ro]=nt[$d]=nt[Gd]=nt[Vd]=nt[qd]=!1;var Fo=typeof global=="object"&&global&&global.Object===Object&&global,cu=typeof self=="object"&&self&&self.Object===Object&&self,je=Fo||cu||Function("return this")(),Io=typeof Ve=="object"&&Ve&&!Ve.nodeType&&Ve,Ue=Io&&typeof ve=="object"&&ve&&!ve.nodeType&&ve,No=Ue&&Ue.exports===Io,Za=No&&Fo.process,wo=(function(){try{var u=Ue&&Ue.require&&Ue.require("util").types;return u||Za&&Za.binding&&Za.binding("util")}catch{}})(),vo=wo&&wo.isTypedArray;function hu(u,t,e){switch(e.length){case 0:return u.call(t);case 1:return u.call(t,e[0]);case 2:return u.call(t,e[0],e[1]);case 3:return u.call(t,e[0],e[1],e[2])}return u.apply(t,e)}function du(u,t){for(var e=-1,s=Array(u);++e<u;)s[e]=t(e);return s}function uu(u){return function(t){return u(t)}}function fu(u,t){return u?.[t]}function gu(u,t){return function(e){return u(t(e))}}var pu=Array.prototype,mu=Function.prototype,Fs=Object.prototype,Ka=je["__core-js_shared__"],Is=mu.toString,Rt=Fs.hasOwnProperty,_o=(function(){var u=/[^.]+$/.exec(Ka&&Ka.keys&&Ka.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""})(),Xo=Fs.toString,xu=Is.call(Object),bu=RegExp("^"+Is.call(Rt).replace(ru,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ps=No?je.Buffer:void 0,Ao=je.Symbol,So=je.Uint8Array,Co=Ps?Ps.allocUnsafe:void 0,Oo=gu(Object.getPrototypeOf,Object),ko=Object.create,yu=Fs.propertyIsEnumerable,wu=pu.splice,ne=Ao?Ao.toStringTag:void 0,Rs=(function(){try{var u=an(Object,"defineProperty");return u({},"",{}),u}catch{}})(),vu=Ps?Ps.isBuffer:void 0,Mo=Math.max,_u=Date.now,Bo=an(je,"Map"),qe=an(Object,"create"),Au=(function(){function u(){}return function(t){if(!oe(t))return{};if(ko)return ko(t);u.prototype=t;var e=new u;return u.prototype=void 0,e}})();function re(u){var t=-1,e=u==null?0:u.length;for(this.clear();++t<e;){var s=u[t];this.set(s[0],s[1])}}function Su(){this.__data__=qe?qe(null):{},this.size=0}function Cu(u){var t=this.has(u)&&delete this.__data__[u];return this.size-=t?1:0,t}function ku(u){var t=this.__data__;if(qe){var e=t[u];return e===Do?void 0:e}return Rt.call(t,u)?t[u]:void 0}function Mu(u){var t=this.__data__;return qe?t[u]!==void 0:Rt.call(t,u)}function Lu(u,t){var e=this.__data__;return this.size+=this.has(u)?0:1,e[u]=qe&&t===void 0?Do:t,this}re.prototype.clear=Su;re.prototype.delete=Cu;re.prototype.get=ku;re.prototype.has=Mu;re.prototype.set=Lu;function Ft(u){var t=-1,e=u==null?0:u.length;for(this.clear();++t<e;){var s=u[t];this.set(s[0],s[1])}}function Du(){this.__data__=[],this.size=0}function Eu(u){var t=this.__data__,e=Ns(t,u);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():wu.call(t,e,1),--this.size,!0}function Tu(u){var t=this.__data__,e=Ns(t,u);return e<0?void 0:t[e][1]}function Pu(u){return Ns(this.__data__,u)>-1}function Ru(u,t){var e=this.__data__,s=Ns(e,u);return s<0?(++this.size,e.push([u,t])):e[s][1]=t,this}Ft.prototype.clear=Du;Ft.prototype.delete=Eu;Ft.prototype.get=Tu;Ft.prototype.has=Pu;Ft.prototype.set=Ru;function _e(u){var t=-1,e=u==null?0:u.length;for(this.clear();++t<e;){var s=u[t];this.set(s[0],s[1])}}function Fu(){this.size=0,this.__data__={hash:new re,map:new(Bo||Ft),string:new re}}function Iu(u){var t=Os(this,u).delete(u);return this.size-=t?1:0,t}function Nu(u){return Os(this,u).get(u)}function Xu(u){return Os(this,u).has(u)}function Ou(u,t){var e=Os(this,u),s=e.size;return e.set(u,t),this.size+=e.size==s?0:1,this}_e.prototype.clear=Fu;_e.prototype.delete=Iu;_e.prototype.get=Nu;_e.prototype.has=Xu;_e.prototype.set=Ou;function Ae(u){var t=this.__data__=new Ft(u);this.size=t.size}function Bu(){this.__data__=new Ft,this.size=0}function Yu(u){var t=this.__data__,e=t.delete(u);return this.size=t.size,e}function zu(u){return this.__data__.get(u)}function Wu(u){return this.__data__.has(u)}function Hu(u,t){var e=this.__data__;if(e instanceof Ft){var s=e.__data__;if(!Bo||s.length<Td-1)return s.push([u,t]),this.size=++e.size,this;e=this.__data__=new _e(s)}return e.set(u,t),this.size=e.size,this}Ae.prototype.clear=Bu;Ae.prototype.delete=Yu;Ae.prototype.get=zu;Ae.prototype.has=Wu;Ae.prototype.set=Hu;function $u(u,t){var e=en(u),s=!e&&tn(u),i=!e&&!s&&Ho(u),a=!e&&!s&&!i&&Go(u),n=e||s||i||a,r=n?du(u.length,String):[],o=r.length;for(var l in u)(t||Rt.call(u,l))&&!(n&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||zo(l,o)))&&r.push(l);return r}function Ja(u,t,e){(e!==void 0&&!Bs(u[t],e)||e===void 0&&!(t in u))&&sn(u,t,e)}function Gu(u,t,e){var s=u[t];(!(Rt.call(u,t)&&Bs(s,e))||e===void 0&&!(t in u))&&sn(u,t,e)}function Ns(u,t){for(var e=u.length;e--;)if(Bs(u[e][0],t))return e;return-1}function sn(u,t,e){t=="__proto__"&&Rs?Rs(u,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):u[t]=e}var Vu=rf();function Xs(u){return u==null?u===void 0?Ud:Wd:ne&&ne in Object(u)?of(u):ff(u)}function Lo(u){return Ze(u)&&Xs(u)==To}function Uu(u){if(!oe(u)||df(u))return!1;var t=rn(u)?bu:ou;return t.test(xf(u))}function qu(u){return Ze(u)&&$o(u.length)&&!!nt[Xs(u)]}function ju(u){if(!oe(u))return uf(u);var t=Wo(u),e=[];for(var s in u)s=="constructor"&&(t||!Rt.call(u,s))||e.push(s);return e}function Yo(u,t,e,s,i){u!==t&&Vu(t,function(a,n){if(i||(i=new Ae),oe(a))Zu(u,t,n,e,Yo,s,i);else{var r=s?s(Qa(u,n),a,n+"",u,t,i):void 0;r===void 0&&(r=a),Ja(u,n,r)}},Vo)}function Zu(u,t,e,s,i,a,n){var r=Qa(u,e),o=Qa(t,e),l=n.get(o);if(l){Ja(u,e,l);return}var c=a?a(r,o,e+"",u,t,n):void 0,h=c===void 0;if(h){var d=en(o),f=!d&&Ho(o),g=!d&&!f&&Go(o);c=o,d||f||g?en(r)?c=r:bf(r)?c=sf(r):f?(h=!1,c=Qu(o,!0)):g?(h=!1,c=ef(o,!0)):c=[]:yf(o)||tn(o)?(c=r,tn(r)?c=wf(r):(!oe(r)||rn(r))&&(c=lf(o))):h=!1}h&&(n.set(o,c),i(c,o,s,a,n),n.delete(o)),Ja(u,e,c)}function Ku(u,t){return pf(gf(u,t,Uo),u+"")}var Ju=Rs?function(u,t){return Rs(u,"toString",{configurable:!0,enumerable:!1,value:_f(t),writable:!0})}:Uo;function Qu(u,t){if(t)return u.slice();var e=u.length,s=Co?Co(e):new u.constructor(e);return u.copy(s),s}function tf(u){var t=new u.constructor(u.byteLength);return new So(t).set(new So(u)),t}function ef(u,t){var e=t?tf(u.buffer):u.buffer;return new u.constructor(e,u.byteOffset,u.length)}function sf(u,t){var e=-1,s=u.length;for(t||(t=Array(s));++e<s;)t[e]=u[e];return t}function af(u,t,e,s){var i=!e;e||(e={});for(var a=-1,n=t.length;++a<n;){var r=t[a],o=s?s(e[r],u[r],r,e,u):void 0;o===void 0&&(o=u[r]),i?sn(e,r,o):Gu(e,r,o)}return e}function nf(u){return Ku(function(t,e){var s=-1,i=e.length,a=i>1?e[i-1]:void 0,n=i>2?e[2]:void 0;for(a=u.length>3&&typeof a=="function"?(i--,a):void 0,n&&cf(e[0],e[1],n)&&(a=i<3?void 0:a,i=1),t=Object(t);++s<i;){var r=e[s];r&&u(t,r,s,a)}return t})}function rf(u){return function(t,e,s){for(var i=-1,a=Object(t),n=s(t),r=n.length;r--;){var o=n[u?r:++i];if(e(a[o],o,a)===!1)break}return t}}function Os(u,t){var e=u.__data__;return hf(t)?e[typeof t=="string"?"string":"hash"]:e.map}function an(u,t){var e=fu(u,t);return Uu(e)?e:void 0}function of(u){var t=Rt.call(u,ne),e=u[ne];try{u[ne]=void 0;var s=!0}catch{}var i=Xo.call(u);return s&&(t?u[ne]=e:delete u[ne]),i}function lf(u){return typeof u.constructor=="function"&&!Wo(u)?Au(Oo(u)):{}}function zo(u,t){var e=typeof u;return t=t??Eo,!!t&&(e=="number"||e!="symbol"&&lu.test(u))&&u>-1&&u%1==0&&u<t}function cf(u,t,e){if(!oe(e))return!1;var s=typeof t;return(s=="number"?nn(e)&&zo(t,e.length):s=="string"&&t in e)?Bs(e[t],u):!1}function hf(u){var t=typeof u;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?u!=="__proto__":u===null}function df(u){return!!_o&&_o in u}function Wo(u){var t=u&&u.constructor,e=typeof t=="function"&&t.prototype||Fs;return u===e}function uf(u){var t=[];if(u!=null)for(var e in Object(u))t.push(e);return t}function ff(u){return Xo.call(u)}function gf(u,t,e){return t=Mo(t===void 0?u.length-1:t,0),function(){for(var s=arguments,i=-1,a=Mo(s.length-t,0),n=Array(a);++i<a;)n[i]=s[t+i];i=-1;for(var r=Array(t+1);++i<t;)r[i]=s[i];return r[t]=e(n),hu(u,this,r)}}function Qa(u,t){if(!(t==="constructor"&&typeof u[t]=="function")&&t!="__proto__")return u[t]}var pf=mf(Ju);function mf(u){var t=0,e=0;return function(){var s=_u(),i=Rd-(s-e);if(e=s,i>0){if(++t>=Pd)return arguments[0]}else t=0;return u.apply(void 0,arguments)}}function xf(u){if(u!=null){try{return Is.call(u)}catch{}try{return u+""}catch{}}return""}function Bs(u,t){return u===t||u!==u&&t!==t}var tn=Lo((function(){return arguments})())?Lo:function(u){return Ze(u)&&Rt.call(u,"callee")&&!yu.call(u,"callee")},en=Array.isArray;function nn(u){return u!=null&&$o(u.length)&&!rn(u)}function bf(u){return Ze(u)&&nn(u)}var Ho=vu||Af;function rn(u){if(!oe(u))return!1;var t=Xs(u);return t==Po||t==Bd||t==Id||t==Hd}function $o(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=Eo}function oe(u){var t=typeof u;return u!=null&&(t=="object"||t=="function")}function Ze(u){return u!=null&&typeof u=="object"}function yf(u){if(!Ze(u)||Xs(u)!=Ro)return!1;var t=Oo(u);if(t===null)return!0;var e=Rt.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&Is.call(e)==xu}var Go=vo?uu(vo):qu;function wf(u){return af(u,Vo(u))}function Vo(u){return nn(u)?$u(u,!0):ju(u)}var vf=nf(function(u,t,e){Yo(u,t,e)});function _f(u){return function(){return u}}function Uo(u){return u}function Af(){return!1}ve.exports=vf});var Ko=Object.defineProperty,Jo=Object.defineProperties,Qo=Object.getOwnPropertyDescriptors,rs=Object.getOwnPropertySymbols,wr=Object.prototype.hasOwnProperty,vr=Object.prototype.propertyIsEnumerable,oi=(u,t,e)=>t in u?Ko(u,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[t]=e,G=(u,t)=>{for(var e in t||(t={}))wr.call(t,e)&&oi(u,e,t[e]);if(rs)for(var e of rs(t))vr.call(t,e)&&oi(u,e,t[e]);return u},j=(u,t)=>Jo(u,Qo(t)),tl=(u,t)=>{var e={};for(var s in u)wr.call(u,s)&&t.indexOf(s)<0&&(e[s]=u[s]);if(u!=null&&rs)for(var s of rs(u))t.indexOf(s)<0&&vr.call(u,s)&&(e[s]=u[s]);return e},J=(u,t,e)=>oi(u,typeof t!="symbol"?t+"":t,e),_r=(u,t,e)=>new Promise((s,i)=>{var a=o=>{try{r(e.next(o))}catch(l){i(l)}},n=o=>{try{r(e.throw(o))}catch(l){i(l)}},r=o=>o.done?s(o.value):Promise.resolve(o.value).then(a,n);r((e=e.apply(u,t)).next())});var H=class{static isSSR(){return typeof window>"u"||typeof document>"u"}static isBrowser(){return!this.isSSR()}static hasAPI(t){return this.isSSR()?!1:typeof window[t]<"u"}static getApex(){return typeof window<"u"&&window.Apex?window.Apex:typeof global<"u"&&global.Apex?global.Apex:{}}},os=class u{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new li,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(t,e){this.attributes.set(t,e)}getAttribute(t){return this.attributes.get(t)}removeAttribute(t){this.attributes.delete(t)}hasAttribute(t){return this.attributes.has(t)}appendChild(t){if(t&&t!==this){if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){let e=this.children.indexOf(t);e!==-1&&this.children.splice(e,1)}t.parentNode=this,this.children.push(t)}return t}removeChild(t){let e=this.children.indexOf(t);return e!==-1&&(this.children.splice(e,1),t.parentNode=null),t}insertBefore(t,e){if(!e)return this.appendChild(t);if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){let i=this.children.indexOf(t);i!==-1&&this.children.splice(i,1)}let s=this.children.indexOf(e);return s!==-1&&(t.parentNode=this,this.children.splice(s,0,t)),t}cloneNode(t=!1){let e=new u(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((s,i)=>{e.attributes.set(i,s)}),Object.assign(e.style,this.style),t&&this.children.forEach(s=>{s.cloneNode&&e.appendChild(s.cloneNode(!0))}),e}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let t=this;for(;t.parentNode;)t=t.parentNode;return t}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let t="";if(this.attributes.forEach((s,i)=>{t+=` ${i}="${s}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${t}/>`;let e=this.children.map(s=>s.toString()).join("");return`<${this.nodeName}${t}>${this.textContent}${e}</${this.nodeName}>`}get innerHTML(){return this.children.map(t=>t.toString()).join("")}set innerHTML(t){this.children=[],this.textContent=t}get outerHTML(){return this.toString()}get isConnected(){return!0}},li=class{constructor(){this.classes=new Set}add(...t){t.forEach(e=>this.classes.add(e))}remove(...t){t.forEach(e=>this.classes.delete(e))}contains(t){return this.classes.has(t)}toggle(t,e){return e===!0?(this.classes.add(t),!0):e===!1?(this.classes.delete(t),!1):this.classes.has(t)?(this.classes.delete(t),!1):(this.classes.add(t),!0)}toString(){return Array.from(this.classes).join(" ")}},ci=class{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new os(e,t)}createTextNode(t){let e={nodeName:"#text",nodeType:3,textContent:t,toString(){return e.textContent}};return e}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(t){return t&&t.getBoundingClientRect?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString(t){return t.toString?t.toString():""}}}createDOMParser(){return{parseFromString(t,e){let s=new os("root");return s.innerHTML=t,{documentElement:s}}}}},gt=null,Gt=null,Vt=null,O=class{static init(){H.isSSR()&&!gt&&(gt=new ci)}static createElement(t){return H.isSSR()?(gt||this.init(),gt.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return H.isSSR()?(gt||this.init(),gt.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return H.isSSR()?(gt||this.init(),gt.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return H.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return H.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return H.isSSR()?{}:window.getComputedStyle(t)}static matchMedia(t){if(H.isSSR()||typeof window.matchMedia!="function")return null;try{return window.matchMedia(t)}catch{return null}}static getBoundingClientRect(t){return H.isSSR()?(gt||this.init(),gt.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return H.isSSR()?(gt||this.init(),Gt||(Gt=gt.createXMLSerializer()),Gt):(Gt||(Gt=new XMLSerializer),Gt)}static getDOMParser(){return H.isSSR()?(gt||this.init(),Vt||(Vt=gt.createDOMParser()),Vt):(Vt||(Vt=new DOMParser),Vt)}static addWindowEventListener(t,e,s){H.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){H.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return H.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){H.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return t?H.isSSR()?t._ssrMode===!0||t.nodeName!==void 0:t.getRootNode?t.getRootNode({composed:!0})===document||t.isConnected:!1:!1}static getWindow(){return H.isBrowser()?window:null}static getDocument(){return H.isBrowser()?document:null}static _getShim(){return gt}static _resetShim(){gt=null,Gt=null,Vt=null}},on=new WeakMap,el=0,T=class Xt{static isObject(t){return t&&typeof t=="object"&&!Array.isArray(t)}static is(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}static isSafari(){return H.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){if(!this.isObject(t)&&this.isObject(e))return this.clone(e);let s=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(i=>{this.isObject(e[i])?i in t?s[i]=this.extend(t[i],e[i]):Object.assign(s,{[i]:e[i]}):Object.assign(s,{[i]:e[i]})}),s}static extendArray(t,e){let s=[];return t.map(i=>{s.push(Xt.extend(e,i))}),t=s,t}static monthMod(t){return t%12}static clone(t,e=new WeakMap,s=!1){if(t===null||typeof t!="object")return t;if(e.has(t))return e.get(t);let i;if(Array.isArray(t))if(s)i=t.slice();else{i=[],e.set(t,i);for(let a=0;a<t.length;a++)i[a]=this.clone(t[a],e,!1)}else if(t instanceof Date)i=new Date(t.getTime());else if(s)i=Object.assign({},t);else{i={},e.set(t,i);for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=this.clone(t[a],e,!1))}return i}static shallowClone(t){return t===null||typeof t!="object"?t:Array.isArray(t)?t.slice():Object.assign({},t)}static stringifyForCompare(t){return JSON.stringify(t,(e,s)=>{if(typeof s!="function")return s;let i=on.get(s);return i===void 0&&(i=++el,on.set(s,i)),`__apx_fn_${i}`})}static shallowEqual(t,e){if(t===e)return!0;if(!t||!e)return!1;if(typeof t!="object"||typeof e!="object")return t===e;let s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;for(let a of s)if(t[a]!==e[a])return!1;return!0}static log10(t){return Math.log(t)/Math.LN10}static roundToBase10(t){return Math.pow(10,Math.floor(Math.log10(t)))}static roundToBase(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}static parseNumber(t){return typeof t=="number"||t===null?t:parseFloat(t)}static stripNumber(t,e=2){return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(t){return t.toString().includes("e")?Math.round(t):t}static elementExists(t){return!(!t||!t.isConnected)}static getDimensions(t){if(!t)return[0,0];if(H.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e;try{e=getComputedStyle(t,null)}catch{return[t.clientWidth||0,t.clientHeight||0]}let s=t.clientWidth,i=t.clientHeight;if(!s||!i){let a=t.getBoundingClientRect();s=s||a.width,i=i||a.height}return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),s-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),[s,i]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(H.isSSR())return O.getBoundingClientRect(t);let e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}static getLargestStringFromArr(t){return t.reduce((e,s)=>(Array.isArray(s)&&(s=s.reduce((i,a)=>i.length>a.length?i:a)),e.length>s.length?e:s),0)}static hexToRgba(t="#999999",e=.6){t.substring(0,1)!=="#"&&(t="#999999");let s=t.replace("#",""),i=s.match(new RegExp("(.{"+s.length/3+"})","g"))||[];for(let a=0;a<i.length;a++)i[a]=parseInt(i[a].length===1?i[a]+i[a]:i[a],16);return typeof e<"u"&&i.push(e),"rgba("+i.join(",")+")"}static getOpacityFromRGBA(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}static parseHex(t){if(typeof t!="string")return null;let e=t.trim().replace("#","");return e.length===3&&(e=e.split("").map(s=>s+s).join("")),/^[0-9a-fA-F]{6}$/.test(e)?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]:null}static relativeLuminance([t,e,s]){let i=a=>{let n=a/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)};return .2126*i(t)+.7152*i(e)+.0722*i(s)}static getContrastRatio(t,e){let s=Xt.parseHex(t),i=Xt.parseHex(e);if(!s||!i)return 0;let a=Xt.relativeLuminance(s),n=Xt.relativeLuminance(i),r=Math.max(a,n),o=Math.min(a,n);return(r+.05)/(o+.05)}static rgb2hex(t){return t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),t&&t.length===4?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}shadeRGBColor(t,e){let s=e.split(","),i=t<0?0:255,a=t<0?t*-1:t,n=parseInt(s[0].slice(4),10),r=parseInt(s[1],10),o=parseInt(s[2],10);return"rgb("+(Math.round((i-n)*a)+n)+","+(Math.round((i-r)*a)+r)+","+(Math.round((i-o)*a)+o)+")"}shadeHexColor(t,e){let s=parseInt(e.slice(1),16),i=t<0?0:255,a=t<0?t*-1:t,n=s>>16,r=s>>8&255,o=s&255;return"#"+(16777216+(Math.round((i-n)*a)+n)*65536+(Math.round((i-r)*a)+r)*256+(Math.round((i-o)*a)+o)).toString(16).slice(1)}shadeColor(t,e){return Xt.isColorHex(e)?this.shadeHexColor(t,e):this.shadeRGBColor(t,e)}static isColorHex(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}static isCSSVariable(t){if(typeof t!="string")return!1;let e=t.trim();return e.startsWith("var(")&&e.endsWith(")")}static getThemeColor(t){if(!Xt.isCSSVariable(t)||H.isSSR())return t;let e=document.createElement("div");e.style.cssText="position:fixed; left: -9999px; visibility:hidden;",e.style.color=t,document.body.appendChild(e);let s;try{s=window.getComputedStyle(e).color}finally{e.parentNode&&e.parentNode.removeChild(e)}return s}static applyOpacityToColor(t,e){let s=Number(e);if(!Number.isFinite(s))return t;if(s<=0)return"transparent";if(s>=1)return t;let i=Math.round(s*100);return`color-mix(in srgb, ${t} ${i}%, transparent)`}static getPolygonPos(t,e){let s=[],i=Math.PI*2/e;for(let a=0;a<e;a++){let n={};n.x=t*Math.sin(a*i),n.y=-t*Math.cos(a*i),s.push(n)}return s}static polarToCartesian(t,e,s,i){let a=(i-90)*Math.PI/180;return{x:t+s*Math.cos(a),y:e+s*Math.sin(a)}}static escapeString(t,e="x"){let s=t.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,e),s}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,s){if(s>=t.length){let i=s-t.length+1;for(;i--;)t.push(void 0)}return t.splice(s,0,t.splice(e,1)[0]),t}static extractNumber(t){return parseFloat(t.replace(/[^\d.]*/g,""))}static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t.style[s]=e[s])}static preciseAddition(t,e){let s=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(s,i));return(Math.round(t*a)+Math.round(e*a))/a}static isNumber(t){return!isNaN(t)&&parseFloat(String(Number(t)))===t&&!isNaN(parseInt(t,10))}static isFloat(t){return Number(t)===t&&t%1!==0}static isMsEdge(){if(H.isSSR())return!1;let t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0?parseInt(t.substring(e+5,t.indexOf(".",e)),10):!1}static getGCD(t,e,s=7){let i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));for(i>1?(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i)):i=1;e;){let a=e;e=t%e,t=a}return t/i}static getPrimeFactors(t){let e=[],s=2;for(;t>=2;)t%s==0?(e.push(s),t=t/s):s++;return e}static mod(t,e,s=7){let i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));return t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i),t%e/i}},mt=class{constructor(t){this.w=t,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(t){return typeof t=="number"?!1:!isNaN(this.parseDate(t))}getTimeStamp(t){return isNaN(Date.parse(t))?t:this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime()}getDate(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}parseDate(t){let e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);let s=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s),s}parseDateWithTimezone(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(t,e){let s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...s.months],n=["",...s.shortMonths],r=["",...s.days],o=["",...s.shortDays];function l(A,S=2){let C=A+"";for(;C.length<S;)C="0"+C;return C}let c=i?t.getUTCFullYear():t.getFullYear();e=e.replace(/(^|[^\\])yyyy+/g,"$1"+c),e=e.replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2)),e=e.replace(/(^|[^\\])y/g,"$1"+c);let h=(i?t.getUTCMonth():t.getMonth())+1;e=e.replace(/(^|[^\\])MMMM+/g,"$1"+a[0]),e=e.replace(/(^|[^\\])MMM/g,"$1"+n[0]),e=e.replace(/(^|[^\\])MM/g,"$1"+l(h)),e=e.replace(/(^|[^\\])M/g,"$1"+h);let d=i?t.getUTCDate():t.getDate();e=e.replace(/(^|[^\\])dddd+/g,"$1"+r[0]),e=e.replace(/(^|[^\\])ddd/g,"$1"+o[0]),e=e.replace(/(^|[^\\])dd/g,"$1"+l(d)),e=e.replace(/(^|[^\\])d/g,"$1"+d);let f=i?t.getUTCHours():t.getHours();e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f)),e=e.replace(/(^|[^\\])H/g,"$1"+f);let g=f>12?f-12:f===0?12:f;e=e.replace(/(^|[^\\])hh+/g,"$1"+l(g)),e=e.replace(/(^|[^\\])h/g,"$1"+g);let p=i?t.getUTCMinutes():t.getMinutes();e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p)),e=e.replace(/(^|[^\\])m/g,"$1"+p);let m=i?t.getUTCSeconds():t.getSeconds();e=e.replace(/(^|[^\\])ss+/g,"$1"+l(m)),e=e.replace(/(^|[^\\])s/g,"$1"+m);let b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10),e=e.replace(/(^|[^\\])f/g,"$1"+b);let x=f<12?"AM":"PM";e=e.replace(/(^|[^\\])TT+/g,"$1"+x),e=e.replace(/(^|[^\\])T/g,"$1"+x.charAt(0));let _=x.toLowerCase();e=e.replace(/(^|[^\\])tt+/g,"$1"+_),e=e.replace(/(^|[^\\])t/g,"$1"+_.charAt(0));let w=-t.getTimezoneOffset(),y=i||!w?"Z":w>0?"+":"-";if(!i){w=Math.abs(w);let A=Math.floor(w/60),S=w%60;y+=l(A)+":"+l(S)}e=e.replace(/(^|[^\\])K/g,"$1"+y);let v=(i?t.getUTCDay():t.getDay())+1;return e=e.replace(new RegExp(r[0],"g"),r[v]),e=e.replace(new RegExp(o[0],"g"),o[v]),e=e.replace(new RegExp(a[0],"g"),a[h]),e=e.replace(new RegExp(n[0],"g"),n[h]),e=e.replace(/\\(.)/g,"$1"),e}getTimeUnitsfromTimestamp(t,e){let s=this.w;s.config.xaxis.min!==void 0&&(t=s.config.xaxis.min),s.config.xaxis.max!==void 0&&(e=s.config.xaxis.max);let i=this.getDate(t),a=this.getDate(e),n=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(n[6],10),maxMillisecond:parseInt(r[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(r[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(r[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(r[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(r[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(r[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(r[0],10)}}isLeapYear(t){return t%4===0&&t%100!==0||t%400===0}calculcateLastDaysOfMonth(t,e,s){return this.determineDaysOfMonths(t,e)-s}determineDaysOfYear(t){let e=365;return this.isLeapYear(t)&&(e=366),e}determineRemainingDaysOfYear(t,e,s){let i=this.daysCntOfYear[e]+s;return e>1&&this.isLeapYear(t)&&i++,i}determineDaysOfMonths(t,e){let s=30;switch(t=T.monthMod(t),!0){case this.months30.indexOf(t)>-1:t===2&&(this.isLeapYear(e)?s=29:s=28);break;case this.months31.indexOf(t)>-1:s=31;break;default:s=31;break}return s}getDateFields(t,e){let s=new Date(t);return e?{year:s.getUTCFullYear(),month:s.getUTCMonth(),date:s.getUTCDate(),hour:s.getUTCHours(),minute:s.getUTCMinutes(),second:s.getUTCSeconds(),ms:s.getUTCMilliseconds(),weekday:s.getUTCDay()}:{year:s.getFullYear(),month:s.getMonth(),date:s.getDate(),hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),ms:s.getMilliseconds(),weekday:s.getDay()}}addInterval(t,e,s,i){let a=new Date(t);if(i)switch(e){case"year":a.setUTCFullYear(a.getUTCFullYear()+s);break;case"month":a.setUTCMonth(a.getUTCMonth()+s);break;case"week":a.setUTCDate(a.getUTCDate()+s*7);break;case"day":a.setUTCDate(a.getUTCDate()+s);break;case"hour":a.setUTCHours(a.getUTCHours()+s);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+s);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+s);break}else switch(e){case"year":a.setFullYear(a.getFullYear()+s);break;case"month":a.setMonth(a.getMonth()+s);break;case"week":a.setDate(a.getDate()+s*7);break;case"day":a.setDate(a.getDate()+s);break;case"hour":a.setHours(a.getHours()+s);break;case"minute":a.setMinutes(a.getMinutes()+s);break;case"second":a.setSeconds(a.getSeconds()+s);break}return a.getTime()}ceilToBoundary(t,e,s,i){let a=new Date(t);if(i)switch(e){case"second":{let n=a.getUTCSeconds(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(r),a.getTime())}case"minute":{let n=a.getUTCMinutes(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(r),a.getTime())}case"hour":{let n=a.getUTCHours(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(r),a.getTime())}case"day":return a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(a.getUTCDate()+1),a.getTime());case"week":{let r=Date.UTC(1970,0,5);a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0);let o=a.getTime(),l=Math.ceil((o-r)/6048e5),c=Math.ceil(l/s)*s,h=r+c*6048e5;return h>=t?h:h+s*6048e5}case"month":{let n=a.getUTCMonth(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCDate()===1&&a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(1),a.setUTCMonth(r),a.getTime())}case"year":{let n=a.getUTCFullYear(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCMonth()===0&&a.getUTCDate()===1&&a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:Date.UTC(r,0,1)}}else switch(e){case"second":{let n=a.getSeconds(),r=Math.ceil(n/s)*s;return r===n&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(r),a.getTime())}case"minute":{let n=a.getMinutes(),r=Math.ceil(n/s)*s;return r===n&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(r),a.getTime())}case"hour":{let n=a.getHours(),r=Math.ceil(n/s)*s;return r===n&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(r),a.getTime())}case"day":return a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(a.getDate()+1),a.getTime());case"week":{let r=new Date(1970,0,5).getTime();a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0);let o=a.getTime(),l=Math.ceil((o-r)/6048e5),c=Math.ceil(l/s)*s,h=r+c*6048e5;return h>=t?h:h+s*6048e5}case"month":{let n=a.getMonth(),r=Math.ceil(n/s)*s;return r===n&&a.getDate()===1&&a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(1),a.setMonth(r),a.getTime())}case"year":{let n=a.getFullYear(),r=Math.ceil(n/s)*s;return r===n&&a.getMonth()===0&&a.getDate()===1&&a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:new Date(r,0,1).getTime()}}return t}isAtBoundary(t,e,s){let i=this.getDateFields(t,s);switch(e){case"year":return i.month===0&&i.date===1&&i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"month":return i.date===1&&i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"day":return i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"hour":return i.minute===0&&i.second===0&&i.ms===0;case"minute":return i.second===0&&i.ms===0;case"second":return i.ms===0}return!1}},ee=class{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,s,i){let a=this.w;if(a.config.xaxis.type==="datetime"&&a.config.xaxis.labels.formatter===void 0&&a.config.tooltip.x.formatter===void 0){let n=new mt(this.w);return n.formatDate(n.getDate(e),a.config.tooltip.x.format)}return t(e,s,i)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(e=>e):t}defaultYFormatter(t,e){let s=this.w;if(T.isNumber(t))if(s.globals.yValueDecimal!==0)t=t.toFixed(e.decimalsInFloat!==void 0?e.decimalsInFloat:s.globals.yValueDecimal);else{let i=t.toFixed(0);t=Number(i)===t?i:t.toFixed(1)}return t}setLabelFormatters(){let t=this.w,e=t.formatters;return e.xaxisTooltipFormatter=s=>this.defaultGeneralFormatter(s),e.ttKeyFormatter=s=>this.defaultGeneralFormatter(s),e.ttZFormatter=s=>s,e.legendFormatter=s=>this.defaultGeneralFormatter(s),t.config.xaxis.labels.formatter!==void 0?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=s=>{if(T.isNumber(s)){if(!t.config.xaxis.convertedCatToNumeric&&t.config.xaxis.type==="numeric"){if(T.isNumber(t.config.xaxis.decimalsInFloat))return s.toFixed(t.config.xaxis.decimalsInFloat);{let i=t.globals.maxX-t.globals.minX;if(i>0){let a=i/10,n=Math.max(0,-Math.floor(Math.log10(a)));return s.toFixed(n)}return s.toFixed(0)}}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minY<4?s.toFixed(1):s.toFixed(0)}return s},typeof t.config.tooltip.x.formatter=="function"?e.ttKeyFormatter=t.config.tooltip.x.formatter:e.ttKeyFormatter=e.xLabelFormatter,typeof t.config.xaxis.tooltip.formatter=="function"&&(e.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||t.config.tooltip.y.formatter!==void 0)&&(e.ttVal=t.config.tooltip.y),t.config.tooltip.z.formatter!==void 0&&(e.ttZFormatter=t.config.tooltip.z.formatter),t.config.legend.formatter!==void 0&&(e.legendFormatter=t.config.legend.formatter),e.yLabelFormatters=[],t.config.yaxis.forEach((s,i)=>{if(s.labels.formatter!==void 0)e.yLabelFormatters[i]=s.labels.formatter;else if(t.config.chart.type==="violin"){let a=n=>typeof n=="number"&&isFinite(n)?`${Math.round(n*100)/100}`:n;e.yLabelFormatters[i]=n=>t.globals.xyCharts?Array.isArray(n)?n.map(a):a(n):n}else e.yLabelFormatters[i]=a=>t.globals.xyCharts?Array.isArray(a)?a.map(n=>this.defaultYFormatter(n,s)):this.defaultYFormatter(a,s):a}),t.globals}heatmapLabelFormatters(){let t=this.w;if(t.config.chart.type==="heatmap"){t.globals.yAxisScale[0].result=t.seriesData.seriesNames.slice();let e=t.seriesData.seriesNames.reduce((s,i)=>s.length>i.length?s:i,0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}},sl="en",il={months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom",measure:"Measure"}},Ar={name:sl,options:il},wt=class{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},plugins:[],chart:{animations:{enabled:!0,speed:800,easing:"easeInOutSine",animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:"",locales:[Ar],defaultLocale:"en",perspectives:{serializeOptions:["theme","xaxis","yaxis","title","subtitle"]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:"svg",rendererThreshold:8e3,layers:{series:"auto",grid:"svg",annotations:"svg",dataLabels:"svg"},dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,crossFilter:void 0,filterChange:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,license:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},link:{enabled:!1,mode:"highlight",dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:"span",key:"m",pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:["annotate","xline","yline","measure"],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:"Note",line:{text:"",strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:"normal",streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0,embedFonts:!0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:"auto",pinch:"auto",zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:"lttb",targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"},whiskers:"minmax",points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:"individual",points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},histogram:{bins:"auto",binWidth:void 0,range:void 0,normalize:"count",cumulative:!1,overlap:!0},heatmap:{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",minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:"auto",padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:"left",offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:""}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:"grouped",positions:void 0,transition:"group",shape:"circle",image:{src:void 0,width:20,height:20,tint:!1},size:"auto",columns:{size:"inherit"},grid:{columns:10,total:void 0,fillFrom:"bottom",split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:"lanes",spread:"swarm",orientation:"horizontal",tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:"z",sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:"auto",minRadius:void 0,scale:"area"},spacing:1.05,borderRadius:0,gather:{motion:"auto",spring:"crisp",easing:"outCubic",overshoot:1.70158,enter:"burst"},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:"auto"},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:"top",curved:!0,fontSize:"13px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:"arc",min:0,max:100,bands:[],bandsStyle:{strokeWidth:"40%",gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:"#666",placement:"outside"},minor:{count:4,length:5,width:1,color:"#999",placement:"outside"},labels:{show:!1,offset:6,fontSize:"11px",fontFamily:void 0,fontWeight:400,color:"#666",formatter(t){return String(t)}}},needle:{color:"#333",length:"85%",baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:"ease-out"}},hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",stroke:void 0,strokeWidth:1,strokeDasharray:void 0,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter(t){return t.globals.seriesTotals.reduce((e,s)=>e+s,0)/t.seriesData.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter(t){return t.globals.seriesTotals.reduce((e,s)=>e+s,0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:"15%",borderRadius:0,spacing:1,leaf:"extend",partition:"normalize",tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:"12px",fontFamily:void 0,fontWeight:400,colors:void 0}}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter(t){return t!==null?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8},animate:{enabled:!1},countUp:{enabled:!1}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:"#fff"}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten",value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.35}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM",day:"dd MMM",hour:"HH:mm",minute:"HH:mm",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",tokens:!0,follow:!1,name:"",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}},Sr="_apexOwnedByType",Se=(u,t)=>{let e=t;return e[Sr]=u,t},al=["tooltip.custom","tooltip.shared","tooltip.intersect","tooltip.followCursor","dataLabels.enabled","dataLabels.formatter","plotOptions.bar.dataLabels.position","markers.size","states.hover.filter.type","states.active.filter.type","xaxis.crosshairs.width","xaxis.tickPlacement","xaxis.tooltip.enabled","chart.zoom.enabled","chart.animations.dynamicAnimation.enabled"],Ke=(u,t)=>{let e=u;for(let s of t.split(".")){if(e==null||typeof e!="object")return;e=e[s]}return e},nl=(u,t,e)=>{let s=t.split("."),i=s.pop(),a=u;for(let n of s)(a[n]==null||typeof a[n]!="object")&&(a[n]={}),a=a[n];e===void 0?delete a[i]:a[i]=e},rl={funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar"},ln=(u,t)=>{var e,s;let i=rl[u];return{chart:{type:i||u,requestedType:i?u:void 0,stacked:(e=t.chart)==null?void 0:e.stacked},plotOptions:{bar:{isFunnel:u==="funnel"||u==="pyramid"},histogram:(s=t.plotOptions)==null?void 0:s.histogram},series:t.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},ol=(u,t)=>{if(typeof u=="function")return Array.isArray(u[Sr])?!0:typeof t=="function"&&String(u)===String(t);if(typeof t=="function")return u===void 0;if(u===t)return!0;try{return JSON.stringify(u)===JSON.stringify(t)}catch{return!1}},Ys=({isTimeline:u,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a})=>{var n;let r=a.rangeData.seriesRangeStart[t][e],o=a.rangeData.seriesRangeEnd[t][e],l=a.labelData.labels[e],c=a.config.series[t].name?a.config.series[t].name:"",h=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,f={w:a,seriesIndex:t,dataPointIndex:e,start:r,end:o};typeof d=="function"&&(c=d(c,f)),(n=a.config.series[t].data[e])!=null&&n.x&&(l=a.config.series[t].data[e].x),u||a.config.xaxis.type==="datetime"&&(l=new ee(a).xLabelFormat(a.formatters.ttKeyFormatter,l,l,{i:void 0,dateFormatter:new mt(a).formatDate,w:a})),typeof h=="function"&&(l=h(l,f)),Number.isFinite(s)&&Number.isFinite(i)&&(r=s,o=i);let g="",p="",m=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type==="datetime"){let b=new mt(a);g=b.formatDate(b.getDate(r),a.config.tooltip.x.format),p=b.formatDate(b.getDate(o),a.config.tooltip.x.format)}else g=r,p=o;else g=a.config.tooltip.x.formatter(r),p=a.config.tooltip.x.formatter(o);return{start:r,end:o,startVal:g,endVal:p,ylabel:l,color:m,seriesName:c}},zs=u=>{let{color:t,seriesName:e,ylabel:s,start:i,end:a,seriesIndex:n,dataPointIndex:r}=u,o=u.w.globals.tooltip.tooltipLabels.getFormatters(n);i=o.yLbFormatter(i),a=o.yLbFormatter(a);let l=o.yLbFormatter(u.w.seriesData.series[n][r]),c="",h=`<span class="value start-value">
|
|
${i}
|
|
</span> <span class="separator">-</span> <span class="value end-value">
|
|
${a}
|
|
</span>`;return u.w.globals.comboCharts?u.w.config.series[n].type==="rangeArea"||u.w.config.series[n].type==="rangeBar"?c=h:c=`<span>${l}</span>`:c=h,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+t+'">'+(e||"")+'</span></div><div> <span class="category">'+s+": </span> "+c+" </div></div>"},Lt=class u{constructor(t){this.opts=t}static forType(t){var e,s;let i=new u(t),a=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","unit","sunburst","pie","polarArea","donut","radar","radialBar"],n=t.chart.requestedType,r;return n==="funnel"||n==="pyramid"?r=i[n]():n==="gauge"?r=i.gauge():n==="histogram"?r=i.histogram():a.indexOf(t.chart.type)!==-1?r=i[t.chart.type]():r=i.line(),(s=(e=t.plotOptions)==null?void 0:e.bar)!=null&&s.isFunnel&&(r=i.funnel()),t.chart.stacked&&t.chart.type==="bar"&&(r=i.stackedBars()),r}static handOverTypeDefaults(t,e,s){let i=t.chart.requestedType||t.chart.type;if(!e||e===i)return;let a=new wt().init(),n=T.extend(a,u.forType(ln(e,t))),r=T.extend(a,u.forType(ln(i,t)));for(let o of al){if(s&&Ke(s,o)!==void 0)continue;let l=Ke(n,o),c=Ke(r,o);l===void 0&&c===void 0||ol(Ke(t,o),l)&&nl(t,o,c)}}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(t){this.hideYAxis();let e={grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}};return T.extend(t,e)}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){let s=e.w.config.series[e.seriesIndex].name;return t!==null?s+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),j(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(){let t=this.radialBar();return j(G({},t),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:8}}}}})}histogram(){var t,e,s,i;let a=Array.isArray((t=this.opts)==null?void 0:t.series)&&this.opts.series.length>1&&((i=(s=(e=this.opts)==null?void 0:e.plotOptions)==null?void 0:s.histogram)==null?void 0:i.overlap)!==!1;return j(G({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:"100%",borderRadius:0,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},fill:a?{opacity:.65}:{},stroke:a?{show:!1}:{show:!0,width:1,colors:["#fff"]},xaxis:{type:"numeric",tooltip:{enabled:!1}},tooltip:{shared:a,intersect:!1,x:{formatter:(n,r)=>{var o,l;let c=(l=(o=r?.w)==null?void 0:o.histogramData)==null?void 0:l.edges,h=r?.dataPointIndex;if(!Array.isArray(c)||typeof h!="number"||h<0)return String(n);let d=c[h],f=c[h+1];if(d===void 0||f===void 0)return String(n);let g=p=>Number.isInteger(p)?String(p):p.toFixed(2);return`${g(d)} to ${g(f)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Se(["candlestick"],({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Open","High","","Low","Close"],"candlestick"))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Se(["boxPlot"],({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot"))},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Se(["violin"],({seriesIndex:t,dataPointIndex:e,w:s})=>this._getViolinTooltip(s,t,e))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}rangeBar(){let t=s=>{let{color:i,seriesName:a,ylabel:n,startVal:r,endVal:o}=Ys(j(G({},s),{isTimeline:!0}));return zs(j(G({},s),{color:i,seriesName:a,ylabel:n,start:r,end:o}))},e=s=>{let{color:i,seriesName:a,ylabel:n,start:r,end:o}=Ys(s);return zs(j(G({},s),{color:i,seriesName:a,ylabel:n,start:r,end:o}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(s,{seriesIndex:i,dataPointIndex:a,w:n}){let r=()=>{let o=n.rangeData.seriesRangeStart[i][a];return n.rangeData.seriesRangeEnd[i][a]-o};return n.globals.comboCharts?n.config.series[i].type==="rangeBar"||n.config.series[i].type==="rangeArea"?r():s:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:Se(["rangeBar"],s=>s.w.config.plotOptions&&s.w.config.plotOptions.bar&&s.w.config.plotOptions.bar.horizontal?t(s):e(s))},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return(e=t.plotOptions.bar)!=null&&e.barHeight||(t.plotOptions.bar.barHeight=2),(s=t.plotOptions.bar)!=null&&s.columnWidth||(t.plotOptions.bar.columnWidth=2),t}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){let t=e=>{let{color:s,seriesName:i,ylabel:a,start:n,end:r}=Ys(e);return zs(j(G({},e),{color:s,seriesName:i,ylabel:a,start:n,end:r}))};return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:Se(["rangeArea"],e=>t(e))}}}brush(t){let e={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return T.extend(t,e)}stacked100(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;let e=t.dataLabels.formatter;return t.yaxis.forEach((i,a)=>{t.yaxis[a].min=0,t.yaxis[a].max=100}),t.chart.type==="bar"&&(t.dataLabels.formatter=e||function(i){return typeof i=="number"?i&&i.toFixed(0)+"%":i}),t}stackedBars(){let t=this.bar();return j(G({},t),{plotOptions:j(G({},t.plotOptions),{bar:j(G({},t.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}convertCatToNumeric(t){return t.xaxis.convertedCatToNumeric=!0,t}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(a){return T.isNumber(a)?Math.floor(a):a};let s=t.xaxis.labels.formatter,i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(a=>Array.isArray(a)?a:String(a))),i&&i.length&&(t.xaxis.labels.formatter=function(a){return T.isNumber(a)?s(i[Math.floor(a)-1]):s(a)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}bubble(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!1,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(t){return typeof t=="number"?t.toFixed(1)+"%":t},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return typeof t=="number"?t.toFixed(1)+"%":t},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return typeof t=="number"?t.toFixed(1)+"%":t},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:t=>t,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:"butt"},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(t,e,s,i,a){let n=t.candleData.seriesCandleO[e][s],r=t.candleData.seriesCandleH[e][s],o=t.candleData.seriesCandleM[e][s],l=t.candleData.seriesCandleL[e][s],c=t.candleData.seriesCandleC[e][s],h=t.config.series[e];return h.type&&h.type!==a?`<div class="apexcharts-custom-tooltip">
|
|
${h.name?h.name:"series-"+(e+1)}: <strong>${t.seriesData.series[e][s]}</strong>
|
|
</div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div>${i[0]}: <span class="value">`+n+`</span></div><div>${i[1]}: <span class="value">`+r+"</span></div>"+(o?`<div>${i[2]}: <span class="value">`+o+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+l+`</span></div><div>${i[4]}: <span class="value">`+c+"</span></div></div>"}_getViolinTooltip(t,e,s){var i,a,n;let r=(i=t.violinData.seriesViolinMin[e])==null?void 0:i[s],o=(a=t.violinData.seriesViolinMax[e])==null?void 0:a[s],l=((n=t.violinData.seriesViolinPoints[e])==null?void 0:n[s])||[],c=t.config.series[e].name||"series-"+(e+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${c}</div><div>Min: <span class="value">${r}</span></div><div>Max: <span class="value">${o}</span></div><div>Observations: <span class="value">${l.length}</span></div></div>`}},se=class{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,n,r,o,l;let c=this.opts,h=new wt,d=new Lt(c);c=this.normalizeAliasedChartType(c),this.chartType=c.chart.type,c=this.extendYAxis(c),c=this.extendAnnotations(c);let f=h.init(),g={};if(c&&typeof c=="object"){let m=Lt.forType(c);(e=c.chart.brush)!=null&&e.enabled&&(m=d.brush(m)),(i=(s=c.plotOptions)==null?void 0:s.line)!=null&&i.isSlopeChart&&(m=d.slope()),c.chart.stacked&&c.chart.stackType==="100%"&&(c=d.stacked100(c)),(n=(a=c.plotOptions)==null?void 0:a.bar)!=null&&n.isDumbbell&&(c=d.dumbbell(c)),this.checkForDarkTheme(H.getApex()),this.checkForDarkTheme(c),c.xaxis=c.xaxis||H.getApex().xaxis||{},t||(c.xaxis.convertedCatToNumeric=!1),c=this.checkForCatToNumericXAxis(this.chartType,m,c),((r=c.chart.sparkline)!=null&&r.enabled||(l=(o=H.getApex().chart)==null?void 0:o.sparkline)!=null&&l.enabled)&&(m=d.sparkline(m)),g=T.extend(f,m)}let p=T.extend(g,H.getApex());return f=T.extend(p,c),f=this.handleUserInputErrors(f),f}normalizeAliasedChartType(t){if(!t||!t.chart)return t;let e=t.chart.type;return e!=="funnel"&&e!=="pyramid"&&e!=="gauge"&&e!=="waffle"&&e!=="histogram"||(t.chart.requestedType=e,e==="waffle"?(t.plotOptions=t.plotOptions||{},t.plotOptions.unit=t.plotOptions.unit||{},t.plotOptions.unit.layout==null&&(t.plotOptions.unit.layout="grid"),t.plotOptions.unit.shape==null&&(t.plotOptions.unit.shape="square"),t.chart.type="unit"):e==="funnel"||e==="pyramid"?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel=!0,t.plotOptions.bar.horizontal=!0,t.chart.type="bar",e==="pyramid"?t.plotOptions.bar.isPyramid=!0:t.plotOptions.bar.isPyramid=!1):e==="gauge"?t.chart.type="radialBar":e==="histogram"&&(t.xaxis=t.xaxis||{},t.xaxis.type==null&&(t.xaxis.type="numeric"),t.chart.type="bar")),t}checkForCatToNumericXAxis(t,e,s){var i,a,n,r,o;let l=new Lt(s),c=(t==="bar"||t==="boxPlot"||t==="violin")&&((a=(i=s.plotOptions)==null?void 0:i.bar)==null?void 0:a.horizontal),h=t==="pie"||t==="polarArea"||t==="donut"||t==="radar"||t==="radialBar"||t==="heatmap"||t==="unit"||t==="sunburst",d=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",f=(t==="scatter"||t==="bubble")&&((o=(r=(n=s.plotOptions)==null?void 0:n.scatter)==null?void 0:r.jitter)==null?void 0:o.enabled),g=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return!c&&!h&&!f&&d&&g!=="between"&&(s=l.convertCatToNumeric(s)),s}extendYAxis(t,e){let s=new wt;(typeof t.yaxis>"u"||!t.yaxis||Array.isArray(t.yaxis)&&t.yaxis.length===0)&&(t.yaxis={});let i=H.getApex();t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=T.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[T.extend(s.yAxis,t.yaxis)]:t.yaxis=T.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(r=>{r.logarithmic&&(a=!0)});let n=t.series;return e&&!n&&(n=e.config.series),a&&n.length!==t.yaxis.length&&n.length&&(t.yaxis=n.map((r,o)=>{if(r.name||(n[o].name=`series-${o+1}`),t.yaxis[o])return t.yaxis[o].seriesName=n[o].name,t.yaxis[o];{let l=T.extend(s.yAxis,t.yaxis[0]);return l.show=!1,l}})),a&&n.length>1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}extendAnnotations(t){return typeof t.annotations>"u"&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t),t}extendYAxisAnnotations(t){let e=new wt;return t.annotations.yaxis=T.extendArray(typeof t.annotations.yaxis<"u"?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){let e=new wt;return t.annotations.xaxis=T.extendArray(typeof t.annotations.xaxis<"u"?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){let e=new wt;return t.annotations.points=T.extendArray(typeof t.annotations.points<"u"?t.annotations.points:[],e.pointAnnotation),t}checkForDarkTheme(t){t.theme&&t.theme.mode==="dark"&&(t.tooltip||(t.tooltip={}),t.tooltip.theme!=="light"&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}handleUserInputErrors(t){let e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(e.chart.type==="bar"&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return(e.chart.type==="bar"||e.chart.type==="rangeBar")&&e.tooltip.shared&&e.xaxis.crosshairs.width==="barWidth"&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),(e.chart.type==="candlestick"||e.chart.type==="boxPlot")&&e.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${e.chart.type} chart is not supported.`),e.yaxis[0].reversed=!1),e}},hi=1.618,Cr=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],di=[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],ls=class{initGlobalVars(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.dataWasParsed=!1,t.originalSeries=null,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,t.hasNullValues=!1,t.invalidLogScale=!1,t.seriesRangeName={},t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0,t.disableZoomIn=!1,t.disableZoomOut=!1,t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.rotateXLabels=!1,t.overlappingXLabels=!1,t.radialSize=0,t.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.isDestroyed=!1,t.bulkRevealScheduled=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.barCanvasCoords=null,t.activeRenderer=null,t.dataLabelsRects=[],t.lastDrawnDataLabelsIndexes=[],t.textRectsCache=new Map,t.domCache=new Map,t.dimensionCache={},t.cachedSelectors={},t.seriesNS||this._attachNamespaces(t)}_attachNamespaces(t){let e=(r,o,l=o)=>{Object.defineProperty(r,l,{get(){return t[o]},set(c){t[o]=c},enumerable:!0,configurable:!0})},s={};e(s,"series","data");for(let r of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(s,r);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,configurable:!0});let i={};for(let r of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])e(i,r);Object.defineProperty(t,"axes",{value:i,writable:!1,enumerable:!1,configurable:!0});let a={};for(let r of["svgWidth","svgHeight","gridWidth","gridHeight","translateX","translateY","translateXAxisX","translateXAxisY","translateYAxisX","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yAxisLabelsWidth","yAxisWidths","yLabelsCoords","yTitleCoords","padHorizontal","barPadForNumericAxis","rotateXLabels","scaleX","scaleY","radialSize","defaultLabels","overlappingXLabels"])e(a,r);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});let n={};for(let r of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(n,r);Object.defineProperty(t,"cache",{value:n,writable:!1,enumerable:!1,configurable:!0})}globalVars(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},LINE_HEIGHT_RATIO:hi,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:Cr,niceScaleDefaultTicks:di,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(t){let e=[],s=null;Object.defineProperty(t,"initialSeries",{configurable:!0,enumerable:!0,get(){return s===null&&(s=T.clone(e)),s},set(i){e=Array.isArray(i)?i.map(a=>a&&typeof a=="object"&&!Array.isArray(a)?G({},a):a):i,s=null,t._initialSeriesPeek=e}}),t._initialSeriesPeek=e}init(t){let e=this.globalVars(t);return this.initGlobalVars(e),this.defineLazyInitialSeries(e),e.initialConfig=T.extend({},t),e.initialSeries=t.series,e.lastXAxis=T.clone(e.initialConfig.xaxis),e.lastYAxis=T.clone(e.initialConfig.yaxis),e}},ui=class{constructor(t){this.opts=t}init(){let t=new se(this.opts).init({responsiveOverride:!1}),e=new ls().init(t),s={config:t,globals:e,dom:{},interact:{zoomEnabled:t.chart.toolbar.autoSelected==="zoom"&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:t.chart.toolbar.autoSelected==="pan"&&t.chart.toolbar.tools.pan,selectionEnabled:t.chart.toolbar.autoSelected==="selection"&&t.chart.toolbar.tools.selection,measureEnabled:t.chart.toolbar.autoSelected==="measure"&&!!t.chart.toolbar.tools.measure&&!!(t.chart.measure&&t.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:H.isBrowser()?"ontouchstart"in window||navigator.maxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:"",capped:!1},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[],unitData:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(e,"dom",{get(){return s.dom},set(i){s.dom=i},enumerable:!1,configurable:!0});for(let i of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,i,{get(){return s.formatters[i]},set(a){s.formatters[i]=a},enumerable:!1,configurable:!0});for(let i of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,i,{get(){return s.interact[i]},set(a){s.interact[i]=a},enumerable:!1,configurable:!0});for(let i of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords","gridPad"])Object.defineProperty(e,i,{get(){return s.layout[i]},set(a){s.layout[i]=a},enumerable:!1,configurable:!0});for(let i of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,i,{get(){return s.seriesData[i]},set(a){s.seriesData[i]=a},enumerable:!1,configurable:!0});for(let i of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,i,{get(){return s.axisFlags[i]},set(a){s.axisFlags[i]=a},enumerable:!1,configurable:!0});for(let i of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,i,{get(){return s.labelData[i]},set(a){s.labelData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,i,{get(){return s.rangeData[i]},set(a){s.rangeData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,i,{get(){return s.candleData[i]},set(a){s.candleData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,i,{get(){return s.violinData[i]},set(a){s.violinData[i]=a},enumerable:!1,configurable:!0});return s}},lt=class{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=0,a=0;return e===void 0&&(e="line"),t.length&&typeof t[0].type<"u"&&t.forEach(n=>{(n.type==="bar"||n.type==="column"||n.type==="candlestick"||n.type==="boxPlot"||n.type==="violin")&&i++,typeof n.type<"u"&&n.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){let e=this.w,s=[];if(e.seriesData.series.length===0)return s;for(let i=0;i<e.seriesData.series[e.globals.maxValsInArrayIndex].length;i++){let a=0;for(let n=0;n<e.seriesData.series.length;n++)typeof e.seriesData.series[n][i]<"u"&&t.indexOf(n)===-1&&(a+=e.seriesData.series[n][i]);s.push(a)}return s}getSeriesTotalByIndex(t=null){if(t===null)return this.w.config.series.reduce((e,s)=>e+s,0);{let e=this.w.seriesData.series[t];return Array.isArray(e)?e.reduce((s,i)=>s+i,0):e??0}}getStackedSeriesTotalsByGroups(){let t=this.w,e=[];return t.labelData.seriesGroups.forEach(s=>{let i=[];t.config.series.forEach((n,r)=>{s.indexOf(t.seriesData.seriesNames[r])>-1&&i.push(r)});let a=t.seriesData.series.map((n,r)=>i.indexOf(r)===-1?r:-1).filter(n=>n!==-1);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){let t=this.w.globals,e=this.w.config,s=[],i=[],a=[],n=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(l=>Array.isArray(l.seriesName));e.series.forEach((l,c)=>{a.push(c),i.push(null)}),e.yaxis.forEach((l,c)=>{s[c]=[]});let r=[];e.yaxis.forEach((l,c)=>{let h=!1;if(l.seriesName){let d=[];Array.isArray(l.seriesName)?d=l.seriesName:d.push(l.seriesName),d.forEach(f=>{e.series.forEach((g,p)=>{if(g.name===f){let m=p;c===p||n?!n||a.indexOf(p)>-1?s[c].push([c,p]):console.warn("Series '"+g.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(s[p].push([p,c]),m=c),h=!0,m=a.indexOf(m),m!==-1&&a.splice(m,1)}})})}h||r.push(c)}),s=s.map(l=>{let c=[];return l.forEach(h=>{i[h[1]]=h[0],c.push(h[1])}),c});let o=e.yaxis.length-1;for(let l=0;l<r.length&&(o=r[l],s[o]=[],a);l++){let c=a[0];a.shift(),s[o].push(c),i[c]=o}a.forEach(l=>{s[o].push(l),i[l]=o}),t.seriesYAxisMap=s.map(l=>l),t.seriesYAxisReverseMap=i.map(l=>l),t.seriesYAxisMap.forEach((l,c)=>{l.forEach(h=>{if(e.series[h]&&e.series[h].group===void 0){let d=e.series[h];d.group="apexcharts-axis-".concat(c.toString())}})})}isSeriesNull(t=null){let e=[],s=this.w.config.series;return t===null?e=s.filter(i=>i!==null):s[t]&&Array.isArray(s[t].data)?e=s[t].data.filter(i=>i!==null):e=s[t]!==null&&s[t]!==void 0?[s[t]]:[],e.length===0}seriesHaveSameValues(t){let e=this.w.seriesData.series[t];return Array.isArray(e)?e.every((s,i,a)=>s===a[0]):!0}getCategoryLabels(t){let e=this.w,s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(i=>e.config.xaxis.labels.formatter(i-e.globals.minX+1))),s}getLargestSeries(){let t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){let t=this.w,e=0;return t.globals.markers.size.forEach(s=>{e=Math.max(e,s)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(s=>{e=Math.max(e,s.size)}),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}getSeriesTotals(){let t=this.w;t.globals.seriesTotals=t.seriesData.series.map(e=>{let s=0;if(Array.isArray(e))for(let i=0;i<e.length;i++)s+=e[i];else s+=e;return s})}getSeriesTotalsXRange(t,e){let s=this.w;return s.seriesData.series.map((a,n)=>{let r=0;for(let o=0;o<a.length;o++)s.seriesData.seriesX[n][o]>t&&s.seriesData.seriesX[n][o]<e&&(r+=a[o]);return r})}getPercentSeries(){let t=this.w;t.globals.seriesPercent=t.seriesData.series.map(e=>{let s=[];if(Array.isArray(e))for(let i=0;i<e.length;i++){let a=t.seriesData.stackedSeriesTotals[i],n=0;a&&(n=100*e[i]/a),s.push(n)}else{let i=t.globals.seriesTotals.reduce((n,r)=>n+r,0),a=100*e/i;s.push(a)}return s})}getCalculatedRatios(){let t=this.w,e=t.globals,s=[],i=0,a=0,n=0,r=0,o=[],l=.1,c=0;if(e.yRange=[],e.isMultipleYAxis)for(let h=0;h<e.minYArr.length;h++)e.yRange.push(Math.abs(e.minYArr[h]-e.maxYArr[h])),o.push(0);else e.yRange.push(Math.abs(e.minY-e.maxY));e.xRange=Math.abs(e.maxX-e.minX),e.zRange=Math.abs(e.maxZ-e.minZ);for(let h=0;h<e.yRange.length;h++)s.push(e.yRange[h]/this.w.layout.gridHeight);if(a=e.xRange/this.w.layout.gridWidth,i=e.yRange/this.w.layout.gridWidth,n=e.xRange/this.w.layout.gridHeight,r=e.zRange/this.w.layout.gridHeight*16,r||(r=1),e.minY!==Number.MIN_VALUE&&Math.abs(e.minY)!==0){let h=e;h.hasNegs=!0}if(t.globals.seriesYAxisReverseMap.length>0){let h=(d,f)=>{let g=t.config.yaxis[t.globals.seriesYAxisReverseMap[f]];if(!g)return 0;let p=d<0?-1:1;return d=Math.abs(d),g.logarithmic&&(d=this.getBaseLog(g.logBase,d)),-p*d/s[f]};if(e.isMultipleYAxis){o=[];for(let d=0;d<s.length;d++)o.push(h(e.minYArr[d],d))}else o=[],o.push(h(e.minY,0)),e.minY!==Number.MIN_VALUE&&Math.abs(e.minY)!==0&&(l=-e.minY/i,c=e.minX/a)}else o=[],o.push(0),l=0,c=0;return{yRatio:s,invertedYRatio:i,zRatio:r,xRatio:a,invertedXRatio:n,baseLineInvertedY:l,baseLineY:o,baseLineX:c}}getLogSeries(t){let e=this.w;return e.globals.seriesLog=t.map((s,i)=>{let a=e.globals.seriesYAxisReverseMap[i];return e.config.yaxis[a]&&e.config.yaxis[a].logarithmic?s.map(n=>n===null?null:this.getLogVal(e.config.yaxis[a].logBase,n,i)):s}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(t===null)return null;let s=this.w,i=s.globals.seriesYAxisReverseMap[e];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,s){if(e<=0)return 0;let i=this.w,a=i.globals.minYArr[s]===0?-1:this.getBaseLog(t,i.globals.minYArr[s]),r=(i.globals.maxYArr[s]===0?0:this.getBaseLog(t,i.globals.maxYArr[s]))-a;return e<1?e/r:(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){let e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((a,n)=>{let r=e.globals.seriesYAxisReverseMap[n];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let o=-Number.MAX_VALUE,l=Number.MIN_VALUE,c=1;return s.seriesLog.forEach((h,d)=>{h.forEach(f=>{e.config.yaxis[d]&&e.config.yaxis[d].logarithmic&&(o=Math.max(f,o),l=Math.min(f,l))})}),c=Math.pow(s.yRange[n],Math.abs(l-o)/s.yRange[n]),i.yLogRatio[n]=c/this.w.layout.gridHeight,c}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return e?.yaxis&&(e=t.extendYAxis(e,s)),e?.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(i=e?.annotations)!=null&&i.xaxis&&(e=t.extendXAxisAnnotations(e)),(a=e?.annotations)!=null&&a.points&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,s,i){let a=this.w,n=[];return t.series.length>0&&e.forEach(r=>{let o=[],l=[];t.i.forEach((c,h)=>{a.config.series[c].group===r&&(o.push(t.series[h]),l.push(c))}),o.length>0&&n.push(i.draw(o,s,l))}),n}},et="http://www.w3.org/2000/svg",vt=class u{constructor(t,e){typeof t=="object"?(this.x=t.x,this.y=t.y):(this.x=t||0,this.y=e||0)}transform(t){return t.apply(this)}clone(){return new u(this.x,this.y)}},Pe=class u{constructor(t,e,s,i,a,n){this.a=t??1,this.b=e??0,this.c=s??0,this.d=i??1,this.e=a??0,this.f=n??0}rotate(t){let e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new u(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new u(t,0,0,e??t,0,0))}multiply(t){return new u(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}apply(t){return new vt(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}},fi=class{constructor(t,e,s,i){this.x=t,this.y=e,this.w=s,this.h=i,this.width=s,this.height=i,this.x2=t+s,this.y2=e+i}};function ie(u){if(!u||typeof u!="string")return[["M",0,0]];let t=[],e=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,i,a=[],n=[];for(;(i=e.exec(u))!==null;)a.push(i[1]),n.push(i.index);for(let r=0;r<a.length;r++){let o=n[r]+a[r].length,l=r+1<n.length?n[r+1]:u.length,c=u.substring(o,l),h=[],d;for(s.lastIndex=0;(d=s.exec(c))!==null;)h.push(parseFloat(d[0]));let f=a[r].toUpperCase();if(f==="Z")t.push(["Z"]);else if(f==="M"||f==="L"||f==="T")for(let g=0;g<h.length;g+=2)t.push([f,h[g],h[g+1]]);else if(f==="H")for(let g=0;g<h.length;g++)t.push([f,h[g]]);else if(f==="V")for(let g=0;g<h.length;g++)t.push([f,h[g]]);else if(f==="C")for(let g=0;g<h.length;g+=6)t.push([f,h[g],h[g+1],h[g+2],h[g+3],h[g+4],h[g+5]]);else if(f==="S"||f==="Q")for(let g=0;g<h.length;g+=4)t.push([f,h[g],h[g+1],h[g+2],h[g+3]]);else if(f==="A")for(let g=0;g<h.length;g+=7)t.push([f,h[g],h[g+1],h[g+2],h[g+3],h[g+4],h[g+5],h[g+6]])}return t.length===0&&t.push(["M",0,0]),t}function cs(u){let t=1/0,e=1/0,s=-1/0,i=-1/0;return u.forEach(a=>{for(let n=1;n<a.length;n+=2)if(n+1<=a.length){let r=a[n],o=a[n+1];typeof r=="number"&&typeof o=="number"&&(r<t&&(t=r),r>s&&(s=r),o<e&&(e=o),o>i&&(i=o))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:e,width:s-t,height:i-e}}function gi(u){return u.map(t=>t.join(" ")).join(" ")}function cn(u){switch(u[0]){case"z":case"Z":u[0]="L",u[1]=this.start[0],u[2]=this.start[1];break;case"H":u[0]="L",u[2]=this.pos[1];break;case"V":u[0]="L",u[2]=u[1],u[1]=this.pos[0];break;case"T":u[0]="Q",u[3]=u[1],u[4]=u[2],u[1]=this.reflection[1],u[2]=this.reflection[0];break;case"S":u[0]="C",u[6]=u[4],u[5]=u[3],u[4]=u[2],u[3]=u[1],u[2]=this.reflection[1],u[1]=this.reflection[0];break}return u}function hn(u){var t=u.length;return this.pos=[u[t-2],u[t-1]],"SCQT".indexOf(u[0])!=-1&&(this.reflection=[2*this.pos[0]-u[t-4],2*this.pos[1]-u[t-3]]),u}function dn(u){var t,e=[u];switch(u[0]){case"M":return this.pos=this.start=[u[1],u[2]],e;case"L":u[5]=u[3]=u[1],u[6]=u[4]=u[2],u[1]=this.pos[0],u[2]=this.pos[1];break;case"Q":u[6]=u[4],u[5]=u[3],u[4]=u[4]*1/3+u[2]*2/3,u[3]=u[3]*1/3+u[1]*2/3,u[2]=this.pos[1]*1/3+u[2]*2/3,u[1]=this.pos[0]*1/3+u[1]*2/3;break;case"A":e=ll((t=this.pos)!=null?t:[],u),u=e[0];break}return u[0]="C",this.pos=[u[5],u[6]],this.reflection=[2*u[5]-u[3],2*u[6]-u[4]],e}function un(u,t){if(t===!1)return!1;for(var e=t,s=u.length;e<s;++e)if(u[e][0]=="M")return e;return!1}function ll(u,t){var e=Math.abs(t[1]),s=Math.abs(t[2]),i=t[3]%360,a=t[4],n=t[5],r=t[6],o=t[7],l=new vt(u[0],u[1]),c=new vt(r,o),h,d,f,g,p,m,b,x,_,w,y,v,A,S,C,M,k,L,E,D,P,F,R=[],N,z,$,W;if(e===0||s===0||l.x===c.x&&l.y===c.y)return[["C",l.x,l.y,c.x,c.y,c.x,c.y]];for(h=new vt((l.x-c.x)/2,(l.y-c.y)/2).transform(new Pe().rotate(i)),d=h.x*h.x/(e*e)+h.y*h.y/(s*s),d>1&&(d=Math.sqrt(d),e=d*e,s=d*s),f=new Pe().rotate(i).scale(1/e,1/s).rotate(-i),l=l.transform(f),c=c.transform(f),g=[c.x-l.x,c.y-l.y],m=g[0]*g[0]+g[1]*g[1],p=Math.sqrt(m),g[0]/=p,g[1]/=p,b=m<4?Math.sqrt(1-m/4):0,a===n&&(b*=-1),x=new vt((c.x+l.x)/2+b*-g[1],(c.y+l.y)/2+b*g[0]),_=new vt(l.x-x.x,l.y-x.y),w=new vt(c.x-x.x,c.y-x.y),y=Math.acos(_.x/Math.sqrt(_.x*_.x+_.y*_.y)),_.y<0&&(y*=-1),v=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(v*=-1),n&&y>v&&(v+=2*Math.PI),!n&&y<v&&(v-=2*Math.PI),S=Math.ceil(Math.abs(y-v)*2/Math.PI),M=[],k=y,A=(v-y)/S,C=4*Math.tan(A/4)/3,P=0;P<=S;P++)E=Math.cos(k),L=Math.sin(k),D=new vt(x.x+E,x.y+L),M[P]=[new vt(D.x+C*L,D.y-C*E),D,new vt(D.x-C*L,D.y+C*E)],k+=A;for(M[0][0]=M[0][1].clone(),M[M.length-1][2]=M[M.length-1][1].clone(),f=new Pe().rotate(i).scale(e,s).rotate(-i),P=0,F=M.length;P<F;P++)M[P][0]=M[P][0].transform(f),M[P][1]=M[P][1].transform(f),M[P][2]=M[P][2].transform(f);for(P=1,F=M.length;P<F;P++)D=M[P-1][2],N=D.x,z=D.y,D=M[P][0],$=D.x,W=D.y,D=M[P][1],r=D.x,o=D.y,R.push(["C",N,z,$,W,r,o]);return R}function cl(u,t,e,s,i,a){for(var n=u.slice(t,e||void 0),r=s.slice(i,a||void 0),o=0,l={pos:[0,0],start:[0,0]},c={pos:[0,0],start:[0,0]};n[o]=cn.call(l,n[o]),r[o]=cn.call(c,r[o]),n[o][0]!=r[o][0]||n[o][0]=="M"||n[o][0]=="A"&&(n[o][4]!=r[o][4]||n[o][5]!=r[o][5])?(Array.prototype.splice.apply(n,[o,1].concat(dn.call(l,n[o]))),Array.prototype.splice.apply(r,[o,1].concat(dn.call(c,r[o])))):(n[o]=hn.call(l,n[o]),r[o]=hn.call(c,r[o])),!(++o==n.length&&o==r.length);)o==n.length&&n.push(["C",l.pos[0],l.pos[1],l.pos[0],l.pos[1],l.pos[0],l.pos[1]]),o==r.length&&r.push(["C",c.pos[0],c.pos[1],c.pos[0],c.pos[1],c.pos[0],c.pos[1]]);return{start:n,dest:r}}function hl(u,t){for(var e=ie(u),s=ie(t),i=0,a=0,n=!1,r=!1,o;!(i===!1&&a===!1);){if(n=un(e,i===!1?!1:i+1),r=un(s,a===!1?!1:a+1),i===!1){let l=cs(o.start);l.height==0||l.width==0?i=e.push(e[0])-1:i=e.push(["M",l.x+l.width/2,l.y+l.height/2])-1}if(a===!1){let l=cs(o.dest);l.height==0||l.width==0?a=s.push(s[0])-1:a=s.push(["M",l.x+l.width/2,l.y+l.height/2])-1}o=cl(e,i,n,s,a,r),e=e.slice(0,i).concat(o.start,n===!1?[]:e.slice(n)),s=s.slice(0,a).concat(o.dest,r===!1?[]:s.slice(r)),i=n===!1?!1:i+o.start.length,a=r===!1?!1:a+o.dest.length}return{start:e,dest:s}}function dl(u,t){var e=hl(u,t),s=e.start,i=e.dest;return function(a){var n=s.map(function(r,o){return i[o].map(function(l,c){return c===0?l:r[c]+(i[o][c]-r[c])*a})});return gi(n)}}var Ut=null,Ce=null;function fn(u,t){let e=new Array(t);if(!H.isBrowser()){let i=ie(u),a=cs(i),n=a.x+a.width/2,r=a.y+a.height/2;for(let o=0;o<t;o++)e[o]={x:n,y:r};return e}Ut||(Ut=document.createElementNS("http://www.w3.org/2000/svg","svg"),Ut.setAttribute("width","0"),Ut.setAttribute("height","0"),Ut.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),Ce=document.createElementNS("http://www.w3.org/2000/svg","path"),Ut.appendChild(Ce),document.body.appendChild(Ut)),Ce.setAttribute("d",u||"M0 0");let s=0;try{s=Ce.getTotalLength()}catch{s=0}if(!s||!isFinite(s)){let i=ie(u),a=cs(i),n=a.x+a.width/2,r=a.y+a.height/2;for(let o=0;o<t;o++)e[o]={x:n,y:r};return e}for(let i=0;i<t;i++)try{let a=Ce.getPointAtLength(i/t*s);e[i]={x:a.x,y:a.y}}catch{e[i]={x:0,y:0}}return e}function ul(u,t,e=96){let s=fn(u,e),i=fn(t,e),a=0,n=1/0;for(let o=0;o<e;o++){let l=0;for(let c=0;c<e;c++){let h=s[(c+o)%e],d=i[c],f=h.x-d.x,g=h.y-d.y;if(l+=f*f+g*g,l>=n)break}l<n&&(n=l,a=o)}let r=new Array(e);for(let o=0;o<e;o++)r[o]=s[(o+a)%e];return function(o){let l="";for(let c=0;c<e;c++){let h=r[c],d=i[c],f=h.x+(d.x-h.x)*o,g=h.y+(d.y-h.y)*o;l+=(c===0?"M":"L")+f.toFixed(3)+" "+g.toFixed(3)+" "}return l+"Z"}}function kr(u){return-Math.cos(u*Math.PI)/2+.5}var Mr=kr;function fl(u){Mr=typeof u=="function"?u:kr}function gn(u){if(!u||typeof u!="string")return null;if(u[0]==="#"){let e=u.slice(1);e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let s=parseInt(e,16);return[s>>16&255,s>>8&255,s&255,1]}let t=u.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]!==void 0?+t[4]:1]:null}function gl(u,t,e){return`rgba(${Math.round(u[0]+(t[0]-u[0])*e)},${Math.round(u[1]+(t[1]-u[1])*e)},${Math.round(u[2]+(t[2]-u[2])*e)},${u[3]+(t[3]-u[3])*e})`}var pi=class u{constructor(t,e,s){this.el=t,this.duration=e??300,this.delay=s||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm="commands",this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(t){return typeof t=="function"&&(this._easing=t),this._schedule(),this}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t,e,s){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._plotSnap=s||null,this._schedule(),this}after(t){return this._afterCb=t,this._schedule(),this}during(t){return this._duringCb=t,this._schedule(),this}animate(t,e){let s=new u(this.el,t,e);return this._next=s,s._root=this._root||this,s}_schedule(){let t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){let t=[],e=this;for(;e;)t.push(e),e=e._next;let s=0;t.forEach(i=>{s+=i.delay,i._execute(s),s+=i.duration})}_execute(t){let e=this.el,s=this.duration;if(s<=1){let a=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e)};t>0?setTimeout(a,t):a();return}let i=()=>{let a={},n={},r={};if(this._attrTarget)for(let d of Object.keys(this._attrTarget)){let f=e.attr(d);a[d]=f;let g=gn(f),p=gn(String(this._attrTarget[d]));g&&p&&(n[d]=g,r[d]=p)}let o=null;if(this._plotTarget){let d=e.attr("d")||"";try{o=this._plotAlgorithm==="polygons"?ul(d,this._plotTarget):dl(d,this._plotTarget)}catch{o=null}}let l=performance.now(),c=this._easing||Mr,h=d=>{let f=d-l,g=Math.min(f/s,1),p=c(g);if(this._attrTarget)if(g>=1)e.attr(this._attrTarget);else{let m={};for(let b of Object.keys(this._attrTarget))if(n[b]&&r[b])m[b]=gl(n[b],r[b],p);else{let x=parseFloat(a[b]),_=parseFloat(this._attrTarget[b]);!isNaN(x)&&!isNaN(_)&&(m[b]=x+(_-x)*p)}e.attr(m)}o&&g<1&&e.attr("d",o(p)),this._duringCb&&this._duringCb(p),g<1?O.requestAnimationFrame(h):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};O.requestAnimationFrame(h)};t>0?setTimeout(i,t):i()}};function pl(u){u.prototype.animate=function(t,e){return new pi(this,t,e)}}function Lr(u){return-Math.cos(u*Math.PI)/2+.5}function ml(u,t,e,s){u=Math.min(Math.max(u,0),1),e=Math.min(Math.max(e,0),1);let i=3*u,a=3*(e-u)-i,n=1-i-a,r=3*t,o=3*(s-t)-r,l=1-r-o,c=f=>((n*f+a)*f+i)*f,h=f=>((l*f+o)*f+r)*f,d=f=>{let g=0,p=1,m=f;if(m<g)return g;if(m>p)return p;for(;g<p;){let b=c(m);if(Math.abs(b-f)<1e-4)return m;f>b?g=m:p=m,m=(g+p)/2}return m};return f=>f<=0?0:f>=1?1:h(d(f))}var xt=new Map,xl=u=>u;xt.set("linear",xl);xt.set("easeInOutSine",Lr);xt.set("easeInSine",u=>1-Math.cos(u*Math.PI/2));xt.set("easeOutSine",u=>Math.sin(u*Math.PI/2));xt.set("easeInQuad",u=>u*u);xt.set("easeOutQuad",u=>1-(1-u)*(1-u));xt.set("easeInOutQuad",u=>u<.5?2*u*u:1-Math.pow(-2*u+2,2)/2);xt.set("easeInCubic",u=>u*u*u);xt.set("easeOutCubic",u=>1-Math.pow(1-u,3));xt.set("easeInOutCubic",u=>u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2);xt.set("easeOutBack",u=>1+2.70158*Math.pow(u-1,3)+1.70158*Math.pow(u-1,2));xt.set("easeInOutBack",u=>{let e=2.5949095;return u<.5?Math.pow(2*u,2)*((e+1)*2*u-e)/2:(Math.pow(2*u-2,2)*((e+1)*(u*2-2)+e)+2)/2});function bl(u,t){typeof u=="string"&&u&&typeof t=="function"&&xt.set(u,t)}function yl(u){return Array.isArray(u)&&u.length===4&&u.every(t=>typeof t=="number")}function hs(u){return typeof u=="function"?pn(u):yl(u)?ml(u[0],u[1],u[2],u[3]):typeof u=="string"&&xt.has(u)?pn(xt.get(u)):Lr}function pn(u){return t=>{let e=u(t);return typeof e=="number"&&isFinite(e)?e:t}}var Ws="http://www.w3.org/2000/svg";function mn(u){return 1-Math.pow(1-u,3)}function wl(u){return 1+2.70158*Math.pow(u-1,3)+1.70158*Math.pow(u-1,2)}var Hs=null;function ks(){if(!H.isBrowser())return!1;try{return Hs||(Hs=window.matchMedia("(prefers-reduced-motion: reduce)")),!!Hs.matches}catch{return!1}}function Dt(u,t,e){if(!H.isBrowser()||e.globals.dataChanged||e.globals.resized)return!1;let s=e.config.chart.animations;if(!s||s.enabled===!1)return!1;let i=e.config.chart.type;if(i!=="line"&&i!=="area"&&i!=="rangeArea"||!(e.layout.gridWidth>0))return!1;let a=(s.speed||800)*2,n=Math.max(0,Math.min(1,t/e.layout.gridWidth)),o=(1-Math.cbrt(1-n))*a,c=u.node.style;c.opacity="0";let h=null,d=f=>{h===null&&(h=f),f-h>=o?c.opacity="":O.requestAnimationFrame(d)};return O.requestAnimationFrame(d),!0}function xn(u){let t=u.config.chart.animations;t&&(t.respectReducedMotion!==!1&&ks()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1)),fl(hs(t.easing)))}function Ya(u){let t=u.style,e=u.index||0,s=typeof u.baseDelay=="number"?u.baseDelay:40,i=u.row||0,a=u.col||0,n=u.groupIndex||0,r=u.perGroup||1,o=u.centerDistance||0;switch(t){case"none":return 0;case"diagonal":return(i+a)*s;case"group":return n*s+e%r*(s/4);case"centroid":return o*s*(e+1);default:return e*s}}var St=class{constructor(t,e){this.w=t,this.ctx=e}animateLine(t,e,s,i){t.attr(e).animate(i).attr(s)}animateMarker(t,e,s,i){t.attr({opacity:0}).animate(e).attr({opacity:1}).after(()=>{i()})}animatePop(t,{speed:e,delay:s=0,onComplete:i}){let a=this.w;if(!H.isBrowser()||!a.globals.shouldAnimate||e<1){i&&i();return}let r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";let o=performance.now()+s,l=c=>{if(a.globals.isDestroyed)return;let h=Math.max(0,Math.min(1,(c-o)/e));r.transform=`scale(${wl(h)})`,r.opacity=String(Math.min(1,h*2)),h<1?O.requestAnimationFrame(l):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",i&&i())};O.requestAnimationFrame(l)}animateRect(t,e,s,i,a,n=0){t.attr(e).animate(i,n).attr(s).after(()=>a())}animatePathsGradually(t){let{el:e,realIndex:s,j:i,fill:a,pathFrom:n,pathTo:r,pathToInterp:o,speed:l,delay:c,scrollMorph:h}=t,d=this,f=this.w,g=0;f.config.chart.animations.animateGradually.enabled&&(g=f.config.chart.animations.animateGradually.delay),f.config.chart.animations.dynamicAnimation.enabled&&f.globals.dataChanged&&f.config.chart.type!=="bar"&&(g=0),d.morphSVG(e,s,i,f.config.chart.type==="line"&&!f.globals.comboCharts?"stroke":a,n,r,l,c*g,h,o)}revealBulk(t){let e=this.w;if(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node}),!H.isBrowser()||!e.globals.shouldAnimate){this.animationCompleted(t);return}e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,O.requestAnimationFrame(()=>{e.globals.isDestroyed||(e.globals.bulkRevealScheduled=!1,this.animationCompleted(t))}))}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{if(t.holdUntilComplete&&!this.w.globals.animationEnded)return;let e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(t){let e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),typeof e.config.chart.events.animationEnd=="function"&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}animateDraw(t,{realIndex:e,j:s,isFill:i,isLast:a,speed:n,delay:r,mask:o}){let l=this.w,c=this,h=()=>{a&&l.globals.shouldAnimate&&c.animationCompleted(t),c.showDelayedElements()};if(!H.isBrowser()||!l.globals.shouldAnimate||n<1){h();return}let d=t.node,f=()=>{let m=o&&o.type==="radial",b=l.layout.gridWidth+8,x=o&&o.cx||0,_=o&&o.cy||0,w=(o&&o.r||l.layout.gridWidth/2)+4,y=`apexDrawMask${l.globals.cuid}-${e}-${s??0}-${i?"f":"s"}`,v=O.createElementNS(Ws,"mask");v.setAttribute("id",y),v.setAttribute("maskUnits","userSpaceOnUse");let A;if(m){let M=w;v.setAttribute("x",String(x-M)),v.setAttribute("y",String(_-M)),v.setAttribute("width",String(M*2)),v.setAttribute("height",String(M*2)),A=O.createElementNS(Ws,"circle"),A.setAttribute("cx",String(x)),A.setAttribute("cy",String(_)),A.setAttribute("r","0"),A.setAttribute("fill","#fff")}else v.setAttribute("x",String(-4)),v.setAttribute("y",String(-4)),v.setAttribute("width",String(b)),v.setAttribute("height",String(l.layout.gridHeight+8)),A=O.createElementNS(Ws,"rect"),A.setAttribute("x",String(-4)),A.setAttribute("y",String(-4)),A.setAttribute("width","0"),A.setAttribute("height",String(l.layout.gridHeight+8)),A.setAttribute("fill","#fff");v.appendChild(A),l.dom.elDefs.node.appendChild(v),d.setAttribute("mask",`url(#${y})`);let S=performance.now()+(r||0),C=M=>{if(l.globals.isDestroyed)return;let k=Math.max(0,Math.min(1,(M-S)/n)),L=mn(k);m?A.setAttribute("r",String(L*w)):A.setAttribute("width",String(L*b)),k<1?O.requestAnimationFrame(C):(d.removeAttribute("mask"),v.parentNode&&v.parentNode.removeChild(v),h())};O.requestAnimationFrame(C)},g=p=>{d.setAttribute("stroke-dasharray",String(p)),d.setAttribute("stroke-dashoffset",String(p));let m=performance.now()+(r||0),b=x=>{if(l.globals.isDestroyed)return;let _=Math.max(0,Math.min(1,(x-m)/n));d.setAttribute("stroke-dashoffset",String(p*(1-mn(_)))),_<1?O.requestAnimationFrame(b):(d.removeAttribute("stroke-dasharray"),d.removeAttribute("stroke-dashoffset"),h())};O.requestAnimationFrame(b)};O.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(i){f();return}let p=d.getAttribute("stroke-dasharray");if(!!p&&p!=="0"&&p!==""){f();return}let b=0;try{typeof d.getTotalLength=="function"&&(b=d.getTotalLength())}catch{b=0}if(!b){h();return}g(b)})}morphSVG(t,e,s,i,a,n,r,o,l,c){var h,d;let f=this.w;a||(a=t.attr("pathFrom")),n||(n=t.attr("pathTo"));let g=()=>(f.config.chart.type==="radar"&&(r=1),`M 0 ${f.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=g()),(!n.trim()||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=g(),c=void 0),c&&(!c.trim()||c.indexOf("undefined")>-1||c.indexOf("NaN")>-1)&&(c=void 0),f.globals.shouldAnimate||(r=1);let m=((d=(h=this.ctx)==null?void 0:h.morphTypeChange)==null?void 0:d.isActive())===!0?"polygons":"commands",b=null;if(f.globals.dataChanged){let _=f.config.chart.animations.dynamicAnimation.easing;_!=null?b=hs(_):l&&(b=hs("linear"))}let x=t.plot(a).animate(1,o).plot(a).animate(r,o);b&&x.ease(b),x.plot(c||n,m,c?n:void 0).after(()=>{if(T.isNumber(s)){let _=f.seriesData.series[f.globals.maxValsInArrayIndex];_&&s===_.length-2&&f.globals.shouldAnimate&&this.animationCompleted(t)}else i!=="none"&&f.globals.shouldAnimate&&(!f.globals.comboCharts&&e===f.seriesData.series.length-1||f.globals.comboCharts)&&this.animationCompleted(t);this.showDelayedElements()})}},bn={lighten:.15,darken:.35},at=class u{constructor(t){this.w=t}static isSliceChart(t){let e=t.config.chart.type;return e==="pie"||e==="donut"||e==="polarArea"}static hoverOutlineOwnsHoverState(t){var e;return u.isSliceChart(t)&&t.config.states.hover.filter.type!=="none"&&((e=t.config.plotOptions.pie.hoverOutline)==null?void 0:e.show)===!0}static sliceOffsetOwnsActiveState(t){return u.isSliceChart(t)&&t.config.chart.type!=="polarArea"&&t.config.plotOptions.pie.expandOnClick===!0&&t.config.plotOptions.pie.expandOffset>0&&!u.drilldownBlocksSliceOffset(t)}static drilldownBlocksSliceOffset(t){var e;return u.isSliceChart(t)&&((e=t.config.drilldown)==null?void 0:e.enabled)===!0}getDefaultFilter(t,e){let s=this.w;t.unfilter&&t.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(t,s.config.chart.dropShadow,e)}applyFilter(t,e,s,i){var a,n,r;let o=this.w;if(t.unfilter&&t.unfilter(!0),s==="none"){this.getDefaultFilter(t,e);return}let l=o.config.chart.dropShadow,c=s==="lighten"?bn.lighten:bn.darken,h=Math.max(0,Math.min(1,typeof i=="number"?i:c)),d=1-h,f=s==="lighten"?h:0;t.filterWith&&(t.filterWith(g=>{g.colorMatrix({type:"matrix",values:`
|
|
${d} 0 0 0 ${f}
|
|
0 ${d} 0 0 ${f}
|
|
0 0 ${d} 0 ${f}
|
|
0 0 0 1 0
|
|
`,in:"SourceGraphic",result:"brightness"}),l.enabled&&this.addShadow(g,e,l,"brightness")}),l.noUserSpaceOnUse||(n=(a=t.filterer())==null?void 0:a.node)==null||n.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((r=t.filterer())==null?void 0:r.node))}addShadow(t,e,s,i){var a;let n=this.w,{blur:r,top:o,left:l,color:c,opacity:h}=s;if(c=Array.isArray(c)?c[e]:c,((a=n.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.length)>0&&n.config.chart.dropShadow.enabledOnSeries.indexOf(e)===-1)return t;t.offset({in:i,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:r,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":h,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}dropShadow(t,e,s=0){var i,a,n,r,o;let l=this.w;return t.unfilter&&t.unfilter(!0),T.isMsEdge()&&l.config.chart.type==="radialBar"||((i=l.config.chart.dropShadow.enabledOnSeries)==null?void 0:i.length)>0&&((a=l.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.indexOf(s))===-1||t.filterWith&&(t.filterWith(c=>{this.addShadow(c,s,e,"SourceGraphic")}),e.noUserSpaceOnUse||(r=(n=t.filterer())==null?void 0:n.node)==null||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((o=t.filterer())==null?void 0:o.node)),t}setSelectionFilter(t,e,s){let i=this.w;if(typeof i.interact.selectedDataPoints[e]<"u"&&i.interact.selectedDataPoints[e].indexOf(s)>-1){if(t.node.setAttribute("selected",!0),u.sliceOffsetOwnsActiveState(i))return;let a=i.config.states.active.filter;a.type!=="none"&&this.applyFilter(t,e,a.type,a.value)}}_scaleFilterSize(t){if(!t)return;(s=>{for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&t.setAttribute(i,s[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}},B=class u{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){t.indexOf("NaN")>-1&&(t="");function s(C,M,k){var L=M.x-C.x,E=M.y-C.y,D=Math.sqrt(L*L+E*E);return i(C,M,Math.min(1,k/D))}function i(C,M,k){return{x:C.x+(M.x-C.x)*k,y:C.y+(M.y-C.y)*k}}function a(C,M){C.length>2&&(C[C.length-2]=M.x,C[C.length-1]=M.y)}function n(C){return{x:parseFloat(C[C.length-2]),y:parseFloat(C[C.length-1])}}var r=t.split(/[,\s]/).reduce(function(C,M){var k=M.match(/^([a-zA-Z])(.+)/);return k?(C.push(k[1]),C.push(k[2])):C.push(M),C},[]),o=r.reduce(function(C,M){return parseFloat(M)==M&&C.length?C[C.length-1].push(M):C.push([M]),C},[]),l=[];if(o.length>1){var c=n(o[0]),h=null;o[o.length-1][0]=="Z"&&o[0].length>2&&(h=["L",c.x,c.y],o[o.length-1]=h),l.push(o[0]);for(var d=1;d<o.length;d++){var f=l[l.length-1],g=o[d],p=g==h?o[1]:o[d+1];if(p&&f&&f.length>2&&g[0]=="L"&&p.length>2&&p[0]=="L"){var m=n(f),b=n(g),x=n(p),_,w;_=s(b,m,e),w=s(b,x,e),a(g,_),g.origPoint=b,l.push(g);var y=i(_,b,.5),v=i(b,w,.5),A=["C",y.x,y.y,v.x,v.y,w.x,w.y];A.origPoint=b,l.push(A)}else l.push(g)}if(h){var S=n(l[l.length-1]);l.push(["Z"]),a(l[0],S)}}else l=o;return l.reduce(function(C,M){return C+M.join(" ")+" "},"")}drawLine(t,e,s,i,a="#a8a8a8",n=0,r=null,o="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":n,"stroke-width":r,"stroke-linecap":o})}drawRect(t=0,e=0,s=0,i=0,a=0,n="#fefefe",r=1,o=null,l=null,c=0){let d=this.w.dom.Paper.rect();return d.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,rx:a,ry:a,opacity:r,"stroke-width":o!==null?o:0,stroke:l!==null?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",n),d}drawPolygon(t,e="#e1e1e1",s=1,i="none"){return this.w.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":s})}drawCircle(t,e=null){let s=this.w;t<0&&(t=0);let i=s.dom.Paper.circle(t*2);return e!==null&&i.attr(e),i}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,fillOpacity:a=1,strokeOpacity:n=1,classes:r,strokeLinecap:o=null,strokeDashArray:l=0}){let c=this.w;return o===null&&(o=c.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${c.layout.gridHeight}`),c.dom.Paper.path(t).attr({fill:i,"fill-opacity":a,stroke:e,"stroke-opacity":n,"stroke-linecap":o,"stroke-width":s,"stroke-dasharray":l,class:r})}group(t=null){let s=this.w.dom.Paper.group();return t!==null&&s.attr(t),s}move(t,e){return["M",t,e].join(" ")}line(t,e,s=null){return s==="H"?[" H",t].join(" "):s==="V"?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,s,i,a,n){return["C",t,e,s,i,a,n].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,n,r,o=!1){let l="A";return o&&(l="a"),[l,t,e,s,i,a,n,r].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,stroke:n,strokeWidth:r,strokeLinecap:o,fill:l,animationDelay:c,initialSpeed:h,dataChangeSpeed:d,className:f,chartType:g,shouldClipToGrid:p=!0,bindEventsOnPaths:m=!0,drawShadow:b=!0,drawMask:x=null,scrollMorph:_=!1}){var w,y,v,A;let S=this.w,C=new at(this.w),M=new St(this.w,(w=this.ctx)!=null?w:void 0),k=this.w.config.chart.animations.enabled,L=k&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0 ")&&i){let Z=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);Z&&(s=s.replace(/^M\s+0\s+0/,Z[0]))}let E,D=((v=(y=this.ctx)==null?void 0:y.morphTypeChange)==null?void 0:v.isActive())===!0,P=!!(k&&!S.globals.resized||L&&S.globals.dataChanged&&S.globals.shouldAnimate||D&&k&&S.globals.shouldAnimate),F=typeof f=="string"&&(f.indexOf("apexcharts-line")>-1||f.indexOf("apexcharts-area")>-1||f.indexOf("apexcharts-rangeArea")>-1||f.indexOf("apexcharts-radar")>-1),R=!!(k&&!S.globals.resized&&!S.globals.dataChanged&&F),N=(A=S.config.chart.animations.largeDatasetThreshold)!=null?A:0,z=!!(P&&!R&&N>0&&S.globals.dataPoints>N),W=!!((g==="candlestick"||g==="boxPlot")&&P&&!R&&S.globals.dataChanged&&!D),Y=z||W;P&&!R&&!Y?E=s:(E=i,P||(S.globals.animationEnded=!0));let I=S.config.stroke.dashArray,U=0;Array.isArray(I)?U=I[e]:U=S.config.stroke.dashArray;let X=this.drawPath({d:E,stroke:n,strokeWidth:r,fill:l,fillOpacity:1,classes:f,strokeLinecap:o,strokeDashArray:U});X.attr("index",e),p&&(g==="bar"&&!S.globals.isBarHorizontal||S.globals.comboCharts?X.attr({"clip-path":`url(#gridRectBarMask${S.globals.cuid})`}):X.attr({"clip-path":`url(#gridRectMask${S.globals.cuid})`})),S.config.chart.dropShadow.enabled&&b&&C.dropShadow(X,S.config.chart.dropShadow,e),m&&(X.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,X)),X.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,X)),X.node.addEventListener("mousedown",this.pathMouseDown.bind(this,X))),X.attr({pathTo:i,pathFrom:s});let V={el:X,j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,fill:l,strokeWidth:r,delay:c,scrollMorph:_};if(k&&!S.globals.resized&&!S.globals.dataChanged)if(R){let Z=h*2,K=n==="none"||r===0,Q=S.seriesData.series.length,tt=S.globals.comboCharts?!0:e===Q-1;M.animateDraw(X,{realIndex:e,j:t,isFill:K,isLast:tt,speed:Z,delay:0,mask:x})}else Y||M.animatePathsGradually(j(G({},V),{speed:h}));else(S.globals.resized||!S.globals.dataChanged)&&!Y&&M.showDelayedElements();return P&&!Y&&(S.globals.dataChanged&&L||D)&&M.animatePathsGradually(j(G({},V),{speed:d})),Y&&M.revealBulk(X),X}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,o=>{t==="horizontalLines"?o.line(0,0,s,0).stroke({color:i,width:a+1}):t==="verticalLines"?o.line(0,0,0,e).stroke({color:i,width:a+1}):t==="slantedLines"?o.line(0,0,e,s).stroke({color:i,width:a}):t==="squares"?o.rect(e,s).fill("none").stroke({color:i,width:a}):t==="circles"&&o.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,n=null,r=null,o=[],l=0,c=!1){let h=this.w,d;e.length<9&&e.indexOf("#")===0&&(e=T.hexToRgba(e,i)),s.length<9&&s.indexOf("#")===0&&(s=T.hexToRgba(s,a));let f=0,g=1,p=1,m=null;r!==null&&(f=typeof r[0]<"u"?r[0]/100:0,g=typeof r[1]<"u"?r[1]/100:1,p=typeof r[2]<"u"?r[2]/100:1,m=typeof r[3]<"u"?r[3]/100:null);let b=h.config.chart.type==="donut"||h.config.chart.type==="pie"||h.config.chart.type==="polarArea"||h.config.chart.type==="bubble";if(!o||o.length===0?d=h.dom.Paper.gradient(b?"radial":"linear",x=>{x.stop(f,e,i),x.stop(g,s,a),x.stop(p,s,a),m!==null&&x.stop(m,e,i)}):d=h.dom.Paper.gradient(b?"radial":"linear",x=>{(Array.isArray(o[l])?o[l]:Array.isArray(o[0])?o[0]||[]:o).forEach(w=>{x.stop(w.offset/100,w.color,w.opacity)})}),!b)t==="vertical"?c?(d.attr({gradientUnits:"userSpaceOnUse"}),d.from(0,0).to(0,h.layout.gridHeight)):d.from(0,0).to(0,1):t==="diagonal"?d.from(0,0).to(1,1):t==="horizontal"?d.from(0,1).to(1,1):t==="diagonal2"&&d.from(1,0).to(0,1);else{let x=h.layout.gridWidth/2,_=h.layout.gridHeight/2;h.config.chart.type!=="bubble"?d.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:_,r:n}):d.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}return d}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){let a=this.getTextRects(t,s,i,""),n=a.width/t.length,r=Math.floor(e/n);return e<a.width?t.slice(0,r-3)+"...":t}drawText({x:t,y:e,text:s,textAnchor:i,fontSize:a,fontFamily:n,fontWeight:r,foreColor:o,opacity:l,maxWidth:c,cssClass:h="",isPlainText:d=!0,dominantBaseline:f="auto"}){let g=this.w;typeof s>"u"&&(s="");let p=s;i||(i="start"),(!o||!o.length)&&(o=g.config.chart.foreColor),n=n||g.config.chart.fontFamily,a=a||"11px",r=r||"regular";let m={maxWidth:c,fontSize:a,fontFamily:n},b;return Array.isArray(s)?b=g.dom.Paper.text(x=>{for(let _=0;_<s.length;_++)p=s[_],c&&(p=this.getTextBasedOnMaxWidth(G({text:s[_]},m))),_===0?x.tspan(p):x.tspan(p).newLine()}):(c&&(p=this.getTextBasedOnMaxWidth(G({text:s},m))),b=d?g.dom.Paper.plain(s):g.dom.Paper.text(x=>x.tspan(p))),b.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":f,"font-size":a,"font-family":n,"font-weight":r,fill:o,class:"apexcharts-text "+h}),b.node.style.fontFamily=n,b.node.style.opacity=l,b}getMarkerPath(t,e,s,i){let f="";switch(s){case"cross":i=i/1.4,f=`M ${t-i} ${e-i} L ${t+i} ${e+i} M ${t-i} ${e+i} L ${t+i} ${e-i}`;break;case"plus":i=i/1.12,f=`M ${t-i} ${e} L ${t+i} ${e} M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let g=5;i=i*1.15,s==="sparkle"&&(i=i/1.1,g=4);let p=Math.PI/g;for(let m=0;m<=2*g;m++){let b=m*p,x=m%2===0?i:i/2,_=t+x*Math.sin(b),w=e-x*Math.cos(b);f+=(m===0?"M":"L")+_+","+w}f+="Z";break}case"triangle":f=`M ${t} ${e-i}
|
|
L ${t+i} ${e+i}
|
|
L ${t-i} ${e+i}
|
|
Z`;break;case"square":case"rect":i=i/1.125,f=`M ${t-i} ${e-i}
|
|
L ${t+i} ${e-i}
|
|
L ${t+i} ${e+i}
|
|
L ${t-i} ${e+i}
|
|
Z`;break;case"diamond":i=i*1.05,f=`M ${t} ${e-i}
|
|
L ${t+i} ${e}
|
|
L ${t} ${e+i}
|
|
L ${t-i} ${e}
|
|
Z`;break;case"line":i=i/1.1,f=`M ${t-i} ${e}
|
|
L ${t+i} ${e}`;break;default:i=i*2,f=`M ${t}, ${e}
|
|
m -${i/2}, 0
|
|
a ${i/2},${i/2} 0 1,0 ${i},0
|
|
a ${i/2},${i/2} 0 1,0 -${i},0`;break}return f}drawMarkerShape(t,e,s,i,a){let n=this.drawPath({d:this.getMarkerPath(t,e,s,i),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return n.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),n}drawMarker(t,e,s){t=t||0;let i=s.pSize||0;return T.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,s?.shape,i,G(G({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;let a=this.w,n=new at(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),o=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(!(isNaN(r)||isNaN(o))&&(typeof a.config.chart.events.dataPointMouseEnter=="function"&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}),u._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&!at.hoverOutlineOwnsHoverState(a)&&a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice)){let l=a.config.states.hover.filter;n.applyFilter(t,r,l.type,l.value)}}pathMouseLeave(t,e){var s,i;let a=this.w,n=new at(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),o=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);isNaN(r)||isNaN(o)||(typeof a.config.chart.events.dataPointMouseLeave=="function"&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}),u._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&(at.hoverOutlineOwnsHoverState(a)||a.config.states.hover.filter.type!=="none"&&n.getDefaultFilter(t,r)))}_clearAllDataPointSelections(t,e){let s=this.w;s.interact.selectedDataPoints=[];let i=s.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),a=s.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),n=r=>{Array.prototype.forEach.call(r,o=>{o.node.setAttribute("selected","false"),t.getDefaultFilter(o,e)})};n(i),n(a)}_togglePointSelection(t,e,s,i){let a=this.w;if(t.node.getAttribute("selected")==="true"){t.node.setAttribute("selected","false");let n=a.interact.selectedDataPoints[s].indexOf(i);return n>-1&&a.interact.selectedDataPoints[s].splice(n,1),"false"}return!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(e,s),t.node.setAttribute("selected","true"),typeof a.interact.selectedDataPoints[s]>"u"&&(a.interact.selectedDataPoints[s]=[]),a.interact.selectedDataPoints[s].push(i),"true"}_applyPointSelectionFilter(t,e,s,i){let a=this.w;if(!at.sliceOffsetOwnsActiveState(a)){if(i==="true"){let n=a.config.states.active.filter;if(n!=="none")e.applyFilter(t,s,n.type,n.value);else if(a.config.states.hover.filter!=="none"&&!a.interact.isTouchDevice){let r=a.config.states.hover.filter;e.applyFilter(t,s,r.type,r.value)}}else if(a.config.states.active.filter.type!=="none")if(a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice){let n=a.config.states.hover.filter;e.applyFilter(t,s,n.type,n.value)}else e.getDefaultFilter(t,s)}}pathMouseDown(t,e){var s,i;let a=this.w,n=new at(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),o=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(isNaN(r)||isNaN(o))return;let l=a.config.chart.link;if(!!!(l&&(typeof l.dimension=="function"||l.enabled))){let h=this._togglePointSelection(t,n,r,o);this._applyPointSelectionFilter(t,n,r,h)}typeof a.config.chart.events.dataPointSelection=="function"&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:o,w:a}),e&&u._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:o,w:a}])}rotateAroundCenter(t){let e={};t&&typeof t.getBBox=="function"&&(e=t.getBBox());let s=e.x+e.width/2,i=e.y+e.height/2;return{x:s,y:i}}setupEventDelegation(t,e){let s=null;t.node.addEventListener("mouseover",i=>{let a=u._findDelegateTarget(i.target,t.node,e);!a||a===s||(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener("mouseout",i=>{if(!s)return;(i.relatedTarget?u._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",i=>{let a=u._findDelegateTarget(i.target,t.node,e);a&&a.instance&&this.pathMouseDown(a.instance,i)})}static _fireEvent(t,e,s){let i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;let a=i[e];for(let n=0;n<a.length;n++)a[n].apply(null,s)}static _findDelegateTarget(t,e,s){for(;t&&t!==e&&t!==document;){if(t.matches&&t.matches(s))return t;t=t.parentNode}return null}static setAttrs(t,e){for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])}getTextRects(t,e,s,i,a=!0){let n=this.w,r=[t,e,s,i,a].join("\0"),o=n.globals.textRectsCache;if(o&&o.has(r))return o.get(r);let l=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,foreColor:"#fff",opacity:0});i&&l.attr("transform",i),n.dom.Paper.add(l);let c=l.bbox(),h=c.y;a||(c=l.node.getBoundingClientRect()),l.remove();let d={width:c.width,height:c.height,centerOffset:a?h+c.height/2- -200:0};return o&&o.set(r,d),d}placeTextWithEllipsis(t,e,s){if(typeof t.getComputedTextLength=="function"&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=s/1.1)){for(let i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=s/1.1){t.textContent=e.substring(0,i)+"...";return}t.textContent="."}}},pt=class{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){let e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),n=i>a?i:a,r=t.image,o=0,l=0;typeof t.width>"u"&&typeof t.height>"u"?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(o=s.fill.image.width+1,l=s.fill.image.height):(o=n+1,l=n):(o=t.width,l=t.height);let c=O.createElementNS(et,"pattern");B.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});let h=O.createElementNS(et,"image");c.appendChild(h);let d=H.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(d.xlink,"href",r),B.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),h.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(c)}getSeriesIndex(t){let e=this.w,s=e.config.chart.type;return(s==="bar"||s==="rangeBar")&&e.config.plotOptions.bar.distributed||s==="heatmap"||s==="treemap"?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}getSeriesAxisRange(t){var e,s,i;let a=this.w,n=(s=(e=a.globals.seriesYAxisReverseMap)==null?void 0:e[t])!=null?s:0;return{minY:T.isNumber(a.globals.minYArr[t])?a.globals.minYArr[t]:a.globals.minY,maxY:T.isNumber(a.globals.maxYArr[t])?a.globals.maxYArr[t]:a.globals.maxY,reversed:!!((i=a.config.yaxis[n])!=null&&i.reversed)}}computeColorStops(t,e){let s=this.w,{threshold:i,colorAboveThreshold:a,colorBelowThreshold:n}=e,{minY:r,maxY:o}=t,l=o-r,c=l===0?i>o?0:100:(o-i)/l*100;t.reversed&&(c=100-c),c=Math.max(0,Math.min(c,100));let h=Array.isArray(s.config.fill.opacity)?s.config.fill.opacity[this.seriesIndex]:s.config.fill.opacity,d={offset:c,color:a,opacity:h},f={offset:c,color:n,opacity:h};return t.reversed?[f,d]:[d,f]}fillPath(t){var e,s,i,a;let n=this.w;this.opts=t;let r=this.w.config,o,l,c;this.seriesIndex=this.getSeriesIndex(t);let h=r.plotOptions.line.colors.colorAboveThreshold&&r.plotOptions.line.colors.colorBelowThreshold,f=this.getFillColors()[this.seriesIndex];n.seriesData.seriesColors[this.seriesIndex]!==void 0&&(f=n.seriesData.seriesColors[this.seriesIndex]),typeof f=="function"&&(f=f({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:n}));let g=t.fillType?t.fillType:this.getFillType(this.seriesIndex),p=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity,m=g==="gradient"||h;t.color&&(f=t.color);let b=n.config.series[this.seriesIndex];(s=(e=b?.data)==null?void 0:e[t.dataPointIndex])!=null&&s.fillColor&&(f=(a=(i=b?.data)==null?void 0:i[t.dataPointIndex])==null?void 0:a.fillColor),f||(f="#fff",console.warn("undefined color - ApexCharts")),t.opacity!==void 0&&t.opacity!==null&&(p=t.opacity);let x=f;T.isCSSVariable(f)?x=T.applyOpacityToColor(f,p):f.indexOf("rgb")===-1?f.indexOf("#")===-1?x=f:f.length<9&&(x=T.hexToRgba(f,p)):f.indexOf("rgba")>-1?p=T.getOpacityFromRGBA(f):x=T.hexToRgba(T.rgb2hex(f),p);let _=T.isCSSVariable(f)?T.getThemeColor(f):f;if(g==="pattern"&&(l=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:l,fillColor:_,defaultColor:x})),m){let w=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[],y=r.fill.gradient.type;h&&(w[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),r.plotOptions.line.colors),y="vertical"),c=this.handleGradientFill({type:y,fillConfig:t.fillConfig,fillColor:_,fillOpacity:p,colorStops:w,i:this.seriesIndex,verticalUserSpace:h})}if(g==="image"){let w=r.fill.image.src,y=t.patternID?t.patternID:"",v=`pattern${n.globals.cuid}${t.seriesNumber+1}${y}`;this.patternIDs.indexOf(v)===-1&&(this.clippedImgArea({opacity:p,image:Array.isArray(w)?t.seriesNumber<w.length?w[t.seriesNumber]:w[0]:w,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:v}),this.patternIDs.push(v)),o=`url(#${v})`}else m?o=c:g==="pattern"?o=l:o=x;return t.solid&&(o=x),o}getFillType(t){let e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}getFillColors(){let t=this.w,e=t.config,s=this.opts,i=[];return t.globals.comboCharts?t.config.series[this.seriesIndex].type==="line"?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors):e.chart.type==="line"?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors),typeof s.fillColors<"u"&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}handlePatternFill({fillConfig:t,patternFill:e,fillColor:s,defaultColor:i}){let a=this.w.config.fill;t&&(a=t);let n=this.opts,r=new B(this.w),o=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=s;return Array.isArray(a.pattern.style)?typeof a.pattern.style[n.seriesNumber]<"u"?e=r.drawPattern(a.pattern.style[n.seriesNumber],a.pattern.width,a.pattern.height,l,o):e=i:e=r.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,o),e}handleGradientFill({type:t,fillColor:e,fillOpacity:s,fillConfig:i,colorStops:a,i:n,verticalUserSpace:r=!1}){let o=this.w.config.fill;i&&(o=G(G({},o),i));let l=this.opts,c=new B(this.w),h=new T;t=t||o.gradient.type;let d=e,f,g=o.gradient.opacityFrom===void 0?s:Array.isArray(o.gradient.opacityFrom)?o.gradient.opacityFrom[n]:o.gradient.opacityFrom;d.indexOf("rgba")>-1&&(g=T.getOpacityFromRGBA(d));let p=o.gradient.opacityTo===void 0?s:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(o.gradient.gradientToColors===void 0||o.gradient.gradientToColors.length===0)o.gradient.shade==="dark"?f=h.shadeColor(parseFloat(o.gradient.shadeIntensity)*-1,e.indexOf("rgb")>-1?T.rgb2hex(e):e):f=h.shadeColor(parseFloat(o.gradient.shadeIntensity),e.indexOf("rgb")>-1?T.rgb2hex(e):e);else if(o.gradient.gradientToColors[l.seriesNumber]){let m=o.gradient.gradientToColors[l.seriesNumber];f=m,m.indexOf("rgba")>-1&&(p=T.getOpacityFromRGBA(m))}else f=e;if(o.gradient.gradientFrom&&(d=o.gradient.gradientFrom),o.gradient.gradientTo&&(f=o.gradient.gradientTo),o.gradient.inverseColors){let m=d;d=f,f=m}return d.indexOf("rgb")>-1&&(d=T.rgb2hex(d)),f.indexOf("rgb")>-1&&(f=T.rgb2hex(f)),c.drawGradient(t,d,f,g,p,l.size,o.gradient.stops,a,n,r)}},yn=["none","lighten","darken"];function ae(u,t){let e=u&&u.renderer;return e&&e.kind&&e.kind!=="svg"?e:t}function vl(u){let t=u.config.series||[],e=u.config.chart.type,s=e==="scatter"||e==="bubble",i=u.config.markers&&u.config.markers.size,a=Array.isArray(i)?i.some(h=>h>0):(i||0)>0,n=!!(u.config.dataLabels&&u.config.dataLabels.enabled),r=e==="heatmap",o=0,l=0;return t.forEach(h=>{let d=Array.isArray(h.data)?h.data.length:0;d>l&&(l=d),(s||a||r)&&(o+=d),n&&(o+=d)}),l>=5e4&&(o=Math.max(o,l)),o}function wn(u){var t,e;let s=u.config.fill&&u.config.fill.type,i=l=>l==="pattern"||l==="image"||l==="gradient";if(Array.isArray(s)?s.some(i):i(s))return!0;let a=(e=(t=u.config.plotOptions)==null?void 0:t.line)==null?void 0:e.colors;if(a&&a.colorAboveThreshold&&a.colorBelowThreshold)return!0;let n=u.config.states||{},r=n.hover&&n.hover.filter&&n.hover.filter.type,o=n.active&&n.active.filter&&n.active.filter.type;return!!(r&&!yn.includes(r)||o&&!yn.includes(o))}var zt=class{constructor(t,e){this.w=t,this.ctx=e,this._filters=new at(this.w),this._graphics=new B(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1}setGlobalMarkerSize(){let t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.seriesData.series.length+1)for(let e=0;e<=t.seriesData.series.length;e++)typeof t.globals.markers.size[e]>"u"&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size)}plotChartMarkers({pointsPos:t,seriesIndex:e,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:n=!1}){let r=this.w,o=e,l=t,c=null,h=new B(this.w),d=ae(this.ctx,h),f=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(let g=0;g<l.x.length;g++){let p,m=s,b=!T.isNumber(l.y[g]);r.globals.markers.largestSize===0&&r.globals.hasNullValues&&r.seriesData.series[o][s+1]!==null&&!n&&(b=!0),s===1&&g===0&&(m=0),s===1&&g===1&&(m=1);let x="apexcharts-marker";if((r.config.chart.type==="line"||r.config.chart.type==="area")&&!r.globals.comboCharts&&!r.config.tooltip.intersect&&(x+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[e]>0:r.config.markers.size>0)||a||f){d.kind==="canvas"&&(typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e][m]=[l.x[g],l.y[g]]),b||(x+=` w${T.randomId()}`);let w=this.getMarkerConfig({cssClass:x,seriesIndex:e,dataPointIndex:m}),y=r.config.series[o];if(y.data[m]&&(y.data[m].fillColor&&(w.pointFillColor=y.data[m].fillColor),y.data[m].strokeColor&&(w.pointStrokeColor=y.data[m].strokeColor)),typeof i<"u"&&(w.pSize=i),(l.x[g]<-r.globals.markers.largestSize||l.x[g]>r.layout.gridWidth+r.globals.markers.largestSize||l.y[g]<-r.globals.markers.largestSize||l.y[g]>r.layout.gridHeight+r.globals.markers.largestSize)&&(w.pSize=0),!b){if((r.globals.markers.size[e]>0||a||f)&&!c){let A=!a&&!f;A&&this._seriesWrap&&this._seriesWrapIndex===e?c=this._seriesWrap:(c=d.group({class:A?"apexcharts-series-markers":""}),c.attr("clip-path",`url(#gridRectMarkerMask${r.globals.cuid})`),this.setupMarkerDelegation(c),A&&(this._seriesWrap=c,this._seriesWrapIndex=e))}p=d.drawMarker(l.x[g],l.y[g],w),p.attr("rel",m),p.attr("j",m),p.attr("index",e),p.node.setAttribute("default-marker-size",w.pSize),Dt(p,l.x[g],r),this._filters.setSelectionFilter(p,e,m),c&&c.add(p)}}else typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([l.x[g],l.y[g]])}return c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth:n=null}){let r=this.w,o=this.getMarkerStyle(e),l=a===null?r.globals.markers.size[e]:a,c=r.config.markers;return s!==null&&c.discrete.length&&c.discrete.map(h=>{h.seriesIndex===e&&h.dataPointIndex===s&&(h.strokeColor!==void 0&&(o.pointStrokeColor=h.strokeColor),h.fillColor!==void 0&&(o.pointFillColor=h.fillColor),h.size!==void 0&&(l=h.size),h.shape!==void 0&&(o.pointShape=h.shape))}),{pSize:i===null?l:i,pRadius:i!==null?i:c.radius,pointStrokeWidth:n!==null?n:Array.isArray(c.strokeWidth)?c.strokeWidth[e]:c.strokeWidth,pointStrokeColor:o.pointStrokeColor,pointFillColor:o.pointFillColor,shape:o.pointShape||(Array.isArray(c.shape)?c.shape[e]:c.shape),class:t,pointStrokeOpacity:Array.isArray(c.strokeOpacity)?c.strokeOpacity[e]:c.strokeOpacity,pointStrokeDashArray:Array.isArray(c.strokeDashArray)?c.strokeDashArray[e]:c.strokeDashArray,pointFillOpacity:Array.isArray(c.fillOpacity)?c.fillOpacity[e]:c.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){let e=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{e.config.markers.onClick&&B._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}),t.node.addEventListener("dblclick",i=>{e.config.markers.onDblClick&&B._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}),t.node.addEventListener("touchstart",i=>{let a=B._findDelegateTarget(i.target,t.node,s);a&&a.instance&&this._graphics.pathMouseDown(a.instance,i)},{passive:!0})}getMarkerStyle(t){let e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors,a=Array.isArray(i)?i[t]:i,n=Array.isArray(s)?s[t]:s;return{pointStrokeColor:a,pointFillColor:n}}},ds=class{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new St(this.w),this.filters=new at(this.w),this.fill=new pt(this.w),this.markers=new zt(this.w,this.ctx),this.graphics=new B(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,s){let i=this.w,a=this.graphics,n=ae(this.ctx,a),r=s.realIndex,o=s.pointsPos,l=s.zRatio,c=s.elParent,h=this._elPointsWrap;if((!h||this._elPointsWrapParent!==c)&&(h=n.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`}),h.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(h),c.add(h),this._elPointsWrap=h,this._elPointsWrapParent=c,this._perSeries=this._buildPerSeriesCache(r,n)),Array.isArray(o.x))for(let d=0;d<o.x.length;d++){let f=e+1,g=!0;e===0&&d===0&&(f=0),e===0&&d===1&&(f=1);let p=i.globals.markers.size[r];if(l!==1/0){let x=i.config.plotOptions.bubble;p=i.seriesData.seriesZ[r][f],x.zScaling&&(p/=l),x.minBubbleRadius&&p<x.minBubbleRadius&&(p=x.minBubbleRadius),x.maxBubbleRadius&&p>x.maxBubbleRadius&&(p=x.maxBubbleRadius)}let m=o.x[d],b=o.y[d];if(p=p||0,(b===null||typeof i.seriesData.series[r][f]>"u")&&(g=!1),g){let x=this.drawPoint(m,b,p,r,f,e);h.add(x),n.kind==="canvas"&&(typeof i.globals.pointsArray[r]>"u"&&(i.globals.pointsArray[r]=[]),i.globals.pointsArray[r][f]=[m,b])}}}_buildPerSeriesCache(t,e){var s;let i=this.w;return{realIndex:t,emit:e,isBubble:i.config.chart.type==="bubble"||i.globals.comboCharts&&i.config.series[t]&&i.config.series[t].type==="bubble",canCacheConfig:!i.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:i.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!i.globals.dataChanged&&!i.globals.resized,jitter:(s=i.config.plotOptions.scatter)==null?void 0:s.jitter,anim:null}}drawPoint(t,e,s,i,a,n){var r;let o=this.w,l=i,c=this.anim,h=this.filters,d=this.fill,f=this.markers,g=this._perSeries;(!g||g.realIndex!==i)&&(g=this._perSeries=this._buildPerSeriesCache(i,ae(this.ctx,this.graphics)));let p=g.emit,m;g.canCacheConfig?(g.markerConfig||(g.markerConfig=f.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null})),m=g.markerConfig,g.isBubble&&(m.pSize=s,m.pRadius=s)):m=f.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null});let x=o.config.series[l].data[a],_;g.fillCircle!==void 0?_=g.fillCircle:(_=d.fillPath({seriesNumber:i,dataPointIndex:a,color:m.pointFillColor,patternUnits:"objectBoundingBox",value:o.seriesData.series[i][n]}),g.fillCacheable===void 0&&(g.fillCacheable=g.canCacheConfig&&d.getFillType(i)==="solid"&&typeof m.pointFillColor=="string"&&!!m.pointFillColor),g.fillCacheable&&!x?.fillColor&&(g.fillCircle=_));let w=p.drawMarker(t,e,m);x?.fillColor&&(_=x.fillColor);let y=g.jitter;if(y?.enabled&&y.distributed&&o.globals.colors.length){let v=Math.round((r=o.seriesData.seriesX[i])==null?void 0:r[a]);isNaN(v)||(_=o.globals.colors[v%o.globals.colors.length])}if(w.attr({fill:_}),g.dropShadowEnabled){let v=o.config.chart.dropShadow;h.dropShadow(w,v,i)}if(g.doInitialAnim){if(!g.anim){let A=o.config.chart.animations,S=o.globals.dataPoints||1,C=A.animateGradually,M=C&&C.enabled!==!1;g.anim={popSpeed:A.speed,baseDelay:M?Math.min(20,A.speed*.5/Math.max(1,S)):0}}let v=Ya({style:g.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:g.anim.baseDelay});c.animatePop(w,{speed:g.anim.popSpeed,delay:v,onComplete:()=>c.animationCompleted(w)})}else o.globals.animationEnded=!0;return w.attr({rel:a,j:a,index:i,"default-marker-size":m.pSize}),h.setSelectionFilter(w,i,a),w}centerTextInBubble(t){let e=this.w;return t=t+parseInt(e.config.dataLabels.style.fontSize,10)/4,{y:t}}},Bt=(u,t,e,s)=>{if(typeof u!="function")return u;let i=u({series:t.seriesData.series,seriesIndex:e,dataPointIndex:s,w:t});return Number.isFinite(i)?i:0},Et=class{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,n,r){let o=this.w,l=new B(this.w),c=!1,h=l.getTextRects(s,r),d=h.width,f=h.height;e<0&&(e=0),e>o.layout.gridHeight+f&&(e=o.layout.gridHeight+f/2),typeof o.globals.dataLabelsRects[i]>"u"&&(o.globals.dataLabelsRects[i]=[]),o.globals.dataLabelsRects[i].push({x:t,y:e,width:d,height:f});let g=o.globals.dataLabelsRects[i].length-2,p=typeof o.globals.lastDrawnDataLabelsIndexes[i]<"u"?o.globals.lastDrawnDataLabelsIndexes[i][o.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(typeof o.globals.dataLabelsRects[i][g]<"u"){let m=o.globals.dataLabelsRects[i][p];(t>m.x+m.width||e>m.y+m.height||e+f<m.y||t+d<m.x)&&(c=!0)}return(a===0||n)&&(c=!0),{x:t,y:e,textRects:h,drawnextLabel:c}}drawDataLabel({type:t,pos:e,i:s,j:i,isRangeStart:a,strokeWidth:n=2}){let r=this.w,o=new B(this.w),l=r.config.dataLabels,c=0,h=0,d=i,f=null;if(r.globals.collapsedSeriesIndices.indexOf(s)!==-1||!l.enabled||!Array.isArray(e.x))return f;f=o.group({class:"apexcharts-data-labels"});for(let p=0;p<e.x.length;p++)if(i===1&&p===0&&(d=0),i===1&&p===1&&(d=1),c=e.x[p]+Bt(l.offsetX,r,s,d),h=e.y[p]+Bt(l.offsetY,r,s,d)+n,!isNaN(c)){let m=r.seriesData.series[s][d];t==="rangeArea"&&(a?m=r.rangeData.seriesRangeStart[s][d]:m=r.rangeData.seriesRangeEnd[s][d]);let b="",x=w=>r.config.dataLabels.formatter(w,{seriesIndex:s,dataPointIndex:d,w:r});r.config.chart.type==="bubble"?(m=r.seriesData.seriesZ[s][d],b=x(m),h=e.y[p],h=new ds(this.w,this.ctx).centerTextInBubble(h).y):typeof m<"u"&&(b=x(m));let _=r.config.dataLabels.textAnchor;r.globals.isSlopeChart&&(d===0?_="end":d===r.config.series[s].data.length-1?_="start":_="middle"),this.plotDataLabelsText({x:c,y:h,text:b,i:s,j:d,parent:f,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:_})}return f}plotDataLabelsText(t){let e=this.w,s=new B(this.w),{x:i,y:a,i:n,j:r,text:o,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:f,alwaysDrawDataLabel:g,offsetCorrection:p,className:m,seriesIndex:b=n,dataPointIndex:x=r}=t,_=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(n)<0)return _;let w={x:i,y:a,drawnextLabel:!0,textRects:null};if(p&&(w=this.dataLabelsCorrection(i,a,o,n,r,g,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=w.x,a=w.y),w.textRects){let k=e.globals.barPadForNumericAxis||0;(i<-(k+20)-w.textRects.width||i>e.layout.gridWidth+w.textRects.width+k+30)&&(o="")}let y=e.globals.dataLabels.style.colors[n];((e.config.chart.type==="bar"||e.config.chart.type==="rangeBar")&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(y=e.globals.dataLabels.style.colors[r]),typeof y=="function"&&(y=y({series:e.seriesData.series,seriesIndex:n,dataPointIndex:r,w:e})),f&&(y=f);let v=e.config.chart.type==="bar"||e.config.chart.type==="rangeBar",A=v?0:Bt(d.offsetX,e,b,x),S=v?0:Bt(d.offsetY,e,b,x),C=A,M=S;if(e.globals.isSlopeChart&&(r!==0&&(C=A*-2+5),r!==0&&r!==e.config.series[n].data.length-1&&(C=0)),w.drawnextLabel){if(l==="middle"&&i===e.layout.gridWidth&&(l="end"),_=s.drawText({x:i+C,y:a+M,foreColor:y,textAnchor:l||d.textAnchor,text:o,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),_.attr({class:m||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){let k=d.dropShadow;new at(this.w).dropShadow(_,k)}h.add(_),Dt(_,i,e),typeof e.globals.lastDrawnDataLabelsIndexes[n]>"u"&&(e.globals.lastDrawnDataLabelsIndexes[n]=[]),e.globals.lastDrawnDataLabelsIndexes[n].push(r)}return _}addBackgroundToDataLabel(t,e){let s=this.w,i=s.config.dataLabels.background,a=i.padding,n=i.padding/2,r=e.width,o=e.height,c=new B(this.w).drawRect(e.x-a,e.y-n/2,r+a*2,o+n,i.borderRadius,s.config.chart.background==="transparent"||!s.config.chart.background?"#fff":s.config.chart.background,i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new at(this.w).dropShadow(c,i.dropShadow),c}dataLabelsBackground(){var t;let e=this.w;if(e.config.chart.type==="bubble")return;let s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i<s.length;i++){let a=s[i],n=a.getBBox(),r=null;if(n.width&&n.height&&(r=this.addBackgroundToDataLabel(a,n)),r){(t=a.parentNode)==null||t.insertBefore(r.node,a);let o=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:o}):r.attr({fill:o}),a.setAttribute("fill",e.config.dataLabels.background.foreColor);let c=a.getAttribute("cx");c!==null&&Dt(r,parseFloat(c),e)}}}bringForward(){let t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let i=0;i<e.length;i++)s&&s.insertBefore(e[i],s.nextSibling)}},Ne=class{static invalidateAll(t){!t||!t.globals||(t.globals.cachedSelectors&&(t.globals.cachedSelectors={}),t.globals.domCache&&t.globals.domCache.clear(),t.globals.dimensionCache={})}static invalidateDimensions(t){!t||!t.globals||(t.globals.dimensionCache={})}static invalidateSelectors(t){!t||!t.globals||t.globals.cachedSelectors&&(t.globals.cachedSelectors={})}static getCachedSelector(t,e,s){return!t||!t.globals?s():(t.globals.cachedSelectors||(t.globals.cachedSelectors={}),t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=s()),t.globals.cachedSelectors[e])}static getCachedDimension(t,e,s,i=1e3){if(!t||!t.globals)return s();t.globals.dimensionCache||(t.globals.dimensionCache={});let a=t.globals.dimensionCache[e],n=Date.now();if(a&&a.lastUpdate&&n-a.lastUpdate<i)return a.value;let r=s();return t.globals.dimensionCache[e]={value:r,lastUpdate:n},r}static cacheDOMElement(t,e,s){!t||!t.globals||(t.globals.domCache||(t.globals.domCache=new Map),t.globals.domCache.set(e,s))}static getCachedDOMElement(t,e){return!t||!t.globals||!t.globals.domCache?null:t.globals.domCache.get(e)||null}},Ct=class{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s}getLabel(t,e,s,i,a=[],n="12px",r=!0){let o=this.w,l=typeof t[i]>"u"?"":t[i],c=l,h=o.formatters.xLabelFormatter,d=o.config.xaxis.labels.formatter,f=new ee(this.w),g=l;r&&(c=f.xLabelFormat(h,l,g,{i,dateFormatter:new mt(this.w).formatDate,w:o}),d!==void 0&&(c=d(l,t[i],{i,dateFormatter:new mt(this.w).formatDate,w:o}))),e.length>0?(s=e[i].position,c=e[i].value):o.config.xaxis.type==="datetime"&&d===void 0&&(c=""),typeof c>"u"&&(c=""),c=Array.isArray(c)?c:c.toString();let p=new B(this.w),m={};o.layout.rotateXLabels&&r?m=p.getTextRects(c,parseInt(n,10).toString(),null,`rotate(${o.config.xaxis.labels.rotate} 0 0)`,!1):m=p.getTextRects(c,parseInt(n,10).toString());let b=!o.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(c)&&(String(c)==="NaN"||a.indexOf(c)>=0&&b)&&(c=""),{x:s,text:c,textRect:m}}checkLabelBasedOnTickamount(t,e,s){let i=this.w,a=i.config.xaxis.tickAmount;if(a==="dataPoints"&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;let n=Math.round(s/(a+1));return t%n===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){let n=this.w;if(t===0&&n.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&n.globals.skipLastTimelinelabel&&(e.text=""),n.config.xaxis.labels.hideOverlappingLabels&&i.length>0){let r=a[a.length-1];if(n.config.xaxis.labels.trim&&n.config.xaxis.type!=="datetime")return e;e.x<r.textRect.width/(n.layout.rotateXLabels?Math.max(Math.abs(n.config.xaxis.labels.rotate),1)/12:1.01)+r.x&&(e.text="")}return e}checkForReversedLabels(t,e){let s=this.w;return s.config.yaxis[t]&&s.config.yaxis[t].reversed&&e.reverse(),e}yAxisAllSeriesCollapsed(t){let e=this.w.globals;return!e.seriesYAxisMap[t].some(s=>e.collapsedSeriesIndices.indexOf(s)===-1)}translateYAxisIndex(t){let e=this.w,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(n=>Array.isArray(n.seriesName))?t:s.seriesYAxisReverseMap[t]}isYAxisHidden(t){let e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){let i=e.globals.seriesYAxisMap[t],a=new lt(this.w);return i.every(n=>a.isSeriesNull(n))}return!1}getYAxisForeColor(t,e){var s;let i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&((s=this.theme)==null||s.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,s,i,a,n,r){let o=this.w,l=new B(this.w),c=o.layout.translateY+o.config.yaxis[a].labels.offsetY;if(o.globals.isBarHorizontal?c=0:o.config.chart.type==="heatmap"&&(c+=n/2),i.show&&e>0){o.config.yaxis[a].opposite===!0&&(t=t+i.width);for(let h=e;h>=0;h--){let d=l.drawLine(t+s.offsetX-i.width+i.offsetX,c+i.offsetY,t+s.offsetX+i.offsetX,c+i.offsetY,i.color);r.add(d),c+=n}}}},Wt=class{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new Ct(t,{theme:e.theme,timeScale:e.timeScale}),this.xaxisLabels=t.labelData.labels.slice(),t.labelData.timescaleLabels.length>0&&!t.globals.isBarHorizontal&&(this.xaxisLabels=t.labelData.timescaleLabels.slice()),t.config.xaxis.overwriteCategories&&(this.xaxisLabels=t.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],t.config.xaxis.position==="top"?this.offY=0:this.offY=t.layout.gridHeight,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&t.config.plotOptions.bar.horizontal,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.xaxisBorderWidth=t.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=t.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=t.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=t.config.xaxis.axisBorder.height,this.yaxis=t.config.yaxis[0]}drawXaxis(){let t=this.w,e=new B(this.w),s=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});s.add(i);let a=[];for(let n=0;n<this.xaxisLabels.length;n++)a.push(this.xaxisLabels[n]);if(this.drawXAxisLabelAndGroup(!0,e,i,a,t.axisFlags.isXNumeric,(n,r)=>r),t.labelData.hasXaxisGroups){let n=t.labelData.groups;a=[];for(let o=0;o<n.length;o++)a.push(n[o].title);let r={};t.config.xaxis.group.style&&(r.xaxisFontSize=t.config.xaxis.group.style.fontSize,r.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,r.xaxisForeColors=t.config.xaxis.group.style.colors,r.fontWeight=t.config.xaxis.group.style.fontWeight,r.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,i,a,!1,(o,l)=>n[o].cols*l,r)}if(t.config.xaxis.title.text!==void 0){let n=e.group({class:"apexcharts-xaxis-title"}),r=e.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(t.config.xaxis.position==="bottom"?t.layout.xAxisLabelsHeight:-t.layout.xAxisLabelsHeight-10)+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});n.add(r),s.add(n)}if(t.config.xaxis.axisBorder.show){let n=t.globals.barPadForNumericAxis,r=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-n,this.offY,this.xaxisBorderWidth+n,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):s.add(r)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,n,r={}){var o,l;let c=[],h=[],d=this.w,f=r.xaxisFontSize||this.xaxisFontSize,g=r.xaxisFontFamily||this.xaxisFontFamily,p=r.xaxisForeColors||this.xaxisForeColors,m=r.fontWeight||d.config.xaxis.labels.style.fontWeight,b=r.cssClass||d.config.xaxis.labels.style.cssClass,x,_=d.globals.padHorizontal,w=i.length,y=d.config.xaxis.type==="category"?d.globals.dataPoints:w;if(y===0&&w>y&&(y=w),a){let v=Math.max(Number(d.config.xaxis.tickAmount)||1,y>1?y-1:y);x=d.layout.gridWidth/Math.min(v,w-1),_=_+n(0,x)/2+d.config.xaxis.labels.offsetX}else x=d.layout.gridWidth/y,_=_+n(0,x)+d.config.xaxis.labels.offsetX;for(let v=0;v<=w-1;v++){let A=_-n(v,x)/2+d.config.xaxis.labels.offsetX;v===0&&w===1&&x/2===_&&y===1&&(A=d.layout.gridWidth/2);let S=this.axesUtils.getLabel(i,d.labelData.timescaleLabels,A,v,c,f,t),C=28;d.layout.rotateXLabels&&t&&(C=22),d.config.xaxis.title.text&&d.config.xaxis.position==="top"&&(C+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(C=C+parseFloat(f)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0)),typeof d.config.xaxis.tickAmount<"u"&&d.config.xaxis.tickAmount!=="dataPoints"&&d.config.xaxis.type!=="datetime"?S=this.axesUtils.checkLabelBasedOnTickamount(v,S,w):S=this.axesUtils.checkForOverflowingLabels(v,S,w,c,h);let k=()=>t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+v-1]:p[v],E=((l=(o=S.textRect)==null?void 0:o.width)!=null?l:0)/2,D=S.x+E<0;if(d.config.xaxis.labels.show&&!D){let P=e.drawText({x:S.x,y:this.offY+d.config.xaxis.labels.offsetY+C-(d.config.xaxis.position==="top"?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:S.text,textAnchor:"middle",fontWeight:m,fontSize:f,fontFamily:g,foreColor:Array.isArray(p)?k():p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(s.add(P),P.on("click",F=>{if(typeof d.config.chart.events.xAxisLabelClick=="function"){let R=Object.assign({},d,{labelIndex:v});d.config.chart.events.xAxisLabelClick(F,this.ctx,R)}}),t){let F=O.createElementNS(et,"title");F.textContent=Array.isArray(S.text)?S.text.join(" "):S.text,P.node.appendChild(F),S.text!==""&&(c.push(S.text),h.push(S))}}v<w-1&&(_=_+n(v+1,x))}}drawXaxisInversed(t){let e=this.w,s=new B(this.w),i=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),n=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+i+", 0)"});a.add(n);let r=[];if(e.config.yaxis[t].show)for(let g=0;g<this.xaxisLabels.length;g++)r.push(this.xaxisLabels[g]);let o=e.layout.gridHeight/r.length,l=-(o/2.2),c=e.formatters.yLabelFormatters[0],h=e.config.yaxis[0].labels;if(h.show)for(let g=0;g<=r.length-1;g++){let p=typeof r[g]>"u"?"":r[g];p=c(p,{seriesIndex:t,dataPointIndex:g,w:e});let m=this.axesUtils.getYAxisForeColor(h.style.colors,t),b=()=>Array.isArray(m)?m[g]:m,x=0;Array.isArray(p)&&(x=p.length/2*parseInt(h.style.fontSize,10));let _=h.offsetX-15,w="end";this.yaxis.opposite&&(w="start"),e.config.yaxis[0].labels.align==="left"?(_=h.offsetX,w="start"):e.config.yaxis[0].labels.align==="center"?(_=h.offsetX,w="middle"):e.config.yaxis[0].labels.align==="right"&&(w="end");let y=s.drawText({x:_,y:l+o+h.offsetY-x,text:p,textAnchor:w,foreColor:b(),fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+h.style.cssClass,maxWidth:h.maxWidth});n.add(y),y.on("click",A=>{if(typeof e.config.chart.events.xAxisLabelClick=="function"){let S=Object.assign({},e,{labelIndex:g});e.config.chart.events.xAxisLabelClick(A,this.ctx,S)}});let v=O.createElementNS(et,"title");if(v.textContent=Array.isArray(p)?p.join(" "):p,y.node.appendChild(v),e.config.yaxis[t].labels.rotate!==0){let A=s.rotateAroundCenter(y.node);y.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${A.y})`)}l=l+o}if(e.config.yaxis[0].title.text!==void 0){let g=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),p=s.drawText({x:e.config.yaxis[0].title.offsetX,y:e.layout.gridHeight/2+e.config.yaxis[0].title.offsetY,text:e.config.yaxis[0].title.text,textAnchor:"middle",foreColor:e.config.yaxis[0].title.style.color,fontSize:e.config.yaxis[0].title.style.fontSize,fontWeight:e.config.yaxis[0].title.style.fontWeight,fontFamily:e.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+e.config.yaxis[0].title.style.cssClass});g.add(p),a.add(g)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);let f=e.config.xaxis.axisBorder;if(f.show){let g=s.drawLine(e.globals.padHorizontal+f.offsetX+d,1+f.offsetY,e.globals.padHorizontal+f.offsetX+d,e.layout.gridHeight+f.offsetY,f.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(g):a.add(g)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,r.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,o,a),a}drawXaxisTicks(t,e,s){let i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;let n=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+n+i.config.xaxis.axisTicks.height,i.config.xaxis.position==="top"&&(e=n-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){let o=new B(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,n+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){let t=this.w,e=[],s=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let a=0;a<s;a++)i=this.xaxisLabels[a].position,e.push(i);else{let a=s;for(let n=0;n<a;n++){let r=a;t.axisFlags.isXNumeric&&t.config.chart.type!=="bar"&&(r-=1),i=i+t.layout.gridWidth/r,e.push(i)}}return e}xAxisLabelCorrections(){var t,e,s;let i=this.w,a=new B(this.w),n=i.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),r=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),o=i.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.config.xaxis.labels.rotateAlways)for(let c=0;c<r.length;c++){let h=a.rotateAroundCenter(r[c]);h.y=h.y-1,h.x=h.x+1,r[c].setAttribute("transform",`rotate(${i.config.xaxis.labels.rotate} ${h.x} ${h.y})`),r[c].setAttribute("text-anchor","end"),n?.setAttribute("transform","translate(0, -10)");let d=r[c].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(d,f=>{a.placeTextWithEllipsis(f,f.textContent,i.layout.xAxisLabelsHeight-(i.config.legend.position==="bottom"?20:10))})}else{let c=i.layout.gridWidth/(i.labelData.labels.length+1);for(let h=0;h<r.length;h++){let d=r[h].childNodes;i.config.xaxis.labels.trim&&i.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(d,f=>{a.placeTextWithEllipsis(f,f.textContent,c)})}}if(o.length>0){let c=o[o.length-1].getBBox(),h=o[0].getBBox();c.x<-20&&((t=o[o.length-1].parentNode)==null||t.removeChild(o[o.length-1])),h.x+h.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&((e=o[0].parentNode)==null||e.removeChild(o[0]));for(let d=0;d<l.length;d++)a.placeTextWithEllipsis(l[d],(s=l[d].textContent)!=null?s:"",i.config.yaxis[0].labels.maxWidth-(i.config.yaxis[0].title.text?parseFloat(i.config.yaxis[0].title.style.fontSize)*2:0)-15)}}},Xe=class{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new Ct(e.w,{theme:e.theme,timeScale:e.timeScale}),this.isRangeBar=t.rangeData.seriesRange.length&&t.globals.isBarHorizontal,t.labelData.timescaleLabels.length>0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){let e=this.w,s=new B(this.w);t||(t=s.group({class:"apexcharts-grid"}));let i=s.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=s.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(i),t}drawGrid(){if(this.w.globals.axisCharts){let e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){let t=this.w,e=t.globals,s=new B(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=h=>{let d=O.createElementNS(et,"clipPath");return d.setAttribute("id",h),d};t.dom.elGridRectMask=a(`gridRectMask${e.cuid}`),t.dom.elGridRectBarMask=a(`gridRectBarMask${e.cuid}`),t.dom.elGridRectMarkerMask=a(`gridRectMarkerMask${e.cuid}`),t.dom.elForecastMask=a(`forecastMask${e.cuid}`),t.dom.elNonForecastMask=a(`nonForecastMask${e.cuid}`);let n=["bar","rangeBar","candlestick","boxPlot","violin"].includes(t.config.chart.type)||t.globals.comboBarCount>0,r=0,o=0;n&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.layout.gridPad.left,e.barPadForNumericAxis),o=Math.max(t.layout.gridPad.right,e.barPadForNumericAxis)),t.dom.elGridRect=s.drawRect(-i/2-2,-i/2-2,t.layout.gridWidth+i+4,t.layout.gridHeight+i+4,0,"#fff"),t.dom.elGridRectBar=s.drawRect(-i/2-r-2,-i/2-2,t.layout.gridWidth+i+o+r+4,t.layout.gridHeight+i+4,0,"#fff");let l=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-l),-l,t.layout.gridWidth+Math.max(i+o+r+4,l*2),t.layout.gridHeight+l*2,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectBarMask.appendChild(t.dom.elGridRectBar.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);let c=t.dom.elDefs.node;c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elGridRectBarMask),c.appendChild(t.dom.elGridRectMarkerMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,y2:a,xCount:n,parent:r}){let o=this.w;if(!(t===0&&o.globals.skipFirstTimelinelabel||t===n-1&&o.globals.skipLastTimelinelabel&&!o.config.xaxis.labels.formatter||o.config.chart.type==="radar")){o.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:n,parent:r});let c=0;if(o.labelData.hasXaxisGroups&&o.config.xaxis.tickPlacement==="between"){let d=o.labelData.groups;if(d){let f=0;for(let g=0;f<t&&g<d.length;g++)f+=d[g].cols;f===t&&(c=o.layout.xAxisLabelsHeight*.6)}}new Wt(this.w,this.ctx).drawXaxisTicks(e,c,o.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:n,parent:r}){let o=this.w,l=r.node.classList.contains("apexcharts-gridlines-horizontal"),c=o.globals.barPadForNumericAxis,h=s===0&&a===0||e===0&&i===0||s===o.layout.gridHeight&&a===o.layout.gridHeight||o.globals.isBarHorizontal&&(t===0||t===n-1),f=new B(this.w).drawLine(e-(l?c:0),s,i+(l?c:0),a,o.config.grid.borderColor,o.config.grid.strokeDashArray);f.node.classList.add("apexcharts-gridline"),h&&o.config.grid.show?this.elGridBorders.add(f):r.add(f)}_drawGridBandRect({c:t,x1:e,y1:s,x2:i,y2:a,type:n}){let r=this.w,o=new B(this.w),l=r.globals.barPadForNumericAxis,c=r.config.grid[n].colors[t],h=o.drawRect(e-(n==="row"?l:0),s,i+(n==="row"?l*2:0),a,0,c,r.config.grid[n].opacity);this.elg.add(h),h.attr("clip-path",`url(#gridRectMask${r.globals.cuid})`),h.node.classList.add(`apexcharts-grid-${n}`)}_drawXYLines({xCount:t,tickAmount:e}){var s;let i=this.w,a=({xC:r,x1:o,y1:l,x2:c,y2:h})=>{for(let d=0;d<r;d++)o=this.xaxisLabels[d].position,c=this.xaxisLabels[d].position,!(o<0||o-2>i.layout.gridWidth)&&this._drawGridLines({i:d,x1:o,y1:l,x2:c,y2:h,xCount:t,parent:this.elgridLinesV})},n=({xC:r,x1:o,y1:l,x2:c,y2:h})=>{for(let d=0;d<r+(i.axisFlags.isXNumeric?0:1);d++)d===0&&r===1&&i.globals.dataPoints===1&&(o=i.layout.gridWidth/2,c=o),this._drawGridLines({i:d,x1:o,y1:l,x2:c,y2:h,xCount:t,parent:this.elgridLinesV}),o+=i.layout.gridWidth/(i.axisFlags.isXNumeric?r-1:r),c=o};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){let r=i.globals.padHorizontal,o=0,l,c=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:t,x1:r,y1:o,x2:l,y2:c}):(i.axisFlags.isXNumeric&&(t=(s=i.globals.xAxisScale)==null?void 0:s.result.length),n({xC:t,x1:r,y1:o,x2:l,y2:c}))}if(i.config.grid.yaxis.lines.show){let o=0,l=0,c=i.layout.gridWidth,h=e+1;this.isRangeBar&&(h=i.labelData.labels.length);for(let d=0;d<h+(this.isRangeBar?1:0);d++)this._drawGridLine({i:d,xCount:h+(this.isRangeBar?1:0),x1:0,y1:o,x2:c,y2:l,parent:this.elgridLinesH}),o+=i.layout.gridHeight/(this.isRangeBar?h:e),l=o}}_drawInvertedXYLines({xCount:t}){let e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let s=e.globals.padHorizontal,i=0,a,n=e.layout.gridHeight;for(let r=0;r<t+1;r++)e.config.grid.xaxis.lines.show&&this._drawGridLine({i:r,xCount:t+1,x1:s,y1:i,x2:a,y2:n,parent:this.elgridLinesV}),new Wt(this.w,this.ctx).drawXaxisTicks(s,0,e.dom.elGraphical),s+=e.layout.gridWidth/t,a=s}if(e.config.grid.yaxis.lines.show){let i=0,a=0,n=e.layout.gridWidth;for(let r=0;r<e.globals.dataPoints+1;r++)this._drawGridLine({i:r,xCount:e.globals.dataPoints+1,x1:0,y1:i,x2:n,y2:a,parent:this.elgridLinesH}),i+=e.layout.gridHeight/e.globals.dataPoints,a=i}}renderGrid(){var t,e,s;let i=this.w,a=i.globals,n=new B(this.w);this.elg=n.group({class:"apexcharts-grid"}),this.elgridLinesH=n.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=n.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=n.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 o=a.yAxisScale[r].result.length-1,l;return!a.isBarHorizontal||this.isRangeBar?(l=this.xaxisLabels.length,this.isRangeBar&&(o=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(l=i.config.xaxis.tickAmount),((s=(e=(t=a.yAxisScale)==null?void 0:t[r])==null?void 0:e.result)==null?void 0:s.length)>0&&i.config.xaxis.type!=="datetime"&&(l=a.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:l,tickAmount:o})):(l=o,o=a.xTickAmount,this._drawInvertedXYLines({xCount:l,tickAmount:o})),this.drawGridBands(l,o),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/l}}drawGridBands(t,e){var s,i,a,n,r;let o=this.w,l=(c,h,d,f,g,p)=>{for(let m=0,b=0;m<h;m++,b++)b>=o.config.grid[c].colors.length&&(b=0),this._drawGridBandRect({c:b,x1:d,y1:f,x2:g,y2:p,type:c}),f+=o.layout.gridHeight/e};if(((s=o.config.grid.row.colors)==null?void 0:s.length)>0&&l("row",e,0,0,o.layout.gridWidth,o.layout.gridHeight/e),((i=o.config.grid.column.colors)==null?void 0:i.length)>0){let c=!o.globals.isBarHorizontal&&o.config.xaxis.tickPlacement==="on"&&(o.config.xaxis.type==="category"||o.config.xaxis.convertedCatToNumeric)?t-1:t;o.axisFlags.isXNumeric&&(c=((n=(a=o.globals.xAxisScale)==null?void 0:a.result.length)!=null?n:1)-1);let h=o.globals.padHorizontal,d=0,f=o.globals.padHorizontal+o.layout.gridWidth/c,g=o.layout.gridHeight;for(let p=0,m=0;p<t;p++,m++)m>=o.config.grid.column.colors.length&&(m=0),o.config.xaxis.type==="datetime"&&(h=this.xaxisLabels[p].position,f=(((r=this.xaxisLabels[p+1])==null?void 0:r.position)||o.layout.gridWidth)-this.xaxisLabels[p].position),this._drawGridBandRect({c:m,x1:h,y1:d,x2:f,y2:g,type:"column"}),h+=o.layout.gridWidth/c}}},us=class{constructor(t){this.w=t,this.coreUtils=new lt(this.w)}niceScale(t,e,s=0){let a=this.w,n=a.globals,r,o,l,c;n.isBarHorizontal?(r=a.config.xaxis,o=Math.max((n.svgWidth-100)/25,2)):(r=a.config.yaxis[s],o=Math.max((n.svgHeight-100)/15,2)),T.isNumber(o)||(o=10),l=r.min!==void 0&&r.min!==null,c=r.max!==void 0&&r.max!==null;let h=r.stepSize!==void 0&&r.stepSize!==null,d=r.tickAmount!==void 0&&r.tickAmount!==null,f=d?r.tickAmount:di[Math.min(Math.round(o/2),di.length-1)];if(n.isMultipleYAxis&&!d&&n.multiAxisTickAmount>0&&(f=n.multiAxisTickAmount,d=!0),f==="dataPoints"?f=n.dataPoints-1:f=Math.abs(Math.round(f)),(t===Number.MIN_VALUE&&e===0||!T.isNumber(t)&&!T.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=T.isNumber(r.min)?r.min:0,e=T.isNumber(r.max)?r.max:t+f,n.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");let L=e;e=t,t=L}else t===e&&(t=t===0?0:t-1,e=e===0?2:e+1);let g=[];f<1&&(f=1);let p=f,m=Math.abs(e-t),b=.15;!l&&t>0&&t/m<b&&(t=0,l=!0),!c&&e<0&&-e/m<b&&(e=0,c=!0),m=Math.abs(e-t);let x=m/p,_=x,w=Math.floor(Math.log10(_)),y=Math.pow(10,w),v=Math.ceil(_/y);if(v=Cr[n.yValueDecimal===0?0:1][v],_=v*y,x=_,n.isBarHorizontal&&r.stepSize&&r.type!=="datetime"?(x=r.stepSize,h=!0):h&&(x=r.stepSize),h&&r.forceNiceScale){let L=Math.floor(Math.log10(x));x*=Math.pow(10,w-L)}if(l&&c){let L=m/p;if(d)if(h)if(T.mod(m,x)!=0){let E=T.getGCD(x,L);L/E<10?x=E:x=L}else T.mod(x,L)==0?x=L:(L=x,d=!1);else x=L;else if(h)T.mod(m,x)==0?L=x:x=L;else if(T.mod(m,x)==0)L=x;else{p=Math.ceil(m/x),L=m/p;let E=T.getGCD(m,x);m/E<o&&(L=E),x=L}p=Math.round(m/x)}else{if(!l&&!c)if(n.isMultipleYAxis&&d){let L=x*Math.floor(t/x),E=L+x*p;E<e&&(x*=2),t=L,E=e,e=t+x*p,m=Math.abs(e-t),t>0&&t<Math.abs(E-e)&&(t=0,e=x*p),e<0&&-e<Math.abs(L-t)&&(e=0,t=-x*p)}else t=x*Math.floor(t/x),e=x*Math.ceil(e/x);else if(c)if(d)t=e-x*p;else{let L=t;t=x*Math.floor(t/x),Math.abs(e-t)/T.getGCD(m,x)>o&&(t=e-x*f,t+=x*Math.floor((L-t)/x))}else if(l)if(d)e=t+x*p;else{let L=e;e=x*Math.ceil(e/x),Math.abs(e-t)/T.getGCD(m,x)>o&&(e=t+x*f,e+=x*Math.ceil((L-e)/x))}m=Math.abs(e-t),x=T.getGCD(m,x),p=Math.round(m/x)}if(!d&&!(l||c)&&(p=Math.ceil((m-1e-11)/(x+1e-11)),p>16&&T.getPrimeFactors(p).length<2&&p++),!d&&r.forceNiceScale&&n.yValueDecimal===0&&p>m&&(p=m,x=Math.round(m/p)),p>o&&(!(d||h)||r.forceNiceScale)){let L=T.getPrimeFactors(p),E=L.length-1,D=p;t:for(var A=0;A<E;A++)for(var S=0;S<=E-A;S++){let P=Math.min(S+A,E),F=D,R=1;for(var C=S;C<=P;C++)R*=L[C];if(F/=R,F<o){D=F;break t}}D===p?x=m:x=m/D,p=Math.round(m/x)}n.isMultipleYAxis&&n.multiAxisTickAmount==0&&n.ignoreYAxisIndexes.indexOf(s)<0&&(n.multiAxisTickAmount=p);let M=t-x,k=x*1e-11;do M+=x,g.push(T.stripNumber(M,7));while(e-M>k);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}linearScale(t,e,s=10,i=0,a=void 0){let n=Math.abs(e-t),r=[];if(t===e)return r=[t],{result:r,niceMin:r[0],niceMax:r[r.length-1]};s=this._adjustTicksForSmallRange(s,i,n),s==="dataPoints"&&(s=this.w.globals.dataPoints-1);let o=s;a||(a=n/o);let l=2;if(a!==0&&isFinite(a)){let d=Math.floor(Math.log10(Math.abs(a))),f=Math.max(l,-d+l),g=Math.pow(10,f);a=Math.round((a+Number.EPSILON)*g)/g}let c=s===Number.MAX_VALUE?5:o;s===Number.MAX_VALUE&&(a=1);let h=t;for(;c>=0;)r.push(h),h=T.preciseAddition(h,a),c-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScaleNice(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));let i=[],a=Math.ceil(Math.log(e)/Math.log(s)+1),n=Math.floor(Math.log(t)/Math.log(s));for(let r=n;r<a;r++)i.push(Math.pow(s,r));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}logarithmicScale(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));let i=[],a=Math.log(e)/Math.log(s),n=Math.log(t)/Math.log(s),r=a-n,o=Math.round(r),l=r/o;for(let c=0,h=n;c<o;c++,h+=l)i.push(Math.pow(s,h));return i.push(Math.pow(s,a)),{result:i,niceMin:t,niceMax:e}}_adjustTicksForSmallRange(t,e,s){let i=t;if(typeof e<"u"&&this.w.config.yaxis[e].labels.formatter&&this.w.config.yaxis[e].tickAmount===void 0){let a=Number(this.w.config.yaxis[e].labels.formatter(1));T.isNumber(a)&&this.w.globals.yValueDecimal===0&&(i=Math.ceil(s))}return i<t?i:t}setYScaleForIndex(t,e,s){let i=this.w.globals,a=this.w.config,n=i.isBarHorizontal?a.xaxis:a.yaxis[t];typeof i.yAxisScale[t]>"u"&&(i.yAxisScale[t]=[]);let r=Math.abs(s-e);n.logarithmic&&r<=5&&(i.invalidLogScale=!0),n.logarithmic&&r>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=n.forceNiceScale?this.logarithmicScaleNice(e,s,n.logBase):this.logarithmicScale(e,s,n.logBase)):s===-Number.MAX_VALUE||!T.isNumber(s)||e===Number.MAX_VALUE||!T.isNumber(e)?i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t):(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,s,t))}setXScale(t,e){let s=this.w,i=s.globals;if(e===-Number.MAX_VALUE||!T.isNumber(e))i.xAxisScale=this.linearScale(0,10,10);else{let a=i.xTickAmount;i.xAxisScale=this.linearScale(t,e,a,0,s.config.xaxis.max===void 0?s.config.xaxis.stepSize:void 0)}return i.xAxisScale}scaleMultipleYAxes(){let t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();let s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr,n=[],r=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((o,l)=>{let c=[];if(o.forEach(h=>{var d;let f=(d=t.series[h])==null?void 0:d.group;c.indexOf(f)<0&&c.push(f)}),o.length>0){let h=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=h,g=d,p,m;if(t.chart.stacked){let _=new Array(e.dataPoints).fill(0),w=[],y=[],v=[];c.forEach(()=>{w.push(_.map(()=>Number.MIN_VALUE)),y.push(_.map(()=>Number.MIN_VALUE)),v.push(_.map(()=>Number.MIN_VALUE))});for(let A=0;A<o.length;A++){!p&&t.series[o[A]].type&&(p=t.series[o[A]].type);let S=o[A];t.series[S].group?m=t.series[S].group:m="axis-".concat(l.toString()),!(e.collapsedSeriesIndices.indexOf(S)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(S)<0)||(e.allSeriesCollapsed=!1,c.forEach((M,k)=>{if(t.series[S].group===M)for(let L=0;L<this.w.seriesData.series[S].length;L++){let E=this.w.seriesData.series[S][L];E>=0?y[k][L]+=E:v[k][L]+=E,w[k][L]+=E,f=Math.min(f,E),g=Math.max(g,E)}})),(p==="bar"||p==="column")&&e.barGroups.push(m)}p||(p=t.chart.type),p==="bar"||p==="column"?c.forEach((A,S)=>{h=Math.min(h,Math.min.apply(null,v[S])),d=Math.max(d,Math.max.apply(null,y[S]))}):(c.forEach((A,S)=>{f=Math.min(f,Math.min.apply(null,w[S])),g=Math.max(g,Math.max.apply(null,w[S]))}),h=f,d=g),h===Number.MIN_VALUE&&d===Number.MIN_VALUE&&(d=-Number.MAX_VALUE)}else for(let _=0;_<o.length;_++){let w=o[_];h=Math.min(h,i[w]),d=Math.max(d,a[w]),!(e.collapsedSeriesIndices.indexOf(w)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(w)<0)||(e.allSeriesCollapsed=!1)}t.yaxis[l].min!==void 0&&(typeof t.yaxis[l].min=="function"?h=t.yaxis[l].min(h):h=t.yaxis[l].min),t.yaxis[l].max!==void 0&&(typeof t.yaxis[l].max=="function"?d=t.yaxis[l].max(d):d=t.yaxis[l].max),e.barGroups=e.barGroups.filter((_,w,y)=>y.indexOf(_)===w);let b=t.yaxis[l];r&&b.alignZero===!0&&!b.logarithmic&&b.min===void 0&&b.max===void 0&&e.ignoreYAxisIndexes.indexOf(l)<0&&T.isNumber(h)&&T.isNumber(d)?n.push({ai:l,minY:h,maxY:d}):(this.setYScaleForIndex(l,h,d),o.forEach(_=>{i[_]=e.yAxisScale[l].niceMin,a[_]=e.yAxisScale[l].niceMax}))}else this.setYScaleForIndex(l,0,-Number.MAX_VALUE)}),n.length>=2){n.forEach(c=>{this.setYScaleForIndex(c.ai,c.minY,c.maxY),s[c.ai].forEach(h=>{i[h]=e.yAxisScale[c.ai].niceMin,a[h]=e.yAxisScale[c.ai].niceMax})});let o=0;n.forEach(c=>{let h=e.yAxisScale[c.ai],d=h.niceMax-h.niceMin;if(d>0){let f=-h.niceMin/d;f>o&&(o=f)}}),o>1&&(o=1),o<0&&(o=0);let l=c=>{if(c<=0)return 1;let h=Math.floor(Math.log10(c)),d=Math.pow(10,h),f=c/d,g;return f<=1+1e-9?g=1:f<=2+1e-9?g=2:f<=2.5+1e-9?g=2.5:f<=5+1e-9?g=5:g=10,g*d};n.forEach(c=>{let h=e.yAxisScale[c.ai];if(!h.result||h.result.length<2)return;let d=h.niceMax-h.niceMin;if(d<=0)return;let f=-h.niceMin/d;if(Math.abs(f-o)<=1e-9)return;let g=f<o&&o<1-1e-9,p=!g&&f>o&&o>1e-9;if(!g&&!p)return;let m=g?-o*h.niceMax/(1-o):h.niceMin,b=p?-h.niceMin*(1-o)/o:h.niceMax,x=b-m;if(x<=0)return;let _=Math.max(h.result.length,5),w=l(x/Math.max(_-1,1));if(w<=0)return;let y,v;if(g){y=Math.floor(m/w+1e-9)*w;let A=o>1e-9?y*(o-1)/o:h.niceMax,S=Math.max(A,h.niceMax);v=Math.ceil(S/w-1e-9)*w}else{v=Math.ceil(b/w-1e-9)*w;let A=o<1-1e-9?-o*v/(1-o):h.niceMin,S=Math.min(A,h.niceMin);y=Math.floor(S/w+1e-9)*w}h.result=[];for(let A=y;A<=v+w*1e-9;A=T.preciseAddition(A,w))h.result.push(T.stripNumber(A,7));h.niceMin=y,h.niceMax=v,s[c.ai].forEach(A=>{i[A]=h.niceMin,a[A]=h.niceMax})})}else if(n.length===1){let o=n[0];this.setYScaleForIndex(o.ai,o.minY,o.maxY),s[o.ai].forEach(l=>{i[l]=e.yAxisScale[o.ai].niceMin,a[l]=e.yAxisScale[o.ai].niceMax})}}},Oe=class{constructor(t){this.w=t,this.scales=new us(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(t){let e=this.w.layout.gridWidth;if(!e||!t||!t.length)return 0;let s=this.w.config.xaxis,i=typeof s.min=="number"?s.min:t[0],a=typeof s.max=="number"?s.max:t[t.length-1];return a>i?(a-i)/e:0}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,n,r,o,l,c,h,d,f;let g=this.w.config,p=this.w.globals,m=-Number.MAX_VALUE,b=Number.MIN_VALUE;i===null&&(i=t+1);let x=this.w.seriesData.series,_=x,w=x;g.chart.type==="candlestick"?(_=this.w.candleData.seriesCandleL,w=this.w.candleData.seriesCandleH):g.chart.type==="boxPlot"?(_=this.w.candleData.seriesCandleO,w=this.w.candleData.seriesCandleC):g.chart.type==="violin"?(_=this.w.violinData.seriesViolinMin,w=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(_=this.w.rangeData.seriesRangeStart,w=this.w.rangeData.seriesRangeEnd);let y=!1;if(this.w.seriesData.seriesX.length>=i){let v=(a=p.brushSource)==null?void 0:a.w.config.chart.brush;(g.chart.zoom.enabled&&g.chart.zoom.autoScaleYaxis||v?.enabled&&v?.autoScaleYaxis)&&(y=!0)}for(let v=t;v<i;v++){p.dataPoints=Math.max(p.dataPoints,x[v].length);let A=g.series[v].type;this.w.labelData.categoryLabels.length&&(p.dataPoints=this.w.labelData.categoryLabels.filter(k=>typeof k<"u").length),this.w.labelData.labels.length&&g.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((k,L)=>k+L.length,0)!==0&&(p.dataPoints=Math.max(p.dataPoints,this.w.labelData.labels.length));let S=0,C=x[v].length-1;if(y){let k=this._xPixelTolerance(this.w.seriesData.seriesX[v]);if(g.xaxis.min){let L=g.xaxis.min-k;for(;S<C&&this.w.seriesData.seriesX[v][S]<L;S++);}if(g.xaxis.max){let L=g.xaxis.max+k;for(;C>S&&this.w.seriesData.seriesX[v][C]>L;C--);}}if(_===x&&w===x&&g.chart.type!=="boxPlot"&&A!=="candlestick"&&A!=="boxPlot"&&A!=="violin"&&A!=="rangeArea"&&A!=="rangeBar"&&!(this.w.seriesData.seriesGoals[v]&&this.w.seriesData.seriesGoals[v].length)){let k=x[v],L=Math.min(C,k.length-1),E=(n=this.w.seriesData._parsedExtrema)==null?void 0:n[v];if(E&&E.ref===k&&E.len===k.length&&S===0&&L===k.length-1)E.maxY>m&&(m=E.maxY),E.lowestY<e&&(e=E.lowestY),E.negMinY<0&&E.negMinY<b&&(b=E.negMinY),E.yDec>p.yValueDecimal&&(p.yValueDecimal=E.yDec),E.hasNulls&&(p.hasNullValues=!0);else{let D=p.yValueDecimal,P=!1;for(let F=S;F<=L;F++){let R=k[F];if(R!==null&&typeof R=="number"&&R===R&&R!==1/0&&R!==-1/0){if(R>m&&(m=R),R<e&&(e=R),b>R&&R<0&&(b=R),!Number.isInteger(R)){let N=R<0?-R:R;if(N>=1e-6&&N<1e21){let z=""+R,$=z.indexOf("."),W=$===-1?0:z.length-$-1;W>D&&(D=W)}else{let z=T.noExponents(R);T.isFloat(z)&&(D=Math.max(D,z.toString().split(".")[1].length))}}}else P=!0}p.yValueDecimal=D,P&&(p.hasNullValues=!0)}s=m,(A==="bar"||A==="column")&&(b<0&&m<0&&(m=0,s=Math.max(s,0)),b===Number.MIN_VALUE&&(b=0,e=Math.min(e,0)));continue}for(let k=S;k<=C&&k<this.w.seriesData.series[v].length;k++){let L=x[v][k];if(L!==null&&T.isNumber(L)){switch(typeof((r=w[v])==null?void 0:r[k])<"u"&&(m=Math.max(m,w[v][k]),e=Math.min(e,w[v][k])),typeof((o=_[v])==null?void 0:o[k])<"u"&&(e=Math.min(e,_[v][k]),s=Math.max(s,_[v][k])),A){case"candlestick":typeof this.w.candleData.seriesCandleC[v][k]<"u"&&(m=Math.max(m,this.w.candleData.seriesCandleH[v][k]),e=Math.min(e,this.w.candleData.seriesCandleL[v][k]));break;case"boxPlot":typeof this.w.candleData.seriesCandleC[v][k]<"u"&&(m=Math.max(m,this.w.candleData.seriesCandleC[v][k]),e=Math.min(e,this.w.candleData.seriesCandleO[v][k]));break;case"violin":typeof((l=this.w.violinData.seriesViolinMax[v])==null?void 0:l[k])<"u"&&(m=Math.max(m,this.w.violinData.seriesViolinMax[v][k]),e=Math.min(e,this.w.violinData.seriesViolinMin[v][k]));break}if(A&&A!=="candlestick"&&A!=="boxPlot"&&A!=="violin"&&A!=="rangeArea"&&A!=="rangeBar"&&(m=Math.max(m,this.w.seriesData.series[v][k]),e=Math.min(e,this.w.seriesData.series[v][k])),this.w.seriesData.seriesGoals[v]&&this.w.seriesData.seriesGoals[v][k]&&Array.isArray(this.w.seriesData.seriesGoals[v][k])&&this.w.seriesData.seriesGoals[v][k].forEach(E=>{m=Math.max(m,E.value),e=Math.min(e,E.value)}),this.w.config.chart.type==="boxPlot"||A==="boxPlot"){let E=(h=(c=this.w.candleData.seriesBoxPoints)==null?void 0:c[v])==null?void 0:h[k];if(E)for(let D=0;D<E.length;D++){let P=E[D];typeof P=="number"&&(m=Math.max(m,P),e=Math.min(e,P))}}s=m,L=T.noExponents(L),T.isFloat(L)&&(p.yValueDecimal=Math.max(p.yValueDecimal,L.toString().split(".")[1].length)),b>((d=_[v])==null?void 0:d[k])&&((f=_[v])==null?void 0:f[k])<0&&(b=_[v][k])}else p.hasNullValues=!0}(A==="bar"||A==="column")&&(b<0&&m<0&&(m=0,s=Math.max(s,0)),b===Number.MIN_VALUE&&(b=0,e=Math.min(e,0)))}return g.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&p.isBarHorizontal&&(b=e),g.chart.type==="bar"&&(b<0&&m<0&&(m=0),b===Number.MIN_VALUE&&(b=0)),{minY:b,maxY:m,lowestY:e,highestY:s}}setYRange(){let t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let s=Number.MAX_VALUE,i;if(t.isMultipleYAxis){s=Number.MAX_VALUE;for(let a=0;a<this.w.seriesData.series.length;a++)i=this.getMinYMaxY(a),t.minYArr[a]=i.lowestY,t.maxYArr[a]=i.highestY,s=Math.min(s,i.lowestY)}return i=this.getMinYMaxY(0,s,void 0,this.w.seriesData.series.length),e.chart.type==="bar"?(t.minY=i.minY,t.maxY=i.maxY):(t.minY=i.lowestY,t.maxY=i.highestY),s=i.lowestY,e.chart.stacked&&this._setStackedMinMax(),e.chart.type==="line"||e.chart.type==="area"||e.chart.type==="scatter"||e.chart.type==="candlestick"||e.chart.type==="boxPlot"||e.chart.type==="violin"||e.chart.type==="rangeBar"&&!t.isBarHorizontal?t.minY===Number.MIN_VALUE&&s!==-Number.MAX_VALUE&&s!==t.maxY&&(t.minY=s):t.minY=t.minY!==Number.MIN_VALUE?Math.min(i.minY,t.minY):i.minY,e.yaxis.forEach((a,n)=>{a.max!==void 0&&(typeof a.max=="number"?t.maxYArr[n]=a.max:typeof a.max=="function"&&(t.maxYArr[n]=a.max(t.isMultipleYAxis?t.maxYArr[n]:t.maxY)),t.maxY=t.maxYArr[n]),a.min!==void 0&&(typeof a.min=="number"?t.minYArr[n]=a.min:typeof a.min=="function"&&(t.minYArr[n]=a.min(t.isMultipleYAxis?t.minYArr[n]===Number.MIN_VALUE?0:t.minYArr[n]:t.minY)),t.minY=t.minYArr[n])}),t.isBarHorizontal&&["min","max"].forEach(n=>{e.xaxis[n]!==void 0&&typeof e.xaxis[n]=="number"&&(n==="min"?t.minY=e.xaxis[n]:t.maxY=e.xaxis[n])}),t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=s):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEach(a=>{let n=a;switch(n.type||e.chart.type){case"bar":case"column":t.barGroups.push(n.group);break;case"line":t.lineGroups.push(n.group);break;case"area":t.areaGroups.push(n.group);break}}),t.barGroups=t.barGroups.filter((a,n,r)=>r.indexOf(a)===n),t.lineGroups=t.lineGroups.filter((a,n,r)=>r.indexOf(a)===n),t.areaGroups=t.areaGroups.filter((a,n,r)=>r.indexOf(a)===n),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){let t=this.w.globals,e=this.w.config,s=e.xaxis.type==="numeric"||e.xaxis.type==="datetime"||e.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,i=()=>{var a;let n=t.minX,r=t.maxX;for(let o=0;o<this.w.seriesData.series.length;o++){let l=this.w.labelData.labels[o];if(!l)continue;let c=(a=this.w.seriesData._parsedExtrema)==null?void 0:a[o];if(c&&c.xNumeric&&c.xref===l&&c.len===l.length){c.maxX>r&&(r=c.maxX),c.minX<n&&(n=c.minX);continue}for(let h=0;h<l.length;h++){let d=l[h];d!==null&&typeof d=="number"&&d===d&&(d>r&&(r=d),d<n&&(n=d))}}t.maxX=r,t.initialMaxX=r,t.minX=n,t.initialMinX=n};if(this.w.axisFlags.isXNumeric&&i(),this.w.axisFlags.noLabelsProvided&&e.xaxis.categories.length===0&&(t.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.minX=1,t.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let a=10;if(e.xaxis.tickAmount===void 0)a=Math.round(t.svgWidth/150),e.xaxis.type==="numeric"&&t.dataPoints<30&&(a=t.dataPoints-1),a>t.dataPoints&&t.dataPoints!==0&&(a=t.dataPoints-1);else if(e.xaxis.tickAmount==="dataPoints"){if(this.w.seriesData.series.length>1&&(a=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){let n=Math.round(t.maxX-t.minX);n<30&&(a=n)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,e.xaxis.max!==void 0&&typeof e.xaxis.max=="number"&&(t.maxX=e.xaxis.max),e.xaxis.min!==void 0&&typeof e.xaxis.min=="number"&&(t.minX=e.xaxis.min),e.xaxis.range!==void 0&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){let n=[];for(let r=t.minX-1;r<t.maxX;r++)n.push(r+1);t.xAxisScale={result:n,niceMin:n[0],niceMax:n[n.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(0,a,a,0,e.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,a-1,0,e.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&this.w.labelData.labels.length&&(t.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}setZRange(){let t=this.w.globals;if(this.w.axisFlags.isDataXYZ){for(let e=0;e<this.w.seriesData.series.length;e++)if(typeof this.w.seriesData.seriesZ[e]<"u")for(let s=0;s<this.w.seriesData.seriesZ[e].length;s++)this.w.seriesData.seriesZ[e][s]!==null&&T.isNumber(this.w.seriesData.seriesZ[e][s])&&(t.maxZ=Math.max(t.maxZ,this.w.seriesData.seriesZ[e][s]),t.minZ=Math.min(t.minZ,this.w.seriesData.seriesZ[e][s]))}}_handleSingleDataPoint(){let t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){let s=new mt(this.w);if(e.xaxis.type==="datetime"){let i=s.getDate(t.minX);e.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),t.minX=new Date(i).getTime();let a=s.getDate(t.maxX);e.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()+2):a.setDate(a.getDate()+2),t.maxX=new Date(a).getTime()}else(e.xaxis.type==="numeric"||e.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}_getMinXDiff(){let t=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach((e,s)=>{var i;if(e.length){e.length===1&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);let a=(i=this.w.seriesData._parsedExtrema)==null?void 0:i[s];if(a&&a.xNumeric&&a.xSorted&&a.xref===e&&a.len===e.length){a.minXDiff<t.minXDiff&&(t.minXDiff=a.minXDiff),(t.dataPoints===1||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5);return}let n=!0,r=t.minXDiff;for(let l=1;l<e.length;l++){let c=e[l]-e[l-1];if(c>0)c<r&&(r=c);else if(c<0){n=!1;break}}if(n){t.minXDiff=r,(t.dataPoints===1||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5);return}let o=e.slice();o.sort((l,c)=>l-c),o.forEach((l,c)=>{if(c>0){let h=l-o[c-1];h>0&&(t.minXDiff=Math.min(h,t.minXDiff))}}),(t.dataPoints===1||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5)}})}_setStackedMinMax(){let t=this.w.globals;if(!this.w.seriesData.series.length)return;let e=this.w.labelData.seriesGroups;e.length||(e=[this.w.seriesData.seriesNames.map(a=>a)]);let s={},i={};e.forEach(a=>{s[a]=[],i[a]=[],this.w.config.series.map((r,o)=>a.indexOf(this.w.seriesData.seriesNames[o])>-1?o:null).filter(r=>r!==null).forEach(r=>{var o,l,c,h;for(let d=0;d<this.w.seriesData.series[t.maxValsInArrayIndex].length;d++)typeof s[a][d]>"u"&&(s[a][d]=0,i[a][d]=0),(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||((l=(o=this.w.config.series)==null?void 0:o[r])==null?void 0:l.type)==="bar"||((h=(c=this.w.config.series)==null?void 0:c[r])==null?void 0:h.type)==="column"))&&this.w.seriesData.series[r][d]!==null&&T.isNumber(this.w.seriesData.series[r][d])&&(this.w.seriesData.series[r][d]>0?s[a][d]+=parseFloat(String(this.w.seriesData.series[r][d]))+1e-4:i[a][d]+=parseFloat(String(this.w.seriesData.series[r][d])))})}),Object.entries(s).forEach(([a])=>{s[a].forEach((n,r)=>{t.maxY=Math.max(t.maxY,s[a][r]),t.minY=Math.min(t.minY,i[a][r])})})}};function mi(){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"]}}var be=class{constructor(t,{theme:e=null,timeScale:s=null}={},i){this.w=t,this.elgrid=i,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.axisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&t.config.plotOptions.bar.horizontal,this.xAxisoffX=t.config.xaxis.position==="bottom"?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ct(t,{theme:e,timeScale:s})}drawYaxis(t){let e=this.w,s=new B(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:n,fontWeight:r}=i,o=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return o;let l=s.group({class:"apexcharts-yaxis-texts-g"});o.add(l);let c=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/c,d=e.formatters.yLabelFormatters[t],f=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),g=1;if(e.config.chart.type==="heatmap"&&!e.config.yaxis[t].labels.formatter){let p=parseInt(a,10)||11,m=Math.max(1,Math.floor(e.layout.gridHeight/(p*1.4))),b=c+1;b>m&&(g=Math.ceil(b/m))}if(e.config.yaxis[t].labels.show){let p=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?p=0:e.config.chart.type==="heatmap"&&(p-=h/2),p+=parseInt(a,10)/3;let m=null;for(let b=c;b>=0;b--){let _=g>1&&b%g!==0?"":d(f[b],b,e),w=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&e.config.yaxis.length!==0&&(w*=-1);let y=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),v=this.axesUtils.getYAxisForeColor(i.colors,t),A=Array.isArray(v)?v[b]:v,S=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(M=>M.textContent),C=s.drawText({x:w,y:p,text:S.includes(_)&&!e.config.yaxis[t].labels.showDuplicates?"":_,textAnchor:y,fontSize:a,fontFamily:n,fontWeight:r,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:A,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});l.add(C),this.addTooltip(C,_),m===null&&(m=C),e.config.yaxis[t].labels.rotate!==0&&this.rotateLabel(s,C,m,e.config.yaxis[t].labels.rotate),p+=h}}return this.addYAxisTitle(s,o,t),this.addAxisBorder(s,o,t,c,h),o}getTextAnchor(t,e){return t==="left"?"start":t==="center"?"middle":t==="right"?"end":e?"start":"end"}addTooltip(t,e){let s=O.createElementNS(et,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){let a=t.rotateAroundCenter(s.node),n=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${n.y})`)}addYAxisTitle(t,e,s){let i=this.w;if(i.config.yaxis[s].title.text!==void 0){let a=t.group({class:"apexcharts-yaxis-title"}),n=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,r=t.drawText({x:n,y:i.layout.gridHeight/2+i.layout.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${i.config.yaxis[s].title.style.cssClass}`});a.add(r),e.add(a)}}addAxisBorder(t,e,s,i,a){let n=this.w,r=n.config.yaxis[s].axisBorder,o=31+r.offsetX;if(n.config.yaxis[s].opposite&&(o=-31-r.offsetX),r.show){let l=t.drawLine(o,n.layout.translateY+r.offsetY-2,o,n.layout.gridHeight+n.layout.translateY+r.offsetY+2,r.color,0,r.width);e.add(l)}n.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,i,r,n.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){let e=this.w,s=new B(this.w),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.add(a);let n=e.globals.yAxisScale[t].result.length-1,r=e.layout.gridWidth/n+.1,o=r+e.config.xaxis.labels.offsetX,l=e.formatters.xLabelFormatter,c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),h=e.labelData.timescaleLabels;if(h.length>0&&(this.xaxisLabels=h.slice(),c=h.slice(),n=c.length),e.config.xaxis.labels.show)for(let d=h.length?0:n;h.length?d<h.length:d>=0;h.length?d++:d--){let f=l?.(c[d],d,e),g=e.layout.gridWidth+e.globals.padHorizontal-(o-r+e.config.xaxis.labels.offsetX);if(h.length){let m=this.axesUtils.getLabel(c,h,g,d,this.drawnLabels,this.xaxisFontSize);g=m.x,f=m.text,this.drawnLabels.push(m.text),d===0&&e.globals.skipFirstTimelinelabel&&(f=""),d===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}let p=s.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-(e.config.xaxis.position==="top"?e.layout.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${e.config.xaxis.labels.style.cssClass}`});a.add(p),this.addTooltip(p,f),o+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){let e=this.w,s=new B(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;e.config.chart.type==="bar"&&e.axisFlags.isXNumeric&&(a-=15);let n=s.drawLine(e.globals.padHorizontal+a+i.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(n):t.add(n)}}inversedYAxisTitleText(t){let e=this.w,s=new B(this.w);if(e.config.xaxis.title.text!==void 0){let i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=s.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${e.config.xaxis.title.style.cssClass}`});i.add(a),t.add(i)}}yAxisTitleRotate(t,e){let s=this.w,i=new B(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),n=a?a.getBoundingClientRect():{width:0,height:0},r=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),o=r?r.getBoundingClientRect():{width:0,height:0};if(r){let l=this.xPaddingForYAxisTitle(t,n,o,e);r.setAttribute("x",String(l.xPos-(e?10:0)));let c=i.rotateAroundCenter(r);r.setAttribute("transform",`rotate(${e?s.config.yaxis[t].title.rotate*-1:s.config.yaxis[t].title.rotate} ${c.x} ${c.y})`)}}xPaddingForYAxisTitle(t,e,s,i){let a=this.w,n=0,r=10;return a.config.yaxis[t].title.text===void 0||t<0?{xPos:n,padd:0}:(i?n=e.width+a.config.yaxis[t].title.offsetX+s.width/2+r/2:(n=e.width*-1+a.config.yaxis[t].title.offsetX+r/2+s.width/2,a.globals.isBarHorizontal&&(r=25,n=e.width*-1-a.config.yaxis[t].title.offsetX-r)),{xPos:n,padd:r})}setYAxisXPosition(t,e){let s=this.w,i=0,a=0,n=18,r=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((o,l)=>{let c=s.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||t[l].width===0,h=t[l].width+e[l].width;o.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[l]=a-o.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+r,c||(r+=h+20),s.globals.translateYAxisX[l]=a-o.labels.offsetX+20):(i=s.layout.translateX-n,c||(n+=h+20),s.globals.translateYAxisX[l]=i+o.labels.offsetX)})}setYAxisTextAlignments(){let t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((s,i)=>{let a=t.config.yaxis[i];if(a&&!a.floating&&a.labels.align!==void 0){let n=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`),r=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),o=n.getBoundingClientRect();r.forEach(l=>{l.setAttribute("text-anchor",a.labels.align)}),a.labels.align==="left"&&!a.opposite?n.setAttribute("transform",`translate(-${o.width}, 0)`):a.labels.align==="center"?n.setAttribute("transform",`translate(${o.width/2*(a.opposite?1:-1)}, 0)`):a.labels.align==="right"&&a.opposite&&n.setAttribute("transform",`translate(${o.width}, 0)`)}})}},xi=class{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){let s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,t)?s.globals.events[t].push(e):s.globals.events[t]=[e]}removeEventListener(t,e){let s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;let i=s.globals.events[t].indexOf(e);i!==-1&&s.globals.events[t].splice(i,1)}fireEvent(t,e){let s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;(!e||!e.length)&&(e=[]);let i=s.globals.events[t],a=i.length;for(let n=0;n<a;n++)i[n].apply(null,e)}setupEventHandlers(){let t=this.w,e=this.ctx,s=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(i=>{s?.addEventListener(i,a=>{let n=a.target.getAttribute("i")===null&&t.interact.capturedSeriesIndex!==-1?t.interact.capturedSeriesIndex:a.target.getAttribute("i"),r=a.target.getAttribute("j")===null&&t.interact.capturedDataPointIndex!==-1?t.interact.capturedDataPointIndex:a.target.getAttribute("j"),o=Object.assign({},t,{seriesIndex:t.globals.axisCharts?n:0,dataPointIndex:r});a.type==="keydown"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(a),typeof t.config.chart.events.keyDown=="function"&&t.config.chart.events.keyDown(a,e,o),e.ctx.events.fireEvent("keydown",[a,e,o])):a.type==="keyup"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(typeof t.config.chart.events.keyUp=="function"&&t.config.chart.events.keyUp(a,e,o),e.ctx.events.fireEvent("keyup",[a,e,o])):a.type==="mousemove"||a.type==="touchmove"?typeof t.config.chart.events.mouseMove=="function"&&t.config.chart.events.mouseMove(a,e,o):a.type==="mouseleave"||a.type==="touchleave"?typeof t.config.chart.events.mouseLeave=="function"&&t.config.chart.events.mouseLeave(a,e,o):(a.type==="mouseup"&&a.which===1||a.type==="touchend")&&(typeof t.config.chart.events.click=="function"&&t.config.chart.events.click(a,e,o),e.ctx.events.fireEvent("click",[a,e,o]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(i=>{t.dom.baseEl.addEventListener(i,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){let e=this.w,s=t.target.className;if(t.type==="click"){let i=e.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&s!=="apexcharts-menu-icon"&&i.classList.remove("apexcharts-menu-open")}e.interact.clientX=t.type==="touchmove"?t.touches[0].clientX:t.clientX,e.interact.clientY=t.type==="touchmove"?t.touches[0].clientY:t.clientY}},bi=class{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales,s=H.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));let i=e.filter(a=>a.name===t)[0];if(i){let a=T.extend(Ar,i);this.w.globals.locale=a.options}else throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options")}},yi=class{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){let s=this.w.globals,i=this.w.config,a=new Wt(this.w,this.ctx,e),n=new be(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&t!=="radar"){let r,o;s.isBarHorizontal?(o=n.drawYaxisInversed(0),r=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(r),this.w.dom.elGraphical.add(o)):(r=a.drawXaxis(),this.w.dom.elGraphical.add(r),i.yaxis.map((l,c)=>{if(s.ignoreYAxisIndexes.indexOf(c)===-1&&(o=n.drawYaxis(c),this.w.dom.Paper.add(o),this.w.config.grid.position==="back")){let h=this.w.dom.Paper.children()[1];h&&(h.remove(),this.w.dom.Paper.add(h))}}))}}},Be=class{constructor(t){this.w=t}drawXCrosshairs(){let t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs").forEach(w=>w.remove());let e=new B(this.w),s=new at(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,n=t.config.xaxis.crosshairs.fill.type,r=i.colorFrom,o=i.colorTo,l=i.opacityFrom,c=i.opacityTo,h=i.stops,d="none",f=a.enabled,g=a.left,p=a.top,m=a.blur,b=a.color,x=a.opacity,_=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){n==="gradient"&&(_=e.drawGradient("vertical",r,o,l,c,null,h,[]));let w=t.config.xaxis.crosshairs.width===1?e.drawLine(0,0,0,0):e.drawRect(),y=t.layout.gridHeight;(!T.isNumber(y)||y<0)&&(y=0);let v=t.config.xaxis.crosshairs.width;(!T.isNumber(v)||Number(v)<0)&&(v=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:v,height:y,fill:_,filter:d,"fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),f&&(w=s.dropShadow(w,{left:g,top:p,blur:m,color:b,opacity:x})),t.dom.elGraphical.add(w)}}drawYCrosshairs(){let t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden").forEach(n=>n.remove());let e=new B(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){let n=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);n.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(n)}let a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),t.dom.elGraphical.add(a)}};function Dr(u,t){if(!T.isObject(u)||!T.isObject(t))return t!==void 0?t:u;let e=G({},u);for(let s of Object.keys(t)){let i=t[s];i!==void 0&&(T.isObject(i)&&T.isObject(u[s])?e[s]=Dr(u[s],i):e[s]=i)}return e}var wi=class{constructor(t){this.w=t,this._activeBreakpoint=null}checkResponsiveConfig(t){let e=this.w,s=e.config;if(s.responsive.length===0)return;let i=s.responsive.slice();i.sort((r,o)=>r.breakpoint>o.breakpoint?1:o.breakpoint>r.breakpoint?-1:0).reverse();let a=new se({}),n=(r={})=>{var o;let l=i[0].breakpoint,c=H.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(c>l){if(this._activeBreakpoint!==null){if(!e.globals.initialConfig)return;let h=T.clone(e.globals.initialConfig);h.series=T.clone(e.config.series);let d=lt.extendArrayProps(a,h,e);r=T.extend(d,r),this.overrideResponsiveOptions(r),this._activeBreakpoint=null}}else for(let h=0;h<i.length;h++)if(c<i[h].breakpoint){let d=(o=i[h].options)!=null&&o.yaxis?T.clone(i[h].options.yaxis):null;if(r=lt.extendArrayProps(a,i[h].options,e),r=T.extend(e.config,r),Array.isArray(e.config.yaxis)&&d){let f=Array.isArray(d)?d:[d];r=j(G({},r),{yaxis:e.config.yaxis.map((g,p)=>Dr(g,f[p]))})}this.overrideResponsiveOptions(r),this._activeBreakpoint=i[h].breakpoint}};if(t){let r=lt.extendArrayProps(a,t,e);r=T.extend(e.config,r),r=T.extend(r,t),n(r)}else n({})}overrideResponsiveOptions(t){let e=new se(t).init({responsiveOverride:!0});this.w.config=e}};function _l(u){var t,e,s;let i=u.globals;if(!i.axisCharts||!u.seriesData||!Array.isArray(u.seriesData.series)||u.seriesData.series.length===0){i.prevStreamFrame=null;return}let a=[];(e=(t=u.dom)==null?void 0:t.baseEl)!=null&&e.querySelectorAll&&u.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(n=>{var r,o,l,c,h;let d=parseInt((r=n.getAttribute("index"))!=null?r:"",10),f=parseInt((l=(o=n.getAttribute("j"))!=null?o:n.getAttribute("rel"))!=null?l:"",10),g=parseFloat((h=(c=n.getAttribute("r"))!=null?c:n.getAttribute("default-marker-size"))!=null?h:"");isFinite(d)&&isFinite(f)&&isFinite(g)&&((a[d]=a[d]||[])[f]=g)}),i.prevStreamFrame={seriesX:(u.seriesData.seriesX||[]).slice(),seriesY:u.seriesData.series.slice(),xPixels:(i.seriesXvalues||[]).slice(),yPixels:(i.seriesYvalues||[]).slice(),rPixels:a,labels:(i.labels||[]).slice(),isXNumeric:!!((s=u.axisFlags)!=null&&s.isXNumeric)}}function Al(u,t,e,s){var i;let a=u.globals,n=a.prevStreamFrame;if(!n||!a.dataChanged||!((i=u.axisFlags)!=null&&i.isXNumeric))return null;let r=n.seriesX[t],o=n.seriesY[t],l=u.seriesData.seriesX[t],c=u.seriesData.series[t];if(!r||!o||!l||!c||r.length<3||l.length<3)return null;let h=-1;for(let P=0;P<r.length;P++)if(r[P]===l[0]){h=P;break}if(h===-1)return null;let d=Math.min(r.length-h,l.length);if(d<2)return null;let f=l.length-d;if(h===0&&f===0)return null;for(let P=0;P<d;P++){if(r[h+P]!==l[P])return null;let F=o[h+P],R=c[P];if(F!==R&&!(F==null&&R==null))return null}let g=n.xPixels[t],p=n.yPixels[t];if(!g||!p)return null;let m=-1,b=-1;for(let P=0;P<d;P++)g[h+P]==null||p[h+P]==null||e[P]==null||s[P]==null||(m===-1&&(m=P),b=P);if(m===-1||b<=m)return null;let x=e[m],_=e[b],w=g[h+m],y=g[h+b];if(Math.abs(_-x)<1e-6)return null;let v=(y-w)/(_-x),A=w-v*x;if(!isFinite(v)||!isFinite(A)||Math.abs(v-1)>.02||Math.abs(A)<.5)return null;let S=m,C=m;for(let P=m;P<=b;P++){let F=s[P];F==null||p[h+P]==null||(F<s[S]&&(S=P),F>s[C]&&(C=P))}let M=1,k=0,L=s[S],E=s[C];if(Math.abs(E-L)>1e-6?(M=(p[h+C]-p[h+S])/(E-L),k=p[h+S]-M*L):k=p[h+S]-L,!isFinite(M)||!isFinite(k)||M<.2||M>5)return null;let D=Math.floor((m+b)/2);if(D!==m&&D!==b&&e[D]!=null&&g[h+D]!=null){let P=v*e[D]+A;if(Math.abs(P-g[h+D])>1.5)return null;if(s[D]!=null&&p[h+D]!=null){let F=M*s[D]+k;if(Math.abs(F-p[h+D])>1.5)return null}}return{ax:v,bx:A,ay:M,by:k}}var Sl=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function vn(u,t){let{ax:e,bx:s,ay:i,by:a}=t,n=[],r=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g,o;for(;(o=r.exec(u))!==null;){let l=o[1].toUpperCase(),c=(o[2].match(Sl)||[]).map(parseFloat);if(l==="Z"){n.push("z");continue}if(l==="H"){for(let d of c)n.push(`H ${e*d+s}`);continue}if(l==="V"){for(let d of c)n.push(`V ${i*d+a}`);continue}if(l==="A"){for(let d=0;d+6<c.length;d+=7)n.push(`A ${c[d]} ${c[d+1]} ${c[d+2]} ${c[d+3]} ${c[d+4]} ${e*c[d+5]+s} ${i*c[d+6]+a}`);continue}let h=[];for(let d=0;d+1<c.length;d+=2)h.push(`${e*c[d]+s} ${i*c[d+1]+a}`);h.length&&n.push(`${l} ${h.join(" ")}`)}return n.join(" ")}function Cl(u,t){let e=t.config.chart.streaming;if(!e||!e.enabled)return;let s=e.maxPoints,i=t.config.xaxis.range,a=n=>n==null?null:Array.isArray(n)?typeof n[0]=="number"?n[0]:null:typeof n=="object"&&typeof n.x=="number"?n.x:null;u.forEach(n=>{var r;let o=n?.data;if(!Array.isArray(o)||o.length<2)return;if(typeof s=="number"&&s>0){o.length>s&&(n.data=o.slice(o.length-s));return}if(!i)return;let l=a(o[o.length-1]),c=a(o[0]);if(l==null||c==null||l<=c)return;let h=(l-c)/(o.length-1),d=l-i-2*h,f=0;for(;f<o.length&&((r=a(o[f]))!=null?r:d)<d;)f++;f>0&&(n.data=o.slice(f))})}function kl(u,t){let e=new Set(u.exits),s=[],i=0;for(let a=0;a<u.toOld.length;a++){let n=u.toOld[a];if(n!==-1){for(;i<n;)e.has(i)&&s.push({oldJ:i,newJ:-1}),i++;s.push({oldJ:n,newJ:a}),i=n+1}else s.push({oldJ:-1,newJ:a})}for(;i<t;)e.has(i)&&s.push({oldJ:i,newJ:-1}),i++;return s}function _n(u,t,e){if(!u||typeof u!="string")return null;let s=ie(u);if(!s.length||s[0][0]!=="M")return null;for(let o=1;o<s.length;o++)if(s[o][0]==="M")return null;let i=s,a=null;if(e){if(s.length<5||(a=s.slice(-3),i=s.slice(0,-3),a[2][0]!=="Z")||a[1][0]!=="L"||a[0][0]!=="L"&&a[0][0]!=="C")return null}else if(s[s.length-1][0]==="Z")return null;if(i.length!==t||i.length<2)return null;let n=i[1][0];if(n!=="L"&&n!=="C")return null;for(let o=2;o<i.length;o++)if(i[o][0]!==n)return null;let r=i.map(o=>o[0]==="C"?[Number(o[5]),Number(o[6])]:[Number(o[1]),Number(o[2])]);for(let o of r)if(!isFinite(o[0])||!isFinite(o[1]))return null;return{body:i,closing:a,segType:n,anchors:r}}function jt(u,t,e){return[u[0]+(t[0]-u[0])*e,u[1]+(t[1]-u[1])*e]}function Ml(u,t,e){let s=u,i=[t[1],t[2]],a=[t[3],t[4]],n=[t[5],t[6]],r=jt(s,i,e),o=jt(i,a,e),l=jt(a,n,e),c=jt(r,o,e),h=jt(o,l,e),d=jt(c,h,e);return{first:["C",r[0],r[1],c[0],c[1],d[0],d[1]],second:["C",h[0],h[1],l[0],l[1],n[0],n[1]],mid:d}}function Ll(u,t,e){let s=[t[1],t[2]],i=jt(u,s,e);return{first:["L",i[0],i[1]],second:["L",s[0],s[1]],mid:i}}function An(u,t){let{body:e,closing:s,segType:i,anchors:a}=u,n=a.length,r=t.length,o=d=>i==="C"?["C",d[0],d[1],d[0],d[1],d[0],d[1]]:["L",d[0],d[1]],l=[["M",a[0][0],a[0][1]]],c=0;for(;c<r&&t[c]!==0;)c++;for(let d=1;d<=c;d++)l.push(o(a[0]));let h=c+1;for(let d=0;d<n-1;d++){let f=0;for(;h+f<r&&t[h+f]===-1;)f++;let g=e[d+1];if(!f)l.push(g.slice());else{let p=f+1,m=a[d],b=g;for(let x=0;x<f;x++){let _=1/(p-x),w=i==="C"?Ml(m,b,_):Ll(m,b,_);l.push(w.first),m=w.mid,b=w.second}l.push(b)}h+=f+1}for(;h<r;)l.push(o(a[n-1])),h++;return s&&s.forEach(d=>l.push(d.slice())),l}function Sn(u,t,e,s,i,a){let n=_n(u,s,a);if(!n)return null;let r=_n(t,i,a);if(!r||n.segType!==r.segType||(n.closing||r.closing)&&(!n.closing||!r.closing||n.closing[0][0]!==r.closing[0][0]))return null;let o=e.map(c=>c.oldJ),l=e.map(c=>c.newJ);return{from:gi(An(n,o)),toInterp:gi(An(r,l))}}function te(u){var t;let e=u.config.chart.animations;if(!e||e.enabled===!1||!e.dynamicAnimation||e.dynamicAnimation.enabled===!1)return!1;let s=(t=e.largeDatasetThreshold)!=null?t:0;return s>0&&u.globals.dataPoints>s?!1:!!(H.isBrowser()&&u.globals.dataChanged&&u.globals.shouldAnimate)}function fe(u,t,e){var s,i,a,n;if((s=u.axisFlags)!=null&&s.isXNumeric){let o=(a=(i=u.seriesData)==null?void 0:i.seriesX)==null?void 0:a[t];if(o&&o.length&&o[e]!=null)return"x:"+o[e]}let r=(n=u.globals.labels)==null?void 0:n[e];return r!=null&&String(r)!==""?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+e}function Dl(u,t,e){var s,i;if(u.isXNumeric){let n=(s=u.seriesX)==null?void 0:s[t];if(n&&n.length&&n[e]!=null)return"x:"+n[e]}let a=(i=u.labels)==null?void 0:i[e];return a!=null&&String(a)!==""?"c:"+(Array.isArray(a)?a.join(" "):String(a)):"j:"+e}function El(u,t){let e=new Map;u.forEach((l,c)=>{e.has(l)||e.set(l,c)});let s=new Array(t.length),i=new Set,a=-1,n=!0,r=u.length===t.length;t.forEach((l,c)=>{let h=e.has(l)&&!i.has(e.get(l))?e.get(l):-1;s[c]=h,h!==-1&&(i.add(h),h<a&&(n=!1),a=h),h!==c&&(r=!1)});let o=[];for(let l=0;l<u.length;l++)i.has(l)||o.push(l);return{toOld:s,exits:o,ordered:n,changed:!r}}function Cn(u){let t=new Map;return u.map(e=>{let s=t.get(e)||0;return t.set(e,s+1),s===0?e:`${e}#${s}`})}function Ge(u,t,e=!1,s=!1){var i,a;if(!te(u))return null;let n=u.globals.prevStreamFrame;if(!n)return null;let r=(i=n.seriesY)==null?void 0:i[t],o=(a=u.seriesData.series)==null?void 0:a[t];if(!Array.isArray(r)||!Array.isArray(o)||!r.length||!o.length)return null;let l=Cn(r.map((d,f)=>Dl(n,t,f))),c=Cn(o.map((d,f)=>fe(u,t,f))),h=El(l,c);return!h.ordered&&!s||!h.changed&&!e?null:{join:h,oldKeys:l,newKeys:c}}function za(u){var t,e;let s=u.config.chart.animations;return hs((e=(t=s.dynamicAnimation)==null?void 0:t.easing)!=null?e:s.easing)}function Tt(u,t,e,s,i){let a=performance.now(),n=r=>{if(u.globals.isDestroyed)return;let o=Math.max(0,Math.min(1,(r-a)/t));s(e(o),o),o<1?O.requestAnimationFrame(n):i&&i()};O.requestAnimationFrame(n)}function kn(u,{elPointsMain:t,realIndex:e,speed:s}){var i,a,n,r;if(!t?.node)return!1;let o=Ge(u,e,!0);if(!o)return!1;let l=u.globals.prevStreamFrame;if(!l)return!1;let c=(i=l.xPixels)==null?void 0:i[e],h=(a=l.yPixels)==null?void 0:a[e];if(!c||!h)return!1;let d=t.node.querySelectorAll(".apexcharts-marker");if(!d.length)return!1;let f=((n=u.globals.seriesXvalues)==null?void 0:n[e])||[],g=((r=u.globals.seriesYvalues)==null?void 0:r[e])||[],p=za(u),m=Math.max(1,s||1);return t.node.classList.remove("apexcharts-element-hidden"),d.forEach(b=>{var x,_,w,y,v,A,S,C,M;let k=parseInt((_=(x=b.getAttribute("j"))!=null?x:b.getAttribute("rel"))!=null?_:"",10);if(!isFinite(k)||k<0||k>=o.join.toOld.length)return;let L=o.join.toOld[k],E=f[k]!=null&&g[k]!=null?[f[k],g[k]]:null;if(L===-1||!E){let W=b.style;W.opacity="0",Tt(u,m,p,Y=>{W.opacity=String(Y)},()=>{W.opacity=""});return}let D=((w=c[L])!=null?w:NaN)-E[0],P=((y=h[L])!=null?y:NaN)-E[1];if(!isFinite(D)||!isFinite(P))return;let F=(S=(A=(v=l.rPixels)==null?void 0:v[e])==null?void 0:A[L])!=null?S:NaN,R=parseFloat((M=(C=b.getAttribute("r"))!=null?C:b.getAttribute("default-marker-size"))!=null?M:""),N=isFinite(F)&&isFinite(R)&&R>0&&Math.abs(F-R)>.25;if(!(Math.abs(D)>=.5||Math.abs(P)>=.5)&&!N)return;let $=W=>{let Y=D*(1-W),I=P*(1-W);if(N){let U=(F+(R-F)*W)/R;b.setAttribute("transform",`translate(${Y+E[0]*(1-U)}, ${I+E[1]*(1-U)}) scale(${U})`)}else b.setAttribute("transform",`translate(${Y}, ${I})`)};$(0),Tt(u,m,p,$,()=>{b.removeAttribute("transform")})}),!0}function Tl(u,{type:t,realIndex:e,pathFromLine:s,pathFromArea:i,linePaths:a,areaPaths:n}){var r,o;let l=Ge(u,e);if(!l)return null;let{join:c,oldKeys:h,newKeys:d}=l,f=u.globals.prevStreamFrame;if(!f)return null;let g=(r=f.seriesY)==null?void 0:r[e],p=(o=u.seriesData.series)==null?void 0:o[e];if(g.length<2||p.length<2||g.some(x=>x===null)||p.some(x=>x===null))return null;let m=kl(c,h.length),b={};return Array.isArray(a)&&a.length===1&&s&&(b.line=Sn(s,a[0],m,h.length,d.length,!1)),t==="area"&&Array.isArray(n)&&n.length===1&&i&&(b.area=Sn(i,n[0],m,h.length,d.length,!0)),!b.line&&!b.area?null:b}function Pl(u){let t=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(u||"");if(!t)return null;let e=parseFloat(t[1]),s=parseFloat(t[2]);return isFinite(e)&&isFinite(s)?{x:e,y:s}:null}function Rl({w:u,elSeries:t,record:e,newKeys:s,isHorizontal:i,speed:a}){var n;if(!te(u)||!e||!Array.isArray(e.paths)||!t?.node)return;let r=new Set(s),o=e.paths.filter(h=>h&&h.d&&h.key!=null&&!r.has(h.key));if(!o.length)return;let l=new B(u),c=(n=u.globals.colors)==null?void 0:n[parseInt(String(e.realIndex),10)];o.forEach(h=>{let d=h.fill||c||"#c8c8c8";String(d).indexOf("url(")===0&&(d=c||"#c8c8c8");let f=l.drawPath({d:h.d,stroke:"none",strokeWidth:0,fill:d,fillOpacity:1,classes:"apexcharts-bar-ghost"}),g=f.node;g.setAttribute("pointer-events","none"),f.attr("clip-path",`url(#gridRectBarMask${u.globals.cuid})`),t.node.insertBefore(g,t.node.firstChild);let p=Pl(h.d),m=i?"left center":"center bottom";try{let y=g.getBBox();p&&y&&(i?m=Math.abs(p.x-y.x)<=Math.abs(p.x-(y.x+y.width))?"left center":"right center":m=Math.abs(p.y-(y.y+y.height))<=Math.abs(p.y-y.y)?"center bottom":"center top")}catch{}let b=g.style;b.transformBox="fill-box",b.transformOrigin=m;let x=Math.max(1,a||1),_=performance.now(),w=y=>{if(u.globals.isDestroyed||!g.parentNode)return;let v=Math.max(0,Math.min(1,(y-_)/x)),A=1-Math.pow(1-v,3),S=1-A;b.transform=i?`scaleX(${S})`:`scaleY(${S})`,b.opacity=String(1-A),v<1?O.requestAnimationFrame(w):g.parentNode.removeChild(g)};O.requestAnimationFrame(w)})}function Mn(u,t,e){return[...u.querySelectorAll(t)].map(s=>{var i,a,n;return{text:s.textContent||"",display:(n=(a=(i=s.querySelector("tspan"))==null?void 0:i.textContent)!=null?a:s.textContent)!=null?n:"",pos:parseFloat(s.getAttribute(e)||""),transform:s.getAttribute("transform")}})}function Ln(u,t,e){return[...u.querySelectorAll(t)].map(s=>parseFloat(s.getAttribute(e)||""))}var Ms=":not(.apexcharts-tick-ghost)",Er=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${Ms}`,Tr=`.apexcharts-yaxis-texts-g text${Ms}`,Pr=`.apexcharts-gridlines-vertical line${Ms}`,Rr=`.apexcharts-gridlines-horizontal line${Ms}`;function Fr(u){var t,e;let s=u.globals;if(!((t=u.axisFlags)!=null&&t.isXNumeric)||s.isBarHorizontal||(e=u.config.xaxis)!=null&&e.reversed)return null;let i=s.minX,a=s.maxX,n=u.layout.gridWidth;return!isFinite(i)||!isFinite(a)||!(a>i)||!(n>0)?null:{min:i,max:a,width:n}}function Ir(u,t){var e;let s=u.globals;if(s.isBarHorizontal||!Array.isArray(u.config.yaxis)||u.config.yaxis.length!==1||(e=u.config.yaxis[0])!=null&&e.logarithmic)return null;let i=s.minY,a=s.maxY;if(!isFinite(i)||!isFinite(a)||!(a>i))return null;let n=t.map(r=>r.pos).filter(r=>isFinite(r));return n.length<2?null:{min:i,max:a,pLo:Math.max(...n),pHi:Math.min(...n)}}function Fl(u,t){if(!u||!t)return null;let e=u.max-u.min,s=t.max-t.min;return!(e>0)||!(s>0)||!(u.width>0)||!(t.width>0)?null:{toNew:i=>(u.min+i/u.width*e-t.min)/s*t.width,toOld:i=>(t.min+i/t.width*s-u.min)/e*u.width}}function Il(u,t){if(!u||!t)return null;let e=u.pHi-u.pLo,s=t.pHi-t.pLo,i=u.max-u.min,a=t.max-t.min;if(!e||!s||!(i>0)||!(a>0))return null;let n=o=>u.min+(o-u.pLo)/e*i,r=o=>t.min+(o-t.pLo)/s*a;return{toNew:o=>t.pLo+(n(o)-t.min)/a*s,toOld:o=>u.pLo+(r(o)-u.min)/i*e}}function Nl(u){let t=u.globals;if(t.prevChromeFrame=null,!t.axisCharts||!H.isBrowser())return;let e=u.dom.baseEl;if(T.elementExists(e))try{let s=Mn(e,Tr,"y");t.prevChromeFrame={xLabels:Mn(e,Er,"x"),yLabels:s,vGrid:Ln(e,Pr,"x1"),hGrid:Ln(e,Rr,"y1"),xScale:Fr(u),yAnchors:Ir(u,s)}}catch{t.prevChromeFrame=null}}function Dn(u,t,e,s){let i=t.style;i.opacity="0",Tt(u,e,s,a=>{i.opacity=String(a)},()=>{i.opacity=""})}function Je(u,t,e,s,i,a,n){e.forEach(r=>t.setAttribute(r,String(s))),Tt(u,a,n,r=>{let o=String(s+(i-s)*r);e.forEach(l=>t.setAttribute(l,o))},()=>{e.forEach(r=>t.setAttribute(r,String(i)))})}function En(u,{template:t,display:e,attrs:s,from:i,to:a,duration:n,ease:r}){let o=t.parentNode;if(!o)return;let l=t.cloneNode(!0);if(l.classList.add("apexcharts-tick-ghost"),l.setAttribute("pointer-events","none"),l.removeAttribute("id"),e!==void 0){let h=l.querySelector("tspan");h?h.textContent=e:l.textContent=e;let d=l.querySelector("title");d&&(d.textContent=e)}s.forEach(h=>l.setAttribute(h,String(i)));let c=l.style;c.opacity="1",o.appendChild(l),Tt(u,n,r,h=>{let d=String(i+(a-i)*h);s.forEach(f=>l.setAttribute(f,d)),c.opacity=String(1-h)},()=>{l.parentNode&&l.parentNode.removeChild(l)})}var Xl=20;function Tn(u,{newLabels:t,oldLabels:e,posAttr:s,newLines:i,oldLines:a,lineAttrs:n,duration:r,ease:o,project:l}){let c=new Map;e.forEach((y,v)=>{c.has(y.text)||c.set(y.text,j(G({},y),{i:v}))});let h=new Set,d=i.length===t.length,f=a.length===e.length,g=e.map(y=>y.pos).concat(t.map(y=>parseFloat(y.getAttribute(s)||""))).filter(y=>isFinite(y)),p=Math.min(...g),m=Math.max(...g),b=Math.max(40,(m-p)*.25),x=y=>Math.max(p-b,Math.min(m+b,y)),_=(y,v)=>{if(!y)return;let A=parseFloat(y.getAttribute(n[0])||""),S=a[v.i];isFinite(A)&&isFinite(S)&&Je(u,y,n,S,A,r,o)};if(t.forEach((y,v)=>{let A=parseFloat(y.getAttribute(s)||""),S=c.get(y.textContent||""),C=d?i[v]:null;S&&h.add(S.i);let M=y.getAttribute("transform");if(!S||!isFinite(S.pos)){if(!S){if(l&&isFinite(A)&&!M){let k=isFinite(l.toOld(A))?x(l.toOld(A)):NaN;isFinite(k)&&Math.abs(k-A)>.5&&(Je(u,y,[s],k,A,r,o),C&&Je(u,C,n,k,A,r,o))}Dn(u,y,r,o),C&&Dn(u,C,r,o)}return}if(!(!isFinite(A)||Math.abs(S.pos-A)<.5)){if(M||S.transform){let k=S.pos-A;if(isFinite(k)){let L=M||"";Tt(u,r,o,E=>{let D=k*(1-E),P=s==="x"?`translate(${D} 0)`:`translate(0 ${D})`;y.setAttribute("transform",`${P} ${L}`.trim())},()=>{L?y.setAttribute("transform",L):y.removeAttribute("transform")})}_(C,S);return}Je(u,y,[s],S.pos,A,r,o),_(C,S)}}),!l||!t.length)return;let w=0;e.forEach((y,v)=>{if(h.has(v)||!isFinite(y.pos)||y.transform||w>=Xl)return;let A=l.toNew(y.pos);!isFinite(A)||Math.abs(A-y.pos)<.5||(w++,En(u,{template:t[0],display:y.display,attrs:[s],from:y.pos,to:x(A),duration:r,ease:o}),f&&i.length&&isFinite(a[v])&&En(u,{template:i[0],attrs:n,from:a[v],to:x(l.toNew(a[v])),duration:r,ease:o}))})}function Ol(u){let t=u.globals,e=t.prevChromeFrame;if(t.prevChromeFrame=null,!e||!t.axisCharts||!H.isBrowser()||!te(u)||!(u.seriesData.series||[]).some((r,o)=>Ge(u,o,!0,!0)!==null))return;let i=u.dom.baseEl;if(!T.elementExists(i))return;let a=Math.max(1,u.config.chart.animations.dynamicAnimation.speed||1),n=za(u);try{let r=[...i.querySelectorAll(Tr)],o=Fl(e.xScale,Fr(u)),l=Il(e.yAnchors,Ir(u,r.map(c=>({pos:parseFloat(c.getAttribute("y")||"")}))));Tn(u,{newLabels:[...i.querySelectorAll(Er)],oldLabels:e.xLabels,posAttr:"x",newLines:[...i.querySelectorAll(Pr)],oldLines:e.vGrid,lineAttrs:["x1","x2"],duration:a,ease:n,project:o}),Tn(u,{newLabels:r,oldLabels:e.yLabels,posAttr:"y",newLines:[...i.querySelectorAll(Rr)],oldLines:e.hGrid,lineAttrs:["y1","y2"],duration:a,ease:n,project:l})}catch{}}var Nr=".apexcharts-data-labels[data\\:dlKey]",Xr=".apexcharts-datalabel";function Or(u){var t,e;let s=u.config.dataLabels;return!!((t=s?.animate)!=null&&t.enabled||(e=s?.countUp)!=null&&e.enabled)}function Pn(u){if(!isFinite(u))return 0;let t=String(Math.abs(u)),e=t.indexOf("e");if(e!==-1){let i=t.slice(0,e),a=parseInt(t.slice(e+1),10),n=i.indexOf("."),r=n===-1?0:i.length-n-1;return Math.min(6,Math.max(0,r-a))}let s=t.indexOf(".");return s===-1?0:Math.min(6,t.length-s-1)}function Rn(u,t){let e=u.querySelector("tspan");e?e.textContent=t:u.textContent=t}function Bl(u){let t=u.globals;if(t.prevDataLabels=null,!t.axisCharts||!H.isBrowser()||!Or(u))return;let e=u.dom.baseEl;if(T.elementExists(e))try{let s=new Map;e.querySelectorAll(Nr).forEach(i=>{let a=i.getAttribute("data:dlKey");if(!a)return;let n=i.querySelector(Xr);n&&s.set(a,{cx:parseFloat(n.getAttribute("cx")||""),cy:parseFloat(n.getAttribute("cy")||""),val:parseFloat(i.getAttribute("data:dlVal")||"")})}),t.prevDataLabels=s.size?s:null}catch{t.prevDataLabels=null}}function Yl(u,t,e,s){let i=t.style;i.opacity="0",Tt(u,e,s,a=>{i.opacity=String(a)},()=>{i.opacity=""})}function zl(u){var t,e;let s=u.globals,i=s.prevDataLabels;if(s.prevDataLabels=null,!i||!s.axisCharts||!H.isBrowser()||!Or(u)||!te(u))return;let a=u.dom.baseEl;if(!T.elementExists(a))return;let n=u.config.dataLabels,r=!!((t=n.animate)!=null&&t.enabled),o=!!((e=n.countUp)!=null&&e.enabled),l=n.formatter,c=Math.max(1,u.config.chart.animations.dynamicAnimation.speed||1),h=za(u);try{a.querySelectorAll(Nr).forEach(d=>{let f=d.getAttribute("data:dlKey");if(!f)return;let g=d.querySelector(Xr);if(!g)return;let p=i.get(f);if(r)if(p&&isFinite(p.cx)&&isFinite(p.cy)){let m=parseFloat(g.getAttribute("cx")||""),b=parseFloat(g.getAttribute("cy")||""),x=p.cx-m,_=p.cy-b;if(isFinite(x)&&isFinite(_)&&Math.abs(x)+Math.abs(_)>.5){let w=d.getAttribute("transform")||"";Tt(u,c,h,y=>{let v=1-y;d.setAttribute("transform",`translate(${x*v} ${_*v}) ${w}`.trim())},()=>{d.setAttribute("transform",w)})}}else p||Yl(u,d,c,h);if(o&&p&&isFinite(p.val)){let m=parseFloat(d.getAttribute("data:dlVal")||"");if(isFinite(m)&&Math.abs(m-p.val)>1e-9){let b=p.val,x=Math.max(Pn(b),Pn(m)),_=parseInt(f,10),w=parseInt(d.getAttribute("data:dlJ")||"",10),y=j(G({},u),{seriesIndex:_,dataPointIndex:isFinite(w)?w:0,w:u}),v=A=>{let S=Number(A.toFixed(x)),C=S;if(typeof l=="function")try{C=l(S,y)}catch{C=S}return String(C)};Tt(u,c,h,A=>{Rn(g,v(b+(m-b)*A))},()=>{Rn(g,v(m))})}}})}catch{}}var ct=class u{constructor(t,{toggleDataSeries:e=void 0,revertDefaultAxisMinMax:s=void 0,updateSeries:i=void 0}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){let t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){let t=this.w,e="allSeriesEls";return t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=t.dom.baseEl.getElementsByClassName("apexcharts-series")),t.globals.cachedSelectors[e]}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${T.escapeString(t)}']`)}isSeriesHidden(t){var e;let i=this.getSeriesByName(t),a=parseInt((e=i.getAttribute("data:realIndex"))!=null?e:"0",10);return{isHidden:i.classList.contains("apexcharts-series-collapsed"),realIndex:a}}addCollapsedClassToSeries(t,e){u.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){function i(a){for(let n=0;n<a.length;n++)a[n].index===s&&e.node.classList.add("apexcharts-series-collapsed")}i(t.globals.collapsedSeries),i(t.globals.ancillaryCollapsedSeries)}toggleSeries(t){var e;let s=this.isSeriesHidden(t);return(e=this._toggleDataSeries)==null||e.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(t){var e;let s=this.isSeriesHidden(t);s.isHidden&&((e=this._toggleDataSeries)==null||e.call(this,s.realIndex,!0))}hideSeries(t){var e;let s=this.isSeriesHidden(t);s.isHidden||(e=this._toggleDataSeries)==null||e.call(this,s.realIndex,!1)}prepareDataUpdate(){let t=this.w;this.clearSeriesCache(),t.globals.previousPaths=[],t.globals.collapsedSeries=[],t.globals.ancillaryCollapsedSeries=[],t.globals.collapsedSeriesIndices=[],t.globals.ancillaryCollapsedSeriesIndices=[]}resetSeries(t=!0,e=!0,s=!0){var i,a;let n=this.w;this.clearSeriesCache();let r=T.clone(n.globals.initialSeries);Array.isArray(r)||(r=T.clone(n.config.series)||[]),n.globals.previousPaths=[],s?(n.globals.collapsedSeries=[],n.globals.ancillaryCollapsedSeries=[],n.globals.collapsedSeriesIndices=[],n.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),n.config.series=r,t&&(e&&(n.interact.zoomed=!1,(i=this._revertDefaultAxisMinMax)==null||i.call(this)),(a=this._updateSeries)==null||a.call(this,r,n.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){let e=this.w;if(!Array.isArray(t))return t;for(let s=0;s<t.length;s++)e.globals.collapsedSeriesIndices.indexOf(s)>-1&&(t[s]&&typeof t[s]=="object"?t[s].data=[]:t[s]=0);return t}_deriveSeriesNames(){let t=this.w,e=t.config.series||[],s=t.config.labels||[];return e.map((i,a)=>i&&typeof i=="object"&&i.name!=null?String(i.name):s[a]!=null?String(s[a]):`series-${a+1}`)}reconcileCollapsedByName(){let t=this.w,e=t.globals,s=this._deriveSeriesNames(),i=r=>{let o=[],l=[];return r.forEach(c=>{let h=c&&c.name!=null?s.indexOf(c.name):c.index;if(h==null||h<0||h>=t.config.series.length)return;let d=t.config.series[h];c.index=h,c.data=e.axisCharts?d&&d.data?d.data.slice():[]:d,o.push(c),l.push(h)}),{records:o,indices:l}},a=i(e.collapsedSeries);e.collapsedSeries=a.records,e.collapsedSeriesIndices=a.indices;let n=i(e.ancillaryCollapsedSeries);e.ancillaryCollapsedSeries=n.records,e.ancillaryCollapsedSeriesIndices=n.indices,e.allSeriesCollapsed=e.collapsedSeries.length+e.ancillaryCollapsedSeries.length===t.config.series.length,this.emptyCollapsedSeries(t.config.series)}canvasRestyle(t){let e=this.w.globals.activeRenderer;e&&e.kind==="canvas"&&typeof e.restyle=="function"&&e.restyle(t)}highlightSeries(t){var e;let s=this.w,i=this.getSeriesByName(t),a=parseInt((e=i?.getAttribute("data:realIndex"))!=null?e:"",10),n="highlightSeriesEls",r=s.globals.cachedSelectors[n];r||(r=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[n]=r);let o=null,l=null,c=null;if(s.globals.axisCharts||s.config.chart.type==="radialBar")if(s.globals.axisCharts){o=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);let h=s.globals.seriesYAxisReverseMap[a];c=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${h}']`)}else o=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else o=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let h=0;h<r.length;h++)r[h].classList.add(this.legendInactiveClass);if(o){if(!s.globals.axisCharts){let h=o.parentNode;h?.classList.remove(this.legendInactiveClass)}o.classList.remove(this.legendInactiveClass),l!==null&&l.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass)}else for(let h=0;h<r.length;h++)r[h].classList.remove(this.legendInactiveClass);this.canvasRestyle(o&&!Number.isNaN(a)?{active:a,opacity:.2}:null)}toggleSeriesOnHover(t,e){let s=this.w;e||(e=t.target);let i=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(t.type==="mousemove"){let a=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[a])}else if(t.type==="mouseout"){for(let a=0;a<i.length;a++)i[a].classList.remove(this.legendInactiveClass);this.canvasRestyle(null)}}highlightRangeInSeries(t,e){let s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=o=>{for(let l=0;l<i.length;l++){let c=i[l].classList;typeof c[o]=="function"&&c[o](this.legendInactiveClass)}};if(e==="reset"){a("remove");return}let n=s.config.plotOptions.heatmap.colorScale.ranges,r=n&&n[t];if(r){a("add");for(let o=0;o<i.length;o++){let l=Number(i[o].getAttribute("val"));l>=r.from&&l<=r.to&&i[o].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(t="asc",e=[]){let s=this.w,i=0;if(s.config.series.length>1){let a=s.config.series.map((n,r)=>{let o=()=>s.globals.comboCharts?e.length===0||e.length&&e.indexOf(s.config.series[r].type)>-1:!0;return n.data&&n.data.length>0&&s.globals.collapsedSeriesIndices.indexOf(r)===-1&&o()?r:-1});for(let n=t==="asc"?0:a.length-1;t==="asc"?n<a.length:n>=0;t==="asc"?n++:n--)if(a[n]!==-1){i=a[n];break}}return i}getActiveConfigSeriesIndexByGroup(t=[]){let e=this.w;return(e.labelData.seriesGroups||[]).map(i=>{let a=-1;return e.config.series.forEach((n,r)=>{if(i.indexOf(e.seriesData.seriesNames[r])===-1||e.globals.comboCharts&&t.length&&t.indexOf(n.type)===-1)return;n.data&&n.data.length>0&&e.globals.collapsedSeriesIndices.indexOf(r)===-1&&(a=r)}),a})}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((e,s)=>e.type==="bar"||e.type==="column"?s:-1).filter(e=>e!==-1):this.w.config.series.map((e,s)=>s)}getPreviousPaths(){var t,e,s,i;let a=this.w;if(_l(a),Nl(a),Bl(a),!a.globals.axisCharts){a.globals.previousPaths=a.seriesData.series;return}if(!T.elementExists(a.dom.baseEl)){a.globals.previousPaths=[];return}a.globals.previousPaths=[];function n(c,h,d){let f=c[h].childNodes,g={type:d,paths:[],realIndex:c[h].getAttribute("data:realIndex")};for(let p=0;p<f.length;p++)if(f[p].hasAttribute("pathTo")){let m=f[p].getAttribute("pathTo");g.paths.push({d:m,key:f[p].getAttribute("data:pathKey"),fill:f[p].getAttribute("fill")})}a.globals.previousPaths.push(g)}let r=c=>a.dom.baseEl.querySelectorAll(`.apexcharts-${c}-series .apexcharts-series`);["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(c=>{let h=r(c);for(let d=0;d<h.length;d++)n(h,d,c)});let l=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);if(l.length>0)for(let c=0;c<l.length;c++){let h=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${c}'] rect`),d=[];for(let f=0;f<h.length;f++){let g=m=>h[f].getAttribute(m),p={x:parseFloat((t=g("x"))!=null?t:"0"),y:parseFloat((e=g("y"))!=null?e:"0"),width:parseFloat((s=g("width"))!=null?s:"0"),height:parseFloat((i=g("height"))!=null?i:"0")};d.push({rect:p,color:h[f].getAttribute("color")})}a.globals.previousPaths.push(d)}}clearPreviousPaths(){let t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){let t=this.w,e=this,s=t.config.noData,i=new B(e.w),a=t.globals.svgWidth/2,n=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,s.align==="left"?(a=10,r="start"):s.align==="right"&&(a=t.globals.svgWidth-10,r="end"),s.verticalAlign==="top"?n=50:s.verticalAlign==="bottom"&&(n=t.globals.svgHeight-50),a=a+s.offsetX,n=n+parseInt(s.style.fontSize,10)+2+s.offsetY,s.text!==void 0&&s.text!==""){let o=i.drawText({x:a,y:n,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,foreColor:s.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(o)}}setNullSeriesToZeroValues(t){let e=this.w;for(let s=0;s<t.length;s++)if(t[s].length===0)for(let i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)t[s].push(0);return t}hasAllSeriesEqualX(){let t=!0,e=this.w,s=this.filteredSeriesX();for(let i=0;i<s.length-1;i++)if(s[i][0]!==s[i+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}filteredSeriesX(){return this.w.seriesData.seriesX.map(s=>s.length>0?s:[])}},Fn={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"},Wl=24;function Hl(u){if(!H.isBrowser())return{};let t=u.dom&&(u.dom.elWrap||u.dom.baseEl)||null;if(!t)return{};let e=O.getComputedStyle(t);if(!e||typeof e.getPropertyValue!="function")return{};let s=n=>{let r=e.getPropertyValue(n);return r?String(r).trim():""},i={};for(let n in Fn){let r=s(Fn[n]);r&&(i[n]=r)}let a=[];for(let n=1;n<=Wl;n++){let r=s(`--apx-series-${n}`);if(!r)break;a.push(r)}return a.length&&(i.series=a),i}var vi="__apexcharts_themes__";globalThis[vi]||(globalThis[vi]={});function Wa(){return globalThis[vi]}function $l(u,t){if(!u||typeof u!="string"){console.warn("ApexCharts: registerTheme requires a non-empty name.");return}if(t!=null&&(typeof t!="object"||Array.isArray(t))){console.warn(`ApexCharts: registerTheme("${u}") expects an object like { mode, palette, tokens, monochrome, accessibility }.`);return}Wa()[u]=t||{}}function Gl(u){return u&&Wa()[u]||null}function Vl(u){u&&delete Wa()[u]}var $s="#373d3f",Gs="#f6f7f8",Vs="#e0e0e0",_i=class{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),this._tokens={},this._namedTheme=null}checkHeatmapDistributed(){let{chart:t,plotOptions:e}=this.w.config;return t.type==="treemap"&&e.treemap&&e.treemap.distributed||t.type==="heatmap"&&e.heatmap&&e.heatmap.distributed}checkBarDistributed(){let{chart:t,plotOptions:e}=this.w.config;return e.bar&&e.bar.distributed&&(t.type==="bar"||t.type==="rangeBar")}init(){this.setDefaultColors()}setDefaultColors(){var t;let e=this.w,s=new T;this._namedTheme=Gl(e.config.theme.name),this._applyNamedThemeMode(),e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`),this._applyModeDefaults(),this._tokens=this._resolveTokens(),this.applyTokenChrome(this._tokens);let i=(t=e.config.theme.accessibility)==null?void 0:t.colorBlindMode;if(i){e.globals.colors=this.getColorBlindColors(i),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);let r=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],r),this.applyDataLabelsColors(r),this.applyRadarPolygonsColors(),this.applyMarkersColors(r),i==="highContrast"&&e.dom.elWrap.classList.add("apexcharts-high-contrast");return}let a=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(a),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,s));let n=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],n),this.applyDataLabelsColors(n),this.applyRadarPolygonsColors(),this.applyMarkersColors(n)}_applyModeDefaults(){let t=this.w,e=t.config.theme.mode;e==="dark"?(t.config.chart.foreColor===$s&&(t.config.chart.foreColor=Gs),t.config.theme.palette==="palette1"&&(t.config.theme.palette="palette4"),t.config.tooltip&&t.config.tooltip.theme!=="light"&&(t.config.tooltip.theme="dark")):e==="light"&&(t.config.chart.foreColor===Gs&&(t.config.chart.foreColor=$s),t.config.theme.palette==="palette4"&&(t.config.theme.palette="palette1"))}_applyNamedThemeMode(){let t=this._namedTheme;if(!t)return;let e=this.w.config.theme;t.mode&&!e.mode&&(e.mode=t.mode),t.accessibility&&t.accessibility.colorBlindMode&&!(e.accessibility&&e.accessibility.colorBlindMode)&&(e.accessibility=e.accessibility||{},e.accessibility.colorBlindMode=t.accessibility.colorBlindMode),t.monochrome&&t.monochrome.enabled&&!e.monochrome.enabled&&(e.monochrome=G(G({},e.monochrome),t.monochrome))}_resolveTokens(){let t=this._namedTheme&&this._namedTheme.tokens||{},e=this._shouldUseTokens()?Hl(this.w):{};return G(G({},t),e)}_shouldUseTokens(){return this.w.config.theme.tokens!==!1}applyTokenChrome(t){if(!t)return;let e=this.w;if(t.fore&&(e.config.chart.foreColor===$s||e.config.chart.foreColor===Gs)&&(e.config.chart.foreColor=t.fore),t.grid){e.config.grid.borderColor===Vs&&(e.config.grid.borderColor=t.grid);let n=r=>{r&&(r.axisBorder&&r.axisBorder.color===Vs&&(r.axisBorder.color=t.grid),r.axisTicks&&r.axisTicks.color===Vs&&(r.axisTicks.color=t.grid))};n(e.config.xaxis),Array.isArray(e.config.yaxis)?e.config.yaxis.forEach(n):n(e.config.yaxis)}let s=e.globals.tokenSurface,i=e.config.chart.background,a=!i||i===s;if(t.surface){if(a){e.config.chart.background=t.surface,e.globals.tokenSurface=t.surface;let n=e.dom.Paper&&e.dom.Paper.node;n&&n.style&&(n.style.background=t.surface)}}else if(s&&i===s){e.config.chart.background="",e.globals.tokenSurface=void 0;let n=e.dom.Paper&&e.dom.Paper.node;n&&n.style&&(n.style.background="")}}getColors(t){let e=this.w;return!t||t.length===0?this.predefined():Array.isArray(t)&&t.length>0&&typeof t[0]=="function"?(this.isColorFn=!0,e.config.series.map((s,i)=>{let a=t[i]||t[0];return typeof a=="function"?a({value:e.globals.axisCharts?e.seriesData.series[i][0]||0:e.seriesData.series[i],seriesIndex:i,dataPointIndex:i,w:this.w}):a})):t}applySeriesColors(t,e){t.forEach((s,i)=>{s&&(e[i]=s)})}getMonochromeColors(t,e,s){let{color:i,shadeIntensity:a,shadeTo:n}=t,r=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(r/a),l=0;return Array.from({length:r},()=>{let c=n==="dark"?s.shadeColor(l*-1,i):s.shadeColor(l,i);return l+=o,c})}applyColorTypes(t,e){let s=this.w;t.forEach(i=>{s.globals[i].colors=s.config[i].colors===void 0?this.isColorFn?s.config.colors:e:s.config[i].colors.slice(),this.pushExtraColors(s.globals[i].colors)})}applyDataLabelsColors(t){let e=this.w;e.globals.dataLabels.style.colors=e.config.dataLabels.style.colors===void 0?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){let t=this.w;t.globals.radarPolygons.fill.colors=t.config.plotOptions.radar.polygons.fill.colors===void 0?[t.config.theme.mode==="dark"?"#343A3F":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}applyMarkersColors(t){let e=this.w;e.globals.markers.colors=e.config.markers.colors===void 0?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}pushExtraColors(t,e,s=null){let i=this.w,a=e||i.seriesData.series.length;if(s===null&&(s=this.isBarDistributed||this.isHeatmapDistributed||i.config.chart.type==="heatmap"&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),s&&i.seriesData.series.length&&(a=i.seriesData.series[i.globals.maxValsInArrayIndex].length*i.seriesData.series.length),t.length<a){let n=a-t.length;for(let r=0;r<n;r++)t.push(t[r])}}getColorBlindColors(t){let e=mi();return({deuteranopia:e.cvdDeuteranopia,protanopia:e.cvdProtanopia,tritanopia:e.cvdTritanopia,highContrast:e.highContrast}[t]||e.palette1).slice()}updateThemeOptions(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};let e=t.theme.mode,s=e==="dark"?"palette4":e==="light"?"palette1":t.theme.palette||"palette1",i=e==="dark"?"#f6f7f8":e==="light"?"#373d3f":t.chart.foreColor||"#373d3f";return t.tooltip.theme=e||"light",t.chart.foreColor=i,t.theme.palette=s,t}predefined(){let t=this.w.config.theme.palette,e=mi(),s=e[t]||e.palette1,i=this._tokens||{};if(Array.isArray(i.series)&&i.series.length)return i.series.slice();if(i.accent)return[i.accent,...s];let a=this._namedTheme;return a&&Array.isArray(a.palette)&&a.palette.length?a.palette.slice():s}},Ai=class{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){let e=this.w,s=t==="title"?e.config.title:e.config.subtitle,i=e.globals.svgWidth/2,a=s.offsetY,n="middle";if(s.align==="left"?(i=10,n="start"):s.align==="right"&&(i=e.globals.svgWidth-10,n="end"),i=i+s.offsetX,a=a+parseInt(s.style.fontSize,10)+s.margin/2,s.text!==void 0){let o=new B(this.w).drawText({x:i,y:a,text:s.text,textAnchor:n,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});o.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(o)}}},Ul=class{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){let e=this.w,s=0,i=0,a=t==="title"?e.config.title.floating:e.config.subtitle.floating,n=e.dom.baseEl.querySelector(`.apexcharts-${t}-text`);if(n!==null&&!a){let r=n.getBoundingClientRect();s=r.width,i=e.globals.axisCharts?r.height+5:r.height}return{width:s,height:i}}getLegendsRect(){let t=this.w,e=t.dom.elLegendWrap;!t.config.legend.height&&(t.config.legend.position==="top"||t.config.legend.position==="bottom")&&e&&(e.style.maxHeight=t.globals.svgHeight/2+"px");let s=Object.assign({},T.getBoundingClientRect(e));return e!==null&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:s.x,y:s.y,height:s.height,width:s.height===0?0:s.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},(t.config.legend.position==="left"||t.config.legend.position==="right")&&this.dCtx.lgRect.width*1.5>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){let t=this.w,e=[];t.config.series.forEach((r,o)=>{r.data.forEach((l,c)=>{let d=(f=>t.config.dataLabels.formatter(f,{seriesIndex:o,dataPointIndex:c,w:t}))(t.seriesData.series[o][c]);e.push(d)})});let s=T.getLargestStringFromArr(e),i=new B(this.w),a=t.config.dataLabels.style,n=i.getTextRects(s,parseInt(a.fontSize).toString(),a.fontFamily);return{width:n.width*1.05,height:n.height}}getLargestStringFromMultiArr(t,e){let s=this.w,i=t;if(s.axisFlags.isMultiLineX){let a=e.map(o=>Array.isArray(o)?o.length:1),n=Math.max(...a),r=a.indexOf(n);i=e[r]}return i}getSparklineStrokeInset(){let t=this.w,e=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,s=e/2;if(!t.config.stroke.show||!(s>0))return{top:0,bottom:0};let i=t.globals.maxY-t.globals.minY,a=this._getSeriesYExtremes();if(!this._strokeTracesDataPoints()||!(i>0)||!a)return{top:s,bottom:s};let n=Math.max(t.globals.svgHeight-e,0),r=n*(t.globals.maxY-a.max)/i,o=n*(a.min-t.globals.minY)/i;return{top:Math.min(Math.max(s-r,0),s),bottom:Math.min(Math.max(s-o,0),s)}}_strokeTracesDataPoints(){let t=this.w;if(!t.globals.axisCharts||t.config.chart.stacked)return!1;let e=["line","area","scatter"];return t.config.series.every(s=>e.includes(s.type||t.config.chart.type))}_getSeriesYExtremes(){let t=1/0,e=-1/0;return this.w.seriesData.series.forEach(s=>{Array.isArray(s)&&s.forEach(i=>{Number.isFinite(i)&&(i<t&&(t=i),i>e&&(e=i))})}),t===1/0?null:{min:t,max:e}}},Si=class{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){let t=this.w,e=t.labelData.labels.slice();t.config.xaxis.convertedCatToNumeric&&e.length===0&&(e=t.labelData.categoryLabels);let s;if(t.labelData.timescaleLabels.length>0){let i=this.getxAxisTimeScaleLabelsCoords();s={width:i.width,height:i.height},t.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=(t.config.legend.position==="left"||t.config.legend.position==="right")&&!t.config.legend.floating?this.dCtx.lgRect.width:0;let i=t.formatters.xLabelFormatter,a=T.getLargestStringFromArr(e),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,e);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((d,f)=>d.length>f.length?d:f,0),n=a);let r=new ee(this.w),o=a;a=r.xLabelFormat(i,a,o,{i:void 0,dateFormatter:new mt(this.w).formatDate,w:t}),n=r.xLabelFormat(i,n,o,{i:void 0,dateFormatter:new mt(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&typeof a>"u"||String(a).trim()==="")&&(a="1",n=a);let l=new B(this.w),c=l.getTextRects(a,t.config.xaxis.labels.style.fontSize),h=c;if(a!==n&&(h=l.getTextRects(n,t.config.xaxis.labels.style.fontSize)),s={width:c.width>=h.width?c.width:h.width,height:c.height>=h.height?c.height:h.height},s.width*e.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&t.config.xaxis.labels.rotate!==0||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.layout.rotateXLabels=!0;let d=f=>l.getTextRects(f,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);c=d(a),a!==n&&(h=d(n)),s.height=(c.height>h.height?c.height:h.height)/1.5,s.width=c.width>h.width?c.width:h.width}}else t.layout.rotateXLabels=!1}return t.config.xaxis.labels.show||(s={width:0,height:0}),{width:s.width,height:s.height}}getxAxisGroupLabelsCoords(){var t;let e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};let s=((t=e.config.xaxis.group.style)==null?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,i=e.labelData.groups.map(h=>h.title),a,n=T.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,i),o=new B(this.w),l=o.getTextRects(n,s),c=l;return n!==r&&(c=o.getTextRects(r,s)),a={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){let t=this.w,e=0,s=0;if(t.config.xaxis.title.text!==void 0){let a=new B(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,s=a.height}return{width:e,height:s}}getxAxisTimeScaleLabelsCoords(){let t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();let e=this.dCtx.timescaleLabels.map(r=>r.value),s=e.reduce((r,o)=>typeof r>"u"?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):r.length>o.length?r:o,0),a=new B(this.w).getTextRects(s,t.config.xaxis.labels.style.fontSize);return a.width*1.05*e.length>t.layout.gridWidth&&t.config.xaxis.labels.rotate!==0&&(t.globals.overlappingXLabels=!0),a}additionalPaddingXLabels(t){let e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,n=t.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;let r=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,o=h=>s.collapsedSeriesIndices.indexOf(h)!==-1,l=h=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){let d=this.dCtx.timescaleLabels[0],g=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+n/1.75-this.dCtx.yAxisWidthRight,p=d.position-n/1.75+this.dCtx.yAxisWidthLeft,m=e.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;g>s.svgWidth-e.layout.translateX-m&&(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")?n/1.75:10)&&(s.skipFirstTimelinelabel=!0)}else a==="datetime"?this.dCtx.gridPad.right<n&&!e.layout.rotateXLabels&&(s.skipLastTimelinelabel=!0):a!=="datetime"&&this.dCtx.gridPad.right<n/2-this.dCtx.yAxisWidthRight&&!e.layout.rotateXLabels&&!e.config.xaxis.labels.trim&&(this.dCtx.xPadRight=n/2+1)},c=(h,d)=>{i.yaxis.length>1&&o(d)||l(h)};i.yaxis.forEach((h,d)=>{r?(this.dCtx.gridPad.left<n&&(this.dCtx.xPadLeft=n/2+1),this.dCtx.xPadRight=n/2+1):c(h,d)})}},Ci=class{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){let t=this.w,e=0,s=0,i=[],a=10,n=new Ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return t.config.yaxis.map((r,o)=>{let l={seriesIndex:o,dataPointIndex:-1,w:t},c=t.globals.yAxisScale[o],h=0;if(!n.isYAxisHidden(o)&&r.labels.show&&r.labels.minWidth!==void 0&&(h=r.labels.minWidth),!n.isYAxisHidden(o)&&r.labels.show&&c.result.length){let d=t.formatters.yLabelFormatters[o],f=c.niceMin===Number.MIN_VALUE?0:c.niceMin,g=c.result.reduce((w,y)=>{var v,A;return((v=String(d(w,l)))==null?void 0:v.length)>((A=String(d(y,l)))==null?void 0:A.length)?w:y},f);g=d(g,l);let p=g;if((typeof g>"u"||g.length===0)&&(g=c.niceMax),String(g).length===1&&(g=g+".0",p=g),t.globals.isBarHorizontal){a=0;let w=t.labelData.labels.slice();g=T.getLargestStringFromArr(w),g=d(g,{seriesIndex:o,dataPointIndex:-1,w:t}),p=this.dCtx.dimHelpers.getLargestStringFromMultiArr(g,w)}let m=new B(this.w),b="rotate(".concat(r.labels.rotate," 0 0)"),x=m.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1),_=x;g!==p&&(_=m.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1)),i.push({width:(h>_.width||h>x.width?h:_.width>x.width?_.width:x.width)+a,height:_.height>x.height?_.height:x.height})}else i.push({width:e,height:s})}),i}getyAxisTitleCoords(){let t=this.w,e=[];return t.config.yaxis.map(s=>{if(s.show&&s.title.text!==void 0){let i=new B(this.w),a="rotate(".concat(s.title.rotate," 0 0)"),n=i.getTextRects(s.title.text,s.title.style.fontSize,s.title.style.fontFamily,a,!1);e.push({width:n.width,height:n.height})}else e.push({width:0,height:0})}),e}getTotalYAxisWidth(){let t=this.w,e=0,s=0,i=0,a=t.globals.yAxisScale.length>1?10:0,n=new Ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),r=function(l){return t.globals.ignoreYAxisIndexes.indexOf(l)>-1},o=(l,c)=>{let h=t.config.yaxis[c].floating,d=0;l.width>0&&!h?(d=l.width+a,r(c)&&(d=d-l.width-a)):d=h||n.isYAxisHidden(c)?0:5,t.config.yaxis[c].opposite?i=i+d:s=s+d,e=e+d};return t.layout.yLabelsCoords.map((l,c)=>{o(l,c)}),t.layout.yTitleCoords.map((l,c)=>{o(l,c)}),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.layout.yLabelsCoords[0].width+t.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=s,this.dCtx.yAxisWidthRight=i,e}},ki=class{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){let{w:e}=this,{config:s,globals:i}=e;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;let a=h=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(h),n=s.chart.type,r=0,o=a(n)?s.series.length:1;i.comboBarCount>0&&(o=i.comboBarCount),i.collapsedSeries.forEach(h=>{a(h.type)&&(o-=1)}),s.chart.stacked&&(o=1);let l=a(n)||i.comboBarCount>0,c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&o>0&&c!==0){c<=3&&(c=i.dataPoints);let h=c/t,d=i.minXDiff&&i.minXDiff/h>0?i.minXDiff/h:0;d>t/2&&(d/=2),r=d*parseInt(s.plotOptions.bar.columnWidth,10)/100,r<1&&(r=1),i.barPadForNumericAxis=r}return r}gridPadForStackedTotalDataLabels(){let{w:t}=this,e=t.config.plotOptions.bar.dataLabels.total;if(!t.globals.isBarHorizontal||!t.config.chart.stacked||t.config.chart.stackType!=="100%"||!e.enabled)return;let s=t.seriesData.stackedSeriesTotals||[];if(!s.length)return;let i=e.formatter||t.config.dataLabels.formatter,a=s.map((l,c)=>String(i?i(l,j(G({},t),{seriesIndex:0,dataPointIndex:c,w:t})):l)),o=new B(t).getTextRects(T.getLargestStringFromArr(a),parseFloat(e.style.fontSize).toString(),e.style.fontFamily).width+Math.abs(e.offsetX||0)+2;this.dCtx.xPadRight=Math.max(this.dCtx.xPadRight,o)}gridPadFortitleSubtitle(){let{w:t}=this,{globals:e}=t,s=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(r=>{t.config[r].text!==void 0?s+=t.config[r].margin:s+=this.dCtx.isSparkline||!e.axisCharts?0:5}),t.config.legend.show&&t.config.legend.position==="bottom"&&!t.config.legend.floating&&!e.axisCharts&&(s+=10);let a=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),n=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");this.dCtx.titleBlockPad=s,t.layout.gridHeight-=a.height+n.height+s,t.layout.translateY+=a.height+n.height+s}setGridXPosForDualYAxis(t,e){let{w:s}=this,i=new Ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((a,n)=>{s.globals.ignoreYAxisIndexes.indexOf(n)===-1&&!a.floating&&!i.isYAxisHidden(n)&&(a.opposite&&(s.layout.translateX-=e[n].width+t[n].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}},le="http://www.w3.org/1999/xhtml",Ha=18,ql=23;function fs(u,t){let e=u.config.drilldown&&u.config.drilldown.breadcrumb||{};return G(G({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},e),t||{})}function Br(u,t){let e=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(i=>u.dom.baseEl.querySelector(i)).filter(i=>i!==null);if(!e.length)return;let s=u.dom.elWrap.getBoundingClientRect().top;for(let i=0;i<e.length+1;i++){let a=t.getBoundingClientRect(),n=e.find(r=>{let o=r.getBoundingClientRect();return a.left<o.right&&a.right>o.left&&a.top<o.bottom&&a.bottom>o.top});if(!n)break;t.style.top=`${n.getBoundingClientRect().bottom-s+4}px`}}function jl(u,t){let e=u.layout.translateY||0,s=u.dom.elWrap;if(!s)return e;let i=u.dom.baseEl.querySelectorAll(".apexcharts-yaxis-label");if(!i.length)return e;let a=s.getBoundingClientRect().top,n=t.getBoundingClientRect(),r=e;for(let o=0;o<i.length;o++){let l=i[o].getBoundingClientRect();l.height&&(l.left>=n.right||l.right<=n.left||(r=Math.min(r,l.top-a)))}return r}function Zl(u,t,e,s){var i;let a=(i=t?.dimensions)==null?void 0:i.dimHelpers,n=a?a.getTitleSubtitleCoords("title").height+a.getTitleSubtitleCoords("subtitle").height:0,r=e.getBoundingClientRect().height||Ha,o=s&&s.offsetY||0,l=jl(u,e);if(l-n>=r+1)return e.style.top=`${l-r-1+o}px`,!0;e.style.top=`${n+o}px`;let c=u.config.theme.mode==="dark";return e.style.background=c?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",e.style.borderRadius="4px",!1}function Yr(u){let t=u.dom.elWrap;if(!t)return;let e=t.querySelector(".apexcharts-breadcrumb");e&&e.parentNode&&e.parentNode.removeChild(e)}function Kl(u,t){if(!H.isBrowser())return null;let e=u.dom.elWrap;if(!e)return null;Yr(u);let s=t.config||fs(u);if(s.show===!1)return null;let i=t.crumbs||[];if(i.length<2)return null;let a=O.createElementNS(le,"nav");a.setAttribute("class","apexcharts-breadcrumb"),a.setAttribute("aria-label",t.ariaLabel||"Breadcrumb"),Jl(a,s),t.compact&&(a.style.fontSize="11px",a.style.padding="0 2px");let n=s.separator!=null?s.separator:" / ";return i.forEach((r,o)=>{var l;if(o>0){let f=O.createElementNS(le,"span");f.setAttribute("class","apexcharts-breadcrumb-separator"),f.setAttribute("aria-hidden","true"),f.textContent=n,a.appendChild(f)}let c=o===0?(l=s.rootLabel)!=null?l:"All":r.label;if(typeof s.formatter=="function"&&(c=s.formatter(c,{index:o,depth:i.length-1,data:r.data})),o===i.length-1){let f=O.createElementNS(le,"span");f.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),f.setAttribute("aria-current","page"),f.textContent=String(c),a.appendChild(f);return}let h=O.createElementNS(le,"button");if(h.setAttribute("type","button"),h.setAttribute("class","apexcharts-breadcrumb-item"),o===0){let f=O.createElementNS(le,"span");f.setAttribute("class","apexcharts-breadcrumb-arrow"),f.setAttribute("aria-hidden","true"),f.textContent="\u2190",h.appendChild(f)}let d=O.createElementNS(le,"span");d.setAttribute("class","apexcharts-breadcrumb-label"),d.textContent=String(c),h.appendChild(d),h.addEventListener("click",()=>t.onNavigate(o,r)),a.appendChild(h)}),e.appendChild(a),a}function Jl(u,t){let e=t.offsetX||0,s=t.offsetY||0;u.style.position="absolute",u.style.top=s+"px",t.position==="top-right"?u.style.right=-e+3+"px":u.style.left=e+"px"}var ye=class{constructor(t,e){this.w=t,this.ctx=e,this.theme=e.theme,this.timeScale=e.timeScale,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new Ul(this),this.dimYAxis=new Ci(this),this.dimXAxis=new Si(this),this.dimGrid=new ki(this),this.lgWidthForSideLegends=0,this.gridPad=G({},this.w.config.grid.padding),this.xPadRight=0,this.titleBlockPad=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){let t=this.w,e=t.globals;if(this.gridPad=G({},t.config.grid.padding),this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0},this.isSparkline){this.w.globals.markers.largestSize>0&&Object.entries(this.gridPad).forEach(([a,n])=>{this.gridPad[a]=Math.max(n,this.w.globals.markers.largestSize/1.5)});let i=this.dimHelpers.getSparklineStrokeInset();this.gridPad.top=Math.max(i.top,this.gridPad.top),this.gridPad.bottom=Math.max(i.bottom,this.gridPad.bottom)}e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),this.gridPadForBreadcrumb(),this.dimGrid.gridPadForStackedTotalDataLabels(),t.layout.gridHeight=t.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,t.layout.gridWidth=t.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;let s=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-s*2,t.layout.translateX=t.layout.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),t.layout.translateY=t.layout.translateY+this.gridPad.top,{layout:{gridHeight:t.layout.gridHeight,gridWidth:t.layout.gridWidth,translateX:t.layout.translateX,translateY:t.layout.translateY,translateXAxisX:t.layout.translateXAxisX,translateXAxisY:t.layout.translateXAxisY,rotateXLabels:t.layout.rotateXLabels,xAxisHeight:t.layout.xAxisHeight,xAxisLabelsHeight:t.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:t.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:t.layout.xAxisLabelsWidth,yLabelsCoords:t.layout.yLabelsCoords,yTitleCoords:t.layout.yTitleCoords,gridPad:G({},this.gridPad)}}}gridPadForBreadcrumb(){var t,e,s,i,a,n;let r=this.w,o=r.config.chart.type==="treemap";if(o){let f=(e=(t=r.config.plotOptions)==null?void 0:t.treemap)==null?void 0:e.zoom;if(f&&f.enabled){if(fs(r,f.breadcrumb).show===!1)return;this.gridPad.top+=Ha+4;return}}if(!r.globals.axisCharts||!this.ctx.drilldown||!r.config.drilldown||!r.config.drilldown.enabled||fs(r).show===!1)return;let l=parseFloat(String((n=(a=(i=(s=r.config.yaxis)==null?void 0:s[0])==null?void 0:i.labels)==null?void 0:a.style)==null?void 0:n.fontSize))||11,c=o?0:Math.ceil(l*hi/2),h=ql+1+c,d=o?0:this.titleBlockPad||0;this.gridPad.top+=Math.max(0,h-d)}setDimensionsForAxisCharts(){let t=this.w,e=t.globals,s=this.dimYAxis.getyAxisLabelsCoords(),i=this.dimYAxis.getyAxisTitleCoords();e.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.layout.yLabelsCoords=[],t.layout.yTitleCoords=[],t.config.yaxis.map((f,g)=>{t.layout.yLabelsCoords.push({width:s[g].width,index:g}),t.layout.yTitleCoords.push({width:i[g].width,index:g})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();let a=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),r=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,r,n),t.layout.translateXAxisY=t.layout.rotateXLabels?this.xAxisHeight/8:-4,t.layout.translateXAxisX=t.layout.rotateXLabels&&t.axisFlags.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(t.layout.rotateXLabels=!1,t.layout.translateXAxisY=-1*((parseInt(t.config.xaxis.labels.style.fontSize,10)||12)/1.5)),t.layout.translateXAxisY=t.layout.translateXAxisY+t.config.xaxis.labels.offsetY,t.layout.translateXAxisX=t.layout.translateXAxisX+t.config.xaxis.labels.offsetX;let o=this.yAxisWidth,l=this.xAxisHeight;t.layout.xAxisLabelsHeight=this.xAxisHeight-r.height,t.layout.xAxisGroupLabelsHeight=t.layout.xAxisLabelsHeight-a.height,t.layout.xAxisLabelsWidth=this.xAxisWidth,t.layout.xAxisHeight=this.xAxisHeight;let c=10;(t.config.chart.type==="radar"||this.isSparkline)&&(o=0,l=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||t.config.chart.type==="treemap")&&(o=0,l=0,c=0),!this.isSparkline&&t.config.chart.type!=="treemap"&&this.dimXAxis.additionalPaddingXLabels(a);let h=()=>{t.layout.translateX=o+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-this.lgRect.height-l-(!this.isSparkline&&t.config.chart.type!=="treemap"?t.layout.rotateXLabels?10:15:0),t.layout.gridWidth=e.svgWidth-o-this.datalabelsCoords.width*2};switch(t.config.xaxis.position==="top"&&(c=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=c,h();break;case"top":t.layout.translateY=this.lgRect.height+c,h();break;case"left":t.layout.translateY=c,t.layout.translateX=this.lgRect.width+o+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-o-this.datalabelsCoords.width*2;break;case"right":t.layout.translateY=c,t.layout.translateX=o+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-o-this.datalabelsCoords.width*2-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(i,s),new be(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){let t=this.w,e=t.globals,s=t.config,i=0;if(t.config.legend.show&&!t.config.legend.floating&&(i=20),s.chart.type==="unit"){let o=s.legend.show&&!s.legend.floating,l=s.legend.position,c=0,h=0;o&&(l==="bottom"||l==="top"?c=this.lgRect.height:h=this.lgRect.width+i),t.layout.gridWidth=e.svgWidth-h,t.layout.gridHeight=e.svgHeight-c,t.layout.translateX=l==="left"?h:0,t.layout.translateY=l==="top"?c:0;return}let a=s.chart.type==="sunburst"?"sunburst":s.chart.type==="pie"||s.chart.type==="polarArea"||s.chart.type==="donut"?"pie":"radialBar",n=s.plotOptions[a].offsetY,r=s.plotOptions[a].offsetX;if(!s.legend.show||s.legend.floating){t.layout.gridHeight=e.svgHeight;let o=t.dom.elWrap.getBoundingClientRect().width;t.layout.gridWidth=Math.min(o,t.layout.gridHeight),t.layout.translateY=n,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;return}switch(s.legend.position){case"bottom":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=n-10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"top":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=this.lgRect.height+n+10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"left":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i,t.layout.gridHeight=s.chart.height!=="auto"?e.svgHeight:t.layout.gridWidth,t.layout.translateY=n,t.layout.translateX=r+this.lgRect.width+i;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i-5,t.layout.gridHeight=s.chart.height!=="auto"?e.svgHeight:t.layout.gridWidth,t.layout.translateY=n,t.layout.translateX=r+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,s){let i=this.w,a=i.labelData.hasXaxisGroups?2:1,n=s.height+t.height+e.height,r=i.axisFlags.isMultiLineX?1.2:hi,o=i.layout.rotateXLabels?22:10,c=i.layout.rotateXLabels&&i.config.legend.position==="bottom"?10:0;this.xAxisHeight=n*r+a*o+c,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);let h=0,d=0;i.config.yaxis.forEach(f=>{h+=f.labels.minWidth,d+=f.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>d&&(this.yAxisWidth=d)}},De=1e3,Ee=60*De,Te=60*Ee,we=24*Te,In=7*we,Us=30*we,qt=365*we,Ql=10/(1440*60),qs=[{unit:"second",step:1,approxMs:De},{unit:"second",step:5,approxMs:5*De},{unit:"second",step:15,approxMs:15*De},{unit:"second",step:30,approxMs:30*De},{unit:"minute",step:1,approxMs:Ee},{unit:"minute",step:5,approxMs:5*Ee},{unit:"minute",step:15,approxMs:15*Ee},{unit:"minute",step:30,approxMs:30*Ee},{unit:"hour",step:1,approxMs:Te},{unit:"hour",step:3,approxMs:3*Te},{unit:"hour",step:6,approxMs:6*Te},{unit:"hour",step:12,approxMs:12*Te},{unit:"day",step:1,approxMs:we},{unit:"day",step:2,approxMs:2*we},{unit:"week",step:1,approxMs:In},{unit:"week",step:2,approxMs:2*In},{unit:"month",step:1,approxMs:Us},{unit:"month",step:3,approxMs:3*Us},{unit:"month",step:6,approxMs:6*Us},{unit:"year",step:1,approxMs:qt},{unit:"year",step:2,approxMs:2*qt},{unit:"year",step:5,approxMs:5*qt},{unit:"year",step:10,approxMs:10*qt},{unit:"year",step:25,approxMs:25*qt},{unit:"year",step:50,approxMs:50*qt},{unit:"year",step:100,approxMs:100*qt}],zr=10,Mi=class{constructor(t,e){this.w=t,this.ctx=e,this.tickInterval=null,this.timeScaleArray=[],this.utc=t.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){let s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],this.timeScaleArray=[],[];let i=e-t,a=i/we;s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<Ql?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);let n=Number.isFinite(s.config.xaxis.tickAmount)?s.config.xaxis.tickAmount:zr;this.tickInterval=tc(i,n);let r=this.generateBaseTicks(t,e,this.tickInterval);return this.timeScaleArray=r,r}generateBaseTicks(t,e,s){let i=this.w,a=new mt(i),n=this.utc,r=i.layout.gridWidth,o=e-t,l=[],c=a.ceilToBoundary(t,s.unit,s.step,n),h=0,d=5e3;for(;c<=e&&h<d;){let f=a.getDateFields(c,n),g=o>0?(c-t)/o*r:0;l.push({timestamp:c,position:g,unit:s.unit,year:f.year,month:f.month+1,day:f.date,hour:f.hour,minute:f.minute,second:f.second,value:c}),c=a.addInterval(c,s.unit,s.step,n),h++}return l}recalcDimensionsBasedOnFormat(t){let e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();let n=new ye(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(n.layout)}formatDates(t){let e=this.w,s=new mt(e),i=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,n=this.utc,r=(l,c=2)=>String(l).padStart(c,"0"),o=i||this._effectiveFormat(t,a);return t.map(l=>{let c=s.getDate(l.timestamp),h=s.formatDate(c,o);return{dateString:`${l.year}-${r(l.month)}-${r(l.day)}T${r(l.hour)}:${r(l.minute)}:${r(l.second)}.000${n?"Z":""}`,position:l.position,value:h,unit:l.unit,year:l.year,month:l.month}})}_effectiveFormat(t,e){if(t.length===0)return e.day||"dd MMM";let s=this.tickInterval&&this.tickInterval.unit||t[0].unit,i=e[s==="week"?"day":s]||e.day||"dd MMM",a=t[0],n=t[t.length-1],r=a.year!==n.year,l=r||a.month!==n.month||a.day!==n.day,c=/y/i.test(i),h=/M/.test(i),d=/d/i.test(i);return s==="month"||s==="week"||s==="day"?r&&!c?i+" yyyy":i:(s==="hour"||s==="minute"||s==="second")&&l&&!d&&!h?(r?"dd MMM yyyy":"dd MMM")+" "+i:i}removeOverlappingTS(t){if(t.length===0)return[];let e=this.w,s=new B(e),i=!1,a;t[0].value&&t.every(o=>o.value.length===t[0].value.length)&&(i=!0,a=s.getTextRects(t[0].value,e.config.xaxis.labels.style.fontSize).width);let n=0;return t.map((o,l)=>{if(l===0||!e.config.xaxis.labels.hideOverlappingLabels)return o;let c=i?a:s.getTextRects(t[n].value,e.config.xaxis.labels.style.fontSize).width,h=t[n].position;return o.position>h+c+10?(n=l,o):null}).filter(o=>o!==null)}};function tc(u,t){if((!Number.isFinite(t)||t<=0)&&(t=zr),u<=0)return qs[0];let e=u/t,s=qs[0],i=1/0;for(let a of qs){let n=Math.abs(Math.log(a.approxMs/e));n<i&&(i=n,s=a)}return s}var Li="__apexcharts_registry__",Di="__apexcharts_custom_types__";globalThis[Li]||(globalThis[Li]={});globalThis[Di]||(globalThis[Di]=new Set);function Ls(){return globalThis[Li]}function $a(){return globalThis[Di]}function ec(u){$a().add(u)}function Yt(u){return $a().has(u)}function sc(u){return!!Ls()[u]}function ic(u){delete Ls()[u],$a().delete(u)}function Nn(u){Object.assign(Ls(),u)}function ut(u){let t=Ls()[u];if(!t)throw new Error(`ApexCharts: chart type "${u}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return t}var Ei=class{constructor(t,e,s){this.w=e,this.ctx=s,this.el=t}setupElements(){let{globals:t,config:e}=this.w,s=e.chart.type,i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],a=[...i,"radar","heatmap","treemap"],n=!a.includes(s)&&!["pie","donut","polarArea","radialBar"].includes(s)&&Yt(s);t.axisCharts=a.includes(s)||n,t.xyCharts=i.includes(s)||n,t.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(s)&&e.plotOptions.bar.horizontal,t.chartClass=`.apexcharts${t.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=O.createElementNS("http://www.w3.org/1999/xhtml","div"),B.setAttrs(this.w.dom.elWrap,{id:t.chartClass.substring(1),class:`apexcharts-canvas ${t.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);let r=globalThis.SVG;if(this.w.dom.Paper=r().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${e.chart.offsetX}, ${e.chart.offsetY})`}),this.w.dom.Paper.node.style.background=e.theme.mode==="dark"&&!e.chart.background?"#343A3F":e.theme.mode==="light"&&!e.chart.background?"#fff":e.chart.background,this.setSVGDimensions(),this.w.dom.elLegendForeign=O.createElementNS(et,"foreignObject"),B.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=O.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),e.chart.accessibility.enabled&&e.chart.accessibility.announcements.enabled){let o=O.createElement("div");o.className="apexcharts-sr-status",o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),o.setAttribute("aria-atomic","true"),this.w.dom.elWrap.appendChild(o)}if(e.chart.accessibility.enabled){let o=this.getAccessibleChartLabel(),l=e.chart.accessibility.keyboard.enabled&&e.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:l,"aria-label":o}),e.chart.accessibility.description){let c=O.createElementNS(et,"desc");c.textContent=e.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(c,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}_classifySeriesByType(t){let{w:e}=this,{config:s,globals:i}=e,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},n={},r=s.chart.type||"line",o=null,l=0;return this.w.seriesData.series.forEach((c,h)=>{var d,f;let g=((d=t[h])==null?void 0:d.type)==="column"?"bar":((f=t[h])==null?void 0:f.type)||(r==="column"?"bar":r),p=a;p[g]?(g==="rangeArea"?(p[g].series.push(this.w.rangeData.seriesRangeStart[h]),p[g].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[h])):p[g].series.push(c),p[g].i.push(h),g==="bar"&&(e.globals.columnSeries=a.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar","unit","sunburst"].includes(g)?o=g:Yt(g)?(n[g]||(n[g]={series:[],i:[]}),n[g].series.push(c),n[g].i.push(h)):console.warn(`You have specified an unrecognized series type (${g}).`),r!==g&&g!=="scatter"&&l++}),l>0&&(o&&console.warn(`Chart or series type ${o} cannot appear with other chart or series types.`),a.bar.series.length>0&&s.plotOptions.bar.horizontal&&(l-=a.bar.series.length,a.bar={series:[],i:[]},e.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),i.comboCharts||(i.comboCharts=l>0),{seriesTypes:a,customBuckets:n}}plotChartType(t,e){let{w:s,ctx:i}=this,a=i.renderer&&i.renderer.kind==="canvas";a&&i.renderer.beginSeries();let{seriesTypes:n,customBuckets:r}=this._classifySeriesByType(t),o=this._instantiateSeriesRenderers(n,e),l=this._assembleSeriesGraphics(n,r,o,e);if(a){let c=i.renderer;if(c&&c._repaintHostInPlace){c._repaintHostInPlace=!1;let d=this.w.dom.elGraphical.node.querySelector(".apexcharts-canvas-series-wrap");if(d&&c.canRepaintInPlace&&c.canRepaintInPlace())return c.repaintInPlace(),(Array.isArray(l)?l:[l]).forEach(g=>{g&&g.node&&d.appendChild(g.node)}),[]}let h=i.renderer.present();if(h){let d=new B(s).group({class:"apexcharts-canvas-series-wrap"});return d.add(h),(Array.isArray(l)?l:[l]).forEach(g=>{g&&d.add(g)}),d}}return l}_instantiateSeriesRenderers(t,e){let{w:s,ctx:i}=this,{config:a,globals:n}=s,o=t.line.series.length>0||t.area.series.length>0||t.scatter.series.length>0||t.bubble.series.length>0||t.rangeArea.series.length>0||!n.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(ut("line"))(i.w,i,e):null,c=t.candlestick.series.length>0||t.boxPlot.series.length>0||!n.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(ut("candlestick"))(i.w,i,e):null,d=t.violin.series.length>0||!n.comboCharts&&a.chart.type==="violin"?new(ut("violin"))(i.w,i,e):null,f=!n.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=f?new(ut("pie"))(i.w,i):null;let g=t.rangeBar.series.length>0||!n.comboCharts&&a.chart.type==="rangeBar";return i.rangeBar=g?new(ut("rangeBar"))(i.w,i,e):null,{line:o,boxCandlestick:c,violin:d}}_assembleSeriesGraphics(t,e,s,i){let{w:a,ctx:n}=this,{config:r,globals:o}=a,{line:l,boxCandlestick:c,violin:h}=s,d=[];if(o.comboCharts){let f=new lt(this.w);if(t.area.series.length>0&&d.push(...f.drawSeriesByGroup(t.area,o.areaGroups,"area",l)),t.bar.series.length>0)if(r.chart.stacked){let g=new(ut("barStacked"))(n.w,n,i);d.push(g.draw(t.bar.series,t.bar.i))}else n.bar=new(ut("bar"))(n.w,n,i),d.push(n.bar.draw(t.bar.series,t.bar.i));if(t.rangeArea.series.length>0&&d.push(l.draw(t.rangeArea.series,"rangeArea",t.rangeArea.i,t.rangeArea.seriesRangeEnd)),t.line.series.length>0&&d.push(...f.drawSeriesByGroup(t.line,o.lineGroups,"line",l)),t.candlestick.series.length>0&&d.push(c.draw(t.candlestick.series,"candlestick",t.candlestick.i)),t.boxPlot.series.length>0&&d.push(c.draw(t.boxPlot.series,"boxPlot",t.boxPlot.i)),t.violin.series.length>0&&d.push(h.draw(t.violin.series,"violin",t.violin.i)),t.rangeBar.series.length>0&&d.push(n.rangeBar.draw(t.rangeBar.series,t.rangeBar.i)),t.scatter.series.length>0){let g=new(ut("line"))(n.w,n,i,!0);d.push(g.draw(t.scatter.series,"scatter",t.scatter.i))}if(t.bubble.series.length>0){let g=new(ut("line"))(n.w,n,i,!0);d.push(g.draw(t.bubble.series,"bubble",t.bubble.i))}Object.keys(e).forEach(g=>{let p=e[g];if(p.series.length>0){let m=new(ut(g))(n.w,n,i);d.push(m.draw(p.series,g,p.i))}})}else{let f=r.chart.type;switch(f){case"line":d=l.draw(this.w.seriesData.series,"line");break;case"area":d=l.draw(this.w.seriesData.series,"area");break;case"bar":r.chart.stacked?d=new(ut("barStacked"))(n.w,n,i).draw(this.w.seriesData.series):(n.bar=new(ut("bar"))(n.w,n,i),d=n.bar.draw(this.w.seriesData.series));break;case"candlestick":d=c.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":d=c.draw(this.w.seriesData.series,f);break;case"violin":d=h.draw(this.w.seriesData.series,"violin");break;case"rangeBar":d=n.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":d=l.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{d=new(ut("heatmap"))(n.w,n,i).draw(this.w.seriesData.series);break}case"treemap":{d=new(ut("treemap"))(n.w,n).draw(this.w.seriesData.series);break}case"unit":{d=new(ut("unit"))(n.w,n).draw(this.w.seriesData.series);break}case"sunburst":{d=new(ut("sunburst"))(n.w,n).draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":d=n.pie.draw(this.w.seriesData.series);break;case"radialBar":{d=new(ut("radialBar"))(n.w,n).draw(this.w.seriesData.series);break}case"radar":{d=new(ut("radar"))(n.w,n).draw(this.w.seriesData.series);break}default:Yt(f)?d=new(ut(f))(n.w,n,i).draw(this.w.seriesData.series,f):d=l.draw(this.w.seriesData.series)}}return d}_extractDimensionUnit(t){return String(t).split(/[0-9]+/g).pop()}setSVGDimensions(){var t;let{globals:e,config:s}=this.w;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto";let i=s.chart.width,a=s.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let n=T.getDimensions(this.el),r=this._extractDimensionUnit(i);r==="%"?T.isNumber(n[0])&&(n[0].width===0&&(n=T.getDimensions(this.el.parentNode)),e.svgWidth=n[0]*parseInt(i,10)/100):(r==="px"||r==="")&&(e.svgWidth=parseInt(i,10));let o=this._extractDimensionUnit(a);if(a!=="auto"&&a!=="")if(o==="%"){let l=T.getDimensions(this.el.parentNode);e.svgHeight=l[1]*parseInt(a,10)/100}else e.svgHeight=parseInt(a,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),B.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),o!=="%"&&H.isBrowser()){let l=e.axisCharts&&(s.grid.show||s.dataLabels.enabled||s.xaxis.labels.show||s.xaxis.axisBorder.show||s.xaxis.axisTicks.show||s.yaxis.some(d=>d.show&&(d.labels.show||d.axisBorder.show||d.axisTicks.show))),c=s.chart.sparkline.enabled||!l?0:s.chart.parentHeightOffset,h=this.w.dom.Paper.node;(t=h.parentNode)!=null&&t.parentNode&&(h.parentNode.parentNode.style.minHeight=`${e.svgHeight+c}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`,e.lastResizeSignature=this.getResizeSignature()}getResizeSignature(){let{config:t}=this.w,e=(t.chart.width||"100%").toString().trim(),s=(t.chart.height||"auto").toString().trim(),i=0,a=0;if(e.endsWith("%")){let r=T.getDimensions(this.el);r[0]||(r=T.getDimensions(this.el.parentNode)),i=r[0]||0}s.endsWith("%")&&(a=T.getDimensions(this.el.parentNode)[1]||0);let n={w:Math.round(i),h:Math.round(a)};return t.responsive&&t.responsive.length&&H.isBrowser()&&(n.iw=window.innerWidth),n}shiftGraphPosition(){let{globals:t}=this.w,{translateY:e,translateX:s}=t;B.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e,s,i,a,n,r,o,l;let{w:c}=this,h=c.config.chart.height?String(c.config.chart.height):"",d=h!==""&&h!=="auto",f=h.includes("%"),g=0,p=c.config.chart.sparkline.enabled?1:15;p+=c.layout.gridPad.bottom,["top","bottom"].includes(c.config.legend.position)&&c.config.legend.show&&!c.config.legend.floating&&(g=((e=(t=this.ctx.legend)==null?void 0:t.legendHelpers.getLegendDimensions().clwh)!=null?e:0)+7);let m=c.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst"),b=c.globals.pieExternalLabelMarginY||0,x=b>0?c.globals.radialSize*2+b*2:c.globals.radialSize*2.05,_=c.config.chart.type==="sunburst"?"sunburst":c.config.chart.type==="pie"||c.config.chart.type==="donut"||c.config.chart.type==="polarArea"?"pie":"radialBar",w=Math.abs(c.config.plotOptions[_].endAngle-c.config.plotOptions[_].startAngle);if(m&&!c.config.chart.sparkline.enabled&&w<360){let v=T.getBoundingClientRect(this.w.dom.Paper.node),A=1/0,S=-1/0,C=F=>{var R,N,z,$;if((R=F.classList)!=null&&R.contains("apexcharts-radialbar-hollow"))return;let W=(z=(N=F.tagName)==null?void 0:N.toLowerCase)==null?void 0:z.call(N);if(W==="text"||W==="tspan")return;let Y=Array.from(($=F.children)!=null?$:[]);if(Y.length>0){Y.forEach(X=>C(X));return}let I=T.getBoundingClientRect(F);if(I.bottom-I.top>0){let X=I.top-v.top,V=I.bottom-v.top;X<A&&(A=X),V>S&&(S=V)}};Array.from((s=m.children)!=null?s:[]).forEach(F=>C(F)),Number.isFinite(A)||(A=0),Number.isFinite(S)||(S=T.getBoundingClientRect(m).bottom-v.top);let M=Math.max(p,c.globals.radialSize*.2),k=Math.max(M-A,0);k!==0&&(c.layout.translateY=((i=c.layout.translateY)!=null?i:0)+k,B.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${(a=c.layout.translateX)!=null?a:0}, ${c.layout.translateY})`}),S+=k),x=S>0?S:c.globals.radialSize*2.05;let L=Math.max(M,A),E=Math.ceil(x+g+L),D=(n=c.config.chart.offsetY)!=null?n:0,P=E+Math.max(D,0);if(!f){if(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(P)),this.w.dom.elWrap.style.height=`${P}px`,B.setAttrs(this.w.dom.Paper.node,{height:E}),H.isBrowser()){let F=(r=this.w.dom.Paper.node.parentNode)==null?void 0:r.parentNode;F&&(F.style.minHeight=`${P}px`)}c.globals.svgHeight=E,c.config.legend.position==="bottom"&&c.config.legend.show&&!c.config.legend.floating&&((o=this.ctx.legend)==null||o.setLegendWrapXY(20,0))}return}let y=Math.ceil(x+this.w.layout.translateY+g+p);if(!d&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(y)),this.w.dom.elWrap.style.height=`${y}px`,B.setAttrs(this.w.dom.Paper.node,{height:y}),H.isBrowser())){let v=(l=this.w.dom.Paper.node.parentNode)==null?void 0:l.parentNode;v&&(v.style.minHeight=`${y}px`)}}coreCalculations(){new Oe(this.w).init()}resetGlobals(){let t=()=>this.w.config.series.map(()=>[]),e=new ls,{globals:s}=this.w,i={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:s.originalSeries};e.initGlobalVars(s),s.seriesXvalues=t(),s.seriesYvalues=t(),i.dataWasParsed&&(this.w.axisFlags.dataWasParsed=i.dataWasParsed,s.originalSeries=i.originalSeries)}isMultipleY(){return Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1?(this.w.globals.isMultipleYAxis=!0,!0):!1}xySettings(){let{w:t}=this,e=null;if(t.globals.axisCharts){if(t.config.xaxis.crosshairs.position==="back"&&new Be(this.w).drawXCrosshairs(),t.config.yaxis[0].crosshairs.position==="back"&&new Be(this.w).drawYCrosshairs(),t.config.xaxis.type==="datetime"&&t.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Mi(this.w,this.ctx);let i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new lt(this.w).getCalculatedRatios()}return e}updateSourceChart(t){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){let{ctx:t,w:e}=this;if(e.config.chart.brush.enabled&&typeof e.config.chart.events.selection!="function"){let s=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];s.forEach(i=>{let a=t.constructor.getChartByID(i);if(!a){console.warn(`ApexCharts: brush target "${i}" was not found. Ensure the target chart is rendered (and its chart.id matches) before the brush chart.`);return}a.w.globals.brushSource=this.ctx,typeof a.w.config.chart.events.zoomed!="function"&&(a.w.config.chart.events.zoomed=()=>this.updateSourceChart(a)),typeof a.w.config.chart.events.scrolled!="function"&&(a.w.config.chart.events.scrolled=()=>this.updateSourceChart(a))}),e.config.chart.events.selection=(i,a)=>{s.forEach(n=>{let r=t.constructor.getChartByID(n);r&&r.ctx.updateHelpers._updateOptions({xaxis:{min:a.xaxis.min,max:a.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){let t=this.w,e=t.config;if(e.chart.accessibility&&e.chart.accessibility.description)return e.chart.accessibility.description;let s=e.chart.type,i=[];if(e.title.text)i.push(`${e.title.text}. ${s} chart`),e.subtitle.text&&i.push(e.subtitle.text);else{let a=Array.isArray(t.seriesData.seriesNames)&&t.seriesData.seriesNames.length?t.seriesData.seriesNames.filter(Boolean):Array.isArray(e.series)?e.series.map(r=>typeof r=="object"&&r!==null?r.name:null).filter(Boolean):[],n=t.seriesData.series.length||(e.series?e.series.length:0);a.length?i.push(`${s} chart with ${n} data series: ${a.join(", ")}`):i.push(`${s} chart with ${n} data series`)}return i.join(". ")}},Ti="__apexcharts_series_transforms__";globalThis[Ti]||(globalThis[Ti]={});function Wr(){return globalThis[Ti]}function Ga(u,t){if(!u||typeof u!="string"){console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.");return}if(typeof t!="function"){console.warn(`ApexCharts: registerSeriesTransform("${u}") expects a function (series, w) => series.`);return}Wr()[u]=t}function ac(u){return u&&Wr()[u]||null}function nc(u,t){let e=u.config.drilldown;return(e&&Array.isArray(e.series)?e.series:[]).find(i=>i&&i.id===t)}function gs(u,t,e,s,i,a=null,n={}){var r,o,l;let c=t&&typeof t=="object",h=c&&(o=(r=t.x)!=null?r:t.name)!=null?o:"",d=Number(c?(l=t.y)!=null?l:t.value:t),f={name:String(h),value:isNaN(d)?null:d,color:c&&t.color?t.color:void 0,_key:`${i}/${e}:${h}`};if(s&&!f.color&&(f.color=s[e%s.length]),n.keepDatum&&(f._datum=t),c&&Array.isArray(t.children)&&t.children.length)f.children=t.children.map((g,p)=>gs(u,g,p,null,f._key,a,n));else if(c&&t.drilldown!=null&&n.expandDrilldown!==!1){let g=a||new Set;if(!g.has(t.drilldown)){let p=nc(u,t.drilldown);if(p&&Array.isArray(p.data)&&p.data.length){let m=new Set(g);m.add(t.drilldown);let b=Array.isArray(p.colors)?p.colors:null;f.children=p.data.map((x,_)=>gs(u,x,_,b,f._key,m,n))}}}return f}function rc(u,t={}){let e=u.config.series,s=e&&e[0],i=s&&Array.isArray(s.data)?s.data:e;return Array.isArray(i)?i.map((a,n)=>gs(u,a,n,null,"",null,t)):[]}function Hr(u,t,e={}){let s=t||u.config.series;return Array.isArray(s)?s.map((i,a)=>{var n,r;let o=i&&Array.isArray(i.data)?i.data:[],l=`${a}:${(n=i?.name)!=null?n:""}`;return{name:String((r=i?.name)!=null?r:""),value:null,color:i?.color||void 0,_key:l,_seriesIndex:a,children:o.map((h,d)=>gs(u,h,d,null,l,null,e))}}):[]}function Ds(u){u.children&&u.children.length&&(u.children.forEach(t=>Ds(t)),(u.value==null||isNaN(u.value))&&(u.value=u.children.reduce((t,e)=>t+Math.max(0,e.value||0),0))),(u.value==null||isNaN(u.value))&&(u.value=0)}function oc(u,t={}){if(!Array.isArray(u))return!1;let e=t.drilldown!==!1;for(let s=0;s<u.length;s++){let i=u[s]&&u[s].data;if(Array.isArray(i))for(let a=0;a<i.length;a++){let n=i[a];if(!(!n||typeof n!="object")&&(Array.isArray(n.children)&&n.children.length||e&&n.drilldown!=null))return!0}}return!1}function Re(u){if(typeof u!="string")return"";let t=u.indexOf("/");return t===-1?"":u.slice(t)}function $r(u){var t,e,s,i;return!!((i=(s=(e=(t=u?.config)==null?void 0:t.plotOptions)==null?void 0:e.treemap)==null?void 0:s.nested)!=null&&i.drilldownAsLevels)}function lc(u,t){var e,s,i;let a=(i=(s=(e=u?.config)==null?void 0:e.plotOptions)==null?void 0:s.treemap)==null?void 0:i.nested;return a&&a.enabled===!1?!1:oc(t,{drilldown:$r(u)})}function Gr(u){let t=[],e=0;return u.forEach((s,i)=>{let a=[],n=(r,o,l)=>{r._parent=l,r._depth=o,r._si=i,r._leaf=!(r.children&&r.children.length),o>e&&(e=o),r._leaf?(r._di=a.length,a.push(r)):(r._di=-1,r.children.forEach(c=>n(c,o+1,r)))};n(s,0,null),t.push(a)}),{leaves:t,maxDepth:e}}function cc(u){let t=u._datum;if(t&&typeof t=="object"){let e=j(G({},t),{x:u.name,y:u.value});return delete e.children,e}return{x:u.name,y:u.value}}function hc(u,t){let e=Hr(u,t,{keepDatum:!0,expandDrilldown:$r(u)});e.forEach(Ds);let{leaves:s,maxDepth:i}=Gr(e),a=t.map((n,r)=>j(G({},n),{data:(s[r]||[]).map(cc)}));return{roots:e,leafSeries:a,maxDepth:i}}function dc(u){let t=u.globals.treemapRoots;if(t&&t.length)return{roots:t,maxDepth:u.globals.treemapMaxDepth||1,nested:!0};let e=Hr(u,u.config.series,{keepDatum:!0,expandDrilldown:!1});e.forEach(Ds);let{maxDepth:s}=Gr(e);return{roots:e,maxDepth:s,nested:!1}}var uc=["histogram"],Ye=class u{constructor(t,{resetGlobals:e=()=>{},isMultipleY:s=()=>{}}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this._warnedMissingTransform=!1,this.coreUtils=new lt(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){let t=this.w.config.series,e=new ct(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();let s=t[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&s.data[0]!==null&&typeof s.data[0]<"u"?s.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;let e=this.getFirstDataPoint();if(!e||typeof e.x>"u")return!1;let s=(t=this.w.config.series[this.activeSeriesIndex])==null?void 0:t.data;if(s){let i=a=>a&&typeof a.x<"u";for(let a=1;a<Math.min(3,s.length);a++)if(i(s[a])!==!0){console.warn(`ApexCharts: series data has mixed formats starting at index ${a}`);break}}return!0}isFormat2DArray(){let t=this.getFirstDataPoint();return t&&Array.isArray(t)}_fast2DArrayParse(t,e){var s,i;let a=t.length;if(a===0)return!1;let n=new Array(a),r=new Array(a),o=-Number.MAX_VALUE,l=Number.MAX_VALUE,c=1/0,h=!1,d=0,f=!0,g=1/0,p=-1/0,m=!0,b=1/0,x=NaN;for(let w=0;w<a;w++){let y=t[w];if(!Array.isArray(y)||y.length>2)return!1;let v=y[0],A=y[1];if(f)if(typeof v=="number"){v===v&&(v<g&&(g=v),v>p&&(p=v));let S=v-x;S>0?S<b&&(b=S):S<0&&(m=!1),x=v}else f=!1;if(typeof A=="number")if(A===A&&A!==1/0&&A!==-1/0){if(A>o&&(o=A),A<l&&(l=A),A<0&&A<c&&(c=A),!Number.isInteger(A)){let S=A<0?-A:A;if(S>=1e-6&&S<1e21){let C=""+A,M=C.indexOf("."),k=M===-1?0:C.length-M-1;k>d&&(d=k)}else{let C=T.noExponents(A);T.isFloat(C)&&(d=Math.max(d,C.toString().split(".")[1].length))}}}else h=!0;else if(A===null)h=!0;else return!1;n[w]=A,r[w]=v}this.twoDSeries=n,this.twoDSeriesX=r,this.w.axisFlags.dataFormatXNumeric=!0;let _=(i=(s=this.w.seriesData)._parsedExtrema)!=null?i:s._parsedExtrema=[];return _[e]={ref:n,len:a,maxY:o,lowestY:l,negMinY:c,hasNulls:h,yDec:d,xref:r,xNumeric:f,minX:g,maxX:p,xSorted:m,minXDiff:b},!0}handleFormat2DArray(t,e){let s=this.w.config,i=t[e].data,a=s.chart.type==="boxPlot"||s.series[e].type==="boxPlot";if(!(!a&&s.xaxis.type!=="datetime"&&this._fast2DArrayParse(i,e)))for(let n=0;n<i.length;n++){let r=i[n],o=r[0],l=r[1],c=r[2];if(typeof l<"u"&&(Array.isArray(l)&&l.length===4&&!a?this.twoDSeries.push(T.parseNumber(l[3])):r.length>=5?this.twoDSeries.push(T.parseNumber(r[4])):this.twoDSeries.push(T.parseNumber(l)),this.w.axisFlags.dataFormatXNumeric=!0),s.xaxis.type==="datetime"){let h=new Date(o).getTime();this.twoDSeriesX.push(h)}else this.twoDSeriesX.push(o);typeof c<"u"&&(this.threeDSeries.push(c),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){let s=this.w.config,i=this.w.globals,a=new mt(this.w),n=t[e].data,r=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);let o=t[r].data;for(let l=0;l<n.length;l++){let c=n[l];if(typeof c.y<"u"){let h=Array.isArray(c.y)?T.parseNumber(c.y[c.y.length-1]):T.parseNumber(c.y);this.twoDSeries.push(h)}typeof this.seriesGoals[e]>"u"&&(this.seriesGoals[e]=[]),typeof c.goals<"u"&&Array.isArray(c.goals)?this.seriesGoals[e].push(c.goals):this.seriesGoals[e].push(null),typeof c.z<"u"&&(this.threeDSeries.push(c.z),this.w.axisFlags.isDataXYZ=!0)}for(let l=0;l<o.length;l++){let h=o[l].x,d=typeof h=="string",f=Array.isArray(h),g=!f&&!!a.isValidDate(h);if(d||g)if(d||s.xaxis.convertedCatToNumeric){let p=i.isBarHorizontal&&this.w.axisFlags.isRangeData;s.xaxis.type==="datetime"&&!p?this.twoDSeriesX.push(a.parseDate(h)):(this.fallbackToCategory=!0,this.twoDSeriesX.push(h),!isNaN(h)&&this.w.config.xaxis.type!=="category"&&typeof h!="string"&&(this.w.axisFlags.isXNumeric=!0))}else s.xaxis.type==="datetime"?this.twoDSeriesX.push(h instanceof Date?h.getTime():a.parseDate(h.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(h)));else f?(this.fallbackToCategory=!0,this.twoDSeriesX.push(h)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(h))}}handleRangeData(t,e){let s={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",t,e)),this.w.rangeData.seriesRangeStart[e]=s.start===void 0?[]:s.start,this.w.rangeData.seriesRangeEnd[e]=s.end===void 0?[]:s.end,this.w.rangeData.seriesRange[e]=s.rangeUniques,this.w.rangeData.seriesRange.forEach(i=>{i&&i.forEach(a=>{let n=a.y,r=n.length;if(!(r<=1))for(let o=0;o<r;o++){let l=n[o],c=l.y1,h=l.y2;for(let d=o+1;d<r;d++){let f=n[d],g=f.y1,p=f.y2;if(c<=p&&g<=h){let m=a;m.overlaps.add(l.rangeName),m.overlaps.add(f.rangeName)}}}})}),s}handleCustomRangeData(t,e,s){let i=t[e].data||[],a=[],n=[];for(let r=0;r<i.length;r++){let o=i[r],l,c;if(typeof s=="function"){let h=s(o,r);Array.isArray(h)||(h=[h]);let d=h.map(f=>T.parseNumber(f)).filter(f=>f!==null&&!isNaN(f));l=d.length?Math.min(...d):null,c=d.length?Math.max(...d):null}else{let h=o==null?null:o.y;Array.isArray(h)?(l=T.parseNumber(h[0]),c=T.parseNumber(h[h.length-1])):l=c=T.parseNumber(h)}a.push(l),n.push(c)}this.w.rangeData.seriesRangeStart[e]=a,this.w.rangeData.seriesRangeEnd[e]=n}handleCandleStickBoxData(t,e){let s={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",t,e)),this.w.candleData.seriesCandleO[e]=s.o,this.w.candleData.seriesCandleH[e]=s.h,this.w.candleData.seriesCandleM[e]=s.m,this.w.candleData.seriesCandleL[e]=s.l,this.w.candleData.seriesCandleC[e]=s.c,this.w.candleData.seriesBoxPoints[e]=s.points||[],s}handleViolinData(t,e){var s,i,a,n,r,o;let l=this.w,c=t[e].data,h=[],d=[],f=[],g=[],p=[];for(let m=0;m<c.length;m++){let b=c[m],x=(a=(i=(s=b?.y)==null?void 0:s.density)!=null?i:b?.[1])!=null?a:[],_=(o=(r=(n=b?.y)==null?void 0:n.points)!=null?r:b?.[2])!=null?o:[],w=[],y=[],v=0,A=null,S=1/0,C=-1/0;for(let k=0;k<x.length;k++){let L=T.parseNumber(x[k][0]),E=T.parseNumber(x[k][1]);L===null||E===null||(w.push(L),y.push(E),E>v&&(v=E,A=L),L<S&&(S=L),L>C&&(C=L))}let M=[];for(let k=0;k<_.length;k++){let L=T.parseNumber(_[k]);L!==null&&(M.push(L),L<S&&(S=L),L>C&&(C=L))}h.push({values:w,weights:y,maxWeight:v}),d.push(M),f.push(S===1/0?0:S),g.push(C===-1/0?0:C),p.push(A!==null?A:M.length?M[Math.floor(M.length/2)]:0)}l.violinData.seriesViolinDensity[e]=h,l.violinData.seriesViolinPoints[e]=d,l.violinData.seriesViolinMin[e]=f,l.violinData.seriesViolinMax[e]=g,this.twoDSeries=p}handleRangeDataFormat(t,e,s){let i=[],a=[],n=new Map,r=[];if(e[s].data.forEach(o=>{if(!n.has(o.x)){let l={x:o.x,overlaps:new Set,y:[]};n.set(o.x,l),r.push(l)}}),t==="array")for(let o=0;o<e[s].data.length;o++)Array.isArray(e[s].data[o])?(i.push(e[s].data[o][1][0]),a.push(e[s].data[o][1][1])):(i.push(e[s].data[o]),a.push(e[s].data[o]));else if(t==="xy")for(let o=0;o<e[s].data.length;o++){let l=Array.isArray(e[s].data[o].y),c=T.randomId(),h=e[s].data[o].x,d={y1:l?e[s].data[o].y[0]:e[s].data[o].y,y2:l?e[s].data[o].y[1]:e[s].data[o].y,rangeName:c},f=this.w.globals;f.seriesRangeName||(f.seriesRangeName={}),f.seriesRangeName[s]||(f.seriesRangeName[s]={}),f.seriesRangeName[s][o]=c;let g=n.get(h);g&&g.y.push(d),i.push(d.y1),a.push(d.y2)}return{start:i,end:a,rangeUniques:r}}handleCandleStickBoxDataFormat(t,e,s){let i=this.w,a=i.config.chart.type==="boxPlot"||i.config.series[s].type==="boxPlot",n=[],r=[],o=[],l=[],c=[],h=[],d=e[s].data,f;if(t==="array"){let g=d[0];a&&g&&g.length===6||!a&&g&&g.length===5?f=m=>m.slice(1):f=m=>Array.isArray(m[1])?m[1]:[]}else f=g=>Array.isArray(g.y)?g.y:[];for(let g=0;g<d.length;g++){let p=f(d[g]);p&&p.length>=2&&(n.push(p[0]),r.push(p[1]),a?(o.push(p[2]),l.push(p[3]),c.push(p[4])):(l.push(p[2]),c.push(p[3])));let m=d[g]&&d[g].points;h.push(Array.isArray(m)?m:[])}return{o:n,h:r,m:o,l,c,points:h}}parseDataAxisCharts(t){var e,s,i,a,n,r;let o=this.w.config,l=this.w.globals,c=new mt(this.w);this.w.seriesData._parsedExtrema=[];let h=o.labels.length>0?o.labels.slice():o.xaxis.categories.slice();this.w.axisFlags.isRangeBar=o.chart.type==="rangeBar"&&l.isBarHorizontal,this.w.labelData.hasXaxisGroups=o.xaxis.type==="category"&&o.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=o.xaxis.group.groups),t.forEach((p,m)=>{p.name!==void 0?this.w.seriesData.seriesNames.push(p.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(m+1),10))}),this.coreUtils.setSeriesYAxisMappings();let d=[],f=[...new Set(o.series.map(p=>p.group))];o.series.forEach((p,m)=>{let b=f.indexOf(p.group);d[b]||(d[b]=[]),d[b].push(this.w.seriesData.seriesNames[m])}),this.w.labelData.seriesGroups=d;let g=()=>{for(let p=0;p<h.length;p++)if(typeof h[p]=="string")if(c.isValidDate(h[p]))this.twoDSeriesX.push(c.parseDate(h[p]));else throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");else this.twoDSeriesX.push(h[p])};for(let p=0;p<t.length;p++){this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],typeof t[p].data>"u"&&(console.error("It is a possibility that you may have not included 'data' property in series."),t[p]=j(G({},t[p]),{data:[]}));let m=o.chart.dataReducer,b=(s=(e=l.dataReducerRawSeries)==null?void 0:e[p])==null?void 0:s.data;if(m?.enabled&&this.isMultiFormat()&&Array.isArray(b)&&b.length>((i=m.threshold)!=null?i:500)){let _=(a=m.targetPoints)!=null?a:250,w=o.xaxis.min,y=o.xaxis.max,v=w==null&&y==null?b:u.sliceByXRange(b,w,y),A=v;if(v.length>_){let S=Array.isArray(v[0])?(r=v[0])==null?void 0:r[1]:(n=v[0])==null?void 0:n.y;Array.isArray(S)?S.length===4?A=u.ohlcAggregate(v,_):S.length===2&&(A=u.rangeAggregate(v,_)):A=u.lttbDownsample(v,_)}t[p]=j(G({},t[p]),{data:A})}(o.chart.type==="rangeBar"||o.chart.type==="rangeArea"||t[p].type==="rangeBar"||t[p].type==="rangeArea")&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,p));let x=t[p].type||o.chart.type;if(Yt(x)){let _=ut(x),w=_&&_.yExtent;(_&&_.dataType==="rangeXY"||typeof w=="function")&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(t,p,w))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,p):this.isFormatXY()&&this.handleFormatXY(t,p),(o.chart.type==="candlestick"||t[p].type==="candlestick"||o.chart.type==="boxPlot"||t[p].type==="boxPlot")&&this.handleCandleStickBoxData(t,p),(o.chart.type==="violin"||t[p].type==="violin")&&this.handleViolinData(t,p),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,p===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{o.xaxis.type==="datetime"?(this.w.axisFlags.isXNumeric=!0,g(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):o.xaxis.type==="numeric"&&(this.w.axisFlags.isXNumeric=!0,h.length>0&&(this.twoDSeriesX=h,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);let _=t[p].data.map(w=>T.parseNumber(w));this.w.seriesData.series.push(_)}this.w.seriesData.seriesZ.push(this.threeDSeries),t[p].color!==void 0?this.w.seriesData.seriesColors.push(t[p].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(t){let e=this.w.config;this.w.seriesData.unitData=[];let s=Array.isArray(t)&&t.every(n=>typeof n=="number")&&e.labels.length>0,i=Array.isArray(t)&&t.some(n=>n&&typeof n=="object"&&n.data||n&&typeof n=="object"&&n.parsing);if(e.chart.type==="unit"&&i&&!s)return this.parseUnitSeries(t);if(s&&i&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),s){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=e.labels.slice();for(let n=0;n<this.w.seriesData.series.length;n++)this.w.seriesData.seriesNames[n]===void 0&&this.w.seriesData.seriesNames.push("series-"+(n+1));return this.w}if(Array.isArray(t)&&t.every(n=>typeof n=="number")){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=[];for(let n=0;n<this.w.seriesData.series.length;n++)this.w.seriesData.seriesNames.push(e.labels[n]||`series-${n+1}`);return this.w}let a=this.extractPieDataFromSeries(t);this.w.seriesData.series=a.values,this.w.seriesData.seriesNames=a.labels,e.chart.type==="radialBar"&&(this.w.seriesData.series=this.w.seriesData.series.map(n=>{let r=T.parseNumber(n);return r>100&&console.warn(`ApexCharts: RadialBar value ${r} > 100, consider using percentage values (0-100)`),r}));for(let n=0;n<this.w.seriesData.series.length;n++)this.w.seriesData.seriesNames[n]===void 0&&this.w.seriesData.seriesNames.push("series-"+(n+1));return this.w}parseUnitSeries(t){let e=this.w.config,s=[],i=[],a=[];return t.forEach((n,r)=>{var o;let l=n&&Array.isArray(n.data)?n.data:[];s.push(l.length);let c=n&&n.name!==void 0&&n.name!==null?n.name:void 0;i.push((o=c??e.labels[r])!=null?o:`series-${r+1}`),a.push(l.slice())}),this.w.seriesData.series=s,this.w.seriesData.seriesNames=i,this.w.seriesData.unitData=a,this.w}resetParsingFlags(){let t=this.w;t.axisFlags.dataWasParsed=!1,t.globals.originalSeries=null,t.config.series&&t.config.series.forEach(e=>{e.__apexParsed&&delete e.__apexParsed})}extractPieDataFromSeries(t){let e=[],s=[];if(!Array.isArray(t))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(t.length===0)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};let i=t[0];if(typeof i=="object"&&i!==null&&i.data)this.extractPieDataFromSeriesObjects(t,e,s);else return console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]};return{values:e,labels:s}}extractPieDataFromSeriesObjects(t,e,s){t.forEach((i,a)=>{if(!i.data||!Array.isArray(i.data)){console.warn(`ApexCharts: Series ${a} has no valid data array`);return}i.data.forEach(n=>{typeof n=="object"&&n!==null?n.x!==void 0&&n.y!==void 0?(s.push(String(n.x)),e.push(T.parseNumber(n.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",n):console.warn("ApexCharts: Expected object data point, got:",typeof n)})})}handleExternalLabelsData(t){let e=this.w.config;if(e.xaxis.categories.length>0)this.w.labelData.labels=e.xaxis.categories;else if(e.labels.length>0)this.w.labelData.labels=e.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(i=>{i.forEach(a=>{this.w.labelData.labels.indexOf(a.x)<0&&a.x&&this.w.labelData.labels.push(a.x)})});let s=this.w.labelData.labels;if(s.length>0&&(typeof s[0]=="number"||typeof s[0]=="string"))this.w.labelData.labels=[...new Set(s)];else{let i=new Map;for(let a of s){let n=JSON.stringify(a);i.has(n)||i.set(n,a)}this.w.labelData.labels=Array.from(i.values())}}e.xaxis.convertedCatToNumeric&&(new Lt(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t))}else this._generateExternalLabels(t)}_generateExternalLabels(t){let e=this.w.globals,s=this.w.config,i=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){let a=s.series.map(r=>{let o=new Map;for(let l of r.data)o.has(l.x)||o.set(l.x,l);return Array.from(o.values())}),n=a.reduce((r,o,l,c)=>c[r].length>o.length?r:l,0);for(let r=0;r<a[n].length;r++)i.push(r+1)}else for(let a=0;a<this.w.seriesData.series[e.maxValsInArrayIndex].length;a++)i.push(a+1);this.w.seriesData.seriesX=[];for(let a=0;a<t.length;a++)this.w.seriesData.seriesX.push(i);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(i.length===0){i=e.axisCharts?[]:this.w.seriesData.series.map((a,n)=>n+1);for(let a=0;a<t.length;a++)this.w.seriesData.seriesX.push(i)}this.w.labelData.labels=i,s.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=i.map(a=>s.xaxis.labels.formatter(a))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){let e=this.w.config,s=this.w.globals,i=e.parsing;if(this.w.axisFlags.dataWasParsed)return t;let a=!!(i&&(i.x||i.y||i.z)),n=t.some(o=>o.parsing&&(o.parsing.x||o.parsing.y||o.parsing.z));if(!a&&!n)return t;let r=t.map((o,l)=>{var c,h,d,f,g;if(!o.data||!Array.isArray(o.data)||o.data.length===0)return o;let p={x:((c=o.parsing)==null?void 0:c.x)||i?.x,y:((h=o.parsing)==null?void 0:h.y)||i?.y,z:((d=o.parsing)==null?void 0:d.z)||i?.z};if(!p.x&&!p.y)return o;let m=o.data[0];if(typeof m=="object"&&m!==null&&(Object.prototype.hasOwnProperty.call(m,"x")||Object.prototype.hasOwnProperty.call(m,"y"))||Array.isArray(m))return o;if(!p.x||!p.y||Array.isArray(p.y)&&p.y.length===0){let x=[];p.x||x.push("x"),(!p.y||Array.isArray(p.y)&&p.y.length===0)&&x.push("y");let _=(f=o.name)!=null?f:`series[${l}]`;return console.warn(`ApexCharts [${this.w.globals.chartID}]: "${_}" has a parseData config but is missing the '${x.join("', '")}' field specification.`,{parsing:(g=o.parsing)!=null?g:i}),o}let b=o.data.map((x,_)=>{if(typeof x!="object"||x===null)return console.warn(`ApexCharts: Series ${l}, data point ${_} is not an object, skipping parsing`),x;let w=this.getNestedValue(x,p.x),y,v;if(Array.isArray(p.y)){let S=p.y.map(C=>this.getNestedValue(x,C));this.w.config.chart.type==="bubble"?(S.length<2&&console.warn(`ApexCharts: series[${l}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(p.y)}`),y=S[0]):y=S}else y=this.getNestedValue(x,p.y);p.z&&(v=this.getNestedValue(x,p.z)),w===void 0&&console.warn(`ApexCharts: Series ${l}, data point ${_} missing field '${p.x}'`),y===void 0&&console.warn(`ApexCharts: Series ${l}, data point ${_} missing field '${p.y}'`);let A={x:w,y,z:void 0};if(this.w.config.chart.type==="bubble"&&Array.isArray(p.y)&&p.y.length===2){let S=this.getNestedValue(x,p.y[1]);S!==void 0&&(A.z=S)}return v!==void 0&&(A.z=v),A});return j(G({},o),{data:b,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=T.clone(t)),r}getNestedValue(t,e){if(!t||typeof t!="object"||!e)return;if(e.indexOf(".")===-1)return t[e];let s=e.split("."),i=t;for(let a=0;a<s.length;a++){if(i==null||typeof i!="object")return;i=i[s[a]]}return i}applySeriesTransform(t){let e=this.w.config,s=e.chart.requestedType||e.chart.type,i=ac(s);return i?i(t,this.w):!Array.isArray(t)||uc.indexOf(s)===-1?t:(this._warnedMissingTransform||(this._warnedMissingTransform=!0,console.warn(`ApexCharts: chart.type '${s}' needs the stats feature. Add \`import 'apexcharts/features/stats'\`, or import from 'apexcharts/${s}'.`)),t.map(a=>j(G({},a),{data:[]})))}flattenTreemapHierarchy(t){let e=this.w,s=e.globals;if(e.config.chart.type!=="treemap"||!Array.isArray(t))return t;if(!s.treemapRawSeries){if(!lc(e,t))return s.treemapRoots=null,t;s.treemapRawSeries=t.map(r=>j(G({},r),{data:Array.isArray(r?.data)?r.data.slice():r?.data}))}let{roots:i,leafSeries:a,maxDepth:n}=hc(e,s.treemapRawSeries);return s.treemapRoots=i,s.treemapMaxDepth=n,a}expandScatterJitterData(t){var e,s;let i=this.w.config,a=i.chart.type==="scatter"||i.chart.type==="bubble",n=(s=(e=i.plotOptions)==null?void 0:e.scatter)==null?void 0:s.jitter;if(!a||!n||!n.enabled||!Array.isArray(t))return t;if(!t.some(d=>Array.isArray(d?.data)&&d.data.some(f=>f&&!Array.isArray(f)&&Array.isArray(f.y))))return i.xaxis.type!=="datetime"&&(Array.isArray(i.xaxis.categories)&&i.xaxis.categories.length?this._applyBandAxis(i.xaxis.categories.slice()):Array.isArray(i.xaxis._scatterBandLabels)&&i.xaxis._scatterBandLabels.length&&this._applyBandAxis(i.xaxis._scatterBandLabels)),t;let o=[],l=new Map;t.forEach(d=>{Array.isArray(d?.data)&&d.data.forEach(f=>{if(f&&Array.isArray(f.y)){let g=String(f.x);l.has(g)||(l.set(g,o.length),o.push(f.x))}})});let c=n.maxPoints||5e3,h=t.map(d=>{if(!Array.isArray(d?.data))return d;let f=[];return d.data.forEach(g=>{if(g&&Array.isArray(g.y)){let p=l.get(String(g.x)),m=g.y,b=m.length>c?Math.ceil(m.length/c):1;for(let x=0;x<m.length;x+=b){let _=T.parseNumber(m[x]);_!==null&&f.push({x:p,y:_})}}else if(g&&typeof g=="object"&&!Array.isArray(g)){let p=String(g.x);f.push({x:l.has(p)?l.get(p):g.x,y:g.y})}else f.push(g)}),j(G({},d),{data:f})});return this._applyBandAxis(o),h}_applyBandAxis(t){var e;let s=this.w.config.xaxis,i=t.length;if(!i)return;let a=s._scatterBand=s._scatterBand||{};if(s._scatterBandLabels=t.slice(),s.type="numeric",(e=this.w.interact)!=null&&e.zoomed&&typeof s.min=="number"&&typeof s.max=="number"&&isFinite(s.min)&&isFinite(s.max)){let r=c=>Math.max(0,Math.min(i-1,c)),o=r(Math.round(s.min+.49)),l=r(Math.round(s.max-.49));l<o&&(o=l=r(Math.round((s.min+s.max)/2))),s.min=o-1,s.max=l+1,s.tickAmount=l-o+2,a.min=!0,a.max=!0,a.tick=!0}else(s.min==null||a.min)&&(s.min=-1,a.min=!0),(s.max==null||a.max)&&(s.max=i,a.max=!0),(s.tickAmount==null||s.tickAmount==="dataPoints"||a.tick)&&(s.tickAmount=i+1,a.tick=!0);s.labels=s.labels||{};let n=s.labels.formatter;if(typeof n!="function"||n._scatterBand){let r=(o=>{let l=Math.round(o);return Math.abs(o-l)<1e-6&&t[l]!==void 0?t[l]:""});r._scatterBand=!0,s.labels.formatter=r}}parseData(t){var e,s,i,a,n,r,o;let l=this.w,c=l.config,h=l.globals;if(t=this.parseRawDataIfNeeded(t),t=this.applySeriesTransform(t),t=this.expandScatterJitterData(t),t=this.flattenTreemapHierarchy(t),(e=c.chart.dataReducer)!=null&&e.enabled&&h.axisCharts&&!h.dataReducerRawSeries){h.dataReducerRawSeries=t.map(p=>({data:Array.isArray(p?.data)?p.data.slice():p?.data}));let f=1/0,g=-1/0;for(let p of t){let m=p?.data;if(!Array.isArray(m)||m.length===0)continue;let b=!Array.isArray(m[0]),x=b?(s=m[0])==null?void 0:s.x:(i=m[0])==null?void 0:i[0],_=b?(a=m[m.length-1])==null?void 0:a.x:(n=m[m.length-1])==null?void 0:n[0];typeof x=="number"&&(f=Math.min(f,x)),typeof _=="number"&&(g=Math.max(g,_))}f!==1/0&&(h.dataReducerRawMinX=f,h.dataReducerRawMaxX=g)}if(h.dataReducerRawSeries&&((r=c.chart.dataReducer)!=null&&r.enabled)&&(t=t.map(f=>G({},f))),c.series=t,h.dataReducerRawSeries&&((o=c.chart.dataReducer)!=null&&o.enabled)){let f=h.dataReducerRawSeries;h.initialSeries=t.map((g,p)=>{var m,b,x;return j(G({},g),{data:(x=(b=(m=f[p])==null?void 0:m.data)==null?void 0:b.slice())!=null?x:g.data})})}else h.histogramRawSeries?h.initialSeries=h.histogramRawSeries:h.treemapRawSeries?h.initialSeries=h.treemapRawSeries:h.initialSeries=t;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),h.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),c.chart.stacked){let f=new ct(this.w);this.w.seriesData.series=f.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),h.axisCharts?(u._defineLazyResult(this.w.seriesData,"stackedSeriesTotals",()=>this.coreUtils.getStackedSeriesTotals()),u._defineLazyResult(this.w.seriesData,"stackedSeriesTotalsByGroups",()=>this.coreUtils.getStackedSeriesTotalsByGroups()),u._defineLazyResult(h,"seriesPercent",()=>(this.coreUtils.getPercentSeries(),h.seriesPercent))):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(t);let d=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let f=0;f<d.length;f++)if(Array.isArray(d[f])){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,unitData:this.w.seriesData.unitData,noLabelsProvided:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC,seriesBoxPoints:this.w.candleData.seriesBoxPoints},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static _defineLazyResult(t,e,s){let i=!1,a;Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){return i||(i=!0,a=s()),a},set(n){i=!0,a=n}})}static sliceByXRange(t,e,s){let i=t.length;if(i===0)return t;let n=!Array.isArray(t[0])?l=>l.x:l=>l[0],r=0;if(e!=null){let l=0,c=i-1;for(;l<=c;){let h=l+c>>1;n(t[h])<e?l=h+1:c=h-1}r=Math.max(0,l-1)}let o=i;if(s!=null){let l=0,c=i-1;for(;l<=c;){let h=l+c>>1;n(t[h])>s?c=h-1:l=h+1}o=Math.min(i,l+1)}return r===0&&o===i?t.slice():t.slice(r,o)}static lttbDownsample(t,e){let s=t.length;if(e>=s||e<3)return t;let i=!Array.isArray(t[0]),a=i?c=>c.x:c=>c[0],n=i?c=>c.y:c=>c[1],r=[];r.push(t[0]);let o=(s-2)/(e-2),l=0;for(let c=0;c<e-2;c++){let h=Math.floor((c+1)*o)+1,d=Math.min(Math.floor((c+2)*o)+1,s),f=0,g=0,p=d-h;for(let v=h;v<d;v++)f+=a(t[v]),g+=n(t[v]);f/=p,g/=p;let m=Math.floor(c*o)+1,b=Math.min(Math.floor((c+1)*o)+1,s),x=a(t[l]),_=n(t[l]),w=-1,y=m;for(let v=m;v<b;v++){let A=Math.abs((x-f)*(n(t[v])-_)-(x-a(t[v]))*(g-_))*.5;A>w&&(w=A,y=v)}r.push(t[y]),l=y}return r.push(t[s-1]),r}static ohlcAggregate(t,e){let s=t.length;if(e>=s||e<1)return t;let i=!Array.isArray(t[0]),a=i?c=>c.x:c=>c[0],n=i?c=>c.y:c=>c[1],r=i?(c,h)=>({x:c,y:h}):(c,h)=>[c,h],o=[],l=s/e;for(let c=0;c<e;c++){let h=Math.floor(c*l),d=c===e-1?s:Math.floor((c+1)*l);if(d<=h)continue;let f=n(t[h]),g=f[0],p=f[1],m=f[2],b=f[3];for(let x=h+1;x<d;x++){let _=n(t[x]);_[1]>p&&(p=_[1]),_[2]<m&&(m=_[2]),b=_[3]}o.push(r(a(t[h]),[g,p,m,b]))}return o}static rangeAggregate(t,e){let s=t.length;if(e>=s||e<1)return t;let i=!Array.isArray(t[0]),a=i?c=>c.x:c=>c[0],n=i?c=>c.y:c=>c[1],r=i?(c,h)=>({x:c,y:h}):(c,h)=>[c,h],o=[],l=s/e;for(let c=0;c<e;c++){let h=Math.floor(c*l),d=c===e-1?s:Math.floor((c+1)*l);if(d<=h)continue;let f=1/0,g=-1/0;for(let p=h;p<d;p++){let m=n(t[p]);if(m!=null)for(let b=0;b<2;b++){let x=m[b];x==null||!isFinite(x)||(x<f&&(f=x),x>g&&(g=x))}}o.push(r(a(t[h]),f===1/0?[null,null]:[f,g]))}return o}excludeCollapsedSeriesInYAxis(){let t=this.w,e=[];t.globals.seriesYAxisMap.forEach((s,i)=>{let a=0;s.forEach(n=>{t.globals.collapsedSeriesIndices.indexOf(n)!==-1&&a++}),a>0&&a==s.length&&e.push(i)}),t.globals.ignoreYAxisIndexes=e.map(s=>s)}},Pi=class{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,s=!0,i=!0,a=!1){return new Promise((n,r)=>{let o=[this.ctx];i&&(o=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(o=[this.ctx],this.w.globals.isExecCalled=!1),o.forEach((l,c)=>{var h,d;let f=l.w;f.globals.shouldAnimate=s,e||(f.globals.resized=!0,f.globals.dataChanged=!0,s&&f.config.chart.animations.enabled&&l.series.getPreviousPaths());let g=f.config.chart.requestedType||f.config.chart.type;if(s&&t&&typeof t=="object"){let p=(h=t?.chart)==null?void 0:h.type;p&&p!==g&&((d=l.morphTypeChange)==null||d.captureBeforeDestroy({fromType:g,toType:p,newSeries:t.series||f.config.series}))}if(t&&typeof t=="object"){l.config=new se(t);let p=t.chart&&t.chart.type,m=p==="funnel"||p==="pyramid"||p==="gauge",b=!!f.config.chart.requestedType;if(p&&!m&&b){t.chart=t.chart||{},t.chart.requestedType=p;let x=f.config.chart.requestedType;(x==="funnel"||x==="pyramid")&&(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel===void 0&&(t.plotOptions.bar.isFunnel=!1),t.plotOptions.bar.isPyramid===void 0&&(t.plotOptions.bar.isPyramid=!1))}l.config.normalizeAliasedChartType(t),t=lt.extendArrayProps(l.config,t,f),l.w.globals.chartID!==this.w.globals.chartID&&(delete t.series,delete t.yaxis),f.config=T.extend(f.config,t),Lt.handOverTypeDefaults(f.config,g,t),a&&(f.globals.lastXAxis=t.xaxis?T.clone(t.xaxis):[],f.globals.lastYAxis=t.yaxis?T.clone(t.yaxis):[],f.globals.initialConfig=T.extend({},f.config),f.globals.initialSeries=f.config.series),t.series&&(f.globals.collapsedSeriesIndices.length>0||f.globals.ancillaryCollapsedSeriesIndices.length>0)&&l.series.reconcileCollapsedByName()}return l.update(t).then(()=>{c===o.length-1&&n(l)}).catch(r)})})}_updateSeries(t,e,s=!1){return new Promise((i,a)=>{let n=this.w;n.globals.shouldAnimate=e,n.globals.dataChanged=!0;let r=JSON.stringify({y:(n.globals.yAxisScale||[]).map(h=>h?h.result:null),xMin:n.globals.minX,xMax:n.globals.maxX});Ne.invalidateSelectors(n),e&&n.config.chart.animations.enabled&&this.ctx.series.getPreviousPaths();let o=n.config.series.length,l=n.config.series.map(h=>{var d,f;return(f=(d=h?.data)==null?void 0:d.length)!=null?f:0});s&&(n.globals.dataReducerRawSeries=null,n.globals.histogramRawSeries=null,n.globals.treemapRawSeries=null),this.ctx.data.resetParsingFlags();let c=this.ctx.data.parseData(t);return this.ctx._writeParsedSeriesData(c.seriesData),this.ctx._writeParsedRangeData(c.rangeData),this.ctx._writeParsedCandleData(c.candleData),this.ctx._writeParsedLabelData(c.labelData),this.ctx._writeParsedAxisFlags(c.axisFlags),s&&(n.globals.initialConfig&&(n.globals.initialConfig.series=n.config.series),n.globals.initialSeries=n.config.series),this._canUseFastPath(t,o,l,n)?this.ctx.fastUpdate(e,r).then(()=>{i(this.ctx)}).catch(a):(this.ctx._updateStats&&this.ctx._updateStats.full++,this.ctx.update().then(()=>{i(this.ctx)}).catch(a))})}_canUseFastPath(t,e,s,i){return!(!i.dom.elGraphical||!i.globals.axisCharts||t.length!==e||t.some((a,n)=>{var r,o;return((o=(r=a?.data)==null?void 0:r.length)!=null?o:0)!==s[n]})||i.globals.collapsedSeries.length>0||i.globals.ancillaryCollapsedSeries.length>0||i.globals.risingSeries.length>0||i.globals.comboCharts||i.interact.zoomed)}_extendSeries(t,e){let s=this.w,i=s.config.series[e];return j(G({},s.config.series[e]),{name:t.name?t.name:i?.name,color:t.color?t.color:i?.color,type:t.type?t.type:i?.type,group:t.group?t.group:i?.group,hidden:typeof t.hidden<"u"?t.hidden:i?.hidden,data:t.data?t.data:i?.data,zIndex:typeof t.zIndex<"u"?t.zIndex:e})}toggleDataPointSelection(t,e){let s=this.w,i=null,a=`.apexcharts-series[data\\:realIndex='${t}']`;if(s.globals.axisCharts?i=s.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):typeof e>"u"&&(i=s.dom.Paper.findOne(`${a} path[j='${t}']`),(s.config.chart.type==="pie"||s.config.chart.type==="polarArea"||s.config.chart.type==="donut")&&this.ctx.pie.pieClicked(t)),i)new B(this.w).pathMouseDown(i,null);else return console.warn("toggleDataPointSelection: Element not found"),null;return i.node?i.node:null}forceXAxisUpdate(t){let e=this.w;return["min","max"].forEach(i=>{typeof t.xaxis[i]<"u"&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])}),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric&&(t=new Lt(t).convertCatToNumericXaxis(t,this.ctx)),t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&t.chart.stackType==="100%"&&(Array.isArray(t.yaxis)?t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100}):(t.yaxis.min=0,t.yaxis.max=100)),t}revertDefaultAxisMinMax(t){let e=this.w,s=e.globals.lastXAxis,i=e.globals.lastYAxis;t&&t.xaxis&&(s=t.xaxis),t&&t.yaxis&&(i=t.yaxis);let a=s;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;let n=r=>{if(typeof i[r]<"u"){let o=i[r];e.config.yaxis[r].min=o.min,e.config.yaxis[r].max=o.max}};e.config.yaxis.map((r,o)=>{e.interact.zoomed||typeof i[o]<"u"?n(o):typeof this.ctx.opts.yaxis[o]<"u"&&(r.min=this.ctx.opts.yaxis[o].min,r.max=this.ctx.opts.yaxis[o].max)})}},_t=class u{static xRatio(t){let e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/u.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*u.xRatio(t)}static screenXToPlotPx(t,e){let s=t.dom.baseEl,i=s&&s.querySelector(".apexcharts-svg");if(!i)return e-t.layout.translateX;let a=i.getBoundingClientRect(),n=t.globals.svgWidth?a.width/t.globals.svgWidth:1;return(e-a.left)/(n||1)-t.layout.translateX}},ps=class{constructor(t){this.w=t.w,this.ttCtx=t}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,n;let r=this.w,o=e.getBoundingClientRect(),l=r.layout.gridWidth,c=o.height,h=l/(r.globals.dataPoints-1),d=c/r.globals.dataPoints,f=this.hasBars();(r.globals.comboCharts||f)&&!r.config.xaxis.convertedCatToNumeric&&(h=l/r.globals.dataPoints);let g=_t.screenXToPlotPx(r,s),p=i-o.top,m=r.globals.barPadForNumericAxis||0;g<-m||p<0||g>l+m||p>c?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let x=Math.round(g/h),_=Math.floor(p/d);f&&!r.config.xaxis.convertedCatToNumeric&&(x=Math.ceil(g/h),x=x-1);let w=null,y=null,v=r.globals.seriesXvalues.map(S=>S.filter(C=>T.isNumber(C))),A=r.globals.seriesYvalues.map(S=>S.filter(C=>T.isNumber(C)));return r.axisFlags.isXNumeric&&(y=this.closestInMultiArray(g,p,v,A),w=y.index,x=(a=y.j)!=null?a:0,w!==null&&r.globals.hasNullValues&&(v=r.globals.seriesXvalues[w],y=this.closestInArray(g,v),x=(n=y.j)!=null?n:0)),r.interact.capturedSeriesIndex=w===null?-1:w,(!x||x<1)&&(x=0),r.globals.isBarHorizontal?r.interact.capturedDataPointIndex=_:r.interact.capturedDataPointIndex=x,{capturedSeries:w,j:r.globals.isBarHorizontal?_:x,hoverX:g,hoverY:p}}getFirstActiveXArray(t){let e=this.w,s=0,i=t.map((a,n)=>a.length>0?n:-1);for(let a=0;a<i.length;a++)if(i[a]!==-1&&e.globals.collapsedSeriesIndices.indexOf(a)===-1&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(a)===-1){s=i[a];break}return s}closestInMultiArray(t,e,s,i){let a=this.w,n=d=>a.globals.collapsedSeriesIndices.indexOf(d)===-1&&a.globals.ancillaryCollapsedSeriesIndices.indexOf(d)===-1,r=a.config.chart.type,o=!a.globals.comboCharts&&(r==="line"||r==="area"),l=1/0,c=null,h=null;if(a.globals.allSeriesHasEqualX){let d=1/0;for(let f=0;f<s.length;f++){if(!n(f))continue;let g=s[f],p=i[f],m=Math.min(g.length,p.length);for(let b=0;b<m;b++){let x=Math.abs(t-g[b]);x<d&&(d=x,h=b)}}if(h!==null)if(o){let f=1/0;for(let g=0;g<s.length;g++){if(!n(g))continue;let p=s[g],m=i[g],b=Math.min(p.length,m.length);if(b<2){let x=m[h];if(typeof x!="number")continue;let _=Math.abs(e-x);_<f&&(f=_,c=g);continue}for(let x=0;x<b-1;x++){let _=this._distanceToSegment(t,e,p[x],m[x],p[x+1],m[x+1]);_.dist<f&&(f=_.dist,c=g)}}}else{let f=1/0;for(let g=0;g<s.length;g++){if(!n(g))continue;let p=i[g][h];if(typeof p!="number")continue;let m=Math.abs(e-p);m<f&&(f=m,c=g)}}return{index:c,j:h}}for(let d=0;d<s.length;d++){if(!n(d))continue;let f=s[d],g=i[d],p=Math.min(f.length,g.length);if(o&&p>=2){for(let m=0;m<p-1;m++){let b=this._distanceToSegment(t,e,f[m],g[m],f[m+1],g[m+1]);b.dist<l&&(l=b.dist,c=d,h=b.t<.5?m:m+1)}continue}for(let m=0;m<p;m++){let b=f[m],x=t-b,_=g[m],w=e-_,y=Math.sqrt(x*x+w*w);y<l&&(l=y,c=d,h=m)}}return{index:c,j:h}}_distanceToSegment(t,e,s,i,a,n){let r=a-s,o=n-i,l=r*r+o*o,c=l===0?0:((t-s)*r+(e-i)*o)/l;c<0?c=0:c>1&&(c=1);let h=s+c*r,d=i+c*o,f=t-h,g=e-d;return{dist:Math.sqrt(f*f+g*g),t:c}}closestInArray(t,e){let s=e[0],i=null,a=Math.abs(t-s);for(let n=0;n<e.length;n++){let r=Math.abs(t-e[n]);r<a&&(a=r,i=n)}return{j:i}}isXoverlap(t){let e=this.w,s=[],i=e.seriesData.seriesX.filter(a=>typeof a[0]<"u");if(i.length>0)for(let a=0;a<i.length-1;a++)typeof i[a][t]<"u"&&typeof i[a+1][t]<"u"&&i[a][t]!==i[a+1][t]&&s.push("unEqual");return s.length===0}isInitialSeriesSameLen(){var t,e,s,i;let a=!0,n=((e=(t=this.w.globals._initialSeriesPeek)!=null?t:this.w.globals.initialSeries)==null?void 0:e.filter((r,o)=>{var l;return!((l=this.w.globals.collapsedSeriesIndices)!=null&&l.includes(o))}))||[];for(let r=0;r<n.length-1;r++){if(!((s=n[r])!=null&&s.data)||!((i=n[r+1])!=null&&i.data))return!0;if(n[r].data.length!==n[r+1].data.length){a=!1;break}}return a}getBarsHeight(t){return[...t].reduce((i,a)=>i+a.getBBox().height,0)}getElMarkers(t){return typeof t=="number"?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}getAllMarkers(t=!1){let e=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")];t&&(e=e.filter(i=>{let a=Number(i.getAttribute("data:realIndex"));return this.w.globals.collapsedSeriesIndices.indexOf(a)===-1})),e.sort((i,a)=>{var n=Number(i.getAttribute("data:realIndex")),r=Number(a.getAttribute("data:realIndex"));return r<n?1:r>n?-1:0});let s=[];return e.forEach(i=>{s.push(i.querySelector(".apexcharts-marker"))}),s}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){let s=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new B(this.w).getMarkerPath(s,i,a,e)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(t){let e=this.w,s=e.config.markers.hover.size;return s===void 0&&(s=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(t){let e=this.w,s=this.ttCtx;s.allTooltipSeriesGroups.length===0&&(s.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));let i=s.allTooltipSeriesGroups;for(let a=0;a<i.length;a++)t==="enable"?(i[a].classList.add("apexcharts-active"),i[a].style.display=e.config.tooltip.items.display):(i[a].classList.remove("apexcharts-active"),i[a].style.display="none")}},Ri=class{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new ps(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:s=0,j:i=null,y1:a,y2:n,e:r}){let o=this.w;o.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:s,j:i,y1:a,y2:n,w:o}):this.toggleActiveInactiveSeries(t,s);let l=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:l,ttItems:e,shared:t,e:r});let c=this.ttCtx.getElTooltip();c&&(this.ttCtx.tooltipRect.ttWidth=c.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=c.getBoundingClientRect().height)}printLabels({i:t,j:e,values:s,ttItems:i,shared:a,e:n}){let r=this.w,{xVal:o,zVal:l,xAxisTTVal:c}=s,h=r.seriesData.series.length,d=e!==null&&r.config.plotOptions.bar.distributed?r.globals.colors[e]:r.globals.colors[t];for(let f=0;f<h;f++){let g=r.config.tooltip.inverseOrder?h-1-f:f,p=this.computeSeriesRow({i:t,j:e,t:f,tIndex:g,shared:a,e:n,basePColor:d});this.DOMHandling({i:t,t:g,j:e,ttItems:i,values:{val:p.val,goalVals:p.goalVals,xVal:o,xAxisTTVal:c,zVal:l},seriesName:p.seriesName,shared:a,pColor:p.pColor})}}computeSeriesRow({i:t,j:e,tIndex:s,shared:i,e:a,basePColor:n}){let r=this.w,o=this.getFormatters(t),l=n,c,h=[],d=r.config.chart.type==="treemap"?o.yLbTitleFormatter(String(r.config.series[t].data[e].x),{series:r.seriesData.series,seriesIndex:t,dataPointIndex:e,w:r}):this.getSeriesName({fn:o.yLbTitleFormatter,index:t,seriesIndex:t,j:e});return r.globals.axisCharts&&(i?(o=this.getFormatters(s),d=this.getSeriesName({fn:o.yLbTitleFormatter,index:s,seriesIndex:t,j:e}),l=r.globals.colors[s],c=this.formatYValue(o,s,e),h=this.formatGoalVals(o,s,e)):(l=this.resolvePatternColor(a,l),c=this.formatYValue(o,t,e),h=this.formatGoalVals(o,t,e))),e===null&&(c=o.yLbFormatter(r.seriesData.series[t],j(G({},r),{seriesIndex:t,dataPointIndex:t}))),{seriesName:d,val:c,goalVals:h,pColor:l}}formatYValue(t,e,s){var i,a,n,r;let o=this.w;return o.axisFlags.isRangeData?t.yLbFormatter((a=(i=o.rangeData.seriesRangeStart)==null?void 0:i[e])==null?void 0:a[s],{series:o.rangeData.seriesRangeStart,seriesIndex:e,dataPointIndex:s,w:o})+" - "+t.yLbFormatter((r=(n=o.rangeData.seriesRangeEnd)==null?void 0:n[e])==null?void 0:r[s],{series:o.rangeData.seriesRangeEnd,seriesIndex:e,dataPointIndex:s,w:o}):t.yLbFormatter(o.seriesData.series[e][s],{series:o.seriesData.series,seriesIndex:e,dataPointIndex:s,w:o})}formatGoalVals(t,e,s){var i;let a=this.w,n=(i=a.seriesData.seriesGoals[e])==null?void 0:i[s];return Array.isArray(n)?n.map(r=>({attrs:r,val:t.yLbFormatter(r.value,{seriesIndex:e,dataPointIndex:s,w:a})})):[]}resolvePatternColor(t,e){var s,i,a;let n=this.w,r=(s=t?.target)==null?void 0:s.getAttribute("fill");if(!r)return e;if(r.indexOf("url")===-1)return r;if(r.indexOf("Pattern")===-1)return e;let o=n.dom.baseEl.querySelector(r.substr(4).slice(0,-1));return(a=(i=o?.childNodes[0])==null?void 0:i.getAttribute("stroke"))!=null?a:e}getFormatters(t){let e=this.w,s=e.formatters.yLabelFormatters[t],i;return e.formatters.ttVal!==void 0?Array.isArray(e.formatters.ttVal)?(s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(s=e.formatters.ttVal.formatter,typeof e.formatters.ttVal.title.formatter=="function"&&(i=e.formatters.ttVal.title.formatter)):i=e.config.tooltip.y.title.formatter,typeof s!="function"&&(e.formatters.yLabelFormatters[0]?s=e.formatters.yLabelFormatters[0]:s=function(a){return a}),typeof i!="function"&&(i=function(a){return a?a+": ":""}),{yLbFormatter:s,yLbTitleFormatter:i}}getSeriesName({fn:t,index:e,seriesIndex:s,j:i}){let a=this.w;return t(String(a.seriesData.seriesNames[e]),{series:a.seriesData.series,seriesIndex:s,dataPointIndex:i,w:a})}DOMHandling({t,j:e,ttItems:s,values:i,seriesName:a,shared:n,pColor:r}){let o=this.w,l=this.ttCtx,{val:c,goalVals:h,xVal:d,xAxisTTVal:f,zVal:g}=i;if(!s||!s[t])return;let p=null;p=s[t].children,o.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=r,p[0].style.display="none"),l.showTooltipTitle&&(l.tooltipTitle===null&&(l.tooltipTitle=o.dom.baseEl.querySelector(".apexcharts-tooltip-title")),l.tooltipTitle&&(l.tooltipTitle.innerHTML=d)),l.isXAxisTooltipEnabled&&l.xaxisTooltipText&&(l.xaxisTooltipText.innerHTML=f!==""?f:d);let m=s[t].querySelector(".apexcharts-tooltip-text-y-label");m&&(m.innerHTML=a||"");let b=s[t].querySelector(".apexcharts-tooltip-text-y-value");b&&(b.innerHTML=typeof c<"u"?c:""),p[0]&&p[0].classList.contains("apexcharts-tooltip-marker")&&(o.config.tooltip.marker.fillColors&&Array.isArray(o.config.tooltip.marker.fillColors)&&(r=o.config.tooltip.marker.fillColors[t]),o.config.tooltip.fillSeriesColor?p[0].style.backgroundColor=r:p[0].style.color=r),o.config.tooltip.marker.show||(p[0].style.display="none");let x=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),_=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&o.seriesData.seriesGoals[t]){let w=()=>{let y="<div>",v="<div>";h.forEach(A=>{y+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${A.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${A.attrs.name}</div>`,v+=`<div>${A.val}</div>`}),x.innerHTML=y+"</div>",_.innerHTML=v+"</div>"};n?o.seriesData.seriesGoals[t][e]&&Array.isArray(o.seriesData.seriesGoals[t][e])?w():(x.innerHTML="",_.innerHTML=""):w()}else x.innerHTML="",_.innerHTML="";if(g!==null){let w=s[t].querySelector(".apexcharts-tooltip-text-z-label");w.innerHTML=o.config.tooltip.z.title;let y=s[t].querySelector(".apexcharts-tooltip-text-z-value");y.innerHTML=typeof g<"u"?g:""}if(n&&p[0]){if(o.config.tooltip.hideEmptySeries){let w=s[t].querySelector(".apexcharts-tooltip-marker"),y=s[t].querySelector(".apexcharts-tooltip-text");parseFloat(c)==0?(w.style.display="none",y.style.display="none"):(w.style.display="block",y.style.display="block")}typeof c>"u"||c===null||o.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||o.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(l.tConfig.enabledOnSeries)&&l.tConfig.enabledOnSeries.indexOf(t)===-1?p[0].parentNode.style.display="none":p[0].parentNode.style.display=o.config.tooltip.items.display}else Array.isArray(l.tConfig.enabledOnSeries)&&l.tConfig.enabledOnSeries.indexOf(t)===-1&&(p[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){let s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");let i=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(i){let a=i;a.classList.add("apexcharts-active"),a.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var s,i,a,n,r,o,l,c;let h=this.w,d=h.seriesData.seriesX.map(w=>w.length>0?w:[]),f="",g="",p=null,m=null,b={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},x=h.formatters.ttZFormatter;if(e===null)m=h.seriesData.series[t];else if(h.axisFlags.isXNumeric&&h.config.chart.type!=="treemap"){if(f=d[t][e],d[t].length===0){let w=this.tooltipUtil.getFirstActiveXArray(d);f=d[w][e]}}else new Ye(this.w).isFormatXY()?f=typeof h.config.series[t].data[e]<"u"?h.config.series[t].data[e].x:"":f=typeof h.labelData.labels[e]<"u"?h.labelData.labels[e]:"";let _=f;return h.axisFlags.isXNumeric&&h.config.xaxis.type==="datetime"?f=new ee(this.w).xLabelFormat(h.formatters.ttKeyFormatter,_,_,{i:void 0,dateFormatter:new mt(this.w).formatDate,w:this.w}):h.globals.isBarHorizontal?f=h.formatters.yLabelFormatters[0](_,b):f=(a=(i=(s=h.formatters).xLabelFormatter)==null?void 0:i.call(s,_,b))!=null?a:_,h.config.tooltip.x.formatter!==void 0&&(f=(o=(r=(n=h.formatters).ttKeyFormatter)==null?void 0:r.call(n,_,b))!=null?o:_),h.seriesData.seriesZ.length>0&&h.seriesData.seriesZ[t].length>0&&(p=x?.(h.seriesData.seriesZ[t][e],h)),typeof h.config.xaxis.tooltip.formatter=="function"?g=(c=(l=h.formatters).xaxisTooltipFormatter)==null?void 0:c.call(l,_,b):g=f,{val:Array.isArray(m)?m.join(" "):m,xVal:Array.isArray(f)?f.join(" "):f,xAxisTTVal:Array.isArray(g)?g.join(" "):g,zVal:p}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){let n=this.ttCtx.getElTooltip(),r=a.config.tooltip.custom;if(Array.isArray(r)&&(r=r[t]),typeof r!="function")return;let o=r({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});if(n){let l=n.querySelector(".apexcharts-tooltip-arrow");typeof o=="string"||typeof o=="number"?n.innerHTML=String(o):o!=null&&(o instanceof Element||typeof o.nodeName=="string")&&(n.innerHTML="",n.appendChild(o.cloneNode(!0))),l&&n.appendChild(l)}}},kt=7,fc=0,ms=class{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){let s=this.ttCtx,i=this.w,a=s.getElXCrosshairs(),n=t-s.xcrosshairsWidth/2,r=i.labelData.labels.slice().length;if(e!==null&&(n=i.layout.gridWidth/r*e),a!==null&&!i.globals.isBarHorizontal&&(a.setAttribute("x",String(n)),a.setAttribute("x1",String(n)),a.setAttribute("x2",String(n)),a.setAttribute("y2",String(i.layout.gridHeight)),a.classList.add("apexcharts-active")),n<0&&(n=0),n>i.layout.gridWidth&&(n=i.layout.gridWidth),s.isXAxisTooltipEnabled){let o=n;(i.config.xaxis.crosshairs.width==="tickWidth"||i.config.xaxis.crosshairs.width==="barWidth")&&(o=n+s.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}moveYCrosshairs(t){let e=this.ttCtx;e.ycrosshairs!==null&&B.setAttrs(e.ycrosshairs,{y1:t,y2:t}),e.ycrosshairsHidden!==null&&B.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){var e,s;let i=this.w,a=this.ttCtx;if(a.xaxisTooltip!==null&&a.xcrosshairsWidth!==0){a.xaxisTooltip.classList.add("apexcharts-active");let n=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+5+i.config.xaxis.offsetY,o=a.xaxisTooltip.getBoundingClientRect().width;if(t=t-o/2,!isNaN(t)){t=t+i.layout.translateX;let c=new B(this.w).getTextRects((s=(e=a.xaxisTooltipText)==null?void 0:e.innerHTML)!=null?s:"",i.config.xaxis.labels.style.fontSize);a.xaxisTooltipText&&(a.xaxisTooltipText.style.minWidth=c.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=n+"px"}}}moveYAxisTooltip(t){var e,s;let i=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);let n=parseInt((s=(e=a.ycrosshairsHidden)==null?void 0:e.getAttribute("y1"))!=null?s:"0",10),r=i.layout.translateY+n;if(a.yaxisTTEls){let o=a.yaxisTTEls[t].getBoundingClientRect(),l=o.height,c,h=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),d=i.dom.elWrap.getBoundingClientRect();if(h){let f=h.getBoundingClientRect();f.width>0&&(c=f.left+f.width/2-d.left-o.width/2)}c==null&&(c=i.config.yaxis[t].opposite?i.globals.translateYAxisX[t]+4:i.globals.translateYAxisX[t]-o.width-4),r=r-l/2,i.globals.ignoreYAxisIndexes.indexOf(t)===-1&&r>0&&r<i.layout.gridHeight?(a.yaxisTTEls[t].classList.add("apexcharts-active"),a.yaxisTTEls[t].style.top=r+"px",a.yaxisTTEls[t].style.left=c+i.config.yaxis[t].tooltip.offsetX+"px"):a.yaxisTTEls[t].classList.remove("apexcharts-active")}}moveTooltip(t,e,s=null){let a=this.ttCtx.getElTooltip();if(!a)return;let n=this.computeTooltipPosition(t,e,s);n!==null&&this.applyTooltipPosition(a,n)}computeTooltipPosition(t,e,s=null){var i,a,n,r,o,l,c;let h=this.w,d=this.ttCtx,f=d.tooltipRect,g=!!h.config.tooltip.arrow,p=s!==null?parseFloat(String(s)):1,m=f.ttHeight||0,b=f.ttWidth||0,x=parseFloat(String(t)),_=parseFloat(String(e));if(isNaN(x)||isNaN(_))return null;let w=p+(g?kt:0)+fc,y=x+w,v=_+h.layout.translateY,A=g?v-m/2+p/2:_+p/2,S="right";if(y>h.layout.gridWidth/2&&(y=x-b-w,S="left"),y>h.layout.gridWidth-b-10&&(y=S==="left"?Math.min(h.layout.gridWidth-b,y):h.layout.gridWidth-b),y<-20&&(y=-20),h.config.tooltip.followCursor){let k=d.getElGrid();if(!k)return null;let L=k.getBoundingClientRect();y=d.e.clientX-L.left,y>h.layout.gridWidth/2?(y=y-b,S="left"):S="right",A=d.e.clientY+h.layout.translateY-L.top,A>h.layout.gridHeight/2&&(A=A-m)}else if(!h.globals.isBarHorizontal)if(g){let k=h.layout.translateY,L=h.layout.translateY+h.layout.gridHeight;A+m>L&&(A=L-m),A<k&&(A=k)}else m/2+A>h.layout.gridHeight&&(A=h.layout.gridHeight-m+h.layout.translateY);if(isNaN(y))return null;y=y+h.layout.translateX;let C=(a=(i=h.config)==null?void 0:i.chart)==null?void 0:a.accessibility;if(C?.enabled&&((r=(n=C?.keyboard)==null?void 0:n.navigation)!=null&&r.enabled)&&((c=(l=(o=h.dom)==null?void 0:o.baseEl)==null?void 0:l.querySelector)!=null&&c.call(l,".apexcharts-keyboard-focused"))){let k=g?v:_,L=(p||1)+12,E=A,D=A+m;!isNaN(k)&&m>0&&E<k+L&&D>k-L&&(A=k-m-L,A<0&&(A=k+L))}let M=null;if(g&&m>0){let k=v-A,L=10,E=m-10;M=Math.max(L,Math.min(E,k))}return{x:y,y:A,placement:S,arrowY:M}}applyTooltipPosition(t,e){if(!t)return;let s=t.dataset.positioned!=="true";s&&(t.style.transitionProperty="none"),t.style.left=e.x+"px",t.style.top=e.y+"px",e.placement&&(t.dataset.placement=e.placement),e.arrowY!=null&&t.style.setProperty("--apx-tt-arrow-y",e.arrowY+"px"),e.arrowX!=null&&t.style.setProperty("--apx-tt-arrow-x",e.arrowX+"px"),s&&(t.offsetWidth,t.dataset.positioned="true",requestAnimationFrame(()=>{t.style.transitionProperty=""}))}moveMarkers(t,e){var s;let i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0){let n=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let r=0;r<n.length;r++)parseInt((s=n[r].getAttribute("rel"))!=null?s:"0",10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,n[r]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var s,i,a,n,r;let o=this.w,l=this.ttCtx,c=0,h=0,d=new B(this.w),f=o.globals.pointsArray,g=l.tooltipUtil.getHoverMarkerSize(e),p=o.config.series[e].type;if(p&&(p==="column"||p==="candlestick"||p==="boxPlot"||p==="violin"))return;c=(i=(s=f[e])==null?void 0:s[t])==null?void 0:i[0],h=((n=(a=f[e])==null?void 0:a[t])==null?void 0:n[1])||0;let m=o.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(m&&h<o.layout.gridHeight&&h>0){let b=(r=m.getAttribute("shape"))!=null?r:"circle",x=d.getMarkerPath(c,h,b,g*1.5);m.setAttribute("d",x)}this.moveXCrosshairs(c),l.fixedTooltip||this.moveTooltip(c,h,g)}moveDynamicPointsOnHover(t){var e,s;let i=this.ttCtx,a=i.w,n=0,r=0,o=0,l=a.globals.pointsArray,c=new ct(this.w),h=new B(this.w);o=c.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);let d=i.tooltipUtil.getHoverMarkerSize(o);if((e=l[o])!=null&&e[t]&&(n=l[o][t][0],r=l[o][t][1]),isNaN(n))return;let f=i.tooltipUtil.getAllMarkers();if(f.length)for(let g=0;g<a.seriesData.series.length;g++){let p=l[g];if(a.globals.comboCharts&&typeof p>"u"&&f.splice(g,0,null),f[g]&&p&&p.length){let m=l[g][t][1],b;f[g].setAttribute("cx",n);let x=(s=f[g].getAttribute("shape"))!=null?s:"circle";if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){let _=t+a.seriesData.series[g].length;b=l[g][_][1];let w=Math.abs(m-b)/2;m=m-w}if(m!==null&&!isNaN(m)&&m<a.layout.gridHeight+d&&m+d>0){let _=h.getMarkerPath(n,m,x,d);f[g].setAttribute("d",_)}else f[g].setAttribute("d","")}}this.moveXCrosshairs(n),i.fixedTooltip||this.moveTooltip(n,r||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,a,n,r;let o=this.w,l=this.ttCtx,c=o.globals.columnSeries?o.globals.columnSeries.length:o.seriesData.series.length;o.config.chart.stacked&&(c=o.globals.barGroups.length);let h=c>=2&&c%2===0?Math.floor(c/2):Math.floor(c/2)+1;o.globals.isBarHorizontal&&(h=new ct(this.w).getActiveConfigSeriesIndex("desc")+1);let d=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-violin-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${h}'] path[j='${t}']`);!d&&typeof e=="number"&&(d=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
|
|
.apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
|
|
.apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
|
|
.apexcharts-violin-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
|
|
.apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let f=null,g=o.globals.barCanvasCoords;if(!d&&g&&(f=typeof e=="number"&&((s=g[e])==null?void 0:s[t])||null,!f)){for(let y in g)if((i=g[y])!=null&&i[t]){f=g[y][t];break}}let p=d?parseFloat((a=d.getAttribute("cx"))!=null?a:"0"):f?f.cx:0,m=d?parseFloat((n=d.getAttribute("cy"))!=null?n:"0"):f?f.cy:0,b=d?parseFloat((r=d.getAttribute("barWidth"))!=null?r:"0"):f?f.barWidth:0,x=l.getElGrid();if(!x)return;let _=x.getBoundingClientRect(),w=d&&(d.classList.contains("apexcharts-candlestick-area")||d.classList.contains("apexcharts-boxPlot-area"));if(o.axisFlags.isXNumeric){if(d&&!w){let y=this._datapointCenterXFromBars(t);y!=null?p=y:p=p-(c%2!==0?b/2:0)}d&&w&&(p=p-b/2)}else!o.globals.isBarHorizontal&&!f&&(p=l.xAxisTicksPositions[t-1]+l.dataPointsDividedWidth/2,isNaN(p)&&(p=l.xAxisTicksPositions[t]-l.dataPointsDividedWidth/2));if(o.globals.isBarHorizontal?m=m-l.tooltipRect.ttHeight:o.config.tooltip.followCursor?m=l.e.clientY-_.top-l.tooltipRect.ttHeight/2:m+l.tooltipRect.ttHeight+15>o.layout.gridHeight&&(m=o.layout.gridHeight),o.globals.isBarHorizontal||this.moveXCrosshairs(p),!l.fixedTooltip){if(o.globals.isBarHorizontal&&!o.config.tooltip.followCursor&&this.placeHorizontalSharedTooltip(t))return;this.moveTooltip(p,m||o.layout.gridHeight)}}_datapointCenterXFromBars(t){var e,s;let i=this.w,a=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`);if(!a.length)return null;let n=1/0,r=-1/0;for(let o of a){let l=o.parentNode;if((s=(e=l?.classList)==null?void 0:e.contains)!=null&&s.call(e,"apexcharts-series-collapsed"))continue;let c=o.getBoundingClientRect();c.width===0&&c.height===0||(c.left<n&&(n=c.left),c.right>r&&(r=c.right))}return isFinite(n)?_t.screenXToPlotPx(i,(n+r)/2):null}placeHorizontalSharedTooltip(t){var e,s;let i=this.w,a=this.ttCtx,n=a.getElTooltip();if(!n)return!1;let r=a.getElGrid();if(!r)return!1;let o=r.getBoundingClientRect(),l=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}']`);if(!l.length)return!1;let c=1/0,h=-1/0,d=1/0,f=-1/0;for(let k of l){let L=k.parentNode;if((s=(e=L?.classList)==null?void 0:e.contains)!=null&&s.call(e,"apexcharts-series-collapsed"))continue;let E=k.getBoundingClientRect();E.width===0&&E.height===0||(E.left<c&&(c=E.left),E.right>h&&(h=E.right),E.top<d&&(d=E.top),E.bottom>f&&(f=E.bottom))}if(!isFinite(c))return!1;let g=a.tooltipRect.ttWidth||0,p=a.tooltipRect.ttHeight||0,m=(c+h)/2-o.left+i.layout.translateX,b=d-o.top+i.layout.translateY,x=f-o.top+i.layout.translateY,_=i.layout.translateY,w=i.layout.translateY+i.layout.gridHeight,y=i.layout.translateX,v=i.layout.translateX+i.layout.gridWidth,A="top",S=b-p-kt;if(S<_){let k=x+kt;k+p<=w&&(A="bottom",S=k)}let C=m-g/2;C<y&&(C=y),C+g>v&&(C=v-g);let M=Math.max(10,Math.min(g-10,m-C));return this.applyTooltipPosition(n,{x:C,y:S,placement:A,arrowY:null,arrowX:M}),!0}};function gc(u){let t=e=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${e}</svg>`;switch(u){case"square":case"rect":return t('<rect x="1" y="1" width="10" height="10" rx="1" fill="currentColor"/>');case"line":return t('<rect x="0" y="5" width="12" height="2" rx="1" fill="currentColor"/>');case"diamond":return t('<path d="M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z" fill="currentColor"/>');case"triangle":return t('<path d="M6 1 L11.2 10.5 L0.8 10.5 Z" fill="currentColor"/>');case"cross":return t('<path d="M2 2 L10 10 M10 2 L2 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"plus":return t('<path d="M6 1 L6 11 M1 6 L11 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"star":return t('<path d="M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z" fill="currentColor"/>');case"sparkle":return t('<path d="M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z" fill="currentColor"/>');default:return t('<circle cx="6" cy="6" r="5" fill="currentColor"/>')}}var Fi=class{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new ms(t)}drawDynamicPoints(){let t=this.w,e=new B(this.w),s=new zt(this.w,this.ctx),i=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&i.sort((a,n)=>parseFloat(a.getAttribute("data:realIndex"))-parseFloat(n.getAttribute("data:realIndex")));for(let a=0;a<i.length;a++){let n=i[a].querySelector(".apexcharts-series-markers-wrap");if(n!==null){let r=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;(t.config.chart.type==="line"||t.config.chart.type==="area")&&!t.globals.comboCharts&&!t.config.tooltip.intersect&&(r+=" no-pointer-events");let o=s.getMarkerConfig({cssClass:r,seriesIndex:Number(n.getAttribute("data:realIndex"))}),l=e.drawMarker(0,0,o);l.node.setAttribute("default-marker-size",0);let c=O.createElementNS(et,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(l.node),n.appendChild(c)}}}enlargeCurrentPoint(t,e,s=null,i=null){let a=this.w,n=a.config.markers.hover.size;a.config.chart.type!=="bubble"&&(n=this.newPointSize(t,e));let r=e.getAttribute("cx"),o=e.getAttribute("cy");if(s!==null&&i!==null&&(r=s,o=i),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(a.config.chart.type==="radar"){let l=this.ttCtx.getElGrid();if(!l)return;let c=l.getBoundingClientRect();r=this.ttCtx.e.clientX-c.left}this.tooltipPosition.moveTooltip(r,o,n)}}enlargePoints(t){var e,s;let i=this.w,a=this,n=this.ttCtx,r=t,o=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),l=i.config.markers.hover.size;for(let c=0;c<o.length;c++){let h=o[c].getAttribute("rel"),d=o[c].getAttribute("index");if(l===void 0&&(l=i.globals.markers.size[d]+i.config.markers.hover.sizeOffset),r===parseInt(h??"0",10)){a.newPointSize(r,o[c]);let f=(e=o[c].getAttribute("cx"))!=null?e:"0",g=(s=o[c].getAttribute("cy"))!=null?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(f)),n.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(f),parseFloat(g),l)}else a.oldPointSize(o[c])}}newPointSize(t,e){let s=this.w,i=s.config.markers.hover.size,a=t===0?e.parentNode.firstChild:e.parentNode.lastChild;if(a.getAttribute("default-marker-size")!=="0"){let n=parseInt(a.getAttribute("index"),10);i===void 0&&(i=s.globals.markers.size[n]+s.config.markers.hover.sizeOffset),i<0&&(i=0);let r=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);return e.setAttribute("d",r),i}}oldPointSize(t){let e=parseFloat(t.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",s)}resetPointsSize(){var t;let s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let i=0;i<s.length;i++){let a=parseFloat((t=s[i].getAttribute("default-marker-size"))!=null?t:"0");if(T.isNumber(a)&&a>0){let n=this.ttCtx.tooltipUtil.getPathFromPoint(s[i],a);s[i].setAttribute("d",n)}else s[i].setAttribute("d","M0,0")}}},Ii=class{constructor(t){this.w=t.w;let e=this.w;this.ttCtx=t,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.config.chart.type==="rangeBar"&&e.config.plotOptions.bar.rangeBarGroupRows}getAttr(t,e){var s;return parseFloat((s=t.target.getAttribute(e))!=null?s:"")}handleHeatTreeTooltip({e:t,opt:e,x:s,y:i,type:a}){var n,r;let o=this.ttCtx,l=this.w,c=l.globals.activeRenderer,h=a==="heatmap"&&c&&c.kind==="canvas"&&typeof c.hitTest=="function",d,f,g,p,m,b;if(h){let _=e.elGrid.getBoundingClientRect(),w=t.type==="touchmove"?t.touches[0].clientX:t.clientX,y=t.type==="touchmove"?t.touches[0].clientY:t.clientY,v=c.hitTest(w-_.left,y-_.top);if(!v)return{x:s,y:i,noHit:!0};d=v.seriesIndex,f=v.dataPointIndex,g=v.x,p=v.y,m=v.width,b=v.height}else if(t.target.classList.contains(`apexcharts-${a}-rect`))d=this.getAttr(t,"i"),f=this.getAttr(t,"j"),g=this.getAttr(t,"cx"),p=this.getAttr(t,"cy"),m=this.getAttr(t,"width"),b=this.getAttr(t,"height");else return{x:s,y:i};o.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:d,j:f,shared:!1,e:t}),l.interact.capturedSeriesIndex=d,l.interact.capturedDataPointIndex=f,o.tooltipPosition.moveXCrosshairs(g+m/2);let x=o.getElTooltip();if(a==="heatmap"&&l.config.tooltip.arrow&&!l.config.tooltip.followCursor&&x){let _=e.elGrid.getBoundingClientRect(),w=l.dom.elWrap.getBoundingClientRect(),y=_.left-w.left,v,A,S,C;if(h)v=g,A=p,S=g+m,C=p+b;else{let I=t.target.getBoundingClientRect();v=I.left-_.left,A=I.top-_.top,S=I.right-_.left,C=I.bottom-_.top}let M=o.tooltipRect.ttWidth||0,k=o.tooltipRect.ttHeight||0,L=(v+S)/2+y,E=A+l.layout.translateY,D=C+l.layout.translateY,P=l.layout.translateY,F=l.layout.translateY+l.layout.gridHeight,R=y,N=y+l.layout.gridWidth,z="top",$=E-k-kt;if($<P){let I=D+kt;I+k<=F?(z="bottom",$=I):$=P}let W=L-M/2;W<R&&(W=R),W+M>N&&(W=N-M);let Y=Math.max(10,Math.min(M-10,L-W));return o.tooltipPosition.applyTooltipPosition(x,{x:W,y:$,placement:z,arrowY:null,arrowX:Y}),{x:W,y:$,positioned:!0}}if(s=g+o.tooltipRect.ttWidth/2+m,i=p+o.tooltipRect.ttHeight/2-b/2,s>l.layout.gridWidth/2&&(s=g-o.tooltipRect.ttWidth/2+m),o.w.config.tooltip.followCursor){let _=l.dom.elWrap.getBoundingClientRect();s=((n=l.interact.clientX)!=null?n:0)-_.left-(s>l.layout.gridWidth/2?o.tooltipRect.ttWidth:0),i=((r=l.interact.clientY)!=null?r:0)-_.top-(i>l.layout.gridHeight/2?o.tooltipRect.ttHeight:0)}return{x:s,y:i}}handleMarkerTooltip({e:t,opt:e,x:s,y:i}){let a=this.w,n=this.ttCtx,r,o;if(t.target.classList.contains("apexcharts-marker")){let l=parseInt(e.paths.getAttribute("cx"),10),c=parseInt(e.paths.getAttribute("cy"),10),h=parseFloat(e.paths.getAttribute("val"));if(o=parseInt(e.paths.getAttribute("rel"),10),r=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,n.intersect){let f=T.findAncestor(e.paths,"apexcharts-series");f&&(r=parseInt(f.getAttribute("data:realIndex"),10))}n.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:o,shared:n.showOnIntersect?!1:a.config.tooltip.shared,e:t}),t.type==="mouseup"&&n.markerClick(t,r,o),a.interact.capturedSeriesIndex=r,a.interact.capturedDataPointIndex=o;let d=!!a.config.tooltip.arrow;if(s=l,d?i=c:(i=c+a.layout.translateY-n.tooltipRect.ttHeight*1.4,h<0&&(i=c)),n.w.config.tooltip.followCursor){let f=n.getElGrid();if(!f)return{x:s,y:i};let g=f.getBoundingClientRect();i=n.e.clientY+a.layout.translateY-g.top}n.marker.enlargeCurrentPoint(o,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){var s,i,a;let n=this.w,r=this.ttCtx,o=r.getElTooltip(),l=0,c=0,h=0,d=0,f,g=this.getBarTooltipXY({e:t,opt:e});if(g.j===null&&g.barHeight===0&&g.barWidth===0)return;d=g.i;let p=g.j;if(n.interact.capturedSeriesIndex=d,n.interact.capturedDataPointIndex=p!==null?p:n.interact.capturedDataPointIndex,n.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||!n.config.tooltip.shared?(c=g.x,h=g.y,f=Array.isArray(n.config.stroke.width)?n.config.stroke.width[d]:n.config.stroke.width,l=c):!n.globals.comboCharts&&!n.config.tooltip.shared&&(l=l/2),isNaN(h)&&(h=n.globals.svgHeight-r.tooltipRect.ttHeight),c+r.tooltipRect.ttWidth>n.layout.gridWidth?c=c-r.tooltipRect.ttWidth:c<0&&(c=0),!(r.w.config.tooltip.followCursor&&!r.getElGrid())&&(r.tooltip===null&&(r.tooltip=n.dom.baseEl.querySelector(".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)")),n.config.tooltip.shared||(n.globals.comboBarCount>0?r.tooltipPosition.moveXCrosshairs(l+f/2):r.tooltipPosition.moveXCrosshairs(l)),!r.fixedTooltip&&(!n.config.tooltip.shared||n.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(h=h+n.layout.translateY-r.tooltipRect.ttHeight/2,o))){let m=r.tooltipRect.ttWidth||0,b=r.tooltipRect.ttHeight||0,x=!!n.config.tooltip.arrow,{barAnchorXInGrid:_,barAnchorYInGrid:w,barRectInGrid:y}=g,v=(s=r.getElGrid())==null?void 0:s.getBoundingClientRect(),A=n.dom.elWrap.getBoundingClientRect(),S=v?v.left-A.left:n.layout.translateX,C,M=null,k=null,L=c+S,E=h;if(x&&n.globals.isBarHorizontal&&y!=null){let D=n.layout.translateY,P=n.layout.translateY+n.layout.gridHeight,F=S,R=S+n.layout.gridWidth,N=(y.left+y.right)/2+S,z=y.top+n.layout.translateY,$=y.bottom+n.layout.translateY,W=z-b-kt;if(C="top",W<D){let Y=$+kt;Y+b<=P&&(C="bottom",W=Y)}E=W,L=N-m/2,L<F&&(L=F),L+m>R&&(L=R-m),k=Math.max(10,Math.min(m-10,N-L))}else if(x&&_!=null&&w!=null){let D=_+S,P=S+n.layout.gridWidth/2,F=((i=y?.left)!=null?i:_)+S,R=((a=y?.right)!=null?a:_)+S;if(D<P?(C="right",L=R+kt):(C="left",L=F-m-kt),y){E=(y.top+y.bottom)/2+n.layout.translateY-b/2;let z=n.layout.translateY,$=n.layout.translateY+n.layout.gridHeight;E<z&&(E=z),E+b>$&&(E=$-b)}if(b>0&&y){let N=(y.top+y.bottom)/2+n.layout.translateY;M=Math.max(10,Math.min(b-10,N-E))}}r.tooltipPosition.applyTooltipPosition(o,{x:L,y:E,placement:C,arrowY:M,arrowX:k})}}getBarTooltipXY({e:t,opt:e}){let s=this.w,i=null,a=this.ttCtx,n=0,r=0,o=0,l=0,c=0,h=null,d=null,f=null,g=null,p=null,m=t.target.classList;if(m.contains("apexcharts-bar-area")||m.contains("apexcharts-candlestick-area")||m.contains("apexcharts-boxPlot-area")||m.contains("apexcharts-rangebar-area")){let b=t.target,x=b.getBoundingClientRect(),_=e.elGrid.getBoundingClientRect(),w=x.height;c=x.height;let y=x.width,v=parseInt(b.getAttribute("cx"),10),A=parseInt(b.getAttribute("cy"),10);h=v,d=A,l=parseFloat(b.getAttribute("barWidth"));let S=x.left-_.left,C=x.top-_.top,M=S+y/2,k=C+w/2;f=M,g=s.globals.isBarHorizontal?k:C,p={left:S,top:C,right:S+y,bottom:C+w};let L=t.type==="touchmove"?t.touches[0].clientX:t.clientX;i=parseInt(b.getAttribute("j"),10),n=parseInt(b.parentNode.getAttribute("rel"),10)-1;let E=b.getAttribute("data-range-y1"),D=b.getAttribute("data-range-y2");s.globals.comboCharts&&(n=parseInt(b.parentNode.getAttribute("data:realIndex"),10));let P=R=>(s.axisFlags.isXNumeric?R=v-y/2:this.isVerticalGroupedRangeBar?R=v+y/2:R=v-a.dataPointsDividedWidth+y/2,R),F=()=>A-a.dataPointsDividedHeight+w/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:n,j:i,y1:E?parseInt(E,10):null,y2:D?parseInt(D,10):null,shared:a.showOnIntersect?!1:s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(r=L-_.left+15,o=F()):(r=P(r),o=t.clientY-_.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(r=v,a.xyRatios&&r<a.xyRatios.baseLineInvertedY&&(r=v-a.tooltipRect.ttWidth),o=F()):(r=P(r),o=A)}return{x:r,y:o,barHeight:c,barWidth:l,i:n,j:i,barCx:h,barCy:d,barAnchorXInGrid:f,barAnchorYInGrid:g,barRectInGrid:p}}},Ni=class{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){let t=this.w,e=this.ttCtx,s=t.config.xaxis.position==="bottom";e.xaxisOffY=s?t.layout.gridHeight+1:-t.layout.xAxisHeight-t.config.xaxis.axisTicks.height+3;let i=s?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",a=t.dom.elWrap;e.isXAxisTooltipEnabled&&t.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(e.xaxisTooltip=O.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+t.config.tooltip.theme),a.appendChild(e.xaxisTooltip),e.xaxisTooltipText=O.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}drawYaxisTooltip(){let t=this.w,e=this.ttCtx;for(let s=0;s<t.config.yaxis.length;s++){let i=t.config.yaxis[s].opposite||t.config.yaxis[s].crosshairs.opposite;e.yaxisOffX=i?t.layout.gridWidth+1:1;let a=i?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,n=t.dom.elWrap;t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip.apexcharts-yaxistooltip-${s}`)===null&&(e.yaxisTooltip=O.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),n.appendChild(e.yaxisTooltip),s===0&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[s]=O.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[s]))}}setXCrosshairWidth(){var t,e;let s=this.w,i=this.ttCtx,a=i.getElXCrosshairs();if(i.xcrosshairsWidth=parseInt(s.config.xaxis.crosshairs.width,10),s.globals.comboCharts){let n=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(n!==null&&s.config.xaxis.crosshairs.width==="barWidth"){let r=parseFloat((e=n.getAttribute("barWidth"))!=null?e:"0");i.xcrosshairsWidth=r}else if(s.config.xaxis.crosshairs.width==="tickWidth"){let r=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/r}}else if(s.config.xaxis.crosshairs.width==="tickWidth"){let n=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/n}else if(s.config.xaxis.crosshairs.width==="barWidth"){let n=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(n!==null){let r=parseFloat((t=n.getAttribute("barWidth"))!=null?t:"0");i.xcrosshairsWidth=r}else i.xcrosshairsWidth=1}s.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),a!==null&&i.xcrosshairsWidth>0&&a.setAttribute("width",String(i.xcrosshairsWidth))}handleYCrosshair(){let t=this.w,e=this.ttCtx;e.ycrosshairs=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(t,e,s){let i=this.ttCtx,a=this.w,n=a.globals,r=n.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&r.length>0){let o=a.formatters.yLabelFormatters[t],l=i.getElGrid();if(!l)return;let c=l.getBoundingClientRect(),h=r[0],d=0;s.yRatio.length>1&&(d=h);let f=(e-c.top)*s.yRatio[d],g=n.maxYArr[h]-n.minYArr[h],p=n.minYArr[h]+(g-f);a.config.yaxis[t].reversed&&(p=n.maxYArr[h]-(g-f)),i.tooltipPosition.moveYCrosshairs(e-c.top),i.yaxisTooltipText[t].innerHTML=o(p),i.tooltipPosition.moveYAxisTooltip(t)}}},Xi=class{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new ps(this),this.tooltipLabels=new Ri(this),this.tooltipPosition=new ms(this),this.marker=new Fi(this),this.intersect=new Ii(this),this.axesTooltip=new Ni(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=null,this.e=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1,this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){let t=this.w,e=this.getElTooltip();e&&(this.updateDimensionCache(),typeof ResizeObserver<"u"&&!t.globals.resizeObserver&&(t.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),t.globals.resizeObserver.observe(e)))}updateDimensionCache(){let t=this.w,e=this.getElTooltip();if(!e)return;let s=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}getCachedDimensions(){let t=this.w;if(t.globals.dimensionCache.tooltip){let s=t.globals.dimensionCache.tooltip;if(Date.now()-s.lastUpdate<1e3)return{ttWidth:s.width,ttHeight:s.height}}this.updateDimensionCache();let e=t.globals.dimensionCache.tooltip;return e?{ttWidth:e.width,ttHeight:e.height}:{ttWidth:0,ttHeight:0}}getElTooltip(t){return t||(t=this),t.w.dom.baseEl?t.w.dom.baseEl.querySelector(".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)"):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}getElGrid(){return this.w.dom.baseEl.querySelector(".apexcharts-grid")}drawTooltip(t){let e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map(o=>!!(o.show&&o.tooltip.enabled&&e.globals.axisCharts)),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);let s=this.getElTooltip();s?.parentNode&&s.parentNode.removeChild(s),this.tooltipTitle=null;let i=O.createElementNS("http://www.w3.org/1999/xhtml","div");i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),this.tConfig.fillSeriesColor&&i.classList.add("apexcharts-tooltip-fill-series"),this.tConfig.style&&this.tConfig.style.background&&i.style.setProperty("--apx-tt-bg",this.tConfig.style.background);let a=this.tConfig.shared&&e.config.series.length>1&&!e.globals.isBarHorizontal&&e.config.chart.type!=="heatmap";if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!a&&!this.tConfig.fillSeriesColor&&e.globals.axisCharts){let o=O.createElementNS("http://www.w3.org/1999/xhtml","div");o.classList.add("apexcharts-tooltip-arrow"),i.appendChild(o)}if(e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&(i.setAttribute("role","tooltip"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),i.setAttribute("aria-hidden","true")),e.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();let o=new Wt(this.w,this.ctx,void 0);this.xAxisTicksPositions=o.getXAxisTicksPositions()}if((e.globals.comboCharts||this.tConfig.intersect||e.config.chart.type==="rangeBar")&&!this.tConfig.shared&&(this.showOnIntersect=!0),(e.config.markers.size===0||e.globals.markers.largestSize===0)&&this.marker.drawDynamicPoints(),e.globals.collapsedSeries.length===e.seriesData.series.length)return;this.dataPointsDividedHeight=e.layout.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.layout.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=O.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));let r=e.seriesData.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(this.showOnIntersect?r=1:r=e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){let e=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a<t;a++){let n=O.createElementNS("http://www.w3.org/1999/xhtml","div");n.classList.add("apexcharts-tooltip-series-group",`apexcharts-tooltip-series-group-${a}`),n.style.order=String(e.config.tooltip.inverseOrder?t-a:a+1);let r=O.createElementNS("http://www.w3.org/1999/xhtml","span");r.classList.add("apexcharts-tooltip-marker"),e.config.tooltip.fillSeriesColor?r.style.backgroundColor=e.globals.colors[a]:r.style.color=e.globals.colors[a];let o=e.config.markers.shape,l=o;Array.isArray(o)&&(l=o[a]),r.setAttribute("shape",l),r.innerHTML=gc(l),n.appendChild(r);let c=O.createElementNS("http://www.w3.org/1999/xhtml","div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,c.style.fontSize=this.tConfig.style.fontSize,["y","goals","z"].forEach(h=>{let d=O.createElementNS("http://www.w3.org/1999/xhtml","div");d.classList.add(`apexcharts-tooltip-${h}-group`);let f=O.createElementNS("http://www.w3.org/1999/xhtml","span");f.classList.add(`apexcharts-tooltip-text-${h}-label`),d.appendChild(f);let g=O.createElementNS("http://www.w3.org/1999/xhtml","span");g.classList.add(`apexcharts-tooltip-text-${h}-value`),d.appendChild(g),c.appendChild(d)}),n.appendChild(c),i.appendChild(n),s.push(n)}return s}addSVGEvents(){let t=this.w,e=t.config.chart.type,s=this.getElTooltip();if(!s)return;let i=e==="bar"||e==="candlestick"||e==="boxPlot"||e==="violin"||e==="rangeBar",a=e==="area"||e==="line"||e==="scatter"||e==="bubble"||e==="radar",n=a&&!t.globals.xyCharts,r=t.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());let l=[],c=[],h={hoverArea:r,elGrid:o,tooltipEl:s,tooltipY:l,tooltipX:c,ttItems:this.ttItems},d;if(t.globals.axisCharts&&(a?d=t.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?d=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area"):(e==="heatmap"||e==="treemap")&&(d=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),d&&d.length))for(let g=0;g<d.length;g++)l.push(d[g].getAttribute("cy")),c.push(d[g].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],h);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect||n)this.addDatapointEventsListeners(h);else if(e==="heatmap"&&t.globals.activeRenderer&&t.globals.activeRenderer.kind==="canvas")this.addPathsEventListeners([r],h);else if(!t.globals.axisCharts||e==="heatmap"||e==="treemap"){let g=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(g,h)}if(this.showOnIntersect){let g=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");g.length>0&&this.addPathsEventListeners(g,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}drawFixedTooltipRect(){let t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};let s=e.getBoundingClientRect(),i=s.width+10,a=s.height+10,n=this.tConfig.fixed.offsetX,r=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(n=n+t.globals.svgWidth-i+10),o.indexOf("bottom")>-1&&(r=r+t.globals.svgHeight-a-10),this.tooltipPosition.applyTooltipPosition(e,{x:n,y:r}),{x:n,y:r,ttWidth:i,ttHeight:a}}addDatapointEventsListeners(t){let s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(s,t)}addPathsEventListeners(t,e){let s=this;for(let i=0;i<t.length;i++){let a={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(r=>t[i].addEventListener(r,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){let i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-i))}seriesHover(t,e){if(this.w.globals.isDestroyed)return;this.lastHoverTime=Date.now();let s=[],i=this.w,a=n=>{var r,o,l;let c=(l=(o=(r=n?.w)==null?void 0:r.config)==null?void 0:o.chart)==null?void 0:l.link;return!!(c&&typeof c.dimension=="function")};i.config.chart.group&&!a(this.ctx)&&(s=this.ctx.getSyncedCharts().filter(n=>!a(n))),!(i.globals.axisCharts&&(i.globals.minX===-1/0&&i.globals.maxX===1/0||i.globals.dataPoints===0))&&(s.length?s.forEach(n=>{let r=this.getElTooltip(n),o={paths:t.paths,tooltipEl:r,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===this.w.globals.minX&&n.w.globals.maxX===this.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:o,e})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:s,e:i}){let a=t.w;if(!this.getElTooltip(t))return;let r=e.getCachedDimensions();e.tooltipRect={x:0,y:0,ttWidth:r.ttWidth,ttHeight:r.ttHeight},e.e=i,e.tooltipUtil.hasBars()&&!a.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new ct(t.w).toggleSeriesOnHover(i,i.target.parentNode),a.globals.axisCharts?e.axisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}):e.nonAxisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}),e.fixedTooltip&&e.drawFixedTooltipRect()}axisChartsTooltips({e:t,opt:e}){var s;let i=this.w,a,n;if(!e.elGrid)return;let r=e.elGrid.getBoundingClientRect(),o=t.type==="touchmove"?t.touches[0].clientX:t.clientX,l=t.type==="touchmove"?t.touches[0].clientY:t.clientY;if(this.clientY=l,this.clientX=o,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,l<r.top||l>r.top+r.height){this.handleMouseOut(e);return}if(i.dom.elWrap.querySelector(".apexcharts-annotation-tooltip.apexcharts-active")){this.handleMouseOut(e);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){let g=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(g)<0){this.handleMouseOut(e);return}}let c=this.getElTooltip();if(!c)return;let h=this.getElXCrosshairs(),d=[];i.config.chart.group&&(d=this.ctx.getSyncedCharts());let f=i.globals.xyCharts||i.config.chart.type==="bar"&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if(t.type==="mousemove"||t.type==="touchmove"||t.type==="mouseup"){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.seriesData.series.length)return;h!==null&&h.classList.add("apexcharts-active");let g=(s=this.yaxisTooltips)==null?void 0:s.filter(m=>m===!0),p=this.ycrosshairs;if(p!==null&&g?.length&&p.classList.add("apexcharts-active"),f&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(t,o,l,e);else if(i.config.chart.type==="heatmap"||i.config.chart.type==="treemap"){let m=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:n,type:i.config.chart.type});if(m.noHit){this.handleMouseOut(e);return}a=m.x,n=m.y,m.positioned||(c.style.left=a+"px",c.style.top=n+"px")}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:t,opt:e}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e:t,opt:e,x:a,y:n});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let m=0;m<i.config.yaxis.length;m++)this.axesTooltip.drawYaxisTooltipText(m,l,this.xyRatios);i.dom.baseEl.classList.add("apexcharts-tooltip-active"),e.tooltipEl.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&e.tooltipEl.removeAttribute("aria-hidden")}else(t.type==="mouseout"||t.type==="touchend")&&this.handleMouseOut(e)}getSliceAnchor(t){var e,s;let i=this.w,a=parseFloat((e=t?.getAttribute("data:cx"))!=null?e:""),n=parseFloat((s=t?.getAttribute("data:cy"))!=null?s:"");if(isNaN(a)||isNaN(n))return null;let r=i.dom.elWrap.getBoundingClientRect(),o=typeof t.getScreenCTM=="function"?t.getScreenCTM():null;if(!o){let l=i.dom.Paper.node.getBoundingClientRect();return{x:l.left-r.left+a,y:l.top-r.top+n}}return{x:o.a*a+o.c*n+o.e-r.left,y:o.b*a+o.d*n+o.f-r.top}}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:s}){var i,a,n,r;let o=this.w,l=e.paths.getAttribute("rel"),c=this.getElTooltip();if(!c)return;let h=o.dom.elWrap.getBoundingClientRect();if(t.type==="mousemove"||t.type==="touchmove"){if(o.dom.baseEl.classList.add("apexcharts-tooltip-active"),c.classList.add("apexcharts-active"),o.config.chart.accessibility.enabled&&o.config.chart.accessibility.announcements.enabled&&c.removeAttribute("aria-hidden"),o.config.chart.type==="unit"){let m=t.target&&typeof t.target.closest=="function"?t.target.closest(".apexcharts-unit-area"):null;if(!m)return;this.renderUnitTooltip(m)}else this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(l,10)-1,shared:!1});let d,f,g=e.paths.querySelector("path[data\\:cx]")||e.paths,p=o.config.tooltip.intersect?this.getSliceAnchor(g):null;if(p?(d=p.x-s.ttWidth/2,f=p.y-s.ttHeight-10):(d=((i=o.interact.clientX)!=null?i:0)-h.left-s.ttWidth/2,f=((a=o.interact.clientY)!=null?a:0)-h.top-s.ttHeight-10),c.style.left=d+"px",c.style.top=f+"px",o.config.legend.tooltipHoverFormatter){let m=o.config.legend.tooltipHoverFormatter,b=l-1,x=(n=this.legendLabels)==null?void 0:n[b];if(!x)return;let _=x.getAttribute("data:default-text"),w=m(_,{seriesIndex:b,dataPointIndex:b,w:o});x.innerHTML=w}}else(t.type==="mouseout"||t.type==="touchend")&&(c.classList.remove("apexcharts-active"),o.dom.baseEl.classList.remove("apexcharts-tooltip-active"),o.config.legend.tooltipHoverFormatter&&((r=this.legendLabels)==null||r.forEach(d=>{let f=d.getAttribute("data:default-text");d.innerHTML=decodeURIComponent(f??"")})))}renderUnitTooltip(t){var e,s,i,a,n;let r=this.w,o=this.getElTooltip();if(!o)return;let l=parseInt(t.getAttribute("i")||"0",10),c=parseInt(t.getAttribute("j")||"0",10);if(typeof r.config.tooltip.custom=="function"){this.tooltipLabels.handleCustomTooltip({i:l,j:c,y1:null,y2:null,w:r});return}let h=r.seriesData.seriesNames[l]||`series-${l+1}`,d=Math.round(Number(r.seriesData.series[l])||0),f=t.parentNode,g=f&&f.querySelectorAll?f.querySelectorAll(".apexcharts-unit-area").length:d,p=r.config.plotOptions.unit||{},m=p.unitValue>0?p.unitValue:1,b=r.seriesData.unitData&&r.seriesData.unitData[l],x=b?b[c]:void 0,_=x&&typeof x=="object"?x:null,w=_&&_.fillColor||r.globals.colors&&r.globals.colors[l]||"#008FFB",y,v=p.tooltip&&p.tooltip.formatter;if(typeof v=="function")y=v({seriesName:h,seriesIndex:l,dataPointIndex:c,count:g,value:d,unitValue:m,datum:x,color:w,w:r});else if(x!=null){let k=_&&(i=(s=(e=_.name)!=null?e:_.label)!=null?s:_.x)!=null?i:null,L=_?(n=(a=_.value)!=null?a:_.y)!=null?n:null:x;y=k!=null&&L!=null?`${k}: ${L}`:k!=null?String(k):L!=null?String(L):`#${(c+1).toLocaleString()} of ${g.toLocaleString()}`}else y=`#${(c+1).toLocaleString()} of ${g.toLocaleString()}`,m!==1&&(y+=` · ${m.toLocaleString()} per dot`);let A=r.config.chart.fontFamily||"inherit",S=r.config.tooltip.style&&r.config.tooltip.style.fontSize||"12px",C=o.querySelector(".apexcharts-tooltip-arrow");o.innerHTML=`<div class="apexcharts-tooltip-title" style="font-family: ${A}; font-size: ${S};">${h}</div><div class="apexcharts-tooltip-series-group apexcharts-active" style="display: flex;"><span class="apexcharts-tooltip-marker" style="background-color: ${w};"></span><div class="apexcharts-tooltip-text" style="font-family: ${A}; font-size: ${S};"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-value">${y}</span></div></div></div>`,C&&o.appendChild(C);let M=o.getBoundingClientRect();this.tooltipRect.ttWidth=M.width,this.tooltipRect.ttHeight=M.height}handleStickyTooltip(t,e,s,i){let a=this.w,n=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),r=n.j,o=n.capturedSeries;o!==null&&a.globals.collapsedSeriesIndices.includes(o??-1)&&(o=null);let l=a.globals.barPadForNumericAxis||0;if(n.hoverX<-l||n.hoverX>a.layout.gridWidth+l){this.handleMouseOut(i);return}if(o!==null)this.handleStickyCapturedSeries(t,o??-1,i,r??0);else if(this.tooltipUtil.isXoverlap(r??0)||a.globals.isBarHorizontal){let c=a.seriesData.series.findIndex((h,d)=>!a.globals.collapsedSeriesIndices.includes(d));this.create(t,this,c,r??0,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){let a=this.w;if(!this.tConfig.shared&&a.seriesData.series[e][i]===null){this.handleMouseOut(s);return}if(typeof a.seriesData.series[e][i]<"u")this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,s.ttItems):this.create(t,this,e,i,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){let n=a.seriesData.series.findIndex((r,o)=>!a.globals.collapsedSeriesIndices.includes(o));this.create(t,this,n,i,s.ttItems)}}deactivateHoverFilter(){let t=this.w,e=new B(this.w,this.ctx),s=t.dom.Paper.find(".apexcharts-bar-area");for(let i=0;i<s.length;i++)e.pathMouseLeave(s[i],void 0)}handleMouseOut(t){var e,s;let i=this.w,a=this.getElXCrosshairs();i.dom.baseEl.classList.remove("apexcharts-tooltip-active"),t.tooltipEl.classList.remove("apexcharts-active"),delete t.tooltipEl.dataset.positioned,i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&t.tooltipEl.setAttribute("aria-hidden","true"),this.deactivateHoverFilter(),i.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),a!==null&&a.classList.remove("apexcharts-active");let n=this.ycrosshairs;if(n!==null&&n.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&((e=this.xaxisTooltip)==null||e.classList.remove("apexcharts-active")),this.yaxisTooltips&&this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);for(let r=0;r<this.yaxisTTEls.length;r++)this.yaxisTTEls[r].classList.remove("apexcharts-active")}i.config.legend.tooltipHoverFormatter&&((s=this.legendLabels)==null||s.forEach(r=>{let o=r.getAttribute("data:default-text");r.innerHTML=decodeURIComponent(o??"")}))}markerClick(t,e,s){let i=this.w;typeof i.config.chart.events.markerClick=="function"&&i.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}])}_hasCustomSeries(){let t=this.w;return Yt(t.config.chart.type)?!0:(t.config.series||[]).some(s=>s&&s.type&&Yt(s.type))}create(t,e,s,i,a,n=null){var r,o,l,c,h,d,f,g,p,m,b,x,_,w,y,v,A,S,C,M,k;let L=this.w,E=e;t.type==="mouseup"&&this.markerClick(t,s,i),n===null&&(n=this.tConfig.shared);let D=this.tooltipUtil.hasMarkers(s),P=((o=(r=this.ctx)==null?void 0:r.renderer)==null?void 0:o.kind)==="canvas",F=P&&!this.tooltipUtil.hasBars(),R=!P&&!D&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),N=F||R,z=this.tooltipUtil.getElBars(),$=()=>{L.globals.markers.largestSize>0&&!P?E.marker.enlargePoints(i):E.tooltipPosition.moveDynamicPointsOnHover(i)};if(L.config.legend.tooltipHoverFormatter){let I=L.config.legend.tooltipHoverFormatter,U=Array.from((l=this.legendLabels)!=null?l:[]);U.forEach(X=>{let V=X.getAttribute("data:default-text");X.innerHTML=decodeURIComponent(V??"")});for(let X=0;X<U.length;X++){let V=U[X],q=parseInt((c=V.getAttribute("i"))!=null?c:"",10),Z=decodeURIComponent((h=V.getAttribute("data:default-text"))!=null?h:""),K=I(Z,{seriesIndex:n?q:s,dataPointIndex:i,w:L});if(n)V.innerHTML=L.globals.collapsedSeriesIndices.indexOf(q)<0?K:Z;else if(V.innerHTML=q===s?K:Z,s===q)break}}let W=L.rangeData,Y=G(G({ttItems:a,i:s,j:i},((p=(g=(f=(d=W.seriesRange)==null?void 0:d[s])==null?void 0:f[i])==null?void 0:g.y[0])==null?void 0:p.y1)!==void 0&&{y1:(_=(x=(b=(m=W.seriesRange)==null?void 0:m[s])==null?void 0:b[i])==null?void 0:x.y[0])==null?void 0:_.y1}),((A=(v=(y=(w=W.seriesRange)==null?void 0:w[s])==null?void 0:y[i])==null?void 0:v.y[0])==null?void 0:A.y2)!==void 0&&{y2:(k=(M=(C=(S=W.seriesRange)==null?void 0:S[s])==null?void 0:C[i])==null?void 0:M.y[0])==null?void 0:k.y2});if(n){if(E.tooltipLabels.drawSeriesTexts(j(G({},Y),{shared:this.showOnIntersect?!1:this.tConfig.shared})),D||N)$();else if(this.tooltipUtil.hasBars()&&(P&&E.tooltipPosition.moveStickyTooltipOverBars(i,s),this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...z]),this.barSeriesHeight>0)){let I=new B(this.w,this.ctx),U=L.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter(),E.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&$(),E.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let V=0;V<U.length;V++)I.pathMouseEnter(U[V],void 0)}}else E.tooltipLabels.drawSeriesTexts(G({shared:!1},Y)),this.tooltipUtil.hasBars()&&E.tooltipPosition.moveStickyTooltipOverBars(i,s),D?E.tooltipPosition.moveMarkers(s,i):N&&E.tooltipPosition.moveDynamicPointOnHover(i,s)}},Oi=class{constructor(t,e){this.w=t,this.ctx=e,this.kind="svg"}beginSeries(){}present(){return null}clear(){}group(t){return this.ctx.graphics.group(t)}drawPath(t){return this.ctx.graphics.drawPath(t)}drawLine(...t){return this.ctx.graphics.drawLine(...t)}drawRect(...t){return this.ctx.graphics.drawRect(...t)}drawCircle(t,e){return this.ctx.graphics.drawCircle(t,e)}drawText(t){return this.ctx.graphics.drawText(t)}renderPaths(t){return this.ctx.graphics.renderPaths(t)}drawMarker(t,e,s={}){return this.ctx.graphics.drawMarker(t,e,s)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}},js="__apexcharts_renderers__";function Qe(){let u=globalThis;return u[js]||(u[js]=new Map),u[js]}var xs=class{static get _rendererRegistry(){return Qe()}static registerRenderer(t,e){Qe().set(t,e)}static unregisterRenderer(t){Qe().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new Oi(t,e),this.active=this.svg,this._activeKind="svg",this._instances={}}_desiredKind(){let t=this.w.config.chart,e=t.renderer||"svg";if(!H.isBrowser()||e==="svg"||wn(this.w))return"svg";if(e==="canvas")return"canvas";let s=vl(this.w),i=t.rendererThreshold||8e3;return s>=i?"canvas":"svg"}resolve(){let t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if(e!=="svg"){let s=Qe().get(e);if(s)return this._instances[e]||(this._instances[e]=s(this.w,this.ctx)),this.active=this._instances[e],this._activeKind=e,this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind;t===e&&console.warn(`[apexcharts] renderer:"${e}" requested but that renderer is not bundled (import 'apexcharts/features/renderer-${e}'); falling back to SVG.`)}else t==="canvas"&&wn(this.w)&&console.warn('[apexcharts] renderer:"canvas" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill or a state color-matrix filter); falling back to SVG.');return this.active=this.svg,this._activeKind="svg",this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}getActiveKind(){return this._activeKind}teardown(){for(let t in this._instances){let e=this._instances[t];e&&typeof e.destroy=="function"&&e.destroy()}this._instances={},this.active=this.svg,this._activeKind="svg"}},ft=class u{constructor(t){this.node=t,t&&(t.instance=this),this._listeners=[],this._filter=null}attr(t,e){if(typeof t=="string"&&e===void 0)return this.node.getAttribute(t);let s=typeof t=="string"?{[t]:e}:t;for(let i in s){let a=s[i];a===null?this.node.removeAttribute(i):a!==void 0&&(typeof a=="number"&&isNaN(a)&&(a=0),this.node.setAttribute(i,a))}if(this.node.nodeName==="text"&&s.x!=null){let i=this.node.querySelectorAll("tspan[data-newline]");for(let a=0;a<i.length;a++)i[a].setAttribute("x",s.x)}return this}css(t){for(let e in t)this.node.style[e]=t[e];return this}fill(t){return typeof t=="object"?this.attr(t):this.attr("fill",t)}stroke(t){return typeof t=="object"?(t.color!==void 0&&this.attr("stroke",t.color),t.width!==void 0&&this.attr("stroke-width",t.width),t.dasharray!==void 0&&this.attr("stroke-dasharray",t.dasharray),t.linecap!==void 0&&this.attr("stroke-linecap",t.linecap),t.opacity!==void 0&&this.attr("stroke-opacity",t.opacity),this):this.attr("stroke",t)}size(t,e){return this.attr({width:t,height:e})}move(t,e){return this.attr({x:t,y:e})}center(t,e){if(this.node.nodeName==="g"){let s=this.bbox(),i=t-(s.x+s.width/2),a=e-(s.y+s.height/2);return this.attr("transform",`translate(${i}, ${a})`)}return this.attr({cx:t,cy:e})}add(t){return t&&t.__isCanvasMark?this:(this.node.appendChild(t.node||t),this)}addTo(t){return(t.node||t).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(t){return Array.from(this.node.querySelectorAll(t)).map(e=>e.instance||new u(e))}findOne(t){let e=this.node.querySelector(t);return e?e.instance||new u(e):null}on(t,e){let s=t.split(".")[0];return this._listeners.push({event:t,eventType:s,handler:e}),this.node.addEventListener(s,e),this}off(t,e){if(!t&&!e)this._listeners.forEach(s=>{this.node.removeEventListener(s.eventType,s.handler)}),this._listeners=[];else if(t&&!e){let s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType===s?(this.node.removeEventListener(i.eventType,i.handler),!1):!0)}else{let s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType===s&&i.handler===e?(this.node.removeEventListener(i.eventType,i.handler),!1):!0)}return this}each(t,e){return Array.from(this.node.children).forEach(i=>{let a=i.instance||new u(i);t.call(a),e&&a.each(t,e)}),this}removeClass(t){return t==="*"?this.node.removeAttribute("class"):this.node.classList.remove(t),this}children(){return Array.from(this.node.childNodes).filter(t=>t.nodeType===1).map(t=>t.instance||new u(t))}hide(){return this.node.style.display="none",this}show(){return this.node.style.display="",this}bbox(){if(typeof this.node.getBBox=="function")try{return this.node.getBBox()}catch{}return{x:0,y:0,width:0,height:0}}tspan(t){let e=O.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new u(e)}plot(t){return typeof t=="string"&&this.attr("d",t),this}animate(){throw new Error("Animation module not loaded")}filterWith(){throw new Error("Filter module not loaded")}},pc=0,Bi=class extends ft{constructor(t,e,s){let i=e==="radial"?"radialGradient":"linearGradient",a=O.createElementNS(et,i);super(a),this._id="SvgjsGradient"+ ++pc,this.attr("id",this._id),typeof s=="function"&&s(new Yi(this));let n=t.node.querySelector("defs");n||(n=O.createElementNS(et,"defs"),t.node.appendChild(n)),n.appendChild(this.node)}stop(t,e,s){let i=O.createElementNS(et,"stop");return i.setAttribute("offset",t),i.setAttribute("stop-color",e),s!==void 0&&i.setAttribute("stop-opacity",String(s)),this.node.appendChild(i),this}from(t,e){return this.attr({x1:t,y1:e})}to(t,e){return this.attr({x2:t,y2:e})}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},Yi=class{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}},mc=0,zi=class extends ft{constructor(t,e,s,i){let a=O.createElementNS(et,"pattern");if(super(a),this._id="SvgjsPattern"+ ++mc,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),typeof i=="function"){let r=new ze(this.node);i(r)}let n=t.node.querySelector("defs");n||(n=O.createElementNS(et,"defs"),t.node.appendChild(n)),n.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},ze=class u extends ft{line(t,e,s,i){let a=this._make("line");return t!==void 0&&a.attr({x1:t,y1:e,x2:s,y2:i}),a}rect(t,e){let s=this._make("rect");return t!==void 0&&s.attr({width:t,height:e}),s}circle(t){let e=this._make("circle");return t!==void 0&&e.attr({r:t/2,cx:t/2,cy:t/2}),e}path(t){let e=this._make("path");return t&&e.attr("d",t),e}polygon(t){let e=this._make("polygon");return t&&e.attr("points",t),e}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(t){let e=O.createElementNS(et,"text");e.textContent=t;let s=new ft(e);return this.node.appendChild(e),s}text(t){let e=O.createElementNS(et,"text"),s=new ft(e);return this.node.appendChild(e),typeof t=="function"&&t(new Wi(e)),s}image(t,e){let s=O.createElementNS(et,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);let i=new ft(s);if(this.node.appendChild(s),typeof e=="function"&&H.isBrowser()){let a=new Image;a.onload=function(){i.size(a.width,a.height),e.call(i,{width:a.width,height:a.height})},a.src=t}return i}gradient(t,e){return new Bi(this,t,e)}pattern(t,e,s){return new zi(this,t,e,s)}_make(t){let e=O.createElementNS(et,t);return this.node.appendChild(e),new ft(e)}_makeContainer(t){let e=O.createElementNS(et,t);return this.node.appendChild(e),new u(e)}},Wi=class{constructor(t){this.textNode=t}tspan(t){let e=O.createElementNS(et,"tspan");return e.textContent=t,this.textNode.appendChild(e),new Hi(e,this.textNode)}},Hi=class{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}},xc=0,$i=class extends ft{constructor(){let t=O.createElementNS(et,"filter");super(t),this._id="SvgjsFilter"+ ++xc,this.attr("id",this._id)}},Gi=class{constructor(t){this.filter=t}colorMatrix(t){return this._primitive("feColorMatrix",t)}offset(t){return this._primitive("feOffset",t)}gaussianBlur(t){return this._primitive("feGaussianBlur",t)}flood(t){return this._primitive("feFlood",t)}composite(t){return this._primitive("feComposite",t)}merge(t){let e=O.createElementNS(et,"feMerge");return t.forEach(s=>{let i=O.createElementNS(et,"feMergeNode");i.setAttribute("in",s),e.appendChild(i)}),this.filter.node.appendChild(e),new ft(e)}_primitive(t,e){let s=O.createElementNS(et,t);for(let i in e)s.setAttribute(i,e[i]);return this.filter.node.appendChild(s),new ft(s)}};function bc(u){u.prototype.filterWith=function(t){let e=new $i;this._filter=e;let s=this.node;for(;s&&s.nodeName!=="svg";)s=s.parentNode;if(s){let i=s.querySelector("defs");i||(i=O.createElementNS(et,"defs"),s.insertBefore(i,s.firstChild)),i.appendChild(e.node)}return t(new Gi(e)),this.attr("filter","url(#"+e._id+")"),this},u.prototype.unfilter=function(t){return this._filter&&(this.node.removeAttribute("filter"),t&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this},u.prototype.filterer=function(){return this._filter}}function yc(u){u.prototype.draggable=function(t){if(t===!1)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;let e=this,s=t||{},i=a=>{if(a.button&&a.button!==0)return;a.stopPropagation();let r=a.type==="touchstart"?a.touches[0]:a,o=e.node,l=parseFloat(o.getAttribute("x"))||0,c=parseFloat(o.getAttribute("y"))||0,h=r.clientX,d=r.clientY,f=o.ownerSVGElement,g=null;f&&(g=f.getScreenCTM());let p=b=>{let x=b.type==="touchmove"?b.touches[0]:b,_=x.clientX-h,w=x.clientY-d;g&&(_=_/g.a,w=w/g.d);let y=l+_,v=c+w,A=parseFloat(o.getAttribute("width"))||0,S=parseFloat(o.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+A>s.maxX&&(y=s.maxX-A),s.maxY!==void 0&&v+S>s.maxY&&(v=s.maxY-S);let C={x:y,y:v,w:A,h:S,x2:y+A,y2:v+S},M=new CustomEvent("dragmove",{detail:{handler:{move:function(k,L){o.setAttribute("x",k),o.setAttribute("y",L)}},box:C}});o.dispatchEvent(M)},m=()=>{H.isBrowser()&&(document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p),document.removeEventListener("mouseup",m),document.removeEventListener("touchend",m)),e._activeDrag=null};H.isBrowser()&&(document.addEventListener("mousemove",p),document.addEventListener("touchmove",p),document.addEventListener("mouseup",m),document.addEventListener("touchend",m),e._activeDrag={onMove:p,onUp:m})};return e.node.addEventListener("mousedown",i),e.node.addEventListener("touchstart",i),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",i),e.node.removeEventListener("touchstart",i),e._activeDrag&&H.isBrowser()&&(document.removeEventListener("mousemove",e._activeDrag.onMove),document.removeEventListener("touchmove",e._activeDrag.onMove),document.removeEventListener("mouseup",e._activeDrag.onUp),document.removeEventListener("touchend",e._activeDrag.onUp),e._activeDrag=null)},e}}function wc(u){u.prototype.select=function(t){if(t===!1)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;let e=this,{createHandle:s,updateHandle:i}=t,a=document.createElementNS(et,"g");a.setAttribute("class","svg_select_points");let n=e.node.parentNode;n&&n.appendChild(a);let r={},o=["t","b","l","r","lt","rt","lb","rb"];o.forEach((c,h)=>{let d=new ze(document.createElementNS(et,"g"));a.appendChild(d.node);let f=s(d,[0,0],h,[],c);r[c]={group:d,handle:f}});let l=()=>{let c=parseFloat(e.attr("x"))||0,h=parseFloat(e.attr("y"))||0,d=parseFloat(e.attr("width"))||0,f=parseFloat(e.attr("height"))||0,g=e.node.getAttribute("transform");g?a.setAttribute("transform",g):a.removeAttribute("transform");let p={t:[c+d/2,h],b:[c+d/2,h+f],l:[c,h+f/2],r:[c+d,h+f/2],lt:[c,h],rt:[c+d,h],lb:[c,h+f],rb:[c+d,h+f]};o.forEach(m=>{r[m]&&p[m]&&i(r[m].group,p[m])})};return l(),e._selectHandles=a,e._selectHandlesMap=r,e._updateSelectPositions=l,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},u.prototype.resize=function(t){if(t===!1)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;let e=this,s=e._selectHandlesMap;if(!s)return e;let i=[],a=n=>{let r=s[n];if(!r||!r.group||!r.group.node)return;let o=r.group.node,l=c=>{if(c.button&&c.button!==0)return;c.stopPropagation();let f=(c.type==="touchstart"?c.touches[0]:c).clientX,g=e.node.ownerSVGElement,p=null;g&&(p=g.getScreenCTM());let m=parseFloat(e.attr("x"))||0,b=parseFloat(e.attr("width"))||0,x=w=>{let v=(w.type==="touchmove"?w.touches[0]:w).clientX-f;p&&(v=v/p.a);let A=m,S=b;n==="l"?(A=m+v,S=b-v):n==="r"&&(S=b+v),S<0&&(S=0),e.attr({x:A,width:S}),e._updateSelectPositions&&e._updateSelectPositions();let C=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(C)},_=()=>{H.isBrowser()&&(document.removeEventListener("mousemove",x),document.removeEventListener("touchmove",x),document.removeEventListener("mouseup",_),document.removeEventListener("touchend",_));let w=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(w)};H.isBrowser()&&(document.addEventListener("mousemove",x),document.addEventListener("touchmove",x),document.addEventListener("mouseup",_),document.addEventListener("touchend",_))};o.addEventListener("mousedown",l),o.addEventListener("touchstart",l),i.push(()=>{o.removeEventListener("mousedown",l),o.removeEventListener("touchstart",l)})};return a("l"),a("r"),e._resizeCleanup=()=>{i.forEach(n=>n())},e}}bc(ft);pl(ft);yc(ft);wc(ft);function bs(){let u=O.createElementNS(et,"svg"),t=new ze(u);return t.attr({xmlns:et}),t}bs.xlink="http://www.w3.org/1999/xlink";H.isBrowser()&&typeof window.SVG>"u"&&(window.SVG=bs);H.isBrowser()?(typeof window.SVG>"u"&&(window.SVG=bs),typeof window.Apex>"u"&&(window.Apex={})):typeof global<"u"&&(typeof global.Apex>"u"&&(global.Apex={}),typeof global.SVG>"u"&&(global.SVG=bs));var Vr=class Vi{static registerFeatures(t){for(let[e,s]of Object.entries(t))Vi._featureRegistry.set(e,s)}constructor(t){this.ctx=t,this.w=t.w}initModules(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","drillDown","drillUp","drillToRoot","clearDrilldownCache","paper","getActiveRenderer","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new St(this.w,this.ctx),this.ctx.axes=new yi(this.w,this.ctx),this.ctx.core=new Ei(this.ctx.el,this.w,this.ctx),this.ctx.config=new se({}),this.ctx.data=new Ye(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new Xe(this.w,this.ctx),this.ctx.graphics=new B(this.w,this.ctx),this.ctx.coreUtils=new lt(this.w),this.ctx.crosshairs=new Be(this.w),this.ctx.events=new xi(this.w,this.ctx),this.ctx.fill=new pt(this.w),this.ctx.localization=new bi(this.w),this.ctx.options=new wt,this.ctx.responsive=new wi(this.w),this.ctx.series=new ct(this.w,{toggleDataSeries:(...e)=>{var s;return(s=this.ctx.legend)==null?void 0:s.legendHelpers.toggleDataSeries(...e)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...e)=>this.ctx.updateHelpers._updateSeries(...e)}),this.ctx.theme=new _i(this.w),this.ctx.formatters=new ee(this.w),this.ctx.titleSubtitle=new Ai(this.w),this.ctx.dimensions=new ye(this.w,this.ctx),this.ctx.updateHelpers=new Pi(this.w,this.ctx),this.ctx.rendererController=new xs(this.w,this.ctx),this.ctx.renderer=this.ctx.rendererController.active;let t=new Xi(this.w,this.ctx);this.w.globals.tooltip=t,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){let t=Vi._featureRegistry,e=this.w,s=this.ctx,i=t.get("exports");s.exports=i?new i(e,s):null;let a=t.get("legend");s.legend=a?new a(e,s):null;let n=t.get("morphTypeChange");s.morphTypeChange=n?new n(e,s):null;let r=t.get("drilldown");s.drilldown=r?new r(e,s):null;let o=t.get("perspectives");s.perspectives=o?new o(e,s):null;let l=t.get("storyboard");s.storyboard=l?new l(e,s):null;let c=t.get("history");s.history=c?new c(e,s):null;let h=t.get("linkedViews");s.linkedViews=h?new h(e,s):null;let d=t.get("ink");s.ink=d?new d(e,s):null;let f=t.get("measure");s.measure=f?new f(e,s):null;let g=t.get("contextMenu");s.contextMenu=g?new g(e,s):null;let p=t.get("weave");s.weave=p?new p(e,s):null;let m=t.get("osThemeWatcher");s.osThemeWatcher=m?new m(e,s):null;let b=t.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var w;return!this._toolbar&&b&&(this._toolbar=new b(e,this)),(w=this._toolbar)!=null?w:null},configurable:!0});let x=t.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var w;return!this._zoomPanSelection&&x&&(this._zoomPanSelection=new x(e,this)),(w=this._zoomPanSelection)!=null?w:null},configurable:!0});let _=t.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var w;return!this._keyboardNavigation&&_&&(this._keyboardNavigation=new _(e,this)),(w=this._keyboardNavigation)!=null?w:null},configurable:!0})}};J(Vr,"_featureRegistry",new Map);var ts=Vr,ys=class{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){var e,s,i,a,n,r,o,l,c,h,d,f;(e=this.ctx.weave)==null||e.teardown(t),t||(this.w.globals.isDestroyed=!0),this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&typeof this.w.globals.resizeObserver.disconnect=="function"&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),Ne.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,(s=this.ctx._keyboardNavigation)==null||s.destroy(),this.ctx._keyboardNavigation=null):((i=this.ctx.perspectives)==null||i.teardown(),this.ctx.perspectives=null,(a=this.ctx.storyboard)==null||a.teardown(),this.ctx.storyboard=null,(n=this.ctx.history)==null||n.teardown(),this.ctx.history=null,(r=this.ctx.linkedViews)==null||r.teardown(),this.ctx.linkedViews=null,(o=this.ctx.ink)==null||o.teardown(),this.ctx.ink=null,(l=this.ctx.measure)==null||l.teardown(),this.ctx.measure=null,(c=this.ctx.contextMenu)==null||c.teardown(),this.ctx.contextMenu=null,(h=this.ctx.osThemeWatcher)==null||h.teardown(),this.ctx.osThemeWatcher=null,this.ctx.weave=null,(f=(d=this.ctx.rendererController)==null?void 0:d.teardown)==null||f.call(d),this.ctx.rendererController=null,this.ctx.renderer=null,this.ctx.drilldown=null,this.ctx.morphTypeChange=null,this.ctx.exports=null,this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx._zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx._toolbar=null,this.ctx.localization=null,this.ctx._keyboardNavigation=null,this.ctx.w.globals.tooltip=null),this.clearDomElements({isUpdating:t})}killSVG(t){t.each(function(){this.removeClass("*"),this.off()},!0),t.clear()}clearDomElements({isUpdating:t}){let e=this.w.dom;if(H.isBrowser()&&e.Paper){let s=e.Paper.node;s.parentNode&&s.parentNode.parentNode&&!t&&(s.parentNode.parentNode.style.minHeight="unset");let i=e.baseEl;if(i&&this.ctx.eventList.forEach(a=>{i.removeEventListener(a,this.ctx.events.documentEvent)}),this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(e.Paper),e.Paper.remove()}e.Paper=null,e.elWrap=null,e.elGraphical=null,e.elLegendWrap=null,e.elLegendForeign=null,e.baseEl=null,e.elGridRect=null,e.elGridRectMask=null,e.elGridRectBarMask=null,e.elGridRectMarkerMask=null,e.elForecastMask=null,e.elNonForecastMask=null,e.elDefs=null}},Ui="__apexcharts_unit_layouts__";globalThis[Ui]||(globalThis[Ui]={});function Va(){return globalThis[Ui]}function vc(u,t){if(!u||typeof u!="string"){console.warn("ApexCharts: registerUnitLayout requires a non-empty name.");return}if(typeof t!="function"){console.warn(`ApexCharts: registerUnitLayout("${u}") expects a function (objects, rect) => [{id, x, y}].`);return}Va()[u]=t}function _c(u){return u&&Va()[u]||null}function Ac(u){delete Va()[u]}var qi="__apexcharts_row_sources__";globalThis[qi]||(globalThis[qi]={});function Ua(){return globalThis[qi]}function Es(u,t){if(!u||typeof u!="string"){console.warn("ApexCharts: registerRowSource requires a non-empty name.");return}if(typeof t!="function"){console.warn(`ApexCharts: registerRowSource("${u}") expects a function (w, opts) => series.`);return}Ua()[u]=t}function Xn(u){return u&&Ua()[u]||null}function Sc(u){delete Ua()[u]}function Cc(u){let t=u&&u.config&&u.config.chart;return t?Xn(t.requestedType)||Xn(t.type):null}var Zs="__apexcharts_plugins__";function qa(){let u=globalThis;return u[Zs]||(u[Zs]={}),u[Zs]}function kc(u){if(!u||typeof u.name!="string"||typeof u.setup!="function"){console.error("[apexcharts] registerPlugin: a plugin needs a { name, setup } shape.");return}qa()[u.name]=u}function Mc(u){return qa()[u]||null}function Lc(u){delete qa()[u]}var ji=new WeakMap;function Dc(u,t){if(H.isSSR())return;let e=!1;if(u.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){let i=u.getBoundingClientRect();(u.style.display==="none"||i.width===0)&&(e=!0)}let s=new ResizeObserver(i=>{e&&t.call(u,i),e=!0});u.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(u.children).forEach(i=>s.observe(i)):s.observe(u),ji.set(t,s)}function Ec(u,t){if(H.isSSR())return;let e=ji.get(t);e&&(e.disconnect(),ji.delete(t))}var Tc=`@keyframes opaque {
|
|
0% {
|
|
opacity: 0
|
|
}
|
|
|
|
to {
|
|
opacity: 1
|
|
}
|
|
}
|
|
|
|
@keyframes resizeanim {
|
|
|
|
0%,
|
|
to {
|
|
opacity: 0
|
|
}
|
|
}
|
|
|
|
.apexcharts-canvas {
|
|
position: relative;
|
|
direction: ltr !important;
|
|
user-select: none;
|
|
/* Focus indicator colour. Themes override below. */
|
|
--apexcharts-focus-color: #008FFB;
|
|
}
|
|
|
|
/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */
|
|
.apexcharts-canvas .apexcharts-theme-dark,
|
|
.apexcharts-theme-dark.apexcharts-canvas {
|
|
--apexcharts-focus-color: #FFD500;
|
|
}
|
|
.apexcharts-canvas.apexcharts-high-contrast,
|
|
.apexcharts-high-contrast.apexcharts-canvas {
|
|
--apexcharts-focus-color: #FFFF00;
|
|
}
|
|
|
|
/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */
|
|
.apexcharts-sr-status {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border: 0;
|
|
}
|
|
|
|
/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.apexcharts-canvas *,
|
|
.apexcharts-canvas *::before,
|
|
.apexcharts-canvas *::after {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
}
|
|
|
|
.apexcharts-canvas ::-webkit-scrollbar {
|
|
-webkit-appearance: none;
|
|
width: 6px
|
|
}
|
|
|
|
.apexcharts-canvas ::-webkit-scrollbar-thumb {
|
|
border-radius: 4px;
|
|
background-color: rgba(0, 0, 0, .5);
|
|
box-shadow: 0 0 1px rgba(255, 255, 255, .5);
|
|
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
|
|
}
|
|
|
|
.apexcharts-inner {
|
|
position: relative
|
|
}
|
|
|
|
.apexcharts-text tspan {
|
|
font-family: inherit
|
|
}
|
|
|
|
rect.legend-mouseover-inactive,
|
|
.legend-mouseover-inactive rect,
|
|
.legend-mouseover-inactive path,
|
|
.legend-mouseover-inactive circle,
|
|
.legend-mouseover-inactive line,
|
|
.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
|
|
.legend-mouseover-inactive text.apexcharts-yaxis-label {
|
|
transition: .15s ease all;
|
|
opacity: .2
|
|
}
|
|
|
|
/* Linked Views (#4): per-mark crossfilter dim. Applied to individual data
|
|
marks (not whole series) whose x is outside the brushed range. Opacity is
|
|
overridable per chart via the --apx-cf-dim custom property. */
|
|
.apexcharts-crossfilter-dimmed {
|
|
transition: opacity .25s ease;
|
|
opacity: var(--apx-cf-dim, .2)
|
|
}
|
|
|
|
/* Linked Views (#4): default styling for the built-in crossfilter data table
|
|
(cf.dataTable). Deliberately light so host styles can override. */
|
|
.apexcharts-cf-table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
font-size: 13px;
|
|
}
|
|
.apexcharts-cf-table caption {
|
|
caption-side: bottom;
|
|
text-align: right;
|
|
padding: 6px 2px;
|
|
font-size: 12px;
|
|
opacity: .7
|
|
}
|
|
.apexcharts-cf-table th,
|
|
.apexcharts-cf-table td {
|
|
padding: 6px 10px;
|
|
text-align: left;
|
|
border-bottom: 1px solid rgba(0, 0, 0, .08)
|
|
}
|
|
.apexcharts-cf-table th {
|
|
font-weight: 600;
|
|
border-bottom-width: 2px
|
|
}
|
|
.apexcharts-cf-table tbody tr:hover {
|
|
background: rgba(99, 102, 241, .06)
|
|
}
|
|
|
|
/* Measure ruler (#18): measure / delta ruler.
|
|
Theme via these classes or the --apx-measure-* custom properties below
|
|
(config \`chart.measure.colors\` overrides both). The ruler group also carries
|
|
a direction class: apexcharts-measure-up | -down | -flat.
|
|
Element classes:
|
|
.apexcharts-measure-band shaded span band
|
|
.apexcharts-measure-vline vertical guide lines
|
|
.apexcharts-measure-line free-mode diagonal line
|
|
.apexcharts-measure-label-bg readout box .apexcharts-measure-label text
|
|
Colors are applied as SVG presentation attributes, so any rule you write on
|
|
these classes overrides them. */
|
|
.apexcharts-canvas {
|
|
--apx-measure-up: #16a34a;
|
|
--apx-measure-down: #dc2626;
|
|
--apx-measure-neutral: #64748b;
|
|
--apx-measure-guide: #94a3b8;
|
|
}
|
|
.apexcharts-measure-capture {
|
|
cursor: crosshair;
|
|
}
|
|
|
|
/* Radial Actions (#chrome): right-click context menu. Theme via these classes
|
|
or the --apx-menu-* custom properties. */
|
|
.apexcharts-canvas {
|
|
--apx-menu-bg: #ffffff;
|
|
--apx-menu-fg: #1e293b;
|
|
--apx-menu-border: #e2e8f0;
|
|
--apx-menu-hover: #f1f5f9;
|
|
--apx-menu-shadow: rgba(15, 23, 42, 0.18);
|
|
}
|
|
.apexcharts-context-menu {
|
|
min-width: 168px;
|
|
padding: 4px;
|
|
border-radius: 8px;
|
|
background: var(--apx-menu-bg);
|
|
border: 1px solid var(--apx-menu-border);
|
|
box-shadow: 0 6px 22px var(--apx-menu-shadow);
|
|
font-family: Helvetica, Arial, sans-serif;
|
|
font-size: 13px;
|
|
z-index: 20;
|
|
user-select: none;
|
|
}
|
|
.apexcharts-context-menu-item {
|
|
display: block;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
text-align: left;
|
|
padding: 7px 12px;
|
|
border: 0;
|
|
border-radius: 5px;
|
|
background: transparent;
|
|
color: var(--apx-menu-fg);
|
|
font: inherit;
|
|
cursor: pointer;
|
|
}
|
|
.apexcharts-context-menu-item:hover,
|
|
.apexcharts-context-menu-item--active {
|
|
background: var(--apx-menu-hover);
|
|
}
|
|
.apexcharts-context-menu-item:focus {
|
|
outline: none;
|
|
}
|
|
|
|
/* Ink Layer (#7): the floating note editor card, opened by clicking an
|
|
ink-managed annotation. Theme via these classes or the --apx-ink-* vars. */
|
|
.apexcharts-canvas {
|
|
--apx-ink-card-bg: #ffffff;
|
|
--apx-ink-card-fg: #1e293b;
|
|
--apx-ink-card-border: #e2e8f0;
|
|
--apx-ink-card-hover: #f1f5f9;
|
|
--apx-ink-card-accent: #6366f1;
|
|
--apx-ink-card-shadow: rgba(15, 23, 42, 0.18);
|
|
}
|
|
.apexcharts-ink-card {
|
|
position: absolute;
|
|
z-index: 25;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
padding: 8px;
|
|
border-radius: 8px;
|
|
background: var(--apx-ink-card-bg);
|
|
border: 1px solid var(--apx-ink-card-border);
|
|
box-shadow: 0 6px 22px var(--apx-ink-card-shadow);
|
|
font-family: Helvetica, Arial, sans-serif;
|
|
font-size: 12px;
|
|
color: var(--apx-ink-card-fg);
|
|
user-select: none;
|
|
}
|
|
.apexcharts-ink-card-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
.apexcharts-ink-card input.apexcharts-ink-editor {
|
|
flex: 1 1 auto;
|
|
width: 150px;
|
|
min-width: 0;
|
|
box-sizing: border-box;
|
|
padding: 4px 6px;
|
|
font: inherit;
|
|
color: inherit;
|
|
background: transparent;
|
|
border: 1px solid var(--apx-ink-card-border);
|
|
border-radius: 5px;
|
|
}
|
|
.apexcharts-ink-card input.apexcharts-ink-editor:focus {
|
|
outline: none;
|
|
border-color: var(--apx-ink-card-accent);
|
|
}
|
|
.apexcharts-ink-btn {
|
|
flex: 0 0 auto;
|
|
width: 24px;
|
|
height: 24px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 5px;
|
|
background: transparent;
|
|
color: inherit;
|
|
font: inherit;
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
}
|
|
.apexcharts-ink-btn:hover,
|
|
.apexcharts-ink-btn--active {
|
|
background: var(--apx-ink-card-hover);
|
|
}
|
|
.apexcharts-ink-btn:focus-visible,
|
|
.apexcharts-ink-swatch:focus-visible {
|
|
outline: 2px solid var(--apx-ink-card-accent);
|
|
outline-offset: 1px;
|
|
}
|
|
.apexcharts-ink-btn--bold {
|
|
font-weight: 700;
|
|
}
|
|
.apexcharts-ink-btn--delete:hover {
|
|
color: #dc2626;
|
|
}
|
|
.apexcharts-ink-swatch {
|
|
flex: 0 0 auto;
|
|
width: 16px;
|
|
height: 16px;
|
|
padding: 0;
|
|
border: 1px solid rgba(100, 116, 139, 0.45);
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
}
|
|
.apexcharts-ink-swatch--active {
|
|
box-shadow:
|
|
0 0 0 2px var(--apx-ink-card-bg),
|
|
0 0 0 4px var(--apx-ink-card-accent);
|
|
}
|
|
.apexcharts-ink-sep {
|
|
flex: 0 0 auto;
|
|
width: 1px;
|
|
height: 16px;
|
|
margin: 0 2px;
|
|
background: var(--apx-ink-card-border);
|
|
}
|
|
.apexcharts-ink-cardlabel {
|
|
flex: 0 0 auto;
|
|
font-size: 10px;
|
|
letter-spacing: 0.4px;
|
|
text-transform: uppercase;
|
|
opacity: 0.65;
|
|
margin-right: 2px;
|
|
}
|
|
.apexcharts-ink-marker-size {
|
|
flex: 0 0 auto;
|
|
min-width: 16px;
|
|
text-align: center;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.apexcharts-legend-text {
|
|
padding-left: 15px;
|
|
margin-left: -15px;
|
|
}
|
|
|
|
.apexcharts-legend-series[role="button"]:focus {
|
|
outline: 2px solid var(--apexcharts-focus-color, #008FFB);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {
|
|
outline: none;
|
|
}
|
|
|
|
.apexcharts-legend-series[role="button"]:focus-visible {
|
|
outline: 2px solid var(--apexcharts-focus-color, #008FFB);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.apexcharts-series-collapsed {
|
|
opacity: 0
|
|
}
|
|
|
|
.apexcharts-canvas svg:focus:not(:focus-visible) {
|
|
outline: none;
|
|
}
|
|
|
|
/* Keyboard navigation focus indicator on SVG data elements.
|
|
SVG elements don't support CSS outline, so we use stroke. */
|
|
.apexcharts-bar-area.apexcharts-keyboard-focused,
|
|
.apexcharts-candlestick-area.apexcharts-keyboard-focused,
|
|
.apexcharts-boxPlot-area.apexcharts-keyboard-focused,
|
|
.apexcharts-rangebar-area.apexcharts-keyboard-focused,
|
|
.apexcharts-pie-area.apexcharts-keyboard-focused,
|
|
.apexcharts-heatmap-rect.apexcharts-keyboard-focused,
|
|
.apexcharts-treemap-rect.apexcharts-keyboard-focused {
|
|
stroke: var(--apexcharts-focus-color, #008FFB);
|
|
stroke-width: 2;
|
|
stroke-opacity: 1;
|
|
}
|
|
|
|
.apexcharts-tooltip {
|
|
--apx-tt-bg: #ffffff;
|
|
/* Shared by the body and the arrow's two outward facets, so the
|
|
* hairline reads as one continuous outline around the whole shape.
|
|
* Keep it strong enough to survive on its own: the shadow below is
|
|
* elevation, not edge definition. */
|
|
--apx-tt-border: rgba(15, 23, 42, 0.12);
|
|
/* Elevation, in three layers: a tight contact shadow that anchors the
|
|
* bottom edge, a directional key shadow for the lift, and a wide
|
|
* ambient one that grounds the whole box. Each is weaker and more
|
|
* diffuse than the last.
|
|
*
|
|
* A tooltip is unusual in that it floats over *data*, so reach costs
|
|
* more than it does on a page: every pixel the shadow travels tints a
|
|
* bar or a line the reader is trying to compare. These numbers are
|
|
* tuned to keep the near-edge contrast that reads as elevation while
|
|
* dropping the long low haze that only muddies the plot.
|
|
*
|
|
* Note there is deliberately no \`0 0 0 1px\` ring layer. That used to
|
|
* stand in for edge definition back when --apx-tt-border was barely
|
|
* visible; now that the border is a real hairline (and the arrow
|
|
* shares it) a ring only double-draws the outline, and being spread
|
|
* rather than offset it leaked ink upward too, flattening the lift.
|
|
*
|
|
* \`--apx-tt-shadow-dir\` flips the whole stack's Y in one place \u2014 see
|
|
* the \`[data-placement="bottom"]\` rule further down. */
|
|
--apx-tt-shadow-dir: 1;
|
|
--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, 0.06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, 0.10), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, 0.14);
|
|
--apx-tt-arrow-bg: var(--apx-tt-bg);
|
|
--apx-tt-color: #0f172a;
|
|
--apx-tt-color-muted: rgba(15, 23, 42, 0.55);
|
|
border-radius: 8px;
|
|
background: var(--apx-tt-bg);
|
|
border: 1px solid var(--apx-tt-border);
|
|
box-shadow: var(--apx-tt-shadow);
|
|
color: var(--apx-tt-color);
|
|
cursor: default;
|
|
font-size: 13px;
|
|
left: 0;
|
|
top: 0;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 2px 0;
|
|
white-space: nowrap;
|
|
z-index: 12;
|
|
transition: opacity .12s ease
|
|
}
|
|
|
|
/* While the tooltip is visible, smoothly animate position changes
|
|
* between data points. Kept short (160 ms) and ease-out so it stays
|
|
* responsive \u2014 too long would feel laggy when sweeping across many
|
|
* points fast. The position transition is only attached after the
|
|
* first paint (Position.applyTooltipPosition flips \`data-positioned\`
|
|
* once the tooltip has been placed) so the *first* show doesn't slide
|
|
* the tooltip in from the previously-stale (0,0) coordinates. */
|
|
.apexcharts-tooltip.apexcharts-active {
|
|
opacity: 1;
|
|
transition: opacity .12s ease
|
|
}
|
|
.apexcharts-tooltip.apexcharts-active[data-positioned="true"] {
|
|
transition: opacity .12s ease, left .16s ease-out, top .16s ease-out
|
|
}
|
|
|
|
.apexcharts-tooltip.apexcharts-theme-light {
|
|
/* defaults already set above; class kept for backward-compat selectors */
|
|
}
|
|
|
|
.apexcharts-tooltip.apexcharts-theme-dark {
|
|
--apx-tt-bg: #1c1c1f;
|
|
--apx-tt-border: rgba(255, 255, 255, 0.16);
|
|
/* Dark needs more alpha than light to register at all, but not as much
|
|
* as it used to: the light rim above now carries the edge, so the
|
|
* shadow is free to be pure elevation instead of doubling as an
|
|
* outline. Same geometry as light, heavier ink. */
|
|
--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, 0.24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, 0.30), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, 0.38);
|
|
--apx-tt-color: #f3f4f6;
|
|
--apx-tt-color-muted: rgba(243, 244, 246, 0.55);
|
|
}
|
|
|
|
.apexcharts-tooltip * {
|
|
font-family: inherit
|
|
}
|
|
|
|
/* Point-annotation hover tooltip (apexcharts/apexcharts.js#2424). Reuses the
|
|
* glass body/border/shadow from \`.apexcharts-tooltip\` but holds free-form
|
|
* content, so it needs its own padding, wrapping and a sane max width. */
|
|
.apexcharts-tooltip.apexcharts-annotation-tooltip {
|
|
padding: 6px 10px;
|
|
max-width: 240px;
|
|
white-space: normal;
|
|
line-height: 1.4;
|
|
pointer-events: none;
|
|
z-index: 13
|
|
}
|
|
|
|
.apexcharts-tooltip-title {
|
|
padding: 8px 12px 4px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.01em;
|
|
color: var(--apx-tt-color-muted);
|
|
background: transparent;
|
|
border-bottom: none;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,
|
|
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
|
|
background: transparent;
|
|
border-bottom: none
|
|
}
|
|
|
|
/* \`fillSeriesColor\`: each series-group already paints itself with the
|
|
* series colour. Drop the glass body entirely (transparent bg, no
|
|
* border, no backdrop-filter, no padding) and clip the coloured
|
|
* series-group(s) to the tooltip's rounded corners so they fill the
|
|
* shell edge-to-edge. Text inside the coloured group is forced to
|
|
* white for contrast. */
|
|
.apexcharts-tooltip.apexcharts-tooltip-fill-series {
|
|
background: transparent;
|
|
-webkit-backdrop-filter: none;
|
|
backdrop-filter: none;
|
|
border: none;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
color: #fff
|
|
}
|
|
|
|
.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title {
|
|
background: rgba(0, 0, 0, 0.22);
|
|
color: #fff;
|
|
opacity: 1;
|
|
padding: 6px 12px
|
|
}
|
|
|
|
.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group {
|
|
color: #fff
|
|
}
|
|
|
|
/* Arrow connector \u2014 a 45\xB0-rotated square straddling the body's edge, so
|
|
* the body's 1px border runs continuously out across the arrow and back.
|
|
* The two facets that face away from the tooltip carry the border; the
|
|
* two that face into it carry none, and the square's opaque fill covers
|
|
* the segment of the body's own border it sits on, hiding the seam.
|
|
*
|
|
* This is why it's a rotated square and not a triangle: \`clip-path\`
|
|
* erases \`border\` and \`box-shadow\` along with everything outside the
|
|
* polygon, which left \`filter: drop-shadow\` as the only way to suggest
|
|
* an edge \u2014 and a drop-shadow can only ever blur one, never draw a
|
|
* hairline. Nothing here needs a filter.
|
|
*
|
|
* Geometry: a square of side S rotated 45\xB0 reaches S/\u221A2 from its centre
|
|
* to each corner, so S = 10px gives the ~7px tip overhang that
|
|
* ARROW_TIP_OVERHANG assumes (tooltip/constants.js) over a ~14px base.
|
|
* The offsets park the square's *centre* 1px outside the padding box
|
|
* (-6px = -1px border - 10px/2), i.e. exactly on the body's border line,
|
|
* so the two borders meet end to end instead of overlapping or gapping.
|
|
* \`box-sizing\` must be border-box or the bordered sides would grow the
|
|
* square asymmetrically and knock its centre off that line. */
|
|
.apexcharts-tooltip-arrow {
|
|
position: absolute;
|
|
box-sizing: border-box;
|
|
width: 10px;
|
|
height: 10px;
|
|
background: var(--apx-tt-arrow-bg);
|
|
transform: rotate(45deg);
|
|
pointer-events: none;
|
|
top: calc(var(--apx-tt-arrow-y, 50%) - 5px)
|
|
}
|
|
|
|
/* Which two sides face outward depends on the placement. Under
|
|
* \`rotate(45deg)\` the square's bottom-left corner swings to the left,
|
|
* top-right to the right, top-left to the top and bottom-right to the
|
|
* bottom \u2014 so the pair of borders below is always the two sharing the
|
|
* corner that ends up as the tip. */
|
|
.apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow {
|
|
left: -6px;
|
|
border-left: 1px solid var(--apx-tt-border);
|
|
border-bottom: 1px solid var(--apx-tt-border)
|
|
}
|
|
|
|
.apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow {
|
|
right: -6px;
|
|
border-top: 1px solid var(--apx-tt-border);
|
|
border-right: 1px solid var(--apx-tt-border)
|
|
}
|
|
|
|
/* Vertical arrow variants: tooltip is above/below the data point and the
|
|
* arrow points down/up. The base rule above uses \`--apx-tt-arrow-y\` for
|
|
* left/right placement; for top/bottom we centre on \`--apx-tt-arrow-x\`
|
|
* instead (set by applyTooltipPosition). */
|
|
.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow,
|
|
.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {
|
|
top: auto;
|
|
left: calc(var(--apx-tt-arrow-x, 50%) - 5px)
|
|
}
|
|
|
|
.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow {
|
|
bottom: -6px;
|
|
border-right: 1px solid var(--apx-tt-border);
|
|
border-bottom: 1px solid var(--apx-tt-border)
|
|
}
|
|
|
|
.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {
|
|
top: -6px;
|
|
border-top: 1px solid var(--apx-tt-border);
|
|
border-left: 1px solid var(--apx-tt-border)
|
|
}
|
|
|
|
/* When the tooltip is flipped below the data point, the default
|
|
* downward-biased shadow leaves its top edge undefined. Negating the
|
|
* direction casts the whole elevation upward instead, so the shadow
|
|
* falls between the tooltip and the mark above it. One multiplier flips
|
|
* all three layers together; the arrow needs no counterpart, since its
|
|
* border doesn't depend on light direction. */
|
|
.apexcharts-tooltip[data-placement="bottom"] {
|
|
--apx-tt-shadow-dir: -1
|
|
}
|
|
|
|
.apexcharts-tooltip-text-goals-value,
|
|
.apexcharts-tooltip-text-y-value,
|
|
.apexcharts-tooltip-text-z-value {
|
|
display: inline-block;
|
|
margin-left: 5px;
|
|
font-weight: 600
|
|
}
|
|
|
|
.apexcharts-tooltip-text-goals-label:empty,
|
|
.apexcharts-tooltip-text-goals-value:empty,
|
|
.apexcharts-tooltip-text-y-label:empty,
|
|
.apexcharts-tooltip-text-y-value:empty,
|
|
.apexcharts-tooltip-text-z-value:empty,
|
|
.apexcharts-tooltip-title:empty {
|
|
display: none
|
|
}
|
|
|
|
.apexcharts-tooltip-text-goals-label,
|
|
.apexcharts-tooltip-text-goals-value {
|
|
padding: 6px 0 5px
|
|
}
|
|
|
|
.apexcharts-tooltip-goals-group,
|
|
.apexcharts-tooltip-text-goals-label,
|
|
.apexcharts-tooltip-text-goals-value {
|
|
display: flex
|
|
}
|
|
|
|
.apexcharts-tooltip-text-goals-label:not(:empty),
|
|
.apexcharts-tooltip-text-goals-value:not(:empty) {
|
|
margin-top: -6px
|
|
}
|
|
|
|
.apexcharts-tooltip-marker {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
width: 12px;
|
|
height: 12px;
|
|
margin-right: 6px;
|
|
vertical-align: middle;
|
|
color: inherit;
|
|
}
|
|
|
|
.apexcharts-tooltip-marker svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: block;
|
|
}
|
|
|
|
.apexcharts-tooltip-series-group {
|
|
padding: 4px 12px;
|
|
display: none;
|
|
gap: 8px;
|
|
text-align: left;
|
|
justify-content: left;
|
|
align-items: center
|
|
}
|
|
|
|
.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
|
|
opacity: 1
|
|
}
|
|
|
|
.apexcharts-tooltip-series-group.apexcharts-active:last-child,
|
|
.apexcharts-tooltip-series-group:last-child {
|
|
padding-bottom: 8px
|
|
}
|
|
|
|
.apexcharts-tooltip-y-group {
|
|
padding: 6px 0 5px
|
|
}
|
|
|
|
.apexcharts-custom-tooltip,
|
|
.apexcharts-tooltip-box {
|
|
padding: 4px 8px
|
|
}
|
|
|
|
.apexcharts-tooltip-boxPlot {
|
|
display: flex;
|
|
flex-direction: column-reverse
|
|
}
|
|
|
|
.apexcharts-tooltip-box>div {
|
|
margin: 4px 0
|
|
}
|
|
|
|
.apexcharts-tooltip-box span.value {
|
|
font-weight: 700
|
|
}
|
|
|
|
.apexcharts-tooltip-rangebar {
|
|
padding: 5px 8px
|
|
}
|
|
|
|
.apexcharts-tooltip-rangebar .category {
|
|
font-weight: 600;
|
|
color: #777
|
|
}
|
|
|
|
.apexcharts-tooltip-rangebar .series-name {
|
|
font-weight: 700;
|
|
display: block;
|
|
margin-bottom: 5px
|
|
}
|
|
|
|
/* X/Y axis tooltips \u2014 small popovers that label the crosshair on the
|
|
* axes. Restyled to match the modern data-tooltip palette: solid white
|
|
* body with a subtle border + soft drop-shadow, smaller font, rounded
|
|
* corners. The arrows still use the CSS border-triangle technique
|
|
* (cheap, crisp at small sizes); their colours flow from CSS variables
|
|
* so light/dark themes only need one override per axis. */
|
|
.apexcharts-xaxistooltip,
|
|
.apexcharts-yaxistooltip {
|
|
--apx-axt-bg: #ffffff;
|
|
--apx-axt-border: rgba(15, 23, 42, 0.08);
|
|
--apx-axt-color: #0f172a;
|
|
--apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
color: var(--apx-axt-color);
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
border-radius: 6px;
|
|
position: absolute;
|
|
z-index: 10;
|
|
background: var(--apx-axt-bg);
|
|
border: 1px solid var(--apx-axt-border);
|
|
box-shadow: var(--apx-axt-shadow)
|
|
}
|
|
|
|
.apexcharts-xaxistooltip.apexcharts-theme-dark,
|
|
.apexcharts-yaxistooltip.apexcharts-theme-dark {
|
|
--apx-axt-bg: #1c1c1f;
|
|
--apx-axt-border: rgba(255, 255, 255, 0.1);
|
|
--apx-axt-color: #f3f4f6;
|
|
--apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45)
|
|
}
|
|
|
|
.apexcharts-xaxistooltip {
|
|
padding: 4px 8px;
|
|
transition: .15s ease all
|
|
}
|
|
|
|
.apexcharts-xaxistooltip:after,
|
|
.apexcharts-xaxistooltip:before {
|
|
left: 50%;
|
|
border: solid transparent;
|
|
content: " ";
|
|
height: 0;
|
|
width: 0;
|
|
position: absolute;
|
|
pointer-events: none
|
|
}
|
|
|
|
/* :before paints the 1px border outline of the triangle (slightly larger
|
|
* than :after); :after sits inside and paints the fill \u2014 leaves a 1px
|
|
* ring of :before visible at the edges. */
|
|
.apexcharts-xaxistooltip:after {
|
|
border-color: transparent;
|
|
border-width: 5px;
|
|
margin-left: -5px
|
|
}
|
|
|
|
.apexcharts-xaxistooltip:before {
|
|
border-color: transparent;
|
|
border-width: 6px;
|
|
margin-left: -6px
|
|
}
|
|
|
|
.apexcharts-xaxistooltip-bottom:after,
|
|
.apexcharts-xaxistooltip-bottom:before {
|
|
bottom: 100%
|
|
}
|
|
|
|
.apexcharts-xaxistooltip-top:after,
|
|
.apexcharts-xaxistooltip-top:before {
|
|
top: 100%
|
|
}
|
|
|
|
.apexcharts-xaxistooltip-bottom:after {
|
|
border-bottom-color: var(--apx-axt-bg)
|
|
}
|
|
|
|
.apexcharts-xaxistooltip-bottom:before {
|
|
border-bottom-color: var(--apx-axt-border)
|
|
}
|
|
|
|
.apexcharts-xaxistooltip-top:after {
|
|
border-top-color: var(--apx-axt-bg)
|
|
}
|
|
|
|
.apexcharts-xaxistooltip-top:before {
|
|
border-top-color: var(--apx-axt-border)
|
|
}
|
|
|
|
.apexcharts-xaxistooltip.apexcharts-active {
|
|
opacity: 1;
|
|
transition: .15s ease all
|
|
}
|
|
|
|
.apexcharts-yaxistooltip {
|
|
padding: 3px 8px
|
|
}
|
|
|
|
.apexcharts-yaxistooltip:after,
|
|
.apexcharts-yaxistooltip:before {
|
|
top: 50%;
|
|
border: solid transparent;
|
|
content: " ";
|
|
height: 0;
|
|
width: 0;
|
|
position: absolute;
|
|
pointer-events: none
|
|
}
|
|
|
|
.apexcharts-yaxistooltip:after {
|
|
border-color: transparent;
|
|
border-width: 5px;
|
|
margin-top: -5px
|
|
}
|
|
|
|
.apexcharts-yaxistooltip:before {
|
|
border-color: transparent;
|
|
border-width: 6px;
|
|
margin-top: -6px
|
|
}
|
|
|
|
.apexcharts-yaxistooltip-left:after,
|
|
.apexcharts-yaxistooltip-left:before {
|
|
left: 100%
|
|
}
|
|
|
|
.apexcharts-yaxistooltip-right:after,
|
|
.apexcharts-yaxistooltip-right:before {
|
|
right: 100%
|
|
}
|
|
|
|
.apexcharts-yaxistooltip-left:after {
|
|
border-left-color: var(--apx-axt-bg)
|
|
}
|
|
|
|
.apexcharts-yaxistooltip-left:before {
|
|
border-left-color: var(--apx-axt-border)
|
|
}
|
|
|
|
.apexcharts-yaxistooltip-right:after {
|
|
border-right-color: var(--apx-axt-bg)
|
|
}
|
|
|
|
.apexcharts-yaxistooltip-right:before {
|
|
border-right-color: var(--apx-axt-border)
|
|
}
|
|
|
|
.apexcharts-yaxistooltip.apexcharts-active {
|
|
opacity: 1
|
|
}
|
|
|
|
.apexcharts-yaxistooltip-hidden {
|
|
display: none
|
|
}
|
|
|
|
.apexcharts-xcrosshairs,
|
|
.apexcharts-ycrosshairs {
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
transition: .15s ease all
|
|
}
|
|
|
|
.apexcharts-xcrosshairs.apexcharts-active,
|
|
.apexcharts-ycrosshairs.apexcharts-active {
|
|
opacity: 1;
|
|
transition: .15s ease all
|
|
}
|
|
|
|
.apexcharts-ycrosshairs-hidden {
|
|
opacity: 0
|
|
}
|
|
|
|
.apexcharts-selection-rect {
|
|
cursor: move
|
|
}
|
|
|
|
.svg_select_shape {
|
|
stroke-width: 1;
|
|
stroke-dasharray: 10 10;
|
|
stroke: black;
|
|
stroke-opacity: 0.1;
|
|
pointer-events: none;
|
|
fill: none;
|
|
}
|
|
|
|
.svg_select_handle {
|
|
stroke-width: 3;
|
|
stroke: black;
|
|
fill: none;
|
|
}
|
|
|
|
.svg_select_handle_r {
|
|
cursor: e-resize;
|
|
}
|
|
|
|
.svg_select_handle_l {
|
|
cursor: w-resize;
|
|
}
|
|
|
|
.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
|
|
cursor: crosshair
|
|
}
|
|
|
|
.apexcharts-svg.apexcharts-zoomable.hovering-pan {
|
|
cursor: move
|
|
}
|
|
|
|
.apexcharts-menu-icon,
|
|
.apexcharts-measure-icon,
|
|
.apexcharts-pan-icon,
|
|
.apexcharts-reset-icon,
|
|
.apexcharts-selection-icon,
|
|
.apexcharts-toolbar-custom-icon,
|
|
.apexcharts-zoom-icon,
|
|
.apexcharts-zoomin-icon,
|
|
.apexcharts-zoomout-icon {
|
|
cursor: pointer;
|
|
/* WCAG 2.5.8 Target Size (Minimum): 24\xD724 CSS px hit target. */
|
|
width: 26px;
|
|
height: 24px;
|
|
line-height: 24px;
|
|
color: #6e8192;
|
|
text-align: center;
|
|
/* Reset native <button> chrome \u2014 these are styled via SVG icons. */
|
|
padding: 0;
|
|
margin: 0;
|
|
background: transparent;
|
|
border: 0;
|
|
border-radius: 5px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background-color .12s ease, color .12s ease;
|
|
}
|
|
|
|
.apexcharts-menu-icon svg,
|
|
.apexcharts-measure-icon svg,
|
|
.apexcharts-pan-icon svg,
|
|
.apexcharts-reset-icon svg,
|
|
.apexcharts-selection-icon svg,
|
|
.apexcharts-zoom-icon svg,
|
|
.apexcharts-zoomin-icon svg,
|
|
.apexcharts-zoomout-icon svg {
|
|
width: 18px;
|
|
height: 18px;
|
|
fill: none;
|
|
stroke: currentColor;
|
|
stroke-width: 2;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round
|
|
}
|
|
|
|
.apexcharts-theme-dark .apexcharts-menu-icon,
|
|
.apexcharts-theme-dark .apexcharts-measure-icon,
|
|
.apexcharts-theme-dark .apexcharts-pan-icon,
|
|
.apexcharts-theme-dark .apexcharts-reset-icon,
|
|
.apexcharts-theme-dark .apexcharts-selection-icon,
|
|
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,
|
|
.apexcharts-theme-dark .apexcharts-zoom-icon,
|
|
.apexcharts-theme-dark .apexcharts-zoomin-icon,
|
|
.apexcharts-theme-dark .apexcharts-zoomout-icon {
|
|
color: #d4d6dc
|
|
}
|
|
|
|
.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,
|
|
.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,
|
|
.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,
|
|
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,
|
|
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected {
|
|
background: rgba(0, 143, 251, 0.12);
|
|
color: #008ffb
|
|
}
|
|
|
|
.apexcharts-theme-light .apexcharts-menu-icon:hover,
|
|
.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,
|
|
.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,
|
|
.apexcharts-theme-light .apexcharts-reset-icon:hover,
|
|
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,
|
|
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,
|
|
.apexcharts-theme-light .apexcharts-zoomin-icon:hover,
|
|
.apexcharts-theme-light .apexcharts-zoomout-icon:hover {
|
|
background: rgba(15, 23, 42, 0.06);
|
|
color: #1f2937
|
|
}
|
|
|
|
.apexcharts-theme-dark .apexcharts-menu-icon:hover,
|
|
.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,
|
|
.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,
|
|
.apexcharts-theme-dark .apexcharts-reset-icon:hover,
|
|
.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,
|
|
.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,
|
|
.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,
|
|
.apexcharts-theme-dark .apexcharts-zoomout-icon:hover {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
color: #fff
|
|
}
|
|
|
|
.apexcharts-menu-icon,
|
|
.apexcharts-selection-icon {
|
|
position: relative
|
|
}
|
|
|
|
.apexcharts-toolbar {
|
|
position: absolute;
|
|
z-index: 11;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 1px;
|
|
padding: 3px;
|
|
border-radius: 8px;
|
|
background: rgba(255, 255, 255, 0.85);
|
|
backdrop-filter: blur(8px);
|
|
-webkit-backdrop-filter: blur(8px);
|
|
}
|
|
|
|
.apexcharts-theme-dark .apexcharts-toolbar {
|
|
background: rgba(28, 28, 31, 0.82);
|
|
}
|
|
|
|
.apexcharts-menu {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(8px);
|
|
-webkit-backdrop-filter: blur(8px);
|
|
position: absolute;
|
|
top: calc(100% + 4px);
|
|
border: 1px solid rgba(15, 23, 42, 0.08);
|
|
border-radius: 8px;
|
|
padding: 4px;
|
|
right: 0;
|
|
opacity: 0;
|
|
min-width: 120px;
|
|
transition: opacity .15s ease, transform .15s ease;
|
|
transform: translateY(-2px);
|
|
pointer-events: none;
|
|
box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06)
|
|
}
|
|
|
|
.apexcharts-menu.apexcharts-menu-open {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
pointer-events: all
|
|
}
|
|
|
|
.apexcharts-menu-item {
|
|
padding: 6px 9px;
|
|
font-size: 12px;
|
|
border-radius: 5px;
|
|
cursor: pointer
|
|
}
|
|
|
|
.apexcharts-theme-light .apexcharts-menu-item:hover {
|
|
background: rgba(15, 23, 42, 0.06)
|
|
}
|
|
|
|
.apexcharts-theme-dark .apexcharts-menu {
|
|
background: rgba(28, 28, 31, 0.92);
|
|
border-color: rgba(255, 255, 255, 0.08);
|
|
color: #f3f4f6;
|
|
box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4)
|
|
}
|
|
|
|
.apexcharts-theme-dark .apexcharts-menu-item:hover {
|
|
background: rgba(255, 255, 255, 0.08)
|
|
}
|
|
|
|
@media screen and (min-width:768px) {
|
|
.apexcharts-canvas:hover .apexcharts-toolbar {
|
|
opacity: 1
|
|
}
|
|
}
|
|
|
|
/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */
|
|
.apexcharts-toolbar:focus-within {
|
|
opacity: 1
|
|
}
|
|
|
|
/* Focus indicator for toolbar icon buttons */
|
|
.apexcharts-menu-icon:focus-visible,
|
|
.apexcharts-measure-icon:focus-visible,
|
|
.apexcharts-pan-icon:focus-visible,
|
|
.apexcharts-reset-icon:focus-visible,
|
|
.apexcharts-selection-icon:focus-visible,
|
|
.apexcharts-toolbar-custom-icon:focus-visible,
|
|
.apexcharts-zoom-icon:focus-visible,
|
|
.apexcharts-zoomin-icon:focus-visible,
|
|
.apexcharts-zoomout-icon:focus-visible {
|
|
outline: 2px solid var(--apexcharts-focus-color, #008FFB);
|
|
outline-offset: 1px;
|
|
border-radius: 5px
|
|
}
|
|
|
|
/* Focus indicator for hamburger menu items */
|
|
.apexcharts-menu-item:focus-visible {
|
|
outline: 2px solid var(--apexcharts-focus-color, #008FFB);
|
|
outline-offset: -2px;
|
|
background: #eee
|
|
}
|
|
|
|
.apexcharts-canvas .apexcharts-element-hidden,
|
|
.apexcharts-datalabel.apexcharts-element-hidden,
|
|
.apexcharts-hide .apexcharts-series-points {
|
|
opacity: 0;
|
|
}
|
|
|
|
.apexcharts-hidden-element-shown {
|
|
opacity: 1;
|
|
transition: 0.25s ease all;
|
|
}
|
|
|
|
.apexcharts-datalabel,
|
|
.apexcharts-datalabel-label,
|
|
.apexcharts-datalabel-value,
|
|
.apexcharts-datalabels,
|
|
.apexcharts-pie-label,
|
|
.apexcharts-pie-name-label,
|
|
.apexcharts-pie-name-label-group,
|
|
.apexcharts-pie-label-connector,
|
|
.apexcharts-unit-outer-label,
|
|
.apexcharts-unit-outer-label-group,
|
|
.apexcharts-unit-label-connector {
|
|
cursor: default;
|
|
pointer-events: none
|
|
}
|
|
|
|
.apexcharts-pie-label-connector,
|
|
.apexcharts-unit-label-connector {
|
|
fill: none
|
|
}
|
|
|
|
.apexcharts-pie-label-delay,
|
|
.apexcharts-unit-label-delay {
|
|
opacity: 0;
|
|
animation-name: opaque;
|
|
animation-duration: .3s;
|
|
animation-fill-mode: forwards;
|
|
animation-timing-function: ease
|
|
}
|
|
|
|
/* Slower than the pie's, on purpose: these come in while the dots are still
|
|
easing into place, so a longer fade reads as arriving WITH the crowd. */
|
|
.apexcharts-unit-label-delay {
|
|
animation-duration: .5s
|
|
}
|
|
|
|
.apexcharts-radialbar-label {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.apexcharts-annotation-rect,
|
|
.apexcharts-area-series .apexcharts-area,
|
|
.apexcharts-gridline,
|
|
.apexcharts-line,
|
|
.apexcharts-point-annotation-label,
|
|
.apexcharts-radar-series path:not(.apexcharts-marker),
|
|
.apexcharts-radar-series polygon,
|
|
.apexcharts-toolbar svg,
|
|
.apexcharts-tooltip .apexcharts-marker,
|
|
.apexcharts-xaxis-annotation-label,
|
|
.apexcharts-yaxis-annotation-label,
|
|
.apexcharts-zoom-rect,
|
|
.no-pointer-events {
|
|
pointer-events: none
|
|
}
|
|
|
|
.apexcharts-tooltip-active .apexcharts-marker {
|
|
transition: .15s ease all
|
|
}
|
|
|
|
.apexcharts-radar-series .apexcharts-yaxis {
|
|
pointer-events: none;
|
|
}
|
|
|
|
.resize-triggers {
|
|
animation: 1ms resizeanim;
|
|
visibility: hidden;
|
|
opacity: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
overflow: hidden
|
|
}
|
|
|
|
.contract-trigger:before,
|
|
.resize-triggers,
|
|
.resize-triggers>div {
|
|
content: " ";
|
|
display: block;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0
|
|
}
|
|
|
|
.resize-triggers>div {
|
|
height: 100%;
|
|
width: 100%;
|
|
background: #eee;
|
|
overflow: auto
|
|
}
|
|
|
|
.contract-trigger:before {
|
|
overflow: hidden;
|
|
width: 200%;
|
|
height: 200%
|
|
}
|
|
|
|
.apexcharts-bar-goals-markers {
|
|
pointer-events: none
|
|
}
|
|
|
|
.apexcharts-bar-shadows {
|
|
pointer-events: none
|
|
}
|
|
|
|
.apexcharts-rangebar-goals-markers {
|
|
pointer-events: none
|
|
}
|
|
|
|
.apexcharts-drilldown-target {
|
|
cursor: pointer
|
|
}
|
|
|
|
.apexcharts-breadcrumb {
|
|
position: absolute;
|
|
z-index: 11;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
font-size: 12px;
|
|
font-family: inherit;
|
|
padding: 2px 4px
|
|
}
|
|
|
|
.apexcharts-breadcrumb-item {
|
|
background: transparent;
|
|
border: none;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font: inherit;
|
|
color: inherit;
|
|
cursor: pointer;
|
|
line-height: 1.2
|
|
}
|
|
|
|
.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {
|
|
background: rgba(0, 0, 0, 0.08)
|
|
}
|
|
|
|
.apexcharts-breadcrumb-arrow {
|
|
margin-right: 4px;
|
|
font-weight: 600;
|
|
user-select: none
|
|
}
|
|
|
|
.apexcharts-breadcrumb-current {
|
|
cursor: default;
|
|
font-weight: 600;
|
|
opacity: 0.85
|
|
}
|
|
|
|
.apexcharts-breadcrumb-separator {
|
|
opacity: 0.5;
|
|
user-select: none
|
|
}
|
|
|
|
.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {
|
|
background: rgba(255, 255, 255, 0.12)
|
|
}
|
|
|
|
.apexcharts-drilldown-loading {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: 12;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
font-size: 13px;
|
|
font-family: inherit;
|
|
color: inherit;
|
|
background: rgba(255, 255, 255, 0.62);
|
|
/* The chart underneath stays interactive-looking but must not take clicks
|
|
while a level is resolving, or a second drill can start mid-fetch. */
|
|
cursor: progress
|
|
}
|
|
|
|
.apexcharts-drilldown-loading-spinner {
|
|
width: 26px;
|
|
height: 26px;
|
|
border-radius: 50%;
|
|
border: 2.5px solid rgba(0, 0, 0, 0.16);
|
|
border-top-color: rgba(0, 0, 0, 0.55);
|
|
animation: apexcharts-drilldown-spin 0.7s linear infinite
|
|
}
|
|
|
|
.apexcharts-drilldown-loading-text {
|
|
opacity: 0.8
|
|
}
|
|
|
|
.apexcharts-theme-dark .apexcharts-drilldown-loading {
|
|
background: rgba(30, 30, 30, 0.62)
|
|
}
|
|
|
|
.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner {
|
|
border-color: rgba(255, 255, 255, 0.22);
|
|
border-top-color: rgba(255, 255, 255, 0.7)
|
|
}
|
|
|
|
@keyframes apexcharts-drilldown-spin {
|
|
to {
|
|
transform: rotate(360deg)
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.apexcharts-drilldown-loading-spinner {
|
|
animation: apexcharts-drilldown-pulse 1.4s ease-in-out infinite
|
|
}
|
|
|
|
@keyframes apexcharts-drilldown-pulse {
|
|
0%, 100% {
|
|
opacity: 0.35
|
|
}
|
|
|
|
50% {
|
|
opacity: 1
|
|
}
|
|
}
|
|
}
|
|
|
|
.apexcharts-disable-transitions * {
|
|
transition: none !important;
|
|
}`,Ur=globalThis.console;function On(u){Ur.error(u)}function Bn(u){Ur.warn(u)}var Yn="APEX-",Pc=new Date("2027-07-31T00:00:00Z"),zn="__apex_license_v1__";function ke(){let u=globalThis,t=u[zn];return t||(t={key:null,listeners:new Set,result:null},u[zn]=t),t}var de=class{static get licenseKey(){return ke().key}static set licenseKey(u){ke().key=u}static get listeners(){return ke().listeners}static get validationResult(){return ke().result}static set validationResult(u){ke().result=u}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(u){return!!u&&this.validateKey(u).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(u){return this.listeners.add(u),()=>{this.listeners.delete(u)}}static setLicense(u){var t,e;if(!u)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});let s=this.validateKey(u);s.valid||u===this.licenseKey||!((e=this.validationResult)!=null&&e.valid)?(this.licenseKey=u,this.publish(s),s.valid||On(`[Apex] ${s.message}`)):Bn(`[Apex] Ignoring license key: ${(t=s.message)!=null?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(u){let t=this.parseKey(u),e=this.validateStructure(u,t);if(!e.valid||!t?.signature)return e;let s=this.verdicts.get(u);return s===!1?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(s===void 0&&this.verifySignature(u,t,e),j(G({},e),{signatureVerified:s===!0}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(u){let t=u.replace(/-/g,"+").replace(/_/g,"/"),e=t.padEnd(4*Math.ceil(t.length/4),"="),s=globalThis.atob;if(typeof s!="function")throw new Error("no base64 decoder available");let i=s(e),a=new Uint8Array(i.length);for(let n=0;n<i.length;n++)a[n]=i.charCodeAt(n);return a}static canonicalPayload(u){let t=u.domains&&u.domains.length>0?u.domains.join(","):"";return`v1|${u.issueDate}|${u.expiryDate}|${u.plan}|${t}`}static notify(u){for(let t of this.listeners)try{t(u)}catch{}}static parseKey(u){if(typeof u!="string"||!u.startsWith(Yn))return null;let t=u.slice(5);if(!t)return null;try{let e=new TextDecoder().decode(this.base64ToBytes(t)),s=JSON.parse(e);return s.issueDate&&s.expiryDate&&s.plan?{data:{domains:Array.isArray(s.domains)?s.domains:void 0,expiryDate:s.expiryDate,issueDate:s.issueDate,plan:s.plan,valid:!0},signature:typeof s.sig=="string"&&s.sig?s.sig:null}:null}catch{return null}}static publish(u){this.validationResult=u,this.notify(u)}static validateStructure(u,t){let e=a=>({expired:!1,message:a,signatureVerified:!1,valid:!1});if(typeof u!="string"||!u.startsWith(Yn))return e('Invalid license key format. License key must start with "APEX-".');if(!t)return e("Invalid license key. Unable to decode license data.");let{data:s,signature:i}=t;if(!i&&new Date>=Pc)return e("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(s.expiryDate)<new Date)return{data:s,expired:!0,message:`License expired on ${s.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(s.domains&&s.domains.length>0){let a=typeof location>"u"?"":location.hostname;if(!s.domains.some((n=>a===n||a.endsWith(`.${n}`))))return{data:s,expired:!1,message:`License is not valid for this domain (${a}). Allowed domains: ${s.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:s,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(u,t,e){return _r(this,null,function*(){var s;if(this.verifying.has(u)||this.verdicts.has(u))return;this.verifying.add(u);let i=this.epoch,a=(s=globalThis.crypto)==null?void 0:s.subtle;if(!a||this.publicKeysSpki.length===0)return this.verifying.delete(u),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,Bn(a?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));let n=new TextEncoder().encode(this.canonicalPayload(t.data)),r=!1;for(let c of this.publicKeysSpki){try{let h=yield a.importKey("spki",this.base64ToBytes(c),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);r=yield a.verify({hash:"SHA-256",name:"ECDSA"},h,this.base64ToBytes(t.signature),n)}catch{r=!1}if(r)break}if(this.verifying.delete(u),this.epoch!==i)return;if(this.verdicts.set(u,r),r){let c=j(G({},e),{signatureVerified:!0});return void(this.licenseKey===u?this.publish(c):this.notify(c))}let o="Invalid license key. The license signature does not verify.",l={data:t.data,expired:!1,message:o,signatureVerified:!0,valid:!1};this.licenseKey===u?this.publish(l):this.notify(l),On(`[Apex] ${o}`)})}};de.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],de.verdicts=new Map,de.verifying=new Set,de.warnedUnverifiable=!1,de.epoch=0;var Ht=de,Zt=class{static applyStyles(u){Object.assign(u.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(u){return u?u.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(u,t){return u&&typeof document<"u"?(this.setManaged(u,t),this.paint(u)):null}static exists(u){return!!this.node(u)}static remove(u,t){u&&(this.setManaged(u,t),this.erase(u))}static untrack(u){this.managed.delete(u)}static createWatermarkPattern(){let u=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">
|
|
<text
|
|
x="50%"
|
|
y="50%"
|
|
dominant-baseline="middle"
|
|
text-anchor="middle"
|
|
font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"
|
|
font-size="18"
|
|
font-weight="600"
|
|
fill="rgba(134, 134, 134, 0.1)"
|
|
transform="rotate(-35, 100, 60)"
|
|
>${u}</text>
|
|
</svg>
|
|
`.trim())}")`}static erase(u){var t;(t=this.node(u))==null||t.remove()}static paint(u){let t=this.node(u);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),u.appendChild(t)),this.applyStyles(t),typeof getComputedStyle=="function"&&getComputedStyle(u).position==="static"&&(u.style.position="relative"),t}static reconcile(){let u=Ht.isLicenseValid();for(let t of this.managed)t.isConnected?u?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(u,t){t?.manage!==!1?this.track(u):this.managed.delete(u)}static track(u){this.managed.add(u),this.subscribed||(this.subscribed=!0,Ht.onChange((()=>{this.reconcile()})))}};Zt.WATERMARK_ATTR="data-apexcharts-watermark",Zt.WATERMARK_TEXT="APEXCHARTS",Zt.ATTR="data-apexcharts-watermark",Zt.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},Zt.managed=new Set,Zt.subscribed=!1;var Fe=Zt,Rc=.05,Fc=.05,Ic=1/45;function Wn(u,t,e,s){return{value:u,velocity:0,target:u,stiffness:t,damping:e}}function Hn(u,t){if(t<=0)return Gn(u);let e=t;for(;e>0;){let s=Math.min(e,Ic),i=-u.stiffness*(u.value-u.target)-u.damping*u.velocity;u.velocity+=i*s,u.value+=u.velocity*s,e-=s}return!!Gn(u)&&(u.value=u.target,u.velocity=0,!0)}function $n(u,t){u.target=t}function Gn(u){var t,e;let s=(t=u.restVelocity)!=null?t:Rc,i=(e=u.restDisplacement)!=null?e:Fc;return Math.abs(u.velocity)<s&&Math.abs(u.value-u.target)<i}var Vn={crisp:[210,26],gentle:[120,20],snappy:[320,30]};function Nc(u){var t;return(t=Vn[u??"crisp"])!=null?t:Vn.crisp}var Ks="__apexcharts_crossfilters__";function Kt(u){if(!Number.isFinite(u))return u;let t=Number(u.toPrecision(12));return Object.is(t,-0)?0:t}function Jt(u){return typeof u=="number"&&Number.isFinite(u)}function Xc(u){if(typeof u=="function")return u;if(u&&typeof u=="object"){if(typeof u.sum=="string"){let t=u.sum;return e=>e.reduce(((s,i)=>s+(Number(i[t])||0)),0)}if(typeof u.avg=="string"){let t=u.avg;return e=>e.length?e.reduce(((s,i)=>s+(Number(i[t])||0)),0)/e.length:0}if(typeof u.min=="string"){let t=u.min;return e=>e.length?Math.min(...e.map((s=>Number(s[t])||0))):0}if(typeof u.max=="string"){let t=u.max;return e=>e.length?Math.max(...e.map((s=>Number(s[t])||0))):0}}return t=>t.length}function Js(u,t){return typeof t=="function"?u.slice().sort(t):t==="asc"?u.slice().sort(((e,s)=>e>s?1:e<s?-1:0)):t==="desc"?u.slice().sort(((e,s)=>e<s?1:e>s?-1:0)):u}function Oc(u,t){if(!Jt(u))return-1;let e=t.length-1;if(u<t[0]||u>t[e])return-1;if(u===t[e])return e-1;for(let s=0;s<e;s++)if(u>=t[s]&&u<t[s+1])return s;return-1}function Un(u){let t=[];for(let e=0;e<u.length-1;e++)t.push(Kt((u[e]+u[e+1])/2));return t}var We=class u{constructor(t,e){this.dims=new Map,this.listeners=new Map,this.id=t,this.records=Array.isArray(e)?e:[]}static store(){let t=globalThis;return t[Ks]||(t[Ks]=new Map),t[Ks]}static getOrCreate(t){if(!t||typeof t.id!="string")throw new Error("Crossfilter.getOrCreate requires an { id } string.");let e=u.store(),s=e.get(t.id);if(s)return t.records&&s.setRecords(t.records),s;let i=new u(t.id,t.records);return e.set(t.id,i),i}static get(t){return u.store().get(t)||null}setRecords(t){return this.records=Array.isArray(t)?t:[],this.dims.forEach((e=>this.recomputeDomain(e))),this.emit("records",this.state()),this.emit("change",this.state()),this}registerDimension(t,e){if(!e||typeof e.dimension!="function")throw new Error(`crossfilter.registerDimension("${t}") needs a dimension function.`);let s=e.type||(e.bins?"range":"category"),i={accessor:e.dimension,reducer:Xc(e.reduce),type:s,bins:e.bins,order:e.order,filter:null,labels:[],edges:null,xLabels:[],yLabels:[]};return this.dims.set(t,i),this.recomputeDomain(i),e.filter!=null&&this.setFilterOn(i,e.filter),this}hasDimension(t){return this.dims.has(t)}removeDimension(t){let e=this.dims.get(t),s=!!e&&this.hasFilter(e);return this.dims.delete(t),s&&this.emit("change",this.state()),this}recomputeDomain(t){if(t.type==="matrix"){let e=(function(s,i,a){let n=new Set,r=new Set,o=[],l=[];for(let c=0;c<s.length;c++){let h=i(s[c]);if(!h)continue;let d=h[0],f=h[1];d==null||n.has(d)||(n.add(d),o.push(d)),f==null||r.has(f)||(r.add(f),l.push(f))}return{xLabels:Js(o,a),yLabels:Js(l,a)}})(this.records,t.accessor,t.order);return t.xLabels=e.xLabels,t.yLabels=e.yLabels,void(t.edges=null)}if(t.type==="range")return t.edges=(function(e,s,i){if(i&&Array.isArray(i.thresholds)&&i.thresholds.length>=2){let c=Array.from(new Set(i.thresholds.filter(Jt))).sort(((h,d)=>h-d));return c.length>=2?c.map(Kt):[0,1]}let a=1/0,n=-1/0;for(let c=0;c<e.length;c++){let h=s(e[c]);Jt(h)&&(h<a&&(a=h),h>n&&(n=h))}if(a===1/0)return[0,1];if(a===n){let c=Math.abs(a)>0?Math.abs(a):1;return[Kt(a),Kt(a+c)]}if(i&&Jt(i.width)&&i.width>0){let c=i.width,h=Math.floor(a/c)*c,d=Math.ceil(n/c)*c;d<=h&&(d=h+c);let f=Math.max(1,Math.round((d-h)/c)),g=new Array(f+1);for(let p=0;p<=f;p++)g[p]=Kt(h+p*c);return g}let r=i&&Jt(i.count)&&i.count>=1?Math.floor(i.count):30,o=(n-a)/r,l=new Array(r+1);for(let c=0;c<=r;c++)l[c]=Kt(a+c*o);return l[r]=Kt(n),l})(this.records,t.accessor,t.bins),void(t.labels=Un(t.edges));if(t.labels=(function(e,s,i){let a=new Set,n=[];for(let r=0;r<e.length;r++){let o=s(e[r]);o!=null&&(a.has(o)||(a.add(o),n.push(o)))}return Js(n,i)})(this.records,t.accessor,t.order),t.edges=null,t.filter instanceof Set){let e=new Set(t.labels);Array.from(t.filter).forEach((s=>{e.has(s)||t.filter.delete(s)}))}}filter(t,e){let s=this.dims.get(t);return s?(this.setFilterOn(s,e),this.emit("change",this.state()),this):this}toggleKey(t,e){let s=this.dims.get(t);if(!s||s.type!=="category")return this;s.filter instanceof Set||(s.filter=new Set);let i=s.filter;return i.has(e)?i.delete(e):i.add(e),i.size===0&&(s.filter=null),this.emit("change",this.state()),this}setFilterOn(t,e){if(e==null)return void(t.filter=null);if(t.type==="range"){if(Array.isArray(e)&&e.length===2&&e.every(Jt)){let[i,a]=e;t.filter=[Math.min(i,a),Math.max(i,a)]}else t.filter=null;return}let s=new Set(e);t.filter=s.size?s:null}clear(t){let e=this.dims.get(t);return e&&(e.filter=null),this.emit("change",this.state()),this}reset(){return this.dims.forEach((t=>{t.filter=null})),this.emit("change",this.state()),this}hasFilter(t){return t.filter!=null&&(!(t.filter instanceof Set)||t.filter.size>0)}passes(t,e){if(!this.hasFilter(t))return!0;let s=t.accessor(e);if(t.filter instanceof Set)return t.filter.has(s);if(!Jt(s))return!1;let[i,a]=t.filter;return s>=i&&s<=a}filteredRecords(t){let e=[];return this.dims.forEach(((s,i)=>{i!==t&&this.hasFilter(s)&&e.push(s)})),e.length===0?this.records:this.records.filter((s=>e.every((i=>this.passes(i,s)))))}filteredRows(){return this.filteredRecords(null)}aggregateFor(t){let e=this.dims.get(t);if(!e)return{type:"category",labels:[],values:[],keys:[]};let s=this.filteredRecords(t);if(e.type==="matrix"){let a=new Map(e.xLabels.map(((o,l)=>[o,l]))),n=new Map(e.yLabels.map(((o,l)=>[o,l]))),r=e.yLabels.map((()=>e.xLabels.map((()=>[]))));for(let o=0;o<s.length;o++){let l=e.accessor(s[o]);if(!l)continue;let c=a.get(l[0]),h=n.get(l[1]);c!=null&&h!=null&&r[h][c].push(s[o])}return{type:"matrix",xLabels:e.xLabels.slice(),yLabels:e.yLabels.slice(),matrix:r.map((o=>o.map((l=>e.reducer(l)))))}}if(e.type==="range"){let a=e.edges||[0,1],n=a.length-1,r=Array.from({length:n},(()=>[]));for(let o=0;o<s.length;o++){let l=Oc(e.accessor(s[o]),a);l>=0&&r[l].push(s[o])}return{type:"range",labels:Un(a),values:r.map((o=>e.reducer(o))),keys:r.map(((o,l)=>[a[l],a[l+1]])),edges:a}}let i=new Map;e.labels.forEach((a=>i.set(a,[])));for(let a=0;a<s.length;a++){let n=i.get(e.accessor(s[a]));n&&n.push(s[a])}return{type:"category",labels:e.labels.slice(),values:e.labels.map((a=>e.reducer(i.get(a)||[]))),keys:e.labels.slice()}}aggregateAll(){let t={};return this.dims.forEach(((e,s)=>{t[s]=this.aggregateFor(s)})),t}state(){let t={};return this.dims.forEach(((e,s)=>{this.hasFilter(e)&&(t[s]=e.filter instanceof Set?Array.from(e.filter):e.filter.slice())})),{filters:t,filteredCount:this.filteredRows().length,total:this.records.length}}filterOf(t){let e=this.dims.get(t);return e&&this.hasFilter(e)?e.filter instanceof Set?new Set(e.filter):e.filter.slice():null}on(t,e){let s=this.listeners.get(t);return s||(s=new Set,this.listeners.set(t,s)),s.add(e),()=>this.off(t,e)}off(t,e){var s;return(s=this.listeners.get(t))==null||s.delete(e),this}emit(t,e){var s;(s=this.listeners.get(t))==null||s.forEach((i=>{try{i(e)}catch{}}))}static esc(t){return String(t??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}resolveColumns(t){if(Array.isArray(t)&&t.length)return t.map((s=>typeof s=="string"?{field:s,label:s}:{field:s.field,label:s.label||s.field,format:s.format}));let e=this.records[0];return(e?Object.keys(e):[]).map((s=>({field:s,label:s})))}tableHTML(t,e,s){let i="<thead><tr>"+t.map((n=>`<th>${u.esc(n.label)}</th>`)).join("")+"</tr></thead>",a="<tbody>"+e.map((n=>"<tr>"+t.map((r=>{let o=n[r.field],l=r.format?r.format(o,n):o;return`<td>${u.esc(l)}</td>`})).join("")+"</tr>")).join("")+"</tbody>";return`<table class="apexcharts-cf-table">${`<caption>${e.length} of ${s} rows</caption>`}${i}${a}</table>`}dataTable(t,e){if(!t)return{refresh(){},destroy(){}};let s=e||{},i=this.resolveColumns(s.columns),a=s.pageSize||0,n=s.page||0,r=()=>{let l=this.filteredRows(),c=a?l.slice(n*a,n*a+a):l;t.innerHTML=this.tableHTML(i,c,l.length)};r();let o=this.on("change",r);return{refresh:r,destroy:()=>{o(),t.innerHTML=""}}}destroy(){u.store().delete(this.id),this.dims.clear(),this.listeners.clear(),this.records=[]}},qn="https://apexcharts.com/pricing",qr=!1,ge=new Set;function Bc(u){ge.delete(u)}function jn(){qr=!0,ws()}function Yc(u,t){let e=u&&u.config&&u.config.chart||{},s=[];e.type==="unit"&&s.push("unit"),t.storyboard&&t.storyboard._used&&s.push("storyboard");let i=e.link;return t.linkedViews&&i&&(i.enabled===!0||typeof i.dimension=="function")&&s.push("link"),t.ink&&e.ink&&e.ink.enabled===!0&&s.push("ink"),t.measure&&e.measure&&e.measure.enabled===!0&&s.push("measure"),t.contextMenu&&e.contextMenu&&e.contextMenu.enabled===!0&&s.push("context-menu"),t.perspectives&&(t.perspectives._used||qr)&&s.push("perspectives"),t.history&&e.history&&e.history.enabled===!0&&s.push("history"),s}function zc(u){let t=u&&u.config&&u.config.chart&&u.config.chart.license;if(t)return t;let e=Ht.getKey();if(e)return e;let s=H.getApex();return s&&s.license?s.license:null}var Wc=new Set(["premium","enterprise"]);function Hc(u){if(!u)return!1;let t=Ht.validateKey(u);if(!t.valid)return!1;let e=t.data&&t.data.plan;return typeof e=="string"&&Wc.has(e.toLowerCase())}function Zn(u,t){let e=Fe.add(t,{manage:!1});if(!e||typeof MutationObserver>"u"||u._wmNodeObserver&&u._wmObservedNode===e)return;u._wmNodeObserver&&u._wmNodeObserver.disconnect();let s=new MutationObserver(()=>{let i=Fe.node(t);i&&(s.disconnect(),Fe.applyStyles(i),s.takeRecords(),s.observe(i,{attributes:!0,attributeFilter:["style"]}))});s.observe(e,{attributes:!0,attributeFilter:["style"]}),u._wmNodeObserver=s,u._wmObservedNode=e}function $c(u,t){if(Zn(u,t),typeof MutationObserver>"u"||u._wmWrapObserver)return;let e=new MutationObserver(()=>{Fe.node(t)||Zn(u,t)});e.observe(t,{childList:!0}),u._wmWrapObserver=e}function Zi(u,t){u._wmWrapObserver&&(u._wmWrapObserver.disconnect(),u._wmWrapObserver=null),u._wmNodeObserver&&(u._wmNodeObserver.disconnect(),u._wmNodeObserver=null),u._wmObservedNode=null;let e=t||u.w&&u.w.dom&&u.w.dom.elWrap;e&&Fe.remove(e,{manage:!1})}function Gc(u,t,e){if(u._premiumLicenseNotified)return;u._premiumLicenseNotified=!0;let s=e.length>1;if(!t){console.warn(`[ApexCharts] Premium feature${s?"s":""} in use (${e.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${qn}`);return}let i=Ht.validateKey(t);if(i.valid){let a=i.data&&i.data.plan||"current";console.warn(`[ApexCharts] Premium feature${s?"s":""} in use (${e.join(", ")}) require a Premium or Enterprise license; the ${a} plan does not include ${s?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${qn}`);return}t!==Ht.getKey()&&console.error(`[Apex] ${i.message}`)}function $t(u,t){try{if(!H.isBrowser())return;if(u&&u.globals&&u.globals.isDestroyed){ge.delete(t);return}let e=u&&u.dom&&u.dom.elWrap;if(!e)return;let s=Yc(u,t);if(s.length===0){ge.delete(t),Zi(t,e);return}ge.add(t);let i=zc(u);if(Hc(i)){Zi(t,e);return}$c(t,e),Gc(t,i,s)}catch{}}function ws(){if(!H.isBrowser())return;let u=new Set,t=H.getApex(),e=t&&t._chartInstances;Array.isArray(e)&&e.forEach(s=>{let i=s&&s.chart;i&&i.w&&!i.w.globals.isDestroyed&&(u.add(i),$t(i.w,i))}),Array.from(ge).forEach(s=>{let i=s&&s.w,a=i&&i.dom&&i.dom.elWrap;if(!i||i.globals.isDestroyed||!a||a.isConnected===!1){ge.delete(s);return}u.has(s)||$t(i,s)})}Ht.onChange(ws);var jr=class it{constructor(t,e){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,"_zoomPanSelection"),J(this,"windowResizeHandler"),J(this,"parentResizeHandler"),J(this,"publicMethods",[]),J(this,"eventList",[]),J(this,"_renderPromise",null),J(this,"config"),J(this,"perspectives"),J(this,"storyboard"),J(this,"history"),J(this,"linkedViews"),J(this,"ink"),J(this,"measure"),J(this,"contextMenu"),J(this,"weave"),J(this,"renderer"),J(this,"rendererController"),this.opts=e,this.ctx=this,this.w=new ui(e).init(),this.el=t,this.w.globals.cuid=T.randomId(),this.w.globals.chartID=this.w.config.chart.id?T.escapeString(this.w.config.chart.id):this.w.globals.cuid,xn(this.w),new ts(this).initModules(),this.lastUpdateOptions=null,this._updateStats={fast:0,fastWithAxes:0,full:0},this.create=this.create.bind(this),H.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){var t,e;if(!((e=(t=this.w)==null?void 0:t.config)!=null&&e.chart))return Promise.reject(new Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."));if(this._renderPromise)return this._renderPromise;let s=new Promise((i,a)=>{var n;if(T.elementExists(this.el)){typeof Apex._chartInstances>"u"&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);let r=this.w.config.chart.events.beforeMount;if(typeof r=="function"&&r(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]),H.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),Dc(this.el.parentNode,this.parentResizeHandler);let l=this.el.getRootNode&&this.el.getRootNode(),c=T.is("ShadowRoot",l),h=this.el.ownerDocument,d=c?l.getElementById("apexcharts-css"):h.getElementById("apexcharts-css");if(!d){d=O.createElementNS("http://www.w3.org/1999/xhtml","style"),d.id="apexcharts-css",d.textContent=Tc;let f=((n=this.opts.chart)==null?void 0:n.nonce)||this.w.config.chart.nonce;f&&d.setAttribute("nonce",f),c?l.prepend(d):this.w.config.chart.injectStyleSheet!==!1&&h.head.appendChild(d)}}let o=this.create(this.w.config.series,{});if(!o)return i(this);this.mount(o).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]),i(o)}).catch(l=>{var c,h;let d=l instanceof Error?l:new Error(String(l)),f=d;f.chartId=(h=(c=this.w)==null?void 0:c.globals)==null?void 0:h.chartID,f.el=this.el,a(d)})}else a(new Error("Element not found"))});return this._renderPromise=s,s.catch(()=>{this._renderPromise===s&&(this._renderPromise=null)}),s}create(t,e){var s,i,a,n,r,o;let l=this.w;this.core||new ts(this).initModules();let c=this.w.globals;if(c.noData=!1,c.animationEnded=!1,!T.elementExists(this.el)||(this.responsive.checkResponsiveConfig(e),xn(l),l.config.xaxis.convertedCatToNumeric&&new Lt(l.config).convertCatToNumericXaxis(l.config,this.ctx),this.core.setupElements(),l.config.chart.type==="treemap"&&(l.config.grid.show=!1,l.config.yaxis[0].show=!1),c.svgWidth===0))return c.animationEnded=!0,null;let h=t;t.forEach((v,A)=>{v.hidden&&(h=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:A}))});let d=lt.checkComboSeries(h,l.config.chart.type);c.comboCharts=d.comboCharts,c.comboBarCount=d.comboBarCount;let f=h.every(v=>v.data&&v.data.length===0);(h.length===0||f&&c.collapsedSeries.length<1)&&this.series.handleNoData(),H.isBrowser()&&this.events.setupEventHandlers();let g=this.data.parseData(h);this._writeParsedSeriesData(g.seriesData),this._writeParsedRangeData(g.rangeData),this._writeParsedCandleData(g.candleData),this._writeParsedLabelData(g.labelData),this._writeParsedAxisFlags(g.axisFlags),(s=this.rendererController)==null||s.resolve(),(i=this.weave)==null||i.dispatch("afterParse"),this.theme.init(),new zt(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),(!c.noData||c.collapsedSeries.length===l.seriesData.series.length||l.config.legend.showForSingleSeries)&&((a=this.legend)==null||a.init()),this.series.hasAllSeriesEqualX(),c.axisCharts&&(this.core.coreCalculations(),l.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=l.globals.minX,this.ctx.toolbar.maxX=l.globals.maxX)),this.formatters.heatmapLabelFormatters(),new lt(this.w).getLargestMarkerSize();let b=this.dimensions.plotCoords();this._writeLayoutCoords(b.layout);let x=this.core.xySettings();(n=this.weave)==null||n.dispatch("afterScales",{xyRatios:x}),this.grid.createGridMask();let _=this.core.plotChartType(h,x),w=new Et(this.w,this);w.bringForward(),l.config.dataLabels.background.enabled&&w.dataLabelsBackground(),this.core.shiftGraphPosition(),(o=(r=this.legend)==null?void 0:r.heatmapGradientLegend)==null||o.repositionToPlot(),l.globals.dataPoints>50&&l.dom.elWrap.classList.add("apexcharts-disable-transitions");let y={plot:{left:l.layout.translateX,top:l.layout.translateY,width:l.layout.gridWidth,height:l.layout.gridHeight}};return{elGraph:_,xyRatios:x,dimensions:y}}mount(t=null){let e=this,s=e.w;return new Promise((i,a)=>{var n,r,o,l,c,h,d,f,g,p;if(e.el===null)return a(new Error("Not enough data to display or target element not found"));s.globals.allSeriesCollapsed&&e.series.handleNoData(),e.grid=new Xe(e.w,e);let m=e.grid.drawGrid(),b=ts._featureRegistry.get("annotations");if(e.annotations=b?new b(e.w,{theme:e.theme,timeScale:e.timeScale}):null,(n=e.annotations)==null||n.drawImageAnnos(),(r=e.annotations)==null||r.drawTextAnnos(),s.config.grid.position==="back"&&(m&&s.dom.elGraphical.add(m.el),(o=m?.elGridBorders)!=null&&o.node&&s.dom.elGraphical.add(m.elGridBorders)),Array.isArray(t.elGraph))for(let w=0;w<t.elGraph.length;w++)s.dom.elGraphical.add(t.elGraph[w]);else s.dom.elGraphical.add(t.elGraph);s.config.grid.position==="front"&&(m&&s.dom.elGraphical.add(m.el),(l=m?.elGridBorders)!=null&&l.node&&s.dom.elGraphical.add(m.elGridBorders)),s.config.xaxis.crosshairs.position==="front"&&e.crosshairs.drawXCrosshairs(),s.config.yaxis[0].crosshairs.position==="front"&&e.crosshairs.drawYCrosshairs(),s.config.chart.type!=="treemap"&&e.axes.drawAxis(s.config.chart.type,m);let x=new Wt(this.w,this.ctx,m),_=new be(this.w,{theme:this.theme,timeScale:this.timeScale},m);if(m!==null&&(x.xAxisLabelCorrections(),_.setYAxisTextAlignments(),s.config.yaxis.map((w,y)=>{s.globals.ignoreYAxisIndexes.indexOf(y)===-1&&_.yAxisTitleRotate(y,w.opposite)})),(c=e.annotations)==null||c.drawAxesAnnotations(),!s.globals.noData){if(H.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&((h=e.w.globals.tooltip)==null||h.drawTooltip(t.xyRatios)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&((d=e.keyboardNavigation)==null||d.init()),H.isBrowser()&&s.globals.axisCharts&&(s.axisFlags.isXNumeric||s.config.xaxis.convertedCatToNumeric||s.axisFlags.isRangeBar))(s.config.chart.zoom.enabled||s.config.chart.selection&&s.config.chart.selection.enabled||s.config.chart.pan&&s.config.chart.pan.enabled)&&((f=e.zoomPanSelection)==null||f.init({xyRatios:t.xyRatios}));else{let w=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(v=>{w[v]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&((g=e.toolbar)==null||g.createToolbar())}(p=e.weave)==null||p.dispatch("draw",{pass:"full",xyRatios:t?.xyRatios}),s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(w=>{w.method(w.params,!1,w.context)}),!s.globals.axisCharts&&!s.globals.noData&&e.core.resizeNonAxisCharts(),$t(s,e),i(e)})}destroy(){var t;this._renderPromise=null,H.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),Ec(this.el.parentNode,this.parentResizeHandler),clearTimeout((t=this.w.globals.resizeTimer)!=null?t:void 0));let e=this.w.config.chart.id;e&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEach((s,i)=>{s.id===T.escapeString(e)&&Apex._chartInstances.splice(i,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),Zi(this),Bc(this),new ys(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,s=!0,i=!0,a=!0){let n=this.w;if(t&&"series"in t&&!Array.isArray(t.series)&&(console.warn("ApexCharts: updateOptions() ignored `series` because it is not an array."),t=G({},t),delete t.series),n.interact.selection=void 0,this.lastUpdateOptions){if(T.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&!it._optionsTooBigToCompare(t)&&T.stringifyForCompare(this.lastUpdateOptions.series)===T.stringifyForCompare(t.series)){let r=G({},t),o=G({},this.lastUpdateOptions);if(delete r.series,delete o.series,T.shallowEqual(r,o))return Promise.resolve(this)}}return t.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((r,o)=>this.updateHelpers._extendSeries(r,o))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,e,s,i,a)}updateSeries(t=[],e=!0,s=!0){return Array.isArray(t)?(this.data.resetParsingFlags(),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,s)):(console.warn("ApexCharts: updateSeries() ignored the call because the series is not an array."),Promise.resolve(this))}appendSeries(t,e=!0,s=!0){this.data.resetParsingFlags();let i=this.w.config.series.slice();return i.push(t),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,s)}appendData(t,e=!0){let s=this;s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.w.config.chart.animations.enabled&&s.series.getPreviousPaths();let i=s.w.globals.histogramRawSeries;if(i){for(let n=0;n<i.length;n++){let r=t[n];if(r&&Array.isArray(r.data)&&Array.isArray(i[n].data))for(let o=0;o<r.data.length;o++)i[n].data.push(r.data[o])}return this.update()}let a=s.w.config.series.slice();for(let n=0;n<a.length;n++)if(t[n]!==null&&typeof t[n]<"u"){let r=t[n],o=a[n];for(let l=0;l<r.data.length;l++)o.data.push(r.data[l])}return Cl(a,s.w),s.w.config.series=a,e&&(s.w.globals.initialSeries=s.w.config.series),this.update()}static _optionsTooBigToCompare(t){let e=t&&t.series;if(!Array.isArray(e))return!1;let s=0;for(let i=0;i<e.length;i++){let a=e[i]&&e[i].data;if(s+=Array.isArray(a)?a.length:1,s>1e3)return!0}return!1}update(t){return new Promise((e,s)=>{if(t&&this.lastUpdateOptions&&!it._optionsTooBigToCompare(t)&&T.stringifyForCompare(this.lastUpdateOptions)===T.stringifyForCompare(t))return e(this);this.lastUpdateOptions=t&&!it._optionsTooBigToCompare(t)?T.clone(t):null,new ys(this.ctx).clear({isUpdating:!0});let i=this.create(this.w.config.series,t??{});if(!i)return e(this);this.mount(i).then(()=>{var a;(a=this.morphTypeChange)==null||a.applyChromeFade(),Ol(this.w),zl(this.w),typeof this.w.config.chart.events.updated=="function"&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent("updated",[this,this.w]),this.w.globals.isDirty=!0,e(this)}).catch(a=>{s(a)})})}_fastAxisChromeRefresh(t){let e=this.w,s=e.globals;this._fastAxisBailReason="";try{if(s.isBarHorizontal)return this._fastAxisBailReason="barHorizontal",!1;if(e.config.chart.sparkline.enabled)return!0;let i=e.config.annotations;if(i&&(i.yaxis&&i.yaxis.length||i.xaxis&&i.xaxis.length||i.points&&i.points.length||i.texts&&i.texts.length||i.images&&i.images.length))return this._fastAxisBailReason="annotations",!1;if(e.config.chart.ink&&e.config.chart.ink.enabled)return this._fastAxisBailReason="ink",!1;let a=this.dimensions;if(!a||!a.dimYAxis)return this._fastAxisBailReason="noDimensions",!1;let n=e.layout.yLabelsCoords,r=e.layout.yTitleCoords,o=a.dimYAxis.getyAxisLabelsCoords(),l=a.dimYAxis.getyAxisTitleCoords();e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((w,y)=>{e.layout.yLabelsCoords.push({width:o[y].width,index:y}),e.layout.yTitleCoords.push({width:l[y].width,index:y})});let c=a.dimYAxis.getTotalYAxisWidth();if(c>a.yAxisWidth+2)return e.layout.yLabelsCoords=n,e.layout.yTitleCoords=r,this._fastAxisBailReason=`labelWidth ${c} > ${a.yAxisWidth}`,!1;let h=e.dom.elGraphical.node,d=h.querySelector(".apexcharts-grid"),f=h.querySelector(".apexcharts-grid-borders");if(!d)return this._fastAxisBailReason="missingGridNode",!1;let g=d.parentNode,p=f?f.nextSibling:d.nextSibling;d.remove(),f&&f.remove(),h.querySelectorAll(".apexcharts-xaxis-tick").forEach(w=>w.remove()),this.grid=new Xe(e,this);let m=this.grid.drawGrid();m&&m.el&&(g.insertBefore(m.el.node,p),m.elGridBorders&&m.elGridBorders.node&&g.insertBefore(m.elGridBorders.node,p));let b=new Wt(this.w,this.ctx,m),x=h.querySelector(".apexcharts-xaxis");if(x){let w=x.parentNode,y=x.nextSibling;x.remove();let v=b.drawXaxis();w.insertBefore(v.node,y)}let _=new be(this.w,{theme:this.theme,timeScale:this.timeScale},m);for(let w=0;w<e.config.yaxis.length;w++){if(s.ignoreYAxisIndexes.indexOf(w)!==-1)continue;let y=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${w}']`);if(!y)return this._fastAxisBailReason="missingYAxisNode",!1;let v=y.parentNode;if(!v)return this._fastAxisBailReason="missingYAxisParent",!1;let A=y.nextSibling;y.remove();let S=_.drawYaxis(w);v.insertBefore(S.node,A)}return m!==null&&(b.xAxisLabelCorrections(),_.setYAxisTextAlignments(),e.config.yaxis.map((w,y)=>{s.ignoreYAxisIndexes.indexOf(y)===-1&&_.yAxisTitleRotate(y,w.opposite)})),!0}catch(i){return this._fastAxisBailReason="error: "+(i&&i.message),!1}}fastUpdate(t,e){return new Promise((s,i)=>{var a,n,r;try{let o=this.w,l=o.globals;l.shouldAnimate=t,l.dataChanged=!0,l.animationEnded=!1,Ne.invalidateSelectors(o);let c=o.globals;c.maxY=-Number.MAX_VALUE,c.minY=Number.MIN_VALUE,c.minYArr=[],c.maxYArr=[],c.maxX=-Number.MAX_VALUE,c.minX=Number.MAX_VALUE,c.initialMaxX=-Number.MAX_VALUE,c.initialMinX=Number.MAX_VALUE,c.yAxisScale=[],c.xAxisScale=null,c.xAxisTicksPositions=[],c.xRange=0,c.yRange=[],c.zRange=0,c.xTickAmount=0,c.multiAxisTickAmount=0,c.pointsArray=[],c.barCanvasCoords=null,c.dataLabelsRects=[],c.lastDrawnDataLabelsIndexes=[],c.textRectsCache=new Map,c.domCache=new Map,c.cachedSelectors={},c.disableZoomIn=!1,c.disableZoomOut=!1,l.axisCharts&&(this.core.coreCalculations(),o.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters();let h=this.core.xySettings();this._zoomPanSelection&&(this._zoomPanSelection.xyRatios=h);let d=JSON.stringify({y:(l.yAxisScale||[]).map(S=>S?S.result:null),xMin:l.minX,xMax:l.maxX}),f=l.axisCharts&&e!=null&&d!==e;if(f&&!this._fastAxisChromeRefresh(h))return this._updateStats.full++,this.update().then(()=>s(this)).catch(i);f?this._updateStats.fastWithAxes++:this._updateStats.fast++,(a=this.weave)==null||a.dispatch("afterScales",{pass:"fast",xyRatios:h});let g=this.ctx.renderer,p=!!(g&&g.kind==="canvas"&&g.canRepaintInPlace&&g.canRepaintInPlace());p&&(g._repaintHostInPlace=!0);let m=o.dom.elGraphical.node;m.querySelectorAll((p?"":".apexcharts-canvas-series-wrap, ")+".apexcharts-plot-series, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(S=>{var C;return(C=S.parentNode)==null?void 0:C.removeChild(S)});let x=this.core.plotChartType(o.config.series,h),_=m.querySelector(".apexcharts-grid"),w=m.querySelector(".apexcharts-xaxis"),y=Array.isArray(x)?x:[x],v=_&&o.config.grid.position==="front"?_:w;v?y.forEach(S=>{let C=S&&S.node?S.node:S;C&&m.insertBefore(C,v)}):y.forEach(S=>{o.dom.elGraphical.add(S)});let A=new Et(o,this);A.bringForward(),o.config.dataLabels.background.enabled&&A.dataLabelsBackground(),H.isBrowser()&&o.config.tooltip.enabled&&!l.noData&&((n=o.globals.tooltip)==null||n.drawTooltip(h)),(r=this.weave)==null||r.dispatch("draw",{pass:"fast",xyRatios:h}),typeof o.config.chart.events.updated=="function"&&o.config.chart.events.updated(this,o),this.events.fireEvent("updated",[this,o]),$t(o,this),l.isDirty=!0,s(this)}catch(o){i(o)}})}getSyncedCharts(){let t=this.getGroupedCharts();return t.splice(0,0,this),t}getGroupedCharts(){return Apex._chartInstances.filter(t=>this!==t.chart&&!!this.w.config.chart.group&&this.w.config.chart.group===t.group).map(t=>t.chart)}static getChartByID(t){let e=T.escapeString(t);if(!Apex._chartInstances)return;let s=Apex._chartInstances.filter(i=>i.id===e)[0];return s&&s.chart}static initOnLoad(){var t;let e=document.querySelectorAll("[data-apexcharts]");for(let s=0;s<e.length;s++){let i=e[s],a=JSON.parse((t=e[s].getAttribute("data-options"))!=null?t:"");new it(i,a).render()}}static exec(t,e,...s){let i=this.getChartByID(t);if(!i)return;i.w.globals.isExecCalled=!0;let a=null;return i.publicMethods.indexOf(e)!==-1&&(a=i[e](...s)),a}static merge(t,e){return T.extend(t,e)}static getThemePalettes(){return mi()}static use(t){Nn(t)}static registerFeatures(t){ts.registerFeatures(t)}static setLicense(t){return Ht.setLicense(t),ws(),it}static registerPlugin(t){return kc(t),it}static unregisterPlugin(t){return Lc(t),it}static registerRenderer(t,e){xs.registerRenderer(t,e)}static registerSeriesType(t,e){let s=it._customSeriesFactory;return s?!e||typeof e.renderItem!="function"?(console.warn(`[apexcharts] registerSeriesType("${t}") needs a def with a renderItem() function.`),it):sc(t)&&!Yt(t)?(console.warn(`[apexcharts] registerSeriesType("${t}") would override the built-in "${t}" chart type; pick another name.`),it):(Nn({[t]:s(t,e)}),ec(t),it):(console.warn(`[apexcharts] registerSeriesType("${t}") requires the Marks feature: import 'apexcharts/features/marks'.`),it)}static unregisterSeriesType(t){return Yt(t)&&ic(t),it}static registerTheme(t,e){return $l(t,e),it}static unregisterTheme(t){return Vl(t),it}static registerEasing(t,e){return bl(t,e),it}static registerUnitLayout(t,e){return vc(t,e),it}static unregisterUnitLayout(t){return Ac(t),it}static registerRowSource(t,e){return Es(t,e),it}static unregisterRowSource(t){return Sc(t),it}rowSeries(t){let e=Cc(this.w);return e&&e(this.w,t)||null}static crossfilter(t){if(!t||typeof t.id!="string")throw new Error("ApexCharts.crossfilter requires an { id } string.");let e=it._crossfilterFactory;if(!e)return console.warn("[apexcharts] ApexCharts.crossfilter(...) requires the link feature: import 'apexcharts/features/link'."),null;let s=e(t);return ws(),s}static getCrossfilter(t){let e=it._crossfilterGet;return e?e(t):null}clearCrossfilter(){var t;(t=this.linkedViews)==null||t.clearGroup()}startMeasure(){var t;(t=this.measure)==null||t.startMeasure()}stopMeasure(){var t;(t=this.measure)==null||t.stopMeasure()}clearMeasures(){var t;(t=this.measure)==null||t.clearMeasures()}toggleSeries(t){return this.series.toggleSeries(t)}highlightSeriesOnLegendHover(t,e){return this.series.toggleSeriesOnHover(t,e)}showSeries(t){this.series.showSeries(t)}hideSeries(t){this.series.hideSeries(t)}highlightSeries(t){this.series.highlightSeries(t)}isSeriesHidden(t){return this.series.isSeriesHidden(t)}resetSeries(t=!0,e=!0){this.series.resetSeries(t,e)}addEventListener(t,e){this.events.addEventListener(t,e)}removeEventListener(t,e){this.events.removeEventListener(t,e)}addXaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addXaxisAnnotationExternal(t,e,a)}addYaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addYaxisAnnotationExternal(t,e,a)}addPointAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addPointAnnotationExternal(t,e,a)}clearAnnotations(t=void 0){var e;let s=this;t&&(s=t),s.lastUpdateOptions=null,(e=s.annotations)==null||e.clearAnnotations(s)}removeAnnotation(t,e=void 0){var s;let i=this;e&&(i=e),i.lastUpdateOptions=null,(s=i.annotations)==null||s.removeAnnotation(i,t)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}getHighestValueInSeries(t=0){return new Oe(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new Oe(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){let t=this.w,e=t.globals;return{series:t.seriesData.series,seriesNames:t.seriesData.seriesNames,colors:e.colors,labels:t.labelData.labels,seriesTotals:e.seriesTotals,seriesPercent:e.seriesPercent,seriesXvalues:e.seriesXvalues,seriesYvalues:e.seriesYvalues,minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,minXDiff:e.minXDiff,dataPoints:e.dataPoints,xAxisScale:e.xAxisScale,yAxisScale:e.yAxisScale,xTickAmount:e.xTickAmount,isXNumeric:t.axisFlags.isXNumeric,seriesYAxisMap:e.seriesYAxisMap,seriesYAxisReverseMap:e.seriesYAxisReverseMap,svgWidth:e.svgWidth,svgHeight:e.svgHeight,gridWidth:t.layout.gridWidth,gridHeight:t.layout.gridHeight,selectedDataPoints:t.interact.selectedDataPoints,collapsedSeriesIndices:e.collapsedSeriesIndices,zoomed:t.interact.zoomed,seriesX:t.seriesData.seriesX,seriesZ:t.seriesData.seriesZ,seriesCandleO:t.candleData.seriesCandleO,seriesCandleH:t.candleData.seriesCandleH,seriesCandleM:t.candleData.seriesCandleM,seriesCandleL:t.candleData.seriesCandleL,seriesCandleC:t.candleData.seriesCandleC,seriesRangeStart:t.rangeData.seriesRangeStart,seriesRangeEnd:t.rangeData.seriesRangeEnd,seriesGoals:t.seriesData.seriesGoals}}toggleDataPointSelection(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}zoomX(t,e){var s;(s=this.ctx.toolbar)==null||s.zoomUpdateOptions(t,e)}setLocale(t){this.localization.setCurrentLocaleValues(t)}dataURI(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.dataURI(t)}getSvgString(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.getSvgString(t)}exportToCSV(t={}){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.exportToCSV(t)}paper(){return this.w.dom.Paper}getActiveRenderer(){return this.rendererController?this.rendererController.getActiveKind():"svg"}refreshTokens(){return this.lastUpdateOptions=null,this.update()}drillDown(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillDown(t)}drillUp(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillUp()}drillToRoot(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillToRoot()}clearDrilldownCache(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.clearCache(t)}static _writeDataProps(t,e){for(let s of Object.keys(e)){let i=Object.getOwnPropertyDescriptor(e,s);i&&"value"in i&&(t[s]=i.value)}}_writeParsedSeriesData(t){it._writeDataProps(this.w.seriesData,t)}_writeParsedRangeData(t){it._writeDataProps(this.w.rangeData,t)}_writeParsedCandleData(t){it._writeDataProps(this.w.candleData,t)}_writeParsedLabelData(t){it._writeDataProps(this.w.labelData,t)}_writeParsedAxisFlags(t){it._writeDataProps(this.w.axisFlags,t)}_writeLayoutCoords(t){it._writeDataProps(this.w.layout,t)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{let t=this.w.globals;if(this.core&&t.lastResizeSignature){let e=this.core.getResizeSignature();if(e.w===t.lastResizeSignature.w&&e.h===t.lastResizeSignature.h&&e.iw===t.lastResizeSignature.iw)return}t.resized=!0,t.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){var t;clearTimeout((t=this.w.globals.resizeTimer)!=null?t:void 0);let{redrawOnWindowResize:e}=this.w.config.chart;typeof e=="function"&&(e=e()),e&&this._windowResize()}};J(jr,"perspectives",null);var ht=jr,vs=class{constructor(t,e){this.w=t,this.ctx=e}svgStringToNode(t){return new DOMParser().parseFromString(t,"image/svg+xml").documentElement}scaleSvgNode(t,e){let s=parseFloat(t.getAttributeNS(null,"width")),i=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",s*e),t.setAttributeNS(null,"height",i*e),t.setAttributeNS(null,"viewBox","0 0 "+s+" "+i)}inlineCanvasLayers(t){let e=this.w,s="http://www.w3.org/1999/xlink",i=e.dom.elWrap.querySelectorAll(".apexcharts-series-canvas");if(!i.length)return;let a=t.querySelectorAll(".apexcharts-canvas-series");for(let n=0;n<i.length&&n<a.length;n++){let r;try{r=i[n].toDataURL()}catch{continue}let o=a[n],l=document.createElementNS(et,"image");l.setAttribute("x",o.getAttribute("x")||"0"),l.setAttribute("y",o.getAttribute("y")||"0"),l.setAttribute("width",o.getAttribute("width")||"0"),l.setAttribute("height",o.getAttribute("height")||"0"),l.setAttribute("href",r),l.setAttributeNS(s,"xlink:href",r),o.parentNode&&o.parentNode.replaceChild(l,o)}}queryStyleable(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))}setStyleDefaults(t,e){Object.keys(e).forEach(s=>{t.style.getPropertyValue(s)===""&&t.style.setProperty(s,e[s])})}applyExportStyles(t){let e=this.w;this.queryStyleable(t,"style").forEach(s=>s.remove()),this.queryStyleable(t,[".apexcharts-tooltip",".apexcharts-toolbar",".apexcharts-xaxistooltip",".apexcharts-yaxistooltip",".apexcharts-xcrosshairs",".apexcharts-ycrosshairs",".apexcharts-zoom-rect",".apexcharts-selection-rect"].join(", ")).forEach(s=>{s.style.setProperty("display","none","important")}),this.queryStyleable(t,".apexcharts-flip-y").forEach(s=>{this.setStyleDefaults(s,{transform:"scaleY(-1) translateY(-100%)","transform-origin":"top","transform-box":"fill-box"})}),this.queryStyleable(t,".apexcharts-flip-x").forEach(s=>{this.setStyleDefaults(s,{transform:"scaleX(-1)","transform-origin":"center","transform-box":"fill-box"})}),!(!e.config.legend.show||!e.dom.elLegendWrap||!e.dom.elLegendWrap.children.length)&&(this.queryStyleable(t,".apexcharts-legend").forEach(s=>{this.setStyleDefaults(s,{display:"flex",overflow:"auto",padding:"0 10px"});let i=s.classList,a=i.contains("apx-legend-position-left")||i.contains("apx-legend-position-right"),n=i.contains("apx-legend-position-top")||i.contains("apx-legend-position-bottom");i.contains("apexcharts-legend-group-horizontal")&&this.setStyleDefaults(s,{"flex-direction":"column"}),a&&this.setStyleDefaults(s,{"flex-direction":"column",bottom:"0"}),n&&this.setStyleDefaults(s,{"flex-wrap":"wrap"}),a||n&&i.contains("apexcharts-align-left")?this.setStyleDefaults(s,{"justify-content":"flex-start","align-items":"flex-start"}):n&&i.contains("apexcharts-align-center")?this.setStyleDefaults(s,{"justify-content":"center","align-items":"center"}):n&&i.contains("apexcharts-align-right")&&this.setStyleDefaults(s,{"justify-content":"flex-end","align-items":"flex-end"})}),this.queryStyleable(t,".apexcharts-legend-group").forEach(s=>{this.setStyleDefaults(s,{display:"flex"})}),this.queryStyleable(t,".apexcharts-legend-group-vertical").forEach(s=>{this.setStyleDefaults(s,{"flex-direction":"column-reverse"})}),this.queryStyleable(t,".apexcharts-legend-series").forEach(s=>{this.setStyleDefaults(s,{cursor:s.classList.contains("apexcharts-no-click")?"auto":"pointer","line-height":"normal",display:"flex","align-items":"center"})}),this.queryStyleable(t,".apexcharts-legend-text").forEach(s=>{this.setStyleDefaults(s,{position:"relative","font-size":"14px"})}),this.queryStyleable(t,".apexcharts-legend-marker").forEach(s=>{this.setStyleDefaults(s,{position:"relative",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer","margin-right":"1px"})}),this.queryStyleable(t,".apexcharts-inactive-legend").forEach(s=>{this.setStyleDefaults(s,{opacity:"0.45"})}),this.queryStyleable(t,".apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series").forEach(s=>{s.style.setProperty("display","none","important")}))}resolveExportBackground(){let t=this.w,e=t.config.chart.background;return e&&e!=="transparent"?e:t.config.theme.mode==="dark"?"#343A3F":"#fff"}collectFontFamilies(){let t=new Set,e=this.w;if(!H.isBrowser()||!e.dom.elWrap)return t;let s=this.queryStyleable(e.dom.elWrap,"text, tspan, .apexcharts-legend-text, .apexcharts-title-text, .apexcharts-subtitle-text");return[e.dom.elWrap,...s].forEach(a=>{let n=O.getComputedStyle(a),r=n&&n.fontFamily;r&&r.split(",").forEach(o=>{let l=o.trim().replace(/^['"]|['"]$/g,"");l&&t.add(l.toLowerCase())})}),t}collectFontFaceRules(){if(!H.isBrowser())return Promise.resolve([]);let t=[],e=[],s=a=>{(a.match(/@font-face\s*\{[^}]*\}/gi)||[]).forEach(r=>{let o=r.match(/font-family\s*:\s*([^;}]+)/i);if(!o)return;let l=o[1].trim().replace(/^['"]|['"]$/g,"");t.push({family:l.toLowerCase(),css:r})})};return Array.from(document.styleSheets||[]).forEach(a=>{let n=null;try{n=a.cssRules}catch{n=null}if(n){Array.from(n).forEach(r=>{r.type===5&&r.cssText&&s(r.cssText)});return}a.href&&e.push(fetch(a.href).then(r=>r.ok?r.text():"").then(s).catch(()=>{}))}),Promise.all(e).then(()=>t)}embedFonts(t){let e=this.w;if(!H.isBrowser()||!e.config.chart.toolbar.export.embedFonts||typeof fetch!="function")return Promise.resolve();let s=this.collectFontFamilies();return s.size?this.collectFontFaceRules().then(i=>{let a=i.filter(n=>s.has(n.family));return a.length?Promise.all(a.map(n=>this.inlineFontFaceUrls(n.css).catch(()=>null))):Promise.resolve([])}).then(i=>{let a=(i||[]).filter(Boolean).join(`
|
|
`);if(!a)return;let n=document.createElementNS(et,"style");n.textContent=a,t.insertBefore(n,t.firstChild)}).catch(()=>{}):Promise.resolve()}inlineFontFaceUrls(t){let e=[],s=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi,i;for(;(i=s.exec(t))!==null;)i[2].startsWith("data:")||e.push(i[2]);return e.length?Promise.all(e.map(a=>this.fetchAsDataUri(a).then(n=>({url:a,dataUri:n})).catch(()=>({url:a,dataUri:null})))).then(a=>{let n=t,r=0;return a.forEach(({url:o,dataUri:l})=>{l&&(n=n.split(o).join(l),r++)}),r?n:null}):Promise.resolve(t.includes("data:")?t:null)}fetchAsDataUri(t){return typeof fetch!="function"||typeof btoa!="function"?Promise.reject(new Error("fetch unavailable")):fetch(t).then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status} for ${t}`);let s=e.headers.get("content-type")||"application/octet-stream";return e.arrayBuffer().then(i=>{let a=new Uint8Array(i),n="",r=32768;for(let o=0;o<a.length;o+=r)n+=String.fromCharCode.apply(null,a.subarray(o,o+r));return`data:${s};base64,${btoa(n)}`})})}getSvgString(t){return new Promise(e=>{let s=this.w,i=t||s.config.chart.toolbar.export.scale||s.config.chart.toolbar.export.width/s.globals.svgWidth;i||(i=1);let a=s.globals.svgWidth*i,n=s.globals.svgHeight*i,r=s.dom.elWrap.cloneNode(!0);r.style.width=a+"px",r.style.height=n+"px",this.inlineCanvasLayers(r),this.applyExportStyles(r);let o=new XMLSerializer().serializeToString(r),l=`
|
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
version="1.1"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
class="apexcharts-svg"
|
|
xmlns:data="ApexChartsNS"
|
|
transform="translate(0, 0)"
|
|
width="${s.globals.svgWidth}px" height="${s.globals.svgHeight}px">
|
|
<foreignObject width="100%" height="100%">
|
|
<div xmlns="http://www.w3.org/1999/xhtml" style="width:${a}px; height:${n}px;">
|
|
${o}
|
|
</div>
|
|
</foreignObject>
|
|
</svg>
|
|
`,c=this.svgStringToNode(l);i!==1&&this.scaleSvgNode(c,i),Promise.all([this.convertImagesToBase64(c),this.embedFonts(c)]).then(()=>{l=new XMLSerializer().serializeToString(c),e(l.replace(/ /g," "))})})}convertImagesToBase64(t){let e="http://www.w3.org/1999/xlink",s=t.getElementsByTagName("image"),i=Array.from(s).map(a=>{let n=a.getAttributeNS(e,"href"),r=a.getAttribute("href"),o=n||r;if(!o||o.startsWith("data:"))return Promise.resolve();let l=c=>{n&&a.setAttributeNS(e,"href",c),(r||!n)&&a.setAttribute("href",c)};return this.fetchAsDataUri(o).then(l).catch(()=>this.getBase64FromUrl(o).then(l).catch(c=>{console.error("Error converting image to base64:",c)}))});return Promise.all(i)}getBase64FromUrl(t){return H.isSSR()?Promise.resolve(t):new Promise((e,s)=>{let i=new Image;i.crossOrigin="Anonymous",i.onload=()=>{let a=document.createElement("canvas");a.width=i.width,a.height=i.height;let n=a.getContext("2d");n&&n.drawImage(i,0,0),e(a.toDataURL())},i.onerror=s,i.src=t})}svgUrl(){return new Promise(t=>{this.getSvgString().then(e=>{let s=new Blob([e],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(s))})})}dataURI(t){return H.isSSR()?Promise.resolve({imgURI:""}):new Promise(e=>{let s=this.w,i=t?t.scale||t.width/s.globals.svgWidth:1,a=document.createElement("canvas");a.width=s.globals.svgWidth*i,a.height=parseInt(s.dom.elWrap.style.height,10)*i;let n=this.resolveExportBackground(),r=a.getContext("2d");r&&(r.fillStyle=n,r.fillRect(0,0,a.width,a.height),this.getSvgString(i).then(o=>{let l="data:image/svg+xml,"+encodeURIComponent(o),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{r.drawImage(c,0,0);let h=a;if(h.msToBlob){let d=h.msToBlob();e({blob:d})}else{let d=a.toDataURL("image/png");e({imgURI:d})}},c.src=l}))})}exportToSVG(){this.svgUrl().then(t=>{this.triggerDownload(t,this.w.config.chart.toolbar.export.svg.filename,".svg")})}exportToPng(){let t=this.w.config.chart.toolbar.export.scale,e=this.w.config.chart.toolbar.export.width,s=t?{scale:t}:e?{width:e}:void 0;this.dataURI(s).then(({imgURI:i,blob:a})=>{a?navigator.msSaveOrOpenBlob(a,this.w.globals.chartID+".png"):this.triggerDownload(i,this.w.config.chart.toolbar.export.png.filename,".png")})}exportToCSV({series:t,fileName:e,columnDelimiter:s=",",lineDelimiter:i=`
|
|
`}){let a=this.w;t||(t=a.config.series);let n=[],r=[],o="",l="\uFEFF",c=a.seriesData.series.map((y,v)=>a.globals.collapsedSeriesIndices.indexOf(v)===-1?y:[]),h=y=>{if(y==null||T.isNumber(y))return y;let v=String(y);return/^[=+\-@\t\r]/.test(v)?`'${v}`:v},d=y=>typeof a.config.chart.toolbar.export.csv.categoryFormatter=="function"?a.config.chart.toolbar.export.csv.categoryFormatter(y):a.config.xaxis.type==="datetime"&&String(y).length>=10?new Date(y).toDateString():T.isNumber(y)?y:h(y.split(s).join("")),f=y=>typeof a.config.chart.toolbar.export.csv.valueFormatter=="function"?a.config.chart.toolbar.export.csv.valueFormatter(y):h(y),g=Math.max(...t.map(y=>y.data?y.data.length:0)),p=new Ye(this.w),m=new Ct(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),b=y=>{let v="";if(!a.globals.axisCharts)v=a.config.labels[y];else{if(a.config.xaxis.type==="category"||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){let A=a.formatters.yLabelFormatters[0],C=new ct(this.ctx.w).getActiveConfigSeriesIndex();v=A(a.labelData.labels[y],{seriesIndex:C,dataPointIndex:y,w:a})}else v=m.getLabel(a.labelData.labels,a.labelData.timescaleLabels,0,y).text;a.config.xaxis.type==="datetime"&&(a.config.xaxis.categories.length?v=a.config.xaxis.categories[y]:a.config.labels.length&&(v=a.config.labels[y]))}return v===null?"nullvalue":(Array.isArray(v)&&(v=v.join(" ")),T.isNumber(v)?v:v.split(s).join(""))},x=()=>[...Array(g)].map(()=>""),_=(y,v)=>{var A,S,C,M,k,L;if(n.length&&v===0&&r.push(n.join(s)),y.data){let E=y.data.length?y.data:x();for(let D=0;D<E.length;D++){n=[];let P=b(D);if(P!=="nullvalue"){if(P||(p.isFormatXY()?P=t[v].data[D].x:p.isFormat2DArray()&&(P=t[v].data[D]?t[v].data[D][0]:"")),v===0){n.push(d(P));for(let F=0;F<a.seriesData.series.length;F++){let R=p.isFormatXY()?(A=t[F].data[D])==null?void 0:A.y:c[F][D];n.push(f(R))}}(a.config.chart.type==="candlestick"||y.type&&y.type==="candlestick")&&(n.pop(),n.push(a.candleData.seriesCandleO[v][D]),n.push(a.candleData.seriesCandleH[v][D]),n.push(a.candleData.seriesCandleL[v][D]),n.push(a.candleData.seriesCandleC[v][D])),(a.config.chart.type==="boxPlot"||y.type&&y.type==="boxPlot")&&(n.pop(),n.push(a.candleData.seriesCandleO[v][D]),n.push(a.candleData.seriesCandleH[v][D]),n.push(a.candleData.seriesCandleM[v][D]),n.push(a.candleData.seriesCandleL[v][D]),n.push(a.candleData.seriesCandleC[v][D])),a.config.chart.type==="rangeBar"&&(n.pop(),n.push(a.rangeData.seriesRangeStart[v][D]),n.push(a.rangeData.seriesRangeEnd[v][D])),(a.config.chart.type==="violin"||y.type&&y.type==="violin")&&(n.pop(),n.push((S=a.violinData.seriesViolinMin[v])==null?void 0:S[D]),n.push((C=a.violinData.seriesViolinMax[v])==null?void 0:C[D]),n.push((L=(k=(M=a.violinData.seriesViolinPoints[v])==null?void 0:M[D])==null?void 0:k.length)!=null?L:0)),n.length&&r.push(n.join(s))}}}},w=()=>{let y=new Set,v={};t.forEach((A,S)=>{A?.data.forEach(C=>{let M,k;if(p.isFormatXY())M=C.x,k=C.y;else if(p.isFormat2DArray())M=C[0],k=C[1];else return;v[M]||(v[M]=Array(t.length).fill("")),v[M][S]=f(k),y.add(M)})}),n.length&&r.push(n.join(s)),Array.from(y).sort().forEach(A=>{let S=v[A];r.push([d(A),...S].join(s))})};n.push(a.config.chart.toolbar.export.csv.headerCategory),a.config.chart.type==="boxPlot"?(n.push("minimum"),n.push("q1"),n.push("median"),n.push("q3"),n.push("maximum")):a.config.chart.type==="candlestick"?(n.push("open"),n.push("high"),n.push("low"),n.push("close")):a.config.chart.type==="rangeBar"?(n.push("minimum"),n.push("maximum")):a.config.chart.type==="violin"?(n.push("minimum"),n.push("maximum"),n.push("observations")):t.map((y,v)=>{let A=(y.name?y.name:`series-${v}`)+"";a.globals.axisCharts&&n.push(A.split(s).join("")?A.split(s).join(""):`series-${v}`)}),a.globals.axisCharts||(n.push(a.config.chart.toolbar.export.csv.headerValue),r.push(n.join(s))),!a.globals.allSeriesHasEqualX&&a.globals.axisCharts&&!a.config.xaxis.categories.length&&!a.config.labels.length?w():t.map((y,v)=>{a.globals.axisCharts?_(y,v):(n=[],n.push(d(a.labelData.labels[v])),n.push(f(c[v])),r.push(n.join(s)))}),o+=r.join(i),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent(l+o),e||a.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(t,e,s){if(H.isSSR())return;let i=document.createElement("a");i.href=t,i.download=(e||this.w.globals.chartID)+s,document.body.appendChild(i),i.click(),document.body.removeChild(i)}};ht.registerFeatures({exports:vs});var Vc=`.apexcharts-flip-y {
|
|
transform: scaleY(-1) translateY(-100%);
|
|
transform-origin: top;
|
|
transform-box: fill-box;
|
|
}
|
|
.apexcharts-flip-x {
|
|
transform: scaleX(-1);
|
|
transform-origin: center;
|
|
transform-box: fill-box;
|
|
}
|
|
.apexcharts-legend {
|
|
display: flex;
|
|
overflow: auto;
|
|
padding: 0 10px;
|
|
}
|
|
.apexcharts-legend.apexcharts-legend-group-horizontal {
|
|
flex-direction: column;
|
|
}
|
|
.apexcharts-legend-group {
|
|
display: flex;
|
|
}
|
|
.apexcharts-legend-group-vertical {
|
|
flex-direction: column-reverse;
|
|
}
|
|
.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
|
|
flex-wrap: wrap
|
|
}
|
|
.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
|
|
flex-direction: column;
|
|
bottom: 0;
|
|
}
|
|
.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 {
|
|
justify-content: flex-start;
|
|
align-items: flex-start;
|
|
}
|
|
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
|
|
justify-content: flex-end;
|
|
align-items: flex-end;
|
|
}
|
|
.apexcharts-legend-series {
|
|
cursor: pointer;
|
|
line-height: normal;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.apexcharts-legend-text {
|
|
position: relative;
|
|
font-size: 14px;
|
|
}
|
|
.apexcharts-legend-text *, .apexcharts-legend-marker * {
|
|
pointer-events: none;
|
|
}
|
|
.apexcharts-legend-marker {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
margin-right: 1px;
|
|
}
|
|
|
|
.apexcharts-legend-series.apexcharts-no-click {
|
|
cursor: auto;
|
|
}
|
|
.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
|
|
display: none !important;
|
|
}
|
|
.apexcharts-inactive-legend {
|
|
opacity: 0.45;
|
|
} `,Uc=class{constructor(t){this.w=t.w,this.lgCtx=t}getLegendStyles(){if(H.isSSR())return null;let t=document.createElement("style");t.setAttribute("type","text/css");let e=this.w.config.chart.nonce;e&&t.setAttribute("nonce",e);let s=document.createTextNode(Vc);return t.appendChild(s),t}getLegendDimensions(){let e=this.w.dom.baseEl.querySelector(".apexcharts-legend");if(!e)return{clwh:0,clww:0};let{width:s,height:i}=e.getBoundingClientRect();return{clwh:i,clww:s}}appendToForeignObject(){var t;let e=this.getLegendStyles();this.w.config.chart.injectStyleSheet!==!1&&e&&((t=this.w.dom.elLegendForeign)==null||t.appendChild(e))}toggleDataSeries(t,e){var s,i,a;let n=this.w;if(n.globals.axisCharts||n.config.chart.type==="radialBar"){n.globals.resized=!0;let r=null,o=null;if(n.globals.risingSeries=[],n.globals.axisCharts){if(r=(s=Array.prototype.find.call(n.dom.baseEl.querySelectorAll(".apexcharts-series"),l=>l.getAttribute("data:realIndex")===String(t)))!=null?s:null,!r)return;o=parseInt((i=r.getAttribute("data:realIndex"))!=null?i:"",10)}else{if(r=n.dom.baseEl.querySelector(`.apexcharts-series[rel='${t+1}']`),!r)return;o=parseInt((a=r.getAttribute("rel"))!=null?a:"",10)-1}if(e?[{cs:n.globals.collapsedSeries,csi:n.globals.collapsedSeriesIndices},{cs:n.globals.ancillaryCollapsedSeries,csi:n.globals.ancillaryCollapsedSeriesIndices}].forEach(c=>{let h=c.cs,d=c.csi;this.riseCollapsedSeries(h,d,o)}):this.hideSeries({seriesEl:r,realIndex:o}),n.config.chart.accessibility.enabled){let l=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(l){let c=n.globals.collapsedSeriesIndices.includes(o)||n.globals.ancillaryCollapsedSeriesIndices.includes(o);l.setAttribute("aria-pressed",c?"true":"false");let h=l.querySelector(".apexcharts-legend-text"),d=h?h.textContent:n.seriesData.seriesNames[t],f=c?"hidden":"visible";l.setAttribute("aria-label",`${d}, ${f}. Press Enter or Space to toggle.`)}}}else{if(n.globals.resized=!0,n.globals.risingSeries=[],e)this.riseCollapsedSeries(n.globals.collapsedSeries,n.globals.collapsedSeriesIndices,t);else{let r=this.getSeriesAfterCollapsing({realIndex:t});this.lgCtx.updateSeries(r,n.config.chart.animations.dynamicAnimation.enabled)}if(n.config.chart.accessibility.enabled){let r=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(r){let o=n.globals.collapsedSeriesIndices.includes(t);r.setAttribute("aria-pressed",o?"true":"false");let l=r.querySelector(".apexcharts-legend-text"),c=l?l.textContent:n.seriesData.seriesNames[t],h=o?"hidden":"visible";r.setAttribute("aria-label",`${c}, ${h}. Press Enter or Space to toggle.`)}}}}_nonAxisSliceContainer(t){let e=this.w.config.chart.type;return(e==="pie"||e==="donut"||e==="polarArea"||e==="sunburst")&&t.length===1&&t[0]&&typeof t[0]=="object"&&Array.isArray(t[0].data)?t[0].data:t}_readSliceValue(t){return this.w.config.chart.type==="unit"&&t&&Array.isArray(t.data)?t.data:t&&typeof t=="object"?t.y:t}_writeSliceValue(t,e,s){let i=t[e];if(this.w.config.chart.type==="unit"&&i&&Array.isArray(i.data)){i.data=Array.isArray(s)?s:[];return}i&&typeof i=="object"?i.y=s:t[e]=s}getSeriesAfterCollapsing({realIndex:t}){var e,s;let i=this.w,a=i.globals,n=T.clone(i.config.series);if(a.axisCharts){let o=i.config.yaxis[a.seriesYAxisReverseMap[t]],l={index:t,data:n[t].data.slice(),type:n[t].type||i.config.chart.type,name:(a.seriesNames||[])[t]};if(o&&o.show&&o.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(t)<0&&(a.ancillaryCollapsedSeries.push(l),a.ancillaryCollapsedSeriesIndices.push(t));else if(a.collapsedSeriesIndices.indexOf(t)<0){a.collapsedSeries.push(l),a.collapsedSeriesIndices.push(t);let c=a.risingSeries.indexOf(t);a.risingSeries.splice(c,1)}}else if(a.collapsedSeriesIndices.indexOf(t)<0){let o=this._nonAxisSliceContainer(n);a.collapsedSeries.push({index:t,data:this._readSliceValue(o[t]),type:(s=(e=i.config.series[t])==null?void 0:e.type)!=null?s:"line",name:(a.seriesNames||[])[t]}),a.collapsedSeriesIndices.push(t)}let r=a.axisCharts?i.config.series.length:this._nonAxisSliceContainer(n).length;return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===r,this._getSeriesBasedOnCollapsedState(n)}hideSeries({seriesEl:t,realIndex:e}){let s=this.w,i=this.getSeriesAfterCollapsing({realIndex:e}),a=t.childNodes;for(let n=0;n<a.length;n++)a[n].classList.contains("apexcharts-series-markers-wrap")&&(a[n].classList.contains("apexcharts-hide")?a[n].classList.remove("apexcharts-hide"):a[n].classList.add("apexcharts-hide"));this.lgCtx.updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled)}riseCollapsedSeries(t,e,s){let i=this.w,a=T.clone(i.config.series);if(t.length>0){for(let n=0;n<t.length;n++)if(t[n].index===s){if(i.globals.axisCharts)a[s].data=t[n].data.slice(),a[s].hidden=!1;else{let r=this._nonAxisSliceContainer(a);this._writeSliceValue(r,s,t[n].data)}t.splice(n,1),e.splice(n,1),i.globals.risingSeries.push(s),n--}a=this._getSeriesBasedOnCollapsedState(a),this.lgCtx.updateSeries(a,i.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(t){let e=this.w,s=0;if(e.globals.axisCharts)t.forEach((a,n)=>{e.globals.collapsedSeriesIndices.indexOf(n)<0&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(n)<0||(t[n].data=[],s++)});else{let a=this._nonAxisSliceContainer(t);a.forEach((n,r)=>{e.globals.collapsedSeriesIndices.indexOf(r)<0||(this._writeSliceValue(a,r,0),s++)})}let i=e.globals.axisCharts?t.length:this._nonAxisSliceContainer(t).length;return e.globals.allSeriesCollapsed=s===i,t}},qc=["#cf4d3f","#8f9499","#26a75b"],pe=(u,t,e)=>u+(t-u)*e;function Qs(u){return Math.max(0,Math.min(255,Math.round(u))).toString(16).padStart(2,"0")}function jc(u,t,e){let s=T.parseHex(He(u)),i=T.parseHex(He(t));return!s||!i?u:"#"+Qs(pe(s[0],i[0],e))+Qs(pe(s[1],i[1],e))+Qs(pe(s[2],i[2],e))}function He(u){return typeof u!="string"?"#000000":T.isColorHex(u)?u:T.rgb2hex(u)||"#000000"}function Zr(u,t,e){let s=u.config.series[t],i=s&&Array.isArray(s.data)?s.data[e]:null;return Kr(u,i,t,e)}function Kr(u,t,e,s){var i,a,n;if(!t||typeof t!="object")return null;let r=(n=(a=(i=u.config.plotOptions)==null?void 0:i.treemap)==null?void 0:a.colorScale)==null?void 0:n.colorValue,o;if(typeof r=="function"?o=r(t,{seriesIndex:e,dataPointIndex:s,w:u}):typeof r=="string"?o=t[r]:o=t.colorValue,o==null)return null;let l=Number(o);return Number.isFinite(l)?l:null}function Zc(u,t,e,s){if(Array.isArray(u.stops)&&u.stops.length>=2)return u.stops.filter(n=>n&&Number.isFinite(Number(n.value))).map(n=>({value:Number(n.value),color:He(n.color)})).sort((n,r)=>n.value-r.value);let i=(Array.isArray(u.colors)&&u.colors.length>=2?u.colors:qc).map(He),a=i.length;if(s!=null&&a>=3){let n=Math.floor((a-1)/2),r=[];for(let o=0;o<=n;o++)r.push({value:pe(t,s,o/n),color:i[o]});for(let o=n+1;o<a;o++)r.push({value:pe(s,e,(o-n)/(a-1-n)),color:i[o]});return r}return i.map((n,r)=>({value:pe(t,e,r/(a-1)),color:n}))}function Jr(u){var t,e,s;let i=(s=(e=(t=u.config)==null?void 0:t.plotOptions)==null?void 0:e.treemap)==null?void 0:s.colorScale,a=i&&i.gradient;if(!a||a.enabled===!1)return null;let n=u.config.series||[],r=1/0,o=-1/0,l=!1;for(let b=0;b<n.length;b++){let x=n[b]&&n[b].data;if(Array.isArray(x))for(let _=0;_<x.length;_++){let w=Kr(u,x[_],b,_);w!=null&&(l=!0,w<r&&(r=w),w>o&&(o=w))}}if(!l&&a.enabled!==!0)return null;Number.isFinite(r)||(r=0,o=0);let c=Number.isFinite(Number(a.min))?Number(a.min):r,h=Number.isFinite(Number(a.max))?Number(a.max):o,d=null;if(a.midpoint===null?d=null:Number.isFinite(Number(a.midpoint))?d=Number(a.midpoint):c<0&&h>0&&(d=0),d!=null&&a.symmetric!==!1&&!Number.isFinite(Number(a.min))&&!Number.isFinite(Number(a.max))){let b=Math.max(Math.abs(c-d),Math.abs(h-d));c=d-b,h=d+b}h===c&&(c-=.5,h+=.5);let f=Zc(a,c,h,d);if(f.length<2)return null;let g=b=>{if(!Number.isFinite(b))return f[Math.floor(f.length/2)].color;if(b<=f[0].value)return f[0].color;let x=f[f.length-1];if(b>=x.value)return x.color;for(let _=1;_<f.length;_++){let w=f[_];if(b<=w.value){let y=f[_-1],v=w.value-y.value,A=v===0?0:(b-y.value)/v;return jc(y.color,w.color,A)}}return x.color},p=h-c,m=f.map(b=>({percent:p===0?0:(b.value-c)/p,color:b.color}));return{min:c,max:h,midpoint:d,stops:f,at:g,legendStops:m}}function Kn(u){let t=He(u);return T.getContrastRatio(t,"#ffffff")>=T.getContrastRatio(t,"#000000")?"#ffffff":"#000000"}var Nt="http://www.w3.org/2000/svg",Ie=class u{constructor(t,e){this.w=t,this.ctx=e,this.svgEl=null,this.arrowEl=null,this.hoverValueEl=null,this._min=0,this._max=0,this._geom=null,this._bandHitEls=[],this._activeBandIndex=-1,this._onCellEnter=this._onCellEnter.bind(this),this._onCellLeave=this._onCellLeave.bind(this),this._onBandEnter=this._onBandEnter.bind(this),this._onBandLeave=this._onBandLeave.bind(this)}_getFormatter(){let t=this._cfg();return typeof t.formatter=="function"?t.formatter:e=>{if(!Number.isFinite(e))return String(e);let s=Math.abs(e);return s>=1e3?e.toFixed(0):s>=10?e.toFixed(1):e.toFixed(2)}}static colorScaleOf(t){var e,s,i,a,n;let r=(s=(e=t?.config)==null?void 0:e.chart)==null?void 0:s.type;return r&&((n=(a=(i=t?.config)==null?void 0:i.plotOptions)==null?void 0:a[r])==null?void 0:n.colorScale)||null}static configFor(t){let e=u.colorScaleOf(t);return e&&e.gradientLegend||null}_cfg(){return u.configFor(this.w)||{}}static isEnabled(t){if(!u.supports(t))return!1;let e=u.configFor(t);return!!(e&&e.enabled)}static supports(t){var e,s;let i=(s=(e=t?.config)==null?void 0:e.chart)==null?void 0:s.type;return i==="heatmap"||i==="treemap"}draw(){var t,e,s,i,a,n,r,o;let l=this.w,c=l.dom.elLegendWrap;if(!c)return;let h=this._cfg(),d=l.config.legend.position,f=d==="left"||d==="right",g=(e=(t=h.arrow)==null?void 0:t.size)!=null?e:8,p=g+4,m=h.showLabels?28:4,b=h.showLabels?20:4,x=h.showLabels?44:0,_=this._resolveStripLength(f?h.height:h.width,f),w=h.thickness,y=f?Math.max(w+p+4,x):_+m*2,v=f?_+b*2:w+p+4,A=w+p,S=(y-A)/2,C=f?d==="left"?S:S+p:m,M=f?b:d==="top"?p:4,k=O.createElementNS(Nt,"svg");k.setAttribute("class","apexcharts-heatmap-gradient-legend apexcharts-gradient-legend"),k.setAttribute("width",String(y)),k.setAttribute("height",String(v)),k.setAttribute("overflow","visible");let L=O.createElementNS(Nt,"defs"),E=`apexcharts-heatmap-gradient-${l.globals.cuid}`,D=O.createElementNS(Nt,"linearGradient");D.setAttribute("id",E),f?(D.setAttribute("x1","0"),D.setAttribute("y1","1"),D.setAttribute("x2","0"),D.setAttribute("y2","0")):(D.setAttribute("x1","0"),D.setAttribute("y1","0"),D.setAttribute("x2","1"),D.setAttribute("y2","0"));let{min:P,max:F,stops:R,bands:N}=this._computeStops();this._min=P,this._max=F,R.forEach(Y=>{let I=O.createElementNS(Nt,"stop");I.setAttribute("offset",`${(Y.percent*100).toFixed(2)}%`),I.setAttribute("stop-color",Y.color),D.appendChild(I)}),L.appendChild(D),k.appendChild(L);let z=O.createElementNS(Nt,"rect");if(z.setAttribute("x",String(C)),z.setAttribute("y",String(M)),z.setAttribute("width",String(f?w:_)),z.setAttribute("height",String(f?_:w)),z.setAttribute("rx","2"),z.setAttribute("fill",`url(#${E})`),k.appendChild(z),h.showLabels){let Y=((s=h.labelStyle)==null?void 0:s.colors)||(Array.isArray(l.config.legend.labels.colors)?l.config.legend.labels.colors[0]:l.config.legend.labels.colors)||l.config.chart.foreColor,I=((i=h.labelStyle)==null?void 0:i.fontSize)||"11px",U=((a=h.labelStyle)==null?void 0:a.fontFamily)||l.config.chart.fontFamily,X=this._getFormatter(),V=(q,Z,K,Q)=>{let tt=O.createElementNS(Nt,"text");return tt.setAttribute("x",String(Z)),tt.setAttribute("y",String(K)),tt.setAttribute("text-anchor",Q),tt.setAttribute("dominant-baseline","middle"),tt.setAttribute("fill",Y),tt.setAttribute("font-size",I),U&&tt.setAttribute("font-family",U),tt.textContent=String(q),tt};if(f){let q=C+w/2;k.appendChild(V(X(P),q,M+_+10,"middle")),k.appendChild(V(X(F),q,M-10,"middle"))}else{let q=M+w/2;k.appendChild(V(X(P),C-6,q,"end")),k.appendChild(V(X(F),C+_+6,q,"start"))}}let $=((n=h.arrow)==null?void 0:n.color)||l.config.chart.foreColor,W=this._buildArrow(g,$,d);if(k.appendChild(W),this.arrowEl=W,this._bandHitEls=[],l.config.legend.onItemHover.highlightDataSeries&&N.length>0&&N.forEach(Y=>{let I=O.createElementNS(Nt,"rect");if(f){let U=M+_-Y.p2*_,X=M+_-Y.p1*_;I.setAttribute("x",String(C)),I.setAttribute("y",String(U)),I.setAttribute("width",String(w)),I.setAttribute("height",String(Math.max(0,X-U)))}else I.setAttribute("x",String(C+Y.p1*_)),I.setAttribute("y",String(M)),I.setAttribute("width",String(Math.max(0,(Y.p2-Y.p1)*_))),I.setAttribute("height",String(w));I.setAttribute("fill","transparent"),I.setAttribute("class","apexcharts-heatmap-gradient-band"),I.setAttribute("data:range-index",String(Y.index)),I.style.cursor="pointer",k.appendChild(I),this._bandHitEls.push(I)}),this._geom={isVertical:f,position:d,stripX:C,stripY:M,stripLength:_,stripThickness:w,arrowSize:g,svgWidth:y,svgHeight:v},h.showHoverValue){let Y=O.createElement("div");Y.classList.add("apexcharts-heatmap-gradient-legend-value"),Y.style.position="absolute",Y.style.fontSize=((r=h.labelStyle)==null?void 0:r.fontSize)||"11px",Y.style.fontFamily=((o=h.labelStyle)==null?void 0:o.fontFamily)||l.config.chart.fontFamily||"",Y.style.color=l.config.chart.foreColor,Y.style.background="rgba(0,0,0,0.65)",Y.style.color="#fff",Y.style.padding="2px 6px",Y.style.borderRadius="3px",Y.style.pointerEvents="none",Y.style.whiteSpace="nowrap",Y.style.opacity="0",Y.style.transition="opacity 120ms ease",this.hoverValueEl=Y}c.classList.add("apexcharts-heatmap-gradient-legend-wrap"),c.classList.add("apx-legend-position-"+d),c.appendChild(k),this.hoverValueEl&&c.appendChild(this.hoverValueEl),this.svgEl=k,this._applyWrapAlignment(c,d,f,y,v),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(t,e){let s=this.w,i=e?s.globals.svgHeight||s.config.chart.height||300:s.globals.svgWidth||s.config.chart.width||600;if(typeof t=="string"){let a=t.trim();if(a.endsWith("%")){let r=parseFloat(a)||0;return Math.max(20,i*r/100)}let n=parseFloat(a);return Number.isFinite(n)?n:200}return typeof t=="number"&&Number.isFinite(t)?t:200}_applyWrapAlignment(t,e,s,i,a){let n=this.w,o=this._cfg().align||"center",l=12,c=n.globals.svgWidth||n.config.chart.width||600,h=n.globals.svgHeight||n.config.chart.height||300,d=n.config.legend.offsetX||0,f=n.config.legend.offsetY||0;if(t.style.position="absolute",t.style.display="block",t.style.overflow="visible",t.style.padding="0",t.style.width=i+"px",t.style.height=a+"px",t.style.right="auto",t.style.bottom="auto",s){let g=h-a-l*2,p;o==="start"?p=l:o==="end"?p=l+Math.max(0,g):p=l+Math.max(0,g)/2,t.style.top=p+f+"px",e==="left"?t.style.left=l+d+"px":t.style.left=c-i-l+d+"px"}else{let g=c-i-l*2,p;o==="start"?p=l:o==="end"?p=l+Math.max(0,g):p=l+Math.max(0,g)/2,t.style.left=p+d+"px",e==="top"?t.style.top=l+f+"px":t.style.top=h-a-l+f+"px"}}repositionToPlot(){var t,e;if(!H.isBrowser())return;let s=this.w,i=s.globals,a=s.dom.elLegendWrap;if(!a||!this._geom||!Number.isFinite(i.gridWidth)||!Number.isFinite(i.gridHeight))return;let{isVertical:n,position:r,svgWidth:o,svgHeight:l,stripX:c,stripY:h,stripThickness:d}=this._geom,f=this._cfg().align||"center",g=s.config.legend.offsetX||0,p=s.config.legend.offsetY||0,m=(e=(t=this.ctx)==null?void 0:t.dimensions)==null?void 0:e.dimHelpers,b=m?m.getTitleSubtitleCoords("title").height+m.getTitleSubtitleCoords("subtitle").height:0,x=s.layout.xAxisHeight||0,_=(w,y)=>{let v=Math.max(0,w-y);return f==="start"?0:f==="end"?v:v/2};if(n){a.style.top=i.translateY+_(i.gridHeight,l)+p+"px";let w=r==="left"?0:i.translateX+i.gridWidth,y=r==="left"?i.translateX:i.svgWidth,v=(w+y)/2;a.style.left=v-c-d/2+g+"px"}else{a.style.left=i.translateX+_(i.gridWidth,o)+g+"px";let w=r==="top"?b:i.translateY+i.gridHeight+x,y=r==="top"?i.translateY:i.svgHeight,v=(w+y)/2;a.style.top=v-h-d/2+p+"px"}O.requestAnimationFrame(()=>this._enforceMinPlotGap())}_enforceMinPlotGap(){let t=this.w,e=t.dom.elLegendWrap,s=this.svgEl&&this.svgEl.querySelector("rect"),i=t.dom.baseEl.querySelector(".apexcharts-grid");if(!e||!s||!i||!this._geom)return;let a=s.getBoundingClientRect(),n=i.getBoundingClientRect();if(!a.width||!a.height||!n.width||!n.height)return;let r=16,{isVertical:o,position:l}=this._geom;if(o){let c=l==="left"?n.left-a.right:a.left-n.right;if(c<r){let h=parseFloat(e.style.left)||0,d=r-c;e.style.left=h+(l==="left"?-d:d)+"px"}}else{let c=l==="top"?n.top-a.bottom:a.top-n.bottom;if(c<r){let h=parseFloat(e.style.top)||0,d=r-c;e.style.top=h+(l==="top"?-d:d)+"px"}}}destroy(){var t,e,s,i,a,n,r;for(let o=0;o<this._bandHitEls.length;o++){let l=this._bandHitEls[o];(t=l.removeEventListener)==null||t.call(l,"mousemove",this._onBandEnter),(e=l.removeEventListener)==null||e.call(l,"mouseout",this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,!!((s=this.ctx)!=null&&s.events))try{(a=(i=this.ctx.events).removeEventListener)==null||a.call(i,"dataPointMouseEnter",this._onCellEnter),(r=(n=this.ctx.events).removeEventListener)==null||r.call(n,"dataPointMouseLeave",this._onCellLeave)}catch{}}_attachBandHoverListeners(){if(H.isBrowser())for(let t=0;t<this._bandHitEls.length;t++){let e=this._bandHitEls[t];e.addEventListener("mousemove",this._onBandEnter),e.addEventListener("mouseout",this._onBandLeave)}}_onBandEnter(t){var e,s,i,a;let n=this.w,r=t.currentTarget,o=parseInt((e=r.getAttribute("data:range-index"))!=null?e:"-1",10);o<0||o===this._activeBandIndex||(this._activeBandIndex=o,(a=(i=(s=this.ctx)==null?void 0:s.events)==null?void 0:i.fireEvent)==null||a.call(i,"legendHover",[this.ctx,o,n]),new ct(n).highlightRangeInSeries(o,"highlight"))}_onBandLeave(){if(this._activeBandIndex<0)return;let t=this._activeBandIndex;this._activeBandIndex=-1,new ct(this.w).highlightRangeInSeries(t,"reset")}_attachHoverListeners(){var t,e;H.isBrowser()&&(e=(t=this.ctx)==null?void 0:t.events)!=null&&e.addEventListener&&(this.ctx.events.addEventListener("dataPointMouseEnter",this._onCellEnter),this.ctx.events.addEventListener("dataPointMouseLeave",this._onCellLeave))}_onCellEnter(...t){var e,s,i;let a=this.w;if(!this.arrowEl)return;let n=t[t.length-1];if(!n||typeof n!="object")return;let r=n.seriesIndex,o=n.dataPointIndex;if(typeof r!="number"||typeof o!="number"||!u.supports(a))return;let l;this._continuous?l=Zr(a,r,o):l=(i=(s=(e=a.seriesData)==null?void 0:e.series)==null?void 0:s[r])==null?void 0:i[o],!(l==null||Number.isNaN(l))&&this._positionArrow(l)}_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute("opacity","0"),this.hoverValueEl&&(this.hoverValueEl.style.opacity="0"))}_positionArrow(t){if(!this.arrowEl||!this._geom)return;let{isVertical:e,position:s,stripX:i,stripY:a,stripLength:n,stripThickness:r,arrowSize:o}=this._geom,l=this._min,h=this._max-l,d;if(h===0?d=.5:d=(t-l)/h,d<0&&(d=0),d>1&&(d=1),e){let f=a+n-d*n,g,p;s==="left"?(g=i+r,p=g+o):(g=i,p=g-o);let m=[`${g},${f}`,`${p},${f-o/2}`,`${p},${f+o/2}`].join(" ");this.arrowEl.setAttribute("points",m)}else{let f=i+d*n,g,p;s==="top"?(g=a+r,p=g+o):(g=a,p=g-o);let m=[`${f},${g}`,`${f-o/2},${p}`,`${f+o/2},${p}`].join(" ");this.arrowEl.setAttribute("points",m)}if(this.arrowEl.setAttribute("opacity","1"),this.hoverValueEl){let f=this._getFormatter();if(this.hoverValueEl.textContent=f(t),e){let g=a+n-d*n;s==="left"?this.hoverValueEl.style.left=`${i+r+o+8}px`:(this.hoverValueEl.style.left=`${i-o-8}px`,this.hoverValueEl.style.transform="translateX(-100%)"),this.hoverValueEl.style.top=`${g-9}px`}else{let g=i+d*n;this.hoverValueEl.style.left=`${g}px`,this.hoverValueEl.style.transform="translateX(-50%)",s==="top"?this.hoverValueEl.style.top=`${a+r+o+8}px`:this.hoverValueEl.style.top=`${a-o-18}px`}this.hoverValueEl.style.opacity="1"}}_buildArrow(t,e,s){let i=O.createElementNS(Nt,"polygon");return i.setAttribute("fill",e),i.setAttribute("opacity","0"),i.setAttribute("class","apexcharts-heatmap-gradient-arrow"),i.setAttribute("points","0,0 0,0 0,0"),i.setAttribute("pointer-events","none"),i}_computeStops(){var t,e;let s=this.w,i=u.colorScaleOf(s)||{},a=this._cfg(),n=Jr(s);if(n)return this._continuous=!0,{min:n.min,max:n.max,stops:n.legendStops,bands:[]};this._continuous=!1;let r=1/0,o=-1/0,l=((t=s.seriesData)==null?void 0:t.series)||[];for(let g=0;g<l.length;g++){let p=l[g];if(p)for(let m=0;m<p.length;m++){let b=p[m];b==null||Number.isNaN(b)||(b<r&&(r=b),b>o&&(o=b))}}Number.isFinite(r)||(r=0),Number.isFinite(o)||(o=0);let c=r,h=o;typeof i.min<"u"&&(c=i.min<r?i.min:r),typeof i.max<"u"&&(h=i.max>o?i.max:o);let d=[],f=[];if(i.ranges&&i.ranges.length>0){let g=i.ranges.map((x,_)=>j(G({},x),{_originalIndex:_})).sort((x,_)=>x.from-_.from),p=g[0].from,m=g[g.length-1].to;c=p,h=m;let b=m-p||1;g.forEach(x=>{let _=(x.from-p)/b,w=(x.to-p)/b;d.push({percent:(_+w)/2,color:x.color}),f.push({index:x._originalIndex,p1:_,p2:w})})}else{let g=s.globals.colors[0]||"#008FFB",p=new T,m=s.config.plotOptions[s.config.chart.type]||{},b=(e=m.shadeIntensity)!=null?e:.5,x=s.globals.hasNegs,_=Math.max(2,a.stops||16);for(let w=0;w<_;w++){let y=w/(_-1),v=c+y*(h-c),A=Math.abs(h)+Math.abs(c),S=A===0?0:100*v/A,C;x?m.reverseNegativeShade?C=S<0?S/100*(b*1.25):(1-S/100)*(b*1.25):C=S<=0?1-(1+S/100)*b:(1-S/100)*b:C=1-S/100,C>1&&(C=1),C<-1&&(C=-1);let M=m.enableShades?p.shadeColor(s.config.theme.mode==="dark"?C*-1:C,g):g;d.push({percent:y,color:M})}}return{min:c,max:h,stops:d,bands:f}}},Ki=class{constructor(t,e){this.w=t,this.ctx=e,this.updateSeries=(...s)=>e.updateHelpers._updateSeries(...s),this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new Uc(this)}init(){let t=this.w,e=t.globals,s=t.config;this.isBarsDistributed=s.chart.type==="bar"&&s.plotOptions.bar.distributed&&s.series.length===1;let i=s.legend.showForSingleSeries&&this.w.seriesData.series.length===1||this.isBarsDistributed||s.chart.type==="heatmap"||Ie.isEnabled(t)||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&s.legend.show){let a=t.dom.elLegendWrap;for(;a.firstChild;)a.removeChild(a.firstChild);this.heatmapGradientLegend&&(this.heatmapGradientLegend.destroy(),this.heatmapGradientLegend=null),Ie.isEnabled(t)?(this.heatmapGradientLegend=new Ie(t,this.ctx),this.heatmapGradientLegend.draw()):(this.drawLegends(),s.legend.position==="bottom"||s.legend.position==="top"?this.legendAlignHorizontal():(s.legend.position==="right"||s.legend.position==="left")&&this.legendAlignVertical())}}createLegendMarker({i:t,fillcolor:e}){let s=this.w,i=O.createElement("span");i.classList.add("apexcharts-legend-marker");let a=s.config.legend.markers.shape||s.config.markers.shape,n=a;Array.isArray(a)&&(n=a[t]);let r=Array.isArray(s.config.legend.markers.size)?parseFloat(s.config.legend.markers.size[t]):parseFloat(s.config.legend.markers.size),o=Array.isArray(s.config.legend.markers.offsetX)?parseFloat(s.config.legend.markers.offsetX[t]):parseFloat(s.config.legend.markers.offsetX),l=Array.isArray(s.config.legend.markers.offsetY)?parseFloat(s.config.legend.markers.offsetY[t]):parseFloat(s.config.legend.markers.offsetY),c=Array.isArray(s.config.legend.markers.strokeWidth)?parseFloat(s.config.legend.markers.strokeWidth[t]):parseFloat(s.config.legend.markers.strokeWidth),h=i.style;if(h.height=(r+c)*2+"px",h.width=(r+c)*2+"px",h.left=o+"px",h.top=l+"px",s.config.legend.markers.customHTML)h.background="transparent",h.color=e[t],Array.isArray(s.config.legend.markers.customHTML)?s.config.legend.markers.customHTML[t]&&(i.innerHTML=s.config.legend.markers.customHTML[t]()):i.innerHTML=s.config.legend.markers.customHTML();else{let f=new zt(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${n}`,seriesIndex:t,strokeWidth:c,size:r}),p=(H.isBrowser()?window.SVG:global.SVG)().addTo(i).size("100%","100%"),m=new B(this.w).drawMarker(0,0,j(G({},f),{pointFillColor:Array.isArray(e)?e[t]:f.pointFillColor,shape:n}));s.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(x=>{x.node.classList.contains("apexcharts-marker-triangle")?x.node.style.transform="translate(50%, 45%)":x.node.style.transform="translate(50%, 50%)"}),p.add(m)}return i}drawLegends(){var t;let e=this,s=this.w,i=s.dom.elLegendWrap,a=s.config.legend.fontFamily,n=s.seriesData.seriesNames,r=s.config.legend.markers.fillColors?s.config.legend.markers.fillColors.slice():s.globals.colors.slice();if(s.config.chart.type==="heatmap"){let h=s.config.plotOptions.heatmap.colorScale.ranges;n=h.map(d=>d.name?d.name:d.from+" - "+d.to),r=h.map(d=>d.color)}else this.isBarsDistributed&&(n=s.labelData.labels.slice());s.config.legend.customLegendItems.length&&(n=s.config.legend.customLegendItems);let o=s.formatters.legendFormatter,l=s.config.legend.inverseOrder,c=[];s.labelData.seriesGroups.length>1&&s.config.legend.clusterGroupedSeries&&s.labelData.seriesGroups.forEach((h,d)=>{c[d]=O.createElement("div"),c[d].classList.add("apexcharts-legend-group",`apexcharts-legend-group-${d}`),s.config.legend.clusterGroupedSeriesOrientation==="horizontal"?i.classList.add("apexcharts-legend-group-horizontal"):c[d].classList.add("apexcharts-legend-group-vertical")});for(let h=l?n.length-1:0;l?h>=0:h<=n.length-1;l?h--:h++){let d=o(n[h],{seriesIndex:h,w:s}),f=!1,g=!1;if(s.globals.collapsedSeries.length>0)for(let w=0;w<s.globals.collapsedSeries.length;w++)s.globals.collapsedSeries[w].index===h&&(f=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(let w=0;w<s.globals.ancillaryCollapsedSeriesIndices.length;w++)s.globals.ancillaryCollapsedSeriesIndices[w]===h&&(g=!0);let p=this.createLegendMarker({i:h,fillcolor:r});B.setAttrs(p,{rel:h+1,"data:collapsed":f||g}),(f||g)&&p.classList.add("apexcharts-inactive-legend");let m=O.createElement("div");if(s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled){m.setAttribute("role","button"),m.setAttribute("tabindex","0");let w=Array.isArray(d)?d.join(" "):d,y=f||g,v=y?"hidden":"visible";m.setAttribute("aria-label",`${w}, ${v}. Press Enter or Space to toggle.`),m.setAttribute("aria-pressed",y?"true":"false")}let b=O.createElement("span");b.classList.add("apexcharts-legend-text"),b.innerHTML=Array.isArray(d)?d.join(" "):d;let x=s.config.legend.labels.useSeriesColors?s.globals.colors[h]:Array.isArray(s.config.legend.labels.colors)?(t=s.config.legend.labels.colors)==null?void 0:t[h]:s.config.legend.labels.colors;x||(x=s.config.chart.foreColor),b.style.color=x,b.style.fontSize=s.config.legend.fontSize,b.style.fontWeight=s.config.legend.fontWeight,b.style.fontFamily=a||s.config.chart.fontFamily,B.setAttrs(b,{rel:h+1,i:h,"data:default-text":encodeURIComponent(d),"data:collapsed":f||g}),m.appendChild(p),m.appendChild(b);let _=new lt(this.w);s.config.legend.showForZeroSeries||_.getSeriesTotalByIndex(h)===0&&_.seriesHaveSameValues(h)&&!_.isSeriesNull(h)&&s.globals.collapsedSeriesIndices.indexOf(h)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&m.classList.add("apexcharts-hidden-zero-series"),s.config.legend.showForNullSeries||_.isSeriesNull(h)&&s.globals.collapsedSeriesIndices.indexOf(h)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&m.classList.add("apexcharts-hidden-null-series"),c.length?s.labelData.seriesGroups.forEach((w,y)=>{var v,A;w.includes((A=(v=s.config.series[h])==null?void 0:v.name)!=null?A:"")&&(i.appendChild(c[y]),c[y].appendChild(m))}):i.appendChild(m),i.classList.add(`apexcharts-align-${s.config.legend.horizontalAlign}`),i.classList.add("apx-legend-position-"+s.config.legend.position),m.classList.add("apexcharts-legend-series"),m.style.margin=`${s.config.legend.itemMargin.vertical}px ${s.config.legend.itemMargin.horizontal}px`,i.style.width=s.config.legend.width?s.config.legend.width+"px":"",i.style.height=s.config.legend.height?s.config.legend.height+"px":"",B.setAttrs(m,{rel:h+1,seriesName:T.escapeString(n[h]),"data:collapsed":f||g}),(f||g)&&m.classList.add("apexcharts-inactive-legend"),s.config.legend.onItemClick.toggleDataSeries||m.classList.add("apexcharts-no-click")}s.dom.elWrap.addEventListener("click",e.onLegendClick,!0),s.config.legend.onItemHover.highlightDataSeries&&s.config.legend.customLegendItems.length===0&&(s.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),s.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.dom.elWrap.addEventListener("keydown",e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(t,e){let s=this.w,i=s.dom.elLegendWrap,a=i.clientHeight,n=0,r=0;if(s.config.legend.position==="bottom")r=s.globals.svgHeight-Math.min(a,s.globals.svgHeight/2)-5;else if(s.config.legend.position==="top"){let l=new ye(this.w,this.ctx),c=l.dimHelpers.getTitleSubtitleCoords("title").height,h=l.dimHelpers.getTitleSubtitleCoords("subtitle").height;r=(c>0?c-10:0)+(h>0?h-10:0)}i.style.position="absolute",n=n+t+s.config.legend.offsetX,r=r+e+s.config.legend.offsetY,i.style.left=n+"px",i.style.top=r+"px",s.config.legend.position==="right"&&(i.style.left="auto",i.style.right=25+s.config.legend.offsetX+"px"),["width","height"].forEach(l=>{i&&i.style[l]&&(i.style[l]=parseInt(String(s.config.legend[l]),10)+"px")})}legendAlignHorizontal(){let t=this.w,e=t.dom.elLegendWrap;e.style.right="0";let s=new ye(this.w,this.ctx),i=s.dimHelpers.getTitleSubtitleCoords("title"),a=s.dimHelpers.getTitleSubtitleCoords("subtitle"),n=20,r=0;t.config.legend.position==="top"&&(r=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(n,r)}legendAlignVertical(){let t=this.w,e=this.legendHelpers.getLegendDimensions(),s=20,i=0;t.config.legend.position==="left"&&(i=20),t.config.legend.position==="right"&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,s)}onLegendHovered(t){var e;let s=this.w,i=t.target,a=i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker");if(s.config.chart.type!=="heatmap"&&!this.isBarsDistributed)!i.classList.contains("apexcharts-inactive-legend")&&a&&new ct(this.ctx.w).toggleSeriesOnHover(t,i);else if(a){let n=parseInt((e=i.getAttribute("rel"))!=null?e:"0",10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,n,this.w]);let r=new ct(this.ctx.w);t.type==="mousemove"?r.highlightRangeInSeries(n,"highlight"):t.type==="mouseout"&&r.highlightRangeInSeries(n,"reset")}}onLegendKeyDown(t){let e=this,s=this.w,i=t.target;if((i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))&&(t.key==="Enter"||t.key===" ")){t.preventDefault();let n=i.getAttribute("rel");e.onLegendClick(t),n!==null&&s.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{let r=s.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${n}"]`);r&&r.focus()})}}onLegendClick(t){var e;let s=this.w,i=t.target;if(!s.config.legend.customLegendItems.length&&(i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))){let a=parseInt((e=i.getAttribute("rel"))!=null?e:"0",10)-1,n=i.getAttribute("data:collapsed")==="true",r=this.w.config.chart.events.legendClick;typeof r=="function"&&r(this.ctx,a,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,a,this.w]);let o=this.w.config.legend.markers.onClick;typeof o=="function"&&i.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,a,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,a,this.w])),s.config.chart.type!=="treemap"&&s.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&s.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(a,n)}}};ht.registerFeatures({legend:Ki});var Kc=`<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">
|
|
<path d="M5 9 2 12l3 3"/>
|
|
<path d="M9 5l3-3 3 3"/>
|
|
<path d="M15 19l-3 3-3-3"/>
|
|
<path d="M19 9l3 3-3 3"/>
|
|
<path d="M2 12h20"/>
|
|
<path d="M12 2v20"/>
|
|
</svg>
|
|
`,Jc=`<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">
|
|
<circle cx="11" cy="11" r="7"/>
|
|
<path d="m21 21-4.3-4.3M8 11h6M11 8v6"/>
|
|
</svg>
|
|
`,Qc=`<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">
|
|
<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>
|
|
<path d="M3 3v5h5"/>
|
|
</svg>
|
|
`,th=`<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">
|
|
<path d="M12 5v14M5 12h14"/>
|
|
</svg>
|
|
`,eh=`<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">
|
|
<path d="M5 12h14"/>
|
|
</svg>
|
|
`,sh=`<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">
|
|
<path d="M5 3a2 2 0 0 0-2 2"/>
|
|
<path d="M19 3a2 2 0 0 1 2 2"/>
|
|
<path d="M21 19a2 2 0 0 1-2 2"/>
|
|
<path d="M5 21a2 2 0 0 1-2-2"/>
|
|
<path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/>
|
|
</svg>
|
|
`,ih=`<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">
|
|
<path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0Z"/>
|
|
<path d="m14.5 12.5 2-2"/>
|
|
<path d="m11.5 9.5 2-2"/>
|
|
<path d="m8.5 6.5 2-2"/>
|
|
<path d="m17.5 15.5 2-2"/>
|
|
</svg>
|
|
`,ah=`<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">
|
|
<path d="M4 6h16M4 12h16M4 18h16"/>
|
|
</svg>
|
|
`,_s=class{constructor(t,e){this.w=t,this.ctx=e,this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){var t,e;let s=this.w,i=()=>O.createElementNS("http://www.w3.org/1999/xhtml","div"),a=()=>{let c=O.createElementNS("http://www.w3.org/1999/xhtml","button");return c.setAttribute("type","button"),c},n=i();if(n.setAttribute("class","apexcharts-toolbar"),n.style.top=s.config.chart.toolbar.offsetY+"px",n.style.right=-s.config.chart.toolbar.offsetX+3+"px",s.dom.elWrap.appendChild(n),this.elZoom=a(),this.elZoomIn=a(),this.elZoomOut=a(),this.elPan=a(),this.elSelection=a(),this.elMeasure=a(),this.elZoomReset=a(),this.elMenuIcon=a(),this.elMenu=i(),this.elCustomIcons=[],this.t=s.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let c=0;c<this.t.customIcons.length;c++)this.elCustomIcons.push(a());let r=[],o=(c,h,d)=>{let f=c.toLowerCase();this.t[f]&&s.config.chart.zoom.enabled&&r.push({el:h,icon:typeof this.t[f]=="string"?this.t[f]:d,title:this.localeValues[c],class:`apexcharts-${f}-icon`})};o("zoomIn",this.elZoomIn,th),o("zoomOut",this.elZoomOut,eh);let l=c=>{this.t[c]&&s.config.chart[c].enabled&&r.push({el:c==="zoom"?this.elZoom:this.elSelection,icon:typeof this.t[c]=="string"?this.t[c]:c==="zoom"?Jc:sh,title:this.localeValues[c==="zoom"?"selectionZoom":"selection"],class:`apexcharts-${c}-icon`})};l("zoom"),l("selection"),this.t.pan&&s.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:Kc,title:this.localeValues.pan,class:"apexcharts-pan-icon"}),this.t.measure&&s.config.chart.measure&&s.config.chart.measure.enabled&&r.push({el:this.elMeasure,icon:typeof this.t.measure=="string"?this.t.measure:ih,title:this.localeValues.measure||"Measure",class:"apexcharts-measure-icon"}),o("reset",this.elZoomReset,Qc),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:ah,title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(let c=0;c<this.elCustomIcons.length;c++)r.push({el:this.elCustomIcons[c],icon:this.t.customIcons[c].icon,title:this.t.customIcons[c].title,index:this.t.customIcons[c].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[c].class});r.forEach((c,h)=>{c.index&&T.moveIndexInArray(r,h,c.index)});for(let c=0;c<r.length;c++)B.setAttrs(r[c].el,{class:r[c].class,title:r[c].title,"aria-label":r[c].title}),r[c].el.innerHTML=r[c].icon,n.appendChild(r[c].el);this.elZoom.parentNode&&this.elZoom.setAttribute("aria-pressed",String(!!s.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!s.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!s.interact.panEnabled)),this.elMeasure.parentNode&&this.elMeasure.setAttribute("aria-pressed",String(!!s.interact.measureEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","false")),this._createHamburgerMenu(n),s.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):s.interact.panEnabled?this.elPan.classList.add(this.selectedClass):s.interact.selectionEnabled?this.elSelection.classList.add(this.selectedClass):s.interact.measureEnabled&&this.elMeasure&&(this.elMeasure.classList.add(this.selectedClass),(e=(t=this.ctx.measure)==null?void 0:t.startMeasure)==null||e.call(t)),this.addToolbarEventListeners()}_createHamburgerMenu(t){this.elMenuItems=[],t.appendChild(this.elMenu),B.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});let e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let s=0;s<e.length;s++)this.elMenuItems.push(O.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[s].innerHTML=e[s].title,B.setAttrs(this.elMenuItems[s],{class:`apexcharts-menu-item ${e[s].name}`,title:e[s].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[s])}addToolbarEventListeners(){var t,e,s,i,a,n,r,o,l;(t=this.elZoomReset)==null||t.addEventListener("click",this.handleZoomReset.bind(this)),(e=this.elSelection)==null||e.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),(s=this.elZoom)==null||s.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),(i=this.elZoomIn)==null||i.addEventListener("click",this.handleZoomIn.bind(this)),(a=this.elZoomOut)==null||a.addEventListener("click",this.handleZoomOut.bind(this)),(n=this.elPan)==null||n.addEventListener("click",this.togglePanning.bind(this)),(r=this.elMeasure)==null||r.addEventListener("click",this.toggleMeasure.bind(this)),(o=this.elMenuIcon)==null||o.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(h=>{h.classList.contains("exportSVG")?h.addEventListener("click",this.handleDownload.bind(this,"svg")):h.classList.contains("exportPNG")?h.addEventListener("click",this.handleDownload.bind(this,"png")):h.classList.contains("exportCSV")&&h.addEventListener("click",this.handleDownload.bind(this,"csv"))});for(let h=0;h<this.t.customIcons.length;h++)this.elCustomIcons[h].addEventListener("click",this.t.customIcons[h].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMeasure,this.elMenuIcon,...this.elCustomIcons].forEach(h=>{h.addEventListener("keydown",d=>{if(d.key==="Enter"||d.key===" "){d.preventDefault();let f=h.className;h.click(),requestAnimationFrame(()=>{let g=this.w.dom.baseEl;if(!g)return;let p=f.split(" ").find(b=>b.startsWith("apexcharts-"));if(!p)return;let m=g.querySelector(`.${p}`);m&&m.focus()})}})}),(l=this.elMenuIcon)==null||l.addEventListener("keydown",h=>{var d;(h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),(d=this.elMenu)!=null&&d.classList.contains("apexcharts-menu-open")||this.toggleMenu(),window.setTimeout(()=>{let f=h.key==="ArrowDown"?0:this.elMenuItems.length-1;this.elMenuItems[f]&&this.elMenuItems[f].focus()},20))}),this.elMenuItems.forEach((h,d)=>{h.addEventListener("keydown",f=>{var g;f.key==="ArrowDown"?(f.preventDefault(),(this.elMenuItems[d+1]||this.elMenuItems[0]).focus()):f.key==="ArrowUp"?(f.preventDefault(),(this.elMenuItems[d-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):f.key==="Escape"||f.key==="Tab"?(this._closeMenu(),(g=this.elMenuIcon)==null||g.focus(),f.key==="Tab"||f.preventDefault()):(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),h.click())})})}toggleZoomSelection(t){this.ctx.getSyncedCharts().forEach(s=>{let i=s.ctx.toolbar,a=t==="selection"?"selectionEnabled":"zoomEnabled",n=!!s.w.globals[a];i.toggleOtherControls();let r=t==="selection"?i.elSelection:i.elZoom;n||(s.w.globals[a]=!0,r.classList.add(i.selectedClass)),r.setAttribute("aria-pressed",String(!!s.w.globals[a]))})}toggleMeasure(){var t,e,s,i;let a=this.w,n=!a.interact.measureEnabled;this.toggleOtherControls(),n&&(a.interact.measureEnabled=!0,(t=this.elMeasure)==null||t.classList.add(this.selectedClass),(s=(e=this.ctx.measure)==null?void 0:e.startMeasure)==null||s.call(e)),(i=this.elMeasure)==null||i.setAttribute("aria-pressed",String(a.interact.measureEnabled))}getToolbarIconsReference(){let t=this.w;this.elZoom||(this.elZoom=t.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.dom.baseEl.querySelector(".apexcharts-selection-icon")),this.elMeasure||(this.elMeasure=t.dom.baseEl.querySelector(".apexcharts-measure-icon"))}enableZoomPanFromToolbar(t){this.toggleOtherControls(),t==="pan"?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;let e=t==="pan"?this.elPan:this.elZoom,s=t==="pan"?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),s&&s.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{let s=e.ctx.toolbar,i=!!e.w.interact.panEnabled;s.toggleOtherControls(),i||(e.w.interact.panEnabled=!0,s.elPan.classList.add(s.selectedClass)),s.elPan.setAttribute("aria-pressed",String(!!e.w.interact.panEnabled))})}toggleOtherControls(){var t,e,s;let i=this.w;i.interact.panEnabled=!1,i.interact.zoomEnabled=!1,i.interact.selectionEnabled=!1,i.interact.measureEnabled&&(i.interact.measureEnabled=!1,(e=(t=this.ctx.measure)==null?void 0:t.stopMeasure)==null||e.call(t),(s=this.elMeasure)==null||s.setAttribute("aria-pressed","false")),this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom,this.elMeasure].forEach(n=>{n&&n.classList.remove(this.selectedClass)})}_currentXRange(){let t=this.w;return t.axisFlags.isRangeBar?{minX:t.globals.minY,maxX:t.globals.maxY}:{minX:t.globals.minX,maxX:t.globals.maxX}}handleZoomIn(){let t=this.w,{minX:e,maxX:s}=this._currentXRange();this.minX=e,this.maxX=s;let i=(e+s)/2,a=(e+i)/2,n=(s+i)/2,r=this._getNewMinXMaxX(a,n);t.interact.disableZoomIn||this.zoomUpdateOptions(r.minX,r.maxX)}handleZoomOut(){let t=this.w,{minX:e,maxX:s}=this._currentXRange();if(this.minX=e,this.maxX=s,t.config.xaxis.type==="datetime"&&new Date(e).getUTCFullYear()<1e3)return;let i=(e+s)/2,a=e-(i-e),n=s-(i-s),r=this._getNewMinXMaxX(a,n);t.interact.disableZoomOut||this.zoomUpdateOptions(r.minX,r.maxX)}_getNewMinXMaxX(t,e){let s=this.w.config.xaxis.convertedCatToNumeric;return{minX:s?Math.floor(t):t,maxX:s?Math.floor(e):e}}zoomUpdateOptions(t,e){let s=this.w;if(t===void 0&&e===void 0){this.handleZoomReset();return}if(s.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=s.globals.dataPoints),e-t<2))return;let i={min:t,max:e},a=this.getBeforeZoomRange(i,void 0);a&&(i=a.xaxis);let n={xaxis:i};if(!s.globals.initialConfig)return;let r=T.clone(s.globals.initialConfig.yaxis);s.config.chart.group||(n.yaxis=r),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(n,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(i,r)}zoomCallback(t,e){typeof this.ev.zoomed=="function"&&(this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e}),this.ctx.events.fireEvent("zoomed",{xaxis:t,yaxis:e}))}getBeforeZoomRange(t,e){let s=null;return typeof this.ev.beforeZoom=="function"&&(s=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),s}toggleMenu(){window.setTimeout(()=>{var t,e,s;(t=this.elMenu)!=null&&t.classList.contains("apexcharts-menu-open")?this._closeMenu():((e=this.elMenu)==null||e.classList.add("apexcharts-menu-open"),(s=this.elMenuIcon)==null||s.setAttribute("aria-expanded","true"))},0)}_closeMenu(){var t,e;(t=this.elMenu)==null||t.classList.remove("apexcharts-menu-open"),(e=this.elMenuIcon)==null||e.setAttribute("aria-expanded","false")}handleDownload(t){let e=this.w,s=new vs(this.w,this.ctx);switch(t){case"svg":s.exportToSVG();break;case"png":s.exportToPng();break;case"csv":s.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter});break}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{let s=e.w;if(!s.interact.zoomed)return;if(s.globals.lastXAxis.min=s.globals.initialConfig.xaxis.min,s.globals.lastXAxis.max=s.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof s.config.chart.events.beforeResetZoom=="function"){let a=s.config.chart.events.beforeResetZoom(e,s);a&&e.updateHelpers.revertDefaultAxisMinMax(a)}typeof s.config.chart.events.zoomed=="function"&&e.ctx.toolbar.zoomCallback({min:s.config.xaxis.min,max:s.config.xaxis.max});let i=e.ctx.series.emptyCollapsedSeries(T.clone(s.globals.initialSeries));e.updateHelpers._updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled),s.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null}},nh=240,rh=.05,oh=.92,lh=.02,ch=16.6667,es=15,Ji=class extends _s{constructor(t,e){super(t,e),this.w=t,this.ctx=e,this.dragged=!1,this.graphics=new B(this.w),this.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],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"}init({xyRatios:t}){let e=this.w,s=this;this.xyRatios=t,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.constraints=new fi(0,0,e.layout.gridWidth,e.layout.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),e.dom.Paper.add(this.zoomRect),e.dom.Paper.add(this.selectionRect),e.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:e.layout.gridWidth,maxY:e.layout.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):e.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:e.layout.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=e.dom.baseEl.querySelector(`${e.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(i=>{var a;(a=this.hoverArea)==null||a.addEventListener(i,s.svgMouseEvents.bind(s,t),{capture:!1,passive:!0})}),this._wheelZoomEnabled()&&this.hoverArea.addEventListener("wheel",s.mouseWheelEvent.bind(s),{capture:!1,passive:!1}),this._momentumEnabled()&&["touchstart","touchmove","touchend","touchcancel"].forEach(i=>{var a;(a=this.hoverArea)==null||a.addEventListener(i,s.momentumTouch.bind(s),{capture:!1,passive:!1})}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null}svgMouseEvents(t,e){let s=this.w,i=this.ctx.toolbar;if(s.interact.momentum&&s.interact.momentum.busy||this._momentumEnabled()&&e.touches&&e.touches.length>1)return;let a=s.interact.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type,n=s.config.chart.toolbar.autoSelected;if(n!=="measure"&&(e.shiftKey?(s.interact.shiftWasPressed=!0,i.enableZoomPanFromToolbar(n==="pan"?"zoom":"pan")):s.interact.shiftWasPressed&&(i.enableZoomPanFromToolbar(n),s.interact.shiftWasPressed=!1)),!e.target)return;let r=e.target.classList,o;if(e.target.parentNode&&e.target.parentNode!==null&&(o=e.target.parentNode.classList),!(r.contains("apexcharts-legend-marker")||r.contains("apexcharts-legend-text")||o&&o.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"){let c=this._gridRect();if(!c)return;this.startX=this._screenXToPlotPx(this.clientX),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:this.xyRatios})):(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:t,isResized:e}){let s=this.w,i=this._gridRect();i&&(this.w.interact.mousedown||e)&&(this.endX=this._screenXToPlotPx(this.clientX),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:t})),s.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}_incidentalZoomEnabled(t){var e,s,i;let a=this.w.config.chart;return!a.zoom||!a.zoom.enabled?!1:t!=="auto"?!!t:!!((e=a.toolbar)!=null&&e.show&&((i=(s=a.toolbar)==null?void 0:s.tools)!=null&&i.reset))}_wheelZoomEnabled(){let{zoom:t}=this.w.config.chart;return this._incidentalZoomEnabled(t&&t.allowMouseWheelZoom)}_wheel(){let t=this.w.interact;return t.wheel||(t.wheel={factor:1,clientX:0,rafId:null,endTimer:null}),t.wheel}mouseWheelEvent(t){t.preventDefault();let e=this._wheel(),s=t.deltaY;t.deltaMode===1?s*=33:t.deltaMode===2&&(s*=330),e.factor*=Math.pow(2,s/nh),e.clientX=t.clientX,e.rafId==null&&(e.rafId=requestAnimationFrame(()=>this._applyWheelZoom())),e.endTimer&&clearTimeout(e.endTimer),e.endTimer=setTimeout(()=>this._endWheelZoom(),150)}_applyWheelZoom(){let t=this.w,e=this._wheel();e.rafId=null;let s=e.factor;if(e.factor=1,s===1||t.globals.isDestroyed)return;let i=this._gridRect();if(!i||!i.width)return;let{min:a,max:n}=this._currentXWindow(),r=n-a,o=Math.min(Math.max((e.clientX-i.left)/i.width,0),1),l=r*s,c=this._clampBounds();if(c){let m=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,b=Math.max(m*2,(c.max-c.min)*1e-6);l<b&&(l=b),l>c.max-c.min&&(l=c.max-c.min)}let d=a+o*r-o*l,f=d+l,g=r*1e-9;if(Math.abs(d-a)<g&&Math.abs(f-n)<g||isNaN(d)||isNaN(f))return;let p=this.getBeforeZoomRange({min:d,max:f},void 0);p&&p.xaxis&&(d=p.xaxis.min,f=p.xaxis.max),this._applyXRange(d,f,!0)}_endWheelZoom(){let t=this.w,e=this._wheel();if(e.endTimer=null,t.globals.isDestroyed||!t.interact.zoomed)return;let{min:s,max:i}=this._currentXWindow(),a=t.globals.initialConfig?T.clone(t.globals.initialConfig.yaxis):[],n=this.ctx.toolbar;n&&n.zoomCallback({min:s,max:i},a)}makeSelectionRectDraggable(){let t=this.w;if(!this.selectionRect)return;let e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(s,i,a,n,r)=>r==="l"||r==="r"?s.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):s.circle(0),updateHandle:(s,i)=>s.center(i[0],i[1])}).resize().on("resize",()=>{var s;if(t.interact.selectionEnabled)t.interact.selection={x:parseFloat(this.selectionRect.node.getAttribute("x")),y:parseFloat(this.selectionRect.node.getAttribute("y")),width:parseFloat(this.selectionRect.node.getAttribute("width")),height:parseFloat(this.selectionRect.node.getAttribute("height"))},clearTimeout((s=this.w.globals.selectionResizeTimer)!=null?s:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},30);else{let i=t.interact.zoomEnabled?t.config.chart.zoom.type:t.config.chart.selection.type;this.handleMouseUp({zoomtype:i,isResized:!0})}}))}preselectedSelection(){let t=this.w,e=this.xyRatios;if(!t.interact.zoomEnabled){if(typeof t.interact.selection<"u"&&t.interact.selection!==null)this.drawSelectionRect(j(G({},t.interact.selection),{translateX:t.layout.translateX,translateY:t.layout.translateY}));else if(t.config.chart.selection.xaxis.min!==void 0&&t.config.chart.selection.xaxis.max!==void 0){let s=_t.dataXToPx(t,t.config.chart.selection.xaxis.min),i=_t.dataXToPx(t,t.config.chart.selection.xaxis.max)-s;t.axisFlags.isRangeBar&&(s=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);let a={x:s,y:0,width:i,height:t.layout.gridHeight,translateX:t.layout.translateX,translateY:t.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),typeof t.config.chart.events.selection=="function"&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:t,y:e,width:s,height:i,translateX:a=0,translateY:n=0}){let r=this.w,o=this.zoomRect,l=this.selectionRect;if(this.dragged||r.interact.selection!==null){let c={transform:"translate("+a+", "+n+")"};r.interact.zoomEnabled&&this.dragged&&(s<0&&(s=1),o.attr({x:t,y:e,width:s,height:i,fill:r.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":r.config.chart.zoom.zoomedArea.fill.opacity,stroke:r.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":r.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":r.config.chart.zoom.zoomedArea.stroke.opacity}),B.setAttrs(o.node,c)),r.interact.selectionEnabled&&(l.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,fill:r.config.chart.selection.fill.color,"fill-opacity":r.config.chart.selection.fill.opacity,stroke:r.config.chart.selection.stroke.color,"stroke-width":r.config.chart.selection.stroke.width,"stroke-dasharray":r.config.chart.selection.stroke.dashArray,"stroke-opacity":r.config.chart.selection.stroke.opacity}),B.setAttrs(l.node,c))}}hideSelectionRect(t){t&&t.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:t,zoomtype:e}){let s=this.w,i=t,a=this._gridRect();if(!a)return;let n=i.startX-1,r=i.startY,o=!1,l=!1,c=this._screenXToPlotPx(i.clientX),h=i.clientY-a.top,d=c-n,f=h-r,g={translateX:s.layout.translateX,translateY:s.layout.translateY};return Math.abs(d+n)>s.layout.gridWidth?d=s.layout.gridWidth-n:c<0&&(d=n),n>c&&(o=!0,d=Math.abs(d)),r>h&&(l=!0,f=Math.abs(f)),e==="x"?g={x:o?n-d:n,y:0,width:d,height:s.layout.gridHeight}:e==="y"?g={x:0,y:l?r-f:r,width:s.layout.gridWidth,height:f}:g={x:o?n-d:n,y:l?r-f:r,width:d,height:f},g=j(G({},g),{translateX:s.layout.translateX,translateY:s.layout.translateY}),i.drawSelectionRect(g),i.selectionDragging("resizing"),g}selectionDragging(t,e){var s;let i=this.w;if(!e)return;e.preventDefault();let{handler:a,box:n}=e.detail,r=this.constraints,{x:o,y:l}=n;o<r.x&&(o=r.x),l<r.y&&(l=r.y),n.x2>r.x2&&(o=r.x2-n.w),n.y2>r.y2&&(l=r.y2-n.h),a.move(o,l);let c=this.selectionRect,h=0;t==="resizing"&&(h=30);let d=m=>parseFloat(c.node.getAttribute(m)),f={x:d("x"),y:d("y"),width:d("width"),height:d("height")};i.interact.selection=f;let g=i.config.chart.link,p=!!(g&&(g.enabled||typeof g.dimension=="function"));(typeof i.config.chart.events.selection=="function"||p)&&i.interact.selectionEnabled&&(clearTimeout((s=this.w.globals.selectionResizeTimer)!=null?s:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},h))}_emitSelectionFromRect(){var t;let e=this.w;if(!e.interact.selectionEnabled)return;let s=e.config.chart.link,i=!!(s&&(s.enabled||typeof s.dimension=="function"));if(typeof e.config.chart.events.selection!="function"&&!i)return;let a=this._gridRect();if(!a)return;let n=this.selectionRect.node.getBoundingClientRect(),r=this.xyRatios,o,l,c,h,d=this._screenXToPlotPx(n.left),f=this._screenXToPlotPx(n.right);if(e.axisFlags.isRangeBar)o=e.globals.yAxisScale[0].niceMin+d*r.invertedYRatio,l=e.globals.yAxisScale[0].niceMin+f*r.invertedYRatio,c=0,h=1;else{if(!e.globals.xAxisScale)return;o=_t.pxToDataX(e,d),l=_t.pxToDataX(e,f),c=e.globals.yAxisScale[0].niceMin+(a.bottom-n.bottom)*r.yRatio[0],h=e.globals.yAxisScale[0].niceMax-(n.top-a.top)*r.yRatio[0]}let g={xaxis:{min:o,max:l},yaxis:{min:c,max:h}};typeof e.config.chart.events.selection=="function"&&e.config.chart.events.selection(this.ctx,g),e.config.chart.brush.enabled&&e.config.chart.events.brushScrolled!==void 0&&e.config.chart.events.brushScrolled(this.ctx,g),(t=this.ctx.linkedViews)==null||t.onSourceSelection(g.xaxis)}selectionDrawn({context:t,zoomtype:e}){var s;let i=this.w,a=t,n=this.xyRatios,r=this.ctx.toolbar,o=i.interact.zoomEnabled?a.zoomRect.node.getBoundingClientRect():a.selectionRect.node.getBoundingClientRect(),l=a._gridRect();if(!l)return;let c=this._screenXToPlotPx(o.left),h=this._screenXToPlotPx(o.right),d=o.top-l.top,f=o.bottom-l.top,g,p;i.axisFlags.isRangeBar?(g=i.globals.yAxisScale[0].niceMin+c*n.invertedYRatio,p=i.globals.yAxisScale[0].niceMin+h*n.invertedYRatio):(g=_t.pxToDataX(i,c),p=_t.pxToDataX(i,h));let m=[],b=[];if(i.config.yaxis.forEach((x,_)=>{let w=i.globals.seriesYAxisMap[_][0],y=i.globals.yAxisScale[_].niceMax-n.yRatio[w]*d,v=i.globals.yAxisScale[_].niceMax-n.yRatio[w]*f;m.push(y),b.push(v)}),a.dragged&&(a.dragX>10||a.dragY>10)&&g!==p){if(i.interact.zoomEnabled){if(!i.globals.initialConfig)return;let x=T.clone(i.globals.initialConfig.yaxis),_=T.clone(i.globals.initialConfig.xaxis);if(i.interact.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(g=Math.floor(g),p=Math.floor(p),g<1&&(g=1,p=i.globals.dataPoints),p-g<2&&(p=g+1)),(e==="xy"||e==="x")&&(_={min:g,max:p}),(e==="xy"||e==="y")&&x.forEach((y,v)=>{x[v].min=b[v],x[v].max=m[v]}),r){let y=r.getBeforeZoomRange(_,x);y&&(_=y.xaxis?y.xaxis:_,x=y.yaxis?y.yaxis:x)}let w={xaxis:_};i.config.chart.group||(w.yaxis=x),a.ctx.updateHelpers._updateOptions(w,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof i.config.chart.events.zoomed=="function"&&r.zoomCallback(_,x)}else if(i.interact.selectionEnabled){let x=null,_=null;if(_={min:g,max:p},e==="xy"||e==="y"){let w=T.clone(i.config.yaxis);x=w,w.forEach((y,v)=>{w[v].min=b[v],w[v].max=m[v]})}i.interact.selection=a.selection,typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(a.ctx,{xaxis:_,yaxis:x}),(s=a.ctx.linkedViews)==null||s.onSourceSelection(_)}}}panDragging({context:t}){var e;let s=this.w,i=t;if(typeof s.interact.lastClientPosition.x<"u"){let r=s.interact.lastClientPosition.x-i.clientX,o=((e=s.interact.lastClientPosition.y)!=null?e:0)-i.clientY;Math.abs(r)>Math.abs(o)&&r>0?this.moveDirection="left":Math.abs(r)>Math.abs(o)&&r<0?this.moveDirection="right":Math.abs(o)>Math.abs(r)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(r)&&o<0&&(this.moveDirection="down")}s.interact.lastClientPosition={x:i.clientX,y:i.clientY};let a=s.axisFlags.isRangeBar?s.globals.minY:s.globals.minX,n=s.axisFlags.isRangeBar?s.globals.maxY:s.globals.maxX;i.panScrolled(a,n)}panScrolled(t,e){var s,i;let a=this.w,n=this.xyRatios;if(!a.globals.initialConfig)return;let r=T.clone(a.globals.initialConfig.yaxis),o=n.xRatio,l=a.globals.minX,c=a.globals.maxX;if(a.axisFlags.isRangeBar&&(o=n.invertedYRatio,l=a.globals.minY,c=a.globals.maxY),this.moveDirection==="left"?(t=l+a.layout.gridWidth/es*o,e=c+a.layout.gridWidth/es*o):this.moveDirection==="right"&&(t=l-a.layout.gridWidth/es*o,e=c-a.layout.gridWidth/es*o),!a.axisFlags.isRangeBar){let f=(s=a.globals.dataReducerRawMinX)!=null?s:a.globals.initialMinX,g=(i=a.globals.dataReducerRawMaxX)!=null?i:a.globals.initialMaxX;(t<f||e>g)&&(t=l,e=c)}let d={xaxis:{min:t,max:e}};a.config.chart.group||(d.yaxis=r),this.updateScrolledChart(d,t,e)}updateScrolledChart(t,e,s){let i=this.w;if(this.ctx.updateHelpers._updateOptions(t,!1,!1),typeof i.config.chart.events.scrolled=="function"){let a={xaxis:{min:e,max:s}};i.config.chart.events.scrolled(this.ctx,a),this.ctx.events.fireEvent("scrolled",a)}}_momentumEnabled(){return this._pinchEnabled()||this._panInertiaEnabled()}_pinchEnabled(){return this._incidentalZoomEnabled(this.w.config.chart.zoom.pinch)}_panInertiaEnabled(){let t=this.w.config.chart;return!!(t.pan&&t.pan.inertia)}_m(){let t=this.w.interact;return t.momentum||(t.momentum={busy:!1,pinch:null,panState:null,samples:[],inertiaRAF:null}),t.momentum}_currentXWindow(){let t=this.w;return t.axisFlags.isRangeBar?{min:t.globals.minY,max:t.globals.maxY}:{min:t.globals.minX,max:t.globals.maxX}}_gridRect(){let t=this.w.dom.baseEl,e=t&&t.querySelector(".apexcharts-grid");return e?e.getBoundingClientRect():null}_screenXToPlotPx(t){return _t.screenXToPlotPx(this.w,t)}_clampBounds(){var t,e;let s=this.w;return s.axisFlags.isRangeBar?null:{min:(t=s.globals.dataReducerRawMinX)!=null?t:s.globals.initialMinX,max:(e=s.globals.dataReducerRawMaxX)!=null?e:s.globals.initialMaxX}}_applyXRange(t,e,s){let i=this.w;if(!i.globals.initialConfig)return!1;let a=this._currentXWindow(),n=s&&e-t>a.max-a.min,r=this._clampBounds();if(r){let l=e-t;t<r.min&&(t=r.min,e=t+l),e>r.max&&(e=r.max,t=e-l),t<r.min&&(t=r.min)}if(i.config.xaxis.convertedCatToNumeric&&(t=Math.floor(t),e=n?Math.ceil(e):Math.floor(e),t<1&&(t=1),r&&e>r.max&&(e=Math.floor(r.max)),e-t<2)||!(e>t))return!1;let o={xaxis:{min:t,max:e}};return i.config.chart.group||(o.yaxis=T.clone(i.globals.initialConfig.yaxis)),s&&(i.interact.zoomed=!0),this.ctx.updateHelpers._updateOptions(o,!1,!1),{minX:t,maxX:e}}_cancelInertia(){let t=this._m();t.inertiaRAF!=null&&(cancelAnimationFrame(t.inertiaRAF),t.inertiaRAF=null)}_fireScrolled(){let t=this.w;if(typeof t.config.chart.events.scrolled!="function")return;let{min:e,max:s}=this._currentXWindow(),i={xaxis:{min:e,max:s}};t.config.chart.events.scrolled(this.ctx,i),this.ctx.events.fireEvent("scrolled",i)}_pushSample(t,e){let s=this._m().samples;for(s.push({x:t,t:e});s.length>6;)s.shift()}momentumTouch(t){let e=this.w,s=this._m(),i=t.type;if(i==="touchstart"){this._cancelInertia();let a=this._gridRect();if(!a)return;if(t.touches.length>=2&&this._pinchEnabled())t.preventDefault(),s.busy=!0,s.panState=null,this._beginPinch(t,a);else if(t.touches.length===1&&this._panInertiaEnabled()&&e.interact.panEnabled){s.busy=!0,s.pinch=null;let n=t.touches[0],r=this._currentXWindow(),o=e.layout.gridWidth||1;s.panState={startX:n.clientX,startY:n.clientY,axis:null,minX0:r.min,maxX0:r.max,ratio0:(r.max-r.min)/o},s.samples=[{x:n.clientX,t:t.timeStamp}]}return}if(i==="touchmove"){s.pinch&&t.touches.length>=2?(t.preventDefault(),this._movePinch(t)):s.panState&&t.touches.length===1&&this._movePan(t);return}s.pinch?t.touches.length<2&&this._endPinch():s.panState&&t.touches.length===0&&this._endPan(),t.touches.length===0&&(e.interact.mousedown=!1,this.dragged=!1,s.inertiaRAF==null&&!s.pinch&&!s.panState&&(s.busy=!1))}_beginPinch(t,e){let s=this.w,i=t.touches[0],a=t.touches[1],n=Math.hypot(a.clientX-i.clientX,a.clientY-i.clientY)||1,r=(i.clientX+a.clientX)/2-e.left-s.globals.barPadForNumericAxis,{min:o,max:l}=this._currentXWindow();this._m().pinch={d0:n,cx0:r,minX0:o,maxX0:l,gridWidth:s.layout.gridWidth||1}}_movePinch(t){let e=this.w,s=this._m().pinch;if(!s)return;let i=this._gridRect();if(!i)return;let a=t.touches[0],n=t.touches[1],r=Math.hypot(n.clientX-a.clientX,n.clientY-a.clientY)||1,o=(a.clientX+n.clientX)/2-i.left-e.globals.barPadForNumericAxis,l=s.maxX0-s.minX0,c=l*(s.d0/r),d=s.minX0+s.cx0/s.gridWidth*l-o/s.gridWidth*c,f=d+c,g=this._clampBounds();if(g){let p=e.globals.minXDiff>0&&isFinite(e.globals.minXDiff)?e.globals.minXDiff:0,m=Math.max(p*2,(g.max-g.min)*1e-6);if(f-d<m){let b=(d+f)/2;d=b-m/2,f=b+m/2}}this._applyXRange(d,f,!0)}_endPinch(){let t=this.w,e=this._m();e.pinch=null;let{min:s,max:i}=this._currentXWindow(),a={min:s,max:i},n=t.globals.initialConfig?T.clone(t.globals.initialConfig.yaxis):[],r=this.ctx.toolbar;r&&r.zoomCallback(a,n)}_movePan(t){let e=this._m(),s=e.panState,i=t.touches[0];if(!s.axis){let r=Math.abs(i.clientX-s.startX),o=Math.abs(i.clientY-s.startY);if(r<6&&o<6){this._pushSample(i.clientX,t.timeStamp);return}if(o>r){e.busy=!1,e.panState=null;return}s.axis="x"}if(s.axis!=="x")return;t.preventDefault();let n=(i.clientX-s.startX)*s.ratio0;this._pushSample(i.clientX,t.timeStamp),this._applyXRange(s.minX0-n,s.maxX0-n,!1)}_endPan(){let t=this._m(),e=t.panState;t.panState=null;let s=0,i=t.samples;if(i.length>=2){let a=i[0],n=i[i.length-1],r=n.t-a.t;r>0&&(s=(n.x-a.x)/r)}t.samples=[],e&&e.axis==="x"&&this._panInertiaEnabled()&&Math.abs(s)>rh?this._startInertia(s):(t.busy=!1,this._fireScrolled())}_startInertia(t){let e=this.w,s=this._m(),i=e.config.chart.pan&&e.config.chart.pan.friction,a=typeof i=="number"?Math.min(Math.max(i,.5),.999):oh,n=t,r=null;s.busy=!0;let o=l=>{if(e.globals.isDestroyed){s.inertiaRAF=null,s.busy=!1;return}if(r==null){r=l,s.inertiaRAF=requestAnimationFrame(o);return}let c=l-r;if(r=l,n*=Math.pow(a,c/ch),Math.abs(n)<lh){s.inertiaRAF=null,s.busy=!1,this._fireScrolled();return}let h=this._currentXWindow(),d=e.layout.gridWidth||1,f=(h.max-h.min)/d,g=n*c*f,p=this._applyXRange(h.min-g,h.max-g,!1),m=this._clampBounds();if(!p||m&&(g>0&&p.minX<=m.min+(m.max-m.min)*1e-6||g<0&&p.maxX>=m.max-(m.max-m.min)*1e-6)){s.inertiaRAF=null,s.busy=!1,this._fireScrolled();return}s.inertiaRAF=requestAnimationFrame(o)};s.inertiaRAF=requestAnimationFrame(o)}};ht.registerFeatures({toolbar:_s,zoomPanSelection:Ji});var Ts=class{constructor(t){this.w=t.w,this.annoCtx=t}setOrientations(t,e=null){var s,i;let a=this.w;if(t.label.orientation==="vertical"){let n=e!==null?e:0,r=a.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${n}']`);if(r!==null){let o=r.getBBox();r.setAttribute("x",String(parseFloat((s=r.getAttribute("x"))!=null?s:"0")-o.height+4));let l=t.label.position==="top"?o.width:-o.width;r.setAttribute("y",String(parseFloat((i=r.getAttribute("y"))!=null?i:"0")+l));let{x:c,y:h}=this.annoCtx.graphics.rotateAroundCenter(r);r.setAttribute("transform",`rotate(-90 ${c} ${h})`)}}}addBackgroundToAnno(t,e){let s=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;let i=s.dom.baseEl.querySelector(".apexcharts-grid");if(!i)return null;let a=i.getBoundingClientRect(),n=i.getBBox(),r=a.width/n.width||1,o=t.getBoundingClientRect(),{left:l,right:c,top:h,bottom:d}=e.label.style.padding;e.label.orientation==="vertical"&&([h,d,l,c]=[l,c,h,d]);let f=a.left-n.x*r,g=a.top-n.y*r,p=(o.left-f)/r-l,m=(o.top-g)/r-h,b=this.annoCtx.graphics.drawRect(p,m,o.width/r+l+c,o.height/r+h+d,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&b.node.classList.add(e.id),b}annotationsBackground(){let t=this.w,e=(s,i,a)=>{let n=t.dom.baseEl.querySelector(`.apexcharts-${a}-annotations .apexcharts-${a}-annotation-label[rel='${i}']`);if(n){let r=n.parentNode,o=this.addBackgroundToAnno(n,s);if(o){r?.insertBefore(o.node,n);let l=n.getAttribute("x");l!==null&&Dt(o,parseFloat(l),t),s.label.mouseEnter&&o.node.addEventListener("mouseenter",s.label.mouseEnter.bind(this,s)),s.label.mouseLeave&&o.node.addEventListener("mouseleave",s.label.mouseLeave.bind(this,s)),s.label.click&&o.node.addEventListener("click",s.label.click.bind(this,s))}}};t.config.annotations.xaxis.forEach((s,i)=>e(s,i,"xaxis")),t.config.annotations.yaxis.forEach((s,i)=>e(s,i,"yaxis")),t.config.annotations.points.forEach((s,i)=>e(s,i,"point"))}getY1Y2(t,e){var s,i;let a=this.w,n=t==="y1"?e.y:e.y2,r,o=!1;if(this.annoCtx.invertAxis){let l=a.config.xaxis.convertedCatToNumeric?a.labelData.categoryLabels:a.labelData.labels,c=l.indexOf(n),h=a.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${c+1})`);r=h?parseFloat((s=h.getAttribute("y"))!=null?s:"0"):(a.layout.gridHeight/l.length-1)*(c+1)-a.globals.barHeight,e.seriesIndex!==void 0&&a.globals.barHeight&&(r-=a.globals.barHeight/2*(a.seriesData.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{let l=a.globals.seriesYAxisMap[e.yAxisIndex];if(!l||l[0]==null||!a.config.yaxis[e.yAxisIndex])return{yP:0,clipped:!0};let c=l[0],h=a.config.yaxis[e.yAxisIndex].logarithmic?new lt(this.w).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,n,c)/a.globals.yLogRatio[c]:(n-a.globals.minYArr[c])/(a.globals.yRange[c]/a.layout.gridHeight);r=a.layout.gridHeight-Math.min(Math.max(h,0),a.layout.gridHeight),o=h>a.layout.gridHeight||h<0,e.marker&&(e.y===void 0||e.y===null)&&(r=0),(i=a.config.yaxis[e.yAxisIndex])!=null&&i.reversed&&(r=h)}return typeof n=="string"&&n.includes("px")&&(r=parseFloat(n)),{yP:r,clipped:o}}getX1X2(t,e){let s=this.w,i=t==="x1"?e.x:e.x2,a=this.annoCtx.invertAxis?s.globals.minY:s.globals.minX,n=this.annoCtx.invertAxis?s.globals.maxY:s.globals.maxX,r=this.annoCtx.invertAxis?s.globals.yRange[0]:s.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(n-i)/(r/s.layout.gridWidth):(i-a)/(r/s.layout.gridWidth);return(s.config.xaxis.type==="category"||s.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!s.axisFlags.dataFormatXNumeric&&(s.config.chart.sparkline.enabled||(l=this.getStringX(i))),typeof i=="string"&&i.includes("px")&&(l=parseFloat(i)),i==null&&e.marker&&(l=s.layout.gridWidth),e.seriesIndex!==void 0&&s.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=s.globals.barWidth/2*(s.seriesData.series.length-1)-s.globals.barWidth*e.seriesIndex),typeof l!="number"&&(l=0,o=!0),parseFloat(l.toFixed(10))>parseFloat(s.layout.gridWidth.toFixed(10))?(l=s.layout.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}getStringX(t){var e;let s=this.w,i=t;if(s.config.xaxis.convertedCatToNumeric&&s.labelData.categoryLabels.length){let r=String(t);t=s.labelData.categoryLabels.findIndex(o=>String(o)===r)+1}let a=s.labelData.labels.map(r=>Array.isArray(r)?r.join(" "):r).indexOf(t),n=s.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${a+1})`);return n&&(i=parseFloat((e=n.getAttribute("x"))!=null?e:"0")),i}},Qi=class{constructor(t){this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ts(this.annoCtx)}addXaxisAnnotation(t,e,s){let i=this.w,a=this.helpers.getX1X2("x1",t),n=a.x,r=a.clipped,o=!0,l,c=t.label.text,h=t.strokeDashArray;if(T.isNumber(n)){if(t.x2===null||typeof t.x2>"u"){if(!r){let d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,i.layout.gridHeight+t.offsetY,t.borderColor,h,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id),Dt(d,n+t.offsetX,i)}}else{let d=this.helpers.getX1X2("x2",t);if(l=d.x,o=d.clipped,l<n){let g=n;n=l,l=g}let f=this.annoCtx.graphics.drawRect(n+t.offsetX,0+t.offsetY,l-n,i.layout.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,h);f.node.classList.add("apexcharts-annotation-rect"),f.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(f.node),t.id&&f.node.classList.add(t.id),Dt(f,n+t.offsetX,i)}if(!(r&&o)){let d=this.annoCtx.graphics.getTextRects(c,t.label.style.fontSize),f=t.label.position==="top"?4:t.label.position==="center"?i.layout.gridHeight/2+(t.label.orientation==="vertical"?d.width/2:0):i.layout.gridHeight,g=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:f+t.label.offsetY-(t.label.orientation==="vertical"?t.label.position==="top"?d.width/2-12:-d.width/2:0),text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});g.attr({rel:s}),e.appendChild(g.node),Dt(g,n+t.label.offsetX,i),this.annoCtx.helpers.setOrientations(t,s)}}}drawXAxisAnnotations(){let t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map((s,i)=>{this.addXaxisAnnotation(s,e.node,i)}),e}},ta=class{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new Ts(this.annoCtx),this.axesUtils=new Ct(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(t,e,s){let i=this.w,a=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),r=n.yP,o=n.clipped,l,c=!0,h=!1,d=t.label.text;if(t.y2===null||typeof t.y2>"u"){if(!o){h=!0;let f=this.annoCtx.graphics.drawLine(0+t.offsetX,r+t.offsetY,this._getYAxisAnnotationWidth(t),r+t.offsetY,t.borderColor,a,t.borderWidth);e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}}else{if(n=this.helpers.getY1Y2("y2",t),l=n.yP,c=n.clipped,l>r){let f=r;r=l,l=f}if(!(o&&c)){h=!0;let f=this.annoCtx.graphics.drawRect(0+t.offsetX,l+t.offsetY,this._getYAxisAnnotationWidth(t),r-l,0,t.fillColor,t.opacity,1,t.borderColor,a);f.node.classList.add("apexcharts-annotation-rect"),f.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}}if(h){let f=t.label.position==="right"?i.layout.gridWidth:t.label.position==="center"?i.layout.gridWidth/2:0,g=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(l??r)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});g.attr({rel:s}),e.appendChild(g.node)}}_getYAxisAnnotationWidth(t){let e=this.w,s=e.layout.gridWidth;return t.width.indexOf("%")>-1?s=e.layout.gridWidth*parseInt(t.width,10)/100:s=parseInt(t.width,10),s+t.offsetX}drawYAxisAnnotations(){let t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach((s,i)=>{s.yAxisIndex=this.axesUtils.translateYAxisIndex(s.yAxisIndex),this.axesUtils.isYAxisHidden(s.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(s.yAxisIndex)||this.addYaxisAnnotation(s,e.node,i)}),e}},ea=class{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new Ts(this.annoCtx)}addPointAnnotation(t,e,s){let i=this.w;if(i.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)return;let a=this.helpers.getX1X2("x1",t),n=a.x,r=a.clipped,o=this.helpers.getY1Y2("y1",t),l=o.yP,c=o.clipped;if(T.isNumber(n)&&!(c||r)){let h={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:`apexcharts-point-annotation-marker ${t.marker.cssClass} ${t.id?t.id:""}`},d=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,l+t.marker.offsetY,h);e.appendChild(d.node);let f=[d.node];Dt(d,n,i);let g=t.label.text?t.label.text:"",p=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:l+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:g,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-point-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});if(p.attr({rel:s}),e.appendChild(p.node),Dt(p,n,i),t.customSVG.SVG){let m=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});m.attr({transform:`translate(${n+t.customSVG.offsetX}, ${l+t.customSVG.offsetY})`}),m.node.innerHTML=t.customSVG.SVG,e.appendChild(m.node),f.push(m.node)}if(t.image.path){let m=t.image.width?t.image.width:20,b=t.image.height?t.image.height:20;d=this.annoCtx.addImage({x:n+t.image.offsetX-m/2,y:l+t.image.offsetY-b/2,width:m,height:b,path:t.image.path,appendTo:".apexcharts-point-annotations"}),f.push(d.node)}t.tooltip&&t.tooltip.enabled&&f.forEach(m=>{m.addEventListener("mouseenter",()=>{this.showPointTooltip(t,m)}),m.addEventListener("mouseleave",()=>{this.hidePointTooltip()})}),t.mouseEnter&&d.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&d.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&d.node.addEventListener("click",t.click.bind(this,t))}}getPointTooltipEl(){let t=this.w,e=t.dom.elWrap.querySelector(".apexcharts-annotation-tooltip");return e||(e=O.createElementNS("http://www.w3.org/1999/xhtml","div"),e.classList.add("apexcharts-tooltip","apexcharts-annotation-tooltip"),t.dom.elWrap.appendChild(e)),e}getPointTooltipContent(t){let e=this.w,s=t.tooltip||{};if(typeof s.formatter=="function")return s.formatter({annotation:t,seriesIndex:t.seriesIndex,id:t.id,w:e});let i=s.text!=null?s.text:t.label&&t.label.text;return Array.isArray(i)&&(i=i.join("<br/>")),i==null?"":String(i)}showPointTooltip(t,e){let s=this.w,i=this.getPointTooltipContent(t);if(!i)return;let a=this.getPointTooltipEl();a.innerHTML=i;let n=t.tooltip.theme||s.config.tooltip.theme||"light";a.classList.remove("apexcharts-theme-light","apexcharts-theme-dark"),a.classList.add(`apexcharts-theme-${n}`),a.classList.add("apexcharts-active");let r=s.dom.elWrap.getBoundingClientRect(),o=e.getBoundingClientRect(),l=a.getBoundingClientRect(),c=t.tooltip.offsetX||0,h=t.tooltip.offsetY||0,d=o.left-r.left+o.width/2-l.width/2,f=o.top-r.top-l.height-10;d=Math.max(0,Math.min(d,r.width-l.width)),f<0&&(f=o.top-r.top+o.height+10),a.style.left=d+c+"px",a.style.top=f+h+"px"}hidePointTooltip(){let t=this.w.dom.elWrap.querySelector(".apexcharts-annotation-tooltip");t&&t.classList.remove("apexcharts-active")}drawPointAnnotations(){let t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map((s,i)=>{this.addPointAnnotation(s,e.node,i)}),e}},sa=class{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new B(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ts(this),this.xAxisAnnotations=new Qi(this),this.yAxisAnnotations=new ta(this),this.pointsAnnotations=new ea(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(){let t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){let e=this.yAxisAnnotations.drawYAxisAnnotations(),s=this.xAxisAnnotations.drawXAxisAnnotations(),i=this.pointsAnnotations.drawPointAnnotations(),a=t.config.chart.animations.enabled,n=[e,s,i],r=[s.node,e.node,i.node],o=t.config.chart.type==="line"||t.config.chart.type==="area"||t.config.chart.type==="rangeArea",l=[o,!1,o];for(let c=0;c<3;c++)t.dom.elGraphical.add(n[c]),a&&!t.globals.resized&&!t.globals.dataChanged&&t.config.chart.type!=="scatter"&&t.config.chart.type!=="bubble"&&t.globals.dataPoints>1&&!l[c]&&r[c].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:r[c],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(e=>{this.addImage(e)})}drawTextAnnos(){this.w.config.annotations.texts.map(e=>{this.addText(e)})}addXaxisAnnotation(t,e,s){this.xAxisAnnotations.addXaxisAnnotation(t,e,s)}addYaxisAnnotation(t,e,s){this.yAxisAnnotations.addYaxisAnnotation(t,e,s)}addPointAnnotation(t,e,s){this.pointsAnnotations.addPointAnnotation(t,e,s)}addText(t){let{x:e,y:s,text:i,textAnchor:a,foreColor:n,fontSize:r,fontFamily:o,fontWeight:l,cssClass:c,backgroundColor:h,borderWidth:d,strokeDashArray:f,borderRadius:g,borderColor:p,appendTo:m=".apexcharts-svg",paddingLeft:b=4,paddingRight:x=4,paddingBottom:_=2,paddingTop:w=2}=t,y=this.w,v=this.graphics.drawText({x:e,y:s,text:i,textAnchor:a||"start",fontSize:r||"12px",fontWeight:l||"regular",fontFamily:o||y.config.chart.fontFamily,foreColor:n||y.config.chart.foreColor,cssClass:"apexcharts-text "+c?c:""}),A=y.dom.baseEl.querySelector(m);A&&A.appendChild(v.node);let S=v.bbox();if(i){let C=this.graphics.drawRect(S.x-b,S.y-w,S.width+b+x,S.height+_+w,g,h||"transparent",1,d,p,f);A.insertBefore(C.node,v.node)}}addImage(t){let e=this.w,{path:s,x:i=0,y:a=0,width:n=20,height:r=20,appendTo:o=".apexcharts-svg"}=t,l=e.dom.Paper.image(s);l.size(n,r).move(i,a);let c=e.dom.baseEl.querySelector(o);return c&&c.appendChild(l.node),l}addXaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"xaxis",contextMethod:s.addXaxisAnnotation}),s}addYaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"yaxis",contextMethod:s.addYaxisAnnotation}),s}addPointAnnotationExternal(t,e,s){return typeof this.invertAxis>"u"&&(this.invertAxis=s.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"point",contextMethod:s.addPointAnnotation}),s}addAnnotationExternal({params:t,pushToMemory:e,context:s,type:i,contextMethod:a}){let n=s,r=n.w,o=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations`),l=o.childNodes.length+1,c=new wt,h=Object.assign({},i==="xaxis"?c.xAxisAnnotation:i==="yaxis"?c.yAxisAnnotation:c.pointAnnotation),d=T.extend(h,t);switch(i){case"xaxis":this.addXaxisAnnotation(d,o,l);break;case"yaxis":this.addYaxisAnnotation(d,o,l);break;case"point":this.addPointAnnotation(d,o,l);break}let f=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations .apexcharts-${i}-annotation-label[rel='${l}']`),g=this.helpers.addBackgroundToAnno(f,d);return g&&o.insertBefore(g.node,f),e&&r.globals.memory.methodsToExec.push({context:n,id:d.id?d.id:T.randomId(),method:a,label:"addAnnotation",params:t}),s}_removeAnnotationTooltip(t){let e=t.dom.elWrap&&t.dom.elWrap.querySelector(".apexcharts-annotation-tooltip");e&&e.parentNode&&e.parentNode.removeChild(e)}clearAnnotations(t){let e=t.w;this._removeAnnotationTooltip(e);let s=e.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");for(let i=e.globals.memory.methodsToExec.length-1;i>=0;i--)(e.globals.memory.methodsToExec[i].label==="addText"||e.globals.memory.methodsToExec[i].label==="addAnnotation")&&e.globals.memory.methodsToExec.splice(i,1);Array.prototype.forEach.call(s,i=>{for(;i.firstChild;)i.removeChild(i.firstChild)})}removeAnnotation(t,e){let s=t.w;this._removeAnnotationTooltip(s);let i=s.dom.baseEl.querySelectorAll(`.${e}`);i&&(s.globals.memory.methodsToExec.map((a,n)=>{a.id===e&&s.globals.memory.methodsToExec.splice(n,1)}),Object.keys(s.config.annotations).forEach(a=>{let n=s.config.annotations[a];Array.isArray(n)&&(s.config.annotations[a]=n.filter(r=>r.id!==e))}),Array.prototype.forEach.call(i,a=>{a.parentElement.removeChild(a)}))}};ht.registerFeatures({annotations:sa});var ia=class{constructor(t,e){this.w=t,this.ctx=e,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._tooltipDismissed=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._lastPointerDownAt=0}init(){let e=this.w.dom.Paper.node;e&&(e.setAttribute("tabindex","0"),e.addEventListener("focus",this._onFocus),e.addEventListener("blur",this._onBlur),e.addEventListener("mousedown",this._onPointerDown,{capture:!0}),e.addEventListener("pointerdown",this._onPointerDown,{capture:!0}),e.addEventListener("touchstart",this._onPointerDown,{capture:!0,passive:!0}),e.addEventListener("keydown",this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener("legendClick",this._onLegendClick))}destroy(){let t=this.w,e=t.dom.Paper&&t.dom.Paper.node;this.ctx.events.removeEventListener("legendClick",this._onLegendClick),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}))}_onPointerDown(){this._lastPointerDownAt=Date.now()}handleKey(t){}_onFocus(){this._isNavEnabled()&&(Date.now()-this._lastPointerDownAt<100||(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint()))}_onBlur(){this.active=!1,this._tooltipDismissed=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(t){var e,s,i;if(!(!this._isNavEnabled()||!this.active)){if(t.shiftKey&&(t.key==="ArrowRight"||t.key==="ArrowLeft")&&this._canPan()){t.preventDefault(),this._panBy(t.key==="ArrowRight"?1:-1);return}switch(t.key){case"ArrowRight":t.preventDefault(),this._move(0,1);break;case"ArrowLeft":t.preventDefault(),this._move(0,-1);break;case"ArrowUp":t.preventDefault(),this._move(-1,0);break;case"ArrowDown":t.preventDefault(),this._move(1,0);break;case"Home":t.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case"End":t.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case"Enter":case" ":t.preventDefault(),this._fireClick();break;case"+":case"=":this._canZoom()&&(t.preventDefault(),(e=this.ctx.toolbar)==null||e.handleZoomIn(),this._announce("Zoomed in"));break;case"-":case"_":this._canZoom()&&(t.preventDefault(),(s=this.ctx.toolbar)==null||s.handleZoomOut(),this._announce("Zoomed out"));break;case"0":this._canZoom()&&this.w.interact.zoomed&&(t.preventDefault(),(i=this.ctx.toolbar)==null||i.handleZoomReset(),this._announce("Zoom reset"));break;case"Escape":t.preventDefault(),this._tooltipDismissed?(this.active=!1,this._tooltipDismissed=!1,this._hideFocus()):(this._tooltipDismissed=!0,this._hideFocus());break}}}_canZoom(){let t=this.w;return!!(t.globals.axisCharts&&t.config.chart.zoom&&t.config.chart.zoom.enabled)}_canPan(){return this._canZoom()}_panBy(t){let e=this.w,s=this.ctx.toolbar;if(!s)return;let i=Number(e.globals.minX),a=Number(e.globals.maxX);if(!isFinite(i)||!isFinite(a)||i===a)return;let r=(a-i)*.1*t;s.zoomUpdateOptions(i+r,a+r),this._announce(t>0?"Panned right":"Panned left")}_move(t,e){let s=this.w,i=s.config.chart.accessibility.keyboard.navigation.wrapAround;if(t!==0){let a=this.w.globals.tooltip;if(a&&a.tConfig&&a.tConfig.shared){let c=this.dataPointIndex;if(a.tooltipUtil&&a.tooltipUtil.isXoverlap(c)&&a.tooltipUtil.isInitialSeriesSameLen())return}let n=this._getSeriesCount(),r=this.seriesIndex+t,o=0;for(;o<n&&(r<0&&(r=i?n-1:0),r>=n&&(r=i?0:n-1),!!s.globals.collapsedSeriesIndices.includes(r));)r+=t,o++;this.seriesIndex=r;let l=this._getDataPointCount(r);this.dataPointIndex>=l&&(this.dataPointIndex=l-1)}if(e!==0){let a=this._getDataPointCount(this.seriesIndex),n=this.dataPointIndex+e;n<0&&(n=i?a-1:0),n>=a&&(n=i?0:a-1),this.dataPointIndex=n,e>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(e)}this._showCurrentPoint()}_skipNullForward(){let t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e),i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&t.seriesData.series[e][i]===null;)i=(i+1)%s,a++;this.dataPointIndex=i}}_skipNullBackward(){let t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e),i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&t.seriesData.series[e][i]===null;)i=(i-1+s)%s,a++;this.dataPointIndex=i}}_showCurrentPoint(){let{seriesIndex:t,dataPointIndex:e}=this,s=this.w,i=s.globals.tooltip;!i||!i.ttItems||(s.interact.capturedSeriesIndex=t,s.interact.capturedDataPointIndex=e,this._applyFocusClass(t,e),this._showTooltip(t,e,i))}_hideFocus(){let t=this.w,e=t.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!e)return;e.marker&&e.marker.resetPointsSize(),this._enlargedScatterMarker=null;let s=e.getElTooltip();s&&(s.classList.remove("apexcharts-active"),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&s.setAttribute("aria-hidden","true")),t.dom.baseEl.classList.remove("apexcharts-tooltip-active");let i=e.getElXCrosshairs();i&&i.classList.remove("apexcharts-active")}_showTooltip(t,e,s){let i=this.w,a=i.config.chart.type,n=s.getElTooltip();if(!n)return;let r=s.getCachedDimensions();s.tooltipRect={x:0,y:0,ttWidth:r.ttWidth||0,ttHeight:r.ttHeight||0},this._setSyntheticEvent(t,e,s),i.dom.baseEl.classList.add("apexcharts-tooltip-active"),n.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&n.removeAttribute("aria-hidden"),a==="pie"||a==="donut"||a==="polarArea"?this._showTooltipNonAxis(t,e,s,n):a==="radialBar"?this._showTooltipRadialBar(t,e,s,n):a==="heatmap"||a==="treemap"?this._showTooltipHeatTree(t,e,s,n,a):a==="bar"||a==="candlestick"||a==="boxPlot"||a==="violin"||a==="rangeBar"?this._showTooltipBar(t,e,s):this._showTooltipAxisLine(t,e,s)}_setSyntheticEvent(t,e,s){let i=this.w,a=i.config.chart.type,n=0,r=0,o=this._getFocusableElement(t,e);if(o){let l=o.getBoundingClientRect();n=l.left+l.width/2,r=l.top+l.height/2}else if(i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){let l=i.globals.pointsArray[t][e],c=s.getElGrid&&s.getElGrid();if(c){let h=c.getBoundingClientRect();n=h.left+(l[0]||0),r=h.top+(l[1]||0)}}else{let l=i.dom.Paper&&i.dom.Paper.node;if(l){let c=l.getBoundingClientRect();n=c.left+c.width/2,r=c.top+c.height/2}}if((a==="line"||a==="area"||a==="rangeArea"||a==="scatter"||a==="bubble"||a==="radar")&&i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){let l=i.globals.pointsArray[t][e],c=s.getElGrid&&s.getElGrid();if(c){let h=c.getBoundingClientRect();n=h.left+(l[0]||0),r=h.top+(l[1]||0)}}s.e={type:"mousemove",clientX:n,clientY:r}}_showTooltipBar(t,e,s){var i,a,n,r;let o=this.w,l=s.tConfig.shared&&(s.tooltipUtil.isXoverlap(e)||o.globals.isBarHorizontal)&&s.tooltipUtil.isInitialSeriesSameLen(),c=(r=(n=(a=(i=o.rangeData.seriesRange)==null?void 0:i[t])==null?void 0:a[e])==null?void 0:n.y)==null?void 0:r[0];s.tooltipLabels.drawSeriesTexts(j(G(G({ttItems:s.ttItems,i:t,j:e},c?.y1!==void 0&&{y1:c.y1}),c?.y2!==void 0&&{y2:c.y2}),{shared:l}));let h=`.apexcharts-series[data\\:realIndex='${t}']`,d=o.dom.Paper.findOne(`${h} path[j='${e}'], ${h} circle[j='${e}'], ${h} rect[j='${e}']`);if(d&&(this._leaveHoveredBar(),new B(this.w,this.ctx).pathMouseEnter(d,null),this._hoveredBarEl=d),o.globals.isBarHorizontal){let f=d&&d.node;if(f){let g=o.dom.elWrap.getBoundingClientRect(),p=f.getBoundingClientRect(),m=p.left-g.left,b=p.top-g.top,x=p.height,_=p.width,w=s.tooltipRect.ttWidth||0,y=s.tooltipRect.ttHeight||0,v=b+x/2-y/2,A=m+_,S=s.xyRatios&&s.xyRatios.baseLineInvertedY!=null?s.xyRatios.baseLineInvertedY:g.width/2;m<S&&(A=m-w);let C=s.getElTooltip();C&&(C.style.left=A+"px",C.style.top=v+"px")}}else s.tooltipPosition.moveStickyTooltipOverBars(e,t)}_showTooltipAxisLine(t,e,s){let i=this.w,a=i.config.chart.type,r=s.tConfig.shared&&s.tooltipUtil.isXoverlap(e)&&s.tooltipUtil.isInitialSeriesSameLen();s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:r});let o=a==="scatter"||a==="bubble",l=i.globals.markers.largestSize>0;o?this._showScatterBubblePoint(t,e,s):l?r?s.marker.enlargePoints(e):s.tooltipPosition.moveDynamicPointOnHover(e,t):r?s.tooltipPosition.moveDynamicPointsOnHover(e):s.tooltipPosition.moveDynamicPointOnHover(e,t)}_showScatterBubblePoint(t,e,s){let i=this.w.dom.baseEl;this._enlargedScatterMarker&&(s.marker.oldPointSize(this._enlargedScatterMarker),this._enlargedScatterMarker=null);let a=i.querySelector(`.apexcharts-series[data\\:realIndex='${t}']`);if(!a)return;let n=a.querySelector(`.apexcharts-marker[rel='${e}']`);n&&(s.marker.enlargeCurrentPoint(e,n),this._enlargedScatterMarker=n)}_showTooltipNonAxis(t,e,s,i){let a=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,shared:!1});let n=i.getBoundingClientRect(),r=n.width||s.tooltipRect.ttWidth||0,o=n.height||s.tooltipRect.ttHeight||0,l=a.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${e}']`),c=s.getSliceAnchor(l);c&&(i.style.left=c.x-r/2+"px",i.style.top=c.y-o-10+"px")}_showTooltipRadialBar(t,e,s,i){var a;let n=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,shared:!1});let{ttWidth:r=0,ttHeight:o=0}=s.getCachedDimensions(),l=n.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`);if(l){let c=parseFloat((a=l.getAttribute("data:angle"))!=null?a:"")||0,d=(n.config.plotOptions.radialBar.startAngle||0)+c/2,f=n.layout.gridWidth/2,g=n.layout.gridHeight/2,p=n.globals.radialSize||Math.min(n.layout.gridWidth,n.layout.gridHeight)/2,m=n.seriesData.series.length,b=p/Math.max(m,1),x=p-t*b,_=x-b,w=(x+_)/2,y=T.polarToCartesian(f,g,w,d),v=y.x+(n.layout.translateX||0),A=y.y+(n.layout.translateY||0);i.style.left=v-r/2+"px",i.style.top=A-o-10+"px"}}_showTooltipHeatTree(t,e,s,i,a){var n,r;let o=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:!1});let l=i.getBoundingClientRect(),c=l.width||s.tooltipRect.ttWidth||0,h=l.height||s.tooltipRect.ttHeight||0,d=a==="heatmap"?"apexcharts-heatmap-rect":"apexcharts-treemap-rect",f=o.dom.baseEl.querySelector(`.${d}[i='${t}'][j='${e}']`);if(f){let g=o.dom.elWrap.getBoundingClientRect(),p=f.getBoundingClientRect(),m=p.left-g.left,b=p.top-g.top,x=p.width,_=p.height,w=parseFloat((n=f.getAttribute("cx"))!=null?n:""),y=parseFloat((r=f.getAttribute("width"))!=null?r:"");s.tooltipPosition.moveXCrosshairs(w+y/2);let v=m+x+c/2,A=b+_/2-h/2;m+x>o.layout.gridWidth/2&&(v=m-c/2),i.style.left=v+"px",i.style.top=A+"px"}}_applyFocusClass(t,e){this._removeFocusClass();let s=this._getFocusableElement(t,e);if(s){s.classList.add("apexcharts-keyboard-focused"),s.setAttribute("role","img");let i=this._buildPointLabel(t,e);i&&s.setAttribute("aria-label",i),this._focusedEl=s}}_removeFocusClass(){this._focusedEl&&(this._focusedEl.classList.remove("apexcharts-keyboard-focused"),this._focusedEl.removeAttribute("role"),this._focusedEl.removeAttribute("aria-label"),this._focusedEl=null)}_buildPointLabel(t,e){var s,i,a,n,r,o,l,c;let h=this.w,d=h.config.chart.type,f=h.seriesData.seriesNames||[],g=h.seriesData.series||[];if(d==="pie"||d==="donut"||d==="polarArea"){let A=(i=((s=h.labelData)==null?void 0:s.labels)&&h.labelData.labels[e])!=null?i:"",S=Array.isArray(g)?g[e]:"";return A?`${A}: ${S}`:`${S}`}if(d==="radialBar"){let A=f[t]||`Series ${t+1}`,S=Array.isArray(g)?g[t]:"";return`${A}: ${S}`}let p=f[t]||`Series ${t+1}`,b=(Array.isArray(g[t])?g[t]:[])[e],x=b==null?"":String(b),_=(n=(a=h.formatters)==null?void 0:a.yLabelFormatters)==null?void 0:n[t];if(typeof _=="function")try{x=_(b,{seriesIndex:t,dataPointIndex:e,w:h})}catch{}let w="",y=(r=h.labelData)==null?void 0:r.categoryLabels,v=(l=(o=h.seriesData)==null?void 0:o.seriesX)==null?void 0:l[t];if(Array.isArray(y)&&y[e]!=null)w=String(y[e]);else if(Array.isArray(v)&&v[e]!=null){let A=(c=h.formatters)==null?void 0:c.xLabelFormatter;if(typeof A=="function")try{w=String(A(v[e],{seriesIndex:t,dataPointIndex:e,w:h}))}catch{w=String(v[e])}else w=String(v[e])}return w?`${p}: ${x}, ${w}`:`${p}: ${x}`}_leaveHoveredBar(){this._hoveredBarEl&&(new B(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),this._hoveredBarEl=null)}_getFocusableElement(t,e){let s=this.w,i=s.config.chart.type,a=s.dom.baseEl;return i==="pie"||i==="donut"||i==="polarArea"?a.querySelector(`.apexcharts-pie-area[j='${e}']`):i==="heatmap"?a.querySelector(`.apexcharts-heatmap-rect[i='${t}'][j='${e}']`):i==="treemap"?a.querySelector(`.apexcharts-treemap-rect[i='${t}'][j='${e}']`):i==="radialBar"?a.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`):i==="bar"||i==="candlestick"||i==="boxPlot"||i==="violin"||i==="rangeBar"?a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`):a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker[rel='${e}']`)||null}_fireClick(){let e=this.w.globals.tooltip;if(!e)return;let s={type:"mouseup",clientX:0,clientY:0};e.markerClick(s,this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){let t=this.w.config.chart.accessibility;return t.enabled&&t.keyboard.enabled&&t.keyboard.navigation.enabled}_getSeriesCount(){let t=this.w,e=t.config.chart.type;return e==="pie"||e==="donut"||e==="polarArea"?1:t.seriesData.series.length}_getDataPointCount(t){let e=this.w,s=e.config.chart.type;if(s==="pie"||s==="donut"||s==="polarArea")return e.seriesData.series.length;let i=e.seriesData.series;return i[t]&&Array.isArray(i[t])?i[t].length:0}_clampCursor(){let t=this._getSeriesCount();this.seriesIndex>=t&&(this.seriesIndex=t-1),this.seriesIndex<0&&(this.seriesIndex=0);let e=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=e&&(this.dataPointIndex=e-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){let t=this.w,e=t.globals,s=this.seriesIndex;if(!t.interact.zoomed)return;let i=t.seriesData.seriesX&&t.seriesData.seriesX[s];if(!i||!i.length)return;let a=e.minX,n=e.maxX;if(a===void 0||n===void 0)return;let r=i[this.dataPointIndex];if(r>=a&&r<=n)return;let o=i.length;for(let l=0;l<o;l++)if(i[l]>=a&&i[l]<=n){this.dataPointIndex=l;return}}_snapToVisibleRangeInDirection(t){let e=this.w,s=e.globals,i=this.seriesIndex,a=e.seriesData.seriesX&&e.seriesData.seriesX[i];if(!a||!a.length)return;let n=s.minX,r=s.maxX;if(n===void 0||r===void 0)return;let o=a.length;if(t>=0){for(let l=0;l<o;l++)if(a[l]>=n&&a[l]<=r){this.dataPointIndex=l;return}}else for(let l=o-1;l>=0;l--)if(a[l]>=n&&a[l]<=r){this.dataPointIndex=l;return}}_isDataPointVisible(t,e){let s=this.w,i=s.globals;if(!s.interact.zoomed)return!0;let a=s.seriesData.seriesX&&s.seriesData.seriesX[t];if(!a)return!0;let n=a[e];return n===void 0?!0:n>=i.minX&&n<=i.maxX}_announce(t){let e=this.w;if(!e.config.chart.accessibility.announcements.enabled)return;let s=e.dom.baseEl;if(!s)return;let i=s.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=t},0))}};ht.registerFeatures({keyboardNavigation:ia});function Jn(u,t){if(!(t>0))return[];if(t===1)return[G({},u)];let e=u.width>=u.height,s=e?u.width:u.height,i=e?u.height:u.width,a=i>0?s/i:t,n=Math.max(1,Math.ceil(Math.sqrt(a*t)));n>t&&(n=t);let r=Math.floor(t/n),o=t-r*n,l=[],c=s/n,h=0;for(let d=0;d<n;d++){let f=r+(o>0?1:0);o>0&&o--;let g=f>0?i/f:0;for(let p=0;p<f;p++)l.push(e?{x:u.x+h,y:u.y+p*g,width:c,height:g}:{x:u.x+p*g,y:u.y+h,width:g,height:c});h+=c}return l}function Qn(u,t,e){if(!(t>0))return[];let s=u.width>=u.height,i=s?u.width:u.height,a=s?u.height:u.width,n=s?u.y:u.x,r=n+a,o=a>0?i/a:t,l=Math.max(Math.ceil(Math.sqrt(o*t)),Math.ceil(i/16));l>=1||(l=1),l>t&&(l=t);let c=Math.floor(t/l),h=t-c*l,d=[],f=i/l,g=s?u.x:u.y;for(let p=0;p<l;p++){let m=c+(h>0?1:0);h>0&&h--;let b=[],x=e(g,g+f,s);if(Array.isArray(x))for(let S=0;S<x.length;S++){let C=x[S];if(!C)continue;let M=Math.max(n,Math.min(C[0],C[1])),k=Math.min(r,Math.max(C[0],C[1]));k>M&&b.push([M,k])}b.length||b.push([n,r]);let _=b.reduce((S,C)=>S+(C[1]-C[0]),0),w=b.map(S=>_>0?(S[1]-S[0])/_*m:m/b.length),y=w.map(S=>Math.floor(S)),v=y.reduce((S,C)=>S+C,0),A=w.map((S,C)=>({i:C,frac:S-Math.floor(S)})).sort((S,C)=>C.frac-S.frac);for(let S=0;v<m;S++,v++)y[A[S%A.length].i]++;for(let S=0;S<b.length;S++){let C=y[S];if(C<=0)continue;let M=b[S][0],k=(b[S][1]-M)/C;for(let L=0;L<C;L++)d.push(s?{x:g,y:M+L*k,width:f,height:k}:{x:M+L*k,y:g,width:k,height:f})}g+=f}return d}function hh(u,t,e,s,i,a){let n=i===e?0:Math.round(32767*((u-e)/(i-e))),r=a===s?0:Math.round(32767*((t-s)/(a-s))),o=0;for(let l=32768;l>=1;l/=2){let c=(n&l)>0?1:0,h=(r&l)>0?1:0;if(o+=l*l*(3*c^h),h===0){c===1&&(n=l-1-n,r=l-1-r);let d=n;n=r,r=d}}return o}function ss(u,t){let e=1/0,s=1/0,i=-1/0,a=-1/0,n=u.map(r=>{let[o,l]=t(r);return o<e&&(e=o),o>i&&(i=o),l<s&&(s=l),l>a&&(a=l),[o,l]});return u.map((r,o)=>({item:r,d:hh(n[o][0],n[o][1],e,s,i,a)})).sort((r,o)=>r.d-o.d).map(r=>r.item)}function tr(u){if(!u||typeof u!="string")return null;let t=u.trim();if(t[0]==="#"){let s=t.slice(1);return s.length===3?[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),1]:s.length===6||s.length===8?[parseInt(s.slice(0,2),16),parseInt(s.slice(2,4),16),parseInt(s.slice(4,6),16),s.length===8?parseInt(s.slice(6,8),16)/255:1]:null}let e=t.match(/^rgba?\(([^)]+)\)$/i);if(e){let s=e[1].split(",").map(i=>parseFloat(i));return s.length<3||s.some(i=>!isFinite(i))?null:[s[0],s[1],s[2],s.length>3?s[3]:1]}return null}function er(u,t){let e=tr(u),s=tr(t);return!e||!s?null:i=>{let a=Math.round(e[0]+(s[0]-e[0])*i),n=Math.round(e[1]+(s[1]-e[1])*i),r=Math.round(e[2]+(s[2]-e[2])*i),o=e[3]+(s[3]-e[3])*i;return o>=1?`rgb(${a},${n},${r})`:`rgba(${a},${n},${r},${o})`}}function dh(u){return u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2}function uh({pieces:u,duration:t,onPieceDone:e,onAllDone:s}){let i=!1,a=Date.now(),n=Math.max(1,t),r=(l,c)=>{let h=l.from,d=l.to,f=l.el;f.setAttribute("x",String(h.x+(d.x-h.x)*c)),f.setAttribute("y",String(h.y+(d.y-h.y)*c)),f.setAttribute("width",String(Math.max(0,h.width+(d.width-h.width)*c))),f.setAttribute("height",String(Math.max(0,h.height+(d.height-h.height)*c))),f.setAttribute("rx",String(Math.max(0,h.rx+(d.rx-h.rx)*c))),l.fill?f.setAttribute("fill",l.fill(c)):c>=1&&l.fillEnd&&f.setAttribute("fill",l.fillEnd)},o=()=>{if(i)return;let l=Date.now()-a,c=!1;for(let h=0;h<u.length;h++){let d=u[h];if(d._done)continue;let f=(l-d.delay)/n;if(f<1&&(c=!0),f<=0)continue;let g=Math.min(1,f);r(d,dh(g)),g>=1&&(d._done=!0,e&&e(d))}c?O.requestAnimationFrame(o):s&&s()};return O.requestAnimationFrame(o),()=>{i=!0}}var fh=new Set(["bar","funnel","pyramid","histogram"]),gh=new Set(["pie","donut","polarArea","radialBar","gauge"]),ph=new Set(["unit","waffle"]),mh=new Set(["treemap","sunburst"]),xh=new Set(["boxPlot","violin"]),bh=.55,ti=1500,yh=300;function bt(u){return fh.has(u)?"bar":gh.has(u)?"radial":ph.has(u)?"unit":mh.has(u)?"partition":xh.has(u)?"summary":null}var aa=class{constructor(t,e){this.w=t,this.ctx=e,this._snapshot=null,this._ghost=null,this._pieceLayer=null,this._pieceCancel=null}canMorphTypes(t,e){if(t===e)return!1;let s=bt(t),i=bt(e);return!s||!i?!1:s==="partition"!=(i==="partition")?s!=="unit"&&i!=="unit":!0}isCompatibleSeriesShape(t,e,s){if(!Array.isArray(s)||s.length===0)return!1;let i=bt(t),a=bt(e);return a==="unit"?s.every(n=>typeof n=="number")?!0:s.every(n=>n&&typeof n=="object"&&Array.isArray(n.data)):a==="partition"?!0:a==="radial"?s.every(n=>typeof n=="number")?!0:s.length===1&&s[0]&&typeof s[0]=="object"&&Array.isArray(s[0].data):a==="bar"||a==="summary"?s.every(n=>n&&typeof n=="object"&&Array.isArray(n.data)):i!==null&&a!==null}captureBeforeDestroy({fromType:t,toType:e,newSeries:s}){if(this._snapshot=null,this._removeGhost(),this._cancelPieces(),!H.isBrowser())return!1;let i=this.w.config.chart.animations;if(!i||i.enabled===!1||i.chartTypeMorph&&i.chartTypeMorph.enabled===!1||i.respectReducedMotion&&ks()||!this.canMorphTypes(t,e)||!this.isCompatibleSeriesShape(t,e,s))return!1;let{marks:a,branches:n,unitDots:r}=this._captureFromDOM(t);if(!a.length)return!1;let o=this._buildMapping(a,t,e,s,n);if(o.size===0)return!1;this._snapshot={fromType:t,toType:e,mapping:o,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}};let l=bt(t),c=bt(e),h=this._canProbePaths();if(c==="unit"&&(l==="bar"||l==="summary"||l==="radial"&&h)){let f=this._countUnitSeries(s);this._snapshot.pieceOut=f>0&&f<=ti}else if(l==="unit"&&(c==="bar"||c==="summary"||c==="radial"&&h)){let f=0;if(r.forEach(g=>{f+=g.length}),f>0&&f<=ti){this._snapshot.pieceIn=!0,this._snapshot.sourceDots=r;let g=[];c==="radial"?(Array.isArray(s)?s:[]).forEach((p,m)=>{g.push(`${m}:0`)}):(Array.isArray(s)?s:[]).forEach((p,m)=>{let b=p&&Array.isArray(p.data)?p.data:[];for(let x=0;x<b.length;x++)g.push(`${m}:${x}`)}),this._snapshot.keyOrder=g}}return this._needsGhost(t,e)&&!this._snapshot.pieceOut&&!this._snapshot.pieceIn&&this._captureGhost(),this.w.globals.previousPaths=[],!0}_needsGhost(t,e){return bt(t)==="unit"||bt(e)==="unit"}_captureGhost(){var t,e;let s=(t=this.w.dom)==null?void 0:t.Paper,i=s&&s.node;if(!i||typeof i.cloneNode!="function")return;let a=i.cloneNode(!0),n=[".apexcharts-xaxis",".apexcharts-yaxis",".apexcharts-grid",".apexcharts-gridlines-horizontal",".apexcharts-gridlines-vertical",".apexcharts-legend",".apexcharts-title-text",".apexcharts-subtitle-text",".apexcharts-annotations",".apexcharts-zoom-rect",".apexcharts-selection-rect",".apexcharts-xcrosshairs",".apexcharts-ycrosshairs"];typeof a.querySelectorAll=="function"&&n.forEach(r=>{a.querySelectorAll(r).forEach(o=>{o.parentNode&&o.parentNode.removeChild(o)})}),typeof a.querySelectorAll=="function"&&a.querySelectorAll("[id]").forEach(r=>{r.removeAttribute("id")}),(e=a.removeAttribute)==null||e.call(a,"id"),this._ghost=a}_mountGhost(){var t,e,s;let i=this._ghost;if(!i||!H.isBrowser())return;let a=(t=this.w.dom)==null?void 0:t.elWrap;if(!a||typeof a.appendChild!="function"){this._ghost=null;return}let n=i.style;n&&(n.position="absolute",n.left="0",n.top="0",n.background="transparent",n.pointerEvents="none",n.opacity="1"),(e=i.setAttribute)==null||e.call(i,"aria-hidden","true"),(s=i.setAttribute)==null||s.call(i,"class","apexcharts-morph-ghost"),a.appendChild(i);let r=this.getSpeed(),o=Math.max(120,Math.round(r*bh));O.requestAnimationFrame(()=>{n&&(n.transition=`opacity ${o}ms ease-in`,n.opacity="0")}),setTimeout(()=>this._removeGhost(),o+60)}_removeGhost(){let t=this._ghost;this._ghost=null,t&&t.parentNode&&t.parentNode.removeChild(t)}_countUnitSeries(t){if(!Array.isArray(t))return 0;let e=0;for(let s of t){if(!s||typeof s!="object"||!Array.isArray(s.data))return 0;e+=s.data.length}return e}usesPieceTakeover(){return!!(this._snapshot&&this._snapshot.pieceOut)}claimsTargetMark(t,e){return!!(this._snapshot&&this._snapshot.pieceIn&&this._snapshot.mapping.has(`${t}:${e}`))}_makePieceLayer(){var t,e;let s=(t=this.w.dom)==null?void 0:t.elGraphical,i=s&&s.node;if(!i||typeof i.appendChild!="function")return null;let a=O.createElementNS("http://www.w3.org/2000/svg","g");if(!a)return null;a.setAttribute("class","apexcharts-morph-pieces"),a.setAttribute("pointer-events","none");let n=(e=this.w.globals)==null?void 0:e.cuid;return n&&a.setAttribute("clip-path",`url(#gridRectBarMask${n})`),i.appendChild(a),this._pieceLayer=a,a}_revealPieceHidden(){var t;let e=(t=this.w.globals.dom)==null?void 0:t.baseEl;!e||typeof e.querySelectorAll!="function"||e.querySelectorAll("[data-piece-hidden]").forEach(s=>{s.removeAttribute("opacity"),s.removeAttribute("data-piece-hidden")})}_cancelPieces(){this._pieceCancel&&(this._pieceCancel(),this._pieceCancel=null);let t=this._pieceLayer;this._pieceLayer=null,t&&t.parentNode&&t.parentNode.removeChild(t),this._revealPieceHidden()}_canProbePaths(){if(!H.isBrowser())return!1;let t=O.createElementNS("http://www.w3.org/2000/svg","path");return!!t&&typeof t.isPointInFill=="function"}_makeExtentProber(t,e,s){let a=s.ownerDocument.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d",t),a.setAttribute("fill","#000"),a.setAttribute("stroke","#000"),a.setAttribute("stroke-width","3"),a.setAttribute("visibility","hidden"),s.appendChild(a);let n=a.ownerSVGElement;if(typeof a.isPointInFill!="function"||!n||typeof n.createSVGPoint!="function")return s.removeChild(a),null;let r=n.createSVGPoint(),o=(h,d)=>{r.x=h,r.y=d;let f=a;return f.isPointInFill(r)||typeof f.isPointInStroke=="function"&&f.isPointInStroke(r)},l=48;return{intervalsAt:(h,d,f)=>{let g=f?e.y:e.x,p=g+(f?e.height:e.width);if(!(p>g))return null;let m=(S,C)=>f?o(C,S):o(S,C),b=[h+(d-h)*.1,(h+d)/2,d-(d-h)*.1],x=(S,C,M)=>{let k=C,L=S;for(let E=0;E<6;E++){let D=(k+L)/2;m(D,M)?L=D:k=D}return(k+L)/2},_=(p-g)/l,w=new Array(l+1).fill(null),y=!1;for(let S of b)for(let C=0;C<=l;C++)w[C]===null&&m(g+C*_,S)&&(w[C]=S,y=!0);if(!y)return null;let v=[],A=-1;for(let S=0;S<=l+1;S++){let C=S<=l&&w[S]!==null;if(C&&A<0&&(A=S),!C&&A>=0){let M=S-1,k=w[A],L=A===0?g:x(g+A*_,g+(A-1)*_,k),E=M===l?p:x(g+M*_,g+(M+1)*_,w[M]);E>L&&v.push([L,E]),A=-1}}return v.length?v:null},dispose:()=>{a.parentNode&&a.parentNode.removeChild(a)}}}_separatePieces(){var t;let e=this._snapshot,s=(t=this.w.globals.dom)==null?void 0:t.baseEl;if(!e||!s)return this._revealPieceHidden();let i=new Map,a=0;if(s.querySelectorAll(".apexcharts-unit-area").forEach(h=>{var d,f,g,p,m,b,x;let _=parseInt((d=h.getAttribute("i"))!=null?d:"",10);if(isNaN(_))return;let w=h.getAttribute("cx"),y,v,A=3;if(w!=null)y=parseFloat(w),v=parseFloat((f=h.getAttribute("cy"))!=null?f:""),A=parseFloat((g=h.getAttribute("r"))!=null?g:"3")||3;else{let C=parseFloat((p=h.getAttribute("width"))!=null?p:"0")||0,M=parseFloat((m=h.getAttribute("height"))!=null?m:"0")||0;y=parseFloat((b=h.getAttribute("x"))!=null?b:"")+C/2,v=parseFloat((x=h.getAttribute("y"))!=null?x:"")+M/2,A=Math.max(C,M)/2||3}if(!isFinite(y)||!isFinite(v))return;let S=i.get(_);S||(S=[],i.set(_,S)),S.push({el:h,x:y,y:v,r:A,fill:h.getAttribute("fill")}),a++}),a===0||a>ti)return this._revealPieceHidden();let n=this._makePieceLayer();if(!n)return this._revealPieceHidden();let r=[],o=n.ownerDocument,l=bt(e.fromType),c=l==="summary"||l==="radial";if(Array.from(i.keys()).sort((h,d)=>h-d).forEach(h=>{var d;let f=i.get(h),g=this.getInitialBBoxFor(h),p=e.mapping.get(`${h}:0`);if(!g||!p){f.forEach(y=>{y.el.removeAttribute("opacity"),y.el.removeAttribute("data-piece-hidden")});return}let m=p.fill&&p.fill.indexOf("url(")!==0?p.fill:((d=this.w.globals.colors)==null?void 0:d[h])||f[0].fill,b=null;if(c){let y=this.getInitialPathFor(h,0);y&&(b=this._makeExtentProber(y,g,n))}let x=b?Qn(g,f.length,b.intervalsAt):Jn(g,f.length);b&&b.dispose();let _=ss(x,y=>[y.x+y.width/2,y.y+y.height/2]),w=ss(f,y=>[y.x,y.y]);for(let y=0;y<w.length;y++){let v=_[y],A=w[y],S=o.createElementNS("http://www.w3.org/2000/svg","rect");S.setAttribute("data-i",String(h)),S.setAttribute("x",String(v.x)),S.setAttribute("y",String(v.y)),S.setAttribute("width",String(v.width)),S.setAttribute("height",String(v.height)),S.setAttribute("rx","0"),S.setAttribute("fill",String(m)),n.appendChild(S),r.push({el:S,from:{x:v.x,y:v.y,width:v.width,height:v.height,rx:0},to:{x:A.x-A.r,y:A.y-A.r,width:A.r*2,height:A.r*2,rx:A.r},fill:er(m,A.fill),fillEnd:A.fill,delay:0,meta:{dotEl:A.el}})}}),!r.length)return this._cancelPieces();this._runPieces(r,h=>{let d=h.meta.dotEl;d.removeAttribute("opacity"),d.removeAttribute("data-piece-hidden"),h.el.parentNode&&h.el.parentNode.removeChild(h.el)})}_combinePieces(){var t,e;let s=this._snapshot,i=(t=this.w.globals.dom)==null?void 0:t.baseEl;if(!s||!s.sourceDots||!s.keyOrder||!i)return this._revealPieceHidden();let a=this._collectTargetMarks(s.toType);if(!a.size)return this._revealPieceHidden();let n=s.oldLayout.translateX-(this.w.layout.translateX||0),r=s.oldLayout.translateY-(this.w.layout.translateY||0),o=Array.from(s.sourceDots.keys()).sort((g,p)=>g-p),l=this._makePieceLayer();if(!l)return this._revealPieceHidden();let c=l.ownerDocument,h=[],d=bt(s.toType),f=d==="summary"||d==="radial";for(let g=0;g<o.length;g++){let p=s.sourceDots.get(o[g]),m=s.keyOrder[g],b=m?a.get(m):null;if(!b||!p||!p.length){b&&b.els.forEach(S=>{S.removeAttribute("opacity"),S.removeAttribute("data-piece-hidden")});continue}let x=b.fill&&b.fill.indexOf("url(")!==0?b.fill:((e=this.w.globals.colors)==null?void 0:e[b.realIndex])||p[0].fill,_=null;if(f){let S=b.d||b.els.map(C=>C.getAttribute("pathTo")||C.getAttribute("d")).filter(Boolean).join(" ");S&&(_=this._makeExtentProber(S,b.bbox,l))}let w=_?Qn(b.bbox,p.length,_.intervalsAt):Jn(b.bbox,p.length);_&&_.dispose();let y=ss(w,S=>[S.x+S.width/2,S.y+S.height/2]),v=ss(p,S=>[S.x,S.y]),A={remaining:v.length,els:b.els,tiles:[]};for(let S=0;S<v.length;S++){let C=v[S],M=y[S],k=c.createElementNS("http://www.w3.org/2000/svg","rect"),L=C.x+n-C.r,E=C.y+r-C.r;k.setAttribute("data-key",m),k.setAttribute("x",String(L)),k.setAttribute("y",String(E)),k.setAttribute("width",String(C.r*2)),k.setAttribute("height",String(C.r*2)),k.setAttribute("rx",String(C.r)),k.setAttribute("fill",String(C.fill||x)),l.appendChild(k),A.tiles.push(k),h.push({el:k,from:{x:L,y:E,width:C.r*2,height:C.r*2,rx:C.r},to:{x:M.x,y:M.y,width:M.width,height:M.height,rx:0},fill:er(C.fill,x),fillEnd:String(x),delay:0,meta:{markState:A}})}}if(!h.length)return this._cancelPieces();this._runPieces(h,g=>{let p=g.meta.markState;p.remaining--,p.remaining===0&&(p.els.forEach(m=>{m.removeAttribute("opacity"),m.removeAttribute("data-piece-hidden")}),p.tiles.forEach(m=>{m.parentNode&&m.parentNode.removeChild(m)}))})}_runPieces(t,e){let s=this.getSpeed(),i=Math.min(yh,s*.35),a=Math.max(180,s-i);for(let n=0;n<t.length;n++)t[n].delay=t.length>1?n/(t.length-1)*i:0;this._pieceCancel=uh({pieces:t,duration:a,onPieceDone:e,onAllDone:()=>{this._pieceCancel=null,this._cancelPieces()}})}_collectTargetMarks(t){var e;let s=(e=this.w.globals.dom)==null?void 0:e.baseEl,i=new Map;if(!s)return i;let a=bt(t);if(a==="radial")return s.querySelectorAll(".apexcharts-pie-series .apexcharts-pie-area").forEach((r,o)=>{let l=r.getAttribute("data:pathFinal")||r.getAttribute("d");if(!l||!l.trim())return;let c=this._pathBBox(l);c&&i.set(`${o}:0`,{realIndex:o,j:0,d:l,bbox:{x:c.minX,y:c.minY,width:c.maxX-c.minX,height:c.maxY-c.minY},fill:r.getAttribute("fill"),els:[r]})}),i;let n=a==="summary"?`.apexcharts-${t}-series`:".apexcharts-bar-series";return s.querySelectorAll(`${n} .apexcharts-series`).forEach(r=>{var o;let l=parseInt((o=r.getAttribute("data:realIndex"))!=null?o:"0",10)||0,c=0;r.querySelectorAll("path[pathTo]").forEach(h=>{var d;let f=h.getAttribute("pathTo")||h.getAttribute("d");if(!f||!f.trim())return;let g=parseInt((d=h.getAttribute("j"))!=null?d:"",10),p=isNaN(g)?c++:g,m=this._pathBBox(f);if(!m)return;let b=`${l}:${p}`,x=i.get(b);x?(x.els.push(h),x.bbox={x:Math.min(x.bbox.x,m.minX),y:Math.min(x.bbox.y,m.minY),width:Math.max(x.bbox.x+x.bbox.width,m.maxX)-Math.min(x.bbox.x,m.minX),height:Math.max(x.bbox.y+x.bbox.height,m.maxY)-Math.min(x.bbox.y,m.minY)}):i.set(b,{realIndex:l,j:p,bbox:{x:m.minX,y:m.minY,width:m.maxX-m.minX,height:m.maxY-m.minY},fill:h.getAttribute("fill"),els:[h]})})}),i}_captureFromDOM(t){var e;let s=(e=this.w.globals.dom)==null?void 0:e.baseEl;if(!s)return{marks:[],branches:[],unitDots:new Map};let i=[],a=[],n=new Map,r=bt(t);if(r==="bar")s.querySelectorAll(".apexcharts-bar-series .apexcharts-series").forEach(l=>{var c;let h=parseInt((c=l.getAttribute("data:realIndex"))!=null?c:"0",10);l.querySelectorAll("path[pathTo]").forEach((f,g)=>{let p=f.getAttribute("pathTo")||f.getAttribute("d");p&&i.push({realIndex:h,j:g,d:p,fill:f.getAttribute("fill")})})});else if(r==="summary"){let o=new Map;s.querySelectorAll(`.apexcharts-${t}-area`).forEach(l=>{var c,h;let d=parseInt((c=l.getAttribute("j"))!=null?c:"",10);if(isNaN(d))return;let f=l.getAttribute("pathTo")||l.getAttribute("d");if(!f||!f.trim())return;let g=typeof l.closest=="function"?l.closest(".apexcharts-series"):null,p=parseInt((h=g?.getAttribute("data:realIndex"))!=null?h:"0",10)||0,m=`${p}:${d}`,b=o.get(m);b?b.d+=` ${f}`:o.set(m,{realIndex:p,j:d,d:f,fill:l.getAttribute("fill")})}),Array.from(o.values()).sort((l,c)=>l.realIndex-c.realIndex||l.j-c.j).forEach(l=>i.push(l))}else if(r==="partition")if(t==="treemap"){let o=h=>{var d,f,g,p;let m=parseFloat((d=h.getAttribute("x"))!=null?d:""),b=parseFloat((f=h.getAttribute("y"))!=null?f:""),x=parseFloat((g=h.getAttribute("width"))!=null?g:""),_=parseFloat((p=h.getAttribute("height"))!=null?p:"");return[m,b,x,_].every(w=>isFinite(w))?`M ${m} ${b} L ${m+x} ${b} L ${m+x} ${b+_} L ${m} ${b+_} Z`:null};s.querySelectorAll(".apexcharts-treemap-rect").forEach(h=>{var d,f;let g=o(h);g&&i.push({realIndex:parseInt((d=h.getAttribute("i"))!=null?d:"0",10)||0,j:parseInt((f=h.getAttribute("j"))!=null?f:"0",10)||0,d:g,fill:h.getAttribute("fill"),key:h.getAttribute("data:key")||null})}),s.querySelectorAll(".apexcharts-treemap-parent-rect").forEach(h=>{let d=o(h),f=h.getAttribute("data:key");!d||!f||a.push({key:f,d,fill:h.getAttribute("fill")})})}else{let o=s.querySelectorAll(".apexcharts-sunburst-arc"),l=[];o.forEach(h=>{h.getAttribute("data:leaf")==="true"&&l.push(h)}),(l.length?l:Array.from(o)).forEach((h,d)=>{let f=h.getAttribute("d");!f||!f.trim()||i.push({realIndex:d,j:0,d:f,fill:h.getAttribute("fill"),key:h.getAttribute("data:key")||null})}),o.forEach(h=>{if(h.getAttribute("data:leaf")==="true")return;let d=h.getAttribute("d"),f=h.getAttribute("data:key");!d||!d.trim()||!f||a.push({key:f,d,fill:h.getAttribute("fill")})})}else if(r==="unit"){let o=s.querySelectorAll(".apexcharts-unit-area"),l=new Map;o.forEach(c=>{var h,d,f,g,p,m,b;let x=parseInt((h=c.getAttribute("i"))!=null?h:"",10);if(isNaN(x))return;let _=c.getAttribute("cx"),w,y,v=3;if(_!=null)w=parseFloat(_),y=parseFloat((d=c.getAttribute("cy"))!=null?d:""),v=parseFloat((f=c.getAttribute("r"))!=null?f:"3")||3;else{let C=parseFloat((g=c.getAttribute("width"))!=null?g:"0")||0,M=parseFloat((p=c.getAttribute("height"))!=null?p:"0")||0;w=parseFloat((m=c.getAttribute("x"))!=null?m:"")+C/2,y=parseFloat((b=c.getAttribute("y"))!=null?b:"")+M/2,v=Math.max(C,M)/2||3}if(!isFinite(w)||!isFinite(y))return;let A=n.get(x);A||(A=[],n.set(x,A)),A.push({x:w,y,r:v,fill:c.getAttribute("fill")});let S=l.get(x);if(!S){l.set(x,{minX:w,minY:y,maxX:w,maxY:y,fill:c.getAttribute("fill")});return}w<S.minX&&(S.minX=w),w>S.maxX&&(S.maxX=w),y<S.minY&&(S.minY=y),y>S.maxY&&(S.maxY=y)}),Array.from(l.keys()).sort((c,h)=>c-h).forEach(c=>{let h=l.get(c),d=2,f=h.minX-d,g=h.minY-d,p=h.maxX+d,m=h.maxY+d;i.push({realIndex:c,j:0,d:`M ${f} ${g} L ${p} ${g} L ${p} ${m} L ${f} ${m} Z`,fill:h.fill})})}else if(r==="radial")if(t==="radialBar"||t==="gauge"){let o=this.w.layout.gridWidth/2,l=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;s.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(h=>{var d;let f=h.parentElement,g=parseInt((d=f?.getAttribute("data:realIndex"))!=null?d:"0",10),p=h.getAttribute("d");if(!p)return;let m=parseFloat(h.getAttribute("stroke-width")||"0"),b=m>1&&this._radialArcToFilledSegment(p,m,o,l)||p;i.push({realIndex:g,j:0,d:b,fill:h.getAttribute("stroke")})})}else s.querySelectorAll(".apexcharts-pie-series .apexcharts-pie-area").forEach((l,c)=>{let h=l.getAttribute("d");h&&i.push({realIndex:c,j:0,d:h,fill:l.getAttribute("fill")})});return{marks:i,branches:a,unitDots:n}}_radialArcToFilledSegment(t,e,s,i){let a=t.match(/M\s*(-?[\d.]+)\s+(-?[\d.]+)\s+A\s*(-?[\d.]+)\s+(?:-?[\d.]+)\s+(?:-?[\d.]+)\s+(\d)\s+(\d)\s+(-?[\d.]+)\s+(-?[\d.]+)/);if(!a)return null;let n=parseFloat(a[1]),r=parseFloat(a[2]),o=parseFloat(a[3]),l=parseInt(a[4],10),c=parseInt(a[5],10),h=parseFloat(a[6]),d=parseFloat(a[7]);if(!isFinite(o)||o<=0)return null;let f=e/2,g=o+f,p=Math.max(0,o-f),m=(v,A,S)=>{let C=v-s,M=A-i,k=Math.sqrt(C*C+M*M);if(k===0)return{x:s,y:i};let L=S/k;return{x:s+C*L,y:i+M*L}},b=m(n,r,g),x=m(h,d,g),_=m(n,r,p),w=m(h,d,p),y=c?0:1;return`M ${b.x} ${b.y} A ${g} ${g} 0 ${l} ${c} ${x.x} ${x.y} L ${w.x} ${w.y} A ${p} ${p} 0 ${l} ${y} ${_.x} ${_.y} Z`}buildRingSegmentPath(t,e,s,i,a,n){let r=i/2,o=s+r,l=Math.max(0,s-r),c=(a-90)*Math.PI/180,h=(n-90)*Math.PI/180,d={x:t+o*Math.cos(c),y:e+o*Math.sin(c)},f={x:t+o*Math.cos(h),y:e+o*Math.sin(h)},g={x:t+l*Math.cos(c),y:e+l*Math.sin(c)},p={x:t+l*Math.cos(h),y:e+l*Math.sin(h)},m=n>a?1:0,b=Math.abs(n-a)>180?1:0;return`M ${d.x} ${d.y} A ${o} ${o} 0 ${b} ${m} ${f.x} ${f.y} L ${p.x} ${p.y} A ${l} ${l} 0 ${b} ${1-m} ${g.x} ${g.y} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(t,e,s,i,a){let n=new Map,r=bt(s),o=t.slice().sort((l,c)=>l.realIndex-c.realIndex||l.j-c.j);if(r==="partition"&&a&&a.length){let l=o.filter(c=>c.key);l.length===o.length&&(l.forEach(c=>{n.set(`key:${c.key}`,{d:c.d,fill:c.fill})}),a.forEach(c=>{n.set(`key:${c.key}`,{d:c.d,fill:c.fill})}))}if(r==="radial"||r==="unit"||r==="partition")return o.forEach((l,c)=>{n.set(`${c}:0`,{d:l.d,fill:l.fill})}),n;if(r==="bar"||r==="summary"){let l=[];return(Array.isArray(i)?i:[]).forEach((h,d)=>{let f=h&&Array.isArray(h.data)?h.data:[];for(let g=0;g<f.length;g++)l.push({realIndex:d,j:g})}),o.forEach((h,d)=>{let f=l[d];f&&n.set(`${f.realIndex}:${f.j}`,{d:h.d,fill:h.fill})}),n}return n}isActive(){return this._snapshot!==null}getInitialPathFor(t,e){if(!this._snapshot)return null;let s=this._snapshot.mapping.get(`${t}:${e}`);if(!s)return null;let i=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),a=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return i===0&&a===0?s.d:this._translatePathD(s.d,i,a)}_translatePathD(t,e,s){return e===0&&s===0?t:ie(t).map(a=>{let n=a[0];return n==="Z"?"Z":n==="M"||n==="L"||n==="T"?`${n} ${a[1]+e} ${a[2]+s}`:n==="H"?`${n} ${a[1]+e}`:n==="V"?`${n} ${a[1]+s}`:n==="C"?`${n} ${a[1]+e} ${a[2]+s} ${a[3]+e} ${a[4]+s} ${a[5]+e} ${a[6]+s}`:n==="S"||n==="Q"?`${n} ${a[1]+e} ${a[2]+s} ${a[3]+e} ${a[4]+s}`:n==="A"?`${n} ${a[1]} ${a[2]} ${a[3]} ${a[4]} ${a[5]} ${a[6]+e} ${a[7]+s}`:a.join(" ")}).join(" ")}getInitialCenterFor(t){let e=this.getInitialBBoxFor(t);return e?{x:e.x+e.width/2,y:e.y+e.height/2}:null}getInitialPathAt(t){return this.getInitialPathFor(t,0)}getInitialPathForKey(t){return!this._snapshot||!t?null:this.getInitialPathFor("key",t)}hasKeyedMarks(){if(!this._snapshot)return!1;for(let t of this._snapshot.mapping.keys())if(typeof t=="string"&&t.startsWith("key:"))return!0;return!1}getInitialSlotFor(t,e,s){let i=this.getInitialBBoxFor(t);if(!i)return null;let a=i.x+i.width/2,n=i.y+i.height/2;if(!(s>1)||!(e>=0))return{x:a,y:n};let r=(Math.min(e,s-1)+.5)/s;return i.height>=i.width?{x:a,y:i.y+i.height*(1-r)}:{x:i.x+i.width*r,y:n}}getInitialBBoxFor(t){if(!this._snapshot)return null;let e=this._snapshot.mapping.get(`${t}:0`);if(!e)return null;let s=this._pathBBox(e.d);if(!s)return null;let i=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),a=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return{x:s.minX+i,y:s.minY+a,width:s.maxX-s.minX,height:s.maxY-s.minY}}_pathBBox(t){let e=ie(t),s=1/0,i=1/0,a=-1/0,n=-1/0,r=!1;return e.forEach(o=>{let l=o[0];if(l==="Z")return;let c=[];if(l==="H")c=[[o[1],(i+n)/2||o[1]]];else if(l==="V")c=[[(s+a)/2||o[1],o[1]]];else if(l==="A")c=[[o[6],o[7]]];else for(let h=1;h+1<o.length;h+=2)c.push([o[h],o[h+1]]);c.forEach(([h,d])=>{!isFinite(h)||!isFinite(d)||(r=!0,h<s&&(s=h),h>a&&(a=h),d<i&&(i=d),d>n&&(n=d))})}),r?{minX:s,minY:i,maxX:a,maxY:n}:null}getInitialFillFor(t,e){if(!this._snapshot)return null;let s=this._snapshot.mapping.get(`${t}:${e}`);return s?s.fill:null}getSpeed(){let t=this.w.config.chart.animations;return t.chartTypeMorph&&t.chartTypeMorph.speed||t.speed||600}applyChromeFade(){var t;if(!this._snapshot||!H.isBrowser())return;let e=(t=this.w.globals.dom)==null?void 0:t.baseEl;if(!e)return;this._snapshot.pieceOut?this._separatePieces():this._snapshot.pieceIn?this._combinePieces():this._mountGhost();let s=this.getSpeed();[".apexcharts-xaxis",".apexcharts-yaxis",".apexcharts-grid",".apexcharts-gridlines-horizontal",".apexcharts-gridlines-vertical",".apexcharts-legend",".apexcharts-title-text",".apexcharts-subtitle-text"].forEach(a=>{e.querySelectorAll(a).forEach(n=>{n.style&&(n.style.opacity="0",n.style.transition=`opacity ${s}ms ease-out`,O.requestAnimationFrame(()=>{n.style.opacity="1"}),setTimeout(()=>{n.style.transition="",n.style.opacity=""},s+80))})}),setTimeout(()=>this.cleanup(),s+100)}cleanup(){this._snapshot=null,this._removeGhost(),this._cancelPieces()}};ht.registerFeatures({morphTypeChange:aa});var ce="http://www.w3.org/1999/xhtml",na=class{constructor(t,e,s){this.w=t,this.ctx=e,this.drilldown=s}render(t){if(!H.isBrowser())return;let e=this.w,s=e.dom.elWrap;if(!s)return;let i=s.querySelector(".apexcharts-breadcrumb");i&&i.parentNode&&i.parentNode.removeChild(i);let a=e.config.drilldown&&e.config.drilldown.breadcrumb;if(!a||a.show===!1||this.drilldown.depth===0)return;let n=O.createElementNS(ce,"nav");n.setAttribute("class","apexcharts-breadcrumb"),n.setAttribute("aria-label","Drilldown breadcrumb"),this._position(n,a);let r=a.separator!=null?a.separator:" / ";t.forEach((o,l)=>{if(l>0){let d=O.createElementNS(ce,"span");d.setAttribute("class","apexcharts-breadcrumb-separator"),d.setAttribute("aria-hidden","true"),d.textContent=r,n.appendChild(d)}let c=this._label(o,l);if(l===t.length-1){let d=O.createElementNS(ce,"span");d.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),d.setAttribute("aria-current","page"),d.textContent=c,n.appendChild(d)}else{let d=O.createElementNS(ce,"button");if(d.setAttribute("type","button"),d.setAttribute("class","apexcharts-breadcrumb-item"),l===0){let g=O.createElementNS(ce,"span");g.setAttribute("class","apexcharts-breadcrumb-arrow"),g.setAttribute("aria-hidden","true"),g.textContent="\u2190",d.appendChild(g)}let f=O.createElementNS(ce,"span");f.setAttribute("class","apexcharts-breadcrumb-label"),f.textContent=c,d.appendChild(f),d.addEventListener("click",()=>this.drilldown.drillToLevel(l)),n.appendChild(d)}}),s.appendChild(n),this.w.globals.axisCharts&&Zl(this.w,this.ctx,n,a),this._avoidChromeOverlap(n)}_avoidChromeOverlap(t){let e=this.w,s=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(a=>e.dom.baseEl.querySelector(a)).filter(a=>a!==null);if(!s.length)return;let i=e.dom.elWrap.getBoundingClientRect().top;for(let a=0;a<s.length+1;a++){let n=t.getBoundingClientRect(),r=s.find(o=>{let l=o.getBoundingClientRect();return n.left<l.right&&n.right>l.left&&n.top<l.bottom&&n.bottom>l.top});if(!r)break;t.style.top=`${r.getBoundingClientRect().bottom-i+4}px`}}_label(t,e){let s=this.w.config.drilldown.breadcrumb,i;if(e===0)i=s.rootLabel!=null?s.rootLabel:"All";else{let a=(this.w.config.drilldown.series||[]).find(n=>n&&n.id===t);i=a&&a.name||String(t)}return typeof s.formatter=="function"?s.formatter(i,{index:e,depth:this.drilldown.depth}):i}_position(t,e){let s=e.offsetX||0,i=e.offsetY||0;t.style.position="absolute",t.style.top=i+"px",e.position==="top-right"?t.style.right=-s+3+"px":t.style.left=s+"px"}},ei="http://www.w3.org/1999/xhtml",is="apexcharts-drilldown-loading",ra=class{constructor(t){this.w=t,this.el=null}_cfg(){let t=this.w.config.drilldown,e=t&&t.loading;return e===!1?{show:!1}:e||{}}show(){if(!H.isBrowser())return;let t=this._cfg();if(t.show===!1)return;let e=this.w.dom.elWrap;if(!e)return;this.hide();let s=O.createElementNS(ei,"div");s.setAttribute("class",is),s.setAttribute("role","status"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-label",t.text||"Loading");let i=O.createElementNS(ei,"div");if(i.setAttribute("class",`${is}-spinner`),i.setAttribute("aria-hidden","true"),s.appendChild(i),t.text){let a=O.createElementNS(ei,"span");a.setAttribute("class",`${is}-text`),a.textContent=t.text,s.appendChild(a)}e.appendChild(s),this.el=s}hide(){let t=this.w.dom.elWrap;if(t){let e=t.querySelectorAll(`.${is}`);for(let s=0;s<e.length;s++){let i=e[s];i.parentNode&&i.parentNode.removeChild(i)}}else this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);this.el=null}},sr=32,ir="__apexDrilldownMarker",oa=class{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.rootSnapshot=null,this._wired=!1,this._asyncCache=new Map,this._pending=null,this._warnedUnreachable=!1,this._warnedNoSliceOffset=!1,this.breadcrumb=new na(t,e,this),this.loading=new ra(t),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onPlotDown=this._onPlotDown.bind(this),this._onPlotClick=this._onPlotClick.bind(this),this._downAt=null,this._plotClickWired=null,this.init()}init(){let t=this.w;!t.config.drilldown||!t.config.drilldown.enabled||this._wired||(this._wired=!0,this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender),t.config.markers&&(t.config.markers.discrete=this._drillMarkers(t.config.series)))}get path(){return["root",...this.stack.map(t=>t.id)]}get depth(){return this.stack.length}drillDown(t,e,s){let i=this._resolveChild(t);return i?this._drillInto(i,e,s):typeof this.w.config.drilldown.onDrillDown=="function"?this._drillDownAsync(t,e,s):(console.warn(`ApexCharts: drilldown id "${t}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(t){let e=this.stack.length;if(t<0||t>=e)return Promise.resolve(this.ctx);let s=this.path[this.path.length-1],i=t===0?this.rootSnapshot:this.stack[t].restore;this.stack=this.stack.slice(0,t);let a=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(i),"up",{from:s,to:a})}_resolveChild(t){let e=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(e)&&e.find(s=>s&&s.id===t)||null}_drillInto(t,e,s){if(this.stack.length>=sr)return console.warn(`ApexCharts: drilldown max depth (${sr}) reached.`),Promise.resolve(this.ctx);this.rootSnapshot||(this.rootSnapshot=this._snapshot());let i=this.path[this.path.length-1];return this.stack.push({id:t.id,name:t.name,restore:this._snapshot()}),this._apply(this._viewFromChild(t),"down",{from:i,to:t.id,point:e,seriesIndex:s&&s.seriesIndex,dataPointIndex:s&&s.dataPointIndex})}_drillDownAsync(t,e,s){let a=this.w.config.drilldown.onDrillDown,n=this._cacheGet(t);if(n)return this._drillInto(n,e,s);if(this._pending)return this._pending;let r;this.loading.show();try{r=a({id:t,point:e,seriesIndex:s&&s.seriesIndex,dataPointIndex:s&&s.dataPointIndex})}catch(c){return this.loading.hide(),this._fire("drillDownError",{id:t,error:c}),Promise.resolve(this.ctx)}let o=()=>{this._pending=null,this.loading.hide()},l=Promise.resolve(r).then(c=>{if(o(),this._isDead())return this.ctx;if(!c||!c.data)return this._fire("drillDownError",{id:t,error:new Error(`drilldown: onDrillDown resolved without a drillable level for id "${t}" (expected an object with a \`data\` array).`)}),this.ctx;let h=c.id!=null?c:j(G({},c),{id:t});return this._cacheSet(t,h),this._drillInto(h,e,s)},c=>(o(),this._isDead()?this.ctx:(this._fire("drillDownError",{id:t,error:c}),this.ctx)));return this._pending=l,l}_isDead(){let t=this.w;return!t||!t.globals||t.globals.isDestroyed===!0}_cacheEnabled(){let t=this.w.config.drilldown;return!!(t&&t.cache!==!1)}_cacheGet(t){return!this._cacheEnabled()||t==null?null:this._asyncCache.get(t)||null}_cacheSet(t,e){!this._cacheEnabled()||t==null||this._asyncCache.set(t,e)}clearCache(t){return t==null?this._asyncCache.clear():this._asyncCache.delete(t),this.ctx}_snapshot(){let t=this.w.config,e=this._overrideFields(),s={series:this._uncollapseSeries(T.clone(t.series))};return Array.isArray(t.labels)&&t.labels.length&&(s.labels=T.clone(t.labels)),s.chart={type:t.chart.type,stacked:t.chart.stacked},e.has("xaxis")&&(s.xaxis=T.clone(t.xaxis)),e.has("yaxis")&&(s.yaxis=T.clone(t.yaxis)),e.has("colors")&&(s.colors=t.colors?T.clone(t.colors):void 0),e.has("plotOptions")&&(s.plotOptions=T.clone(t.plotOptions)),e.has("fill")&&(s.fill=T.clone(t.fill)),e.has("legend")&&(s.legend=T.clone(t.legend)),s}_uncollapseSeries(t){let e=this.w,s=e.globals,i=[...s.collapsedSeries||[],...s.ancillaryCollapsedSeries||[]];if(!i.length)return t;let a=e.config.chart.type,r=(a==="pie"||a==="donut"||a==="polarArea")&&t.length===1&&t[0]&&typeof t[0]=="object"&&Array.isArray(t[0].data)?t[0].data:t;for(let o of i){let l=o.index;s.axisCharts?t[l]&&(t[l].data=Array.isArray(o.data)?o.data.slice():o.data):r[l]&&typeof r[l]=="object"?r[l].y=o.data:r[l]!==void 0&&(r[l]=o.data)}return t}_overrideFields(){let t=new Set,e=this.w.config.drilldown&&this.w.config.drilldown.series||[];for(let s of e)s&&(s.xaxis&&t.add("xaxis"),s.yaxis&&t.add("yaxis"),s.colors&&t.add("colors"),s.plotOptions&&t.add("plotOptions"),s.fill&&t.add("fill"),s.legend&&t.add("legend"));return t}_copyOptionalViewFields(t,e){e.xaxis&&(t.xaxis=e.xaxis),e.yaxis&&(t.yaxis=e.yaxis),e.colors&&(t.colors=e.colors),e.plotOptions&&(t.plotOptions=e.plotOptions),e.fill&&(t.fill=e.fill),e.legend&&(t.legend=e.legend)}_viewFromChild(t){let e={};Array.isArray(t.series)?e.series=t.series:e.series=[{name:t.name||"",data:t.data}];let s={};return t.chart&&t.chart.type&&(s.type=t.chart.type),t.chart&&t.chart.stacked!=null&&(s.stacked=t.chart.stacked),Object.keys(s).length&&(e.chart=s),this._copyOptionalViewFields(e,t),e}_viewFromSnapshot(t){let e={series:t.series,chart:t.chart};return t.labels&&t.labels.length&&(e.labels=t.labels),this._copyOptionalViewFields(e,t),e}_apply(t,e,s){let i=this.w;i.interact.selectedDataPoints=[],i.globals.collapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeries=[],i.globals.ancillaryCollapsedSeriesIndices=[],i.globals.allSeriesCollapsed=!1,i.globals.risingSeries=[],t.markers=j(G({},t.markers||{}),{discrete:this._drillMarkers(t.series)});let a=(!i.config.drilldown.animation||i.config.drilldown.animation.enabled!==!1)&&i.config.chart.animations.enabled!==!1;e==="down"&&this._fire("drillDownStart",s);let n=o=>this.ctx.updateOptions(t,!1,o,!1,!1),r=()=>(this._fire(e==="down"?"drillDownEnd":"drillUp",s),this.ctx);if(a&&this._zoomEnabled()){let o=this._triggerOrigin(s);if(o)return this._zoomDrill(o,e,()=>n(!1)).then(r)}return n(a).then(r)}_zoomEnabled(){let t=this.w.config.drilldown&&this.w.config.drilldown.animation;return!!(t&&t.zoomFromPoint)}_svgNode(){let t=this.w.dom&&this.w.dom.Paper;return t&&t.node?t.node:null}_markGroup(){let t=this._svgNode();return!t||typeof t.querySelector!="function"?null:t.querySelector(".apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap")}_triggerOrigin(t){if(!H.isBrowser())return null;let e=this._svgNode(),s=this._markGroup();if(!e||!s||typeof s.animate!="function"||typeof e.getBoundingClientRect!="function")return null;let i=e.getBoundingClientRect(),a=null;if(t&&t.seriesIndex!=null&&t.dataPointIndex!=null&&this.w.dom.baseEl&&(a=this.w.dom.baseEl.querySelector(`[index="${t.seriesIndex}"][j="${t.dataPointIndex}"]`)),a&&typeof a.getBoundingClientRect=="function"){let r=a.getBoundingClientRect();return{x:r.left+r.width/2-i.left,y:r.top+r.height/2-i.top}}let n=s.getBoundingClientRect();return{x:n.left+n.width/2-i.left,y:n.top+n.height/2-i.top}}_zoomDrill(t,e,s){return _r(this,null,function*(){let i=this._zoomDuration(),a=e==="down",n=Math.round(i*.55),r=a?"scale(1.03)":"scale(0.97)",o=a?"scaleX(0.55) scaleY(0.85)":"scale(1.04)",l=g=>{g.style.transformBox="view-box",g.style.transformOrigin=`${t.x}px ${t.y}px`},c=g=>{g.style.transform="",g.style.opacity="",g.style.transformOrigin="",g.style.transformBox=""},h=this._markGroup(),d=null;if(h){l(h),d=h.animate([{transform:"scale(1)",opacity:1},{transform:r,opacity:0}],{duration:n,easing:"ease-in",fill:"forwards"});try{yield d.finished}catch{}}yield s();let f=this._markGroup();if(f){l(f),f.style.opacity="0",f.style.transform=o,d&&h===f&&d.cancel();let g=f.animate([{transform:o,opacity:0},{transform:"scale(1)",opacity:1}],{duration:i,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"});try{yield g.finished}catch{}c(f),g.cancel()}})}_zoomDuration(){let t=this.w.config.drilldown&&this.w.config.drilldown.animation,e=t&&typeof t.speed=="number"?t.speed:260;return Math.max(80,e)}_fire(t,e){let s=this.w.config.chart.events&&this.w.config.chart.events[t];typeof s=="function"&&s(e,this.ctx,this.w),this.ctx.events.fireEvent(t,[e,this.ctx,this.w])}_onPointSelect(t,e,s){if(!s)return;let i=this._pointAt(s.seriesIndex,s.dataPointIndex);if(i&&typeof i=="object"&&i.drilldown!=null)return this.drillDown(i.drilldown,i,s);if(typeof this.w.config.drilldown.onDrillDown=="function")return this._drillDownAsync(null,i,s)}_pointAt(t,e){let s=this.w.config.series;if(!Array.isArray(s)||t==null||e==null)return null;let i=s[t];return!i||!Array.isArray(i.data)?null:i.data[e]!=null?i.data[e]:null}_afterRender(){let t=this.w;!t.config.drilldown||!t.config.drilldown.enabled||(this._markDrillableTargets(),this._wirePlotClick(),this.breadcrumb.render(this.path),t.config.markers&&(t.config.markers.discrete=this._drillMarkers(t.config.series)))}_markDrillableTargets(){if(!H.isBrowser())return;let t=this.w,e=t.dom.baseEl,s=t.config.series;if(!e||!Array.isArray(s))return;let i=0;s.forEach((a,n)=>{let r=a&&Array.isArray(a.data)?a.data:null;r&&r.forEach((o,l)=>{if(!o||typeof o!="object"||o.drilldown==null)return;let c=e.querySelectorAll(`[index="${n}"][j="${l}"]`);c.length||i++,c.forEach(h=>{this._isClickThroughMark(h)&&h.classList.remove("no-pointer-events"),h.classList.add("apexcharts-drilldown-target")})})}),i&&!this._warnedUnreachable&&(this._warnedUnreachable=!0,console.warn(`ApexCharts: ${i} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \`drilldown.marker\` on, or give the series markers of its own (\`markers.size > 0\`).`))}warnSliceOffsetDisabled(){this._warnedNoSliceOffset||(this._warnedNoSliceOffset=!0,console.warn("ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered."))}_wirePlotClick(){if(!H.isBrowser())return;let t=this.w.dom.baseEl;!t||this._plotClickWired===t||(this._plotClickWired&&(this._plotClickWired.removeEventListener("mousedown",this._onPlotDown),this._plotClickWired.removeEventListener("click",this._onPlotClick)),t.addEventListener("mousedown",this._onPlotDown),t.addEventListener("click",this._onPlotClick),this._plotClickWired=t)}_onPlotDown(t){this._downAt={x:t.clientX,y:t.clientY}}_onPlotClick(t){let e=this.w;if(!e.config.drilldown||!e.config.drilldown.enabled)return;let s=this._downAt;if(this._downAt=null,s&&Math.hypot(t.clientX-s.x,t.clientY-s.y)>4)return;let i=t.target;if(!i||typeof i.closest!="function"||i.closest(".apexcharts-drilldown-target")||i.closest(".apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip"))return;let a=e.interact.capturedSeriesIndex,n=e.interact.capturedDataPointIndex;if(a==null||n==null||a<0||n<0||!this._isPointBasedSeries(e.config.series[a]))return;let r=this._pointAt(a,n);if(!(!r||typeof r!="object"||r.drilldown==null))return this.drillDown(r.drilldown,r,{seriesIndex:a,dataPointIndex:n})}_isClickThroughMark(t){return!t.classList||!t.classList.contains("no-pointer-events")||!t.classList.contains("apexcharts-marker")?!1:!(typeof t.closest=="function"&&t.closest(".apexcharts-tooltip"))}_drillMarkers(t){let e=this.w,s=e.config.drilldown,i=Array.isArray(e.config.markers&&e.config.markers.discrete)?e.config.markers.discrete.filter(r=>!r||!r[ir]):[],a=s&&s.marker||{};if(a.show===!1||!Array.isArray(t))return i;let n=[];return t.forEach((r,o)=>{if(!this._seriesNeedsDrillMarker(o,r))return;let l=r&&Array.isArray(r.data)?r.data:null;l&&l.forEach((c,h)=>{if(!c||typeof c!="object"||c.drilldown==null)return;let d={seriesIndex:o,dataPointIndex:h,[ir]:!0};a.size!==void 0&&(d.size=a.size),a.shape!==void 0&&(d.shape=a.shape),a.fillColor!==void 0&&(d.fillColor=a.fillColor),a.strokeColor!==void 0&&(d.strokeColor=a.strokeColor),n.push(d)})}),i.concat(n)}_seriesNeedsDrillMarker(t,e){if(!this._isPointBasedSeries(e))return!1;let s=this.w.config.markers&&this.w.config.markers.size,i=Array.isArray(s)?s[t]:s;return!(Number(i)>0)}_isPointBasedSeries(t){let e=t&&t.type||this.w.config.chart.type;return e==="line"||e==="area"}};ht.registerFeatures({drilldown:oa});var la=1;function ar(u,t){let e=u!=null,s=t!=null;return!e&&!s?null:{min:e?u:null,max:s?t:null}}function Qr(u){return Array.isArray(u)?u.map(t=>Array.isArray(t)?t.slice():t):[]}function wh(u,t){return typeof u!="function"||!t?null:u===t.addXaxisAnnotation?"xaxis":u===t.addYaxisAnnotation?"yaxis":u===t.addPointAnnotation?"point":null}function vh(u){switch(u){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}function _h(u,t){let e=u.config.annotations?T.clone(u.config.annotations):null,s=[],i=u.globals.memory&&u.globals.memory.methodsToExec||[];for(let a of i){if(!a||a.label!=="addAnnotation")continue;let n=wh(a.method,t);n&&s.push({kind:n,params:T.clone(a.params)})}return{static:e,dynamic:s}}function Ah(u){let t=u&&u.measure;if(!t||typeof t.getPins!="function")return null;let e=t.getPins();return Array.isArray(e)&&e.length?{pins:e}:null}function to(u,t){var e,s;let i=u.config.xaxis||{},n=(Array.isArray(u.config.yaxis)?u.config.yaxis:u.config.yaxis?[u.config.yaxis]:[]).map(c=>ar(c&&c.min,c&&c.max)),r=n.some(c=>c!==null),o=u.config.theme,l=t&&t.drilldown;return{v:la,window:{xaxis:ar(i.min,i.max),yaxis:r?n:null},zoomed:!!u.interact.zoomed,collapsed:(u.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(u.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:Qr(u.interact.selectedDataPoints),theme:o?{mode:(e=o.mode)!=null?e:null,palette:(s=o.palette)!=null?s:null}:null,locale:u.config.chart&&u.config.chart.defaultLocale||null,annotations:_h(u,t),drill:l&&l.depth>0?{path:l.path.slice()}:null,measure:Ah(t)}}function Sh(u,t,e){let s=u.w;if(t==null&&e==null)return;let i=s.globals.seriesNames||[],a=new Set([...t||[],...e||[]]),n=new Set([...s.globals.collapsedSeriesIndices||[],...s.globals.ancillaryCollapsedSeriesIndices||[]]);for(let r=0;r<i.length;r++){let o=i[r];if(o==null)continue;let l=a.has(r),c=n.has(r);l&&!c?u.hideSeries(o):!l&&c&&u.showSeries(o)}}function Ch(u,t){Array.isArray(t)&&(u.w.interact.selectedDataPoints=Qr(t))}function kh(u,t,{animate:e=!0,mergeOptions:s}={}){var i,a;if(!u||!t)return;typeof t.v=="number"&&t.v>la&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v${la}); applying best-effort.`),u.clearAnnotations();let n=s?T.clone(s):{},r=t.window&&t.window.xaxis;n.xaxis=Object.assign({},n.xaxis,r?{min:(i=r.min)!=null?i:void 0,max:(a=r.max)!=null?a:void 0}:{min:void 0,max:void 0});let o=t.window&&t.window.yaxis;if(Array.isArray(o)&&(n.yaxis=o.map(l=>{var c,h;return l?{min:(c=l.min)!=null?c:void 0,max:(h=l.max)!=null?h:void 0}:{}})),t.theme){let l={};t.theme.mode!=null&&(l.mode=t.theme.mode),t.theme.palette!=null&&(l.palette=t.theme.palette),Object.keys(l).length&&(n.theme=Object.assign({},n.theme,l))}t.annotations&&t.annotations.static&&(n.annotations=T.clone(t.annotations.static)),u.updateOptions(n,!1,e,!1,!1),eo(u,t)}function eo(u,t){if(!u||!t)return;let e=u.w;e.interact.zoomed=!!t.zoomed,Sh(u,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(s=>{let i=vh(s.kind);i&&typeof u[i]=="function"&&u[i](s.params,!0)}),Ch(u,t.selectedDataPoints),t.locale&&t.locale!==e.config.chart.defaultLocale&&u.setLocale(t.locale),u.measure&&typeof u.measure.setPins=="function"&&u.measure.setPins(t.measure&&t.measure.pins||[])}var si=1,nr="apex";function Mh(u){if(typeof Buffer<"u")return Buffer.from(u,"utf-8").toString("base64");let t=new TextEncoder().encode(u),e="";for(let s=0;s<t.length;s++)e+=String.fromCharCode(t[s]);return btoa(e)}function Lh(u){if(typeof Buffer<"u")return Buffer.from(u,"base64").toString("utf-8");let t=atob(u),e=new Uint8Array(t.length);for(let s=0;s<t.length;s++)e[s]=t.charCodeAt(s);return new TextDecoder().decode(e)}function Dh(u){return Mh(u).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Eh(u){let t=u.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return Lh(t)}function Th(u){try{return JSON.parse(JSON.stringify(u))}catch{return}}var $e=class u{constructor(t,e){this.w=t,this.ctx=e,this._saved=[],this._counter=0,this._used=!1}capture(){let t=to(this.w,this.ctx),e={v:si,view:t},s=this._serializableDelta();return s&&Object.keys(s).length&&(e.options=s),e}_serializableDelta(){let t=this.w.config,e=t.chart&&t.chart.perspectives&&t.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],s={};return e.forEach(i=>{if(t[i]!==void 0){let a=Th(t[i]);a!==void 0&&(s[i]=a)}}),s}encode(t){let e=t||this.capture();return Dh(JSON.stringify(e))}decode(t){return u.decode(t)}toURL(){if(!H.isBrowser())return"";let t=this.encode(this.capture()),e=new URL(window.location.href);return e.hash=`${nr}=${t}`,e.toString()}apply(t,e={}){let s=typeof t=="string"?u.decode(t):t;if(!s||!s.view)return;this._used=!0,$t(this.w,this.ctx);let i=e.animate!==void 0?e.animate:!0,a=T.extend(s.options?T.clone(s.options):{},e.mergeOptions||{}),n=Object.keys(a).length?a:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(o=>{kh(o,s.view,{animate:i,mergeOptions:n})})}save(t){let e=`perspective-${++this._counter}`;return this._saved.push({id:e,name:t||e,token:this.capture()}),this._used=!0,$t(this.w,this.ctx),e}list(){return this._saved.map(t=>({id:t.id,name:t.name,token:t.token}))}delete(t){let e=this._saved.findIndex(s=>s.id===t);e>-1&&this._saved.splice(e,1)}teardown(){this._saved=[],this._counter=0}static decode(t){if(typeof t!="string"||!t)return null;try{let e=JSON.parse(Eh(t));return!e||typeof e!="object"?null:e.v!==si?(console.warn(`apexcharts: unsupported perspective version ${e.v} (expected ${si}).`),null):e}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(t){try{let e=t||(H.isBrowser()?window.location.href:"");if(!e)return null;let i=new URL(e).hash.replace(/^#/,"");if(!i)return null;let a=i.split("&").map(n=>n.split("=")).find(n=>n[0]===nr);return!a||a[1]==null?null:u.decode(decodeURIComponent(a[1]))}catch{return null}}};ht.registerFeatures({perspectives:$e});ht.perspectives={decode:u=>(jn(),$e.decode(u)),fromURL:u=>(jn(),$e.fromURL(u))};var ca=class{constructor(t,e){this.w=t,this.ctx=e,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(t={}){var e;if(this.unbind(),!H.isBrowser())return 0;let s=this.ctx.el&&this.ctx.el.ownerDocument;if(!s||typeof IntersectionObserver>"u")return 0;let i=null;if(t.scroller&&(i=typeof t.scroller=="string"?s.querySelector(t.scroller):t.scroller),this._beats=this._resolveBeats(s,i,t.beats),!this._beats.length)return 0;this._animate=t.animate!==!1;let a=Math.min(Math.max((e=t.offset)!=null?e:.5,0),1),n=+(a*100).toFixed(3),r=+(100-a*100).toFixed(3);return this._observer=new IntersectionObserver(o=>this._onIntersect(o),{root:i,rootMargin:`-${n}% 0px -${r}%`,threshold:0}),this._beats.forEach(o=>{var l;return(l=this._observer)==null?void 0:l.observe(o.el)}),this._used=!0,$t(this.w,this.ctx),this._beats.length}_resolveBeats(t,e,s){let i=[];return Array.isArray(s)?(s.forEach((n,r)=>{var o,l;if(!n)return;let c=n.el&&typeof n.el=="object"?n.el:n.selector?t.querySelector(n.selector):null;if(!c){console.warn(`apexcharts: storyboard beat ${r} has no resolvable element; skipped.`);return}i.push({el:c,key:(l=(o=n.key)!=null?o:c.getAttribute("data-apex-beat"))!=null?l:String(r),view:n.view,options:n.options,announce:n.announce,onEnter:typeof n.onEnter=="function"?n.onEnter:void 0})}),i):((e||t).querySelectorAll("[data-apex-beat]").forEach((n,r)=>{i.push({el:n,key:n.getAttribute("data-apex-beat")||String(r),view:n.getAttribute("data-apex-view")||void 0,options:void 0,announce:n.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),i)}_onIntersect(t){t.forEach(e=>{let s=this._beats.findIndex(i=>i.el===e.target);s<0||(e.isIntersecting?this._activate(s):s===this._activeIndex&&e.rootBounds&&e.boundingClientRect.top>=e.rootBounds.bottom&&s>0&&this._activate(s-1))})}_activate(t,e={}){var s,i;if(t===this._activeIndex)return;let a=this._beats[t];if(!a)return;let n=t>this._activeIndex?"down":"up";this._activeIndex=t;let r=(e.animate!==void 0?e.animate:this._animate)&&!ks();if(a.view!=null||a.options)if(this.ctx.perspectives){let l=(s=a.view)!=null?s:{},c=typeof l=="string"||l.view?l:{view:this._normalizeView(l)};this.ctx.perspectives.apply(c,{animate:r,mergeOptions:a.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0,console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import "apexcharts/features/storyboard" (which includes it) or drive beats via onEnter.'));let o={index:t,key:a.key,el:a.el,direction:n};a.onEnter&&a.onEnter(this.ctx,o),a.announce&&this._announce(a.announce),typeof this.w.config.chart.events.beatChange=="function"&&this.w.config.chart.events.beatChange(this.ctx,o),(i=this.ctx.events)==null||i.fireEvent("beatChange",[this.ctx,o])}_normalizeView(t){let e=t.annotations&&t.annotations.static||{};return j(G({},t),{annotations:{static:G({points:[],xaxis:[],yaxis:[],texts:[],images:[]},e),dynamic:t.annotations&&t.annotations.dynamic||[]}})}goTo(t,e={}){let s=typeof t=="number"?t:this._beats.findIndex(i=>i.key===t);s>=0&&s<this._beats.length&&this._activate(s,e)}current(){if(this._activeIndex<0)return null;let t=this._beats[this._activeIndex];return{index:this._activeIndex,key:t?t.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,$t(this.w,this.ctx)}teardown(){this.unbind()}_announce(t){let e=this.w;if(!e.config.chart.accessibility.announcements.enabled)return;let s=e.dom.baseEl;if(!s)return;let i=s.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=t},0))}};ht.registerFeatures({storyboard:ca});function Ph(u){if(!u)return!1;let t=u.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||u.isContentEditable===!0}var ha=class{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.pointer=-1,this.applying=!1,this._batching=!1,this._counter=0,this._coalesceTimer=null,this._settleTimer=null,this._pendingLabel=void 0,this._keydownTarget=null,this._pointerTarget=null,this._engaged=!1,this._wired=!1,this._readConfig(),this._onMounted=this._onMounted.bind(this),this._onUpdated=this._onUpdated.bind(this),this._onSelection=this._onSelection.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this.init()}_readConfig(){let t=this.w,e=t.config.chart&&t.config.chart.history||{};this.enabled=!!e.enabled,this.maxDepth=e.maxDepth>0?e.maxDepth:100,this.coalesceMs=e.coalesceMs!=null?e.coalesceMs:250,this.keyboard=e.keyboard!==!1}_syncConfig(){this._readConfig(),this.enabled&&this.keyboard?this._wireKeyboard():this._unwireKeyboard()}init(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onMounted),this.ctx.addEventListener("updated",this._onUpdated),this.ctx.addEventListener("scrolled",this._onUpdated),this.ctx.addEventListener("dataPointSelection",this._onSelection),this.enabled&&this.keyboard&&this._wireKeyboard())}_wireKeyboard(){if(this._keydownTarget)return;let t=this.ctx.el,e=t&&t.ownerDocument;!H.isBrowser()||!e||(e.addEventListener("keydown",this._onKeyDown),e.addEventListener("pointerdown",this._onPointerDown,!0),e.addEventListener("mousedown",this._onPointerDown,!0),this._keydownTarget=e,this._pointerTarget=e)}_unwireKeyboard(){this._keydownTarget&&(this._keydownTarget.removeEventListener("keydown",this._onKeyDown),this._keydownTarget=null),this._pointerTarget&&(this._pointerTarget.removeEventListener("pointerdown",this._onPointerDown,!0),this._pointerTarget.removeEventListener("mousedown",this._onPointerDown,!0),this._pointerTarget=null),this._engaged=!1}_onMounted(){this._syncConfig(),this.enabled&&this.stack.length===0&&this._commit("initial",!0)}_onUpdated(){if(this._syncConfig(),!!this.enabled){if(this.applying){this._refreshSettle();return}this._schedule("update")}}_onSelection(){!this.enabled||this.applying||this._schedule("selection")}_onPointerDown(t){let e=this.ctx.el;this._engaged=!!(e&&t.target&&e.contains(t.target))}_onKeyDown(t){if(!(t.metaKey||t.ctrlKey))return;let e=(t.key||"").toLowerCase();if(e!=="z"&&e!=="y")return;let s=this.ctx.el;if(!s)return;let i=s.ownerDocument,a=i&&i.activeElement;if(Ph(a)||!(s.contains(a)||this._engaged))return;let n=e==="y"||t.shiftKey;t.preventDefault(),n?this.redo():this.undo()}_schedule(t){this.applying||this._batching||!this.enabled||(this._pendingLabel=t,this.coalesceMs>0&&H.isBrowser()?(clearTimeout(this._coalesceTimer),this._coalesceTimer=setTimeout(()=>this._commit(this._pendingLabel),this.coalesceMs)):this._commit(t))}_commit(t,e){if(clearTimeout(this._coalesceTimer),this._coalesceTimer=null,!e&&(this.applying||this._batching))return;let s=this._capture(t),i=this.stack[this.pointer];if(!(i&&i.sig===s.sig)){for(this.pointer<this.stack.length-1&&this.stack.splice(this.pointer+1),this.stack.push(s),this.pointer=this.stack.length-1;this.stack.length>this.maxDepth;)this.stack.shift(),this.pointer--;this._emitChange()}}_capture(t){let e=to(this.w,this.ctx),{config:s,seriesSig:i}=this._cloneConfigCOW();return{id:`hist-${++this._counter}`,view:e,config:s,seriesSig:i,label:t||"change",at:H.isBrowser()?Date.now():0,origin:"local",sig:this._signature(e,s)}}_cloneConfigCOW(){let t=this.w,e=this.stack[this.pointer],s=null;try{s=JSON.stringify(t.config.series)}catch{s=null}let i;if(e&&s!==null&&e.seriesSig===s){let a=t.config,{series:n}=a,r=tl(a,["series"]);i=T.clone(r),i.series=e.config.series}else i=T.clone(t.config);return{config:i,seriesSig:s}}_signature(t,e){try{return JSON.stringify(t)+"|"+JSON.stringify(e)}catch{return`nosig-${this._counter}`}}_restore(t,e){if(!t)return;this.applying=!0;let s;try{this.ctx.clearAnnotations(),s=this.ctx.updateOptions(T.clone(t.config),!1,e,!1,!1)}catch(i){throw this.applying=!1,i}Promise.resolve(s).then(()=>{if(this.w.globals.isDestroyed){this.applying=!1;return}eo(this.ctx,t.view),this._refreshSettle(),this._emitChange()}).catch(()=>{this.applying=!1})}_refreshSettle(){if(!H.isBrowser()){this.applying=!1;return}clearTimeout(this._settleTimer),this._settleTimer=setTimeout(()=>{this.applying=!1},0)}snapshot(t){!this.enabled||this.applying||this._commit(t||"change")}undo(t=!0){this.canUndo()&&(this.pointer--,this._restore(this.stack[this.pointer],t))}redo(t=!0){this.canRedo()&&(this.pointer++,this._restore(this.stack[this.pointer],t))}canUndo(){return this.pointer>0}canRedo(){return this.pointer>-1&&this.pointer<this.stack.length-1}jump(t,e=!0){let s=this.stack.findIndex(i=>i.id===t);s===-1||s===this.pointer||(this.pointer=s,this._restore(this.stack[s],e))}clear(){clearTimeout(this._coalesceTimer),this._coalesceTimer=null;let t=this.stack[this.pointer];this.stack=t?[t]:[],this.pointer=this.stack.length-1,this._emitChange()}transaction(t,e={}){if(typeof t!="function")return Promise.resolve();let s=this._batching;return this._batching=!0,Promise.resolve().then(()=>t()).finally(()=>{this._batching=s,s||this._commit(e.label||"transaction",!0)})}entries(){return this.stack.map(t=>({id:t.id,label:t.label,at:t.at}))}state(){return{canUndo:this.canUndo(),canRedo:this.canRedo(),index:this.pointer,length:this.stack.length}}_emitChange(){this.ctx.events.fireEvent("historyChange",[this.ctx,this.state()])}teardown(){var t,e,s,i,a,n,r,o;clearTimeout(this._coalesceTimer),clearTimeout(this._settleTimer),this._coalesceTimer=null,this._settleTimer=null,this._unwireKeyboard(),this._wired&&((e=(t=this.ctx).removeEventListener)==null||e.call(t,"mounted",this._onMounted),(i=(s=this.ctx).removeEventListener)==null||i.call(s,"updated",this._onUpdated),(n=(a=this.ctx).removeEventListener)==null||n.call(a,"scrolled",this._onUpdated),(o=(r=this.ctx).removeEventListener)==null||o.call(r,"dataPointSelection",this._onSelection)),this.stack=[],this.pointer=-1,this._wired=!1}};ht.registerFeatures({history:ha});var da=1,Rh=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","highlightSeries","isSeriesHidden","zoomX","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","dataURI","exportToCSV"];function Fh(u){let t={};return Rh.forEach(e=>{typeof u[e]=="function"&&(t[e]=u[e].bind(u))}),Object.freeze(t)}function Ih(u,t){let e=i=>(i&&u.add(i),i),s={get node(){return u.node},path(i={}){let{d:a="",stroke:n="#000",width:r=1,fill:o="none",opacity:l=1,dash:c=0,className:h=""}=i;return e(t.drawPath({d:a,stroke:n,strokeWidth:r,fill:o,fillOpacity:o==="none"?0:l,strokeOpacity:l,strokeDashArray:c,classes:h}))},line(i={}){let{x1:a,y1:n,x2:r,y2:o,stroke:l="#000",width:c=1,dash:h=0}=i;return e(t.drawLine(a,n,r,o,l,h,c))},rect(i={}){let{x:a=0,y:n=0,w:r=0,h:o=0,r:l=0,fill:c="#000",stroke:h=null,opacity:d=1}=i;return e(t.drawRect(a,n,r,o,l,c,d,h!=null?1:null,h))},circle(i={}){let{cx:a=0,cy:n=0,r=0,fill:o="#000",stroke:l=null}=i;return e(t.drawCircle(r,{cx:a,cy:n,fill:o,stroke:l||"none"}))},text(i={}){let{x:a=0,y:n=0,text:r="",color:o,size:l,anchor:c="start",weight:h}=i;return e(t.drawText({x:a,y:n,text:r,textAnchor:c,fontSize:l,foreColor:o,fontWeight:h}))},clear(){let i=u.node;for(;i.firstChild;)i.removeChild(i.firstChild);return s}};return s}function Nh(u,t){let e=u.ctx,s=u.w,i={name:t.def.name,version:da,get options(){return t.options},on(a,n){let r=t.handlers;return r.has(a)||r.set(a,[]),r.get(a).push(n),i},off(a,n){let r=t.handlers.get(a);if(r){let o=r.indexOf(n);o>-1&&r.splice(o,1)}return i},store:{},layer(a){return u._layer(t.def.name,a||{})},get scales(){return u._currentScales},get data(){return u._lastData||(u._lastData=u._dataSnapshot())},theme:Object.freeze({get mode(){return s.config.theme.mode},get foreColor(){return s.config.chart.foreColor},seriesColor(a){return s.globals.colors[a]},token(a){return u._token(a)}}),chart:Fh(e),emit(a,n){e.events.fireEvent(`plugin:${t.def.name}:${a}`,[e,n])},get el(){return s.dom.baseEl}};return Object.freeze(i)}var ua=class{constructor(t,e){this.w=t,this.ctx=e,this.active=[],this._layers=new Map,this._currentScales=null,this._lastPluginsRef=null,this._lastData=null,this._updatedWired=!1,this._onUpdated=this._onUpdated.bind(this),this._init()}_init(){(this.w.config.plugins||[]).map((e,s)=>({entry:e,order:e.order!=null?e.order:s})).sort((e,s)=>e.order-s.order).forEach(e=>this._activate(e.entry)),this._lastPluginsRef=this.w.config.plugins,this._wireUpdated()}_wireUpdated(){this._updatedWired||(this.ctx.addEventListener("updated",this._onUpdated),this._updatedWired=!0)}_onUpdated(){this.dispatch("afterUpdate",{pass:"update"})}_activate(t){let e=Mc(t.name);if(!e){console.error(`[apexcharts] plugin "${t.name}" is not registered.`);return}let s=e.apiVersion!=null?e.apiVersion:1;if(Math.trunc(s)!==da){console.error(`[apexcharts] plugin "${e.name}" targets Weave API v${s}, host is v${da}; skipped.`);return}let i={def:e,options:Object.freeze(G({},t.options||{})),handlers:new Map,disabled:!1,failures:0,api:null};i.api=Nh(this,i),this.active.push(i),this._guard(i,"setup",()=>e.setup(i.api))}dispatch(t,e){if(t==="draw"&&(this._reconcile(),this._resetLayers()),this._lastData=null,!this.active.length)return;t==="afterParse"?this._currentScales=null:e&&"xyRatios"in e&&this._setScales(e.xyRatios);let s=e&&e.pass||"full",i=null;for(let a of this.active){if(a.disabled)continue;let n=a.handlers.get(t);if(!n||!n.length)continue;i===null&&(i=this._dataSnapshot(),this._lastData=i);let r={api:a.api,scales:this._currentScales,data:i,pass:s,hook:t};for(let o of n.slice())this._guard(a,t,()=>o(r))}}_guard(t,e,s){if(!t.disabled)try{s()}catch(i){console.error(`[apexcharts] plugin "${t.def.name}" threw in "${e}":`,i),t.failures=(t.failures||0)+1,t.failures>=3&&(t.disabled=!0,console.error(`[apexcharts] plugin "${t.def.name}" disabled after repeated errors.`))}}_setScales(t){let e=this.w,s=e.globals,i=e.layout;if(!t||!s.axisCharts){this._currentScales=null;return}let a=t.xRatio,n=t.yRatio||[],r=c=>n[c]!=null?n[c]:n[0],o=c=>s.maxYArr[c]!=null?s.maxYArr[c]:s.maxY,l=c=>s.minYArr[c]!=null?s.minYArr[c]:s.minY;this._currentScales={x:c=>i.translateX+(c-s.minX)/a,y:(c,h=0)=>i.translateY+(o(h)-c)/r(h),domainX:[s.minX,s.maxX],domainY:(c=0)=>[l(c),o(c)],gridWidth:i.gridWidth,gridHeight:i.gridHeight,ratios:t}}_dataSnapshot(){let t=this.w,e=t.globals,s=t.seriesData.series||[],i=t.seriesData.seriesX||[];return s.map((a,n)=>{let r=i[n]||[],o=(a||[]).map((l,c)=>({x:r[c]!=null?r[c]:c,y:l}));return{name:e.seriesNames?e.seriesNames[n]:void 0,hidden:(e.collapsedSeriesIndices||[]).includes(n),color:e.colors?e.colors[n]:void 0,points:o}})}_token(t){let e=this.w,s=e.globals;switch(t){case"foreColor":return e.config.chart.foreColor;case"background":return e.config.chart.background;case"accent":case"primary":return s.colors?s.colors[0]:void 0;default:return/^series-\d+$/.test(t)&&s.colors?s.colors[Number(t.split("-")[1])]:void 0}}_layer(t,{z:e="front",className:s=""}={}){let i=this._layers.get(t);if(!i){i=this.ctx.graphics.group({class:`apexcharts-plugin-${t} ${s}`.trim()});let a=this.w.dom.elGraphical.node;e==="behind"?a.insertBefore(i.node,a.firstChild):a.appendChild(i.node),i.node.setAttribute("aria-hidden","true"),this._layers.set(t,i)}return Ih(i,this.ctx.graphics)}_resetLayers(){let t=this.w.dom.elGraphical,e=t&&t.node;if(e){let s=e.querySelectorAll('g[class*="apexcharts-plugin-"]');Array.prototype.forEach.call(s,i=>i.remove())}this._layers.clear()}_reconcile(){let t=this.w.config.plugins||[];if(t===this._lastPluginsRef)return;this._lastPluginsRef=t;let e=new Map(t.map((a,n)=>[a.name,{entry:a,order:a.order!=null?a.order:n}]));for(let a=this.active.length-1;a>=0;a--){let n=this.active[a],r=e.get(n.def.name);r?n.options=Object.freeze(G({},r.entry.options||{})):(this._guard(n,"destroy",()=>n.def.destroy&&n.def.destroy(n.api)),this.active.splice(a,1))}let s=new Set(this.active.map(a=>a.def.name)),i=[];e.forEach((a,n)=>{s.has(n)||i.push(a)}),i.sort((a,n)=>a.order-n.order).forEach(a=>this._activate(a.entry))}teardown(t){if(!t){this.dispatch("destroy");for(let e of this.active)this._guard(e,"destroy",()=>e.def.destroy&&e.def.destroy(e.api));this.active=[],this._updatedWired&&(this.ctx.removeEventListener&&this.ctx.removeEventListener("updated",this._onUpdated),this._updatedWired=!1)}this._layers.clear()}};ht.registerFeatures({weave:ua});var Xh={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},rt=Symbol("never"),Oh={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},rr=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"],yt={attr(){return yt},plot(){return yt},during(){return yt},after(u){return typeof u=="function"&&u(),yt},animate(){return yt},delay(){return yt},loop(){return yt},finish(){return yt},stop(){return yt}},so={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},At={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr(){return At},add(){return At},addTo(){return At},remove(){return At},clear(){return At},css(){return At},hide(){return At},show(){return At},removeClass(){return At},animate(){return yt}},fa=class{constructor(t,e){this.__isCanvasMark=!0,this._g=t,this._i=e}get node(){return so}attr(t,e){return typeof t=="string"?(t==="fill"&&e!==void 0&&this._g._setMarkerFill(this._i,e),e===void 0?null:this):(t&&t.fill!==void 0&&this._g._setMarkerFill(this._i,t.fill),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return t!==void 0&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return yt}},ue={__isCanvasMark:!0,node:so,attr(){return ue},add(){return ue},addTo(){return ue},remove(){return ue},css(){return ue},animate(){return yt}},Ot=class{constructor(t){this.__isCanvasMark=!0,this._cmd=t;let e=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(s,i){e._applyAttr(s,i)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})}}_applyAttr(t,e){let s=this._cmd;if(!s)return;let i=Xh[t];i!==void 0&&(s[i]=e)}attr(t,e){if(typeof t=="string")return e===void 0?null:(this._applyAttr(t,e),this);for(let s in t)t[s]!==void 0&&this._applyAttr(s,t[s]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return typeof t=="object"?this.attr(t):this.attr("fill",t)}stroke(t){return typeof t=="object"?(t.color!==void 0&&this.attr("stroke",t.color),t.width!==void 0&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return typeof t=="string"&&this._cmd&&this._cmd.tag==="path"&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){return{x:0,y:0,width:0,height:0}}animate(){return yt}},ga=class{constructor(t){this.w=t,this._g=new B(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=rt,this._ls=rt,this._lsw=rt,this._ld=rt,this._lfo=rt,this._lso=rt,this._lid=-1,this._lofFill=rt,this._lofBase=-1,this._lofId=-1,this._rlf=rt,this._rls=rt,this._rlsw=rt,this._rlfo=rt,this._rlso=rt,this._rlid=-1}_resetStyleCache(){this._lf=rt,this._ls=rt,this._lsw=rt,this._ld=rt,this._lfo=rt,this._lso=rt,this._lid=-1,this._lofFill=rt,this._lofBase=-1,this._lofId=-1,this._rlf=rt,this._rls=rt,this._rlsw=rt,this._rlfo=rt,this._rlso=rt,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();let t=this.w.config.series||[],e=16;for(let s=0;s<t.length;s++){let i=t[s]&&t[s].data;Array.isArray(i)&&(e+=i.length)}e=Math.ceil(e*1.15)+16,e>this._mcap&&this._allocMarkers(e),this._crn=0,this._cellRadius=0,e>this._crcap&&this._allocRects(e)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){let t=this._crcap*2,e=new Float64Array(t);e.set(this._crx),this._crx=e;let s=new Float64Array(t);s.set(this._cry),this._cry=s;let i=new Float64Array(t);i.set(this._crw),this._crw=i;let a=new Float64Array(t);a.set(this._crh),this._crh=a;let n=new Int32Array(t);n.set(this._crstyle),this._crstyle=n;let r=new Int32Array(t);r.set(this._crsi),this._crsi=r;let o=new Int32Array(t);o.set(this._crdi),this._crdi=o,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t)}_growMarkers(){let t=this._mcap*2,e=new Float64Array(t);e.set(this._mx),this._mx=e;let s=new Float64Array(t);s.set(this._my),this._my=s;let i=new Float64Array(t);i.set(this._msize),this._msize=i;let a=new Int16Array(t);a.set(this._mshape),this._mshape=a;let n=new Int32Array(t);n.set(this._mstyle),this._mstyle=n;let r=new Int32Array(t);r.set(this._msi),this._msi=r,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,e,s,i,a,n){let r=`${t}|${e}|${s}|${i}|${a}|${n}`,o=this._styleMap.get(r);if(o!==void 0)return o;let l=this._styles.length;return this._styles.push({fill:t,stroke:e,strokeWidth:s,strokeDash:i,fillOpacity:a,strokeOpacity:n}),this._styleMap.set(r,l),l}_setMarkerFill(t,e){let s=this._mstyle[t];if(e===this._lofFill&&s===this._lofBase){this._mstyle[t]=this._lofId;return}let i=this._styles[s];if(!i||i.fill===e){this._lofFill=e,this._lofBase=s,this._lofId=s;return}let a=this._internStyle(e,i.stroke,i.strokeWidth,i.strokeDash,i.fillOpacity,i.strokeOpacity);this._mstyle[t]=a,this._lofFill=e,this._lofBase=s,this._lofId=a}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}shapeName(t){return rr[t]||"circle"}drawRectCell(t,e,s,i,a={}){let n=this._rectStyleId(a);this._crn>=this._crcap&&this._growRects();let r=this._crn++;return this._crx[r]=t||0,this._cry[r]=e||0,this._crw[r]=s>0?s:0,this._crh[r]=i>0?i:0,this._crstyle[r]=n,this._crsi[r]=a.seriesIndex==null?-1:a.seriesIndex,this._crdi[r]=a.dataPointIndex==null?-1:a.dataPointIndex,a.radius&&(this._cellRadius=a.radius),ue}_rectStyleId(t){let e=t.fill,s=t.stroke,i=t.strokeWidth,a=t.fillOpacity,n=t.strokeOpacity;if(e===this._rlf&&s===this._rls&&i===this._rlsw&&a===this._rlfo&&n===this._rlso)return this._rlid;let r=this._internStyle(e,s,i,0,a,n);return this._rlf=e,this._rls=s,this._rlsw=i,this._rlfo=a,this._rlso=n,this._rlid=r,r}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,e){let s={tag:t,z:e||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0};return this._list.push(s),s}group(t){return At}drawMarker(t,e,s={}){var i;let a=this._markerStyleId(s);this._mn>=this._mcap&&this._growMarkers();let n=this._mn++;return this._mx[n]=t||0,this._my[n]=typeof e=="number"?e:NaN,this._msize[n]=s.pSize||0,this._mshape[n]=(i=Oh[s.shape||"circle"])!=null?i:0,this._mstyle[n]=a,this._msi[n]=s.seriesIndex==null?-1:s.seriesIndex,new fa(this,n)}_markerStyleId(t){let e=t.shape||"circle",s=e==="line"||e==="plus"||e==="cross",i=s?"none":t.pointFillColor,a=s?t.pointFillColor:t.pointStrokeColor,n=t.pointStrokeWidth,r=t.pointStrokeDashArray,o=t.pointFillOpacity,l=s?t.pointFillOpacity:t.pointStrokeOpacity;if(i===this._lf&&a===this._ls&&n===this._lsw&&r===this._ld&&o===this._lfo&&l===this._lso)return this._lid;let c=this._internStyle(i,a,n,r,o,l);return this._lf=i,this._ls=a,this._lsw=n,this._ld=r,this._lfo=o,this._lso=l,this._lid=c,c}renderPaths(t){let e=this._cmd("path",t.realIndex);return e.d=t.pathTo,t.pathToNumeric&&(e.nxs=t.pathToNumeric.xs,e.nys=t.pathToNumeric.ys,e.ncloseY=t.pathToNumeric.closeY),e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.lineCap=t.strokeLinecap,e.si=t.realIndex,this.w.globals.animationEnded=!0,new Ot(e)}drawPath(t){let e=this._cmd("path",0);return e.d=t.d,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineCap=t.strokeLinecap,e.strokeDash=t.strokeDashArray,new Ot(e)}drawLine(t,e,s,i,a="#a8a8a8",n=0,r=1){let o=this._cmd("line",0);return o.lx1=t,o.ly1=e,o.lx2=s,o.ly2=i,o.stroke=a,o.strokeDash=n,o.strokeWidth=r,new Ot(o)}drawRect(t=0,e=0,s=0,i=0,a=0,n="#fefefe",r=1,o=null,l=null,c=0){let h=this._cmd("rect",0);return h.x1=t,h.y1=e,h.rw=s>0?s:0,h.rh=i>0?i:0,h.radius=a,h.fill=n,h.fillOpacity=r,l!=null&&(h.stroke=l,h.strokeWidth=o??1,h.strokeDash=c),new Ot(h)}drawCircle(t,e=null){let s=this._cmd("circle",0);return s.r=t<0?0:t,e&&(s.cx=e.cx,s.cy=e.cy,e.fill!==void 0&&(s.fill=e.fill),e.stroke!==void 0&&(s.stroke=e.stroke)),new Ot(s)}drawText(t){let e=this._cmd("text",0);return e.text=Array.isArray(t.text)?t.text.join(" "):t.text,e.tx=t.x,e.ty=t.y,e.textAnchor=t.textAnchor||"start",e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.foreColor,new Ot(e)}markerPath(t,e,s,i){return this._g.getMarkerPath(t,e,rr[s]||"circle",i)}},or=Math.PI*2,lr=2,pa=class{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._margin=0,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){let e=this._dim;return!e||e.active==null||e.active<0||t==null||t<0||t===e.active?1:e.opacity==null?.2:e.opacity}_plotDims(){var t;let e=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),s=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),i=((t=this.w.globals.markers)==null?void 0:t.largestSize)||0,a=Math.ceil(i+8);return{gw:e,gh:s,margin:a}}createHost(){let t=O.getWindow();this._dpr=Math.min(lr,t&&t.devicePixelRatio||1);let{gw:e,gh:s,margin:i}=this._plotDims();this._margin=i;let a=e+i*2,n=s+i*2,r=O.createElementNS(et,"foreignObject");r.setAttribute("x",String(-i)),r.setAttribute("y",String(-i)),r.setAttribute("width",String(a)),r.setAttribute("height",String(n)),r.setAttribute("class","apexcharts-canvas-series"),r.style.overflow="visible";let o=O.createElement("canvas");return o.setAttribute("class","apexcharts-series-canvas"),o.width=Math.max(1,Math.round(a*this._dpr)),o.height=Math.max(1,Math.round(n*this._dpr)),o.style.width=a+"px",o.style.height=n+"px",o.style.pointerEvents="none",r.appendChild(o),this._canvas=o,this._c2d=o.getContext("2d"),this._host=new ft(r),this._host}getHost(){return this._host}clear(){!this._c2d||!this._canvas||(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;let t=O.getWindow(),e=Math.min(lr,t&&t.devicePixelRatio||1);if(e===this._dpr)return;this._dpr=e;let s=parseFloat(this._canvas.style.width)||0,i=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(s*e)),this._canvas.height=Math.max(1,Math.round(i*e))}paint(t,e,s=null){let i=this._c2d;if(!i)return;this._dim=s||null,this._syncDpr(),this.clear();let a=this._dpr,n=this._margin;if(i.setTransform(a,0,0,a,n*a,n*a),t.length){let r=t.length>1?t.map((o,l)=>[o,l]).sort((o,l)=>o[0].z===l[0].z?o[1]-l[1]:o[0].z-l[0].z).map(o=>o[0]):t;for(let o=0;o<r.length;o++){let l=r[o];this._alpha=this._dim?this._seriesAlpha(l.si):1,this._paintOne(i,l)}}this._paintRects(i,e),this._paintMarkers(i,e),this._alpha=1}_paintRects(t,e){let s=e.rectCount?e.rectCount():0;if(!s)return;let i=e._crx,a=e._cry,n=e._crw,r=e._crh,o=e._crstyle,l=e._cellRadius||0,c=t,h=l>0&&typeof c.roundRect=="function",d=!!this._dim,f=Math.max(0,this.w.layout.gridWidth||0),g=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,f,g),t.clip();let p=0;for(;p<s;){let m=o[p],b=e.rectStyle(p);if(!b){p++;continue}let x=b.fill,_=x&&x!=="none"&&!(typeof x=="string"&&x.indexOf("url(")===0),w=b.stroke,y=b.strokeWidth==null?0:Number(b.strokeWidth),v=w&&w!=="none"&&y>0&&!(typeof w=="string"&&w.indexOf("url(")===0);_&&(t.fillStyle=x),v&&(t.strokeStyle=w,t.lineWidth=y,t.setLineDash([]));let A=b.fillOpacity==null?1:Number(b.fillOpacity),S=b.strokeOpacity==null?1:Number(b.strokeOpacity),C=p;for(;C<s&&o[C]===m;){let M=n[C],k=r[C];if(M>0&&k>0){let L=d?this._seriesAlpha(e.rectSeries(C)):1;h?(t.beginPath(),c.roundRect(i[C],a[C],M,k,l),_&&(t.globalAlpha=A*L,t.fill()),v&&(t.globalAlpha=S*L,t.stroke())):(_&&(t.globalAlpha=A*L,t.fillRect(i[C],a[C],M,k)),v&&(t.globalAlpha=S*L,t.strokeRect(i[C],a[C],M,k)))}C++}p=C}t.globalAlpha=1,t.restore()}_unitPath(t,e,s){let i=e+"|"+s,a=this._unitPaths.get(i);if(a===void 0){try{a=new Path2D(t.markerPath(0,0,e,s))}catch{a=null}this._unitPaths.set(i,a)}return a}_paintMarkers(t,e){this._markerBatches=0;let s=e.markerCount();if(!s)return;let i=e._mx,a=e._my,n=e._msize,r=e._mshape,o=e._mstyle,l=!!this._dim;l||(this._alpha=1);let c=0;for(;c<s;){let h=o[c],d=r[c],f=e.markerStyle(c);if(!f){c++;continue}let g=this._applyFill(t,f),p=this._applyStroke(t,f);this._markerBatches++;let m=f.fillOpacity==null?1:Number(f.fillOpacity),b=f.strokeOpacity==null?1:Number(f.strokeOpacity);if(d===0){let x=c;for(;x<s&&r[x]===0&&o[x]===h;){let _=n[x]||0,w=a[x];if(_>0&&w===w)if(t.beginPath(),t.arc(i[x],w,_,0,or),l){let y=this._seriesAlpha(e.markerSeries(x));g&&(t.globalAlpha=m*y,t.fill()),p&&(t.globalAlpha=b*y,t.stroke())}else g&&t.fill(),p&&t.stroke();x++}t.globalAlpha=1,c=x}else{let x=this._dpr,_=this._margin,w=c;for(;w<s&&r[w]===d&&o[w]===h;){let y=a[w],v=n[w];if(y===y&&v>0){let A=this._unitPath(e,d,v);if(A){t.setTransform(x,0,0,x,(_+i[w])*x,(_+y)*x);let S=l?this._seriesAlpha(e.markerSeries(w)):1;g&&(t.globalAlpha=m*S,t.fill(A)),p&&(t.globalAlpha=b*S,t.stroke(A))}}w++}t.setTransform(x,0,0,x,_*x,_*x),t.globalAlpha=1,c=w}}}_paintNumericPath(t,e){let s=e.nxs,i=e.nys,a=s.length;if(a){t.beginPath(),t.moveTo(s[0],i[0]);for(let n=1;n<a;n++)t.lineTo(s[n],i[n]);e.ncloseY!=null&&(t.lineTo(s[a-1],e.ncloseY),t.lineTo(s[0],e.ncloseY),t.closePath()),this._applyFill(t,e)&&t.fill(e.fillRule==="evenodd"?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,e){switch(e.tag){case"path":{if(e.nxs){this._paintNumericPath(t,e);break}if(!e.d)return;if(!e.path2d)try{e.path2d=new Path2D(e.d)}catch{return}this._fillStrokePath(t,e,e.path2d);break}case"rect":{let s=new Path2D;e.radius&&typeof s.roundRect=="function"?s.roundRect(e.x1,e.y1,e.rw,e.rh,e.radius):s.rect(e.x1,e.y1,e.rw,e.rh),this._fillStrokePath(t,e,s);break}case"circle":{if(!(e.r>0))return;t.beginPath(),t.arc(e.cx,e.cy,e.r,0,or),this._fillStroke(t,e);break}case"line":{t.beginPath(),t.moveTo(e.lx1,e.ly1),t.lineTo(e.lx2,e.ly2),this._strokeOnly(t,e);break}case"text":{if(e.text==null)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=e.fill||"#000";let s=e.fontSize||"11px";t.font=`${typeof s=="number"?s+"px":s} ${e.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign=e.textAnchor==="middle"?"center":e.textAnchor==="end"?"right":"left",t.fillText(String(e.text),e.tx,e.ty),t.restore();break}}}_fillStrokePath(t,e,s){this._applyFill(t,e)&&t.fill(s,e.fillRule==="evenodd"?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(s),t.globalAlpha=1}_fillStroke(t,e){this._applyFill(t,e)&&t.fill(),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,e){this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_applyFill(t,e){let s=e.fill;return!s||s==="none"||typeof s=="string"&&s.indexOf("url(")===0?!1:(t.globalAlpha=(e.fillOpacity==null?1:Number(e.fillOpacity))*this._alpha,t.fillStyle=s,!0)}_applyStroke(t,e){let s=e.stroke,i=e.strokeWidth==null?1:Number(e.strokeWidth);if(!s||s==="none"||!(i>0)||typeof s=="string"&&s.indexOf("url(")===0)return!1;t.globalAlpha=(e.strokeOpacity==null?1:Number(e.strokeOpacity))*this._alpha,t.strokeStyle=s,t.lineWidth=i,t.lineCap=e.lineCap||"butt";let a=e.strokeDash;return a&&a!==0?t.setLineDash(Array.isArray(a)?a:[Number(a)]):t.setLineDash([]),!0}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._unitPaths.clear()}},ma=class{constructor(t,e){this.w=t,this.ctx=e,this.kind="canvas",this._g=new ga(t),this._compositor=new pa(t)}beginSeries(){this._g.reset()}present(){let t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){let t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,e,s,i,a){return this._g.drawRectCell(t,e,s,i,a)}drawCircle(t,e){return this._g.drawCircle(t,e)}drawMarker(t,e,s){return this._g.drawMarker(t,e,s)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return t==="solidFill"||t==="dashArray"}hitTest(t,e){let s=this._g,i=s.rectCount?s.rectCount():0;if(!i)return null;let a=s._crx,n=s._cry,r=s._crw,o=s._crh;for(let l=i-1;l>=0;l--){let c=r[l],h=o[l];if(!(c<=0||h<=0)&&t>=a[l]&&t<a[l]+c&&e>=n[l]&&e<n[l]+h)return{seriesIndex:s._crsi[l],dataPointIndex:s._crdi[l],x:a[l],y:n[l],width:c,height:h}}return null}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){let t=this._compositor.toDataURL();if(!t)return null;let e=this.w.globals,s=this.w.config.chart,i=this._compositor._margin;return{dataURL:t,x:(e.translateX||0)+(s.offsetX||0)-i,y:(e.translateY||0)+(s.offsetY||0)-i,w:(this.w.layout.gridWidth||0)+i*2,h:(this.w.layout.gridHeight||0)+i*2}}destroy(){this._compositor.destroy()}};ht.registerRenderer("canvas",(u,t)=>new ma(u,t));function Bh(u,t){let e=class{constructor(i,a,n){this.w=i,this.ctx=a,this.xyRatios=n,this._warned=!1}draw(i,a,n){var r,o;let l=this.w,c=new B(l,this.ctx),h=ae(this.ctx,c),d=c.group({class:"apexcharts-marks-series"});return i.forEach((f,g)=>{var p;let m=Array.isArray(n)?n[g]:g,b=c.group({class:"apexcharts-series",rel:m+1,seriesName:T.escapeString(l.seriesData.seriesNames[m]),"data:realIndex":m}),x=this._scales(m,(l.seriesData.series[m]||[]).length),_=l.globals.colors[m],w=((p=l.config.series[m])==null?void 0:p.data)||[],y=l.seriesData.seriesX[m]||[],v=l.seriesData.series[m]||[];l.globals.seriesXvalues[m]=[],l.globals.seriesYvalues[m]=[],typeof l.globals.pointsArray[m]>"u"&&(l.globals.pointsArray[m]=[]);for(let A=0;A<v.length;A++){let S=v[A];if(S===null||typeof S>"u")continue;let C=y[A],M=x.xAt(A,C),k=x.y(S),L=this._api(h,b,m,A);try{t.renderItem({datum:w[A],x:M,y:k,scales:x,api:L,seriesIndex:m,dataPointIndex:A,color:_})}catch(E){this._warned||(console.warn(`[apexcharts] renderItem for series type "${u}" threw; skipping datum:`,E),this._warned=!0)}l.globals.seriesXvalues[m][A]=M,l.globals.seriesYvalues[m][A]=k,l.globals.pointsArray[m][A]=[M,k]}c.setupEventDelegation(b,".apexcharts-marks-mark"),d.add(b)}),(o=(r=this.ctx.animations)==null?void 0:r.animationCompleted)==null||o.call(r,d),d}_scales(i,a){var n,r,o,l;let c=this.w.globals,h=this.w.config,d=this.xyRatios.xRatio,f=this.xyRatios.yRatio,g=(r=(n=c.seriesYAxisReverseMap)==null?void 0:n[i])!=null?r:0,p=Array.isArray(f)?(o=f[g])!=null?o:f[0]:f,m=c.maxYArr,b=Array.isArray(m)&&m.length&&(l=m[g])!=null?l:c.maxY,x=c.gridWidth,_=c.gridHeight,w=!c.isXNumeric,y=a||c.dataPoints||1,v=y>0?x/y:x,A=h.xaxis.tickPlacement==="on",S=E=>d?(E-c.minX)/d:x/2,C=E=>(b-E)/p,M=(E,D)=>w?A&&y>1?E/(y-1)*x:(E+.5)*v:S(D),k=c.minXDiff||1,L=w?v:d?k/d:x;return{x:S,xAt:M,y:C,gridWidth:x,gridHeight:_,band:L}}_api(i,a,n,r){let o=l=>{if(l){try{l.node.setAttribute("index",String(n)),l.node.setAttribute("j",String(r)),l.node.classList.add("apexcharts-marks-mark")}catch{}a.add(l)}return l};return{path:(l={})=>{var c,h,d,f,g,p,m,b,x;return o(i.drawPath({d:l.d||"",stroke:(c=l.stroke)!=null?c:"#000",strokeWidth:(d=(h=l.width)!=null?h:l.strokeWidth)!=null?d:1,fill:(f=l.fill)!=null?f:"none",fillOpacity:(p=l.fillOpacity)!=null?p:l.fill&&l.fill!=="none"?(g=l.opacity)!=null?g:1:0,strokeOpacity:(b=(m=l.strokeOpacity)!=null?m:l.opacity)!=null?b:1,strokeDashArray:(x=l.dash)!=null?x:0,strokeLinecap:l.lineCap}))},line:(l={})=>{var c,h,d,f;return o(i.drawLine(l.x1,l.y1,l.x2,l.y2,(c=l.stroke)!=null?c:"#000",(h=l.dash)!=null?h:0,(f=(d=l.width)!=null?d:l.strokeWidth)!=null?f:1))},rect:(l={})=>{var c,h,d,f,g,p,m,b;return o(i.drawRect((c=l.x)!=null?c:0,(h=l.y)!=null?h:0,(d=l.w)!=null?d:0,(f=l.h)!=null?f:0,(g=l.r)!=null?g:0,(p=l.fill)!=null?p:"#000",(m=l.opacity)!=null?m:1,l.stroke!=null?(b=l.strokeWidth)!=null?b:1:null,l.stroke))},circle:(l={})=>{var c,h,d,f,g;return o(i.drawCircle((c=l.r)!=null?c:0,{cx:(h=l.cx)!=null?h:0,cy:(d=l.cy)!=null?d:0,fill:(f=l.fill)!=null?f:"#000",stroke:l.stroke||"none","stroke-width":(g=l.strokeWidth)!=null?g:l.stroke?1:0}))},text:(l={})=>{var c,h,d,f;return o(i.drawText({x:(c=l.x)!=null?c:0,y:(h=l.y)!=null?h:0,text:(d=l.text)!=null?d:"",textAnchor:(f=l.anchor)!=null?f:"start",fontSize:l.size,foreColor:l.color,fontWeight:l.weight}))}}}};return e.dataType=t.dataType||"xy",e.yExtent=typeof t.yExtent=="function"?t.yExtent:null,e}ht._customSeriesFactory=Bh;var Yh="(prefers-color-scheme: dark)",zh="(prefers-contrast: more)",xa=class u{constructor(t,e){if(this.w=t,this.ctx=e,t.config.theme.follow!=="os"||!H.isBrowser())return;let s=this._ensureMedia();s&&(this._applyToConfig(s),this._ensureListeners(s))}_ensureMedia(){if(!this.ctx._osThemeMedia){let t=O.matchMedia(Yh),e=O.matchMedia(zh);if(!t&&!e)return null;this.ctx._osThemeMedia={dark:t,contrast:e,handler:null}}return this.ctx._osThemeMedia}_applyToConfig(t){let e=this.w.config.theme;t.dark&&(e.mode=t.dark.matches?"dark":"light"),t.contrast&&t.contrast.matches&&(e.accessibility=e.accessibility||{},e.accessibility.colorBlindMode="highContrast")}_ensureListeners(t){if(t.handler)return;let e=this.ctx,s=()=>{let i=e._osThemeMedia;if(!i)return;let a={mode:i.dark&&i.dark.matches?"dark":"light"};i.contrast&&i.contrast.matches?a.accessibility={colorBlindMode:"highContrast"}:a.accessibility={colorBlindMode:""},e.updateOptions({theme:a},!1,!0,!1)};u._add(t.dark,s),u._add(t.contrast,s),t.handler=s}teardown(){let t=this.ctx._osThemeMedia;t&&(t.handler&&(u._remove(t.dark,t.handler),u._remove(t.contrast,t.handler)),this.ctx._osThemeMedia=null)}static _add(t,e){t&&(typeof t.addEventListener=="function"?t.addEventListener("change",e):typeof t.addListener=="function"&&t.addListener(e))}static _remove(t,e){t&&(typeof t.removeEventListener=="function"?t.removeEventListener("change",e):typeof t.removeListener=="function"&&t.removeListener(e))}};ht.registerFeatures({osThemeWatcher:xa});var Wh=[".apexcharts-bar-area",".apexcharts-candlestick-area",".apexcharts-boxPlot-area",".apexcharts-rangebar-area",".apexcharts-marker"].join(", "),Hh=[".apexcharts-pie-area",".apexcharts-bar-area"].join(", "),as="apexcharts-crossfilter-dimmed",$h=["pie","donut","polarArea","radialBar"],ba=class{constructor(t,e){this.w=t,this.ctx=e,this._dimmed=!1,this._wired=!1,this._pending=!1,this._lastValues=null,this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onChange=this._onChange.bind(this),this._mode()==="filter"&&this._initEngine()}_mode(){let t=this.w.config.chart.link;return t&&typeof t.dimension=="function"?"filter":t&&t.enabled?"highlight":"off"}_enabled(){let t=this.w.config.chart.link;return!!(t&&t.enabled)}onSourceSelection(t){var e;let s=this._mode();if(s==="off"||!t||t.min==null||t.max==null)return;let i=Math.min(t.min,t.max),a=Math.max(t.min,t.max),n=this.w.globals.minX,r=this.w.globals.maxX;if(isFinite(n)&&isFinite(r)&&r>n){let l=(r-n)*1e-6;i-n<=l&&(i=n),r-a<=l&&(a=r)}if(s==="filter"){let l=this._cf();if(!l)return;l.filter(this._chartId(),[i,a]),this._fireFilterChange(l,[i,a]);return}this._group().forEach(l=>{var c;(c=l?.linkedViews)==null||c.applyDim(i,a)});let o={xaxis:{min:i,max:a},sourceChartID:this.w.globals.chartID};typeof this.w.config.chart.events.crossFilter=="function"&&this.w.config.chart.events.crossFilter(this.ctx,o),(e=this.ctx.events)==null||e.fireEvent("crossFilter",[this.ctx,o])}_group(){let t=typeof this.ctx.getGroupedCharts=="function"?this.ctx.getGroupedCharts():[];return[this.ctx,...t]}applyDim(t,e){if(!this._enabled())return;let s=this.w,i=s.dom.baseEl;if(!i)return;let a=s.config.chart.link.dimOpacity;s.dom.elWrap&&typeof a=="number"&&s.dom.elWrap.style.setProperty("--apx-cf-dim",String(a));let n=s.globals.seriesX||[];i.querySelectorAll(Wh).forEach(o=>{let l=o.getAttribute("j");if(l===null)return;let c=parseInt(l,10),h=o.getAttribute("index"),d=h===null?0:parseInt(h,10),f=n[d]||n[0];if(!f)return;let g=f[c];g!=null&&o.classList.toggle(as,g<t||g>e)}),this._dimmed=!0}clear(){let t=this.w.dom.baseEl;t&&(t.querySelectorAll("."+as).forEach(e=>e.classList.remove(as)),this._dimmed=!1)}clearGroup(){if(this._mode()==="filter"){let t=this._cf();t&&t.reset();return}this._group().forEach(t=>{var e;return(e=t?.linkedViews)==null?void 0:e.clear()})}_chartId(){return this.w.globals.chartID}_cf(){let t=this.w.config.chart.link,e=t&&(t.id||this.w.config.chart.group);return e?We.get(e):null}_isPie(){return $h.indexOf(this.w.config.chart.type)!==-1}_isHeatmap(){return this.w.config.chart.type==="heatmap"}_initEngine(){let t=this._cf(),e=this.w.config.chart.link;if(!t){let i=e&&e.id||this.w.config.chart.group;console.warn(`[apexcharts] chart.link.dimension is set but no crossfilter coordinator "${i}" exists. Call ApexCharts.crossfilter({ id, records }) before creating the chart.`);return}let s=this._chartId();t.hasDimension(s)||t.registerDimension(s,{dimension:e.dimension,reduce:e.reduce,type:e.type||(this._isHeatmap()?"matrix":void 0),bins:e.bins,order:e.order}),this._injectSeries(t.aggregateFor(s)),this._wire(t)}_seriesFromAgg(t){if(t.type==="matrix")return t.yLabels.map((s,i)=>({name:String(s),data:t.xLabels.map((a,n)=>({x:String(a),y:t.matrix[i][n]}))}));if(this._isPie())return t.values.slice();let e=this.w.config.chart.link.seriesName||"Count";return t.type==="range"?[{name:e,data:t.labels.map((s,i)=>[s,t.values[i]])}]:[{name:e,data:t.values.slice()}]}_sigOf(t){return JSON.stringify(t.matrix||t.values)}_injectSeries(t){let e=this.w;this._lastValues=this._sigOf(t),e.config.series=this._seriesFromAgg(t),t.type!=="matrix"&&(this._isPie()?e.config.labels=t.labels.map(String):t.type==="category"?(e.config.xaxis||(e.config.xaxis={}),e.config.xaxis.categories=t.labels.map(String)):t.type==="range"&&this._pinRangeDomain(t.edges))}_pinRangeDomain(t){if(!Array.isArray(t)||t.length<2)return;let e=this.w;e.config.xaxis||(e.config.xaxis={}),e.config.xaxis.min==null&&(e.config.xaxis.min=t[0]),e.config.xaxis.max==null&&(e.config.xaxis.max=t[t.length-1])}_wire(t){this._wired||(this._wired=!0,this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender),t.on("change",this._onChange))}_onPointSelect(t,e,s){if(this._mode()!=="filter"||!s||s.dataPointIndex==null)return;let i=this._cf();if(!i)return;let a=this._chartId(),n=i.aggregateFor(a);if(n.type==="matrix")return;let r=n.keys[s.dataPointIndex];r!=null&&(i.toggleKey(a,r),this._fireFilterChange(i,r))}_onChange(){this._mode()!=="filter"||this._pending||(this._pending=!0,Promise.resolve().then(()=>{this._pending=!1,!this.w.globals.isDestroyed&&this._applyAggregation()}))}_applyAggregation(){if(this._mode()!=="filter")return;let t=this._cf();if(!t)return;let e=t.aggregateFor(this._chartId()),s=this._sigOf(e);if(s===this._lastValues){this._applySelfDim();return}this._lastValues=s,this.ctx.updateSeries(this._seriesFromAgg(e),!0)}_afterRender(){if(this._mode()!=="filter")return;let t=this.w.config.series;if(!t||t.length===0){this._reassertSeries();return}this._applySelfDim()}_reassertSeries(){this._pending||(this._pending=!0,Promise.resolve().then(()=>{if(this._pending=!1,this.w.globals.isDestroyed)return;let t=this._cf();if(!t)return;let e=t.aggregateFor(this._chartId()),s=this._seriesFromAgg(e);s.length&&(this._lastValues=this._sigOf(e),this.ctx.updateSeries(s,!0))}))}_applySelfDim(){let t=this._cf();if(!t)return;let e=this.w,s=e.dom.baseEl;if(!s)return;let i=this._chartId(),a=t.filterOf(i),n=e.config.chart.link.dimOpacity;e.dom.elWrap&&typeof n=="number"&&e.dom.elWrap.style.setProperty("--apx-cf-dim",String(n));let r=a instanceof Set,o=Array.isArray(a),l=t.aggregateFor(i);if(l.type==="matrix")return;let c=l.keys;s.querySelectorAll(Hh).forEach(h=>{let d=h.getAttribute("j");if(d===null)return;let f=c[parseInt(d,10)],g=!1;r?g=!a.has(f):o&&Array.isArray(f)&&(g=f[1]<=a[0]||f[0]>=a[1]),h.classList.toggle(as,g)}),this._dimmed=!!a}_fireFilterChange(t,e){var s;let i=j(G({},t.state()),{sourceChartID:this._chartId(),key:e}),a=this.w.config.chart.events;typeof a.filterChange=="function"&&a.filterChange(this.ctx,i),(s=this.ctx.events)==null||s.fireEvent("filterChange",[this.ctx,i])}teardown(){var t,e,s,i,a,n;if(this.clear(),this._wired){(e=(t=this.ctx).removeEventListener)==null||e.call(t,"dataPointSelection",this._onPointSelect),(i=(s=this.ctx).removeEventListener)==null||i.call(s,"mounted",this._afterRender),(n=(a=this.ctx).removeEventListener)==null||n.call(a,"updated",this._afterRender);let r=this._cf();r&&(r.off("change",this._onChange),r.removeDimension(this._chartId())),this._wired=!1}}};ht.registerFeatures({linkedViews:ba});var io=ht;io._crossfilterFactory=u=>We.getOrCreate(u);io._crossfilterGet=u=>We.get(u);var Gh="apexcharts-ink-draggable",cr=["point","xaxis","yaxis"],hr=8,dr=2,Me=[10,11,12,14,17,20],ii=["circle","square","diamond","triangle"],ai={circle:"\u25CF",square:"\u25A0",diamond:"\u25C6",triangle:"\u25B2"},Vh=["#ffffff","#334155","#2563eb","#16a34a","#d97706","#dc2626"],Uh='<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/></svg>',ya=class u{constructor(t,e){this.w=t,this.ctx=e,this._wired=!1,this._drag=null,this._editor=null,this._creating=!1,this._createSeq=0,this._attach=this._attach.bind(this),this._onRerender=this._onRerender.bind(this),this._onMove=this._onMove.bind(this),this._onUp=this._onUp.bind(this),this._onCreateClick=this._onCreateClick.bind(this),this._onDocDownEditor=this._onDocDownEditor.bind(this),(this._enabledGlobally()||this._hasDraggable()||this._paletteEnabled())&&this._wire()}_enabledGlobally(){let t=this.w.config.chart.ink;return!!(t&&t.enabled)}_paletteEnabled(){let t=this.w.config.chart.ink;return!!(t&&t.palette)}_snapEnabled(){let t=this.w.config.chart.ink;return!!(t&&t.snap)}_nearest(t,e){let s=t,i=1/0;for(let a=0;a<e.length;a++){let n=Math.abs(e[a]-t);n<i&&(i=n,s=e[a])}return s}_snapX(t){if(!this._snapEnabled()||typeof t!="number")return t;let e=this.w.globals.xAxisScale;return e&&Array.isArray(e.result)&&e.result.length?this._nearest(t,e.result):t}_snapY(t,e){if(!this._snapEnabled()||typeof t!="number")return t;let s=this.w.globals.yAxisScale,i=s&&s[e];return i&&Array.isArray(i.result)&&i.result.length?this._nearest(t,i.result):t}_annoList(t){let e=this.w.config.annotations;if(!e)return[];let s=t==="point"?"points":t;return Array.isArray(e[s])?e[s]:[]}_isDraggable(t){return t?t.draggable===!0?!0:t.draggable===!1?!1:this._enabledGlobally():!1}_hasDraggable(){return cr.some(t=>this._annoList(t).some(e=>this._isDraggable(e)))}_wire(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onRerender),this.ctx.addEventListener("updated",this._onRerender))}_onRerender(){if(this._closeEditor(!1),this._attach(),this._creating){let t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0))}}_attach(){let t=this.w,e=t.dom.baseEl;e&&(cr.forEach(s=>{this._annoList(s).forEach((i,a)=>{this._isDraggable(i)&&(i.id||(i.id="apexcharts-ink-"+s+"-"+a+"-"+t.globals.chartID),e.querySelectorAll("."+i.id).forEach(n=>{n.__inkBound||(n.__inkBound=!0,n.style.cursor="move",n.classList.add(Gh),n.addEventListener("mousedown",r=>this._onDown(r,s,a)),n.addEventListener("touchstart",r=>this._onDown(r,s,a)),n.addEventListener("dblclick",r=>{r.preventDefault(),r.stopPropagation(),this._startEdit(s,a,{select:!0})}))}))})}),this._paletteEnabled()&&this._renderPalette())}_onDown(t,e,s){if(t.button&&t.button!==0)return;let i=this.w,a=i.dom.baseEl&&i.dom.baseEl.ownerDocument;if(!a)return;t.stopPropagation(),t.cancelable&&t.preventDefault();let r=t.type==="touchstart"?t.touches[0]:t,o=i.dom.Paper&&i.dom.Paper.node,l=o&&o.getScreenCTM?o.getScreenCTM():null,c=this._annoList(e)[s],h="move",d=null,f=0,g=0;if(e==="xaxis"&&c.x2!=null&&(d=i.dom.baseEl.querySelector(".apexcharts-annotation-rect."+c.id),d)){let p=d.getBoundingClientRect();Math.abs(r.clientX-p.left)<=hr?h="resize-x1":Math.abs(r.clientX-p.right)<=hr&&(h="resize-x2"),f=parseFloat(d.getAttribute("x"))||0,g=parseFloat(d.getAttribute("width"))||0}this._drag={type:e,index:s,anno:c,els:Array.from(i.dom.baseEl.querySelectorAll("."+c.id)),mode:h,rect:d,origX:f,origW:g,startX:r.clientX,startY:r.clientY,scaleX:l&&l.a?l.a:1,scaleY:l&&l.d?l.d:1,dxPixel:0,dyPixel:0,moved:!1},a.addEventListener("mousemove",this._onMove),a.addEventListener("touchmove",this._onMove,{passive:!1}),a.addEventListener("mouseup",this._onUp),a.addEventListener("touchend",this._onUp)}_onMove(t){let e=this._drag;if(!e)return;t.cancelable&&t.preventDefault();let s=t.type==="touchmove"?t.touches[0]:t;if(e.dxPixel=(s.clientX-e.startX)/e.scaleX,e.dyPixel=(s.clientY-e.startY)/e.scaleY,(Math.abs(e.dxPixel)>dr||Math.abs(e.dyPixel)>dr)&&(e.moved=!0),e.mode==="move"){let i=`translate(${e.dxPixel} ${e.dyPixel})`;e.els.forEach(a=>a.setAttribute("transform",i))}else e.rect&&(e.mode==="resize-x1"?(e.rect.setAttribute("x",e.origX+e.dxPixel),e.rect.setAttribute("width",Math.max(1,e.origW-e.dxPixel))):e.mode==="resize-x2"&&e.rect.setAttribute("width",Math.max(1,e.origW+e.dxPixel)))}_onUp(){let t=this._drag;if(this._drag=null,this._teardownDocListeners(),!t||!t.moved){t&&(t.els.forEach(s=>s.removeAttribute("transform")),this._startEdit(t.type,t.index));return}let e=this._annoList(t.type)[t.index];e&&(this._applyDelta(t,e),t.els.forEach(s=>s.removeAttribute("transform")),this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:drag"),this._fireDragged(t.type,e,t.index))}_checkpoint(t){var e,s;(s=(e=this.ctx.history)==null?void 0:e.snapshot)==null||s.call(e,t)}_applyDelta(t,e){let s=this.w,i=s.layout.gridWidth?t.dxPixel*(s.globals.xRange/s.layout.gridWidth):0;if(t.type==="point"){let{newX:a,newY:n}=this._invertPoint(e,t.dxPixel,t.dyPixel);if(e.x=this._snapX(a),n!=null){let r=e.yAxisIndex||0,o=s.globals.seriesYAxisMap;e.y=this._snapY(n,o&&o[r]?o[r][0]:0)}return}if(t.type==="xaxis"){if(typeof e.x!="number")return;if(t.mode==="move")typeof e.x2=="number"?(e.x+=i,e.x2+=i):e.x=this._snapX(e.x+i);else if(t.mode==="resize-x1"||t.mode==="resize-x2"){let a=e.x2==null||e.x<=e.x2;(t.mode==="resize-x2"?!a:a)?e.x=this._snapX(e.x+i):typeof e.x2=="number"&&(e.x2=this._snapX(e.x2+i))}return}if(t.type==="yaxis"){let a=e.yAxisIndex||0,n=s.globals.seriesYAxisMap,r=n&&n[a]?n[a][0]:0,o=s.globals.yRange?s.globals.yRange[r]:null;if(o==null||!s.layout.gridHeight)return;let l=-t.dyPixel*(o/s.layout.gridHeight);typeof e.y2=="number"?(typeof e.y=="number"&&(e.y+=l),e.y2+=l):typeof e.y=="number"&&(e.y=this._snapY(e.y+l,r))}}_invertPoint(t,e,s){let i=this.w,a=(i.config.xaxis.type==="category"||i.config.xaxis.convertedCatToNumeric)&&!i.axisFlags.dataFormatXNumeric,n=t.x;!a&&typeof t.x=="number"&&i.layout.gridWidth&&(n=t.x+e*(i.globals.xRange/i.layout.gridWidth));let r=t.y,o=t.yAxisIndex||0,l=i.globals.seriesYAxisMap,c=l&&l[o]?l[o][0]:0,h=i.globals.yRange?i.globals.yRange[c]:null,d=i.config.yaxis[o]&&i.config.yaxis[o].logarithmic;return typeof t.y=="number"&&h!=null&&!d&&i.layout.gridHeight&&(r=t.y-s*(h/i.layout.gridHeight)),{newX:n,newY:r}}_redrawAnno(t,e,s){let a=this.w.dom.baseEl,n=this.ctx.annotations;if(!a||!n)return;a.querySelectorAll("."+e.id).forEach(l=>l.remove());let r=a.querySelector(".apexcharts-"+t+"-annotations");if(!r)return;t==="point"&&n.pointsAnnotations?n.pointsAnnotations.addPointAnnotation(e,r,s):t==="xaxis"&&n.xAxisAnnotations?n.xAxisAnnotations.addXaxisAnnotation(e,r,s):t==="yaxis"&&n.yAxisAnnotations&&n.yAxisAnnotations.addYaxisAnnotation(e,r,s);let o=a.querySelector(".apexcharts-"+t+"-annotation-label."+e.id);if(o&&n.helpers&&e.label&&e.label.text){let l=n.helpers.addBackgroundToAnno(o,e);l&&o.parentNode&&o.parentNode.insertBefore(l.node,o)}this._attach()}_fireAnnotationEvent(t,e){var s;let i=this.w.config.chart.events;typeof i[t]=="function"&&i[t](this.ctx,e),(s=this.ctx.events)==null||s.fireEvent(t,[this.ctx,e])}_fireDragged(t,e,s){let i={type:t,id:e.id,index:s,x:e.x,y:e.y};e.x2!=null&&(i.x2=e.x2),e.y2!=null&&(i.y2=e.y2),this._fireAnnotationEvent("annotationDragged",i)}startCreate(){if(this._creating)return;let t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(this._creating=!0,t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0),this._syncPalette())}stopCreate(){if(!this._creating)return;this._creating=!1;let t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="",t.removeEventListener("click",this._onCreateClick,!0)),this._syncPalette()}_onCreateClick(t){if(!this._creating)return;t.preventDefault(),t.stopPropagation();let e=this._pixelToData(t.clientX,t.clientY);this.stopCreate(),e&&this.createAt(e.x,e.y)}createAt(t,e,s={}){let i=this.w;this._wire(),this._createSeq+=1;let a="apexcharts-ink-new-"+this._createSeq+"-"+i.globals.chartID,n=T.extend(new wt().pointAnnotation,{x:t,y:e,id:a,draggable:!0,label:{text:s.text||"Note"}});i.config.annotations||(i.config.annotations={}),Array.isArray(i.config.annotations.points)||(i.config.annotations.points=[]),i.config.annotations.points.push(n);let r=i.config.annotations.points.length-1;return this._redrawAnno("point",n,r),this._checkpoint("ink:create"),this._fireCreated("point",n,r),this._startEdit("point",r,{select:!0}),n}createLineAt(t,e,s={}){let i=this.w;this._wire(),this._createSeq+=1;let a="apexcharts-ink-new-"+this._createSeq+"-"+i.globals.chartID,n=t==="y"?"yaxis":"xaxis",r=n==="yaxis"?new wt().yAxisAnnotation:new wt().xAxisAnnotation,o={id:a,draggable:!0,strokeDashArray:s.strokeDashArray!=null?s.strokeDashArray:4,label:{text:s.text||""}};s.color&&(o.borderColor=s.color,o.label.borderColor=s.color),n==="yaxis"?o.y=e:o.x=e;let l=T.extend(r,o);i.config.annotations||(i.config.annotations={}),Array.isArray(i.config.annotations[n])||(i.config.annotations[n]=[]),i.config.annotations[n].push(l);let c=i.config.annotations[n].length-1;return this._redrawAnno(n,l,c),this._checkpoint("ink:create"),this._fireCreated(n,l,c),s.select!==!1&&this._startEdit(n,c,{select:!0}),l}_pixelToData(t,e){let s=this.w,i=s.dom.baseEl&&s.dom.baseEl.querySelector(".apexcharts-grid");if(!i)return null;let a=i.getBoundingClientRect();if(!a.width||!a.height)return null;let n=(t-a.left)/a.width,r=(e-a.top)/a.height,o=s.globals.minX,l=s.globals.xRange,c=s.globals.minYArr&&s.globals.minYArr[0]!=null?s.globals.minYArr[0]:s.globals.minY,h=s.globals.yRange&&s.globals.yRange[0]!=null?s.globals.yRange[0]:s.globals.maxY-s.globals.minY,d=o+n*l,f=c+(1-r)*h;return(s.config.xaxis.type==="category"||s.config.xaxis.convertedCatToNumeric)&&!s.axisFlags.dataFormatXNumeric&&(d=Math.round(d)),{x:d,y:f}}_fireCreated(t,e,s){let i={type:t,id:e.id,index:s};typeof e.x<"u"&&(i.x=e.x),typeof e.y<"u"&&(i.y=e.y),this._fireAnnotationEvent("annotationCreated",i)}_renderPalette(){let e=this.w.dom.elWrap;if(!e||e.querySelector(".apexcharts-ink-palette"))return;let s=e.ownerDocument,i=s.createElement("div");i.className="apexcharts-ink-palette";let a=i.style;a.position="absolute",a.top="6px",a.left="6px",a.zIndex="15";let n=s.createElement("button");n.type="button",n.className="apexcharts-ink-add",n.textContent="+ Note";let r=n.style;r.cursor="pointer",r.font="12px sans-serif",r.padding="4px 9px",r.borderRadius="5px",r.border="1px solid #6366f1",r.color="#4338ca",r.background="#fff",n.addEventListener("click",o=>{o.stopPropagation(),this._creating?this.stopCreate():this.startCreate()}),i.appendChild(n),e.appendChild(i),this._syncPalette()}_syncPalette(){let t=this.w.dom.elWrap,e=t&&t.querySelector(".apexcharts-ink-add");e&&(this._creating?(e.style.background="#6366f1",e.style.color="#fff",e.textContent="Click chart..."):(e.style.background="#fff",e.style.color="#4338ca",e.textContent="+ Note"))}_noteColors(){let t=this.w.config.chart.ink;return t&&Array.isArray(t.noteColors)&&t.noteColors.length?t.noteColors:Vh}static _isLight(t){let e=String(t||"").replace("#",""),s=e.length===3?e.split("").map(o=>o+o).join(""):e,i=parseInt(s,16);if(isNaN(i)||s.length!==6)return!1;let a=i>>16&255,n=i>>8&255,r=i&255;return(.299*a+.587*n+.114*r)/255>.72}static _isBold(t){let e=t&&t.fontWeight;return e==="bold"||parseInt(String(e),10)>=600}_cardBtn(t,e,s,i,a,n){let r=t.createElement("button");return r.type="button",r.className="apexcharts-ink-btn"+(a?" "+a:""),r.title=s,r.setAttribute("aria-label",s),n?r.innerHTML=e:r.textContent=e,r.addEventListener("mousedown",o=>o.preventDefault()),r.addEventListener("click",o=>{o.stopPropagation(),i()}),r}_cardLabel(t,e){let s=t.createElement("span");return s.className="apexcharts-ink-cardlabel",s.textContent=e,s}_mkSwatch(t,e,s,i){let a=t.createElement("button");return a.type="button",a.className="apexcharts-ink-swatch"+(i?" "+i:""),a.title=e,a.setAttribute("aria-label","Color "+e),a.dataset.color=e,a.style.background=e,a.addEventListener("mousedown",n=>n.preventDefault()),a.addEventListener("click",n=>{n.stopPropagation(),s(e)}),a}_startEdit(t,e,s={}){let i=this.w,a=this._annoList(t)[e],n=i.dom.baseEl,r=i.dom.elWrap;if(!a||!a.id||!n||!r)return;this._closeEditor(!1);let o=n.ownerDocument,l=o.createElement("div");l.className="apexcharts-ink-card",l.setAttribute("role","dialog"),l.setAttribute("aria-label","Edit note"),l.style.visibility="hidden";let c=o.createElement("div");c.className="apexcharts-ink-card-row";let h=o.createElement("input");h.type="text",h.className="apexcharts-ink-editor",h.placeholder="Note text",h.value=a.label&&a.label.text||"",c.appendChild(h),c.appendChild(this._cardBtn(o,Uh,"Delete note",()=>this._deleteAnno(),"apexcharts-ink-btn--delete",!0)),l.appendChild(c);let d=o.createElement("div");d.className="apexcharts-ink-card-row",t!=="point"&&d.appendChild(this._cardLabel(o,"Label")),this._noteColors().forEach(g=>{d.appendChild(this._mkSwatch(o,g,p=>this._applyColor(p)))});let f=o.createElement("span");if(f.className="apexcharts-ink-sep",d.appendChild(f),d.appendChild(this._cardBtn(o,"B","Bold",()=>this._toggleBold(),"apexcharts-ink-btn--bold")),d.appendChild(this._cardBtn(o,"A-","Smaller text",()=>this._stepFont(-1))),d.appendChild(this._cardBtn(o,"A+","Larger text",()=>this._stepFont(1))),l.appendChild(d),t!=="point"){let g=o.createElement("div");g.className="apexcharts-ink-card-row",g.appendChild(this._cardLabel(o,"Line")),this._noteColors().forEach(p=>{g.appendChild(this._mkSwatch(o,p,m=>this._applyLineColor(m),"apexcharts-ink-swatch--line"))}),l.appendChild(g)}if(t==="point"){let g=o.createElement("div");g.className="apexcharts-ink-card-row",g.appendChild(this._cardLabel(o,"Marker")),g.appendChild(this._cardBtn(o,"-","Smaller marker",()=>this._stepMarker(-1)));let p=o.createElement("span");p.className="apexcharts-ink-marker-size",g.appendChild(p),g.appendChild(this._cardBtn(o,"+","Larger marker",()=>this._stepMarker(1))),g.appendChild(this._cardBtn(o,ai.circle,"Marker shape",()=>this._cycleShape(),"apexcharts-ink-btn--shape")),l.appendChild(g)}r.appendChild(l),this._editor={card:l,input:h,type:t,index:e},this._positionCard(),this._syncCard(),l.style.visibility="",h.focus(),s.select&&h.select(),l.addEventListener("keydown",g=>{g.key==="Escape"?(g.preventDefault(),g.stopPropagation(),this._closeEditor(!1)):g.key==="Enter"&&g.target===h&&(g.preventDefault(),this._closeEditor(!0))}),o.addEventListener("mousedown",this._onDocDownEditor,!0),o.addEventListener("touchstart",this._onDocDownEditor,!0)}_onDocDownEditor(t){let e=this._editor;!e||e.card.contains(t.target)||this._closeEditor(!0)}_positionCard(){let t=this._editor;if(!t)return;let e=this.w,s=e.dom.baseEl,i=e.dom.elWrap,a=this._annoList(t.type)[t.index];if(!s||!i||!a)return;let n=s.querySelector(".apexcharts-"+t.type+"-annotation-label."+a.id)||s.querySelector("."+a.id);if(!n)return;let r=i.getBoundingClientRect(),o=n.getBoundingClientRect(),l=t.card.offsetWidth,c=t.card.offsetHeight,h=Math.round(o.left-r.left),d=Math.round(o.bottom-r.top)+8;d+c>i.clientHeight-4&&(d=Math.round(o.top-r.top)-c-8),h+l>i.clientWidth-4&&(h=i.clientWidth-l-4),t.card.style.left=Math.max(4,h)+"px",t.card.style.top=Math.max(4,d)+"px"}_syncCard(){let t=this._editor;if(!t)return;let e=this._annoList(t.type)[t.index];if(!e)return;let s=e.label&&e.label.style||{},i=String(s.background||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch:not(.apexcharts-ink-swatch--line)").forEach(c=>{c.classList.toggle("apexcharts-ink-swatch--active",(c.dataset.color||"").toLowerCase()===i)});let a=String(e.borderColor||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch--line").forEach(c=>{c.classList.toggle("apexcharts-ink-swatch--active",(c.dataset.color||"").toLowerCase()===a)});let n=t.card.querySelector(".apexcharts-ink-btn--bold");n&&n.classList.toggle("apexcharts-ink-btn--active",u._isBold(s));let r=e.marker||{},o=t.card.querySelector(".apexcharts-ink-marker-size");o&&(o.textContent=String(typeof r.size=="number"?r.size:4));let l=t.card.querySelector(".apexcharts-ink-btn--shape");l&&(l.textContent=ai[r.shape]||ai.circle)}_commitTextOf(t){let e=this._annoList(t.type)[t.index];if(!e)return;let s=t.input.value;e.label||(e.label={}),e.label.text!==s&&(e.label.text=s,this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:edit"),this._fireEdited(t.type,e,t.index))}_closeEditor(t){let e=this._editor;if(!e)return;this._editor=null;let s=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;s&&(s.removeEventListener("mousedown",this._onDocDownEditor,!0),s.removeEventListener("touchstart",this._onDocDownEditor,!0)),e.card.parentNode&&e.card.parentNode.removeChild(e.card),t&&this._commitTextOf(e)}_applyStyle(t,e){let s=this._editor;if(!s)return;let i=this._annoList(s.type)[s.index];i&&(this._commitTextOf(s),i.label||(i.label={}),i.label.style||(i.label.style={}),e(i),this._redrawAnno(s.type,i,s.index),this._checkpoint(t),this._fireStyled(s.type,i,s.index),this._syncCard(),this._positionCard())}_applyColor(t){let e=this._editor;if(!e)return;let s=u._isLight(t);this._applyStyle("ink:style",i=>{i.label.style.background=t,i.label.style.color=s?"#334155":"#ffffff",i.label.borderColor=s?"#cbd5e1":t,e.type==="point"&&(i.marker||(i.marker={}),i.marker.strokeColor=s?"#334155":t,i.marker.fillColor=s?"#ffffff":t)})}_applyLineColor(t){let e=this._editor;!e||e.type==="point"||this._applyStyle("ink:style",s=>{s.borderColor=t,(s.x2!=null||s.y2!=null)&&(s.fillColor=t)})}_stepFont(t){this._applyStyle("ink:style",e=>{let s=parseFloat(e.label.style.fontSize)||11,i=0;for(let a=1;a<Me.length;a++)Math.abs(Me[a]-s)<Math.abs(Me[i]-s)&&(i=a);i=Math.min(Me.length-1,Math.max(0,i+t)),e.label.style.fontSize=Me[i]+"px"})}_toggleBold(){this._applyStyle("ink:style",t=>{t.label.style.fontWeight=u._isBold(t.label.style)?400:700})}_stepMarker(t){this._applyStyle("ink:style",e=>{e.marker||(e.marker={});let s=typeof e.marker.size=="number"?e.marker.size:4;e.marker.size=Math.min(14,Math.max(2,s+t))})}_cycleShape(){this._applyStyle("ink:style",t=>{t.marker||(t.marker={});let e=ii.indexOf(t.marker.shape);t.marker.shape=ii[(e+1)%ii.length]})}_deleteAnno(){let t=this._editor;if(!t)return;let e=this._annoList(t.type),s=e[t.index];if(this._closeEditor(!1),!s)return;let i=this.w.dom.baseEl;i&&s.id&&i.querySelectorAll("."+s.id).forEach(a=>a.remove()),e.splice(t.index,1);for(let a=t.index;a<e.length;a++)this._redrawAnno(t.type,e[a],a);this._checkpoint("ink:delete"),this._fireDeleted(t.type,s,t.index)}_fireEdited(t,e,s){let i={type:t,id:e.id,index:s,text:e.label?e.label.text:""};this._fireAnnotationEvent("annotationEdited",i)}_fireStyled(t,e,s){let i={type:t,id:e.id,index:s,label:e.label,marker:e.marker};this._fireAnnotationEvent("annotationStyled",i)}_fireDeleted(t,e,s){let i={type:t,id:e.id,index:s};this._fireAnnotationEvent("annotationDeleted",i)}_teardownDocListeners(){let t=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;t&&(t.removeEventListener("mousemove",this._onMove),t.removeEventListener("touchmove",this._onMove),t.removeEventListener("mouseup",this._onUp),t.removeEventListener("touchend",this._onUp))}teardown(){var t,e,s,i;this._teardownDocListeners(),this._closeEditor(!1),this.stopCreate(),this._drag=null,this._wired&&((e=(t=this.ctx).removeEventListener)==null||e.call(t,"mounted",this._onRerender),(i=(s=this.ctx).removeEventListener)==null||i.call(s,"updated",this._onRerender),this._wired=!1)}};ht.registerFeatures({ink:ya});var wa=class{constructor(t,e){this.w=t,this.ctx=e,this.graphics=new B(t),this.pins=[],this.drag=null,this.armed=!1,this.persistent=!1,this.pane=null,this._seedActive=!1,this._onKeyDown=this._onKeyDown.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onDown=this._onDown.bind(this),this._onMove=this._onMove.bind(this),this._onUp=this._onUp.bind(this),this._onSeedDown=this._onSeedDown.bind(this),this._onSeedKey=this._onSeedKey.bind(this),this._afterRender=this._afterRender.bind(this),e.addEventListener("mounted",this._afterRender),e.addEventListener("updated",this._afterRender),this._bindKeys()}_cfg(){return this.w.config.chart.measure||{}}_enabled(){return this.w.globals.axisCharts&&this._cfg().enabled===!0}_mode(){return this._cfg().mode==="free"?"free":"span"}_snapToSeries(t){let e=(this.w.config.series||[])[0];if(!e)return null;let s=this._points(e.data||[]);if(!s.length)return null;let i=s[0],a=Math.abs(s[0].x-t);for(let n=1;n<s.length;n++){let r=Math.abs(s[n].x-t);r<a&&(a=r,i=s[n])}return i}_resolve(t){if(this._mode()==="free")return t;let e=this._snapToSeries(t.x);if(!e)return t;let s=this._dataToGrid(e.x,e.y);return{x:e.x,y:e.y,gx:s.gx,gy:s.gy}}_doc(){return this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument}_bindKeys(){if(this._keysBound)return;let t=this._doc();t&&(t.addEventListener("keydown",this._onKeyDown),t.addEventListener("keyup",this._onKeyUp),this._keysBound=!0)}_onKeyDown(t){if(!this._enabled()||this.persistent)return;let e=this._cfg().key||"m";t.key&&t.key.toLowerCase()===String(e).toLowerCase()?this._arm():t.key==="Escape"&&this._cancelDrag()}_onKeyUp(t){if(this.persistent)return;let e=this._cfg().key||"m";t.key&&t.key.toLowerCase()===String(e).toLowerCase()&&(this.drag||this._disarm())}startMeasure(){this._enabled()&&(this.persistent=!0,this._arm())}stopMeasure(){this.persistent=!1,this._cancelDrag(),this._disarm()}seedFromClient(t,e){if(!this._enabled())return;this._cancelDrag(),this._endSeed(!1);let s=this._project(t,e);this.drag={a:s,b:s},this._seedActive=!0;let i=this._doc();i&&(i.addEventListener("mousemove",this._onMove),i.addEventListener("touchmove",this._onMove,{passive:!1}),i.addEventListener("mousedown",this._onSeedDown,!0),i.addEventListener("touchstart",this._onSeedDown,!0),i.addEventListener("keydown",this._onSeedKey,!0)),this._renderLive()}_onSeedDown(t){if(!this._seedActive||!this.drag)return;t.preventDefault(),t.stopPropagation();let{cx:e,cy:s}=this._clientXY(t);this.drag.b=this._project(e,s),this._endSeed(!0)}_onSeedKey(t){t.key==="Escape"&&this._endSeed(!1)}_endSeed(t){var e,s;if(!this._seedActive)return;this._seedActive=!1;let i=this._doc();i&&(i.removeEventListener("mousemove",this._onMove),i.removeEventListener("touchmove",this._onMove),i.removeEventListener("mousedown",this._onSeedDown,!0),i.removeEventListener("touchstart",this._onSeedDown,!0),i.removeEventListener("keydown",this._onSeedKey,!0));let a=this.drag;if(this.drag=null,this._clearLive(),!t||!a)return;let n=this._resolve(a.a),r=this._resolve(a.b);if(Math.abs(n.gx-r.gx)<2&&Math.abs(n.gy-r.gy)<2)return;let o=this._mode();this._cfg().pinOnRelease!==!1&&(this.pins.push({xa:n.x,ya:n.y,xb:r.x,yb:r.y,mode:o}),this._renderPins(),(s=(e=this.ctx.history)==null?void 0:e.snapshot)==null||s.call(e,"measure")),this._fireMeasured(n,r)}clearMeasures(){var t,e;this.pins=[],this._renderPins(),(e=(t=this.ctx.history)==null?void 0:t.snapshot)==null||e.call(t,"clear measures")}getPins(){return this.pins.map(t=>({xa:t.xa,ya:t.ya,xb:t.xb,yb:t.yb,mode:t.mode==="free"?"free":"span"}))}setPins(t){this.pins=Array.isArray(t)?t.filter(e=>e&&isFinite(e.xa)&&isFinite(e.ya)&&isFinite(e.xb)&&isFinite(e.yb)).map(e=>({xa:+e.xa,ya:+e.ya,xb:+e.xb,yb:+e.yb,mode:e.mode==="free"?"free":"span"})):[],this._renderPins()}_points(t){let e=[];for(let s=0;s<t.length;s++){let i=t[s],a,n;Array.isArray(i)?(a=+i[0],n=+i[1]):i&&typeof i=="object"?(a=+i.x,n=+i.y):(a=s,n=+i),isFinite(a)&&isFinite(n)&&e.push({x:a,y:n})}return e}_arm(){if(this.armed||!this._enabled())return;let t=this.w,e=t.dom.elGraphical;if(!e)return;this.armed=!0;let s=this.graphics.drawRect(0,0,t.layout.gridWidth,t.layout.gridHeight);s.node.setAttribute("class","apexcharts-measure-capture"),s.node.setAttribute("fill","transparent"),s.node.style.cursor="crosshair",s.node.style.pointerEvents="all",s.node.addEventListener("mousedown",this._onDown),s.node.addEventListener("touchstart",this._onDown,{passive:!1}),e.add(s),this.pane=s}_disarm(){if(this.armed=!1,this.pane){this.pane.node.removeEventListener("mousedown",this._onDown),this.pane.node.removeEventListener("touchstart",this._onDown);let t=this.pane.node;t.parentNode&&t.parentNode.removeChild(t),this.pane=null}}_clientXY(t){let e=t.touches&&t.touches[0]?t.touches[0]:t;return{cx:e.clientX,cy:e.clientY}}_gridRect(){let t=this.w.dom.baseEl.querySelector(".apexcharts-grid");return t?t.getBoundingClientRect():null}_yRange(){let t=this.w.globals,e=t.yAxisScale&&t.yAxisScale[0];return e&&isFinite(e.niceMin)&&isFinite(e.niceMax)&&e.niceMax!==e.niceMin?[e.niceMin,e.niceMax]:[t.minY,t.maxY]}_project(t,e){let s=this.w,i=this._gridRect(),a=s.layout.gridWidth,n=s.layout.gridHeight,r=g=>g<0?0:g>1?1:g,o=i?r((t-i.left)/i.width):0,l=i?r((e-i.top)/i.height):0,[c,h]=this._yRange(),d=s.globals.minX+o*(s.globals.maxX-s.globals.minX),f=h-l*(h-c);return{x:d,y:f,gx:o*a,gy:l*n}}_dataToGrid(t,e){let s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=s.globals.maxX-s.globals.minX||1,[r,o]=this._yRange(),l=o-r||1;return{gx:(t-s.globals.minX)/n*i,gy:a-(e-r)/l*a}}_onDown(t){if(!this.armed)return;t.preventDefault(),t.stopPropagation();let{cx:e,cy:s}=this._clientXY(t),i=this._project(e,s);this.drag={a:i,b:i};let a=this._doc();a&&(a.addEventListener("mousemove",this._onMove),a.addEventListener("mouseup",this._onUp),a.addEventListener("touchmove",this._onMove,{passive:!1}),a.addEventListener("touchend",this._onUp)),this._renderLive()}_onMove(t){if(!this.drag)return;t.cancelable&&t.preventDefault();let{cx:e,cy:s}=this._clientXY(t);this.drag.b=this._project(e,s),this._renderLive()}_onUp(t){var e,s;let i=this._doc();if(i&&(i.removeEventListener("mousemove",this._onMove),i.removeEventListener("mouseup",this._onUp),i.removeEventListener("touchmove",this._onMove),i.removeEventListener("touchend",this._onUp)),!this.drag)return;let a=this.drag.a,n=this.drag.b;if(this.drag=null,this._clearLive(),Math.abs(a.gx-n.gx)<2&&Math.abs(a.gy-n.gy)<2){this.persistent||this._disarm();return}let r=this._mode(),o=this._resolve(a),l=this._resolve(n);this._cfg().pinOnRelease!==!1&&(this.pins.push({xa:o.x,ya:o.y,xb:l.x,yb:l.y,mode:r}),this._renderPins(),(s=(e=this.ctx.history)==null?void 0:e.snapshot)==null||s.call(e,"measure")),this._fireMeasured(o,l),this.persistent||this._disarm()}_cancelDrag(){let t=this._doc();t&&(t.removeEventListener("mousemove",this._onMove),t.removeEventListener("mouseup",this._onUp),t.removeEventListener("touchmove",this._onMove),t.removeEventListener("touchend",this._onUp)),this.drag=null,this._clearLive()}_stats(t,e){let s=e.x-t.x,i=e.y-t.y;return{dx:s,dy:i,pct:t.y!==0?i/Math.abs(t.y)*100:NaN,slope:s!==0?i/s:NaN}}_fmt(t){if(!isFinite(t))return"n/a";let e=Math.abs(t);return e!==0&&(e<.01||e>=1e6)?t.toExponential(2):String(Math.round(t*100)/100)}_computedStyle(){if(!H.isBrowser())return null;let t=this.w.dom.elGraphical&&this.w.dom.elGraphical.node;if(!t||typeof getComputedStyle!="function")return null;try{return getComputedStyle(t)}catch{return null}}_resolveColor(t,e,s,i){if(t)return t;let a=i!==void 0?i:this._computedStyle();return(a?a.getPropertyValue(e).trim():"")||s}_colors(){let t=this._cfg().colors||{},e=this._computedStyle();return{up:this._resolveColor(t.up,"--apx-measure-up","#16a34a",e),down:this._resolveColor(t.down,"--apx-measure-down","#dc2626",e),neutral:this._resolveColor(t.neutral,"--apx-measure-neutral","#64748b",e),guide:this._resolveColor(t.guide,"--apx-measure-guide","#94a3b8",e)}}_dirColor(t){let e=this._colors();return t===0?e.neutral:t>0?e.up:e.down}_dirClass(t){return t===0?"apexcharts-measure-flat":t>0?"apexcharts-measure-up":"apexcharts-measure-down"}_fmtPct(t){if(!isFinite(t))return"n/a";let e=this._cfg().format&&this._cfg().format.percent;if(typeof e=="function")try{let s=e(t);if(s!=null)return String(s)}catch{}return(t>=0?"+":"")+this._fmt(t)+"%"}_label(t,e,s,i){let a=this._cfg().label;if(typeof a=="function"){let n=a({from:{x:t.x,y:t.y},to:{x:e.x,y:e.y},dx:s.dx,dy:s.dy,percentChange:s.pct,slope:s.slope,mode:i});return Array.isArray(n)?n.map(String):[String(n)]}if(i==="span"){let n=s.dy===0?"":s.dy>0?" \u2191":" \u2193",r=isFinite(s.pct)?"("+this._fmtPct(s.pct)+")":"";return[this._fmtY(s.dy)+" "+r+n,this._fmtX(t.x)+" to "+this._fmtX(e.x)]}return["\u0394x "+this._fmtDx(s.dx),"\u0394y "+this._fmtY(s.dy),this._fmtPct(s.pct)]}_fmtDx(t){if(this.w.config.xaxis.type==="datetime"){let e=t/864e5;return Math.round(e*10)/10+"d"}return this._fmt(t)}_fmtY(t){let e=this._cfg().format&&this._cfg().format.y;if(typeof e=="function")try{let i=e(t);if(i!=null)return String(i)}catch{}let s=this.w.globals.yLabelFormatters&&this.w.globals.yLabelFormatters[0];if(typeof s=="function")try{let i=s(t,{seriesIndex:0,dataPointIndex:-1,w:this.w});if(i!=null&&i!=="")return String(i)}catch{}return this._fmt(t)}_fmtX(t){let e=this.w,s=this._cfg().format&&this._cfg().format.x;if(typeof s=="function")try{let a=s(t);if(a!=null)return String(a)}catch{}if(e.config.xaxis.type==="datetime")return new Date(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"});let i=e.globals.xLabelFormatter;if(typeof i=="function")try{let a=i(t,{w:e});if(a!=null&&a!=="")return String(a)}catch{}return this._fmt(t)}_liveGroup(){let t=this.w;if(this._live&&this._live.node&&this._live.node.parentNode)return this._live;let e=this.graphics.group({class:"apexcharts-measure-live"});return e.node.style.pointerEvents="none",t.dom.elGraphical&&t.dom.elGraphical.add(e),this._live=e,e}_clearLive(){if(this._live&&this._live.node){let t=this._live.node;t.parentNode&&t.parentNode.removeChild(t)}this._live=null}_renderLive(){if(!this.drag)return;let t=this._liveGroup();for(;t.node.firstChild;)t.node.removeChild(t.node.firstChild);let e=this._resolve(this.drag.a),s=this._resolve(this.drag.b);this._drawRuler(t,e,s,!1,this._mode())}_renderPins(){let t=this.w,e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-measure-pins");if(e&&e.parentNode&&e.parentNode.removeChild(e),!this.pins.length||!t.dom.elGraphical)return;let s=this.graphics.group({class:"apexcharts-measure-pins"});s.node.style.pointerEvents="none",t.dom.elGraphical.add(s),this.pins.forEach(i=>{let a=j(G({},this._dataToGrid(i.xa,i.ya)),{x:i.xa,y:i.ya}),n=j(G({},this._dataToGrid(i.xb,i.yb)),{x:i.xb,y:i.yb});this._drawRuler(s,a,n,!0,i.mode||"span")})}_drawRuler(t,e,s,i,a){let n=this._stats(e,s),r=this.graphics.group({class:"apexcharts-measure-ruler "+this._dirClass(n.dy)+(i?" apexcharts-measure-pinned":"")});(a||this._mode())==="free"?this._drawFree(r,e,s,n):this._drawSpan(r,e,s,n),t.add(r)}_dot(t,e,s){if(this._cfg().markers===!1)return;let i=this.graphics.drawMarker(e.gx,e.gy,{pSize:4,shape:"circle",pointFillColor:s,pointFillOpacity:1,pointStrokeColor:"#fff",pointStrokeWidth:2,pointStrokeOpacity:1});t.add(i)}_readout(t,e,s,i,a,n,r){let o=this.graphics.drawRect(s,i,a,n,4);o.node.setAttribute("class","apexcharts-measure-label-bg"),o.attr({fill:"#ffffff","fill-opacity":.95,stroke:r,"stroke-width":1}),t.add(o);let l=this.graphics.drawText({x:s+9,y:i+15,text:e,textAnchor:"start",fontSize:"11px",foreColor:"#1e293b",cssClass:"apexcharts-measure-label"});t.add(l)}_drawSpan(t,e,s,i){let a=this.w,n=this._cfg(),r=a.layout.gridHeight,o=this._dirColor(i.dy),l=Math.min(e.gx,s.gx),c=Math.max(e.gx,s.gx);if(n.band!==!1){let m=this.graphics.drawRect(l,0,Math.max(0,c-l),r,0);m.node.setAttribute("class","apexcharts-measure-band"),m.attr({fill:o,"fill-opacity":.09,stroke:"none"}),t.add(m)}n.guides!==!1&&[e,s].forEach(m=>{let b=this.graphics.drawLine(m.gx,0,m.gx,r,this._colors().guide,4,1);b.node.setAttribute("class","apexcharts-measure-vline"),t.add(b)}),[e,s].forEach(m=>this._dot(t,m,o));let h=this._label(e,s,i,"span"),d=h.reduce((m,b)=>Math.max(m,b.length),0),f=Math.max(148,d*6.4),g=20+h.length*15,p=(l+c)/2-f/2;p=Math.max(2,Math.min(p,a.layout.gridWidth-f-2)),this._readout(t,h,p,4,f,g,o)}_drawFree(t,e,s,i){let a=this._dirColor(i.dy),n=this.graphics.drawLine(e.gx,e.gy,s.gx,s.gy,a,0,2);n.node.setAttribute("class","apexcharts-measure-line"),t.add(n),[e,s].forEach(f=>this._dot(t,f,a));let r=this._label(e,s,i,"free"),o=r.reduce((f,g)=>Math.max(f,g.length),0),l=Math.max(72,o*6.2),c=16+r.length*15,h=(e.gx+s.gx)/2+8,d=(e.gy+s.gy)/2-c/2;h=Math.max(2,Math.min(h,this.w.layout.gridWidth-l-2)),d=Math.max(2,Math.min(d,this.w.layout.gridHeight-c-2)),this._readout(t,r,h,d,l,c,a)}_fireMeasured(t,e){let s=this._stats(t,e),i={from:{x:t.x,y:t.y},to:{x:e.x,y:e.y},dx:s.dx,dy:s.dy,percentChange:s.pct,slope:s.slope},a=this.w.config.chart.events.measured;typeof a=="function"&&a(this.ctx,i),this.ctx.events.fireEvent("measured",[this.ctx,i])}_afterRender(){this._enabled()&&(this.w.interact.measureEnabled&&!this.persistent&&(this.persistent=!0),this.pins.length&&this._renderPins(),this.persistent&&!this.drag&&(this._disarm(),this._arm()))}teardown(){this._cancelDrag(),this._endSeed(!1),this._disarm();let t=this._doc();t&&this._keysBound&&(t.removeEventListener("keydown",this._onKeyDown),t.removeEventListener("keyup",this._onKeyUp)),this._keysBound=!1,this.pins=[]}};ht.registerFeatures({measure:wa});var va=class{constructor(t,e){this.w=t,this.ctx=e,this.menu=null,this._items=[],this._focusIndex=-1,this._trigger=null,this._onContext=this._onContext.bind(this),this._onDocDown=this._onDocDown.bind(this),this._onKey=this._onKey.bind(this),this._afterRender=this._afterRender.bind(this),e.addEventListener("mounted",this._afterRender),e.addEventListener("updated",this._afterRender)}_cfg(){return this.w.config.chart.contextMenu||{}}_enabled(){return this._cfg().enabled===!0}_doc(){return this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument}_afterRender(){if(this._detachTrigger(),this.close(),!this._enabled()||!H.isBrowser())return;let t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.addEventListener("contextmenu",this._onContext),this._trigger=t)}_detachTrigger(){this._trigger&&(this._trigger.removeEventListener("contextmenu",this._onContext),this._trigger=null)}_onContext(t){this._enabled()&&(t.preventDefault(),this.open(t.clientX,t.clientY))}_clientToData(t,e){let s=this.w,i=s.dom.baseEl&&s.dom.baseEl.querySelector(".apexcharts-grid");if(!i)return null;let a=i.getBoundingClientRect();if(!a.width||!a.height)return null;let n=g=>g<0?0:g>1?1:g,r=n((t-a.left)/a.width),o=n((e-a.top)/a.height),l=s.globals.minX+r*(s.globals.maxX-s.globals.minX),c=s.globals.yAxisScale&&s.globals.yAxisScale[0],h=c&&isFinite(c.niceMin)?c.niceMin:s.globals.minY,d=c&&isFinite(c.niceMax)?c.niceMax:s.globals.maxY,f=d-o*(d-h);return{x:l,y:f}}_resolveItems(t){let e=this._cfg(),s=Array.isArray(e.items)&&e.items.length?e.items:["annotate","xline","yline","measure"],i=e.labels||{},a=[];return s.forEach(n=>{if(typeof n=="string"){if(n==="annotate")a.push({id:"annotate",label:i.annotate||"Add note here",run:()=>this._annotate(t)});else if(n==="xline")a.push({id:"xline",label:i.xline||"Annotate here",run:()=>this._line(t,"x")});else if(n==="yline")a.push({id:"yline",label:i.yline||"Mark this level",run:()=>this._line(t,"y")});else if(n==="measure"){let r=this.ctx.measure;r&&this.w.config.chart.measure&&this.w.config.chart.measure.enabled&&a.push({id:"measure",label:i.measure||"Measure from here",run:()=>r.seedFromClient(t.clientX,t.clientY)})}}else n&&typeof n=="object"&&typeof n.onClick=="function"&&a.push({id:n.id||"custom",label:n.label||"Action",run:()=>n.onClick(this.ctx,t)})}),a}_annotate(t){if(t.x==null||t.y==null)return;let e=this._cfg(),s=this.ctx.ink;if(s&&typeof s.createAt=="function"){s.createAt(t.x,t.y,{text:e.noteText||"Note"});return}this.ctx.addPointAnnotation({x:t.x,y:t.y,marker:{size:5},label:{text:e.noteText||"Note",style:{background:"#fff",color:"#334155"}}},!0)}_line(t,e){let s=this._cfg().line||{},i=e==="x"?t.x:t.y;if(i==null)return;let a=this.ctx.ink;if(a&&typeof a.createLineAt=="function"){a.createLineAt(e,i,{text:s.text,strokeDashArray:s.strokeDashArray,color:s.color});return}let n={strokeDashArray:s.strokeDashArray!=null?s.strokeDashArray:4};s.text&&(n.label={text:s.text}),s.color&&(n.borderColor=s.color,n.label=T.extend(n.label||{},{borderColor:s.color})),e==="x"?this.ctx.addXaxisAnnotation(T.extend(n,{x:i}),!0):this.ctx.addYaxisAnnotation(T.extend(n,{y:i}),!0)}open(t,e){this.close();let s=this.w,i=s.dom.elWrap,a=this._doc();if(!i||!a)return;let n=this._clientToData(t,e),r=s.globals,o={x:n?n.x:null,y:n?n.y:null,seriesIndex:r.capturedSeriesIndex>=0?r.capturedSeriesIndex:null,dataPointIndex:r.capturedDataPointIndex>=0?r.capturedDataPointIndex:null,clientX:t,clientY:e},l=this._resolveItems(o);if(!l.length)return;this._items=l;let c=a.createElement("div");c.className="apexcharts-context-menu",c.setAttribute("role","menu"),c.style.position="absolute",c.style.visibility="hidden",l.forEach((x,_)=>{let w=a.createElement("button");w.type="button",w.className="apexcharts-context-menu-item",w.setAttribute("role","menuitem"),w.tabIndex=-1,w.textContent=x.label,w.addEventListener("click",y=>{y.stopPropagation(),this._activate(_)}),w.addEventListener("mouseenter",()=>this._focus(_)),c.appendChild(w)}),i.appendChild(c),this.menu=c;let h=i.getBoundingClientRect(),d=t-h.left,f=e-h.top,g=c.offsetWidth,p=c.offsetHeight,m=Math.max(0,i.clientWidth-g),b=Math.max(0,i.clientHeight-p);d>m&&(d=m),f>b&&(f=b),c.style.left=Math.max(0,d)+"px",c.style.top=Math.max(0,f)+"px",c.style.visibility="visible",a.addEventListener("mousedown",this._onDocDown,!0),a.addEventListener("keydown",this._onKey,!0),this._focus(0)}_focus(t){if(!this.menu)return;let e=this.menu.querySelectorAll(".apexcharts-context-menu-item");this._focusIndex>=0&&e[this._focusIndex]&&e[this._focusIndex].classList.remove("apexcharts-context-menu-item--active"),this._focusIndex=t,e[t]&&(e[t].classList.add("apexcharts-context-menu-item--active"),typeof e[t].focus=="function"&&e[t].focus())}_activate(t){let e=this._items[t];this.close(),e&&e.run()}_onDocDown(t){this.menu&&this.menu.contains(t.target)||this.close()}_onKey(t){!this.menu||!this._items.length||(t.key==="Escape"?(t.preventDefault(),this.close()):t.key==="ArrowDown"?(t.preventDefault(),this._focus((this._focusIndex+1)%this._items.length)):t.key==="ArrowUp"?(t.preventDefault(),this._focus((this._focusIndex-1+this._items.length)%this._items.length)):(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._activate(this._focusIndex<0?0:this._focusIndex)))}close(){let t=this._doc();t&&(t.removeEventListener("mousedown",this._onDocDown,!0),t.removeEventListener("keydown",this._onKey,!0)),this.menu&&this.menu.parentNode&&this.menu.parentNode.removeChild(this.menu),this.menu=null,this._items=[],this._focusIndex=-1}teardown(){this.close(),this._detachTrigger()}};ht.registerFeatures({contextMenu:va});var ur=1e3;function Mt(u,t){let e=u.length;if(e===0)return NaN;if(e===1)return u[0];let s=(e-1)*t,i=Math.floor(s),a=Math.ceil(s);return i===a?u[i]:u[i]+(u[a]-u[i])*(s-i)}function ao(u){let t=u.length;if(t<2)return 0;let e=0;for(let a=0;a<t;a++)e+=u[a];let s=e/t,i=0;for(let a=0;a<t;a++){let n=u[a]-s;i+=n*n}return Math.sqrt(i/t)}function qh(u,t,e){let s=u.length,i=a=>t/Math.max(1,Math.ceil(a));switch(e){case"sqrt":return{width:i(Math.sqrt(s)),rule:"sqrt"};case"rice":return{width:i(2*Math.cbrt(s)),rule:"rice"};case"scott":{let a=ao(u);return a>0?{width:3.49*a*Math.pow(s,-1/3),rule:"scott"}:{width:i(Math.log2(s)+1),rule:"sturges"}}case"fd":{let a=Mt(u,.75)-Mt(u,.25);return a>0?{width:2*a*Math.pow(s,-1/3),rule:"fd"}:{width:i(Math.log2(s)+1),rule:"sturges"}}case"auto":{let a=i(Math.log2(s)+1),n=Mt(u,.75)-Mt(u,.25);if(n<=0)return{width:a,rule:"sturges"};let r=2*n*Math.pow(s,-1/3);return r<a?{width:r,rule:"fd"}:{width:a,rule:"sturges"}}default:return{width:i(Math.log2(s)+1),rule:"sturges"}}}function jh(u,t={}){if(!Array.isArray(u)||u.length===0)return null;let e=u.slice().sort((d,f)=>d-f),s=e[0],i=e[e.length-1],a=t.range;if(Array.isArray(a)&&a.length===2){let d=Number(a[0]),f=Number(a[1]);isFinite(d)&&isFinite(f)&&f>d&&(s=d,i=f)}if(!(i>s)){let d=Math.abs(s)>0?Math.abs(s)*.05:.5;return{edges:[s-d,s+d],binWidth:d*2,rule:"single",capped:!1}}let n=i-s,r,o;if(typeof t.binWidth=="number"&&t.binWidth>0)r=t.binWidth,o="binWidth";else if(typeof t.bins=="number"&&t.bins>=1)r=n/Math.floor(t.bins),o="count";else{let d=qh(e,n,typeof t.bins=="string"?t.bins:"auto");r=d.width,o=d.rule}(!isFinite(r)||r<=0)&&(r=n);let l=Math.ceil(n/r);(!isFinite(l)||l<1)&&(l=1);let c=!1;l>ur&&(l=ur,r=n/l,c=!0),r=n/l;let h=new Array(l+1);for(let d=0;d<=l;d++)h[d]=s+d*r;return h[l]=Math.max(h[l],i),{edges:h,binWidth:r,rule:o,capped:c}}function no(u,t){let e=t.length-1;if(!(u>=t[0])||u>t[e])return-1;if(u===t[e])return e-1;let s=(t[e]-t[0])/e;if(s>0){let n=Math.floor((u-t[0])/s);return n<0&&(n=0),n>e-1&&(n=e-1),u<t[n]?n--:u>=t[n+1]&&n++,n<0||n>e-1?-1:n}let i=0,a=e-1;for(;i<=a;){let n=i+a>>1;if(u<t[n])a=n-1;else if(u>=t[n+1])i=n+1;else return n}return-1}function Zh(u,t){let e=new Array(Math.max(0,t.length-1)).fill(0);for(let s=0;s<u.length;s++){let i=no(u[s],t);i>=0&&e[i]++}return e}function Kh(u,t){let e=Math.max(0,t.length-1),s=new Array(e);for(let i=0;i<e;i++)s[i]=[];for(let i=0;i<u.length;i++){let a=no(u[i],t);a>=0&&s[a].push(u[i])}return s}function Jh(u,t={}){if(!Array.isArray(u)||u.length===0)return null;let e=u.slice().sort((c,h)=>c-h),s=Mt(e,.25),i=Mt(e,.5),a=Mt(e,.75),n=a-s,r=e[0],o=e[e.length-1],l=[];if(t.whiskers==="tukey"&&n>0){let c=s-1.5*n,h=a+1.5*n,d=0;for(;d<e.length&&e[d]<c;)d++;let f=e.length-1;for(;f>=0&&e[f]>h;)f--;d<=f&&(r=e[d],o=e[f],l=e.slice(0,d).concat(e.slice(f+1)))}return{summary:[r,s,i,a,o],outliers:l,iqr:n}}function Qh(u,t={}){if(!Array.isArray(u)||u.length===0)return null;let e=u.slice().sort((h,d)=>h-d),s=e.length,i=t.bandwidth;if(!(typeof i=="number"&&i>0)){let h=ao(e),d=Mt(e,.75)-Mt(e,.25);i=.9*(d>0?Math.min(h,d/1.349):h)*Math.pow(s,-1/5)}if(!isFinite(i)||i<=0){let h=e[0],d=Math.abs(h)>0?Math.abs(h)*.001:.001;return{density:[[h-d,0],[h,1],[h+d,0]],bandwidth:d}}let a=Math.max(8,Math.floor(t.resolution||64)),n=e[0]-2*i,o=(e[s-1]+2*i-n)/(a-1),l=1/(s*i*Math.sqrt(2*Math.PI)),c=[];for(let h=0;h<a;h++){let d=n+h*o,f=0;for(let g=0;g<s;g++){let p=(d-e[g])/i;f+=Math.exp(-.5*p*p)}c.push([d,f*l])}return{density:c,bandwidth:i}}function td(u,t={}){let e=u.slice();if(t.cumulative){let i=0;e=e.map(a=>i+=a)}let s=u.reduce((i,a)=>i+a,0);if(s<=0)return e;if(t.normalize==="relative")return e.map(i=>i/s*100);if(t.normalize==="density"){let i=t.binWidth;if(typeof i=="number"&&i>0)return e.map(a=>a/(s*i))}return e}function ro(u){let t=[];if(!Array.isArray(u))return t;for(let e=0;e<u.length;e++){let s=u[e],i=s;Array.isArray(s)?i=s.length===1?s[0]:s[1]:s&&typeof s=="object"&&(i=s.y!==void 0?s.y:s.x);let a=T.parseNumber(i);a!==null&&isFinite(a)&&t.push(a)}return t}function ed(u,t){var e;let s=t.config,i=t.globals;if(!Array.isArray(u))return u;i.histogramRawSeries||(i.histogramRawSeries=u.map(g=>j(G({},g),{data:Array.isArray(g?.data)?g.data.slice():g?.data})));let a=i.histogramRawSeries,n=((e=s.plotOptions)==null?void 0:e.histogram)||{},r=a.map(g=>ro(g?.data)),o=[];if(r.length===1)o=r[0];else for(let g of r)o=o.concat(g);let l=jh(o,{bins:n.bins,binWidth:n.binWidth,range:n.range});if(!l)return t.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},a;let{edges:c,binWidth:h}=l,d=r.map(g=>Zh(g,c));t.histogramData={edges:c,binWidth:h,counts:d,rule:l.rule,capped:l.capped};let f=i.collapsedSeriesIndices||[];return a.map((g,p)=>{if(f.indexOf(p)!==-1)return j(G({},g),{data:[]});let m=td(d[p],{normalize:n.normalize,cumulative:n.cumulative,binWidth:h}),b=[];for(let x=0;x<m.length;x++)b.push({x:(c[x]+c[x+1])/2,y:m[x]});return j(G({},g),{data:b})})}var As=new WeakSet;function oo(u,t){var e;if(!u||typeof u!="object"||Array.isArray(u))return null;let s=null;if(Array.isArray(u.points)?s=u.points:Array.isArray((e=u.y)==null?void 0:e.points)?s=u.y.points:t&&Array.isArray(u.y)&&typeof u.y[0]=="number"&&(s=u.y),!s)return null;let i=[];for(let a=0;a<s.length;a++){let n=T.parseNumber(s[a]);n!==null&&isFinite(n)&&i.push(n)}return i.length?i:null}function sd(u,t){var e,s;if(!Array.isArray(u))return u;let i=((s=(e=t.config.plotOptions)==null?void 0:e.boxPlot)==null?void 0:s.whiskers)||"minmax";return u.map(a=>{if(!Array.isArray(a?.data))return a;let n=!1,r=a.data.map(o=>{if(Array.isArray(o?.y)&&o.y.length===5&&!As.has(o))return o;let l=oo(o,!1);if(!l)return o;let c=Jh(l,{whiskers:i});if(!c)return o;n=!0;let h=j(G({},o),{y:c.summary,points:l});return As.add(h),h});return n?j(G({},a),{data:r}):a})}function id(u,t){var e,s;if(!Array.isArray(u))return u;let i=((s=(e=t.config.plotOptions)==null?void 0:e.violin)==null?void 0:s.kde)||{};return u.map(a=>{if(!Array.isArray(a?.data))return a;let n=!1,r=a.data.map(o=>{var l;if(Array.isArray((l=o?.y)==null?void 0:l.density)&&o.y.density.length&&!As.has(o))return o;let c=oo(o,!0);if(!c)return o;let h=Qh(c,{bandwidth:i.bandwidth,resolution:i.resolution});if(!h)return o;n=!0;let d=j(G({},o),{y:{density:h.density,points:c}});return As.add(d),d});return n?j(G({},a),{data:r}):a})}var ad=3e3;function nd(u,t){let e=0,s=0;for(let o of u)e+=o.length,o.length>s&&(s=o.length);if(e<=t)return{clusters:u,stride:1,total:e,kept:e};let i=o=>{let l=0;for(let c of u)l+=Math.ceil(c.length/o);return l},a=Math.max(2,Math.ceil(e/t));for(;a<s&&i(a)>t;)a++;let n=0;return{clusters:u.map(o=>{let l=[];for(let c=0;c<o.length;c+=a)l.push(o[c]);return n+=l.length,l}),stride:a,total:e,kept:n}}function lo(u,t,e){let s=e&&e.maxRows!=null?e.maxRows:ad,i=nd(t.map(n=>n.rows),s);i.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${i.total} rows to ${i.kept} (every ${i.stride}${i.stride===2?"nd":i.stride===3?"rd":"th"} row) to stay under maxRows=${s}. Raise maxRows to draw more.`);let a=u.globals&&u.globals.colors||[];return t.map((n,r)=>{let o=a[n.realIndex]||a[0];return{name:n.name,data:i.clusters[r].map((l,c)=>G({id:`${n.realIndex}:${r}:${c}`,x:n.name,y:l},o?{fillColor:o}:{}))}})}function rd(u,t){let e=u.globals,s=u.histogramData,i=e&&e.histogramRawSeries;if(!s||!Array.isArray(s.edges)||s.edges.length<2||!Array.isArray(i)||!i.length)return null;let a=e&&e.collapsedSeriesIndices||[],n=s.edges,r=[];return i.forEach((o,l)=>{var c;if(a.indexOf(l)!==-1)return;let h=Kh(ro(o&&o.data),n),d=u.seriesData&&((c=u.seriesData.seriesNames)==null?void 0:c[l])||o?.name;h.forEach((f,g)=>{let p=`${fr(n[g])}-${fr(n[g+1])}`;r.push({name:i.length>1&&d?`${d} ${p}`:p,realIndex:l,rows:f})})}),r.length?lo(u,r,t):null}function fr(u){if(!isFinite(u))return String(u);let t=Math.round(u);return Math.abs(u-t)<1e-6?String(t):String(Number(u.toFixed(2)))}function co(u){return(t,e)=>{var s;let i=u(t);if(!Array.isArray(i)||!i.length)return null;let a=t.globals&&t.globals.collapsedSeriesIndices||[],n=t.globals&&((s=t.globals.categoryLabels)!=null&&s.length?t.globals.categoryLabels:t.globals.labels)||[],r=[];return i.forEach((o,l)=>{var c;if(a.indexOf(l)!==-1||!Array.isArray(o))return;let h=t.seriesData&&((c=t.seriesData.seriesNames)==null?void 0:c[l]);o.forEach((d,f)=>{let g=n[f]!=null?String(n[f]):`#${f+1}`;r.push({name:i.length>1&&h?`${h} ${g}`:g,realIndex:l,rows:Array.isArray(d)?d.slice():[]})})}),r.length?lo(t,r,e):null}}var od=co(u=>{var t;return(t=u.candleData)==null?void 0:t.seriesBoxPoints}),ld=co(u=>{var t;return(t=u.violinData)==null?void 0:t.seriesViolinPoints});Ga("histogram",ed);Ga("boxPlot",sd);Ga("violin",id);Es("histogram",rd);Es("boxPlot",od);Es("violin",ld);var _a=class{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){let{x:e,y:s,y1:i,y2:a,i:n,j:r,realIndex:o,columnGroupIndex:l,series:c,barHeight:h,barWidth:d,barXPosition:f,barYPosition:g,visibleSeries:p}=t,m=this.w,b=new B(this.barCtx.w),x=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[o]:this.barCtx.strokeWidth,_,w;m.axisFlags.isXNumeric&&!m.globals.isBarHorizontal?(_=e+d*(p+1),w=s+h*(p+1)-x):(_=e+d*p,w=s+h*p);let y=null,v=null,A=e,S=s,C={},M=m.config.dataLabels,k=this.barCtx.barOptions.dataLabels,L=this.barCtx.barOptions.dataLabels.total;typeof g<"u"&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(w=g,S=g),typeof f<"u"&&this.barCtx.isVerticalGroupedRangeBar&&(_=f,A=f);let E=Bt(M.offsetX,m,o,r),D=Bt(M.offsetY,m,o,r),P={width:0,height:0};if(m.config.dataLabels.enabled){let R=m.seriesData.series[o][r];P=b.getTextRects(m.config.dataLabels.formatter?m.config.dataLabels.formatter(R,j(G({},m),{seriesIndex:o,dataPointIndex:r,w:m})):m.formatters.yLabelFormatters[0](R),parseFloat(M.style.fontSize).toString())}let F={x:e,y:s,i:n,j:r,realIndex:o,columnGroupIndex:l,bcx:_,bcy:w,barHeight:h,barWidth:d,textRects:P,strokeWidth:x,dataLabelsX:A,dataLabelsY:S,dataLabelsConfig:M,barDataLabelsConfig:k,barTotalDataLabelsConfig:L,offX:E,offY:D};return this.barCtx.isHorizontal?C=this.calculateBarsDataLabelsPosition(F):C=this.calculateColumnsDataLabelsPosition(F),y=this.drawCalculatedDataLabels({x:C.dataLabelsX,y:C.dataLabelsY,val:this.barCtx.isRangeBar?[i,a]:m.config.chart.stackType==="100%"?c[o][r]:m.seriesData.series[o][r],i:o,j:r,barWidth:d,barHeight:h,textRects:P,dataLabelsConfig:M}),m.config.chart.stacked&&L.enabled&&(v=this.drawTotalDataLabels({x:C.totalDataLabelsX,y:C.totalDataLabelsY,barWidth:d,barHeight:h,realIndex:o,textAnchor:C.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:o,j:r}),dataLabelsConfig:M,barTotalDataLabelsConfig:L})),{dataLabelsPos:C,dataLabels:y,totalDataLabels:v}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;let e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){let e=this.barCtx.lastActiveBarSerieIndexByGroup,s=this.getTotalGroupContext(t);return s&&e&&e.length>s.groupIndex?e[s.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalDataLabel({realIndex:t,j:e}){let s=this.w,i=this.getTotalGroupContext(t),a=s.seriesData.stackedSeriesTotalsByGroups,n=i&&a&&a[i.groupIndex]?a[i.groupIndex][e]:this.barCtx.stackedSeriesTotals[e];return this.totalFormatter&&(n=this.totalFormatter(n,j(G({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),n}calculateColumnsDataLabelsPosition(t){let e=this.w,{i:s,j:i,realIndex:a,y:n,bcx:r,barWidth:o,barHeight:l,textRects:c,dataLabelsX:h,dataLabelsY:d,dataLabelsConfig:f,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,strokeWidth:m,offX:b,offY:x}=t,_,w,y="middle",v=r;l=Math.abs(l);let A=e.config.plotOptions.bar.dataLabels.orientation==="vertical",{zeroEncounters:S}=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:i});r=r-m/2;let C=e.layout.gridWidth/e.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?h+=o/2:(e.axisFlags.isXNumeric?h=r-o/2+b:h=r-C+o/2+b,!e.config.chart.stacked&&S>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(h-=o*S)),A&&(h=h+c.height/2-m/2-2);let M=e.seriesData.series[s][i]<0,k=n;switch(this.barCtx.isReversed&&(k=n+(M?l:-l)),g.position){case"center":A?M?d=k-l/2+x:d=k+l/2-x:M?d=k-l/2+c.height/2+x:d=k+l/2+c.height/2-x;break;case"bottom":A?M?d=k-l+x:d=k+l-x:M?d=k-l+c.height+m+x:d=k+l-c.height/2+m-x;break;case"top":A?M?d=k+x:d=k-x:M?d=k-c.height/2-x:d=k+c.height+x;break}let L=k,E=this.getTotalGroupContext(a);if((E?[E.group]:e.labelData.seriesGroups).forEach(P=>{var F;(F=this.barCtx[P.join(",")])==null||F.prevY.forEach(R=>{M?L=Math.max(R[i],L):L=Math.min(R[i],L)})}),this.drawsStackedTotal(a)&&p.enabled){let R=new B(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),f.fontSize);M?_=L-R.height/2-x-p.offsetY+18:_=L+R.height+x+p.offsetY-18;let N=C;w=v+(e.axisFlags.isXNumeric?-o/2:o/2-N)+p.offsetX}return e.config.chart.stacked||(d<0?d=0+m:d+c.height/3>e.layout.gridHeight&&(d=e.layout.gridHeight-m)),{bcx:r,bcy:n,dataLabelsX:h,dataLabelsY:d,totalDataLabelsX:w,totalDataLabelsY:_,totalDataLabelsAnchor:y}}calculateBarsDataLabelsPosition(t){var e;let s=this.w,{x:i,i:a,j:n,realIndex:r,bcy:o,barHeight:l,barWidth:c,textRects:h,dataLabelsX:d,strokeWidth:f,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,offX:b,offY:x}=t,_=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:w}=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:n});c=Math.abs(c);let y;if(this.barCtx.isPyramid){let D=(e=h.centerOffset)!=null?e:0;y=o+l/2+x-D}else y=o-(this.barCtx.isRangeBar?0:_)+l/2+h.height/2+x-3;!s.config.chart.stacked&&w>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=l*w);let v,A,S="start",C=s.seriesData.series[a][n]<0,M=i;if(this.barCtx.isReversed&&(M=i+(C?-c:c),S=C?"start":"end"),this.barCtx.isPyramid)d=s.layout.gridWidth/2+b;else switch(p.position){case"center":C?d=M+c/2-b:d=Math.max(h.width/2,M-c/2)+b;break;case"bottom":C?d=M+c-f-b:d=M-c+f+b;break;case"top":C?d=M-f-b:d=M-f+b;break}let k=M,L=this.getTotalGroupContext(r);if((L?[L.group]:s.labelData.seriesGroups).forEach(D=>{var P;(P=this.barCtx[D.join(",")])==null||P.prevX.forEach(F=>{C?k=Math.min(F[n],k):k=Math.max(F[n],k)})}),this.drawsStackedTotal(r)&&m.enabled){let P=new B(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:n}),g.fontSize);C?(v=k-f-b-m.offsetX,S="end"):v=k+b+m.offsetX+(this.barCtx.isReversed?-(c+f):f),A=y-h.height/2+P.height/2+m.offsetY+f,s.globals.barGroups.length>1&&!L&&(A=A-s.globals.barGroups.length/2*(l/2))}return s.config.chart.stacked||(g.textAnchor==="start"?d-h.width<0?d=C?h.width+f-b:f+b:d+h.width>s.layout.gridWidth&&(d=C?s.layout.gridWidth-f:s.layout.gridWidth-h.width-f):g.textAnchor==="middle"?d-h.width/2<0?d=h.width/2+f:d+h.width/2>s.layout.gridWidth&&(d=s.layout.gridWidth-h.width/2-f):g.textAnchor==="end"&&(d<1?d=h.width+f:d+1>s.layout.gridWidth&&(d=s.layout.gridWidth-h.width-f))),{bcx:i,bcy:o,dataLabelsX:d,dataLabelsY:y,totalDataLabelsX:v,totalDataLabelsY:A,totalDataLabelsAnchor:S}}drawCalculatedDataLabels({x:t,y:e,val:s,i,j:a,textRects:n,barHeight:r,barWidth:o,dataLabelsConfig:l}){var c,h;let d=this.w,f="rotate(0)";d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(f=`rotate(-90, ${t}, ${e})`);let g=new Et(this.barCtx.w,this.barCtx.ctx),p=new B(this.barCtx.w),m=l.formatter,b=null,x=d.globals.collapsedSeriesIndices.indexOf(i)>-1;if(l.enabled&&!x){b=p.group({class:"apexcharts-data-labels",transform:f});let _=d.config.dataLabels;((c=_.animate)!=null&&c.enabled||(h=_.countUp)!=null&&h.enabled)&&(b.node.setAttribute("data:dlKey",`${i}::${fe(d,i,a)}`),b.node.setAttribute("data:dlJ",String(a)),typeof s=="number"&&isFinite(s)&&b.node.setAttribute("data:dlVal",String(s)));let w="";typeof s<"u"&&(w=m(s,j(G({},d),{seriesIndex:i,dataPointIndex:a,w:d}))),!s&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(w="");let y=d.seriesData.series[i][a]<0,v=d.config.plotOptions.bar.dataLabels.position;if(d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(v==="top"&&(y?l.textAnchor="end":l.textAnchor="start"),v==="center"&&(l.textAnchor="middle"),v==="bottom"&&(y?l.textAnchor="end":l.textAnchor="start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){let S=p.getTextRects(w,parseFloat(l.style.fontSize).toString());o<S.width&&(w="")}d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?n.width/1.6>Math.abs(o)&&(w=""):n.height/1.6>Math.abs(r)&&(w=""));let A=G({},l);this.barCtx.isHorizontal&&s<0&&(l.textAnchor==="start"?A.textAnchor="end":l.textAnchor==="end"&&(A.textAnchor="start")),g.plotDataLabelsText({x:t,y:e,text:w,i,j:a,parent:b,dataLabelsConfig:A,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return b}drawTotalDataLabels({x:t,y:e,val:s,realIndex:i,textAnchor:a,barTotalDataLabelsConfig:n}){let r=new B(this.barCtx.w),o;return n.enabled&&typeof t<"u"&&typeof e<"u"&&this.drawsStackedTotal(i)&&(o=r.drawText({x:t,y:e,foreColor:n.style.color,text:s,textAnchor:a,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}};function ho(u){var t,e,s,i,a,n,r;return((e=(t=u?.config)==null?void 0:t.chart)==null?void 0:e.requestedType)!=="histogram"||((i=(s=u.config.plotOptions)==null?void 0:s.histogram)==null?void 0:i.overlap)===!1?!1:((r=(n=(a=u.seriesData)==null?void 0:a.series)==null?void 0:n.length)!=null?r:0)>1}var cd=class{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){let e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let i=0;i<t[s].length;i++)e.seriesData.seriesX[s][i]>e.globals.minX&&e.seriesData.seriesX[s][i]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),T.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(s=>s.map(i=>"none"))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1)}initialPositions(t){let e=this.w,s,i,a,n,r,o,l,c,h=e.globals.dataPoints;this.barCtx.isRangeBar&&(h=e.labelData.labels.length);let d=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||ho(e))&&(d=1),this.barCtx.isHorizontal)a=e.layout.gridHeight/h,r=a/d,e.axisFlags.isXNumeric&&(a=e.layout.gridHeight/this.barCtx.totalItems,r=a/this.barCtx.seriesLen),r=r*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.barHeight,10)),c=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?this.barCtx.baseLineInvertedY*2:0),this.barCtx.isFunnel&&(c=e.layout.gridWidth/2),i=(a-r*this.barCtx.seriesLen)/2;else{if(n=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(n=e.layout.gridWidth/e.globals.dataPoints),o=n/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){let f=this.barCtx.xRatio;e.globals.minXDiff&&e.globals.minXDiff!==.5&&e.globals.minXDiff/f>0&&(n=e.globals.minXDiff/f),o=n/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,o<1&&(o=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?this.barCtx.baseLineY[this.barCtx.translationsIndex]*2:0),e.axisFlags.isXNumeric?s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:o}).x:s=e.globals.padHorizontal+T.noExponents(n-o*this.barCtx.seriesLen)/2}return e.globals.barHeight=r,e.globals.barWidth=o,{x:s,y:i,yDivision:a,xDivision:n,barHeight:r,barWidth:o,zeroH:l,zeroW:c}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(s=>{t[s]||(t[s]={}),t[s].prevY=[],t[s].prevX=[],t[s].prevYF=[],t[s].prevXF=[],t[s].prevYVal=[],t[s].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(s=>{t[s]||(t[s]={}),t[s].xArrj=[],t[s].xArrjF=[],t[s].xArrjVal=[],t[s].yArrj=[],t[s].yArrjF=[],t[s].yArrjVal=[]})}getPathFillColor(t,e,s,i){var a,n,r,o;let l=this.w,c=new pt(this.barCtx.w),h=null,d=this.barCtx.barOptions.distributed?s:e,f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(m=>{t[e][s]>=m.from&&t[e][s]<=m.to&&(h=m.color,f=!0)}),{color:c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:i,dataPointIndex:s,color:h,value:t[e][s],fillConfig:(a=l.config.series[e].data[s])==null?void 0:a.fill,fillType:(r=(n=l.config.series[e].data[s])==null?void 0:n.fill)!=null&&r.type?(o=l.config.series[e].data[s])==null?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type}),useRangeColor:f}}getStrokeWidth(t,e,s){let i=0,a=this.w;return typeof this.barCtx.series[t][e]>"u"||this.barCtx.series[t][e]===null||a.config.chart.type==="bar"&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,a.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),i}createBorderRadiusArr(t){var e;let s=this.w,i=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,a=t.length,n=((e=t[0])==null?void 0:e.length)|0,r=Array.from({length:a},()=>Array(n).fill(i?"top":"none"));if(i)return r;let o=this.w.config.chart.type;for(let l=0;l<n;l++){let c=[],h=[],d=0;for(let f=0;f<a;f++){let g=t[f][l];g>0?(c.push(f),d++):g<0&&(h.push(f),d++)}if(c.length>0&&h.length===0)if(c.length===1)r[c[0]][l]=o==="bar"&&n===1?"top":"both";else{let f=c[0],g=c[c.length-1];for(let p of c)p===f?r[p][l]=o==="bar"&&n===1?"top":"bottom":p===g?r[p][l]="top":r[p][l]="none"}else if(h.length>0&&c.length===0)if(h.length===1)r[h[0]][l]="both";else{let f=Math.max(...h),g=Math.min(...h);for(let p of h)p===f?r[p][l]="bottom":p===g?r[p][l]="top":r[p][l]="none"}else if(c.length>0&&h.length>0){let f=c[c.length-1];for(let p of c)p===f?r[p][l]="top":r[p][l]="none";let g=Math.max(...h);for(let p of h)p===g?r[p][l]="bottom":r[p][l]="none"}else if(d===1){let f=c[0]||h[0];r[f][l]="both"}}return r}barBackground({j:t,i:e,x1:s,x2:i,y1:a,y2:n,elSeries:r}){let o=this.w,l=new B(this.barCtx.w),h=new ct(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);let d=this.barCtx.barOptions.colors.backgroundBarColors[t],f=l.drawRect(typeof s<"u"?s:0,typeof a<"u"?a:0,typeof i<"u"?i:o.layout.gridWidth,typeof n<"u"?n:o.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);r.add(f),f.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:i,strokeWidth:a,isReversed:n,series:r,seriesGroup:o,realIndex:l,i:c,j:h,w:d}){var f,g,p;let m=new B(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let b=t,x=e;(f=d.config.series[l].data[h])!=null&&f.columnWidthOffset&&(x=e-d.config.series[l].data[h].columnWidthOffset/2,b=t+d.config.series[l].data[h].columnWidthOffset);let _=a/2,w=x+_,y=x+b-_,v=(r[c][h]>=0?1:-1)*(n?-1:1);s+=.001-_*v,i+=.001+_*v;let A=m.line(y,s),S=d.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z",C=m.move(w,s)+m.line(w,i)+m.line(y,i)+A+S;this.arrBorderRadius[l][h]!=="none"&&(C=m.roundPathCorners(C,d.config.plotOptions.bar.borderRadius));let M=null,k=(p=(g=this.barCtx.ctx)==null?void 0:g.morphTypeChange)==null?void 0:p.getInitialPathFor(l,h);if(k?M=k:d.globals.previousPaths.length>0&&(M=this.barCtx.getPreviousPath(l,h,C)),M==null&&(M=m.move(w,s)+m.line(w,s)+A+A+A+A+A+m.line(w,s)+S),d.config.chart.stacked){let L=this.barCtx;L=this.barCtx[o],L.yArrj.push(i-_*v),L.yArrjF.push(Math.abs(s-i+a*v)),L.yArrjVal.push(this.barCtx.series[c][h])}return{pathTo:C,pathFrom:M}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i,j:a,realIndex:n,strokeWidth:r,w:o}){var l,c;let h=new B(this.barCtx.w),d=o.layout.gridWidth/2,f=E=>Math.abs(E/this.barCtx.invertedYRatio)/2,g=f(s[i][a]),p=s[i].length-1,m=a===p,b=o.config.plotOptions.funnel.lastShape==="taper"?"taper":"flat",x;m?x=b==="taper"?0:g:x=f(s[i][a+1]);let _=r/2,w=t+_,y=t+e-_,v=d-g,A=d+g,S=d-x,C=d+x,M=h.move(v,w)+h.line(A,w)+h.line(C,y)+h.line(S,y)+" Z",k=null,L=(c=(l=this.barCtx.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.getInitialPathFor(n,a);return L?k=L:o.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(n,a,M)),k==null&&(k=h.move(d,w)+h.line(d,w)+h.line(d,y)+h.line(d,y)+" Z"),{pathTo:M,pathFrom:k,x:A,x1:v,barXPosition:d}}computePyramidLayout(t){let e=this.w,s=e.layout.gridHeight,i=e.layout.gridWidth,a=t.map(c=>Math.abs(Number(c)||0)),n=a.reduce((c,h)=>c+h,0);if(n===0||s<=0)return a.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));let r=i/2,o=0,l=[];for(let c=0;c<a.length;c++){let h=o/n;o+=a[c];let d=o/n,f=h*s,g=d*s;l.push({y:f,height:g-f,topHalf:h*r,bottomHalf:d*r})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:i,realIndex:a,j:n,strokeWidth:r,w:o}){var l,c;let h=new B(this.barCtx.w),d=o.layout.gridWidth/2,f=r/2,g=t+f,p=t+e-f,m=d-s,b=d+s,x=d-i,_=d+i,w=h.move(m,g)+h.line(b,g)+h.line(_,p)+h.line(x,p)+" Z",y=null,v=(c=(l=this.barCtx.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.getInitialPathFor(a,n);return v?y=v:o.globals.previousPaths.length>0&&(y=this.barCtx.getPreviousPath(a,n,w)),y==null&&(y=h.move(d,g)+h.line(d,g)+h.line(d,p)+h.line(d,p)+" Z"),{pathTo:w,pathFrom:y,x:b,x1:m,barXPosition:d}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:i,strokeWidth:a,isReversed:n,series:r,seriesGroup:o,realIndex:l,i:c,j:h,w:d}){var f,g,p;let m=new B(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let b=t,x=e;(f=d.config.series[l].data[h])!=null&&f.barHeightOffset&&(b=t-d.config.series[l].data[h].barHeightOffset/2,x=e+d.config.series[l].data[h].barHeightOffset);let _=a/2,w=b+_,y=b+x-_,v=(r[c][h]>=0?1:-1)*(n?-1:1);s+=.001+_*v,i+=.001-_*v;let A=this.barCtx.isFunnel,S=A?(s+i)/2:s,C=m.line(s,y),M=d.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z",k=m.move(s,w)+m.line(i,w)+m.line(i,y)+C+M;this.arrBorderRadius[l][h]!=="none"&&(k=m.roundPathCorners(k,d.config.plotOptions.bar.borderRadius));let L=null,E=(p=(g=this.barCtx.ctx)==null?void 0:g.morphTypeChange)==null?void 0:p.getInitialPathFor(l,h);if(E?L=E:d.globals.previousPaths.length>0&&(L=this.barCtx.getPreviousPath(l,h,k)),L==null){let D=A?m.line(S,y):C;L=m.move(S,w)+m.line(S,w)+D+D+D+D+D+m.line(S,w)+M}if(d.config.chart.stacked){let D=this.barCtx;D=this.barCtx[o],D.xArrj.push(i+_*v),D.xArrjF.push(Math.abs(s-i-a*v)),D.xArrjVal.push(this.barCtx.series[c][h])}return{pathTo:k,pathFrom:L}}getXForValue(t,e,s=!0){let i=s?e:null;return typeof t<"u"&&t!==null&&(i=e+t/this.barCtx.invertedYRatio-(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)*2),i}getYForValue(t,e,s,i=!0){let a=i?e:null;return typeof t<"u"&&t!==null&&(a=e-t/this.barCtx.yRatio[s]+(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)*2),a}getGoalValues(t,e,s,i,a,n){let r=this.w,o=[],l=(c,h)=>{o.push({[t]:t==="x"?this.getXForValue(c,e,!1):this.getYForValue(c,s,n,!1),attrs:h})};if(r.seriesData.seriesGoals[i]&&r.seriesData.seriesGoals[i][a]&&Array.isArray(r.seriesData.seriesGoals[i][a])&&r.seriesData.seriesGoals[i][a].forEach(c=>{l(c.value,c)}),this.barCtx.barOptions.isDumbbell&&r.rangeData.seriesRange.length){let c=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:r.globals.colors,h={strokeHeight:t==="x"?0:r.globals.markers.size[i],strokeWidth:t==="x"?r.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(c[i])?c[i][0]:c[i]};l(r.rangeData.seriesRangeStart[i][a],h),l(r.rangeData.seriesRangeEnd[i][a],j(G({},h),{strokeColor:Array.isArray(c[i])?c[i][1]:c[i]}))}return o}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:i,barWidth:a,barHeight:n}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(i)&&i.length>0))return null;let o=new B(this.barCtx.w),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let c=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(h=>{if(h.x>=-1&&h.x<=o.w.layout.gridWidth+1){let d=typeof h.attrs.strokeHeight<"u"?h.attrs.strokeHeight:n/2,f=e+d+n/2;c=o.drawLine(h.x,f-d*2,h.x,f,h.attrs.strokeColor?h.attrs.strokeColor:void 0,h.attrs.strokeDashArray,h.attrs.strokeWidth?h.attrs.strokeWidth:2,h.attrs.strokeLineCap),l.add(c)}}):Array.isArray(i)&&i.forEach(h=>{if(h.y>=-1&&h.y<=o.w.layout.gridHeight+1){let d=typeof h.attrs.strokeWidth<"u"?h.attrs.strokeWidth:a/2,f=t+d+a/2;c=o.drawLine(f-d*2,h.y,f,h.y,h.attrs.strokeColor?h.attrs.strokeColor:void 0,h.attrs.strokeDashArray,h.attrs.strokeHeight?h.attrs.strokeHeight:2,h.attrs.strokeLineCap),l.add(c)}}),l}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:i,j:a}){let n=this.w,{x:r,x1:o,barYPosition:l}=t,{x:c,x1:h,barYPosition:d}=e,f=l+e.barHeight,g=new B(this.barCtx.w),p=new T,m=g.move(o,f)+g.line(r,f)+g.line(c,d)+g.line(h,d)+g.line(o,f)+(n.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[i][a]==="both"?" Z":" z");return g.drawPath({d:m,fill:p.shadeColor(.5,T.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;let i=this.w,a=0,n=0;return(i.config.plotOptions.bar.horizontal?i.seriesData.series.map((o,l)=>l):((s=i.globals.columnSeries)==null?void 0:s.i.map(o=>o))||[]).forEach(o=>{let l=i.globals.seriesPercent[o][e];l&&a++,o<t&&l===0&&n++}),{nonZeroColumns:a,zeroEncounters:n}}getSeriesGroupIndex(t){let e=this.w;return e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1)}getGroupIndex(t){let e=this.w,s=e.labelData.seriesGroups.findIndex(n=>n.indexOf(e.seriesData.seriesNames[t])>-1),i=this.barCtx.columnGroupIndices,a=i.indexOf(s);return a<0&&(i.push(s),a=i.length-1),{groupIndex:s,columnGroupIndex:a}}},Pt=class u{constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,this.xyRatios!==null&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;let i=new ct(this.w);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=i.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];let a=i.getBarSeriesIndices(),n=new lt(this.w);this.stackedSeriesTotals=n.getStackedSeriesTotals(this.w.config.series.map((r,o)=>a.indexOf(o)===-1?o:-1).filter(r=>r!==-1)),this.barHelpers=new cd(this)}draw(t,e){var s,i,a;let n=this.w,r=new B(this.w),o=new lt(this.w);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);let l=r.group({class:"apexcharts-bar-series apexcharts-plot-series"});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(let c=0,h=0;c<t.length;c++,h++){let d,f,g=[],p=[],m=n.globals.comboCharts?e[c]:c,{columnGroupIndex:b}=this.barHelpers.getGroupIndex(m),x=r.group({class:"apexcharts-series",rel:c+1,seriesName:T.escapeString(n.seriesData.seriesNames[m]),"data:realIndex":m});ct.addCollapsedClassToSeries(this.w,x,m),t[c].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[m],this.translationsIndex=m);let _=this.translationsIndex;this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[c]));let w=this.barHelpers.initialPositions(m),{y,yDivision:v,zeroW:A,x:S,xDivision:C,zeroH:M}=w,k=w.barHeight,L=w.barWidth;f=y,d=S,this.isHorizontal||p.push(d+(L??0)/2);let E=r.group({class:"apexcharts-datalabels","data:realIndex":m});n.globals.delayedElements.push({el:E.node,holdUntilComplete:!((s=n.config.dataLabels.animate)!=null&&s.enabled)&&this.isLengthTransition(m)}),E.node.classList.add("apexcharts-element-hidden");let D=r.group({class:"apexcharts-bar-goals-markers"}),P=r.group({class:"apexcharts-bar-shadows"});n.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");for(let F=0;F<t[c].length;F++){let R=this.barHelpers.getStrokeWidth(c,F,m),N=null,z={indexes:{i:c,j:F,realIndex:m,translationsIndex:_,bc:h},x:d,y:f,strokeWidth:R,elSeries:x};this.isHorizontal?(N=this.drawBarPaths(j(G({},z),{barHeight:k,zeroW:A,yDivision:v})),L=this.series[c][F]/this.invertedYRatio):(N=this.drawColumnPaths(j(G({},z),{xDivision:C,barWidth:L,zeroH:M})),k=this.series[c][F]/this.yRatio[_]);let $=this.barHelpers.getPathFillColor(t,c,F,m);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&((i=n.config.plotOptions.funnel)==null?void 0:i.shape)!=="trapezoid"&&this.pathArr.length&&F>0){let Y=this.barHelpers.drawBarShadow({color:typeof $.color=="string"&&((a=$.color)==null?void 0:a.indexOf("url"))===-1?$.color:T.hexToRgba(n.globals.colors[c]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:N,realIndex:m,j:F});P.add(Y),n.config.chart.dropShadow.enabled&&new at(this.w).dropShadow(Y,n.config.chart.dropShadow,m)}this.pathArr.push(N);let W=this.barHelpers.drawGoalLine({barXPosition:N.barXPosition,barYPosition:N.barYPosition,goalX:N.goalX,goalY:N.goalY,barHeight:k,barWidth:L});W&&D.add(W),f=N.y,d=N.x,F>0&&p.push(d+(L??0)/2),g.push(f),this.renderSeries(j(G({realIndex:m,pathFill:$.color},$.useRangeColor?{lineFill:$.color}:{}),{j:F,i:c,columnGroupIndex:b,pathFrom:N.pathFrom,pathTo:N.pathTo,strokeWidth:R,elSeries:x,x:d,y:f,series:t,barHeight:Math.abs(N.barHeight?N.barHeight:k),barWidth:Math.abs(N.barWidth?N.barWidth:L),elDataLabelsWrap:E,elGoalsMarkers:D,elBarShadows:P,visibleSeries:this.visibleI,type:"bar"}))}if(n.globals.seriesXvalues[m]=p,n.globals.seriesYvalues[m]=g,n.globals.previousPaths.length>0){let F=[];for(let R=0;R<t[c].length;R++)F.push(fe(n,m,R));Rl({w:n,elSeries:x,record:this._prevRecord(m),newKeys:F,isHorizontal:this.isHorizontal,speed:n.config.chart.animations.dynamicAnimation.speed})}l.add(x)}return l}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:i,i:a,columnGroupIndex:n,pathFrom:r,pathTo:o,strokeWidth:l,elSeries:c,x:h,y:d,y1:f,y2:g,series:p,barHeight:m,barWidth:b,barXPosition:x,barYPosition:_,elDataLabelsWrap:w,elGoalsMarkers:y,elBarShadows:v,visibleSeries:A,type:S,classes:C}){var M;let k=this.w,L=new B(this.w,this.ctx),E=ae(this.ctx,L),D=!1;if(c._bindingsDelegated||(c._bindingsDelegated=!0,L.setupEventDelegation(c,`.apexcharts-${S}-area`)),!s){let W=function(I){let U=k.config.stroke.colors,X;return Array.isArray(U)&&U.length>0&&(X=U[I],X||(X=""),typeof X=="function")?X({value:k.seriesData.series[I][i],dataPointIndex:i,w:k}):X},Y=typeof k.globals.stroke.colors[t]=="function"?W(t):k.globals.stroke.colors[t];s=this.barOptions.distributed?k.globals.stroke.colors[i]:Y}let F=new _a(this).handleBarDataLabels({x:h,y:d,y1:f,y2:g,i:a,j:i,series:p,realIndex:t,columnGroupIndex:n,barHeight:m,barWidth:b,barXPosition:x,barYPosition:_,visibleSeries:A});k.globals.isBarHorizontal||(F.dataLabelsPos.dataLabelsX+Math.max(b,k.globals.barPadForNumericAxis)<0||F.dataLabelsPos.dataLabelsX-Math.max(b,k.globals.barPadForNumericAxis)>k.layout.gridWidth)&&(D=!0),k.config.series[a].data[i]&&k.config.series[a].data[i].strokeColor&&(s=k.config.series[a].data[i].strokeColor),this.isNullValue&&(e="none");let R=k.config.chart.animations,N=R.animateGradually,z=N&&N.enabled!==!1&&!(k.globals.dataChanged&&this.isLayoutShift(t)),$=0;if(z){let W=k.globals.dataPoints||1,Y=N.delay||0,I=Math.min(Y,R.speed*.5/Math.max(1,W)),U=Ya({style:"sequential",index:i,baseDelay:I});k.config.chart.stacked&&(U+=a*I*.5),$=U/(Y||1)}if(!D){let W=((M=this.ctx.morphTypeChange)==null?void 0:M.isActive())===!0,Y=W?this.ctx.morphTypeChange.getSpeed():k.config.chart.animations.dynamicAnimation.speed,I=W&&this.ctx.morphTypeChange.claimsTargetMark(t,i);I&&(r=o,$=0);let U=E.renderPaths({i:a,j:i,realIndex:t,pathFrom:r,pathTo:o,stroke:s,strokeWidth:l,strokeLineCap:k.config.stroke.lineCap,fill:e,animationDelay:$,initialSpeed:k.config.chart.animations.speed,dataChangeSpeed:Y,className:`apexcharts-${S}-area${C?` ${C}`:""}`,chartType:S,bindEventsOnPaths:!1});U.attr("clip-path",`url(#gridRectBarMask${k.globals.cuid})`),I&&(U.node.setAttribute("opacity","0"),U.node.setAttribute("data-piece-hidden","1"));let X=k.config.forecastDataPoints;X.count>0&&i>=k.globals.dataPoints-X.count&&(U.node.setAttribute("stroke-dasharray",X.dashArray),U.node.setAttribute("stroke-width",X.strokeWidth),U.node.setAttribute("fill-opacity",X.fillOpacity)),typeof f<"u"&&typeof g<"u"&&(U.attr("data-range-y1",f),U.attr("data-range-y2",g)),new at(this.w).setSelectionFilter(U,t,i),c.add(U),U.attr({cy:F.dataLabelsPos.bcy,cx:F.dataLabelsPos.bcx,j:i,val:k.seriesData.series[a][i],barHeight:m,barWidth:b,"data:pathKey":fe(k,t,i)}),E.kind==="canvas"&&(k.globals.barCanvasCoords||(k.globals.barCanvasCoords={}),k.globals.barCanvasCoords[t]||(k.globals.barCanvasCoords[t]={}),k.globals.barCanvasCoords[t][i]={cx:F.dataLabelsPos.bcx,cy:F.dataLabelsPos.bcy,barWidth:b}),F.dataLabels!==null&&w.add(F.dataLabels),F.totalDataLabels&&w.add(F.totalDataLabels),c.add(w),y&&c.add(y),v&&c.add(v)}return c}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:n,yDivision:r,elSeries:o}){let l=this.w,c=t.i,h=t.j,d;if(l.axisFlags.isXNumeric)n=(l.seriesData.seriesX[c][h]-l.globals.minX)/this.invertedXRatio-e,d=n+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:b,zeroEncounters:x}=this.barHelpers.getZeroValueEncounters({i:c,j:h});b>0&&(e=this.seriesLen*e/b),d=n+e*this.visibleI,d-=e*x}else d=n+e*this.visibleI;let f=this.isFunnel&&l.config.plotOptions.funnel.shape==="trapezoid",g=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[h]:null,p=!!g;if(g)d=g.y,e=g.height;else if(this.isFunnel&&!f){let b=i??0;i=b-(this.barHelpers.getXForValue(this.series[c][h],b)-b)/2}a=this.barHelpers.getXForValue(this.series[c][h],i??0);let m;return g?m=this.barHelpers.getPyramidPaths({barYPosition:d,barHeight:e,topHalf:g.topHalf,bottomHalf:g.bottomHalf,realIndex:t.realIndex,j:h,strokeWidth:s,w:l}):f?m=this.barHelpers.getFunnelTrapezoidPaths({barYPosition:d,barHeight:e,series:this.series,i:c,j:h,realIndex:t.realIndex,strokeWidth:s,w:l}):m=this.barHelpers.getBarpaths({barYPosition:d,barHeight:e,x1:i,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:c,j:h,w:l}),(f||p)&&(i=m.x1,a=m.x),!l.axisFlags.isXNumeric&&!p&&(n=n+r),p&&(n=d),this.barHelpers.barBackground({j:h,i:c,y1:d-e*this.visibleI,y2:e*this.seriesLen,elSeries:o}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x1:i,x:a,y:n,goalX:this.barHelpers.getGoalValues("x",i,null,t.realIndex,h,0),barYPosition:d,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:n,strokeWidth:r,elSeries:o}){let l=this.w,c=t.realIndex,h=t.translationsIndex,d=t.i,f=t.j,g=t.bc,p;if(l.axisFlags.isXNumeric){let b=this.getBarXForNumericXAxis({x:e,j:f,realIndex:c,barWidth:a});e=b.x,p=b.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:b,zeroEncounters:x}=this.barHelpers.getZeroValueEncounters({i:d,j:f});b>0&&(a=this.seriesLen*a/b),p=e+a*this.visibleI,p-=a*x}else p=e+a*this.visibleI;s=this.barHelpers.getYForValue(this.series[d][f],n,h);let m=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:a,y1:n,y2:s,strokeWidth:r,isReversed:this.isReversed,series:this.series,realIndex:c,i:d,j:f,w:l});return l.axisFlags.isXNumeric||(e=e+i),this.barHelpers.barBackground({bc:g,j:f,i:d,x1:p-r/2-a*this.visibleI,x2:a*this.seriesLen+r/2,elSeries:o}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,n,c,f,h),barXPosition:p,barWidth:a}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:i}){let a=this.w,n=s;return a.seriesData.seriesX[s].length||(n=a.globals.maxValsInArrayIndex),T.isNumber(a.seriesData.seriesX[n][i])&&(t=_t.dataXToPx(a,a.seriesData.seriesX[n][i])-e*this.seriesLen/2),{barXPosition:t+(ho(a)?0:e*this.visibleI),x:t}}_prevRecord(t){let e=this.w,s=null;for(let i=0;i<e.globals.previousPaths.length;i++){let a=e.globals.previousPaths[i];a.paths&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(String(t),10)&&(s=a)}return s}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),this._prevKeyed[t]!==void 0)return this._prevKeyed[t];let e=this._prevRecord(t),s=null;if(e&&e.paths.every(i=>i.key!=null)){let i=new Map;e.paths.forEach(a=>{i.set(a.key,a)}),s=i}return this._prevKeyed[t]=s,s}isLengthTransition(t){var e,s;if(this._ltCache||(this._ltCache={}),this._ltCache[t]!==void 0)return this._ltCache[t];let i=this.w,a=!1;if(te(i)&&i.globals.previousPaths.length>0){let n=this._prevRecord(t),r=(s=(e=i.seriesData.series[t])==null?void 0:e.length)!=null?s:0;if(!n)a=r>0;else if(n.paths.length!==r)a=!0;else{let o=this._prevKeyedPaths(t);if(o){for(let l=0;l<r;l++)if(!o.has(fe(i,t,l))){a=!0;break}}}}return this._ltCache[t]=a,a}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),this._layoutShiftCache[t]!==void 0)return this._layoutShiftCache[t];let e=Ge(this.w,t,!0,!0),s=!!(e&&e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s){let i=this.w,a=this._prevRecord(t);if(!a)return te(i)?null:s;let n=null,r=!1,o=this._prevKeyedPaths(t);if(o){let l=o.get(fe(i,t,e));l?n=l.d:r=!0}else typeof a.paths[e]<"u"?n=a.paths[e].d:r=!0;return n&&u.pathCommandCount(n)===u.pathCommandCount(s)?n:r&&te(i)?null:s}static pathCommandCount(t){if(!t)return 0;let e=t.match(/[A-Za-z]/g);return e?e.length:0}},Aa=class extends Pt{draw(t,e){let s=this.w;this.graphics=new B(this.w),this.bar=new Pt(this.w,this.ctx,this.xyRatios);let i=new lt(this.w);t=i.getLogSeries(t),this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),s.config.chart.stackType==="100%"&&(t=s.globals.comboCharts?e.map(o=>s.globals.seriesPercent[o]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);let a=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,r=0;for(let o=0,l=0;o<t.length;o++,l++){let c=s.globals.comboCharts?e[o]:o,{groupIndex:h,columnGroupIndex:d}=this.barHelpers.getGroupIndex(c);this.groupCtx=this[s.labelData.seriesGroups[h]];let f=[],g=[],p=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[c][0],p=c),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let m=this.graphics.group({class:"apexcharts-series",seriesName:T.escapeString(s.seriesData.seriesNames[c]),rel:o+1,"data:realIndex":c});ct.addCollapsedClassToSeries(this.w,m,c);let b=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":c}),x=this.graphics.group({class:"apexcharts-bar-goals-markers"}),_=this.initialPositions(n,r,void 0,void 0,void 0,void 0,p),{xDivision:w,yDivision:y,zeroH:v,zeroW:A}=_,S=_.barHeight,C=_.barWidth;r=_.y,n=_.x,s.globals.barHeight=S,s.globals.barWidth=C,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(M=>isNaN(M))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>v),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let M=0;M<s.globals.dataPoints;M++){let k=this.barHelpers.getStrokeWidth(o,M,c),L={indexes:{i:o,j:M,realIndex:c,translationsIndex:p,bc:l},strokeWidth:k,x:n,y:r,elSeries:m,columnGroupIndex:d,seriesGroup:s.labelData.seriesGroups[h]},E=null;this.isHorizontal?(E=this.drawStackedBarPaths(j(G({},L),{zeroW:A,barHeight:S,yDivision:y})),C=this.series[o][M]/this.invertedYRatio):(E=this.drawStackedColumnPaths(j(G({},L),{xDivision:w,barWidth:C,zeroH:v})),S=this.series[o][M]/this.yRatio[p]);let D=this.barHelpers.drawGoalLine({barXPosition:E.barXPosition,barYPosition:E.barYPosition,goalX:E.goalX,goalY:E.goalY,barHeight:S,barWidth:C});D&&x.add(D),r=E.y,n=E.x,f.push(n),g.push(r);let P=this.barHelpers.getPathFillColor(t,o,M,c),F="",R=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(this.barHelpers.arrBorderRadius[c][M]==="bottom"&&s.seriesData.series[c][M]>0||this.barHelpers.arrBorderRadius[c][M]==="top"&&s.seriesData.series[c][M]<0)&&(F=R),m=this.renderSeries(j(G({realIndex:c,pathFill:P.color},P.useRangeColor?{lineFill:P.color}:{}),{j:M,i:o,columnGroupIndex:d,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:k,elSeries:m,x:n,y:r,series:t,barHeight:S,barWidth:C,elDataLabelsWrap:b,elGoalsMarkers:x,type:"bar",visibleSeries:d,classes:F}))}s.globals.seriesXvalues[c]=f,s.globals.seriesYvalues[c]=g,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),a.add(m)}return a}initialPositions(t,e,s,i,a,n,r){let o=this.w,l,c;if(this.isHorizontal){i=o.layout.gridHeight/o.globals.dataPoints;let d=o.config.plotOptions.bar.barHeight;String(d).indexOf("%")===-1?l=parseInt(d,10):l=i*parseInt(d,10)/100,n=o.globals.padHorizontal+(this.isReversed?o.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(i-l)/2}else{s=o.layout.gridWidth/o.globals.dataPoints,c=s;let d=o.config.plotOptions.bar.columnWidth;o.axisFlags.isXNumeric&&o.globals.dataPoints>1?(s=o.globals.minXDiff/this.xRatio,c=s*parseInt(this.barOptions.columnWidth,10)/100):String(d).indexOf("%")===-1?c=parseInt(d,10):c*=parseInt(d,10)/100,this.isReversed?a=this.baseLineY[r]:a=o.layout.gridHeight-this.baseLineY[r],t=o.globals.padHorizontal+(s-c)/2}let h=o.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:s,barHeight:(l??0)/h,barWidth:(c??0)/h,zeroH:a,zeroW:n}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:n,columnGroupIndex:r,seriesGroup:o,yDivision:l,elSeries:c}){var h,d,f,g,p;let m=this.w,b=n+r*e,x,_=t.i,w=t.j,y=t.realIndex,v=t.translationsIndex,A=0;for(let M=0;M<this.groupCtx.prevXF.length;M++)A=A+this.groupCtx.prevXF[M][w];let S=_;if(m.config.series[y].name&&(S=o.indexOf(m.config.series[y].name)),S>0){let M=i;this.groupCtx.prevXVal[S-1][w]<0?M=((h=this.series[_])==null?void 0:h[w])>=0?this.groupCtx.prevX[S-1][w]+A-(this.isReversed?A:0)*2:this.groupCtx.prevX[S-1][w]:this.groupCtx.prevXVal[S-1][w]>=0&&(M=((d=this.series[_])==null?void 0:d[w])>=0?this.groupCtx.prevX[S-1][w]:this.groupCtx.prevX[S-1][w]-A+(this.isReversed?A:0)*2),x=M}else x=i;((f=this.series[_])==null?void 0:f[w])===null?a=x:a=x+((g=this.series[_])==null?void 0:g[w])/this.invertedYRatio-(this.isReversed?((p=this.series[_])==null?void 0:p[w])/this.invertedYRatio:0)*2;let C=this.barHelpers.getBarpaths({barYPosition:b,barHeight:e,x1:x,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:o,i:_,j:w,w:m});return this.barHelpers.barBackground({j:w,i:_,y1:b,y2:e,elSeries:c}),n=n+l,{pathTo:C.pathTo,pathFrom:C.pathFrom,goalX:this.barHelpers.getGoalValues("x",i,null,y,w,v),barXPosition:x,barYPosition:b,x:a,y:n}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:n,columnGroupIndex:r,seriesGroup:o,elSeries:l}){var c,h,d,f,g,p,m,b,x;let _=this.w,w=t.i,y=t.j,v=t.bc,A=t.realIndex,S=t.translationsIndex;if(_.axisFlags.isXNumeric){let D=_.seriesData.seriesX[A][y];D||(D=0),e=(D-_.globals.minX)/this.xRatio-a/2*_.globals.barGroups.length}let C=e+r*a,M,k=0;for(let D=0;D<this.groupCtx.prevYF.length;D++)k=k+(isNaN(this.groupCtx.prevYF[D][y])?0:this.groupCtx.prevYF[D][y]);let L=w;if(o&&(L=o.indexOf(_.seriesData.seriesNames[A])),L>0&&!_.axisFlags.isXNumeric||L>0&&_.axisFlags.isXNumeric&&_.seriesData.seriesX[A-1][y]===_.seriesData.seriesX[A][y]){let D,P,F=Math.min(this.yRatio.length+1,A+1);if(this.groupCtx.prevY[L-1]!==void 0&&this.groupCtx.prevY[L-1].length){for(let R=1;R<F;R++)if(!isNaN((c=this.groupCtx.prevY[L-R])==null?void 0:c[y])){P=this.groupCtx.prevY[L-R][y];break}}for(let R=1;R<F;R++)if(((h=this.groupCtx.prevYVal[L-R])==null?void 0:h[y])<0){D=((d=this.series[w])==null?void 0:d[y])>=0?P-k+(this.isReversed?k:0)*2:P;break}else if(((f=this.groupCtx.prevYVal[L-R])==null?void 0:f[y])>=0){D=((g=this.series[w])==null?void 0:g[y])>=0?P:P+k-(this.isReversed?k:0)*2;break}typeof D>"u"&&(D=_.layout.gridHeight),(p=this.groupCtx.prevYF[0])!=null&&p.every(R=>R===0)&&this.groupCtx.prevYF.slice(1,L).every(R=>R.every(N=>isNaN(N)))?M=n:M=D}else M=n;(m=this.series[w])!=null&&m[y]?s=M-((b=this.series[w])==null?void 0:b[y])/this.yRatio[S]+(this.isReversed?((x=this.series[w])==null?void 0:x[y])/this.yRatio[S]:0)*2:s=M;let E=this.barHelpers.getColumnPaths({barXPosition:C,barWidth:a,y1:M,y2:s,yRatio:this.yRatio[S],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:o,realIndex:t.realIndex,i:w,j:y,w:_});return this.barHelpers.barBackground({bc:v,j:y,i:w,x1:C,x2:a,elSeries:l}),{pathTo:E.pathTo,pathFrom:E.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,A,y,0),barXPosition:C,x:_.axisFlags.isXNumeric?e:e+i,y:s}}};function uo({w:u,points:t,seedA:e,seedB:s,center:i,halfExtent:a,alongFn:n,isHorizontal:r,options:o,clampAt:l}){let c=o;if(!c||c.show===!1)return[];if(!t||!t.length)return[];let h=c.maxPoints||3e3,d=t.length>h?Math.ceil(t.length/h):1,f=c.size!=null?c.size:2.5,g=c.jitter!=null?c.jitter:.5,p=a*g,m=c.constrainToViolin!==!1&&typeof l=="function",b=c.shape==="square",x=c.colorScale,_=x&&Array.isArray(x.colors)&&x.colors.length>0,w=_?Math.max(2,x.steps||24):1,y=_&&x.min!=null?x.min:u.globals.minY,A=(_&&x.max!=null?x.max:u.globals.maxY)-y||1,S=_?new Array(w).fill(""):[""];for(let M=0;M<t.length;M+=d){let k=t[M],L=n(k),E=(Sa(e*7919+s*100003+M)-.5)*2*p;if(m){let R=l(k);E>R&&(E=R),E<-R&&(E=-R)}let D=r?L:i+E,P=r?i+E:L,F=b?ud(D,P,f):dd(D,P,f);if(_){let R=(k-y)/A;R<0&&(R=0),R>1&&(R=1),S[Math.round(R*(w-1))]+=F}else S[0]+=F}if(!_)return S[0]?[{fill:null,d:S[0]}]:[];let C=[];for(let M=0;M<w;M++)S[M]&&C.push({fill:hd(x.colors,M/(w-1)),d:S[M]});return C}function fo({graphics:u,w:t,elSeries:e,pointsByCat:s,options:i,distributed:a,realIndex:n,wrapClass:r,pointClass:o}){if(!i||i.show===!1||!s.length)return;let l=i.opacity!=null?i.opacity:.9,c=i.strokeColor!=null?i.strokeColor:"#fff",h=i.strokeWidth!=null?i.strokeWidth:1,d=t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged,f=u.group({class:d?`${r} apexcharts-element-hidden`:r});d&&t.globals.delayedElements.push({el:f.node}),s.forEach(({groups:g,j:p})=>{let m=a?t.globals.colors[p]:t.globals.colors[n],b=i.fillColor,x=b==="series"?m:b==="series-dark"?gr(m,.45):b||gr(m,.45);g.forEach(_=>{let w=u.drawPath({d:_.d,fill:_.fill!=null?_.fill:x,stroke:h>0?c:"none",strokeWidth:h,fillOpacity:l,classes:o});w.attr("data:realIndex",n),w.attr("j",p),w.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),w.node.style.pointerEvents="none",f.add(w)})}),e.add(f)}function gr(u,t){let e=T.parseHex(u);if(!e)return u;let s=Math.max(0,1-t);return`rgb(${Math.round(e[0]*s)},${Math.round(e[1]*s)},${Math.round(e[2]*s)})`}function hd(u,t){if(!u.length)return"#000";if(u.length===1)return u[0];let e=Math.max(0,Math.min(1,t))*(u.length-1),s=Math.floor(e),i=e-s,a=T.parseHex(u[s])||[0,0,0],n=T.parseHex(u[Math.min(s+1,u.length-1)])||a,r=(o,l)=>Math.round(o+(l-o)*i);return`rgb(${r(a[0],n[0])},${r(a[1],n[1])},${r(a[2],n[2])})`}function Sa(u){let t=(u^2654435769)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}function dd(u,t,e){return`M ${u-e} ${t} a ${e} ${e} 0 1 0 ${2*e} 0 a ${e} ${e} 0 1 0 ${-2*e} 0 `}function ud(u,t,e){return`M ${u-e} ${t-e} h ${2*e} v ${2*e} h ${-2*e} z `}var Ss=class extends Pt{draw(t,e,s){var i;let a=this.w,n=new B(this.w),r=a.globals.comboCharts?e:a.config.chart.type,o=new pt(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 lt(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);let l=n.group({class:`apexcharts-${r}-series apexcharts-plot-series`});for(let c=0;c<t.length;c++){this.isBoxPlot=a.config.chart.type==="boxPlot"||a.config.series[c].type==="boxPlot";let h,d,f=[],g=[],p=a.globals.comboCharts?s[c]:c,{columnGroupIndex:m}=this.barHelpers.getGroupIndex(p),b=n.group({class:"apexcharts-series",seriesName:T.escapeString(a.seriesData.seriesNames[p]),rel:c+1,"data:realIndex":p});ct.addCollapsedClassToSeries(this.w,b,p),t[c].length>0&&(this.visibleI=this.visibleI+1);let x=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],x=p);let _=this.barHelpers.initialPositions(p),{y:w,barHeight:y,yDivision:v,zeroW:A,x:S,barWidth:C,xDivision:M,zeroH:k}=_;d=w,h=S,g.push(h+(C??0)/2);let L=n.group({class:"apexcharts-datalabels","data:realIndex":p}),E=n.group({class:"apexcharts-bar-goals-markers"}),D=this.isBoxPlot?this.boxOptions.points:null,P=[],F=a.layout.gridWidth,R=C??0;for(let N=0;N<a.globals.dataPoints;N++){let z=this.barHelpers.getStrokeWidth(c,N,p),$=null,W={indexes:{i:c,j:N,realIndex:p,translationsIndex:x},x:h,y:d,strokeWidth:z,elSeries:b};if(this.isHorizontal?$=this.drawHorizontalBoxPaths(j(G({},W),{yDivision:v,barHeight:y,zeroW:A})):$=this.drawVerticalBoxPaths(j(G({},W),{xDivision:M,barWidth:C,zeroH:k,cullBounds:{lo:-R,hi:F+R}})),d=$.y,h=$.x,N>0&&g.push(h+(C??0)/2),f.push(d),$.culled)continue;let Y=this.barHelpers.drawGoalLine({barXPosition:$.barXPosition,barYPosition:$.barYPosition,goalX:$.goalX,goalY:$.goalY,barHeight:y,barWidth:C});if(Y&&E.add(Y),$.pathTo.forEach((I,U)=>{let X=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?$.color[U]:a.globals.stroke.colors[c],V=o.fillPath({seriesNumber:p,dataPointIndex:N,color:$.color[U],value:t[c][N]});this.renderSeries({realIndex:p,pathFill:V,lineFill:X,j:N,i:c,pathFrom:$.pathFrom,pathTo:I,strokeWidth:z,elSeries:b,x:h,y:d,series:t,columnGroupIndex:m,barHeight:y,barWidth:C,elDataLabelsWrap:L,elGoalsMarkers:E,visibleSeries:this.visibleI,type:a.config.chart.type})}),D&&D.show!==!1){let I=(i=a.candleData.seriesBoxPoints[p])==null?void 0:i[N];if(I&&I.length){let U=K=>this.coreUtils.getLogValAtSeriesIndex(K,p),X,V,q;if(this.isHorizontal){let K=this.invertedYRatio,Q=y??0,tt=A??0;X=$.barYPosition+Q/2,V=Q/2,q=dt=>tt+U(dt)/K}else{let K=this.yRatio[x],Q=C??0,tt=k??0;X=$.barXPosition+Q/2,V=Q/2,q=dt=>tt-U(dt)/K}let Z=uo({w:a,points:I,seedA:p,seedB:N,center:X,halfExtent:V,alongFn:q,isHorizontal:this.isHorizontal,options:D});Z.length&&P.push({groups:Z,j:N})}}}D&&fo({graphics:n,w:a,elSeries:b,pointsByCat:P,options:D,distributed:a.config.plotOptions.bar.distributed,realIndex:p,wrapClass:"apexcharts-boxPlot-points-wrap",pointClass:"apexcharts-boxPlot-points"}),a.globals.seriesXvalues[p]=g,a.globals.seriesYvalues[p]=f,l.add(b)}return l}drawVerticalBoxPaths({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a,strokeWidth:n,cullBounds:r=null}){var o,l,c,h;let d=this.w,f=new B(this.w),g=t.i,p=t.j,{colors:m}=d.config.plotOptions.candlestick,{colors:b}=this.boxOptions,x=t.realIndex,_=N=>Array.isArray(N)?N[x]:N,w=_(m.upward),y=_(m.downward),v=this.yRatio[t.translationsIndex],A=this.getOHLCValue(x,p),S=a,C=a,M=A.o<A.c?[w]:[y];this.isBoxPlot&&(M=[_(b.lower),_(b.upper)]);let k=Math.min(A.o,A.c),L=Math.max(A.o,A.c),E=A.m;d.axisFlags.isXNumeric&&(e=(d.seriesData.seriesX[x][p]-d.globals.minX)/this.xRatio-i/2);let D=e+i*this.visibleI;if(typeof((o=this.series[g])==null?void 0:o[p])>"u"||((l=this.series[g])==null?void 0:l[p])===null?(k=a,L=a):(k=a-k/v,L=a-L/v,S=a-A.h/v,C=a-A.l/v,E=a-A.m/v),r&&(D+i<r.lo||D>r.hi))return{pathTo:null,pathFrom:null,x:d.axisFlags.isXNumeric?e:e+s,y:L,barXPosition:D,color:M,culled:!0};let P;if(this.isOHLC){let N=D+i/2,z=a-A.o/v,$=a-A.c/v;P=[f.move(N,S)+f.line(N,C)+f.move(N,z)+f.line(D,z)+f.move(N,$)+f.line(D+i,$)]}else this.isBoxPlot?P=[f.move(D,k)+f.line(D+i/2,k)+f.line(D+i/2,S)+f.line(D+i/4,S)+f.line(D+i-i/4,S)+f.line(D+i/2,S)+f.line(D+i/2,k)+f.line(D+i,k)+f.line(D+i,E)+f.line(D,E)+f.line(D,k+n/2),f.move(D,E)+f.line(D+i,E)+f.line(D+i,L)+f.line(D+i/2,L)+f.line(D+i/2,C)+f.line(D+i-i/4,C)+f.line(D+i/4,C)+f.line(D+i/2,C)+f.line(D+i/2,L)+f.line(D,L)+f.line(D,E)+"z"]:P=[f.move(D,L)+f.line(D+i/2,L)+f.line(D+i/2,S)+f.line(D+i/2,L)+f.line(D+i,L)+f.line(D+i,k)+f.line(D+i/2,k)+f.line(D+i/2,C)+f.line(D+i/2,k)+f.line(D,k)+f.line(D,L-n/2)];let F=null,R=(h=(c=this.ctx)==null?void 0:c.morphTypeChange)==null?void 0:h.getInitialPathFor(x,p);return R?F=R:d.globals.previousPaths.length>0&&(F=this.getPreviousPath(x,p,P[0])),F==null&&(F=f.move(D+i/2,k)+f.move(D,k)),d.axisFlags.isXNumeric||(e=e+s),{pathTo:P,pathFrom:F,x:e,y:L,goalY:this.barHelpers.getGoalValues("y",null,a,x,p,t.translationsIndex),barXPosition:D,color:M}}drawHorizontalBoxPaths({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a,strokeWidth:n}){var r,o,l,c;let h=this.w,d=new B(this.w),f=t.i,g=t.j,p=t.realIndex,{colors:m}=h.config.plotOptions.candlestick,{colors:b}=this.boxOptions,x=P=>Array.isArray(P)?P[p]:P,_=this.invertedYRatio,w=this.getOHLCValue(p,g),y=w.o<w.c?[x(m.upward)]:[x(m.downward)];this.isBoxPlot&&(y=[x(b.lower),x(b.upper)]);let v=a,A=a,S=Math.min(w.o,w.c),C=Math.max(w.o,w.c),M=w.m;h.axisFlags.isXNumeric&&(e=(h.seriesData.seriesX[p][g]-h.globals.minX)/this.invertedXRatio-i/2);let k=e+i*this.visibleI;typeof((r=this.series[f])==null?void 0:r[g])>"u"||((o=this.series[f])==null?void 0:o[g])===null?(S=a,C=a):(S=a+S/_,C=a+C/_,v=a+w.h/_,A=a+w.l/_,M=a+w.m/_);let L=[d.move(S,k)+d.line(S,k+i/2)+d.line(v,k+i/2)+d.line(v,k+i/2-i/4)+d.line(v,k+i/2+i/4)+d.line(v,k+i/2)+d.line(S,k+i/2)+d.line(S,k+i)+d.line(M,k+i)+d.line(M,k)+d.line(S+n/2,k),d.move(M,k)+d.line(M,k+i)+d.line(C,k+i)+d.line(C,k+i/2)+d.line(A,k+i/2)+d.line(A,k+i-i/4)+d.line(A,k+i/4)+d.line(A,k+i/2)+d.line(C,k+i/2)+d.line(C,k)+d.line(M,k)+"z"],E=null,D=(c=(l=this.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.getInitialPathFor(p,g);return D?E=D:h.globals.previousPaths.length>0&&(E=this.getPreviousPath(p,g,L[0])),E==null&&(E=d.move(S,k+i/2)+d.move(S,k)),h.axisFlags.isXNumeric||(e=e+s),{pathTo:L,pathFrom:E,x:C,y:e,goalX:this.barHelpers.getGoalValues("x",a,null,p,g,0),barYPosition:k,color:y}}getOHLCValue(t,e){let s=this.w,i=this.coreUtils,a=h=>h[t]&&h[t][e]!=null?i.getLogValAtSeriesIndex(h[t][e],t):0,n=a(s.candleData.seriesCandleH),r=a(s.candleData.seriesCandleO),o=a(s.candleData.seriesCandleM),l=a(s.candleData.seriesCandleC),c=a(s.candleData.seriesCandleL);return{o:this.isBoxPlot?n:r,h:this.isBoxPlot?r:n,m:o,l:this.isBoxPlot?l:c,c:this.isBoxPlot?c:l}}},fd=u=>{let t=gd(u),e=u.length-1,s=1e-6,i=[],a,n,r,o;for(let l=0;l<e;l++)r=ka(u[l],u[l+1]),Math.abs(r)<s?t[l]=t[l+1]=0:(a=t[l]/r,n=t[l+1]/r,o=a*a+n*n,o>9&&(o=r*3/Math.sqrt(o),t[l]=o*a,t[l+1]=o*n));for(let l=0;l<=e;l++)o=(u[Math.min(e,l+1)][0]-u[Math.max(0,l-1)][0])/(6*(1+t[l]*t[l])),i.push([o||0,t[l]*o||0]);return i},go=u=>{let t="";for(let e=0;e<u.length;e++){let s=u[e],i=s.length;i>4?(t+=`C${s[0]}, ${s[1]}`,t+=`, ${s[2]}, ${s[3]}`,t+=`, ${s[4]}, ${s[5]}`):i>2&&(t+=`S${s[0]}, ${s[1]}`,t+=`, ${s[2]}, ${s[3]}`)}return t},Ca={points(u){let t=fd(u),e=u[1],s=u[0],i=[],a=t[1],n=t[0];i.push(s,[s[0]+n[0],s[1]+n[1],e[0]-a[0],e[1]-a[1],e[0],e[1]]);for(let r=2,o=t.length;r<o;r++){let l=u[r],c=t[r];i.push([l[0]-c[0],l[1]-c[1],l[0],l[1]])}return i},slice(u,t,e){let s=u.slice(t,e);if(t){if(e-t>1&&s[1].length<6){let i=s[0].length;s[1]=[s[0][i-2]*2-s[0][i-4],s[0][i-1]*2-s[0][i-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s}};function ka(u,t){return(t[1]-u[1])/(t[0]-u[0])}function gd(u){let t=[],e=u[0],s=u[1],i=t[0]=ka(e,s),a=1;for(let n=u.length-1;a<n;a++)e=s,s=u[a+1],t[a]=(i+(i=ka(e,s)))*.5;return t[a]=i,t}var Ma=class extends Pt{draw(t,e,s){let i=this.w,a=new B(this.w),n=new pt(this.w);this.violinOptions=i.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=i.config.plotOptions.bar.distributed,this.isHorizontal=i.config.plotOptions.bar.horizontal,this.coreUtils=new lt(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);let r=a.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let o=0;o<t.length;o++){let l,c,h=[],d=[],f=i.globals.comboCharts?s[o]:o,{columnGroupIndex:g}=this.barHelpers.getGroupIndex(f),p=a.group({class:"apexcharts-series",seriesName:T.escapeString(i.seriesData.seriesNames[f]),rel:o+1,"data:realIndex":f});ct.addCollapsedClassToSeries(this.w,p,f),t[o].length>0&&(this.visibleI=this.visibleI+1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[f][0],m=f);let b=this.barHelpers.initialPositions(f),{y:x,barHeight:_,yDivision:w,zeroW:y,x:v,barWidth:A,xDivision:S,zeroH:C}=b;c=x,l=v,d.push(l+(A??0)/2);let M=a.group({class:"apexcharts-datalabels","data:realIndex":f});this.seriesMaxWeight=0,this.normalize==="group"&&(i.violinData.seriesViolinDensity[f]||[]).forEach(E=>{E&&E.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=E.maxWeight)});let k=[];for(let L=0;L<i.globals.dataPoints;L++){let E=this.barHelpers.getStrokeWidth(o,L,f),D=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:o,j:L,realIndex:f,translationsIndex:m},y:c,yDivision:w,barHeight:_,zeroW:y}):this.drawVerticalViolin({indexes:{i:o,j:L,realIndex:f,translationsIndex:m},x:l,xDivision:S,barWidth:A,zeroH:C});l=D.x,c=D.y,L>0&&d.push(D.center),h.push(D.alongRepresentative);let P=this.buildPointsSubPath({realIndex:f,j:L,center:D.center,halfExtent:D.halfExtent,alongFn:D.alongFn,density:D.density,maxWeight:D.maxWeight});P.length&&k.push({groups:P,j:L});let F=n.fillPath({seriesNumber:this.distributed?L:f,dataPointIndex:L,color:this.distributed?i.globals.colors[L]:void 0,value:t[o][L]});this.renderSeries({realIndex:f,pathFill:F,lineFill:i.globals.stroke.colors[f],j:L,i:o,pathFrom:D.pathFrom,pathTo:D.pathTo,strokeWidth:E,elSeries:p,x:l,y:c,series:t,columnGroupIndex:g,barHeight:_,barWidth:A,elDataLabelsWrap:M,visibleSeries:this.visibleI,type:"violin"});let R=p.node.querySelector(`path.apexcharts-violin-area[j='${L}']`);R&&isFinite(D.alongRepresentative)&&R.setAttribute(this.isHorizontal?"cx":"cy",`${D.alongRepresentative}`)}fo({graphics:a,w:i,elSeries:p,pointsByCat:k,options:this.pointsOptions,distributed:this.distributed,realIndex:f,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),i.globals.seriesXvalues[f]=d,i.globals.seriesYvalues[f]=h,r.add(p)}return r}drawVerticalViolin({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a}){var n,r,o;let l=this.w,{realIndex:c,j:h,translationsIndex:d}=t,f=this.yRatio[d];l.axisFlags.isXNumeric&&(e=(l.seriesData.seriesX[c][h]-l.globals.minX)/this.xRatio-i/2);let p=e+i*this.visibleI+i/2,m=i/2,b=this.getDensity(c,h),x=this.effectiveMaxWeight(b),_=A=>a-this.logVal(A,c)/f,w=this.buildBodyPath({nodes:b.nodes,center:p,halfExtent:m,maxWeight:x,vertical:!0,alongFn:_,collapsed:!1}),y=null,v=(r=(n=this.ctx)==null?void 0:n.morphTypeChange)==null?void 0:r.getInitialPathFor(c,h);return v?y=v:l.globals.previousPaths.length>0&&(y=this.getPreviousPath(c,h,w)),y==null&&(y=this.buildBodyPath({nodes:b.nodes,center:p,halfExtent:m,maxWeight:x,vertical:!0,alongFn:_,collapsed:!0})),l.axisFlags.isXNumeric||(e=e+s),{pathTo:w,pathFrom:y,x:e,y:a,center:p,halfExtent:m,alongFn:_,density:b,maxWeight:x,alongRepresentative:_((o=this.series[t.i][h])!=null?o:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a}){var n,r,o;let l=this.w,{realIndex:c,j:h}=t,d=this.invertedYRatio;l.axisFlags.isXNumeric&&(e=(l.seriesData.seriesX[c][h]-l.globals.minX)/this.invertedXRatio-i/2);let g=e+i*this.visibleI+i/2,p=i/2,m=this.getDensity(c,h),b=this.effectiveMaxWeight(m),x=v=>a+this.logVal(v,c)/d,_=this.buildBodyPath({nodes:m.nodes,center:g,halfExtent:p,maxWeight:b,vertical:!1,alongFn:x,collapsed:!1}),w=null,y=(r=(n=this.ctx)==null?void 0:n.morphTypeChange)==null?void 0:r.getInitialPathFor(c,h);return y?w=y:l.globals.previousPaths.length>0&&(w=this.getPreviousPath(c,h,_)),w==null&&(w=this.buildBodyPath({nodes:m.nodes,center:g,halfExtent:p,maxWeight:b,vertical:!1,alongFn:x,collapsed:!0})),l.axisFlags.isXNumeric||(e=e+s),{pathTo:_,pathFrom:w,x:a,y:e,center:g,halfExtent:p,alongFn:x,maxWeight:b,density:m,alongRepresentative:x((o=this.series[t.i][h])!=null?o:0)}}getDensity(t,e){var s;let a=(s=this.w.violinData.seriesViolinDensity[t])==null?void 0:s[e];if(!a||!a.values.length)return{nodes:[],maxWeight:0};let n=a.values.map((l,c)=>c);n.sort((l,c)=>a.values[l]-a.values[c]);let r=[],o=null;for(let l of n){let c=a.values[l];o!==null&&c===o||(r.push({v:c,w:a.weights[l]}),o=c)}return{nodes:r,maxWeight:a.maxWeight}}effectiveMaxWeight(t){return this.normalize==="group"&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:s,maxWeight:i,vertical:a,alongFn:n,collapsed:r}){let o=new B(this.w);if(t.length===0){let d=n(0);return a?o.move(e,d)+o.line(e,d):o.move(d,e)+o.line(d,e)}let l=d=>{if(r||i<=0)return 0;let f=d/i*s*this.bandwidthScale;return Math.min(s,Math.max(0,f))},c=[],h=[];for(let d=0;d<t.length;d++){let f=n(t[d].v),g=l(t[d].w);a?(c.push([e+g,f]),h.push([e-g,f])):(c.push([f,e+g]),h.push([f,e-g]))}return h.reverse(),this.smoothSegment(c,a,!1)+this.smoothSegment(h,a,!0)+"z"}smoothSegment(t,e,s){let i=new B(this.w),a=t[0],n=s?i.line(a[0],a[1]):i.move(a[0],a[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let h=1;h<t.length;h++)n+=i.line(t[h][0],t[h][1]);return n}let o=t.map(([h,d])=>e?[d,h]:[h,d]),l=Ca.points(o),c=e?l.map(pd):l;return n+=go(c),n}strictlyMonotonic(t,e){let s=e?1:0;for(let i=1;i<t.length;i++)if(t[i][s]===t[i-1][s])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:s,halfExtent:i,alongFn:a,density:n,maxWeight:r}){var o;return uo({w:this.w,points:(o=this.w.violinData.seriesViolinPoints[t])==null?void 0:o[e],seedA:t,seedB:e,center:s,halfExtent:i,alongFn:a,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:l=>this.halfWidthAtValue(l,n,i,r)})}halfWidthAtValue(t,e,s,i){let{nodes:a}=e,n=i??e.maxWeight;if(!a.length||n<=0)return 0;let r=o=>Math.min(s,o/n*s*this.bandwidthScale);if(t<=a[0].v)return r(a[0].w);if(t>=a[a.length-1].v)return r(a[a.length-1].w);for(let o=1;o<a.length;o++)if(t<=a[o].v){let l=a[o-1],c=a[o],h=c.v===l.v?0:(t-l.v)/(c.v-l.v);return r(l.w+(c.w-l.w)*h)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}};function pd(u){let t=[];for(let e=0;e<u.length;e+=2)t.push(u[e+1],u[e]);return t}var Cs=class{constructor(t,e){this.ctx=e,this.w=t}checkColorRange(){let t=this.w,e=!1,s=t.config.plotOptions[t.config.chart.type];return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(i=>{i.from<=0&&(e=!0)}),e}getShadeColor(t,e,s,i){let a=this.w,n=1,r=a.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,s);a.globals.hasNegs||i?a.config.plotOptions[t].reverseNegativeShade?o.percent<0?n=o.percent/100*(r*1.25):n=(1-o.percent/100)*(r*1.25):o.percent<=0?n=1-(1+o.percent/100)*r:n=(1-o.percent/100)*r:(n=1-o.percent/100,t==="treemap"&&(n=(1-o.percent/100)*(r*1.25)));let l=o.color,c=new T;if(a.config.plotOptions[t].enableShades)if(this.w.config.theme.mode==="dark"){let h=c.shadeColor(n*-1,o.color);l=T.hexToRgba(T.isColorHex(h)?h:T.rgb2hex(h),a.config.fill.opacity)}else{let h=c.shadeColor(n,o.color);l=T.hexToRgba(T.isColorHex(h)?h:T.rgb2hex(h),a.config.fill.opacity)}return{color:l,colorProps:o}}determineColor(t,e,s){let i=this.w,a=i.seriesData.series[e][s],n=i.config.plotOptions[t],r=n.colorScale.inverse?s:e;n.distributed&&i.config.chart.type==="treemap"&&(r=s);let o=i.globals.colors[r],l=null,c,h;if(!n.distributed&&t==="heatmap")c=i.globals.minY,h=i.globals.maxY;else{let g=i.seriesData.series[e];c=g.length?g[0]:0,h=c;for(let p=1;p<g.length;p++)g[p]<c&&(c=g[p]),g[p]>h&&(h=g[p])}typeof n.colorScale.min<"u"&&(c=n.colorScale.min<i.globals.minY?n.colorScale.min:i.globals.minY,h=n.colorScale.max>i.globals.maxY?n.colorScale.max:i.globals.maxY);let d=Math.abs(h)+Math.abs(c),f=d===0?0:100*a/d;return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(p=>{if(a>=p.from&&a<=p.to){o=p.color,l=p.foreColor?p.foreColor:null,c=p.from,h=p.to;let m=Math.abs(h)+Math.abs(c);f=m===0?0:100*a/m}}),{color:o,foreColor:l,percent:f}}calculateDataLabels({text:t,x:e,y:s,i,j:a,colorProps:n,fontSize:r}){let o=this.w,l=o.config.dataLabels,c=new B(this.w),h=new Et(this.w,this.ctx),d=null;if(l.enabled){d=c.group({class:"apexcharts-data-labels"});let f=Bt(l.offsetX,o,i,a),g=Bt(l.offsetY,o,i,a),p=e+f,m=s+parseFloat(l.style.fontSize)/3+g;h.plotDataLabelsText({x:p,y:m,text:t,i,j:a,color:n.foreColor,parent:d,fontSize:r,dataLabelsConfig:l})}return d}},La=class{constructor(t,e,s){this.ctx=e,this.w=t,this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Cs(t,e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(t){var e,s;let i=this.w,a=new B(this.w,this.ctx),n=ae(this.ctx,a),r=n!==a&&typeof n.drawRectCell=="function",o=a.group({class:"apexcharts-heatmap"});o.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`);let l=i.layout.gridWidth/i.globals.dataPoints,c=i.layout.gridHeight/i.seriesData.series.length,h=(i.config.xaxis.type==="numeric"||i.config.xaxis.type==="datetime")&&i.axisFlags.isXNumeric&&this.xRatio>0,d=l;if(h){let x=i.globals.minXDiff;d=Number.isFinite(x)&&x>0?x/this.xRatio:l}let f=Array.isArray(i.config.fill.opacity)?(e=i.config.fill.opacity[0])!=null?e:1:(s=i.config.fill.opacity)!=null?s:1,g=0,p=!1;this.negRange=this.helpers.checkColorRange();let m=t.slice();i.config.yaxis[0].reversed&&(p=!0,m.reverse());for(let x=p?0:m.length-1;p?x<m.length:x>=0;p?x++:x--){let _=a.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:T.escapeString(i.seriesData.seriesNames[x]),rel:x+1,"data:realIndex":x});if(ct.addCollapsedClassToSeries(this.w,_,x),r||a.setupEventDelegation(_,".apexcharts-heatmap-rect"),i.config.chart.dropShadow.enabled){let A=i.config.chart.dropShadow;new at(this.w).dropShadow(_,A,x)}let w=0,y=i.config.plotOptions.heatmap.shadeIntensity,v=0;for(let A=0;A<i.globals.dataPoints;A++){if(!h&&i.seriesData.seriesX.length&&!i.globals.allSeriesHasEqualX&&i.globals.minX+i.globals.minXDiff*A<i.seriesData.seriesX[x][v]){w=w+l;continue}if(v>=m[x].length)break;let S=h?d:l;if(h){let R=i.seriesData.seriesX[x]?i.seriesData.seriesX[x][v]:null;if(R==null||R!==R){v++;continue}w=(R-i.globals.minX)/this.xRatio-d/2}let C=this.helpers.getShadeColor(i.config.chart.type,x,v,this.negRange),M=C.color,k=C.colorProps;i.config.fill.type==="image"&&(M=new pt(this.w).fillPath({seriesNumber:x,dataPointIndex:v,opacity:i.globals.hasNegs?k.percent<0?1-(1+k.percent/100):y+k.percent/100:k.percent/100,patternID:T.randomId(),width:i.config.fill.image.width?i.config.fill.image.width:S,height:i.config.fill.image.height?i.config.fill.image.height:c}));let L=this.rectRadius,E=i.config.plotOptions.heatmap.useFillColorAsStroke?M:i.globals.stroke.colors[0];if(r)n.drawRectCell(w,g,S,c,{fill:M,fillOpacity:f,stroke:E,strokeWidth:this.strokeWidth,radius:L,seriesIndex:x,dataPointIndex:v});else{let R=a.drawRect(w,g,S,c,L);if(R.attr({cx:w,cy:g}),R.node.classList.add("apexcharts-heatmap-rect"),_.add(R),R.attr({fill:M,i:x,index:x,j:v,val:t[x][v],"stroke-width":this.strokeWidth,stroke:E,color:M}),i.config.chart.animations.enabled&&!i.globals.dataChanged){let N=1;i.globals.resized||(N=i.config.chart.animations.speed),this.animateHeatMap(R,w,g,S,c,N,x,v)}if(i.globals.dataChanged){let N=1;if(this.dynamicAnim.enabled&&i.globals.shouldAnimate){N=this.dynamicAnim.speed;let z=i.globals.previousPaths[x]&&i.globals.previousPaths[x][v]&&i.globals.previousPaths[x][v].color;z||(z="rgba(255, 255, 255, 0)"),this.animateHeatColor(R,T.isColorHex(z)?z:T.rgb2hex(z),T.isColorHex(M)?M:T.rgb2hex(M),N)}}}let D=i.config.dataLabels.formatter,P=D(i.seriesData.series[x][v],{value:i.seriesData.series[x][v],seriesIndex:x,dataPointIndex:v,w:i}),F=this.helpers.calculateDataLabels({text:P,x:w+S/2,y:g+c/2,i:x,j:v,colorProps:k,series:m});F!==null&&_.add(F),h||(w=w+l),v++}g=g+c,o.add(_)}let b=i.globals.yAxisScale[0].result.slice();return i.config.yaxis[0].reversed?b.unshift(""):b.push(""),i.globals.yAxisScale[0].result=b,o}animateHeatMap(t,e,s,i,a,n,r=0,o=0){let l=this.w,c=new St(this.w),d=l.config.chart.animations.animateGradually,f=d&&d.enabled!==!1,g=0;if(f){let p=(l.seriesData.series||[]).length||1,m=l.globals.dataPoints||1,b=p+m-2,x=Math.min(d.delay||0,n*.5/Math.max(1,b));g=Ya({style:"diagonal",index:o,row:r,col:o,baseDelay:x})}c.animateRect(t,{x:e+i/2,y:s+a/2,width:0,height:0},{x:e,y:s,width:i,height:a},n,()=>{c.animationCompleted(t)},g)}animateHeatColor(t,e,s,i){t.attr({fill:e}).animate(i).attr({fill:s})}},Da=class{constructor(t){this.w=t.w,this.lineCtx=t}sameValueSeriesFix(t,e){let s=this.w;if((s.config.fill.type==="gradient"||s.config.fill.type[t]==="gradient")&&new lt(this.lineCtx.w).seriesHaveSameValues(t)){let a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}calculatePoints({series:t,realIndex:e,x:s,y:i,i:a,j:n,prevY:r}){let o=this.w,l=[],c=[],h=this.lineCtx.categoryAxisCorrection+o.config.markers.offsetX;return o.axisFlags.isXNumeric&&(h=(o.seriesData.seriesX[e][0]-o.globals.minX)/this.lineCtx.xRatio+o.config.markers.offsetX),n===0&&(l.push(h),c.push(T.isNumber(t[a][0])?r+o.config.markers.offsetY:null)),l.push(s+o.config.markers.offsetX),c.push(T.isNumber(t[a][n+1])?i+o.config.markers.offsetY:null),{x:l,y:c}}checkPreviousPaths({pathFromLine:t,pathFromArea:e,realIndex:s}){let i=this.w;for(let a=0;a<i.globals.previousPaths.length;a++){let n=i.globals.previousPaths[a];(n.type==="line"||n.type==="area")&&n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(s,10)&&(n.type==="line"?(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[a].paths[0].d):n.type==="area"&&(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[a].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[a].paths[1]&&(t=i.globals.previousPaths[a].paths[1].d)))}return{pathFromLine:t,pathFromArea:e}}determineFirstPrevY({i:t,realIndex:e,series:s,prevY:i,lineYPosition:a,translationsIndex:n}){var r,o,l;let c=this.w,h=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((r=this.w.config.series[e])==null?void 0:r.type)==="bar"||((o=this.w.config.series[e])==null?void 0:o.type)==="column");if(typeof((l=s[t])==null?void 0:l[0])<"u")h?t>0?a=this.lineCtx.prevSeriesY[t-1][0]:a=this.lineCtx.zeroY:a=this.lineCtx.zeroY,i=a-s[t][0]/this.lineCtx.yRatio[n]+(this.lineCtx.isReversed?s[t][0]/this.lineCtx.yRatio[n]:0)*2;else if(h&&t>0&&typeof s[t][0]>"u"){for(let d=t-1;d>=0;d--)if(s[d][0]!==null&&typeof s[d][0]<"u"){a=this.lineCtx.prevSeriesY[d][0],i=a;break}}return{prevY:i,lineYPosition:a}}},Qt=class{constructor(t,e,s,i){this.ctx=e,this.w=t,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||i,this.scatter=new ds(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Da(this),this.markers=new zt(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,this._elLastPointsWrap=null}draw(t,e,s,i){var a;let n=this.w,r=new B(this.w),o=n.globals.comboCharts?e:n.config.chart.type,l=r.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),c=new lt(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=c.getLogSeries(t),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[];let h=[];for(let d=0;d<t.length;d++){t=this.lineHelpers.sameValueSeriesFix(d,t);let f=n.globals.comboCharts?s[d]:d,g=this.yRatio.length>1?f:0;this._initSerieVariables(t,d,f);let p=[],m=[],b=[],x=n.globals.padHorizontal+this.categoryAxisCorrection,_=1,w=[],y=[];ct.addCollapsedClassToSeries(this.w,this.elSeries,f),n.axisFlags.isXNumeric&&n.seriesData.seriesX.length>0&&(x=(n.seriesData.seriesX[f][0]-n.globals.minX)/this.xRatio),b.push(x);let v=x,A,S=v,C=this.zeroY,M=this.zeroY,k=0;C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:f,series:t,prevY:C,lineYPosition:k,translationsIndex:g}).prevY,n.config.stroke.curve==="monotoneCubic"&&t[d][0]===null?p.push(null):p.push(C);let E=C,D;o==="rangeArea"&&(D=this.lineHelpers.determineFirstPrevY({i:d,realIndex:f,series:i,prevY:M,lineYPosition:k,translationsIndex:g}),M=D.prevY,A=M,m.push(p[0]!==null?M:null));let P=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:f,translationsIndex:g,prevX:S,prevY:C,prevY2:M}),F=[p[0]],R=[m[0]],N={type:o,series:t,realIndex:f,translationsIndex:g,i:d,x,y:_,pX:v,pY:E,pathsFrom:P,linePaths:w,areaPaths:y,seriesIndex:s,lineYPosition:k,xArrj:b,yArrj:p,y2Arrj:m,seriesRangeEnd:i},z=this._iterateOverDataPoints(j(G({},N),{iterations:o==="rangeArea"?t[d].length-1:void 0,isRangeStart:!0}));if(o==="rangeArea"){let $=this._calculatePathsFrom({series:i,i:d,realIndex:f,prevX:S,prevY:M}),W=this._iterateOverDataPoints(j(G({},N),{series:i,xArrj:[x],yArrj:F,y2Arrj:R,pY:A,areaPaths:z.areaPaths,pathsFrom:$,iterations:i[d].length-1,isRangeStart:!1})),Y=z.linePaths.length/2;for(let I=0;I<Y;I++)z.linePaths[I]=W.linePaths[I+Y]+z.linePaths[I];z.linePaths.splice(Y),z.pathFromLine=W.pathFromLine+z.pathFromLine}else/z\s*$/i.test(z.pathFromArea)||(z.pathFromArea+="z");this._handlePaths({type:o,realIndex:f,i:d,paths:z}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),h.push(this.elSeries)}if(typeof((a=n.config.series[0])==null?void 0:a.zIndex)<"u"&&h.sort((d,f)=>Number(d.node.getAttribute("zIndex"))-Number(f.node.getAttribute("zIndex"))),n.config.chart.stacked)for(let d=h.length-1;d>=0;d--)l.add(h[d]);else for(let d=0;d<h.length;d++)l.add(h[d]);return l}_initSerieVariables(t,e,s){let i=this.w,a=new B(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 n=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],n=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[n]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?this.baseLineY[n]*2:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||i.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;let r=i.config.series[s];if(this.elSeries=a.group({class:"apexcharts-series",zIndex:typeof r.zIndex<"u"?r.zIndex:s,seriesName:T.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=a.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,i.globals.hasNullValues){let l=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]},seriesIndex:e,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});l!==null&&this.elPointsMain.add(l)}this.elDataLabelsWrap=a.group({class:"apexcharts-datalabels","data:realIndex":s});let o=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":o,rel:e+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:t,series:e,i:s,realIndex:i,translationsIndex:a,prevX:n,prevY:r,prevY2:o}){let l=this.w,c=new B(this.w),h,d,f,g;if(e[s][0]===null){for(let p=0;p<e[s].length;p++)if(e[s][p]!==null){n=this.xDivision*p,r=this.zeroY-e[s][p]/this.yRatio[a],h=c.move(n,r),d=c.move(n,this.areaBottomY);break}}else h=c.move(n,r),t==="rangeArea"&&(h=c.move(n,o)+c.line(n,r)),d=c.move(n,this.areaBottomY)+c.line(n,r);if(f=c.move(0,this.areaBottomY)+c.line(0,this.areaBottomY),g=c.move(0,this.areaBottomY)+c.line(0,this.areaBottomY),l.globals.previousPaths.length>0){let p=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:g,realIndex:i});f=p.pathFromLine,g=p.pathFromArea}return{prevX:n,prevY:r,linePath:h,areaPath:d,pathFromLine:f,pathFromArea:g}}_handlePaths({type:t,realIndex:e,i:s,paths:i}){var a,n,r,o,l,c,h;let d=this.w,f=new B(this.w),g=ae(this.ctx,f),p=new pt(this.w);this.prevSeriesY.push(i.yArrj);let m=null;(t==="line"||t==="area")&&d.globals.dataChanged&&(m=Al(d,e,i.xArrj,i.yArrj));let b=null;!m&&(t==="line"||t==="area")&&(b=Tl(d,{type:t,realIndex:e,pathFromLine:i.pathFromLine,pathFromArea:i.pathFromArea,linePaths:i.linePaths,areaPaths:i.areaPaths})),d.globals.seriesXvalues[e]=i.xArrj,d.globals.seriesYvalues[e]=i.yArrj;let x=d.config.forecastDataPoints;if(x.count>0&&t!=="rangeArea"){let y=d.globals.seriesXvalues[e][d.globals.seriesXvalues[e].length-x.count-1],v=f.drawRect(y,0,d.layout.gridWidth,d.layout.gridHeight,0);d.dom.elForecastMask.appendChild(v.node);let A=f.drawRect(0,0,y,d.layout.gridHeight,0);d.dom.elNonForecastMask.appendChild(A.node)}this.pointsChart?kn(d,{elPointsMain:this.elPointsMain,realIndex:e,speed:d.config.chart.animations.dynamicAnimation.speed}):(d.globals.delayedElements.push({el:this.elPointsMain.node,index:e}),kn(d,{elPointsMain:this.elPointsMain,realIndex:e,speed:d.config.chart.animations.dynamicAnimation.speed}),Ge(d,e)&&((a=this.elDataLabelsWrap)!=null&&a.node)&&(this.elDataLabelsWrap.node.classList.add("apexcharts-element-hidden"),d.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));let _={i:s,realIndex:e,animationDelay:s,initialSpeed:d.config.chart.animations.speed,dataChangeSpeed:d.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${t}`},w=i.numericXY;if(t==="area"){let y=p.fillPath({seriesNumber:e});for(let v=0;v<i.areaPaths.length;v++){let A=g.renderPaths(j(G({},_),{pathFrom:m?vn(i.areaPaths[v],m):(r=(n=b?.area)==null?void 0:n.from)!=null?r:i.pathFromArea,pathTo:i.areaPaths[v],pathToNumeric:w?{xs:w.xs,ys:w.ys,closeY:w.areaCloseY}:void 0,pathToInterp:(o=b?.area)==null?void 0:o.toInterp,scrollMorph:!!m,stroke:"none",strokeWidth:0,strokeLineCap:null,fill:y}));this.elSeries.add(A)}}if(d.config.stroke.show&&!this.pointsChart){let y=null;if(t==="line")y=p.fillPath({seriesNumber:e,i:s});else if(d.config.stroke.fill.type==="solid")y=d.globals.stroke.colors[e];else{let v=d.config.fill;d.config.fill=d.config.stroke.fill,y=p.fillPath({seriesNumber:e,i:s}),d.config.fill=v}for(let v=0;v<i.linePaths.length;v++){let A=y;t==="rangeArea"&&(A=p.fillPath({seriesNumber:e}));let S=j(G({},_),{pathFrom:m?vn(i.linePaths[v],m):(c=(l=b?.line)==null?void 0:l.from)!=null?c:i.pathFromLine,pathTo:i.linePaths[v],pathToNumeric:w?{xs:w.xs,ys:w.ys}:void 0,pathToInterp:(h=b?.line)==null?void 0:h.toInterp,scrollMorph:!!m,stroke:y,strokeWidth:this.strokeWidth,strokeLineCap:d.config.stroke.lineCap,fill:t==="rangeArea"?A:"none"}),C=g.renderPaths(S);if(this.elSeries.add(C),C.attr("fill-rule","evenodd"),x.count>0&&t!=="rangeArea"){let M=g.renderPaths(S);M.node.setAttribute("stroke-dasharray",x.dashArray),x.strokeWidth&&M.node.setAttribute("stroke-width",x.strokeWidth),this.elSeries.add(M),M.attr("clip-path",`url(#forecastMask${d.globals.cuid})`),C.attr("clip-path",`url(#nonForecastMask${d.globals.cuid})`)}}}}_iterateOverDataPoints({type:t,series:e,iterations:s,realIndex:i,translationsIndex:a,i:n,x:r,y:o,pX:l,pY:c,pathsFrom:h,linePaths:d,areaPaths:f,seriesIndex:g,lineYPosition:p,xArrj:m,yArrj:b,y2Arrj:x,isRangeStart:_,seriesRangeEnd:w}){var y,v;let A=this.w,S=new B(this.w),C=this.yRatio,{prevY:M,linePath:k,areaPath:L,pathFromLine:E,pathFromArea:D}=h,P=T.isNumber(A.globals.minYArr[i])?A.globals.minYArr[i]:A.globals.minY;s||(s=A.globals.dataPoints>1?A.globals.dataPoints-1:A.globals.dataPoints);let F=(I,U)=>U-I/C[a]+(this.isReversed?I/C[a]:0)*2,R=o,N=A.config.chart.stacked&&!A.globals.comboCharts||A.config.chart.stacked&&A.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((y=this.w.config.series[i])==null?void 0:y.type)==="bar"||((v=this.w.config.series[i])==null?void 0:v.type)==="column"),z=A.config.stroke.curve;Array.isArray(z)&&(Array.isArray(g)?z=z[g[n]]:z=z[n]);let $=0,W,Y=this.pointsChart?this._scatterJitterPx(i):null;if(z==="straight"&&!this.pointsChart){let I=this._fastStraightPath({type:t,series:e,i:n,realIndex:i,translationsIndex:a,iterations:s,x:r,y:o,pX:l,pY:c,pathsFrom:h,linePaths:d,areaPaths:f,xArrj:m,yArrj:b,y2Arrj:x,stackSeries:N});if(I)return I}for(let I=0;I<s&&e[n].length!==0;I++){let U=typeof e[n][I+1]>"u"||e[n][I+1]===null;if(A.axisFlags.isXNumeric){let K=A.seriesData.seriesX[i][I+1];typeof A.seriesData.seriesX[i][I+1]>"u"&&(K=A.seriesData.seriesX[i][s-1]),r=(K-A.globals.minX)/this.xRatio}else r=r+this.xDivision;if(N)if(n>0&&A.globals.collapsedSeries.length<A.config.series.length-1){let Q=(tt=>{var dt;for(let st=tt;st>=0;st--){let It=(dt=g?.[st])!=null?dt:st;if(A.globals.collapsedSeriesIndices.indexOf(It)===-1&&A.globals.ancillaryCollapsedSeriesIndices.indexOf(It)===-1)return st}return-1})(n-1);p=Q<0?this.zeroY:this.prevSeriesY[Q][I+1]}else p=this.zeroY;else p=this.zeroY;U?o=F(P,p):(o=F(e[n][I+1],p),t==="rangeArea"&&(R=F(w[n][I+1],p)));let X=r,V=o;if(Y){let K=i*100003+(I+1);Y.x&&(X=r+(Sa(K*7919+13)-.5)*2*Y.x),Y.y&&(V=o+(Sa(K*6271+97)-.5)*2*Y.y)}m.push(e[n][I+1]===null?null:X),U&&(A.config.stroke.curve==="smooth"||A.config.stroke.curve==="monotoneCubic")?(b.push(null),x.push(null)):(b.push(V),x.push(R));let q=this.lineHelpers.calculatePoints({series:e,x:X,y:V,realIndex:i,i:n,j:I,prevY:M}),Z=this._createPaths({type:t,series:e,i:n,j:I,x:r,y:o,y2:R,xArrj:m,yArrj:b,y2Arrj:x,pX:l,pY:c,pathState:$,segmentStartX:W,linePath:k,areaPath:L,linePaths:d,areaPaths:f,curve:z,isRangeStart:_});f=Z.areaPaths,d=Z.linePaths,l=Z.pX,c=Z.pY,$=Z.pathState,W=Z.segmentStartX,L=Z.areaPath,k=Z.linePath,this.appendPathFrom&&!A.globals.hasNullValues&&!(z==="monotoneCubic"&&t==="rangeArea")&&(E+=S.line(r,this.areaBottomY),D+=S.line(r,this.areaBottomY)),this.handleNullDataPoints(e,q,n,I,i),this._handleMarkersAndLabels({type:t,pointsPos:q,i:n,j:I,realIndex:i,isRangeStart:_})}return{yArrj:b,xArrj:m,pathFromArea:D,areaPaths:f,pathFromLine:E,linePaths:d,linePath:k,areaPath:L}}_handleMarkersAndLabels({type:t,pointsPos:e,isRangeStart:s,i,j:a,realIndex:n}){let r=this.w,o=new Et(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:n,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!r.globals.dataChanged&&!r.globals.resized)&&r.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");let h=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:n,j:a+1});h!==null&&h!==this._elLastPointsWrap&&(this.elPointsMain.add(h),this._elLastPointsWrap=h)}let l=o.drawDataLabel({type:t,isRangeStart:s,pos:e,i:n,j:a+1});l!==null&&this.elDataLabelsWrap.add(l)}_scatterJitterPx(t){var e;let s=this.w,i=(e=s.config.plotOptions.scatter)==null?void 0:e.jitter;if(!i||!i.enabled||!i.x&&!i.y)return null;let a=s.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,n=this.yRatio.length>1?t:0,r=this.yRatio[n]?1/this.yRatio[n]:0;return{x:(i.x||0)*a,y:(i.y||0)*r}}_fastStraightPath({type:t,series:e,i:s,realIndex:i,translationsIndex:a,iterations:n,x:r,y:o,pX:l,pY:c,pathsFrom:h,linePaths:d,areaPaths:f,xArrj:g,yArrj:p,y2Arrj:m,stackSeries:b}){let x=this.w;if(t!=="line"&&t!=="area"||x.globals.comboCharts||b||x.config.dataLabels.enabled||x.config.markers.discrete.length||x.globals.markers.size[i]>0)return null;let _=e[s],w=_.length;if(!n||w<2||w-1!==n)return null;for(let st=0;st<=n;st++){let It=_[st];if(It===null||typeof It>"u")return null}let y=x.axisFlags.isXNumeric,v=y?x.seriesData.seriesX[i]:null;if(y&&(!v||v.length<w))return null;let A=this.yRatio[a],S=this.isReversed,C=this.zeroY,M=this.areaBottomY,k=this.xRatio,L=x.globals.minX,E=this.xDivision,D=x.config.markers.offsetX,P=x.config.markers.offsetY,F=this.appendPathFrom&&!x.globals.hasNullValues,{pathFromLine:R,pathFromArea:N}=h,z=this.ctx&&this.ctx.renderer,$=!!(z&&z.kind&&z.kind!=="svg"),W=!$||x.globals.dataChanged&&!!x.globals.prevStreamFrame,Y=$?new Float64Array(w):null,I=$?new Float64Array(w):null;Y&&I&&(Y[0]=l,I[0]=c),typeof x.globals.pointsArray[i]>"u"&&(x.globals.pointsArray[i]=[]);let U=x.globals.pointsArray[i],X=v?(v[0]-L)/k+D:this.categoryAxisCorrection+D;U.push([X,h.prevY+P]);let V=W?new Array(n+1):[];W&&(V[0]="M "+l+" "+c);let q=W&&F?new Array(n):null,Z=r,K=l,Q=c;for(let st=0;st<n;st++){v?K=(v[st+1]-L)/k:(Z=Z+E,K=Z);let It=_[st+1];Q=C-It/A+(S?It/A:0)*2,g.push(K),p.push(Q),m.push(o),U.push([K+D,Q+P]),W&&(V[st+1]=" L "+K+" "+Q,q&&(q[st]=" L "+K+" "+M)),Y&&I&&(Y[st+1]=K,I[st+1]=Q)}let tt="",dt="";if(W&&(tt=V.join(""),dt=tt+" L "+K+" "+M+" L "+l+" "+M+"z"),q){let st=q.join("");R+=st,N+=st}else!W&&F&&(R+=" L "+K+" "+M,N+=" L "+K+" "+M);return d.push(tt),f.push(dt),{yArrj:p,xArrj:g,pathFromArea:N,areaPaths:f,pathFromLine:R,linePaths:d,linePath:tt,areaPath:dt,numericXY:Y?{xs:Y,ys:I,areaCloseY:M}:void 0}}_createPaths({type:t,series:e,i:s,j:i,x:a,y:n,xArrj:r,yArrj:o,y2:l,y2Arrj:c,pX:h,pY:d,pathState:f,segmentStartX:g,linePath:p,areaPath:m,linePaths:b,areaPaths:x,curve:_,isRangeStart:w}){let y=new B(this.w),v=this.areaBottomY,A=t==="rangeArea",S=t==="rangeArea"&&w;switch(_){case"monotoneCubic":{let C=w?o:c,M=(E,D)=>E.map((P,F)=>[P,D[F]]).filter(P=>P[1]!==null),k=E=>{let D=[],P=0;return E.forEach(F=>{F!==null?P++:P>0&&(D.push(P),P=0)}),P>0&&D.push(P),D},L=(E,D)=>{let P=k(E),F=[];for(let R=0,N=0;R<P.length;N+=P[R++])F[R]=Ca.slice(D,N,N+P[R]);return F};switch(f){case 0:if(C[i+1]===null)break;f=1;case 1:if(!(A?r.length===e[s].length:i===e[s].length-2))break;case 2:{let E=w?r:r.slice().reverse(),D=w?C:C.slice().reverse(),P=M(E,D),F=P.length>1?Ca.points(P):P,R=[];A&&(S?x=P:R=x.reverse());let N=0,z=0;if(L(D,F).forEach($=>{N++;let W=go($),Y=z;z+=$.length;let I=z-1;S?p=y.move(P[Y][0],P[Y][1])+W:A?p=y.move(R[Y][0],R[Y][1])+y.line(P[Y][0],P[Y][1])+W+y.line(R[I][0],R[I][1]):(p=y.move(P[Y][0],P[Y][1])+W,m=p+y.line(P[I][0],v)+y.line(P[Y][0],v)+"z",x.push(m)),b.push(p)}),A&&N>1&&!S){let $=b.slice(N).reverse();b.splice(N),$.forEach(W=>b.push(W))}f=0;break}}break}case"smooth":{let C=(a-h)*.35;if(e[s][i]===null)f=0;else switch(f){case 0:if(g=h,S?p=y.move(h,c[i])+y.line(h,d):p=y.move(h,d),m=y.move(h,d),e[s][i+1]===null||typeof e[s][i+1]>"u"){b.push(p),x.push(m);break}if(f=1,i<e[s].length-2){let M=y.curve(h+C,d,a-C,n,a,n);p+=M,m+=M;break}case 1:if(e[s][i+1]===null)S?p+=y.line(h,l):p+=y.move(h,d),m+=y.line(h,v)+y.line(g,v)+"z",b.push(p),x.push(m),f=-1;else{let M=y.curve(h+C,d,a-C,n,a,n);p+=M,m+=M,i>=e[s].length-2&&(S&&(p+=y.curve(a,n,a,n,a,l)+y.move(a,l)),m+=y.curve(a,n,a,n,a,v)+y.line(g,v)+"z",b.push(p),x.push(m),f=-1)}break}h=a,d=n;break}default:{let C=(M,k,L)=>{let E="";switch(M){case"stepline":E=y.line(k,null,"H")+y.line(null,L,"V");break;case"linestep":E=y.line(null,L,"V")+y.line(k,null,"H");break;case"straight":E=y.line(k,L);break}return E};if(e[s][i]===null)f=0;else switch(f){case 0:if(g=h,S?p=y.move(h,c[i])+y.line(h,d):p=y.move(h,d),m=y.move(h,d),e[s][i+1]===null||typeof e[s][i+1]>"u"){b.push(p),x.push(m);break}if(f=1,i<e[s].length-2){let M=C(_,a,n);p+=M,m+=M;break}case 1:if(e[s][i+1]===null)S?p+=y.line(h,l):p+=y.move(h,d),m+=y.line(h,v)+y.line(g,v)+"z",b.push(p),x.push(m),f=-1;else{let M=C(_,a,n);p+=M,m+=M,i>=e[s].length-2&&(S&&(p+=y.line(a,l)),m+=y.line(a,v)+y.line(g,v)+"z",b.push(p),x.push(m),f=-1)}break}h=a,d=n;break}}return{linePaths:b,areaPaths:x,pX:h,pY:d,pathState:f,segmentStartX:g,linePath:p,areaPath:m}}handleNullDataPoints(t,e,s,i,a){let n=this.w;if(t[s][i]===null&&n.config.markers.showNullDataPoints||t[s].length===1){let r=this.strokeWidth-n.config.markers.strokeWidth/2;r>0||(r=0);let o=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:a,j:i+1,pSize:r,alwaysDrawMarker:!0});o!==null&&this.elPointsMain.add(o)}}};function po(u,t){let{lines:e,lineHeight:s,anchor:i,elbow:a,labelX:n,labelY:r,side:o,connector:l,style:c,foreColor:h}=t,d=new B(u),f=d.group({class:t.groupClass||"apexcharts-outer-label-group"});if(l.show){let x=`M ${i.x} ${i.y} L ${a.x} ${a.y} L ${n} ${r}`,_=d.drawPath({d:x,stroke:l.color,strokeWidth:l.width,fill:"none",strokeLinecap:"round"});_.node.classList.add(t.connectorClass||"apexcharts-outer-label-connector"),f.add(_)}let g=o==="right"?n+4:n-4,p=e.length,m=r-(p-1)*s/2,b=d.drawText({x:g,y:m,text:p===1?e[0]:e,textAnchor:o==="right"?"start":"end",fontSize:c.fontSize,fontFamily:c.fontFamily,fontWeight:c.fontWeight,foreColor:h,dominantBaseline:"central",cssClass:t.textClass||"apexcharts-outer-label"});if(p>1){let x=b.node.getElementsByTagName("tspan");for(let _=0;_<x.length;_++)x[_].setAttribute("x",`${g}`),x[_].setAttribute("dy",_===0?"0":`${s}`)}return f.add(b),f}function md(u,t,e={}){let s=new B(u),i=e.fontSize||"12px",a=parseFloat(i)||12,n=0;return t.forEach(r=>{if(r==null||r==="")return;let o=`${r}`,l=s.getTextRects(o,i,e.fontFamily,"").width;n=Math.max(n,l>0?l:o.length*a*.58)}),n}function mo(u,t,e,s){let i=u.slice().sort((r,o)=>r.idealY-o.idealY);i.forEach(r=>{r.labelY=r.idealY});for(let r=1;r<i.length;r++)i[r].labelY-i[r-1].labelY<t&&(i[r].labelY=i[r-1].labelY+t);let a=i[i.length-1],n=a?a.labelY-e:0;if(n>0)for(let r=i.length-1;r>=0;r--)i[r].labelY-=n,r<i.length-1&&i[r+1].labelY-i[r].labelY<t&&(i[r].labelY=i[r+1].labelY-t);if(s!=null&&i.length&&i[0].labelY<s){let r=s-i[0].labelY;for(let o=0;o<i.length;o++)i[o].labelY+=r}}var me=class{constructor(t){this.w=t}drawYAxisTexts(t,e,s,i){let a=this.w,n=a.config.yaxis[0],r=a.formatters.yLabelFormatters[0];return new B(this.w).drawText({x:t+n.labels.offsetX,y:e+n.labels.offsetY,text:r(i,s),textAnchor:"middle",fontSize:n.labels.style.fontSize,fontFamily:n.labels.style.fontFamily,foreColor:Array.isArray(n.labels.style.colors)?n.labels.style.colors[s]:n.labels.style.colors})}getMaxLabelWidth(t,{fontSize:e,fontFamily:s}={}){let i=new B(this.w),a=0;return t.forEach(n=>{if(n===null||typeof n>"u"||n==="")return;let r=i.getTextRects(`${n}`,e||"12px",s,"");a=Math.max(a,r.width)}),a}drawExternalLabel(t){return po(this.w,j(G({},t),{groupClass:"apexcharts-pie-name-label-group",textClass:"apexcharts-pie-name-label",connectorClass:"apexcharts-pie-label-connector"}))}},pr=Math.PI/180,Ea=180/Math.PI;function ja(u,t,e,s){return{x:u+e*Math.cos((s-90)*pr),y:t+e*Math.sin((s-90)*pr)}}var ot=u=>`${u.x} ${u.y}`;function Ta({cx:u,cy:t,rIn:e,rOut:s,a0:i,a1:a,r:n,spanDeg:r}){let o=(C,M)=>ja(u,t,C,M),l=n/s*Ea,c=n/e*Ea,h=o(s,i+l),d=o(s,a-l),f=r-2*l>180?1:0,g=o(s,a),p=o(s-n,a),m=o(s,i),b=o(s-n,i),x=o(e,a-c),_=o(e,i+c),w=r-2*c>180?1:0,y=o(e,a),v=o(e+n,a),A=o(e,i),S=o(e+n,i);return["M",ot(h),"A",s,s,0,f,1,ot(d),"Q",ot(g),ot(p),"L",ot(v),"Q",ot(y),ot(x),"A",e,e,0,w,0,ot(_),"Q",ot(A),ot(S),"L",ot(b),"Q",ot(m),ot(h),"Z"].join(" ")}function xd({cx:u,cy:t,rOut:e,a0:s,a1:i,r:a,spanDeg:n}){let r=(m,b)=>ja(u,t,m,b),o=a/e*Ea,l=r(e,s+o),c=r(e,i-o),h=n-2*o>180?1:0,d=r(e,i),f=r(e-a,i),g=r(e,s),p=r(e-a,s);return["M",ot(l),"A",e,e,0,h,1,ot(c),"Q",ot(d),ot(f),"L",`${u} ${t}`,"L",ot(p),"Q",ot(g),ot(l),"Z"].join(" ")}function xo({cx:u,cy:t,rIn:e,rOut:s,a0:i,a1:a,spanDeg:n}){let r=(f,g)=>ja(u,t,f,g),o=n>180?1:0,l=r(s,i),c=r(s,a),h=r(e,a),d=r(e,i);return["M",ot(l),"A",s,s,0,o,1,ot(c),"L",ot(h),"A",e,e,0,o,0,ot(d),"Z"].join(" ")}var bd="transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)",yd="opacity 180ms ease-out",xe=class{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=Math.min(t.layout.gridWidth,t.layout.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.layout.gridWidth/2,t.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(t.config.plotOptions.pie.endAngle-t.config.plotOptions.pie.startAngle),this.initialAngle=t.config.plotOptions.pie.startAngle%this.fullAngle,t.globals.radialSize=this.defaultSize/2.05-t.config.stroke.width-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.externalCfg=t.config.plotOptions.pie.dataLabels.external;let s=t.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||s.fontSize,fontFamily:this.externalCfg.fontFamily||s.fontFamily,fontWeight:this.externalCfg.fontWeight||s.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,t.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&this.chartType!=="polarArea",this.showExternalLabels&&!t.globals.noData&&this.reserveExternalLabelSpace(),this.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100;let i=t.config.plotOptions.pie.customScale,a=t.layout.gridWidth/2,n=t.layout.gridHeight/2;this.translateX=a-a*i,this.translateY=n-n*i,this.dataLabelsGroup=new B(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${i})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSliceSizes=[],this.sliceLabelGroups={},this.externalLabelGroups={},this.elHoverOutline=null,this.elHoverOutlinePath=null,this.hoverOutlineIndex=-1,this.prevSectorAngleArr=[]}getExternalLabelText(t){var e,s,i;let a=this.w,n=a.seriesData.seriesNames[t],r=this.externalCfg.formatter;return typeof r=="function"?r(n,{seriesIndex:t,percent:(s=(e=a.globals.seriesPercent)==null?void 0:e[t])==null?void 0:s[0],value:(i=a.globals.seriesTotals)==null?void 0:i[t],w:a}):n==null?"":`${n}`}getExternalLabelLines(t){let e=this.getExternalLabelText(t);return(Array.isArray(e)?e:`${e??""}`.split(`
|
|
`)).map(i=>i==null?"":`${i}`)}reserveExternalLabelSpace(){let t=this.w,e=new me(t),s=(t.seriesData.seriesNames||[]).map((d,f)=>this.getExternalLabelLines(f)),i=e.getMaxLabelWidth(s.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=s.reduce((d,f)=>Math.max(d,f.length),1),this.externalLabelLineH=Math.round((parseFloat(this.externalLabelStyle.fontSize)||12)*1.35);let a=this.externalCfg.connector,n=this.externalLabelMaxLines*this.externalLabelLineH,r=i+(a.length||0)+(a.gap||0)+12,o=n/2+(a.gap||0)+6,l=Math.min(t.globals.radialSize,t.layout.gridWidth/2-r,t.layout.gridHeight/2-o);t.globals.radialSize=Math.max(l,this.defaultSize*.15),t.globals.pieExternalLabelMarginY=o;let c=t.config.chart.height?String(t.config.chart.height):"",h=c!==""&&c!=="auto";this.centerY=h?t.layout.gridHeight/2:t.globals.radialSize+o}draw(t){var e;let s=this,i=this.w,a=new B(this.w),n=a.group({class:"apexcharts-pie"});if(i.globals.noData)return n;let r=0;for(let g=0;g<t.length;g++)r+=T.negToZero(t[g]);let o=[],l=a.group();r===0&&(r=1e-5),t.forEach(g=>{this.maxY=Math.max(this.maxY,g)}),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),i.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(n);let c=i.globals.collapsedSeriesIndices||[],h=1;if(this.chartType==="polarArea"){let g=0;for(let p=0;p<t.length;p++)c.indexOf(p)===-1&&g++;h=Math.max(1,g)}for(let g=0;g<t.length;g++){let p=this.fullAngle*T.negToZero(t[g])/r;o.push(p),this.chartType==="polarArea"?(o[g]=c.indexOf(g)>-1?0:this.fullAngle/h,this.sliceSizes.push(i.globals.radialSize*t[g]/(this.maxY||1))):this.sliceSizes.push(i.globals.radialSize)}let d=((e=this.ctx.morphTypeChange)==null?void 0:e.isActive())===!0;if(i.globals.dataChanged&&!d)if(this.chartType==="polarArea"){let g=i.globals.previousPaths,p=i.globals.prevPolarAngles;if(Array.isArray(p)&&p.length===g.length)this.prevSectorAngleArr=p.slice();else for(let b=0;b<g.length;b++)this.prevSectorAngleArr.push(this.fullAngle/Math.max(1,g.length));let m=0;for(let b=0;b<g.length;b++)m=Math.max(m,T.negToZero(g[b]));i.config.yaxis[0].max&&(m=i.config.yaxis[0].max),this.prevSliceSizes=g.map(b=>i.globals.radialSize*T.negToZero(b)/(m||1))}else{let g=0;for(let m=0;m<i.globals.previousPaths.length;m++)g+=T.negToZero(i.globals.previousPaths[m]);let p;for(let m=0;m<i.globals.previousPaths.length;m++)p=this.fullAngle*T.negToZero(i.globals.previousPaths[m])/g,this.prevSectorAngleArr.push(p)}if(this.chartType==="polarArea"&&(i.globals.prevPolarAngles=o.slice()),this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){let g=a.drawCircle(this.donutSize);g.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),l.add(g)}let f=s.drawArcs(o,t);if(this.sliceLabels.forEach(g=>{f.add(g)}),l.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${i.config.plotOptions.pie.customScale})`}),l.add(f),n.add(l),this.donutDataLabels.show){let g=this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged&&this.animDur>0,p=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:g?0:this.donutDataLabels.show});if(g){let m=this.dataLabelsGroup.node;m.style.transition="opacity 280ms ease-out",setTimeout(()=>{m.style.opacity="1"},this.animDur)}n.add(p)}return i.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(n),n}drawArcs(t,e){var s,i,a,n,r;let o=this.w,l=new at(this.w),c=new B(this.w),h=new pt(this.w),d=c.group({class:"apexcharts-slices"});this.elHoverOutline=c.group({class:"apexcharts-pie-hover-outline"}),this.elHoverOutline.node.style.pointerEvents="none",this.elHoverOutline.node.style.opacity="0",o.config.chart.animations.enabled&&(this.elHoverOutline.node.style.transition=yd),d.add(this.elHoverOutline);let f=this.initialAngle,g=this.initialAngle,p=this.initialAngle,m=this.initialAngle;this.strokeWidth=o.config.stroke.show?o.config.stroke.width:0;let b=((s=this.ctx.morphTypeChange)==null?void 0:s.isActive())===!0;for(let x=0;x<t.length;x++){let _=c.group({class:"apexcharts-series apexcharts-pie-series",seriesName:T.escapeString(o.seriesData.seriesNames[x]),rel:x+1,"data:realIndex":x});d.add(_),f=p,g=m,p=f+t[x],m=g+this.prevSectorAngleArr[x];let w=p<f?this.fullAngle+p-f:p-f,y=h.fillPath({seriesNumber:x,size:this.sliceSizes[x],value:e[x]}),v=b?this.ctx.morphTypeChange.getInitialPathFor(x,0):null,A=this.chartType==="polarArea"&&o.globals.dataChanged&&!b?this.prevSliceSizes[x]||0:void 0,S=v||this.getChangedPath(g,m,A),C=c.drawPath({d:S,stroke:Array.isArray(this.lineColorArr)?(i=this.lineColorArr[x])!=null?i:this.lineColorArr[x%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:y,fillOpacity:o.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${x}`});if(C.attr({index:0,j:x}),l.setSelectionFilter(C,0,x),o.config.chart.dropShadow.enabled){let P=o.config.chart.dropShadow;l.dropShadow(C,P,x)}this.addListeners(C,this.donutDataLabels,x);let M={x:0,y:0},k=(f+w/2)%this.fullAngle,L={x:this.centerX,y:this.centerY};this.chartType==="pie"||this.chartType==="polarArea"?(M=T.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize/1.25+o.config.plotOptions.pie.dataLabels.offset,k),L=T.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize/2,k)):this.chartType==="donut"&&(M=T.polarToCartesian(this.centerX,this.centerY,(o.globals.radialSize+this.donutSize)/2+o.config.plotOptions.pie.dataLabels.offset,k),L=T.polarToCartesian(this.centerX,this.centerY,(o.globals.radialSize+this.donutSize)/2,k)),B.setAttrs(C.node,{"data:angle":w,"data:startAngle":f,"data:strokeWidth":this.strokeWidth,"data:value":e[x],"data:cx":L.x,"data:cy":L.y}),_.add(C);let E=!1;if(b){let P=this.getPiePath({me:this,startAngle:f,angle:w,size:this.sliceSizes[x]});C.node.setAttribute("data:pathFinal",P),E=((n=(a=this.ctx.morphTypeChange).claimsTargetMark)==null?void 0:n.call(a,x,0))===!0,E&&(C.attr({d:P}),C.node.setAttribute("data:pathOrig",P),C.node.setAttribute("opacity","0"),C.node.setAttribute("data-piece-hidden","1"))}let D=0;if(this.initialAnim&&!o.globals.resized&&!o.globals.dataChanged?(D=w/this.fullAngle*o.config.chart.animations.speed,D===0&&(D=1),this.animDur=D+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),!E)if(b&&v){let P=this.getPiePath({me:this,startAngle:f,angle:w,size:this.sliceSizes[x]}),F=this.ctx.morphTypeChange.getSpeed(),R=this.ctx.animations;C.node.setAttribute("data:pathOrig",P);let N=C.animate(F).plot(P,"polygons").attr({"stroke-width":this.strokeWidth});N&&typeof N.after=="function"?N.after(()=>R.animationCompleted(C)):R.animationCompleted(C)}else this.dynamicAnim&&o.globals.dataChanged?this.animatePaths(C,{size:this.sliceSizes[x],prevSize:A,endAngle:p,startAngle:f,prevStartAngle:g,prevEndAngle:m,animateStartingPos:!0,i:x,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:o.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(C,{size:this.sliceSizes[x],endAngle:p,startAngle:f,i:x,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:D});if(this.getExpandOffset()>0?C.node.addEventListener("mouseup",this.pieClicked.bind(this,x)):x===0&&at.drilldownBlocksSliceOffset(o)&&((r=this.ctx.drilldown)==null||r.warnSliceOffsetDisabled()),typeof o.interact.selectedDataPoints[0]<"u"&&o.interact.selectedDataPoints[0].indexOf(x)>-1)if(this.initialAnim&&!o.globals.resized&&!o.globals.dataChanged&&this.animDur>0){let P=this,F=x;setTimeout(()=>P.pieClicked(F,{animate:!1}),this.animDur)}else this.pieClicked(x,{animate:!1});if(o.config.dataLabels.enabled){let P=M.x,F=M.y,R=100*w/this.fullAngle+"%";if(w!==0&&o.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[x]){let N=o.config.dataLabels.formatter;N!==void 0&&(R=N(o.globals.seriesPercent[x][0],{seriesIndex:x,w:o}));let z=o.globals.dataLabels.style.colors[x],$=c.group({class:"apexcharts-datalabels"}),W=c.drawText({x:P,y:F,text:R,textAnchor:"middle",fontSize:o.config.dataLabels.style.fontSize,fontFamily:o.config.dataLabels.style.fontFamily,fontWeight:o.config.dataLabels.style.fontWeight,foreColor:z});if($.add(W),o.config.dataLabels.dropShadow.enabled){let Y=o.config.dataLabels.dropShadow;l.dropShadow(W,Y)}W.node.classList.add("apexcharts-pie-label"),o.config.chart.animations.animate&&o.globals.resized===!1&&(W.node.classList.add("apexcharts-pie-label-delay"),W.node.style.animationDelay=o.config.chart.animations.speed/940+"s"),this.sliceLabels.push($),this.sliceLabelGroups[x]=$.node}}if(this.showExternalLabels&&w!==0){let P=this.getExternalLabelLines(x);if(P.some(F=>F!=="")){let F=T.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize,k),R=T.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize+(this.externalCfg.connector.gap||0),k),N=R.x>=this.centerX,z=N?R.x+(this.externalCfg.connector.length||0):R.x-(this.externalCfg.connector.length||0);this.externalLabels.push({i:x,lines:P,anchor:F,elbow:R,side:N?"right":"left",labelX:z+parseFloat(this.externalCfg.offsetX||0),idealY:R.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||o.globals.colors[x],foreColor:this.externalCfg.color||o.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();let x=H.isBrowser()&&(b||this.dynamicAnim&&o.globals.dataChanged||this.initialAnim&&!o.globals.resized&&!o.globals.dataChanged);this.externalLabels.forEach(_=>{let w=new me(o).drawExternalLabel({lines:_.lines,lineHeight:this.externalLabelLineH,anchor:_.anchor,elbow:_.elbow,labelX:_.labelX,labelY:_.labelY,side:_.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:_.connectorColor},style:this.externalLabelStyle,foreColor:_.foreColor});x&&(w.node.classList.add("apexcharts-element-hidden"),o.globals.delayedElements.push({el:w.node})),this.externalLabelGroups[_.i]=w.node,d.add(w)})}return d}placeExternalLabels(){let t=this.w,e=this.externalLabelMaxLines*this.externalLabelLineH+2,s=this.centerY+t.globals.radialSize+t.globals.pieExternalLabelMarginY;["left","right"].forEach(i=>{mo(this.externalLabels.filter(a=>a.side===i),e,s)})}addListeners(t,e,s){let i=new B(this.w,this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(i,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(i,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),typeof s=="number"&&(t.node.addEventListener("mouseenter",this.showHoverOutline.bind(this,s)),t.node.addEventListener("mouseleave",this.hideHoverOutline.bind(this))),t.node.addEventListener("mousedown",i.pathMouseDown.bind(i,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}animatePaths(t,e){let s=this.w,i=this,a=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,n=a,r=e.startAngle,o=e.startAngle;e.prevStartAngle!==void 0&&e.prevEndAngle!==void 0&&(r=e.prevEndAngle,n=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===s.config.series.length-1&&(a+o>this.fullAngle?e.endAngle=e.endAngle-(a+o):a+o<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(a+o)))),a===this.fullAngle&&(a=this.fullAngle-.01),i.animateArc(t,r,o,a,n,e)}animateArc(t,e,s,i,a,n){let r=this,o=this.w,l=new St(this.w),c=n.size,h;(isNaN(e)||isNaN(a))&&(e=s,a=i,n.dur=0);let d=i,f=s,g=e<s?this.fullAngle+e-s:e-s,p=typeof n.prevSize=="number";o.globals.dataChanged&&n.shouldSetPrevPaths&&n.prevEndAngle&&(h=r.getPiePath({me:r,startAngle:n.prevStartAngle,angle:n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle,size:p?n.prevSize:c}),t.attr({d:h})),n.dur!==0?t.animate(n.dur,n.animBeginArr[n.i]).after(function(){(r.chartType==="pie"||r.chartType==="donut"||r.chartType==="polarArea")&&this.animate(o.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":r.strokeWidth}),n.i===o.config.series.length-1&&l.animationCompleted(t)}).during(m=>{d=g+(i-g)*m,n.animateStartingPos&&(d=a+(i-a)*m,f=e-a+(s-(e-a))*m),h=r.getPiePath({me:r,startAngle:f,angle:d,size:p?n.prevSize+(c-n.prevSize)*m:c}),t.node.setAttribute("data:pathOrig",h),t.attr({d:h})}):(h=r.getPiePath({me:r,startAngle:f,angle:i,size:c}),n.isTrack||(o.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",h),t.attr({d:h,"stroke-width":r.strokeWidth}))}pieClicked(t,e){let s=this.w,i=this,a=!(e&&e.animate===!1),n=s.dom.Paper.findOne(`.apexcharts-${i.chartType.toLowerCase()}-slice-${t}`);if(!n)return;if(n.attr("data:pieClicked")==="true"){n.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(),this.offsetSlice(t,0,a);return}let r=s.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(r,o=>{let l=o.getAttribute("data:pieClicked")==="true";o.setAttribute("data:pieClicked","false"),l&&this.offsetSlice(parseInt(o.getAttribute("j"),10),0,a)}),s.interact.capturedDataPointIndex=t,n.attr("data:pieClicked","true"),this.offsetSlice(t,this.getExpandOffset(),a)}getExpandOffset(){let t=this.w.config.plotOptions.pie;if(!t.expandOnClick||this.chartType==="polarArea"||at.drilldownBlocksSliceOffset(this.w))return 0;let e=Number(t.expandOffset);return Number.isFinite(e)&&e>0?e:0}getSliceMovers(t){let e=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);return[e?e.node:null,this.sliceLabelGroups[t],this.externalLabelGroups[t],this.hoverOutlineIndex===t&&this.elHoverOutlinePath?this.elHoverOutlinePath.node:null].filter(Boolean)}offsetSlice(t,e,s=!0){let i=this.w;if(!i.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`))return;let{dx:n,dy:r}=this.getSliceOffsetVector(t,e),o=`translate(${n} ${r})`,l=s&&i.config.chart.animations.enabled?bd:"";this.getSliceMovers(t).forEach(c=>{c.style.transition=l,c.setAttribute("transform",o)})}getSliceOffsetVector(t,e){let s=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`),i=s?parseFloat(s.attr("data:angle")):NaN;if(!e||!Number.isFinite(i)||i>=this.fullAngle)return{dx:0,dy:0};let a=parseFloat(s.attr("data:startAngle")),n=Math.PI*(a+i/2-90)/180;return{dx:e*Math.cos(n),dy:e*Math.sin(n)}}showHoverOutline(t){let e=this.w;if(!at.hoverOutlineOwnsHoverState(e)||!this.elHoverOutline)return;let s=this.getHoverOutlinePath(t);if(!s)return;let i=e.config.plotOptions.pie.hoverOutline,a=i.color||e.globals.colors[t];if(!this.elHoverOutlinePath){let o=new B(e);this.elHoverOutlinePath=o.drawPath({d:s,fill:a,strokeWidth:0,classes:"apexcharts-pie-hover-outline-band"}),this.elHoverOutline.add(this.elHoverOutlinePath)}this.elHoverOutlinePath.attr({d:s,fill:a,"fill-opacity":i.opacity});let{dx:n,dy:r}=this.getSliceOffsetVector(t,this.isSliceOut(t)?this.getExpandOffset():0);this.elHoverOutlinePath.node.style.transition="",this.elHoverOutlinePath.node.setAttribute("transform",`translate(${n} ${r})`),this.hoverOutlineIndex=t,this.elHoverOutline.node.style.opacity="1"}hideHoverOutline(){this.elHoverOutline&&(this.elHoverOutline.node.style.opacity="0")}isSliceOut(t){let e=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);return!!e&&e.attr("data:pieClicked")==="true"}getHoverOutlinePath(t){let e=this.w,s=e.config.plotOptions.pie.hoverOutline,i=e.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);if(!i)return null;let a=parseFloat(i.attr("data:angle"));if(!Number.isFinite(a)||a<=0)return null;let n=this.sliceSizes[t],r=Number(s.size);if(!Number.isFinite(n)||!Number.isFinite(r)||r<=0)return null;let{startDeg:o,spanDeg:l}=this.getSliceExtent({me:this,startAngle:parseFloat(i.attr("data:startAngle")),angle:a,size:n});if(!(l>0))return null;let c=n+(this.strokeWidth||0)/2+(Number(s.gap)||0),h=c+r,d={cx:this.centerX,cy:this.centerY,rIn:c,rOut:h,a0:o,a1:o+l,spanDeg:l},f=Math.min(r/2,l*Math.PI/180/2*c);return f>.5?Ta(j(G({},d),{r:f})):xo(d)}getChangedPath(t,e,s){let i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:t,angle:e-t,size:typeof s=="number"?s:this.size})),i}getSliceExtent({me:t,startAngle:e,angle:s,size:i}){let a=this.w,n=e,r=s+e;Math.ceil(r)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(r=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01);let o=r-n,l=t.chartType==="pie"||t.chartType==="donut"||t.chartType==="polarArea",c=a.config.plotOptions.pie.spacing;if(l&&c>0&&o>0){let h=t.chartType==="donut"?(i+t.donutSize)/2:i,d=h>0?c/h*(180/Math.PI):0,f=Math.min(d/2,Math.max(0,o/2-.5));n+=f,o-=2*f}return r=n+o,Math.ceil(r)>this.fullAngle&&(r-=this.fullAngle),{startDeg:n,spanDeg:o,endDeg:r}}getPiePath({me:t,startAngle:e,angle:s,size:i}){let a,n=this.w,r=new B(this.w),{startDeg:o,spanDeg:l,endDeg:c}=this.getSliceExtent({me:t,startAngle:e,angle:s,size:i}),h=t.chartType==="pie"||t.chartType==="donut"||t.chartType==="polarArea",d=Math.PI*(o-90)/180,f=n.config.plotOptions.pie.borderRadius;if(f>0&&h){let A=this.getRoundedSlicePath({me:t,startDeg:o,spanDeg:l,size:i,borderRadius:f});if(A)return A}let g=Math.PI*(c-90)/180,p=t.centerX+i*Math.cos(d),m=t.centerY+i*Math.sin(d),b=t.centerX+i*Math.cos(g),x=t.centerY+i*Math.sin(g),_=T.polarToCartesian(t.centerX,t.centerY,t.donutSize,c),w=T.polarToCartesian(t.centerX,t.centerY,t.donutSize,o),y=l>180?1:0,v=["M",p,m,"A",i,i,0,y,1,b,x];return t.chartType==="donut"?a=[...v,"L",_.x,_.y,"A",t.donutSize,t.donutSize,0,y,0,w.x,w.y,"L",p,m,"z"].join(" "):t.chartType==="pie"||t.chartType==="polarArea"?a=[...v,"L",t.centerX,t.centerY,"L",p,m].join(" "):a=[...v].join(" "),r.roundPathCorners(a,this.strokeWidth*2)}getRoundedSlicePath({me:t,startDeg:e,spanDeg:s,size:i,borderRadius:a}){if(!(s>0))return null;let n=Math.PI/180,r=t.centerX,o=t.centerY,l=t.chartType==="donut",c=i,h=l?t.donutSize:0,d=s*n,f=a;if(f=Math.min(f,d*c/2),l?(f=Math.min(f,d*h/2),f=Math.min(f,(c-h)/2)):f=Math.min(f,c/2),!(f>.5))return null;let g=e,p=e+s;return l?Ta({cx:r,cy:o,rIn:h,rOut:c,a0:g,a1:p,r:f,spanDeg:s}):xd({cx:r,cy:o,rOut:c,a0:g,a1:p,r:f,spanDeg:s})}drawPolarElements(t){let e=this.w,s=new us(this.w),i=new B(this.w),a=new me(this.w),n=i.group(),r=i.group(),o=s.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;let h=e.globals.radialSize,d=h/(c-1);for(let f=0;f<c-1;f++){let g=i.drawCircle(h);if(g.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.rings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){let p=a.drawYAxisTexts(this.centerX,this.centerY-h+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,f,l[f]);r.add(p)}n.add(g),h=h-d}this.drawSpokes(t),t.add(n),t.add(r)}renderInnerDataLabels(t,e,s){let i=this.w,a=new B(this.w),n=e.total.show;t.node.innerHTML="",t.node.style.opacity=s.opacity;let r=s.centerX,o=this.donutDataLabels.total.label?s.centerY:s.centerY-s.centerY/6,l,c;e.name.color===void 0?l=i.globals.colors[0]:l=e.name.color;let h=e.name.fontSize,d=e.name.fontFamily,f=e.name.fontWeight;e.value.color===void 0?c=i.config.chart.foreColor:c=e.value.color;let g=e.value.formatter,p="",m="";if(n?(l=e.total.color,h=e.total.fontSize,d=e.total.fontFamily,f=e.total.fontWeight,m=this.donutDataLabels.total.label?e.total.label:"",p=e.total.formatter(i)):i.seriesData.series.length===1&&(p=g(i.seriesData.series[0],i),m=i.seriesData.seriesNames[0]),m&&(m=e.name.formatter(m,e.total.show,i)),e.name.show){let b=a.drawText({x:r,y:o+parseFloat(e.name.offsetY),text:m,textAnchor:"middle",foreColor:l,fontSize:h,fontWeight:f,fontFamily:d});b.node.classList.add("apexcharts-datalabel-label"),t.add(b)}if(e.value.show){let b=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,x=a.drawText({x:r,y:o+b,text:p,textAnchor:"middle",foreColor:c,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});x.node.classList.add("apexcharts-datalabel-value"),t.add(x)}return t}printInnerLabels(t,e,s,i){let a=this.w,n;i?t.name.color===void 0?n=a.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:n=t.name.color:a.seriesData.series.length>1&&t.total.show&&(n=t.total.color);let r=a.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=a.dom.baseEl.querySelector(".apexcharts-datalabel-value"),l=t.value.formatter;s=l(s,a),!i&&typeof t.total.formatter=="function"&&(s=t.total.formatter(a));let c=e===t.total.label;if(e=this.donutDataLabels.total.label?t.name.formatter(e,c,a):"",r!==null&&(r.textContent=e),o!==null&&(o.textContent=s),r!==null){let h=r;h.style.fill=n}}printDataLabelsInner(t,e){let s=this.w,i=t.getAttribute("data:value"),a=s.seriesData.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];s.seriesData.series.length>1&&this.printInnerLabels(e,a,i,t);let n=s.dom.baseEl.querySelector(".apexcharts-datalabels-group");if(n!==null){let r=n;r.style.opacity="1"}}drawSpokes(t){let e=this.w,s=new B(this.w),i=e.config.plotOptions.polarArea.spokes;if(i.strokeWidth===0)return;let a=[],n=360/e.seriesData.series.length;for(let r=0;r<e.seriesData.series.length;r++)a.push(T.polarToCartesian(this.centerX,this.centerY,e.globals.radialSize,e.config.plotOptions.pie.startAngle+n*r));a.forEach((r,o)=>{let l=s.drawLine(r.x,r.y,this.centerX,this.centerY,Array.isArray(i.connectorColors)?i.connectorColors[o]:i.connectorColors);t.add(l)})}revertDataLabelsInner(){let t=this.w;if(this.donutDataLabels.show){let e=t.dom.Paper.findOne(".apexcharts-datalabels-group"),s=this.renderInnerDataLabels(e,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});t.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(s)}}},wd=5,Pa=class{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new B(this.w),this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight<t.globals.svgWidth?t.layout.gridHeight:t.layout.gridWidth,this.isLog=t.config.yaxis[0].logarithmic,this.logBase=t.config.yaxis[0].logBase,this.coreUtils=new lt(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,t.globals.maxY,0):t.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):t.globals.minY,this.polygons=t.config.plotOptions.radar.polygons,this.strokeWidth=t.config.stroke.show?t.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-t.config.chart.dropShadow.blur,t.config.xaxis.labels.show&&(this.size=this.size-t.layout.xAxisLabelsWidth/1.75),t.config.plotOptions.radar.size!==void 0&&(this.size=t.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(t){let e=this.w,s=new pt(this.w),i=[],a=new Et(this.w,this.ctx);t.length&&(this.dataPointsLen=t[e.globals.maxValsInArrayIndex].length),this.disAngle=Math.PI*2/this.dataPointsLen;let n=e.layout.gridWidth/2,r=e.layout.gridHeight/2,o=n+e.config.plotOptions.radar.offsetX,l=r+e.config.plotOptions.radar.offsetY,c=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:`translate(${o||0}, ${l||0})`}),h=[],d=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((g,p)=>{let m=g.length===e.globals.dataPoints,b=this.graphics.group().attr({class:"apexcharts-series","data:longestSeries":m,seriesName:T.escapeString(e.seriesData.seriesNames[p]),rel:p+1,"data:realIndex":p});this.dataRadiusOfPercent[p]=[],this.dataRadius[p]=[],this.angleArr[p]=[],g.forEach((y,v)=>{let A=Math.abs(this.maxValue-this.minValue);y=y-this.minValue,this.isLog&&(y=this.coreUtils.getLogVal(this.logBase,y,0)),this.dataRadiusOfPercent[p][v]=y/A,this.dataRadius[p][v]=this.dataRadiusOfPercent[p][v]*this.size,this.angleArr[p][v]=v*this.disAngle}),h=this.getDataPointsPos(this.dataRadius[p],this.angleArr[p]);let x=this.createPaths(h,{x:0,y:0});d=this.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),e.globals.delayedElements.push({el:d.node,index:p});let _={i:p,realIndex:p,animationDelay:p,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[p],strokeLineCap:e.config.stroke.lineCap},w=null;e.globals.previousPaths.length>0&&(w=this.getPreviousPath(p));for(let y=0;y<x.linePathsTo.length;y++){let v=this.graphics.renderPaths(j(G({},_),{pathFrom:w===null?x.linePathsFrom[y]:w,pathTo:x.linePathsTo[y],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[p]:this.strokeWidth,fill:"none",drawShadow:!1}));b.add(v);let A=s.fillPath({seriesNumber:p}),S=this.graphics.renderPaths(j(G({},_),{pathFrom:w===null?x.areaPathsFrom[y]:w,pathTo:x.areaPathsTo[y],strokeWidth:0,fill:A,drawShadow:!1,drawMask:{type:"radial",cx:0,cy:0,r:this.size}}));if(e.config.chart.dropShadow.enabled){let C=new at(this.w),M=e.config.chart.dropShadow;C.dropShadow(S,Object.assign({},M,{noUserSpaceOnUse:!0}),p)}b.add(S)}g.forEach((y,v)=>{let S=new zt(this.w,this.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:p,dataPointIndex:v});S.pSize||(S.pSize=wd,S.pointFillColor="transparent",S.pointStrokeColor="transparent",S.pointStrokeWidth=0);let C=this.graphics.drawMarker(h[v].x,h[v].y,S);C.attr("rel",v),C.attr("j",v),C.attr("index",p),C.node.setAttribute("default-marker-size",S.pSize);let M=this.graphics.group({class:"apexcharts-series-markers"});M&&M.add(C),d.add(M),b.add(d);let k=e.config.dataLabels;if(k.enabled){let L=k.formatter(e.seriesData.series[p][v],{seriesIndex:p,dataPointIndex:v,w:e});a.plotDataLabelsText({x:h[v].x,y:h[v].y,text:L,textAnchor:"middle",i:p,j:p,seriesIndex:p,dataPointIndex:v,parent:f,offsetCorrection:!1,dataLabelsConfig:G({},k)})}b.add(f)}),i.push(b)}),this.drawPolygons({parent:c}),e.config.xaxis.labels.show){let g=this.drawXAxisTexts();c.add(g)}return i.forEach(g=>{c.add(g)}),c.add(this.yaxisLabels),c}drawPolygons(t){let e=this.w,{parent:s}=t,i=new me(this.w),a=e.globals.yAxisScale[0].result.reverse(),n=a.length,r=[],o=this.size/(n-1);for(let h=0;h<n;h++)r[h]=o*h;r.reverse();let l=[],c=[];r.forEach((h,d)=>{let f=T.getPolygonPos(h,this.dataPointsLen),g="";f.forEach((p,m)=>{if(d===0){let b=this.graphics.drawLine(p.x,p.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[m]:this.polygons.connectorColors);c.push(b)}m===0&&this.yaxisLabelsTextsPos.push({x:p.x,y:p.y}),g+=p.x+","+p.y+" "}),l.push(g)}),l.forEach((h,d)=>{let f=this.polygons.strokeColors,g=this.polygons.strokeWidth,p=this.graphics.drawPolygon(h,Array.isArray(f)?f[d]:f,Array.isArray(g)?g[d]:g,e.globals.radarPolygons.fill.colors[d]);s.add(p)}),c.forEach(h=>{s.add(h)}),e.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((h,d)=>{let f=i.drawYAxisTexts(h.x,h.y,d,a[d]);this.yaxisLabels.add(f)})}drawXAxisTexts(){let t=this.w,e=t.config.xaxis.labels,s=this.graphics.group({class:"apexcharts-xaxis"}),i=T.getPolygonPos(this.size,this.dataPointsLen);return t.labelData.labels.forEach((a,n)=>{let r=t.config.xaxis.labels.formatter,o=new Et(this.w,this.ctx);if(i[n]){let l=this.getTextPos(i[n],this.size),c=r(a,{seriesIndex:-1,dataPointIndex:n,w:t});o.plotDataLabelsText({x:l.newX,y:l.newY,text:c,textAnchor:l.textAnchor,i:n,j:n,parent:s,className:"apexcharts-xaxis-label",color:Array.isArray(e.style.colors)&&e.style.colors[n]?e.style.colors[n]:"#a8a8a8",dataLabelsConfig:G({textAnchor:l.textAnchor,dropShadow:{enabled:!1}},e),offsetCorrection:!1}).on("click",d=>{if(typeof t.config.chart.events.xAxisLabelClick=="function"){let f=Object.assign({},t,{labelIndex:n});t.config.chart.events.xAxisLabelClick(d,this.ctx,f)}})}}),s}createPaths(t,e){let s=[],i=[],a=[],n=[];if(t.length){i=[this.graphics.move(e.x,e.y)],n=[this.graphics.move(e.x,e.y)];let r=this.graphics.move(t[0].x,t[0].y),o=this.graphics.move(t[0].x,t[0].y);t.forEach((l,c)=>{r+=this.graphics.line(l.x,l.y),o+=this.graphics.line(l.x,l.y),c===t.length-1&&(r+="Z",o+="Z")}),s.push(r),a.push(o)}return{linePathsFrom:i,linePathsTo:s,areaPathsFrom:n,areaPathsTo:a}}getTextPos(t,e){let i="middle",a=t.x,n=t.y;return Math.abs(t.x)>=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?n-=10:t.y>0&&(n+=10)),{textAnchor:i,newX:a,newY:n}}getPreviousPath(t){let e=this.w,s=null;for(let i=0;i<e.globals.previousPaths.length;i++){let a=e.globals.previousPaths[i];a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(String(t),10)&&typeof e.globals.previousPaths[i].paths[0]<"u"&&(s=e.globals.previousPaths[i].paths[0].d)}return s}getDataPointsPos(t,e,s=this.dataPointsLen){t=t||[],e=e||[];let i=[];for(let a=0;a<s;a++){let n={};n.x=t[a]*Math.sin(e[a]),n.y=-t[a]*Math.cos(e[a]),i.push(n)}return i}},Ra=class extends xe{constructor(t,e){super(t,e),this.ctx=e,this.w=t,this.animBeginArr=[0],this.animDur=0,this.startAngle=t.config.plotOptions.radialBar.startAngle,this.endAngle=t.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(t.config.plotOptions.radialBar.endAngle-t.config.plotOptions.radialBar.startAngle),this.trackStartAngle=t.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=t.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||(this.trackStartAngle=this.startAngle),this.trackEndAngle||(this.trackEndAngle=this.endAngle),this.endAngle===360&&(this.endAngle=359.99),this.margin=parseInt(t.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(t){var e;let s=this.w,i=new B(this.w),a=i.group({class:"apexcharts-radialbar"});if(s.globals.noData)return a;let n=i.group(),r=this.defaultSize/2,o=s.layout.gridWidth/2,l=this.defaultSize/2.05;s.config.chart.sparkline.enabled||(l=l-s.config.stroke.width-s.config.chart.dropShadow.blur);let c=s.globals.fill.colors,h=s.config.plotOptions.radialBar,d=Array.isArray(h.bands)&&h.bands.length>0,f=d&&h.bandsStyle&&h.bandsStyle.hideTrackWhenPresent,g=h.shape==="needle";if(h.track.show&&!f){let x=this.drawTracks({size:l,centerX:o,centerY:r,colorArr:c,series:t});n.add(x)}if(d){let x=this.drawBands({size:l,centerX:o,centerY:r,series:t});n.add(x)}let p=this.drawArcs({size:l,centerX:o,centerY:r,colorArr:c,series:t,skipValueArc:g&&!((e=h.needle)!=null&&e.showValueArc)});if(h.ticks&&h.ticks.show){let x=this.drawTicks({size:l,centerX:o,centerY:r,series:t});if(this.initialAnim&&!s.globals.dataChanged&&!s.globals.resized&&H.isBrowser()&&s.globals.shouldAnimate){let w=x.node;w.style.opacity="0",w.style.transition="opacity 280ms ease-out";let y=s.config.chart.animations.speed||800;setTimeout(()=>{w.style.opacity="1"},y)}n.add(x)}if(g){let x=this.drawNeedle({size:l,centerX:o,centerY:r,series:t});n.add(x)}let m=360;s.config.plotOptions.radialBar.startAngle<0&&(m=this.totalAngle);let b=(360-m)/360;if(s.globals.radialSize=l-l*b,this.radialDataLabels.value.show){let x=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);s.globals.radialSize+=x*b}return n.add(p.g),s.config.plotOptions.radialBar.hollow.position==="front"&&(p.g.add(p.elHollow),p.dataLabels&&p.g.add(p.dataLabels)),a.add(n),a}drawTracks(t){let e=this.w,s=new B(this.w),i=s.group({class:"apexcharts-tracks"}),a=new at(this.w),n=new pt(this.w),r=this.getStrokeWidth(t);t.size=t.size-r/2;for(let o=0;o<t.series.length;o++){let l=s.group({class:"apexcharts-radialbar-track apexcharts-track"});i.add(l),l.attr({rel:o+1}),t.size=t.size-r-this.margin;let c=e.config.plotOptions.radialBar.track,h=n.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(c.background)?c.background[o]:c.background,solid:!0}),d=this.trackStartAngle,f=this.trackEndAngle;Math.abs(f)+Math.abs(d)>=360&&(f=360-Math.abs(this.startAngle)-.1);let g=s.drawPath({d:"",stroke:h,strokeWidth:r*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){let p=c.dropShadow;a.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}drawArcs(t){var e;let s=this.w,i=new B(this.w),a=new pt(this.w),n=new at(this.w),r=i.group(),o=this.getStrokeWidth(t);t.size=t.size-o/2;let l=s.config.plotOptions.radialBar.hollow.background,c=t.size-o*t.series.length-this.margin*t.series.length-o*parseInt(s.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=c-s.config.plotOptions.radialBar.hollow.margin;s.config.plotOptions.radialBar.hollow.image!==void 0&&(l=this.drawHollowImage(t,r,c,l));let d=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:l||"transparent"});if(s.config.plotOptions.radialBar.hollow.dropShadow.enabled){let b=s.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(d,b)}let f=1;!this.radialDataLabels.total.show&&s.seriesData.series.length>1&&(f=0);let g=null;if(this.radialDataLabels.show){let b=s.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(b,this.radialDataLabels,{hollowSize:c,centerX:t.centerX,centerY:t.centerY,opacity:f})}s.config.plotOptions.radialBar.hollow.position==="back"&&(r.add(d),g&&r.add(g));let p=!1;s.config.plotOptions.radialBar.inverseOrder&&(p=!0);let m=((e=this.ctx.morphTypeChange)==null?void 0:e.isActive())===!0;for(let b=p?t.series.length-1:0;p?b>=0:b<t.series.length;p?b--:b++){let x=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:T.escapeString(s.seriesData.seriesNames[b])});r.add(x),x.attr({rel:b+1,"data:realIndex":b}),ct.addCollapsedClassToSeries(this.w,x,b),t.size=t.size-o-this.margin;let _=a.fillPath({seriesNumber:b,size:t.size,value:t.series[b]}),w=this.startAngle,y,v=s.config.plotOptions.radialBar,A=typeof v.min=="number"?v.min:0,S=typeof v.max=="number"?v.max:100,C=S===A?1:S-A,M=X=>{let V=Math.min(Math.max(X,A),S);return Math.max(0,(V-A)/C)},k=M(T.negToZero(t.series[b])),L=Math.round(this.totalAngle*k)+this.startAngle,E;s.globals.dataChanged&&(y=this.startAngle,E=Math.round(this.totalAngle*M(T.negToZero(s.globals.previousPaths[b])))+y),Math.abs(L)+Math.abs(w)>360&&(L=L-.01),Math.abs(E)+Math.abs(y)>360&&(E=E-.01);let F=L-w,R=Array.isArray(s.config.stroke.dashArray)?s.config.stroke.dashArray[b]:s.config.stroke.dashArray,N=m?this.ctx.morphTypeChange.getInitialPathFor(b,0):null,z=m?this.ctx.morphTypeChange.getFromType():null,$=!!N&&(z==="bar"||z==="funnel"||z==="pyramid"||z==="pie"||z==="donut"||z==="polarArea"),W=i.drawPath({d:N||"",stroke:$||t.skipValueArc?"transparent":_,strokeWidth:$||t.skipValueArc?0:o,fill:$?_:"none",fillOpacity:s.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+b,strokeDashArray:R}),Y=w+F/2,I=T.polarToCartesian(t.centerX,t.centerY,t.size,Y);if(B.setAttrs(W.node,{"data:angle":F,"data:value":t.series[b],"data:cx":I.x,"data:cy":I.y}),s.config.chart.dropShadow.enabled){let X=s.config.chart.dropShadow;n.dropShadow(W,X,b)}if(n.setSelectionFilter(W,0,b),this.addListeners(W,this.radialDataLabels),x.add(W),W.attr({index:0,j:b}),this.barLabels.enabled){let X=T.polarToCartesian(t.centerX,t.centerY,t.size,w),V=this.barLabels.formatter(s.seriesData.seriesNames[b],{seriesIndex:b,w:s}),q=["apexcharts-radialbar-label"];this.barLabels.onClick||q.push("apexcharts-no-click");let Z=this.barLabels.useSeriesColors?s.globals.colors[b]:s.config.chart.foreColor;Z||(Z=s.config.chart.foreColor);let K=X.x+this.barLabels.offsetX,Q=X.y+this.barLabels.offsetY,tt=i.drawText({x:K,y:Q,text:V,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:Z,cssClass:q.join(" ")});tt.on("click",this.onBarLabelClick),tt.attr({rel:b+1}),w!==0&&tt.attr({"transform-origin":`${K} ${Q}`,transform:`rotate(${w} 0 0)`}),x.add(tt)}let U=0;if(this.initialAnim&&!s.globals.resized&&!s.globals.dataChanged&&(U=s.config.chart.animations.speed),s.globals.dataChanged&&(U=s.config.chart.animations.dynamicAnimation.speed),this.animDur=U/(t.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),m&&N){let X=this.ctx.morphTypeChange.getSpeed(),V=this.getPiePath({me:this,startAngle:w,angle:F,size:t.size});if($){let q=this.ctx.morphTypeChange.buildRingSegmentPath(t.centerX,t.centerY,t.size,o,w,w+F);W.animate(X).plot(q,"polygons").after(function(){this.attr({d:V,fill:"none",stroke:t.skipValueArc?"transparent":_,"stroke-width":t.skipValueArc?0:o})})}else W.animate(X).plot(V,"polygons").attr({"stroke-width":o})}else this.animatePaths(W,{centerX:t.centerX,centerY:t.centerY,endAngle:L,startAngle:w,prevEndAngle:E,prevStartAngle:y,size:t.size,i:b,totalItems:2,animBeginArr:this.animBeginArr,dur:U,shouldSetPrevPaths:!0})}return{g:r,elHollow:d,dataLabels:g}}_angleAtValue(t){let e=this.w.config.plotOptions.radialBar,s=typeof e.min=="number"?e.min:0,i=typeof e.max=="number"?e.max:100,a=i===s?s+1:i,r=(Math.max(s,Math.min(a,Number(t)))-s)/(a-s);return this.startAngle+r*(this.endAngle-this.startAngle)}_describeArc(t,e,s,i,a){let n=T.polarToCartesian(t,e,s,a),r=T.polarToCartesian(t,e,s,i),o=a-i,l=Math.abs(o)>180?1:0;return`M ${n.x} ${n.y} A ${s} ${s} 0 ${l} 0 ${r.x} ${r.y}`}drawBands(t){let e=this.w,s=new B(this.w),i=e.config.plotOptions.radialBar,a=i.bands||[],n=s.group({class:"apexcharts-gauge-bands"}),r=this.getStrokeWidth(t),o=t.size-r/2-r-this.margin,l=r*parseInt(i.bandsStyle.strokeWidth,10)/100,c=typeof i.min=="number"?i.min:0,h=typeof i.max=="number"?i.max:100,d=h===c?0:(i.bandsStyle.gap||0)*((this.endAngle-this.startAngle)/(h-c));for(let f=0;f<a.length;f++){let g=a[f];if(g.from===void 0||g.to===void 0)continue;let p=this._angleAtValue(g.from),m=this._angleAtValue(g.to),b=Math.min(p,m)+d/2,x=Math.max(p,m)-d/2;if(x-b<=0)continue;let _=s.drawPath({d:this._describeArc(t.centerX,t.centerY,o,b,x),stroke:g.color||"#ccc",strokeWidth:l,fill:"none",strokeLinecap:i.bandsStyle.linecap||"butt",classes:"apexcharts-gauge-band"});_.node.setAttribute("data-band-index",String(f)),n.add(_)}return n}drawTicks(t){var e,s,i,a;let n=this.w,r=new B(this.w),o=n.config.plotOptions.radialBar,l=o.ticks,c=r.group({class:"apexcharts-gauge-ticks"}),h=this.getStrokeWidth(t),d=t.size-h/2-h-this.margin,f=typeof o.min=="number"?o.min:0,g=typeof o.max=="number"?o.max:100,p=Math.max(2,(s=(e=l.major)==null?void 0:e.count)!=null?s:11),m=Math.max(0,(a=(i=l.minor)==null?void 0:i.count)!=null?a:0),b=(x,_,w)=>{var y,v,A;let S=this._angleAtValue(x),C=(y=_.length)!=null?y:8,M=_.placement==="inside"?d-C:d,k=_.placement==="inside"?d:d+C,L=T.polarToCartesian(t.centerX,t.centerY,M,S),E=T.polarToCartesian(t.centerX,t.centerY,k,S),D=r.drawLine(L.x,L.y,E.x,E.y,_.color||(w?"#666":"#999"),0,_.width||(w?2:1));if(c.add(D),w&&((v=l.labels)!=null&&v.show)){let P=(_.placement==="inside"?M:k)+(_.placement==="inside"?-1:1)*((A=l.labels.offset)!=null?A:6),F=T.polarToCartesian(t.centerX,t.centerY,P,S),R=typeof l.labels.formatter=="function"?l.labels.formatter(x):String(x),N=r.drawText({x:F.x,y:F.y,text:R,textAnchor:"middle",dominantBaseline:"middle",fontFamily:l.labels.fontFamily,fontSize:l.labels.fontSize,fontWeight:l.labels.fontWeight,foreColor:l.labels.color,cssClass:"apexcharts-gauge-tick-label"});c.add(N)}};for(let x=0;x<p;x++){let _=x/(p-1),w=f+_*(g-f);if(b(w,l.major||{},!0),x<p-1&&m>0)for(let y=1;y<=m;y++){let v=(x+y/(m+1))/(p-1),A=f+v*(g-f);b(A,l.minor||{},!1)}}return c}drawNeedle(t){var e,s,i,a,n;let r=this.w,o=new B(this.w),c=r.config.plotOptions.radialBar.needle||{},h=o.group({class:"apexcharts-gauge-needle"});if(!t.series||t.series.length===0)return h;let d=this.getStrokeWidth(t),f=t.size-d/2-d-this.margin,g=typeof c.length=="string"&&c.length.endsWith("%")?f*parseInt(c.length,10)/100:Number(c.length||f*.85),p=(e=c.baseWidth)!=null?e:4,m=(s=c.tipWidth)!=null?s:1,b=c.color||"#333",x=t.centerX,_=Number((i=c.offsetY)!=null?i:0),w=t.centerY+_,y=`M ${x+p/2} ${w} A ${p/2} ${p/2} 0 0 1 ${x-p/2} ${w} L ${x-m/2} ${w-g} L ${x+m/2} ${w-g} Z`,v=o.drawPath({d:y,stroke:b,strokeWidth:0,fill:b,classes:"apexcharts-gauge-needle-shape"});h.add(v);let A=Number(t.series[0]),S=this._angleAtValue(A),C=this.initialAnim&&!r.globals.dataChanged&&!r.globals.resized,M=this.ctx,k=typeof M._lastNeedleAngle=="number"?M._lastNeedleAngle:this.startAngle;if(M._lastNeedleAngle=S,H.isBrowser()&&r.globals.shouldAnimate&&(C||r.globals.dataChanged)&&k!==S){let E=h.node;E.setAttribute("transform-origin",`${x} ${w}`),E.setAttribute("transform",`rotate(${k})`);let D=((a=c.animation)==null?void 0:a.duration)&&Number(c.animation.duration)||c.animationSpeed&&Number(c.animationSpeed)||((n=r.config.chart.animations.dynamicAnimation)==null?void 0:n.speed)||r.config.chart.animations.speed||800,P=1.70158,F=P+1,z=C?Y=>1+F*Math.pow(Y-1,3)+P*Math.pow(Y-1,2):Y=>1-Math.pow(1-Y,3);r.globals.radialNeedleRAF!=null&&(O.cancelAnimationFrame(r.globals.radialNeedleRAF),r.globals.radialNeedleRAF=null);let $=performance.now(),W=Y=>{if(this.w.globals.isDestroyed){r.globals.radialNeedleRAF=null;return}let I=Math.max(0,Math.min(1,(Y-$)/D)),U=k+(S-k)*z(I);E.setAttribute("transform",`rotate(${U})`),I<1?r.globals.radialNeedleRAF=O.requestAnimationFrame(W):r.globals.radialNeedleRAF=null};r.globals.radialNeedleRAF=O.requestAnimationFrame(W)}else h.attr({"transform-origin":`${x} ${w}`,transform:`rotate(${S})`});return h}drawHollow(t){var e;let s=new B(this.w),i=this.w.config.plotOptions.radialBar.hollow,a=s.drawCircle(t.size*2),n={class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill};return(i.stroke||i.strokeDasharray)&&(n.stroke=i.stroke||"transparent",n["stroke-width"]=(e=i.strokeWidth)!=null?e:1,i.strokeDasharray&&(n["stroke-dasharray"]=i.strokeDasharray)),a.attr(n),a}drawHollowImage(t,e,s,i){let a=this.w,n=new pt(this.w),r=T.randomId(),o=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)n.clippedImgArea({width:s,height:s,image:o,patternID:`pattern${a.globals.cuid}${r}`}),i=`url(#pattern${a.globals.cuid}${r})`;else{let l=a.config.plotOptions.radialBar.hollow.imageWidth,c=a.config.plotOptions.radialBar.hollow.imageHeight;if(l===void 0&&c===void 0){let h=a.dom.Paper.image(o,function(d){this.move(t.centerX-d.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-d.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});e.add(h)}else{let h=a.dom.Paper.image(o,function(){this.move(t.centerX-l/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)});e.add(h)}}return i}getStrokeWidth(t){let e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}onBarLabelClick(t){var e;let s=t.target,i=parseInt((e=s.getAttribute("rel"))!=null?e:"",10)-1,a=this.barLabels.onClick,n=this.w;a&&a(n.seriesData.seriesNames[i],{w:n,seriesIndex:i})}},Fa=class extends Pt{draw(t,e){var s,i,a,n,r,o,l,c,h;let d=this.w,f=new B(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=d.rangeData.seriesRangeStart,this.seriesRangeEnd=d.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);let g=f.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let p=0;p<t.length;p++){let m,b,x=d.globals.comboCharts?e[p]:p,{columnGroupIndex:_}=this.barHelpers.getGroupIndex(x),w=f.group({class:"apexcharts-series",seriesName:T.escapeString(d.seriesData.seriesNames[x]),rel:p+1,"data:realIndex":x});ct.addCollapsedClassToSeries(this.w,w,x),t[p].length>0&&(this.visibleI=this.visibleI+1);let y=0;this.yRatio.length>1&&(this.yaxisIndex=d.globals.seriesYAxisReverseMap[x][0],y=x);let v=this.barHelpers.initialPositions(x),{y:A,zeroW:S,x:C,zeroH:M}=v,k=(s=v.barWidth)!=null?s:0,L=(i=v.barHeight)!=null?i:0,E=(a=v.yDivision)!=null?a:0,D=(n=v.xDivision)!=null?n:0;b=A,m=C;let P=f.group({class:"apexcharts-datalabels","data:realIndex":x}),F=f.group({class:"apexcharts-rangebar-goals-markers"});for(let R=0;R<d.globals.dataPoints;R++){let N=this.barHelpers.getStrokeWidth(p,R,x),z=this.seriesRangeStart[p][R],$=this.seriesRangeEnd[p][R],W=null,Y=null,I=null,U={x:m,y:b,strokeWidth:N,elSeries:w},X=this.seriesLen;if(d.config.plotOptions.bar.rangeBarGroupRows&&(X=1),typeof((r=d.config.series[p].data)==null?void 0:r[R])>"u")break;if(this.isHorizontal){I=b+L*this.visibleI;let Z=(E-L*X)/2;if((l=(o=d.config.series[p].data)==null?void 0:o[R])!=null&&l.x){let K=this.detectOverlappingBars({i:p,j:R,barYPosition:I,srty:Z,barHeight:L,yDivision:E,initPositions:v});L=K.barHeight,I=K.barYPosition}W=this.drawRangeBarPaths(G({indexes:{i:p,j:R,realIndex:x},barHeight:L,barYPosition:I,zeroW:S,yDivision:E,y1:z,y2:$},U)),k=W.barWidth}else{d.axisFlags.isXNumeric&&(m=(d.seriesData.seriesX[p][R]-d.globals.minX)/this.xRatio-k/2),Y=m+k*this.visibleI;let Z=(D-k*X)/2;if((h=(c=d.config.series[p].data)==null?void 0:c[R])!=null&&h.x){let K=this.detectOverlappingBars({i:p,j:R,barXPosition:Y,srtx:Z,barWidth:k,xDivision:D,initPositions:v});k=K.barWidth,Y=K.barXPosition}W=this.drawRangeColumnPaths(G({indexes:{i:p,j:R,realIndex:x,translationsIndex:y},barWidth:k,barXPosition:Y,zeroH:M,xDivision:D},U)),L=W.barHeight}let V=this.barHelpers.drawGoalLine({barXPosition:W.barXPosition,barYPosition:I,goalX:W.goalX,goalY:W.goalY,barHeight:L,barWidth:k});V&&F.add(V),b=W.y,m=W.x;let q=this.barHelpers.getPathFillColor(t,p,R,x);this.renderSeries({realIndex:x,pathFill:q.color,lineFill:q.useRangeColor?q.color:d.globals.stroke.colors[x],j:R,i:p,x:m,y:b,y1:z,y2:$,pathFrom:W.pathFrom,pathTo:W.pathTo,strokeWidth:N,elSeries:w,series:t,barHeight:L,barWidth:k,barXPosition:Y,barYPosition:I,columnGroupIndex:_,elDataLabelsWrap:P,elGoalsMarkers:F,visibleSeries:this.visibleI,type:"rangebar"})}g.add(w)}return g}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:i,srty:a,srtx:n,barHeight:r,barWidth:o,yDivision:l,xDivision:c,initPositions:h}){var d,f,g,p;let m=this.w,b=[],x=(f=(d=m.globals.seriesRangeName)==null?void 0:d[t])==null?void 0:f[e],_=(p=(g=m.config.series[t].data)==null?void 0:g[e])==null?void 0:p.x,w=Array.isArray(_)?_.join(" "):_,y=m.labelData.labels.map(A=>Array.isArray(A)?A.join(" "):A).indexOf(w),v=m.rangeData.seriesRange[t].findIndex(A=>{var S;return A.x===w&&((S=A.overlaps)==null?void 0:S.size)>0});return this.isHorizontal?(m.config.plotOptions.bar.rangeBarGroupRows?s=a+l*y:s=a+r*this.visibleI+l*y,v>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(m.rangeData.seriesRange[t][v].overlaps),b.indexOf(x)>-1&&(r=h.barHeight/b.length,s=r*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+r*(this.visibleI+b.indexOf(x))+l*y))):(y>-1&&!m.labelData.timescaleLabels.length&&(m.config.plotOptions.bar.rangeBarGroupRows?i=n+c*y:i=n+o*this.visibleI+c*y),v>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(m.rangeData.seriesRange[t][v].overlaps),b.indexOf(x)>-1&&(o=h.barWidth/b.length,i=o*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+o*(this.visibleI+b.indexOf(x))+c*y))),{barYPosition:s,barXPosition:i,barHeight:r,barWidth:o}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:i,barXPosition:a,zeroH:n}){var r,o;let l=this.w,{i:c,j:h,realIndex:d,translationsIndex:f}=t,g=this.yRatio[f],p=this.getRangeValue(d,h),m=Math.min(p.start,p.end),b=Math.max(p.start,p.end);typeof((r=this.series[c])==null?void 0:r[h])>"u"||((o=this.series[c])==null?void 0:o[h])===null?m=n:(m=n-m/g,b=n-b/g);let x=Math.abs(b-m),_=this.barHelpers.getColumnPaths({barXPosition:a,barWidth:i,y1:m,y2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:d,i:d,j:h,w:l});if(!l.axisFlags.isXNumeric)e=e+s;else{let w=this.getBarXForNumericXAxis({x:e,j:h,realIndex:d,barWidth:i});e=w.x,a=w.barXPosition}return{pathTo:_.pathTo,pathFrom:_.pathFrom,barHeight:x,x:e,y:p.start<0&&p.end<0?m:b,goalY:this.barHelpers.getGoalValues("y",null,n,d,h,f),barXPosition:a}}preventBarOverflow(t){let e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:i,yDivision:a,barHeight:n,barYPosition:r,zeroW:o}){let l=this.w,{realIndex:c,j:h}=t,d=this.preventBarOverflow(o+s/this.invertedYRatio),f=this.preventBarOverflow(o+i/this.invertedYRatio),g=this.getRangeValue(c,h),p=Math.abs(f-d),m=this.barHelpers.getBarpaths({barYPosition:r,barHeight:n,x1:d,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:h,w:l});return l.axisFlags.isXNumeric||(e=e+a),{pathTo:m.pathTo,pathFrom:m.pathFrom,barWidth:p,x:g.start<0&&g.end<0?d:f,goalX:this.barHelpers.getGoalValues("x",o,null,c,h,0),y:e}}getRangeValue(t,e){let s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}};function Ia(u,t){let e=0;for(let a=0;a<u.length;a++)e+=u[a];let s=t/e,i=new Array(u.length);for(let a=0;a<u.length;a++)i[a]=u[a]*s;return i}function mr(u,t,e,s){let i=s*s,a=e*e;return Math.max(i*t/a,a/(i*u))}function vd(u,t,e,s,i,a){if(u===0)return!0;let n=mr(t,e,s,a),r=mr(Math.min(t,i),Math.max(e,i),s+i,a);return n>=r}function xr(u,t,e,s,i,a,n,r){if(n>=r){let o=s/r,l=a;for(let c=0;c<e;c++){let h=t[c]/o;u.push([i,l,i+o,l+h]),l+=h}}else{let o=s/n,l=i;for(let c=0;c<e;c++){let h=t[c]/o;u.push([l,a,l+h,a+o]),l+=h}}}function Na(u,t,e,s,i){let a=[],n=u.length;if(n===0)return a;let r=new Array(n),o=0,l=0,c=1/0,h=-1/0,d=0;for(;d<n;){let f=Math.min(s,i),g=u[d];if(vd(o,c,h,l,g,f))r[o]=g,o++,l+=g,g<c&&(c=g),g>h&&(h=g),d++;else{if(xr(a,r,o,l,t,e,s,i),s>=i){let p=l/i;t+=p,s-=p}else{let p=l/s;e+=p,i-=p}o=0,l=0,c=1/0,h=-1/0}}return o>0&&xr(a,r,o,l,t,e,s,i),a}function _d(u,t,e){let s=u.length,i=new Array(s);for(let r=0;r<s;r++){let o=0,l=u[r];for(let c=0;c<l.length;c++)o+=l[c];i[r]=o}let a=Na(Ia(i,t*e),0,0,t,e),n=new Array(s);for(let r=0;r<s;r++){let o=a[r],l=o[0],c=o[1],h=o[2]-l,d=o[3]-c;n[r]=Na(Ia(u[r],h*d),l,c,h,d)}return n}function bo(u){let t=u.children;if(t&&t.length){let i=0;for(let a=0;a<t.length;a++)i+=bo(t[a]);return u._area=i,i}let e=Number(u.value),s=isNaN(e)?0:Math.abs(e);return u._area=s,s}function yo(u,t,e,s,i,a,n,r){let o=u.length;if(o===0||s<=0||i<=0)return;let l=new Array(o),c=0;for(let d=0;d<o;d++)l[d]=u[d]._area,c+=l[d];if(c<=0)return;let h=Na(Ia(l,s*i),t,e,s,i);for(let d=0;d<o;d++){let f=u[d],g=h[d];if(!g)continue;f.rect=g,f.depth=a;let p=f.children;if(!p||!p.length)continue;let m=g[2]-g[0],b=g[3]-g[1],x=Math.max(0,n(f,a,m,b)||0);(x*2>=m||x*2>=b)&&(x=0);let _=Math.max(0,r(f,a,m,b)||0);_>0&&b-x*2-_<_&&(_=0),f.headerHeight=_,yo(p,g[0]+x,g[1]+_+x,m-x*2,b-_-x*2,a+1,n,r)}}function Ad(u,t,e,s={}){if(!Array.isArray(u)||u.length===0)return u||[];let i=s.padding||(()=>0),a=s.header||(()=>0);for(let n=0;n<u.length;n++)bo(u[n]);return yo(u,0,0,t,e,0,i,a),u}var Sd={generate:_d,generateNested:Ad},Cd=u=>(u[2]-u[0])*(u[3]-u[1]),Xa=class{constructor(t,e){this.ctx=e,this.w=t,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Cs(t,e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[],this.roots=[],this.drawn=[],this.nested=!1,this.showParents=!1,this.scale=null,this._levelCache=null,this._total=null,this._avgLabelSize=null,this._tooltipEl=null,this._tipOwned=!1,this._morphLeafIndex=0}draw(t){var e;let s=this.w,i=new B(this.w,this.ctx),a=new pt(this.w),n=i.group({class:"apexcharts-treemap"});if(s.globals.noData)return n;t.forEach(m=>{m.map(b=>Math.abs(b))}),this.negRange=this.helpers.checkColorRange(),s.config.series.forEach((m,b)=>{m.data.forEach(x=>{Array.isArray(this.labels[b])||(this.labels[b]=[]),this.labels[b].push(x.x)})});let r=dc(s);this.nested=r.nested,this.roots=r.roots,this.scale=Jr(s);let o=r.roots.length===1?r.roots[0].children||[]:r.roots;this.drawn=o;let l=s.config.plotOptions.treemap.parents;this.showParents=l.show===!0||l.show!==!1&&this.nested;let c=this._resolveFocus(o),h=c?[c]:o;Sd.generateNested(h,s.layout.gridWidth,s.layout.gridHeight,{padding:(m,b,x,_)=>this.showParents?this._levelPadding(b,x,_):0,header:(m,b,x,_)=>this.showParents?this._levelHeader(m,b,x,_):0});let d=(e=this.ctx)==null?void 0:e.morphTypeChange,f=!!d&&typeof d.isActive=="function"&&d.isActive()&&typeof d.getInitialPathAt=="function";this._morphLeafIndex=0;let g=this._leavesBySeries(h,s.config.series.length),p=this.showParents?this._parentsBySeries(h,s.config.series.length):[];return g.forEach((m,b)=>{var x;let _=i.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:T.escapeString(s.seriesData.seriesNames[b]),rel:b+1,"data:realIndex":b});if(i.setupEventDelegation(_,".apexcharts-treemap-rect"),s.config.chart.dropShadow.enabled){let k=s.config.chart.dropShadow;new at(this.w).dropShadow(n,k,b)}let w=i.group({class:"apexcharts-data-labels"}),y={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};this.showParents&&(p[b]||[]).forEach(k=>{this._drawParent(_,k,b)});let v=s.config.chart.animations,A=v.animateGradually,S=A&&A.enabled!==!1,C=new Array(m.length).fill(0);if(S){let k=m.length||1,L=Math.min(A.delay||0,v.speed*.5/k);m.map((D,P)=>({j:P,area:D.rect?Cd(D.rect):0})).sort((D,P)=>P.area-D.area).forEach((D,P)=>{C[D.j]=P*L})}m.forEach((k,L)=>{let E=k.rect;if(!E)return;let D=k._di,P=E[0],F=E[1],R=E[2],N=E[3];y.xMin=Math.min(y.xMin,P),y.yMin=Math.min(y.yMin,F),y.xMax=Math.max(y.xMax,R),y.yMax=Math.max(y.yMax,N);let z=this._leafColor(b,D),$=z.color,W=a.fillPath({color:$,seriesNumber:b,dataPointIndex:D}),Y=f?this._morphSourceForLeaf(k):null,I=Y?i.drawPath({d:this._tilePath(P,F,R,N),fill:"#fff",stroke:s.config.plotOptions.treemap.useFillColorAsStroke?$:s.globals.stroke.colors[b],strokeWidth:this.strokeWidth,fillOpacity:1}):i.drawRect(P,F,R-P,N-F,s.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,s.config.plotOptions.treemap.useFillColorAsStroke?$:s.globals.stroke.colors[b]);I.attr({cx:P,cy:F,index:b,i:b,j:D,width:R-P,height:N-F,fill:W}),I.node.classList.add("apexcharts-treemap-rect"),I.node.setAttribute("data:key",Re(k._key));let U={x:P+(R-P)/2,y:F+(N-F)/2,width:0,height:0},X={x:P,y:F,width:R-P,height:N-F};if(Y)this._morphTile(I,Y,this._tilePath(P,F,R,N),this.ctx.morphTypeChange.getSpeed(),b,D);else if(s.config.chart.animations.enabled&&!s.globals.dataChanged){let Z=1;s.globals.resized||(Z=s.config.chart.animations.speed),this.animateTreemap(I,U,X,Z,C[L]||0)}if(s.globals.dataChanged){let Z=1;this.dynamicAnim.enabled&&s.globals.shouldAnimate&&(Z=this.dynamicAnim.speed,s.globals.previousPaths[b]&&s.globals.previousPaths[b][D]&&s.globals.previousPaths[b][D].rect&&(U=s.globals.previousPaths[b][D].rect),this.animateTreemap(I,U,X,Z))}let V=this.getFontSize(E);s.config.plotOptions.treemap.dataLabels.format==="truncate"&&(V=parseInt(String(s.config.dataLabels.style.fontSize),10));let q=null;if(s.config.dataLabels.enabled&&this._labelCanShow(V,R-P,N-F)){let Z=s.config.dataLabels.formatter(this.labels[b][D],{value:s.seriesData.series[b][D],seriesIndex:b,dataPointIndex:D,w:s});s.config.plotOptions.treemap.dataLabels.format==="truncate"&&(Z=this.truncateLabels(String(Z),V,P,F,R,N)),s.seriesData.series[b][D]&&(q=this.helpers.calculateDataLabels({text:Z,x:(P+R)/2,y:(F+N)/2+this.strokeWidth/2+V/3,i:b,j:D,colorProps:z,fontSize:V,series:t})),s.config.dataLabels.enabled&&q&&this.rotateToFitLabel(q,V,Z,P,F,R,N)}_.add(I),q!==null&&_.add(q)});let M=s.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&s.config.series.length>1&&M&&M.show){let k=s.config.series[b].name||"";if(k&&y.xMin<1/0&&y.yMin<1/0){let{offsetX:L,offsetY:E,borderColor:D,borderWidth:P,borderRadius:F,style:R}=M,N=R.color||s.config.chart.foreColor,z={left:R.padding.left,right:R.padding.right,top:R.padding.top,bottom:R.padding.bottom},$=i.getTextRects(k,R.fontSize,R.fontFamily),W=$.width+z.left+z.right,Y=$.height+z.top+z.bottom,I=y.xMin+(L||0),U=y.yMin+(E||0),X=i.drawRect(I,U,W,Y,F,R.background,1,P,D),V=i.drawText({x:I+z.left,y:U+z.top+((x=$?.height)!=null?x:0)*.75,text:k,fontSize:R.fontSize,fontFamily:R.fontFamily,fontWeight:R.fontWeight,foreColor:N,cssClass:R.cssClass||""});_.add(X),_.add(V)}}_.add(w),n.add(_)}),this._renderBreadcrumb(),n}_levelCfg(t){if(this._levelCache||(this._levelCache=[]),this._levelCache[t])return this._levelCache[t];let e=this.w.config.plotOptions.treemap,s=e.parents||{},i=(e.levels||[])[t]||{},a=j(G(G({},s),i),{header:j(G(G({},s.header||{}),i.header||{}),{style:G(G({},(s.header||{}).style||{}),(i.header||{}).style||{})}),hover:G(G({},s.hover||{}),i.hover||{})});return this._levelCache[t]=a,a}_levelPadding(t,e,s){let i=this._levelCfg(t);return Number(i.padding)||0}_levelHeader(t,e,s,i){let n=this._levelCfg(e).header||{};if(n.show===!1)return 0;let r=Number(n.height);if(!Number.isFinite(r)||r<=0)return 0;let o=Number(n.minWidth)||40;return s<o||i<r*2?0:r}_leavesBySeries(t,e){let s=new Array(Math.max(1,e));for(let a=0;a<s.length;a++)s[a]=[];let i=a=>{if(a.children&&a.children.length)a.children.forEach(i);else{let n=a._si||0;s[n]&&s[n].push(a)}};return t.forEach(i),s}_parentsBySeries(t,e){let s=new Array(Math.max(1,e));for(let a=0;a<s.length;a++)s[a]=[];let i=a=>{if(!a.children||!a.children.length)return;let n=a._si||0;s[n]&&s[n].push(a),a.children.forEach(i)};return t.forEach(i),s.forEach(a=>a.sort((n,r)=>(n.depth||0)-(r.depth||0))),s}_leafColor(t,e){let s=this.w;if(this.scale){let i=Zr(s,t,e);if(i!=null){let a=this.scale.at(i);return{color:a,foreColor:Kn(a),colorProps:{color:a,foreColor:Kn(a),percent:0}}}}return this.helpers.getShadeColor(s.config.chart.type,t,e,this.negRange)}_parentChrome(t){let e=this.w,s=this._levelCfg(t),i=e.config.theme.mode==="dark",n=(s.header||{}).style||{},r=Math.min(t,3),o=i?255:0,l=`${o},${o},${o}`;return{fill:s.fill||`rgba(${l},${(i?.04:.03)+r*.02})`,fillOpacity:s.fillOpacity==null?1:s.fillOpacity,borderColor:s.borderColor||`rgba(${l},${i?.18:.14})`,borderWidth:s.borderWidth==null?1:s.borderWidth,borderRadius:s.borderRadius==null?e.config.plotOptions.treemap.borderRadius:s.borderRadius,headerBg:n.background||`rgba(${l},${i?.1:.07})`,headerColor:n.color||(i?"#e8e8e8":e.config.chart.foreColor),headerFontSize:n.fontSize||"12px",headerFontFamily:n.fontFamily||e.config.chart.fontFamily,headerFontWeight:n.fontWeight==null?600:n.fontWeight,hoverColor:s.hover&&s.hover.color||(i?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.7)"),hoverWidth:s.hover&&s.hover.width||2,hoverShow:!(s.hover&&s.hover.show===!1)}}_drawParent(t,e,s){var i;let a=e.rect;if(!a)return;let n=this.w,r=new B(this.w,this.ctx),o=e.depth||0,l=this._levelCfg(o),c=this._parentChrome(o),h=a[0],d=a[1],f=a[2]-a[0],g=a[3]-a[1];if(f<=0||g<=0)return;let p=r.group({class:"apexcharts-treemap-parent","data:depth":o,"data:name":T.escapeString(e.name)}),m=Re(e._key),b=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(m):null,x=b?r.drawPath({d:this._tilePath(h,d,h+f,d+g),fill:c.fill,stroke:c.borderColor,strokeWidth:c.borderWidth,fillOpacity:c.fillOpacity}):r.drawRect(h,d,f,g,c.borderRadius,c.fill,c.fillOpacity,c.borderWidth,c.borderColor);x.node.classList.add("apexcharts-treemap-parent-rect"),x.node.setAttribute("data:key",m),x.node.setAttribute("data:depth",String(o)),b&&this._morphTile(x,b,this._tilePath(h,d,h+f,d+g),this.ctx.morphTypeChange.getSpeed(),s,o),p.add(x);let _=e.headerHeight||0,w="";if(_>0){let y=l.header||{},v=r.drawRect(h,d,f,_,0,c.headerBg,1,0,"transparent");v.node.classList.add("apexcharts-treemap-parent-header"),p.add(v);let A=String((i=e.name)!=null?i:"");typeof y.formatter=="function"?A=String(y.formatter(e.name,{value:e.value,depth:o,seriesIndex:s,node:e,w:n})):y.showValue&&(A=`${A} ${this._formatValue(e.value)}`),w=A;let S=Number(y.offsetX)||0,C=y.align||"left",M=6,k=Math.max(0,f-M*2-Math.abs(S)),L=parseFloat(String(c.headerFontSize))||12,E=r.getTextBasedOnMaxWidth({text:A,maxWidth:k,fontSize:L});if(E){let D=h+M+S,P="start";C==="center"?(D=h+f/2+S,P="middle"):C==="right"&&(D=h+f-M+S,P="end");let F=r.drawText({x:D,y:d+_/2+L/3+(Number(y.offsetY)||0),text:E,textAnchor:P,fontSize:c.headerFontSize,fontFamily:c.headerFontFamily,fontWeight:c.headerFontWeight,foreColor:c.headerColor,cssClass:`apexcharts-treemap-parent-label ${y.style&&y.style.cssClass||""}`});F.node.setAttribute("pointer-events","none"),p.add(F)}this._attachParentEvents(v.node,e,c,x),this._makeParentAccessible(v.node,e,c,x,w)}this._attachParentEvents(x.node,e,c,x),p.node.setAttribute("role","group"),p.node.setAttribute("aria-label",this._parentLabel(e,w)),t.add(p)}_parentLabel(t,e){let s=this._drawnTotal(),i=s>0?(t._area/s*100).toFixed(1):"0",a=this._countLeaves(t);return`${e&&String(e).trim()?String(e).replace(/\s+/g," ").trim():`${t.name}, ${this._formatValue(t._area)}`}, ${a} ${a===1?"item":"items"}, ${i}% of total`}_makeParentAccessible(t,e,s,i,a){!t||!t.setAttribute||this._zoomEnabled()&&(t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label",`${this._parentLabel(e,a)}. Zoom in`),t.setAttribute("aria-expanded","false"),!(!H.isBrowser()||!t.addEventListener)&&(t.addEventListener("focus",()=>{i.node.setAttribute("stroke",s.hoverColor),i.node.setAttribute("stroke-width",String(s.hoverWidth+1))}),t.addEventListener("blur",()=>{i.node.setAttribute("stroke",s.borderColor),i.node.setAttribute("stroke-width",String(s.borderWidth))}),t.addEventListener("keydown",n=>{n.key!=="Enter"&&n.key!==" "&&n.key!=="Spacebar"||(n.preventDefault(),this._zoomTo(e,!0))})))}_attachParentEvents(t,e,s,i){if(!H.isBrowser()||!t||!t.addEventListener)return;let a=this.w;s.hoverShow&&(t.addEventListener("mouseenter",()=>{i.node.setAttribute("stroke",s.hoverColor),i.node.setAttribute("stroke-width",String(s.hoverWidth))}),t.addEventListener("mouseleave",()=>{i.node.setAttribute("stroke",s.borderColor),i.node.setAttribute("stroke-width",String(s.borderWidth))})),a.config.tooltip.enabled&&(t.addEventListener("mouseenter",n=>this._showParentTooltip(n,e)),t.addEventListener("mousemove",n=>this._positionTooltip(n)),t.addEventListener("mouseleave",()=>this._hideParentTooltip())),this._zoomEnabled()&&(t.style.cursor="pointer",t.addEventListener("click",()=>this._zoomTo(e)))}_zoomEnabled(){let t=this.w,e=t.config.plotOptions.treemap.zoom;if(!e||!e.enabled||!this.showParents)return!1;let s=t.config.drilldown;return s&&s.enabled&&Array.isArray(s.series)&&s.series.length?(this._warnedZoomConflict||(this._warnedZoomConflict=!0,console.warn("ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead.")),!1):!0}_resolveFocus(t){let e=this.w.globals.treemapFocusKey;if(!e||!this._zoomEnabled())return null;let s=null,i=a=>{if(!s){if(a._key===e){s=a;return}a.children&&a.children.forEach(i)}};return t.forEach(i),s&&s.children&&s.children.length?s:null}_zoomTo(t,e=!1){let s=this.w;if(!t||!t.children||!t.children.length)return;let i=s.globals.treemapFocusKey===t._key?null:t._key;s.globals.treemapFocusKey=i,this._hideParentTooltip();let a=this.ctx.update();!e||!a||typeof a.then!="function"||a.then(()=>{if(!H.isBrowser())return;let n=s.dom.baseEl.querySelector(".apexcharts-breadcrumb .apexcharts-breadcrumb-item");if(n&&n.focus){n.focus();return}let r=s.dom.baseEl.querySelector(".apexcharts-treemap-parent-header[tabindex]");r&&r.focus&&r.focus()})}_focusChain(){let t=[],e=new Set(this.drawn||[]),s=this._resolveFocus(this.drawn||[]);for(;s&&(t.unshift(s),!e.has(s));)s=s._parent;return t}_breadcrumbCfg(){let t=this.w.config.plotOptions.treemap.zoom;return fs(this.w,t&&t.breadcrumb)}_renderBreadcrumb(){if(!H.isBrowser())return;let t=this.w;if(!t.dom.elWrap||(Yr(t),!this._zoomEnabled()))return;let e=this._focusChain();if(!e.length)return;let s=Kl(t,{ariaLabel:"Treemap breadcrumb",config:this._breadcrumbCfg(),compact:!0,crumbs:[{label:"All",data:null}].concat(e.map(i=>({label:i.name,data:i}))),onNavigate:(i,a)=>{t.globals.treemapFocusKey=a.data?a.data._key:null,this._hideParentTooltip(),this.ctx.update()}});s&&(this._placeBreadcrumb(s),Br(t,s))}_placeBreadcrumb(t){var e,s;let i=this.w,a=i.layout.translateY||0,n=(s=(e=this.ctx)==null?void 0:e.dimensions)==null?void 0:s.dimHelpers,r=n?n.getTitleSubtitleCoords("title").height+n.getTitleSubtitleCoords("subtitle").height:0,o=t.getBoundingClientRect().height||Ha;if(a-r>=o+1){t.style.top=`${a-o-1}px`;return}t.style.top=`${r}px`;let l=i.config.theme.mode==="dark";t.style.background=l?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",t.style.borderRadius="4px"}_showParentTooltip(t,e){let s=this.w,i=this._tip();if(!i)return;let a=this._drawnTotal(),n=e._parent?e._parent._area:a,r=a>0?(e._area/a*100).toFixed(1):"0.0",o=n>0?(e._area/n*100).toFixed(1):r,l=this.w.config.plotOptions.treemap.parents,c=l&&l.tooltip&&l.tooltip.formatter,h=this._countLeaves(e),d;if(typeof c=="function")d=c({name:e.name,value:e._area,depth:e.depth||0,leafCount:h,percentOfParent:Number(o),percentOfTotal:Number(r),node:e,w:s});else{let f=this._parentChrome(e.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${s.config.tooltip.fillSeriesColor?`background-color:${f};`:""}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${T.escapeString(e.name)}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(e._area)}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${h} items, </span><span class="apexcharts-tooltip-text-y-value">${o}% of parent, ${r}% of total</span></div></div></div>`}i.innerHTML=d,i.classList.add("apexcharts-active"),i.style.opacity="1",this._tipOwned=!0,this._positionTooltip(t)}_tip(){return this._tooltipEl||(this._tooltipEl=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._tooltipEl}_positionTooltip(t){let e=this._tip();if(!e||!this._tipOwned)return;let s=this.w.dom.elWrap.getBoundingClientRect(),i=e.offsetWidth,a=e.offsetHeight,n=12,r=t.clientX-s.left+n;r+i>s.width&&(r=t.clientX-s.left-i-n),r=Math.max(0,Math.min(r,s.width-i));let o=t.clientY-s.top+n;o+a>s.height&&(o=t.clientY-s.top-a-n),o=Math.max(0,Math.min(o,s.height-a)),e.style.left=r+"px",e.style.top=o+"px"}_hideParentTooltip(){let t=this._tip();!t||!this._tipOwned||(this._tipOwned=!1,t.classList.remove("apexcharts-active"),t.style.opacity="0")}_drawnTotal(){return this._total==null&&(this._total=(this.drawn||[]).reduce((t,e)=>t+this._subtreeArea(e),0)),this._total||0}_subtreeArea(t){if(t._area!=null)return t._area;let e=t.children;if(e&&e.length){let i=0;for(let a=0;a<e.length;a++)i+=this._subtreeArea(e[a]);return i}let s=Number(t.value);return isNaN(s)?0:Math.abs(s)}_countLeaves(t){return!t.children||!t.children.length?1:t.children.reduce((e,s)=>e+this._countLeaves(s),0)}_formatValue(t){var e,s,i,a,n;let r=this.w,o=((s=(e=r.config.tooltip)==null?void 0:e.y)==null?void 0:s.formatter)||((n=(a=(i=r.config.yaxis)==null?void 0:i[0])==null?void 0:a.labels)==null?void 0:n.formatter);if(typeof o=="function")try{return String(o(t,{seriesIndex:0,dataPointIndex:0,w:r}))}catch{}return String(t)}_labelCanShow(t,e,s){if(!Number.isFinite(t)||t<=0)return!1;let i=this.w.config.plotOptions.treemap.dataLabels,a=i&&i.minFontSize!=null?Number(i.minFontSize):0;return t<a?!1:Math.max(e,s)>=t}_averageLabelSize(){if(this._avgLabelSize!=null)return this._avgLabelSize;function t(s){let i,a=0;if(Array.isArray(s[0]))for(i=0;i<s.length;i++)a+=t(s[i]);else for(i=0;i<s.length;i++)a+=s[i].length;return a}function e(s){let i,a=0;if(Array.isArray(s[0]))for(i=0;i<s.length;i++)a+=e(s[i]);else for(i=0;i<s.length;i++)a+=1;return a}return this._avgLabelSize=t(this.labels)/e(this.labels),this._avgLabelSize}getFontSize(t){let e=this.w,s=this._averageLabelSize();function i(a,n){let r=a*n,o=Math.pow(r,.5);return Math.min(o/s,parseInt(e.config.dataLabels.style.fontSize,10))}return i(t[2]-t[0],t[3]-t[1])}rotateToFitLabel(t,e,s,i,a,n,r){let o=new B(this.w),l=o.getTextRects(s,String(e));if(l.width+this.w.config.stroke.width+5>n-i&&l.width<=r-a){let c=o.rotateAroundCenter(t.node);t.node.setAttribute("transform",`rotate(-90 ${c.x} ${c.y}) translate(${l.height/3})`)}}truncateLabels(t,e,s,i,a,n){let r=new B(this.w),l=r.getTextRects(t,String(e)).width+this.w.config.stroke.width+5>a-s&&n-i>a-s?n-i:a-s,c=r.getTextBasedOnMaxWidth({text:t,maxWidth:l,fontSize:e});return t.length!==c.length&&l/e<5?"":c}_morphKeyed(){var t;let e=(t=this.ctx)==null?void 0:t.morphTypeChange;return!!(e&&typeof e.hasKeyedMarks=="function"&&e.hasKeyedMarks()&&typeof e.getInitialPathForKey=="function")}_morphSourceForLeaf(t){var e;let s=(e=this.ctx)==null?void 0:e.morphTypeChange;if(!s||typeof s.getInitialPathAt!="function")return null;if(this._morphKeyed()){let i=s.getInitialPathForKey(Re(t._key));if(i)return i}return s.getInitialPathAt(this._morphLeafIndex++)}_tilePath(t,e,s,i){return`M ${t} ${e} L ${s} ${e} L ${s} ${i} L ${t} ${i} Z`}_morphTile(t,e,s,i,a,n){new St(this.w,this.ctx).morphSVG(t,a,n,"none",e,s,i,0)}animateTreemap(t,e,s,i,a=0){let n=new St(this.w);n.animateRect(t,e,s,i,()=>{n.animationCompleted(t)},a)}},br=Math.PI*(3-Math.sqrt(5));function ni(u){return 1-Math.pow(1-u,3)}function kd(u){return t=>1+(u+1)*Math.pow(t-1,3)+u*Math.pow(t-1,2)}function Md(u){return u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2}var Ld=800,Dd=.25;function Ed(u,t){let[e,s]=Nc(u),i=Ld/Math.max(1,t);return[e*i*i,s*i]}var Oa=class{constructor(t,e){this.ctx=e,this.w=t,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null}draw(t){let e=this.w,s=new B(e,this.ctx),i=s.group({class:"apexcharts-unit"});if(e.globals.noData||!Array.isArray(t)||t.length===0)return i;let a=e.config.plotOptions.unit,n=a.layout==="packed"?"packed":a.layout==="columns"?"columns":a.layout==="grid"?"grid":a.layout==="scatter"?"scatter":a.layout==="arc"?"arc":a.layout==="custom"?"custom":"grouped",r=a.transition,o=r==="flow",l=r==="identity",c=a.unitValue>0?a.unitValue:1,h=t.map(k=>{let L=Math.abs(T.parseNumber(k))/c;return L>0?Math.max(1,Math.round(L)):0});h=this._applyMaxUnits(h,a.maxUnits);let d=h.reduce((k,L)=>k+L,0),f=n==="packed"?this._layoutPacked(h,a):n==="columns"?this._layoutColumns(h,a):n==="grid"?this._layoutGrid(h,a):n==="scatter"?this._layoutScatter(a):n==="arc"?this._layoutArc(h,a):n==="custom"?this._layoutCustom(h,a):this._layoutGrouped(h,a),g=n==="grid"&&!!(a.grid&&a.grid.split);g&&this._drawGridTrack(i,s,a),n==="scatter"&&this._drawScatterAxes(i,s);let p=this._lastDotR,m=this._shouldAnimate(),b=this.ctx&&this.ctx.morphTypeChange,x=m&&!!b&&typeof b.isActive=="function"&&b.isActive()&&typeof b.getInitialCenterFor=="function",_=x&&typeof b.getInitialSlotFor=="function",w=x&&typeof b.usesPieceTakeover=="function"&&b.usesPieceTakeover(),y=m&&!x&&this.ctx?this.ctx._unitPrevDots:null,v=new Map,A=[],S=e.seriesData.unitData||[],C=this._bubbleStats(S,a,p),M=0;if(f.forEach(k=>{let L=e.globals.colors[k.i]||e.globals.colors[0]||"#008FFB",E=s.group({class:"apexcharts-series",seriesName:T.escapeString(e.seriesData.seriesNames[k.i]||`series-${k.i+1}`),rel:k.i+1,"data:realIndex":k.i}),D=x&&!_?b.getInitialCenterFor(k.i):null,P=k.dots.length,F=S[k.i];if(k.dots.forEach((R,N)=>{let z=F?F[N]:void 0,$=z&&typeof z=="object"&&z.fillColor?z.fillColor:L,W=R.r!=null?R.r:C?this._radiusForValue(this._unitValueOf(z),C):p,Y=this._drawDot(s,a,W,$,k.i,N);E.add(Y);let I;if(l){let U=z&&typeof z=="object"?z.id!=null?z.id:z.name:void 0;I=U!=null?`id:${U}`:`g:${M}`}else o?I=String(M):R.slot!=null?I=`slot:${R.slot}`:I=`${k.i}:${N}`;if(M++,v.set(I,{x:R.x,y:R.y,fill:$,r:W}),w)this._placeDot(Y.node,a,R.x,R.y),Y.node.setAttribute("opacity","0"),Y.node.setAttribute("data-piece-hidden","1");else if(m){let U=y&&y.get(I),X=U||(_?b.getInitialSlotFor(k.i,N,P):D),V=a.gather&&a.gather.enter||"burst",q=g||V==="fade"||V==="rise",Z=X?X.x:q?R.x:k.cx,K=X?X.y:V==="rise"&&!g?R.y+14:q?R.y:k.cy;Y.node.style.opacity=X?"1":"0",this._placeDot(Y.node,a,Z,K),A.push({node:Y.node,x:R.x,y:R.y,cx0:Z,cy0:K,key:I,r0:U&&U.r!=null?U.r:W,r1:W,fill0:U?U.fill:$,fill1:$,delay:0,isEnter:!X})}else this._placeDot(Y.node,a,R.x,R.y)}),(n==="grouped"||n==="columns"||g)&&a.clusterLabels&&a.clusterLabels.show&&h[k.i]>0){let R=g?this._gridDenom:d;this._drawClusterLabel(E,k,h[k.i],R,a,L)}i.add(E)}),this._outerLabelsOn(a)&&this._drawOuterLabels(i,f,h,d,a,m&&!y),y){let k=this._collectExits(y,v,a);if(k.length){let L=s.group({class:"apexcharts-unit-exits"});i.add(L),this._runExits(L,k,a)}}return this.ctx&&(this.ctx._unitPrevDots=v),this.ctx&&(!m||x)&&(this.ctx._unitSprings=null),m&&A.length&&this._runGather(A),i}_applyMaxUnits(t,e){let s=t.reduce((a,n)=>a+n,0);if(!e||e<=0||s<=e)return t;let i=e/s;return console.warn(`[ApexCharts] unit chart: ${s} dots exceeds maxUnits (${e}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`),t.map(a=>a>0?Math.max(1,Math.round(a*i)):0)}_layoutCustom(t,e){let s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=t.reduce((b,x)=>b+x,0),r=this._resolveLayoutProvider(e);if(!r)return console.warn("[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'."),this._layoutGrouped(t,e);let o=this._outerLabelsOn(e)?this._outerLabelGutter(t,e):0;this._lastOuterGutter=o;let l={x:o,y:0,width:Math.max(1,i-o*2),height:a},c=Math.sqrt(l.width*l.height/Math.PI),h=this._resolveStep(e,c,n);this._lastDotR=this._dotRadiusFromStep(h,e);let d=this._lastDotR,f=this._layoutObjects(t,d),g;try{g=r(f,l)}catch(b){return console.warn("[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.",b),this._layoutGrouped(t,e)}if(!Array.isArray(g))return console.warn("[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'."),this._layoutGrouped(t,e);let p=new Map;g.forEach(b=>{!b||!isFinite(b.x)||!isFinite(b.y)||p.set(String(b.id),{x:b.x,y:b.y,r:typeof b.r=="number"&&b.r>0?b.r:void 0})});let m=t.map((b,x)=>({i:x,cx:i/2,cy:a/2,outerR:d,dots:[]}));return f.forEach(b=>{let x=p.get(b.id);x&&m[b.seriesIndex].dots.push({x:x.x,y:x.y,r:x.r})}),m.forEach(b=>{if(!b.dots.length)return;let x=0,_=0;b.dots.forEach(y=>{x+=y.x,_+=y.y}),b.cx=x/b.dots.length,b.cy=_/b.dots.length;let w=0;b.dots.forEach(y=>{w=Math.max(w,Math.hypot(y.x-b.cx,y.y-b.cy))}),b.outerR=w+d}),m}_layoutObjects(t,e){let s=this.w,i=s.seriesData.unitData||[],a=s.seriesData.seriesNames||[],n=[],r=0;return t.forEach((o,l)=>{var c;let h=i[l];for(let d=0;d<o;d++){let f=h?h[d]:void 0,g=f&&typeof f=="object"&&(f.id!=null||f.name!=null)?String(f.id!=null?f.id:f.name):`${l}:${d}`;n.push({id:g,index:r,seriesIndex:l,dataPointIndex:d,label:a[l],value:(c=this._unitValueOf(f))!=null?c:void 0,datum:f,r:e}),r++}}),n}_resolveLayoutProvider(t){let e=t.positions;if(typeof e=="function")return e;if(typeof e=="string"&&e){let s=_c(e);if(s)return s;console.warn(`[ApexCharts] unit chart: no layout named "${e}" is registered. Register one with ApexCharts.registerUnitLayout("${e}", fn).`)}return null}_layoutGrouped(t,e){let s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=e.clusterLabels&&e.clusterLabels.show?30:6,r=t.map((A,S)=>S).filter(A=>t[A]>0),o=Math.max(1,r.length),l=new Array(t.length).fill(-1);r.forEach((A,S)=>l[A]=S);let c=i/o,h=a-n,d=Math.max(1,...t),f=Math.min(c,h)*.08,g=Math.max(4,Math.min(c,h)/2-f),p=this._resolveStep(e,g,d);this._lastDotR=this._dotRadiusFromStep(p,e);let m=this._lastDotR,b=n+h/2,x=t.map(A=>p*Math.sqrt(Math.max(1,A))+m),_=A=>l[A]>=0?c*(l[A]+.5):i/2,w=t.map((A,S)=>_(S)),y=r.map(A=>x[A]),v=!1;for(let A=1;A<o;A++)if(w[r[A]]-w[r[A-1]]<y[A]+y[A-1]){v=!0;break}if(v){let A=Math.max(2*m,8),S=y.reduce((M,k)=>M+2*k,0)+A*(o-1),C;if(S<=i){let M=(i-S)/2;C=y.map(k=>{let L=M+k;return M+=2*k+A,L})}else if(o===1)C=[i/2];else{let M=y[0],k=i-y[o-1];C=y.map((L,E)=>M+(k-M)*E/(o-1))}w=t.map((M,k)=>l[k]>=0?C[l[k]]:i/2)}return t.map((A,S)=>({i:S,cx:w[S],cy:b,outerR:x[S],dots:this._spiral(w[S],b,A,p,0)}))}_layoutPacked(t,e){let s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=6,r=Math.max(1,t.reduce((p,m)=>p+m,0)),o=Math.max(4,Math.min(i,a-n)/2-Math.min(i,a)*.06),l=this._resolveStep(e,o,r);this._lastDotR=this._dotRadiusFromStep(l,e);let c=i/2,h=n+(a-n)/2,d=t.map((p,m)=>m);e.sortByGroup!==!1&&d.sort((p,m)=>t[p]-t[m]);let f=t.map((p,m)=>({i:m,cx:c,cy:h,outerR:l*Math.sqrt(r)+this._lastDotR,dots:[]})),g=0;return d.forEach(p=>{for(let m=0;m<t[p];m++){let b=l*Math.sqrt(g+.5),x=g*br;f[p].dots.push({x:c+b*Math.cos(x),y:h+b*Math.sin(x),slot:g}),g++}}),f}_layoutArc(t,e){let s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=Math.max(1,t.reduce((E,D)=>E+D,0)),r=e.arc||{},o=typeof r.startAngle=="number"?r.startAngle:-90,l=typeof r.endAngle=="number"?r.endAngle:90,c=o*Math.PI/180,h=l*Math.PI/180,d=h-c||Math.PI,f=Math.max(0,Math.min(.95,typeof r.innerRadiusRatio=="number"?r.innerRadiusRatio:.4)),g=E=>Math.sin(E),p=E=>-Math.cos(E),m=this._arcBounds(c,h),b=Math.min(i,a)*.04,x=Math.max(1e-6,m.maxX-m.minX),_=Math.max(1e-6,m.maxY-m.minY),w=Math.max(4,Math.min((i-2*b)/x,(a-2*b)/_)),y=w*f,v=i/2-(m.minX+m.maxX)/2*w,A=a/2-(m.minY+m.maxY)/2*w,S=this._arcAllocate(n,y,w,d,e);this._lastDotR=S.dotR;let C=[];for(let E=0;E<S.R;E++){let D=S.radii[E],P=S.seatsPerRow[E];for(let F=0;F<P;F++){let R=P===1?(c+h)/2:c+d*(F+.5)/P;C.push({a:R,x:v+D*g(R),y:A+D*p(R)})}}C.sort((E,D)=>E.a-D.a);let M=t.map((E,D)=>({i:D,cx:v,cy:A,outerR:w,dots:[]})),k=0,L=0;return C.forEach((E,D)=>{for(;k<t.length&&L>=t[k];)k++,L=0;k>=t.length||(M[k].dots.push({x:E.x,y:E.y,slot:D}),L++)}),M}_arcBounds(t,e){let s=c=>Math.sin(c),i=c=>-Math.cos(c),a=Math.min(t,e),n=Math.max(t,e),r=[0,s(t),s(e)],o=[0,i(t),i(e)],l=Math.PI/2;for(let c=Math.ceil(a/l);c*l<=n;c++)r.push(s(c*l)),o.push(i(c*l));return{minX:Math.min(...r),maxX:Math.max(...r),minY:Math.min(...o),maxY:Math.max(...o)}}_arcAllocate(t,e,s,i,a){let n=a.spacing>0?a.spacing:1.05,r=Math.abs(i)||Math.PI,o=this._fixedRadius(a),l=d=>{d=Math.max(1,Math.round(d));let f=[];for(let y=0;y<d;y++)f.push(d===1?(e+s)/2:e+(s-e)*(y/(d-1)));let g=f.reduce((y,v)=>y+v,0)||1,p=f.map(y=>t*y/g),m=p.map(y=>Math.floor(y)),b=t-m.reduce((y,v)=>y+v,0);for(p.map((y,v)=>({idx:v,frac:y-Math.floor(y)})).sort((y,v)=>v.frac-y.frac).forEach(y=>{b>0&&(m[y.idx]++,b--)});b>0;)m[d-1]++,b--;let x=d===1?s-e||s:(s-e)/(d-1),_=1/0;for(let y=0;y<d;y++){let v=m[y];if(v<=0)continue;let A=f[y]*r/v;A<_&&(_=A)}let w=Math.min(x,_);return{R:d,radii:f,seatsPerRow:m,dotR:Math.max(1,w/(2*n))}},c=a.arc&&a.arc.rows,h;if(typeof c=="number"&&c>=1)h=l(c);else if(o){let d=2*o*n;h=l((s-e)/d+1)}else{let d=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(t))+6));h=l(1);for(let f=2;f<=d;f++){let g=l(f);g.dotR>h.dotR&&(h=g)}}return o&&(h.dotR=o),h}_layoutColumns(t,e){let s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=!!(e.clusterLabels&&e.clusterLabels.show),r=n&&e.clusterLabels.position==="bottom",o=n&&!r?30:6,l=t.map((M,k)=>k).filter(M=>t[M]>0),c=Math.max(1,l.length),h=new Array(t.length).fill(-1);l.forEach((M,k)=>h[M]=k);let d=i/c,f=d*.62,g=Math.max(8,a*.04)+(r?30:0),p=Math.max(4,a-o-g),m=Math.max(1,...t),b=e.spacing>0?e.spacing:1,x=e.columns?e.columns.size:void 0,_;e.shape!=="image"&&x==="auto"?_=null:e.shape!=="image"&&typeof x=="number"&&x>0?_=x:_=this._fixedRadius(e);let w=1,y=0;if(_){y=2*_*b,this._lastDotR=_;let M=Math.max(1,Math.floor(p/y)),k=Math.max(1,Math.floor(f/y));w=Math.max(1,Math.min(k,Math.ceil(m/M)))}else{let M=0,k=Math.max(1,Math.min(40,Math.round(f/4)));for(let L=1;L<=k;L++){let E=Math.ceil(m/L),D=Math.min(f/L,p/E);D>M&&(M=D,w=L)}y=M,this._lastDotR=Math.max(1,y/(2*b))}let v=this._lastDotR,A=Math.ceil(m/w),S=Math.min(p,A*y),C=o+(p+S)/2;return t.map((M,k)=>{let L=h[k]>=0?d*(h[k]+.5):i/2,D=Math.ceil(Math.max(1,M)/w)*y,P=L-w*y/2+y/2,F=[];for(let R=0;R<M;R++){let N=Math.floor(R/w),z=R%w;F.push({x:P+z*y,y:C-v-N*y})}return{i:k,cx:L,cy:C-D/2,outerR:D/2,flat:!0,dots:F}})}_layoutGrid(t,e){if(e.grid&&e.grid.split)return this._layoutGridSplit(t,e);this._gridTrack=null;let s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=e.grid||{},r=Math.max(1,Math.round(n.columns>0?n.columns:10)),o=n.fillFrom==="top"?"top":"bottom",l=n.total>0?this._largestRemainder(t,Math.round(n.total)):t.slice(),c=l.reduce((C,M)=>C+M,0),h=Math.max(1,Math.ceil(Math.max(1,c)/r)),d=6,f=e.spacing>0?e.spacing:1,g=Math.max(4,i),p=Math.max(4,a-d),m=this._fixedRadius(e),b=0;m?(b=2*m*f,this._lastDotR=m):(b=Math.min(g/r,p/h),this._lastDotR=Math.max(1,b/(2*f)));let x=r*b,_=h*b,w=(i-x)/2+b/2,y=d+(p-_)/2,v=C=>o==="bottom"?y+_-b/2-C*b:y+b/2+C*b,A=t.map((C,M)=>({i:M,cx:i/2,cy:d+p/2,outerR:Math.max(x,_)/2,dots:[]})),S=0;for(let C=0;C<l.length;C++)for(let M=0;M<l[C];M++){let k=S%r,L=Math.floor(S/r);A[C].dots.push({x:w+k*b,y:v(L),slot:S}),S++}return A}_layoutGridSplit(t,e){let s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=e.grid||{},r=Math.max(1,Math.round(n.columns>0?n.columns:10)),o=n.fillFrom==="top"?"top":"bottom",l=Math.max(1,Math.round(n.total>0?n.total:100)),c=Math.max(1,Math.ceil(l/r)),h=t.map((F,R)=>R).filter(F=>t[F]>0),d=Math.max(1,h.length),f=n.max>0?n.max:Math.max(1,...t),g=Math.max(1,Math.round(n.tileColumns>0?n.tileColumns:Math.ceil(Math.sqrt(d)))),p=Math.max(1,Math.ceil(d/g)),m=!(e.clusterLabels&&e.clusterLabels.show===!1),b=m&&e.clusterLabels&&e.clusterLabels.position==="bottom",x=m&&!b?22:4,_=m&&b?22:4,w=i/g,y=a/p,v=Math.max(4,w*.86),A=Math.max(4,y-x-_),S=e.spacing>0?e.spacing:1,C=this._fixedRadius(e),M=0;C?(M=2*C*S,this._lastDotR=C):(M=Math.min(v/r,A/c),this._lastDotR=Math.max(1,M/(2*S)));let k=r*M,L=c*M,E=(F,R)=>o==="bottom"?F+L-M/2-R*M:F+M/2+R*M,D=[],P=[];return h.forEach((F,R)=>{let N=R%g,z=Math.floor(R/g),$=N*w,W=z*y,Y=$+(w-k)/2+M/2,I=W+x+(A-L)/2,U=q=>({x:Y+q%r*M,y:E(I,Math.floor(q/r))});for(let q=0;q<l;q++)D.push(U(q));let X=Math.max(0,Math.min(l,Math.round(t[F]/f*l))),V=[];for(let q=0;q<X;q++){let Z=U(q);V.push({x:Z.x,y:Z.y,slot:R*l+q})}P.push({i:F,cx:$+w/2,cy:I+L/2,outerR:L/2,flat:!0,split:!0,dots:V})}),this._gridDenom=f,this._gridTrack={cells:D},P}_drawGridTrack(t,e,s){let i=this._gridTrack;if(!i||!i.cells||!i.cells.length)return;let a=this._lastDotR,r=(s.grid||{}).trackColor||"rgba(128,128,128,0.14)",o=e.group({class:"apexcharts-unit-track"});i.cells.forEach(l=>{let c;if(s.shape==="square"){let h=a*2;c=e.drawRect(0,0,h,h,s.borderRadius||0,r,1,0,"none"),c.node.setAttribute("fill",r),c.node.setAttribute("x",String(l.x-a)),c.node.setAttribute("y",String(l.y-a))}else c=e.drawCircle(a,{fill:r,"stroke-width":0,stroke:"none"}),c.node.setAttribute("fill",r),c.node.setAttribute("cx",String(l.x)),c.node.setAttribute("cy",String(l.y));c.node.classList.add("apexcharts-unit-track-cell"),o.add(c)}),t.add(o)}_layoutScatter(t){let e=this.w,s=t.scatter||{};if(s.y==="value")return this._layoutScatter2D(t);if(s.orientation==="vertical")return this._layoutScatterVertical(t);let i=e.layout.gridWidth,a=e.layout.gridHeight,n=e.seriesData.unitData||[],r=e.seriesData.seriesNames||[],o=X=>this._unitValueOf(X),l=this._scatterSizeStats(s,n),c=n.map(X=>Array.isArray(X)?X.map(o):[]),h=X=>X!=null&&isFinite(X),d=c.map((X,V)=>V).filter(X=>c[X].some(h)),f=Math.max(1,d.length),g=1/0,p=-1/0;c.forEach(X=>X.forEach(V=>{V!=null&&isFinite(V)&&(V<g&&(g=V),V>p&&(p=V))})),g===1/0&&(g=0,p=1);let m=Math.max(2,Math.round(s.tickAmount>0?s.tickAmount:5)),b=this._scatterValueDomain(s,g,p,m),x=b.min,_=b.max,w=_-x||1,y=s.laneLabelWidth!=null?Math.max(0,s.laneLabelWidth):f>1?92:8,v=30+(s.xTitle?20:0),A=y,S=i-8,C=10,M=a-v,k=Math.max(4,S-A),L=Math.max(4,M-C),E=X=>A+(X-x)/w*k,D=L/f,P=X=>C+D*(X+.5),F=0,R=this._fixedRadius(t);if(R)F=R;else{let X=Math.max(1,...d.map(V=>c[V].filter(h).length));F=Math.max(2,Math.min(6,D*.12,k/(2.5*Math.sqrt(X))))}this._lastDotR=F;let N=t.spacing>0?t.spacing:1,z=Math.max(.5,F*N),$=s.spread==="jitter",W=[],Y=[],I=l?l.rMax:F;d.forEach((X,V)=>{let q=P(V);Y.push({i:X,cy:q,name:r[X]||`series-${X+1}`});let K=(n[X]||[]).map((Q,tt)=>{let dt=o(Q),st={j:tt,px:E(h(dt)?dt:x),y:q};return l&&(st.r=this._scatterRadius(Q,l,F)),st});if($){let Q=Math.max(I,D/2-I);K.forEach((tt,dt)=>{let st=(dt*9301+49297)%233280/233280;tt.y=q+(st*2-1)*Q})}else this._beeswarm(K,q,F,z,I);W.push({i:X,cx:(A+S)/2,cy:q,outerR:D/2,dots:K.map(Q=>({x:Q.px,y:Q.y,r:Q.r}))})});let U=b.ticks;return this._scatterAxis={mode:"1d",plotL:A,plotR:S,plotT:C,plotB:M,xMin:x,xMax:_,plotX:E,ticks:U,lanes:Y,xTitle:s.xTitle,formatter:typeof s.xFormatter=="function"?s.xFormatter:null,gridlines:s.gridlines!==!1},W}_layoutScatterVertical(t){let e=this.w,s=t.scatter||{},i=e.layout.gridWidth,a=e.layout.gridHeight,n=e.seriesData.unitData||[],r=e.seriesData.seriesNames||[],o=X=>this._unitValueOf(X),l=this._scatterSizeStats(s,n),c=n.map(X=>Array.isArray(X)?X.map(o):[]),h=X=>X!=null&&isFinite(X),d=c.map((X,V)=>V).filter(X=>c[X].some(h)),f=Math.max(1,d.length),g=1/0,p=-1/0;c.forEach(X=>X.forEach(V=>{V!=null&&isFinite(V)&&(V<g&&(g=V),V>p&&(p=V))})),g===1/0&&(g=0,p=1);let m=Math.max(2,Math.round(s.tickAmount>0?s.tickAmount:5)),b=this._scatterValueDomain(s,g,p,m),x=b.min,_=b.max,w=_-x||1,y=46+(s.xTitle?18:0),v=f>1?26:10,A=y,S=i-10,C=10,M=a-v,k=Math.max(4,S-A),L=Math.max(4,M-C),E=X=>M-(X-x)/w*L,D=k/f,P=X=>A+D*(X+.5),F=0,R=this._fixedRadius(t);if(R)F=R;else{let X=Math.max(1,...d.map(V=>c[V].filter(h).length));F=Math.max(2,Math.min(6,D*.12,L/(2.5*Math.sqrt(X))))}this._lastDotR=F;let N=t.spacing>0?t.spacing:1,z=Math.max(.5,F*N),$=s.spread==="jitter",W=[],Y=[],I=l?l.rMax:F;d.forEach((X,V)=>{let q=P(V);Y.push({i:X,cx:q,name:r[X]||`series-${X+1}`});let K=(n[X]||[]).map((Q,tt)=>{let dt=o(Q),st={j:tt,py:E(h(dt)?dt:x),x:q};return l&&(st.r=this._scatterRadius(Q,l,F)),st});if($){let Q=Math.max(I,D/2-I);K.forEach((tt,dt)=>{let st=(dt*9301+49297)%233280/233280;tt.x=q+(st*2-1)*Q})}else this._beeswarm(K,q,F,z,I,!0);W.push({i:X,cx:q,cy:(C+M)/2,outerR:D/2,dots:K.map(Q=>({x:Q.x,y:Q.py,r:Q.r}))})});let U=b.ticks;return this._scatterAxis={mode:"1d",orientation:"vertical",plotL:A,plotR:S,plotT:C,plotB:M,vMin:x,vMax:_,plotY:E,ticks:U,lanes:Y,valueTitle:s.xTitle,formatter:typeof s.xFormatter=="function"?s.xFormatter:null,gridlines:s.gridlines!==!1},W}_layoutScatter2D(t){let e=this.w,s=e.layout.gridWidth,i=e.layout.gridHeight,a=t.scatter||{},n=e.seriesData.unitData||[],r=I=>typeof I=="number"&&isFinite(I),o=I=>I&&typeof I=="object"?I.x:null,l=I=>I&&typeof I=="object"?I.y!=null?I.y:I.value:null,c=n.map((I,U)=>U).filter(I=>(n[I]||[]).some(U=>r(o(U))&&r(l(U)))),h=1/0,d=-1/0,f=1/0,g=-1/0;n.forEach(I=>(I||[]).forEach(U=>{let X=o(U),V=l(U);r(X)&&r(V)&&(X<h&&(h=X),X>d&&(d=X),V<f&&(f=V),V>g&&(g=V))})),h===1/0&&(h=0,d=1,f=0,g=1);let p=Math.max(2,Math.round(a.tickAmount>0?a.tickAmount:5)),m=Math.max(2,Math.round(a.yTickAmount>0?a.yTickAmount:5)),b=this._niceScale(a.xMin!=null?a.xMin:h,a.xMax!=null?a.xMax:d,p),x=this._niceScale(a.yMin!=null?a.yMin:f,a.yMax!=null?a.yMax:g,m),_=a.xMin!=null?a.xMin:b.min,w=a.xMax!=null?a.xMax:b.max,y=a.yMin!=null?a.yMin:x.min,v=a.yMax!=null?a.yMax:x.max,A=w-_||1,S=v-y||1,C=46+(a.yTitle?18:0),M=30+(a.xTitle?20:0),k=C,L=s-12,E=10,D=i-M,P=Math.max(4,L-k),F=Math.max(4,D-E),R=I=>k+(I-_)/A*P,N=I=>D-(I-y)/S*F,z=this._scatterSizeStats(a,n),$=this._fixedRadius(t)||5;this._lastDotR=$;let W=[];c.forEach(I=>{let X=(n[I]||[]).map(V=>{let q=o(V),Z=l(V);return{x:R(r(q)?q:_),y:N(r(Z)?Z:y),r:z?this._scatterRadius(V,z,$):void 0}});W.push({i:I,cx:(k+L)/2,cy:(E+D)/2,outerR:F/2,dots:X})});let Y=(I,U,X,V,q,Z)=>{let K=[];if(q)for(let Q=0;Q<Z;Q++)K.push(I+X*Q/(Z-1));else{let Q=V||X/Math.max(1,Z-1);for(let tt=I;tt<=U+Q*.5;tt+=Q)K.push(Math.abs(tt)<Q*1e-9?0:tt)}return K};return this._scatterAxis={mode:"2d",plotL:k,plotR:L,plotT:E,plotB:D,plotX:R,plotY:N,xTicks:Y(_,w,A,b.spacing,a.xMin!=null||a.xMax!=null,p),yTicks:Y(y,v,S,x.spacing,a.yMin!=null||a.yMax!=null,m),xTitle:a.xTitle,yTitle:a.yTitle,xFormatter:typeof a.xFormatter=="function"?a.xFormatter:null,yFormatter:typeof a.yFormatter=="function"?a.yFormatter:null,gridlines:a.gridlines!==!1},W}_scatterSizeStats(t,e){let s=t&&t.sizeRange;if(!Array.isArray(s)||s.length<2)return null;let i=Math.max(.5,+s[0]),a=Math.max(i,+s[1]),n=t.sizeField||"z",r=1/0,o=-1/0;return e.forEach(l=>(l||[]).forEach(c=>{let h=c&&typeof c=="object"?c[n]:null;typeof h=="number"&&isFinite(h)&&(h<r&&(r=h),h>o&&(o=h))})),r===1/0?null:{zmin:r,zmax:o,rMin:i,rMax:a,field:n}}_scatterRadius(t,e,s){if(!e)return s;let i=t&&typeof t=="object"?t[e.field]:null;if(typeof i!="number"||!isFinite(i))return e.rMin;let a=e.zmax>e.zmin?(i-e.zmin)/(e.zmax-e.zmin):1,n=Math.max(0,Math.min(1,a)),r=e.rMin*e.rMin,o=e.rMax*e.rMax;return Math.sqrt(r+n*(o-r))}_beeswarm(t,e,s,i,a,n=!1){let r=n?"py":"px",o=n?"x":"y",l=t.slice().sort((d,f)=>d[r]-f[r]),c=[],h=a??s;l.forEach(d=>{let f=d.r!=null?d.r:s,g=0;for(let p=0;p<2e3;p++){let m=p===0?0:Math.ceil(p/2)*i*(p%2?1:-1),b=e+m,x=!0;for(let _=c.length-1;_>=0;_--){let w=c[_],y=d[r]-w.f;if(y>f+h)break;let v=f+w.r,A=b-w.s;if(y*y+A*A<v*v){x=!1;break}}if(x){g=m;break}}d[o]=e+g,c.push({f:d[r],s:d[o],r:f})})}_scatterValueDomain(t,e,s,i){let a=(o,l,c)=>{let h=[];for(let d=o;d<=l+c*.5;d+=c)h.push(Math.abs(d)<c*1e-9?0:d);return h};if(t.xMin!=null||t.xMax!=null){let o=t.xMin!=null?t.xMin:e,l=t.xMax!=null?t.xMax:s;l>o||(l=o+1);let c=(l-o)/Math.max(1,i-1);return e<o&&(o-=Math.ceil((o-e)/c)*c),s>l&&(l+=Math.ceil((s-l)/c)*c),{min:o,max:l,ticks:a(o,l,c)}}let n=this._niceScale(e,s,i),r=n.spacing||(n.max-n.min)/Math.max(1,i-1);return{min:n.min,max:n.max,ticks:a(n.min,n.max,r)}}_niceScale(t,e,s){let i=t,a=e;a>i||(a=i+1);let n=this._niceNum(a-i,!1),r=this._niceNum(n/Math.max(1,s-1),!0);return{min:Math.floor(i/r)*r,max:Math.ceil(a/r)*r,spacing:r}}_niceNum(t,e){let s=t>0?t:1,i=Math.floor(Math.log(s)/Math.LN10),a=s/Math.pow(10,i),n;return e?n=a<1.5?1:a<3?2:a<7?5:10:n=a<=1?1:a<=2?2:a<=5?5:10,n*Math.pow(10,i)}_drawScatterAxes(t,e){let s=this.w;if(!H.isBrowser())return;let i=this._scatterAxis;if(!i)return;let a="http://www.w3.org/2000/svg",n=e.group({class:"apexcharts-unit-axis"}),r=s.config.grid&&s.config.grid.borderColor||"rgba(128,128,128,0.18)",o="rgba(128,128,128,0.5)",l=s.config.xaxis&&s.config.xaxis.labels&&s.config.xaxis.labels.style&&s.config.xaxis.labels.style.colors,c=Array.isArray(l)?l[0]:l,h=c||"rgba(120,130,140,0.9)",d=(g,p,m,b,x)=>{let _=O.createElementNS(a,"line");_.setAttribute("x1",String(g)),_.setAttribute("y1",String(p)),_.setAttribute("x2",String(m)),_.setAttribute("y2",String(b)),_.setAttribute("stroke",x),_.setAttribute("shape-rendering","crispEdges"),n.node.appendChild(_)},f=(g,p,m,b,x,_,w,y)=>{let v=O.createElementNS(a,"text");v.setAttribute("class",y),v.setAttribute("x",String(p)),v.setAttribute("y",String(m)),v.setAttribute("text-anchor",b),v.setAttribute("dominant-baseline","middle"),v.setAttribute("font-size",`${_}px`),v.setAttribute("font-family",s.config.chart.fontFamily||"inherit"),v.setAttribute("font-weight",String(w)),v.setAttribute("fill",x),v.textContent=g,n.node.appendChild(v)};if(i.mode==="2d"){if(i.yTicks.forEach(g=>{let p=i.plotY(g);i.gridlines&&d(i.plotL,p,i.plotR,p,r);let m=i.yFormatter?String(i.yFormatter(g)):this._formatTick(g);f(m,i.plotL-8,p,"end",h,11,400,"apexcharts-unit-tick")}),i.xTicks.forEach(g=>{let p=i.plotX(g);i.gridlines&&d(p,i.plotT,p,i.plotB,r);let m=i.xFormatter?String(i.xFormatter(g)):this._formatTick(g);f(m,p,i.plotB+14,"middle",h,11,400,"apexcharts-unit-tick")}),d(i.plotL,i.plotB,i.plotR,i.plotB,o),d(i.plotL,i.plotT,i.plotL,i.plotB,o),i.xTitle&&f(String(i.xTitle),(i.plotL+i.plotR)/2,i.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),i.yTitle){let g=O.createElementNS(a,"text");g.setAttribute("class","apexcharts-unit-axis-title");let p=14,m=(i.plotT+i.plotB)/2;g.setAttribute("x",String(p)),g.setAttribute("y",String(m)),g.setAttribute("text-anchor","middle"),g.setAttribute("font-size","12px"),g.setAttribute("font-family",s.config.chart.fontFamily||"inherit"),g.setAttribute("font-weight","600"),g.setAttribute("fill",h),g.setAttribute("transform",`rotate(-90 ${p} ${m})`),g.textContent=String(i.yTitle),n.node.appendChild(g)}t.add(n);return}if(i.orientation==="vertical"){if(i.ticks.forEach(g=>{let p=i.plotY(g);i.gridlines&&d(i.plotL,p,i.plotR,p,r);let m=i.formatter?String(i.formatter(g)):this._formatTick(g);f(m,i.plotL-8,p,"end",h,11,400,"apexcharts-unit-tick")}),d(i.plotL,i.plotT,i.plotL,i.plotB,o),i.valueTitle){let g=O.createElementNS(a,"text");g.setAttribute("class","apexcharts-unit-axis-title");let p=14,m=(i.plotT+i.plotB)/2;g.setAttribute("x",String(p)),g.setAttribute("y",String(m)),g.setAttribute("text-anchor","middle"),g.setAttribute("font-size","12px"),g.setAttribute("font-family",s.config.chart.fontFamily||"inherit"),g.setAttribute("font-weight","600"),g.setAttribute("fill",h),g.setAttribute("transform",`rotate(-90 ${p} ${m})`),g.textContent=String(i.valueTitle),n.node.appendChild(g)}i.lanes.forEach(g=>{let p=c||s.globals.colors[g.i]||s.globals.colors[0]||"#008FFB";f(g.name,g.cx,i.plotB+16,"middle",p,12,600,"apexcharts-unit-lane-label")}),t.add(n);return}i.ticks.forEach((g,p)=>{let m=i.plotX(g);i.gridlines&&d(m,i.plotT,m,i.plotB,r);let b=i.formatter?String(i.formatter(g)):this._formatTick(g),x=p===0?"start":p===i.ticks.length-1?"end":"middle";f(b,m,i.plotB+14,x,h,11,400,"apexcharts-unit-tick")}),d(i.plotL,i.plotB,i.plotR,i.plotB,o),i.xTitle&&f(String(i.xTitle),(i.plotL+i.plotR)/2,i.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),i.plotL>12&&i.lanes.forEach(g=>{let p=c||s.globals.colors[g.i]||s.globals.colors[0]||"#008FFB";f(g.name,i.plotL-8,g.cy,"end",p,12,600,"apexcharts-unit-lane-label")}),t.add(n)}_formatTick(t){if(!isFinite(t))return"";let e=Math.abs(t);return e>=1e6?`${+(t/1e6).toFixed(1)}M`:e>=1e4?`${+(t/1e3).toFixed(1)}k`:Number.isInteger(t)?String(t):String(+t.toFixed(2))}_largestRemainder(t,e){let s=t.reduce((c,h)=>c+h,0);if(s<=0||e<=0)return t.map(()=>0);let i=t.map(c=>c/s*e),a=i.map(c=>Math.floor(c)),n=a.reduce((c,h)=>c+h,0),r=Math.max(0,e-n),o=i.map((c,h)=>({i:h,frac:c-Math.floor(c)})).sort((c,h)=>h.frac-c.frac),l=a.slice();for(let c=0;c<r&&c<o.length;c++)l[o[c].i]++;return l}_spiral(t,e,s,i,a){let n=[];for(let r=0;r<s;r++){let o=a+r,l=i*Math.sqrt(o+.5),c=o*br;n.push({x:t+l*Math.cos(c),y:e+l*Math.sin(c)})}return n}_fixedRadius(t){return t.shape==="image"&&t.image?Math.max(t.image.width||20,t.image.height||20)/2:this._bubbleActive(t)&&typeof t.sizeByValue.maxRadius=="number"?t.sizeByValue.maxRadius>0?t.sizeByValue.maxRadius:null:typeof t.size=="number"&&t.size>0?t.size:null}_bubbleActive(t){let e=t.sizeByValue;return!!(e&&e.enabled&&t.shape!=="image"&&t.shape!=="square")}_unitValueOf(t){if(typeof t=="number")return t;if(t&&typeof t=="object"){let e=t.value!=null?t.value:t.y;return typeof e=="number"?e:null}return null}_radiusForValue(t,e){if(t==null||!isFinite(t))return e.minR;let s=e.max>e.min?(t-e.min)/(e.max-e.min):1,i=Math.max(0,Math.min(1,s));if(e.scale==="linear")return e.minR+i*(e.maxR-e.minR);let a=e.minR*e.minR,n=e.maxR*e.maxR;return Math.sqrt(a+i*(n-a))}_bubbleStats(t,e,s){if(!this._bubbleActive(e))return null;let i=1/0,a=-1/0;if(t.forEach(l=>{l&&l.forEach(c=>{let h=this._unitValueOf(c);h!=null&&isFinite(h)&&(h<i&&(i=h),h>a&&(a=h))})}),i===1/0||a<i)return null;let n=e.sizeByValue,r=s,o=Math.max(1,Math.min(r,typeof n.minRadius=="number"?n.minRadius:r*.35));return{min:i,max:a,minR:o,maxR:r,scale:n.scale==="linear"?"linear":"area"}}_resolveStep(t,e,s){let i=t.spacing>0?t.spacing:1,a=this._fixedRadius(t);return a?2*a*i:e/(Math.sqrt(Math.max(1,s))+.5)}_dotRadiusFromStep(t,e){let s=e.spacing>0?e.spacing:1,i=this._fixedRadius(e);return i||Math.max(1,t/(2*s))}_isCorner(t){return t.shape==="square"||t.shape==="image"}_halfExtent(t){if(t.shape==="image"&&t.image)return{hx:(t.image.width||20)/2,hy:(t.image.height||20)/2};let e=this._lastDotR;return{hx:e,hy:e}}_drawDot(t,e,s,i,a,n){let r=this.w,o=r.config.stroke.show?r.config.stroke.width:0,l=Array.isArray(r.globals.stroke.colors)&&r.globals.stroke.colors[a]||"none",c=typeof r.config.fill.opacity=="number"?r.config.fill.opacity:1,h;if(e.shape==="image"&&e.image&&e.image.src){let d=e.image.width||20,f=e.image.height||20;h=r.dom.Paper.image(e.image.src),h.node.setAttribute("width",String(d)),h.node.setAttribute("height",String(f)),h.node.setAttribute("preserveAspectRatio","xMidYMid meet"),e.image.tint&&h.node.setAttribute("filter",`url(#${this._tintFilter(i)})`)}else if(e.shape==="square"){let d=s*2;h=t.drawRect(0,0,d,d,e.borderRadius||0,i,1,o,l),h.node.setAttribute("fill",i),c<1&&h.node.setAttribute("fill-opacity",String(c))}else h=t.drawCircle(s,{fill:i,"stroke-width":o,stroke:l}),h.node.setAttribute("fill",i),c<1&&h.node.setAttribute("fill-opacity",String(c));return h.node.classList.add("apexcharts-unit-area"),h.node.setAttribute("i",String(a)),h.node.setAttribute("j",String(n)),h}_tintFilter(t){let e=this.w,s="http://www.w3.org/2000/svg",i=String(t).replace(/[^a-zA-Z0-9]/g,""),a=`apexcharts-unit-tint-${e.globals.chartID}-${i}`,n=e.dom.Paper.node;if(n.querySelector(`#${a}`))return a;let r=n.querySelector("defs");r||(r=O.createElementNS(s,"defs"),n.insertBefore(r,n.firstChild));let o=O.createElementNS(s,"filter");o.setAttribute("id",a),o.setAttribute("x","0%"),o.setAttribute("y","0%"),o.setAttribute("width","100%"),o.setAttribute("height","100%");let l=O.createElementNS(s,"feFlood");l.setAttribute("flood-color",t),l.setAttribute("result","flood");let c=O.createElementNS(s,"feComposite");return c.setAttribute("in","flood"),c.setAttribute("in2","SourceAlpha"),c.setAttribute("operator","in"),o.appendChild(l),o.appendChild(c),r.appendChild(o),a}_placeDot(t,e,s,i){if(this._isCorner(e)){let{hx:a,hy:n}=this._halfExtent(e);t.setAttribute("x",String(s-a)),t.setAttribute("y",String(i-n))}else t.setAttribute("cx",String(s)),t.setAttribute("cy",String(i))}_rgb(t){if(typeof t!="string")return null;let e=t.trim();if(e[0]==="#"){e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);let i=parseInt(e.slice(1,7),16);return isNaN(i)?null:[i>>16&255,i>>8&255,i&255]}let s=e.match(/rgba?\(([^)]+)\)/);if(s){let i=s[1].split(",").map(a=>parseFloat(a));if(i.length>=3&&i.every(a=>!isNaN(a)))return[i[0],i[1],i[2]]}return null}_shouldAnimate(){let t=this.w,e=t.config.chart.animations;return!(!H.isBrowser()||!e||e.enabled===!1||t.globals.shouldAnimate===!1||t.globals.resized&&!t.globals.dataChanged||e.respectReducedMotion&&ks())}_seedSprings(t,e,s,i){let[a,n]=Ed(e.spring,s),r=this.ctx?this.ctx._unitSprings:null,o=new Map;for(let l=0;l<t.length;l++){let c=t[l],h=r&&!c.isEnter&&c.key!=null?r.get(c.key):null,d=h?h.x:Wn(c.cx0,a,n),f=h?h.y:Wn(c.cy0,a,n);h&&(d.stiffness=a,f.stiffness=a,d.damping=n,f.damping=n,c.cx0=d.value,c.cy0=f.value,this._placeDot(c.node,i,c.cx0,c.cy0),(d.velocity!==0||f.velocity!==0)&&(c.delay=0)),c.sx=d,c.sy=f,c.key!=null&&o.set(c.key,{x:d,y:f})}this.ctx&&(this.ctx._unitSprings=o)}_runGather(t){let e=this.w,s=e.config.plotOptions.unit,i=Math.max(1,e.config.chart.animations.speed||800),a=this._isCorner(s),{hx:n,hy:r}=this._halfExtent(s),o=Math.min(i*.6,450),l=t.length;for(let y=0;y<l;y++)t[y].delay=l>1?y/(l-1)*o:0;let c=a?"x":"cx",h=a?"y":"cy",d=a?n:0,f=a?r:0,g=s.gather||{},p=g.motion||"auto";if(p==="spring"||p==="auto"&&(!g.easing||g.easing==="outCubic")?this._seedSprings(t,g,i,s):this.ctx&&(this.ctx._unitSprings=null),a)for(let y=0;y<l;y++)t[y].node.setAttribute(c,String(t[y].cx0-d)),t[y].node.setAttribute(h,String(t[y].cy0-f));if(!a)for(let y=0;y<l;y++){let v=t[y];v.r0!=null&&v.r1!=null&&v.r0!==v.r1&&v.node.setAttribute("r",String(v.r0))}for(let y=0;y<l;y++){let v=t[y];v.fill0&&v.fill1&&v.fill0!==v.fill1&&(v._c0=this._rgb(v.fill0),v._c1=this._rgb(v.fill1))}let b=g.easing==="outBack"?kd(typeof g.overshoot=="number"?g.overshoot:1.70158):g.easing==="inOutCubic"?Md:ni;this.w.globals.unitGatherRAF!=null&&(O.cancelAnimationFrame(this.w.globals.unitGatherRAF),this.w.globals.unitGatherRAF=null);let x=performance.now(),_=x,w=y=>{if(this.w.globals.isDestroyed){this.w.globals.unitGatherRAF=null;return}let v=Math.min(Dd,Math.max(0,(y-_)/1e3));_=y;let A=!0;for(let S=0;S<l;S++){let C=t[S],M=y-x-C.delay,k=Math.max(0,Math.min(1,M/i)),L=ni(k),E,D;if(C.sx&&C.sy){M>=0&&!C.released&&($n(C.sx,C.x),$n(C.sy,C.y),C.released=!0);let P=Hn(C.sx,v),F=Hn(C.sy,v);(!C.released||!P||!F)&&(A=!1),E=C.sx.value,D=C.sy.value}else{let P=b(k);E=C.cx0+(C.x-C.cx0)*P,D=C.cy0+(C.y-C.cy0)*P}if(C.node.setAttribute(c,String(E-d)),C.node.setAttribute(h,String(D-f)),C.isEnter&&(C.node.style.opacity=String(Math.min(1,k*2.5))),C._c0&&C._c1){let P=Math.round(C._c0[0]+(C._c1[0]-C._c0[0])*L),F=Math.round(C._c0[1]+(C._c1[1]-C._c0[1])*L),R=Math.round(C._c0[2]+(C._c1[2]-C._c0[2])*L);C.node.setAttribute("fill",`rgb(${P},${F},${R})`)}!a&&C.r0!=null&&C.r1!=null&&C.r0!==C.r1&&C.node.setAttribute("r",String(C.r0+(C.r1-C.r0)*L)),k<1&&(A=!1)}if(A){for(let S=0;S<l;S++){let C=t[S];C.node.style.opacity="",C._c1&&C.fill1&&C.node.setAttribute("fill",C.fill1),!a&&C.r0!=null&&C.r1!=null&&C.r0!==C.r1&&C.node.setAttribute("r",String(C.r1))}this.w.globals.unitGatherRAF=null}else this.w.globals.unitGatherRAF=O.requestAnimationFrame(w)};this.w.globals.unitGatherRAF=O.requestAnimationFrame(w)}_collectExits(t,e,s){let i=Math.max(0,s.maxUnits||5e3),a=[];for(let[n,r]of t)if(!e.has(n)&&(a.push(r),a.length>=i))break;return a}_runExits(t,e,s){let i=this.w,a=new B(i,this.ctx),n=this._lastDotR,r=i.layout.gridWidth/2,o=i.layout.gridHeight/2,l=s.layout==="grid"||s.layout==="scatter"||s.layout==="arc"||s.layout==="custom"?0:.35,c=[];if(e.forEach(y=>{let v=this._drawDot(a,s,n,y.fill,0,0);v.node.classList.add("apexcharts-unit-exit"),this._placeDot(v.node,s,y.x,y.y),t.add(v),c.push({node:v.node,x0:y.x,y0:y.y})}),!this._shouldAnimate()){c.forEach(y=>y.node.remove());return}let h=Math.max(1,i.config.chart.animations.speed||800),d=this._isCorner(s),{hx:f,hy:g}=this._halfExtent(s),p=d?f:0,m=d?g:0,b=d?"x":"cx",x=d?"y":"cy";this.w.globals.unitExitRAF!=null&&(O.cancelAnimationFrame(this.w.globals.unitExitRAF),this.w.globals.unitExitRAF=null);let _=performance.now(),w=y=>{if(this.w.globals.isDestroyed){this.w.globals.unitExitRAF=null;return}let v=Math.max(0,Math.min(1,(y-_)/h)),A=ni(v);for(let S=0;S<c.length;S++){let C=c[S];if(l){let M=C.x0+(r-C.x0)*A*l,k=C.y0+(o-C.y0)*A*l;C.node.setAttribute(b,String(M-p)),C.node.setAttribute(x,String(k-m))}C.node.style.opacity=String(1-A)}v<1?this.w.globals.unitExitRAF=O.requestAnimationFrame(w):(this.w.globals.unitExitRAF=null,t.node&&t.node.remove())};this.w.globals.unitExitRAF=O.requestAnimationFrame(w)}_outerLabelsOn(t){let e=t.clusterLabels;return!!(t.layout==="custom"&&e&&e.show!==!1&&e.external&&e.external.show)}_outerLabelLines(t,e,s,i){let a=this.w,n=a.seriesData.seriesNames[t]||`series-${t+1}`,r=s>0?e/s*100:0,o=i.clusterLabels,l=typeof o.formatter=="function"?o.formatter(n,{seriesIndex:t,value:e,percent:r,w:a}):`${n}
|
|
${r.toFixed(1)}%`;return String(l).split(`
|
|
`)}_outerLabelGutter(t,e){let s=this.w,i=e.clusterLabels,a=i.external.connector||{},n=t.reduce((d,f)=>d+f,0),r=[];if(t.forEach((d,f)=>{d>0&&r.push(...this._outerLabelLines(f,d,n,e))}),!r.length)return 0;let o=md(s,r,{fontSize:i.fontSize,fontFamily:i.fontFamily||s.config.chart.fontFamily}),l=a.gap!=null?a.gap:8,c=a.length!=null?a.length:22,h=o+l+c+8+Math.abs(parseFloat(i.external.offsetX)||0);return Math.min(h,s.layout.gridWidth*.25)}_drawOuterLabels(t,e,s,i,a,n){let r=this.w;if(!H.isBrowser())return;let o=a.clusterLabels,l=o.external,c=l.connector||{},h=c.gap!=null?c.gap:8,d=c.length!=null?c.length:22,f=parseFloat(l.offsetX)||0,g=parseFloat(l.offsetY)||0,p=r.layout.gridWidth,m=r.layout.gridHeight,b=this._lastDotR,x=e.filter(E=>E.dots.length>0);if(!x.length)return;let _=0,w=0;if(x.length>1){let E=x.map(P=>P.cx),D=x.map(P=>P.cy);_=Math.max(...E)-Math.min(...E),w=Math.max(...D)-Math.min(...D)}let y=_>w,v=parseFloat(o.fontSize)||13,A=Math.round(v*1.35),S=[];if(x.slice().sort((E,D)=>E.cy-D.cy).forEach((E,D)=>{let P=this._outerLabelLines(E.i,s[E.i],i,a);if(!P.some(Y=>Y!==""))return;let F=y?E.cx>=p/2?"right":"left":D%2===0?"right":"left",R=F==="right"?1:-1,N=E.dots[0],z=-1/0;E.dots.forEach(Y=>{let I=R*Y.x-.75*Math.abs(Y.y-E.cy);I>z&&(z=I,N=Y)});let $={x:N.x+R*(N.r||b),y:N.y},W={x:$.x+R*h,y:$.y};S.push({i:E.i,lines:P,anchor:$,elbow:W,labelX:W.x+R*d+f,idealY:$.y+g,labelY:$.y+g,side:F})}),!S.length)return;let M=S.reduce((E,D)=>Math.max(E,D.lines.length),1)*A,k=M/2;["left","right"].forEach(E=>{mo(S.filter(D=>D.side===E),M+2,m-k,k)});let L=new B(r,this.ctx).group({class:"apexcharts-unit-outer-labels"});if(n){let E=Math.max(1,r.config.chart.animations.speed||800);L.node.classList.add("apexcharts-unit-label-delay"),L.node.style.animationDelay=`${Math.min(E*.45,600)/1e3}s`}S.forEach(E=>{let D=r.globals.colors[E.i]||r.globals.colors[0]||"#008FFB";L.add(po(r,{lines:E.lines,lineHeight:A,anchor:E.anchor,elbow:E.elbow,labelX:E.labelX,labelY:E.labelY,side:E.side,connector:{show:c.show!==!1,width:c.width!=null?c.width:1.5,color:c.color||D},style:{fontSize:o.fontSize,fontFamily:o.fontFamily||r.config.chart.fontFamily,fontWeight:o.fontWeight},foreColor:o.color||r.config.chart.foreColor,groupClass:"apexcharts-unit-outer-label-group",textClass:"apexcharts-unit-outer-label",connectorClass:"apexcharts-unit-label-connector"}))}),t.add(L)}_drawClusterLabel(t,e,s,i,a,n){let r=this.w;if(!H.isBrowser())return;let o="http://www.w3.org/2000/svg",l=r.seriesData.seriesNames[e.i]||`series-${e.i+1}`,c=i>0?s/i*100:0,h=a.clusterLabels,d=parseFloat(h.fontSize)||13,f;typeof h.formatter=="function"?f=h.formatter(l,{seriesIndex:e.i,value:s,percent:c,w:r}):f=`${l} (${c.toFixed(1)}%)`;let g=typeof f=="string"?f:String(f),p=O.createElementNS(o,"text");p.setAttribute("class","apexcharts-unit-label"),p.setAttribute("text-anchor","middle"),p.setAttribute("font-size",`${d}px`),p.setAttribute("font-family",h.fontFamily||r.config.chart.fontFamily||"inherit"),p.setAttribute("font-weight",String(h.fontWeight||600)),p.setAttribute("fill",h.color||n);let m=h.position==="bottom",b=e.outerR+d*.6+3+(h.offsetY||0),x=g.length*d*.55;if(!m&&!e.flat&&h.curved!==!1&&x<=Math.PI*b*.95){let w=e.cy,y=e.cx-b,v=e.cx+b,A=`M ${y} ${w} A ${b} ${b} 0 0 1 ${v} ${w}`,S=`apexcharts-unit-label-${r.globals.chartID}-${e.i}`,C=O.createElementNS(o,"path");C.setAttribute("id",S),C.setAttribute("d",A),C.setAttribute("fill","none"),C.setAttribute("stroke","none");let M=O.createElementNS(o,"textPath");M.setAttribute("href",`#${S}`),M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",`#${S}`),M.setAttribute("startOffset","50%"),M.textContent=g,p.appendChild(M),t.node.appendChild(C)}else{p.setAttribute("x",String(e.cx));let w=m?e.cy+e.outerR+d+6+(h.offsetY||0):e.cy-e.outerR-6-(h.offsetY||0);p.setAttribute("y",String(w)),p.textContent=g}t.node.appendChild(p)}},ns=Math.PI/180,yr=180/Math.PI,ri="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml",Le=(u,t,e)=>u+(t-u)*e,Ba=class{constructor(t,e){this.ctx=e,this.w=t;let s=t.config;this.cfg=s.plotOptions.sunburst,this.strokeWidth=s.stroke.show?s.stroke.width:0,this.strokeColor=Array.isArray(s.stroke.colors)?s.stroke.colors[0]:s.stroke.colors||"#fff",this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltipEl=null,this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(t){let e=this.w,s=new B(this.w);this._graphics=s;let i=s.group({class:"apexcharts-sunburst"});if(e.globals.noData||!t||!t.length)return i;let a=e.layout.gridWidth,n=e.layout.gridHeight;if(this.centerX=a/2+(this.cfg.offsetX||0),this.centerY=n/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(a,n)/2.05-this.strokeWidth-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.maxRadius<5||(this._roots=this._buildHierarchy(),!this._roots.length))return i;this._roots.forEach(c=>this._fillValues(c)),this._validateStrict(),this._nodesAll=[];let r=e.globals.colors||[];this._roots.forEach((c,h)=>{this._colorPass(c,c.color||r[h%r.length]||"#008FFB")}),this.total=this._roots.reduce((c,h)=>c+Math.max(0,h.value),0)||1,this._ringsG=s.group({class:"apexcharts-sunburst-rings"}),this._labelsG=s.group({class:"apexcharts-sunburst-labels"}),i.add(this._ringsG),i.add(this._labelsG),this._focus=null,this._relayout(this._focus);let o=e.config.chart.animations,l="none";return o.enabled&&(e.globals.dataChanged?o.dynamicAnimation.enabled&&(l="update"):e.globals.resized||(l="intro")),this._applyLayout(l),this._renderBreadcrumb(),i}_buildHierarchy(){return rc(this.w)}_fillValues(t){Ds(t)}_validateStrict(){if(this.cfg.partition!=="strict")return;let t=!1,e=s=>{if(s.children&&s.children.length){let i=s.children.reduce((a,n)=>a+Math.max(0,n.value||0),0);!t&&s.value!=null&&Math.abs(i-s.value)>.5&&(console.warn(`ApexCharts sunburst: partition 'strict' but "${s.name}" (${s.value}) != sum of its children (${i}). Angles are normalized to fill the wedge.`),t=!0),s.children.forEach(e)}};this._roots.forEach(e)}_colorPass(t,e){t._color=t.color||e,this._nodesAll.push(t),t.children&&t.children.forEach(s=>this._colorPass(s,s.color||this._lighten(t._color,this.cfg.tint)))}_relayout(t){if(this._nodesAll.forEach(n=>{n._show=!1}),this._focusMaxDepth=0,t)this._placeVis(t,0,this.startAngle,this.endAngle,t._parent);else{let n=this._roots.reduce((o,l)=>o+Math.max(0,l.value),0)||1,r=this.startAngle;this._roots.forEach(o=>{let l=(this.endAngle-this.startAngle)*Math.max(0,o.value)/n;this._placeVis(o,0,r,r+l,null),r+=l})}let e=this._parseSize(this.cfg.innerSize,this.maxRadius),s=this._focusMaxDepth+1,i=(this.maxRadius-e)/s,a=s>1?1:0;this._innerR=n=>e+n*i+(n>0?a/2:0),this._outerR=n=>e+(n+1)*i-a/2,this._nodesAll.forEach(n=>{n._show&&(n._iR=this._innerR(n._vDepth),n._oR=n._leaf&&this.cfg.leaf==="extend"&&n._vDepth<this._focusMaxDepth?this.maxRadius:this._outerR(n._vDepth))})}_placeVis(t,e,s,i,a){if(t._show=!0,t._vDepth=e,t._a0=s,t._a1=i,t._parent=a,t._leaf=!(t.children&&t.children.length),e>this._focusMaxDepth&&(this._focusMaxDepth=e),!t._leaf){let n=t.children.reduce((o,l)=>o+Math.max(0,l.value),0)||1,r=s;t.children.forEach(o=>{let l=(i-s)*Math.max(0,o.value)/n;this._placeVis(o,e+1,r,r+l,t),r+=l})}}_applyLayout(t){var e;let i=this.w.config.chart.animations,a=i.enabled?t==="none"?0:t==="update"?i.dynamicAnimation.speed||350:i.speed||500:0,n=++this._zoomGen,r=(e=this.ctx)==null?void 0:e.morphTypeChange,o=!!r&&typeof r.isActive=="function"&&r.isActive()&&typeof r.getInitialPathAt=="function",l=o?r.getSpeed():0;this._morphLeafIndex=0;let c=t==="update"?this.ctx._sunburstPrevGeoms:null;this._nodesAll.forEach(d=>{if(d._show){let f={a0:d._a0,a1:d._a1,iR:d._iR,oR:d._oR};d._el||(d._el=this._createArcEl(d));let g=o?this._morphSourceFor(d):null;if(g&&l>0)this._morphArcFrom(d,g,f,l,n);else if((t==="intro"||o)&&a>0)this._sweepArc(d,f,o?l:a,n);else{let p,m=!1;if(d._cur)p=d._cur;else if(c&&c.get(d._key))p=c.get(d._key);else{let b=(f.a0+f.a1)/2;p={a0:b,a1:b,iR:f.iR,oR:f.iR},m=!0}this._animateArc(d,p,f,a,!1,m,n)}}else if(d._el&&d._cur){let f=(d._cur.a0+d._cur.a1)/2,g={a0:f,a1:f,iR:d._cur.iR,oR:d._cur.iR};this._animateArc(d,d._cur,g,a,!0,!1,n)}});let h=new Map;this._nodesAll.forEach(d=>{d._show&&h.set(d._key,{a0:d._a0,a1:d._a1,iR:d._iR,oR:d._oR})}),this.ctx._sunburstPrevGeoms=h,this._renderLabels(a)}_morphSourceFor(t){let e=this.ctx,s=e&&e.morphTypeChange;return s?typeof s.hasKeyedMarks=="function"&&s.hasKeyedMarks()&&typeof s.getInitialPathForKey=="function"?s.getInitialPathForKey(Re(t._key)):t.children&&t.children.length?null:s.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(t,e,s,i,a){let n=t._el,r=this._arcPath(s.iR,s.oR,s.a0,s.a1,this.cfg.borderRadius);n.node.style.display="",n.attr({d:e,opacity:1}),t._cur=s,this._zoomGen===a&&new St(this.w,this.ctx).morphSVG(n,0,null,t._color,e,r,i,0)}_sweepArc(t,e,s,i){let a=t._el,n=this.cfg.borderRadius,r=this.startAngle,o=this.endAngle;a.node.style.display="",a.attr({d:"",opacity:1}),a.animate(s).during(l=>{if(this._zoomGen!==i)return;let c=r+(o-r)*l;if(c<=e.a0+.01){a.attr({d:""});return}let h=Math.min(e.a1,c);a.attr({d:this._arcPath(e.iR,e.oR,e.a0,h,n)}),t._cur={a0:e.a0,a1:h,iR:e.iR,oR:e.oR}}).after(()=>{this._zoomGen===i&&(t._cur=e)})}_createArcEl(t){let e=this._graphics.drawPath({d:"",fill:t._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,fillOpacity:1,classes:"apexcharts-sunburst-arc"}),s=e.node;return s.setAttribute("data:name",t.name),s.setAttribute("data:value",String(t.value)),s.setAttribute("data:key",Re(t._key)),s.setAttribute("data:leaf",String(!(t.children&&t.children.length))),this._attachTooltip(s,t),H.isBrowser()&&(s.addEventListener("click",()=>this._zoomTo(t)),s.style.cursor="pointer"),this._ringsG.add(e),e}_animateArc(t,e,s,i,a,n,r){let o=t._el,l=this.cfg.borderRadius;if(o.attr({fill:t._color}),i===0){o.attr({d:this._arcPath(s.iR,s.oR,s.a0,s.a1,l),opacity:a?0:1}),o.node.style.display=a?"none":"",t._cur=a?null:s;return}o.node.style.display="";let c=a?Number(o.attr("opacity"))||1:n?0:1,h=a?0:1;o.attr({opacity:c}),o.animate(i).during(d=>{if(this._zoomGen!==r)return;let f=Le(e.a0,s.a0,d),g=Le(e.a1,s.a1,d),p=Le(e.iR,s.iR,d),m=Le(e.oR,s.oR,d);o.attr({d:this._arcPath(p,m,f,g,l),opacity:Le(c,h,d)}),t._cur={a0:f,a1:g,iR:p,oR:m}}).after(()=>{this._zoomGen===r&&(a?(o.node.style.display="none",t._cur=null):t._cur=s)})}_renderLabels(t){let e=this._labelsG;for(;e.node.firstChild;)e.node.removeChild(e.node.firstChild);this.cfg.dataLabels.show&&(this._nodesAll.forEach(s=>{s._show&&(s._a1-s._a0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(s))}),t>0?(e.attr({opacity:0}),e.animate(250,t).attr({opacity:1})):e.attr({opacity:1}))}_renderCurvedLabel(t){if(!H.isBrowser())return;let e=this.cfg.dataLabels.style,s=this.w,i=(t._iR+t._oR)/2,a=(t._a0+t._a1)/2,n=a>90&&a<270,r=Math.min(i>0?4/i*yr:0,(t._a1-t._a0)/2),o=n?t._a1-r:t._a0+r,l=n?t._a0+r:t._a1-r,c=this._ptAt(i,o),h=this._ptAt(i,l),d=Math.abs(l-o)>180?1:0,f=n?0:1,g=`apx-sb-lbl-${s.globals.cuid}-${this._lblSeq++}`,p=O.createElementNS(ri,"path");p.setAttribute("id",g),p.setAttribute("d",`M ${c.x} ${c.y} A ${i} ${i} 0 ${d} ${f} ${h.x} ${h.y}`),p.setAttribute("fill","none"),p.setAttribute("stroke","none");let m=e.colors,b=(Array.isArray(m)?m[0]:m)||"#fff",x=O.createElementNS(ri,"text");x.setAttribute("font-size",e.fontSize||"12px"),e.fontFamily&&x.setAttribute("font-family",e.fontFamily),x.setAttribute("font-weight",String(e.fontWeight||400)),x.setAttribute("fill",b),x.setAttribute("dominant-baseline","central"),x.style.pointerEvents="none";let _=O.createElementNS(ri,"textPath");_.setAttribute("href","#"+g),_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+g),_.setAttribute("startOffset","50%"),_.setAttribute("text-anchor","middle"),_.textContent=this._truncate(t.name,i,t._a1-t._a0,e.fontSize),x.appendChild(_),this._labelsG.node.appendChild(p),this._labelsG.node.appendChild(x)}_truncate(t,e,s,i){let a=e*s*ns-8,n=(parseFloat(i)||12)*.58,r=Math.floor(a/n);return r>=t.length?t:r<=1?"":t.slice(0,Math.max(1,r-1))+"\u2026"}_zoomTo(t){if(this.cfg.zoomOnClick===!1)return;let e=t===this._focus?t._parent||null:t;e!==this._focus&&(this._focus=e&&!(e.children&&e.children.length)?e._parent||null:e,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb())}_focusChain(){let t=[],e=this._focus;for(;e;)t.unshift(e),e=e._parent;return t}_renderBreadcrumb(){if(!H.isBrowser())return;let e=this.w.dom.elWrap;if(!e)return;let s=e.querySelector(".apexcharts-breadcrumb");if(s&&s.parentNode&&s.parentNode.removeChild(s),!this._focus)return;let i=O.createElementNS(he,"nav");i.setAttribute("class","apexcharts-breadcrumb"),i.setAttribute("aria-label","Sunburst breadcrumb"),i.style.position="absolute",i.style.top="0px",i.style.left="0px";let a=[{name:"All",node:null}].concat(this._focusChain().map(n=>({name:n.name,node:n})));a.forEach((n,r)=>{if(r>0){let l=O.createElementNS(he,"span");l.setAttribute("class","apexcharts-breadcrumb-separator"),l.textContent=" / ",i.appendChild(l)}if(r===a.length-1){let l=O.createElementNS(he,"span");l.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),l.textContent=n.name,i.appendChild(l)}else{let l=O.createElementNS(he,"button");if(l.setAttribute("type","button"),l.setAttribute("class","apexcharts-breadcrumb-item"),r===0){let h=O.createElementNS(he,"span");h.setAttribute("class","apexcharts-breadcrumb-arrow"),h.textContent="\u2190",l.appendChild(h)}let c=O.createElementNS(he,"span");c.setAttribute("class","apexcharts-breadcrumb-label"),c.textContent=n.name,l.appendChild(c),l.addEventListener("click",()=>{this._focus=n.node,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb()}),i.appendChild(l)}}),e.appendChild(i),this._avoidChromeOverlap(i)}_avoidChromeOverlap(t){Br(this.w,t)}_ptAt(t,e){return{x:this.centerX+t*Math.cos((e-90)*ns),y:this.centerY+t*Math.sin((e-90)*ns)}}_arcPath(t,e,s,i,a){if(e<=t+.01)return"";let n=i-s,r=this.cfg.spacing;if(r>0&&n>0&&e>0){let d=r/e*yr,f=Math.min(d/2,Math.max(0,n/2-.25));s+=f,i-=f,n=i-s}if(n<=0)return"";let o=n*ns,l=this.centerX,c=this.centerY,h=a;return h=Math.min(h,o*t/2,o*e/2,(e-t)/2),h>.5?Ta({cx:l,cy:c,rIn:t,rOut:e,a0:s,a1:i,r:h,spanDeg:n}):xo({cx:l,cy:c,rIn:t,rOut:e,a0:s,a1:i,spanDeg:n})}_tip(){return this._tooltipEl||(this._tooltipEl=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._tooltipEl}_attachTooltip(t,e){!this.w.config.tooltip.enabled||!H.isBrowser()||(t.addEventListener("mouseenter",s=>this._showTooltip(s,e)),t.addEventListener("mousemove",s=>this._positionTooltip(s)),t.addEventListener("mouseleave",()=>this._hideTooltip()))}_showTooltip(t,e){let s=this._tip();if(!s)return;let i=this.w,a=(e.value/this.total*100).toFixed(1),n=e._parent?e._parent.value:this.total,r=n>0?(e.value/n*100).toFixed(1):a,o=i.config.tooltip.fillSeriesColor?`background-color:${e._color};`:"";s.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${o}"><span class="apexcharts-tooltip-marker" style="background-color:${e._color}"></span><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${e.name}: </span><span class="apexcharts-tooltip-text-y-value">${e.value} (${r}% of parent, ${a}% of total)</span></div></div></div>`,s.classList.add("apexcharts-active"),s.style.opacity="1",this._positionTooltip(t)}_positionTooltip(t){let e=this._tip();if(!e)return;let s=this.w.dom.elWrap.getBoundingClientRect(),i=e.offsetWidth,a=e.offsetHeight,n=12,r=t.clientX-s.left+n;r+i>s.width&&(r=t.clientX-s.left-i-n),r=Math.max(0,Math.min(r,s.width-i));let o=t.clientY-s.top+n;o+a>s.height&&(o=t.clientY-s.top-a-n),o=Math.max(0,Math.min(o,s.height-a)),e.style.left=r+"px",e.style.top=o+"px"}_hideTooltip(){let t=this._tip();t&&(t.classList.remove("apexcharts-active"),t.style.opacity="0")}_parseSize(t,e){if(typeof t=="number")return t;let s=String(t).trim();if(s.endsWith("%"))return parseFloat(s)/100*e;let i=parseFloat(s);return isNaN(i)?.15*e:i}_lighten(t,e){if(typeof t!="string"||t[0]!=="#")return t;let s=t.slice(1);if(s.length===3&&(s=s.split("").map(o=>o+o).join("")),s.length!==6)return t;let i=parseInt(s,16);if(isNaN(i))return t;let a=i>>16&255,n=i>>8&255,r=i&255;return a=Math.round(a+(255-a)*e),n=Math.round(n+(255-n)*e),r=Math.round(r+(255-r)*e),"#"+((1<<24)+(a<<16)+(n<<8)+r).toString(16).slice(1)}};ht.use({line:Qt,area:Qt,scatter:Qt,bubble:Qt,rangeArea:Qt,bar:Pt,column:Pt,barStacked:Aa,rangeBar:Fa,candlestick:Ss,boxPlot:Ss,violin:Ma,pie:xe,donut:xe,polarArea:xe,radialBar:Ra,radar:Pa,heatmap:La,treemap:Xa,unit:Oa,sunburst:Ba});var jo=qo();function Sf({options:u,chartId:t,theme:e,extraJsOptions:s}){return{chart:null,options:u,chartId:t,theme:e,extraJsOptions:s,init:function(){this.$wire.$on("updateOptions",({options:i})=>{i=jo(i,this.extraJsOptions),this.updateChart(i)}),Alpine.effect(()=>{let i=Alpine.store("theme");this.$nextTick(()=>{this.chart===null?this.initChart():this.updateChart({theme:{mode:i},chart:{background:this.options.chart.background||"inherit"}})})}),document.querySelectorAll(".fi-wi-chart-filter > .fi-dropdown-panel").forEach(i=>{i.style.zIndex="20"})},initChart:function(){this.options.theme={mode:this.theme},this.options.chart.background=this.options.chart.background||"inherit",this.options=jo(this.options,this.extraJsOptions),this.chart=new ht(document.querySelector(this.chartId),this.options),this.chart.render()},updateChart:function(i){this.chart.updateOptions(i,!1,!0,!0)}}}export{Sf as default};
|
|
/*! Bundled license information:
|
|
|
|
apexcharts/dist/apexcharts.esm.js:
|
|
(*!
|
|
* ApexCharts v6.10.0
|
|
* (c) 2018-2026 ApexCharts
|
|
*)
|
|
(*!
|
|
* Path morphing for SVG path animations
|
|
* Based on svg.pathmorphing.js by Ulrich-Matthias Schäfer (MIT License)
|
|
* Refactored to be standalone (no SVG.js dependency)
|
|
*
|
|
* Two algorithms are exported:
|
|
* - morphPaths() — command-level interpolation; preserves curves but can
|
|
* produce "wings/flips" when two shapes have very
|
|
* different topology (e.g. bar rect → pie arc).
|
|
* - morphPolygons() — resamples both shapes into N evenly-spaced perimeter
|
|
* points and tweens point-by-point with rotation-search
|
|
* alignment; always smooth and non-self-intersecting,
|
|
* at the cost of throwing away curve smoothness.
|
|
*)
|
|
*/
|