import{p as ka,q as fs,o as xs,r as ft,w as Gt,t as zi,x as Vi,f as bs,b as ms,y as Ui,u as vs,A as qi,C as Zi,D as Je,E as $i,G as Ji,d as Re,i as Me,H as ut,J as jt,K as ys,L as ws,M as Ki}from"./index-Csmv4Fkv.js";import{D as ks}from"./DocumentTitle-DG90V81t.js";var As=(o,e,t)=>{const i=t(o,e);return ka(()=>clearInterval(i))};/*! * ApexCharts v4.3.0 * (c) 2018-2024 ApexCharts * Released under the MIT License. */function di(o,e){(e==null||e>o.length)&&(e=o.length);for(var t=0,i=Array(e);t=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function(l){throw l},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,r=!0,n=!1;return{s:function(){t=t.call(o)},n:function(){var l=t.next();return r=l.done,l},e:function(l){n=!0,s=l},f:function(){try{r||t.return==null||t.return()}finally{if(n)throw s}}}}function At(o){var e=Ca();return function(){var t,i=Ot(o);if(e){var a=Ot(this).constructor;t=Reflect.construct(i,arguments,a)}else t=i.apply(this,arguments);return function(s,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aa(s)}(this,t)}}function Ht(o,e,t){return(e=La(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ot(o){return Ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ot(o)}function Ct(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),e&&ui(o,e)}function Ca(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ca=function(){return!!o})()}function ea(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),t.push.apply(t,i)}return t}function R(o){for(var e=1;e>16,n=i>>8&255,l=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-l)*s)+l)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,t){return o.isColorHex(t)?this.shadeHexColor(e,t):this.shadeRGBColor(e,t)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&at(e)==="object"&&!Array.isArray(e)&&e!=null}},{key:"is",value:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var t,i=[];for(t=0;t1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e===null||at(e)!=="object")return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){t=[],i.set(e,t);for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){return e.toString().includes("e")?Math.round(e):e}},{key:"elementExists",value:function(e){return!(!e||!e.isConnected)}},{key:"getDimensions",value:function(e){var t=getComputedStyle(e,null),i=e.clientHeight,a=e.clientWidth;return i-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),[a-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),i]}},{key:"getBoundingClientRect",value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(t,i){return Array.isArray(i)&&(i=i.reduce(function(a,s){return a.length>s.length?a:s})),t.length>i.length?t:i},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"#999999",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;e.substring(0,1)!=="#"&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:"x",i=e.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,i){if(i>=e.length)for(var a=i-e.length+1;a--;)e.push(void 0);return e.splice(i,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e.style.key=t[i])}},{key:"preciseAddition",value:function(e,t){var i=(String(e).split(".")[1]||"").length,a=(String(t).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(e*s)+Math.round(t*s))/s}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isMsEdge",value:function(){var e=window.navigator.userAgent,t=e.indexOf("Edge/");return t>0&&parseInt(e.substring(t+5,e.indexOf(".",t)),10)}},{key:"getGCD",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,t))));for(e=Math.round(Math.abs(e)*a),t=Math.round(Math.abs(t)*a);t;){var s=t;t=e%t,e=s}return e/a}},{key:"getPrimeFactors",value:function(e){for(var t=[],i=2;e>=2;)e%i==0?(t.push(i),e/=i):i++;return t}},{key:"mod",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,t))));return(e=Math.round(Math.abs(e)*a))%(t=Math.round(Math.abs(t)*a))/a}}]),o}(),nt=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"animateLine",value:function(e,t,i,a){e.attr(t).animate(a).attr(i)}},{key:"animateMarker",value:function(e,t,i,a){e.attr({opacity:0}).animate(t).attr({opacity:1}).after(function(){a()})}},{key:"animateRect",value:function(e,t,i,a,s){e.attr(t).animate(a).attr(i).after(function(){return s()})}},{key:"animatePathsGradually",value:function(e){var t=e.el,i=e.realIndex,a=e.j,s=e.fill,r=e.pathFrom,n=e.pathTo,l=e.speed,h=e.delay,d=this.w,c=0;d.config.chart.animations.animateGradually.enabled&&(c=d.config.chart.animations.animateGradually.delay),d.config.chart.animations.dynamicAnimation.enabled&&d.globals.dataChanged&&d.config.chart.type!=="bar"&&(c=0),this.morphSVG(t,i,a,d.config.chart.type!=="line"||d.globals.comboCharts?s:"stroke",r,n,l,h*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){var t=e.el;t.classList.remove("apexcharts-element-hidden"),t.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd=="function"&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,i,a,s,r,n,l){var h=this,d=this.w;s||(s=e.attr("pathFrom")),r||(r=e.attr("pathTo"));var c=function(u){return d.config.chart.type==="radar"&&(n=1),"M 0 ".concat(d.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),d.globals.shouldAnimate||(n=1),e.plot(s).animate(1,l).plot(s).animate(n,l).plot(r).after(function(){L.isNumber(i)?i===d.globals.series[d.globals.maxValsInArrayIndex].length-2&&d.globals.shouldAnimate&&h.animationCompleted(e):a!=="none"&&d.globals.shouldAnimate&&(!d.globals.comboCharts&&t===d.globals.series.length-1||d.globals.comboCharts)&&h.animationCompleted(e),h.showDelayedElements()})}}]),o}();const gi={},Ma=[];function U(o,e){if(Array.isArray(o))for(const t of o)U(t,e);else if(typeof o!="object")Pa(Object.getOwnPropertyNames(e)),gi[o]=Object.assign(gi[o]||{},e);else for(const t in o)U(t,o[t])}function ye(o){return gi[o]||{}}function Pa(o){Ma.push(...o)}function Ri(o,e){let t;const i=o.length,a=[];for(t=0;tCs.has(o.nodeName),Ia=(o,e,t={})=>{const i={...e};for(const a in i)i[a].valueOf()===t[a]&&delete i[a];Object.keys(i).length?o.node.setAttribute("data-svgjs",JSON.stringify(i)):(o.node.removeAttribute("data-svgjs"),o.node.removeAttribute("svgjs:data"))},Ei="http://www.w3.org/2000/svg",Ut="http://www.w3.org/2000/xmlns/",ht="http://www.w3.org/1999/xlink",q={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function St(){return q.window}let Yi=class{};const Ue={},Hi="___SYMBOL___ROOT___";function bt(o,e=Ei){return q.document.createElementNS(e,o)}function me(o,e=!1){if(o instanceof Yi)return o;if(typeof o=="object")return qt(o);if(o==null)return new Ue[Hi];if(typeof o=="string"&&o.charAt(0)!=="<")return qt(q.document.querySelector(o));const t=e?q.document.createElement("div"):bt("svg");return t.innerHTML=o,o=qt(t.firstChild),t.removeChild(t.firstChild),o}function re(o,e){return e&&(e instanceof q.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:bt(o)}function Ce(o){if(!o)return null;if(o.instance instanceof Yi)return o.instance;if(o.nodeName==="#document-fragment")return new Ue.Fragment(o);let e=ot(o.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":Ue[e]||(e="Dom"),new Ue[e](o)}let qt=Ce;function Z(o,e=o.name,t=!1){return Ue[e]=o,t&&(Ue[Hi]=o),Pa(Object.getOwnPropertyNames(o.prototype)),o}let Ss=1e3;function Ta(o){return"Svgjs"+ot(o)+Ss++}function za(o){for(let e=o.children.length-1;e>=0;e--)za(o.children[e]);return o.id&&(o.id=Ta(o.nodeName)),o}function N(o,e){let t,i;for(i=(o=Array.isArray(o)?o:[o]).length-1;i>=0;i--)for(t in e)o[i].prototype[t]=e[t]}function se(o){return function(...e){const t=e[e.length-1];return!t||t.constructor!==Object||t instanceof Array?o.apply(this,e):o.apply(this,e.slice(0,-1)).attr(t)}}U("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const o=this.position();return this.parent().add(this.remove(),o+1),this},backward:function(){const o=this.position();return this.parent().add(this.remove(),o?o-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(o){(o=me(o)).remove();const e=this.position();return this.parent().add(o,e),this},after:function(o){(o=me(o)).remove();const e=this.position();return this.parent().add(o,e+1),this},insertBefore:function(o){return(o=me(o)).before(this),this},insertAfter:function(o){return(o=me(o)).after(this),this}});const Xa=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Ls=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Ms=/rgb\((\d+),(\d+),(\d+)\)/,Ps=/(#[a-z_][a-z0-9\-_]*)/i,Is=/\)\s*,?\s*/,Ts=/\s/g,ta=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ia=/^rgb\(/,aa=/^(\s+)?$/,sa=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,zs=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Ye=/[\s,]+/,Oi=/[MLHVCSQTAZ]/i;function Xs(o){const e=Math.round(o),t=Math.max(0,Math.min(255,e)).toString(16);return t.length===1?"0"+t:t}function Ke(o,e){for(let t=e.length;t--;)if(o[e[t]]==null)return!1;return!0}function Zt(o,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?o+6*(e-o)*t:t<.5?e:t<2/3?o+(e-o)*(2/3-t)*6:o}U("Dom",{classes:function(){const o=this.attr("class");return o==null?[]:o.trim().split(Ye)},hasClass:function(o){return this.classes().indexOf(o)!==-1},addClass:function(o){if(!this.hasClass(o)){const e=this.classes();e.push(o),this.attr("class",e.join(" "))}return this},removeClass:function(o){return this.hasClass(o)&&this.attr("class",this.classes().filter(function(e){return e!==o}).join(" ")),this},toggleClass:function(o){return this.hasClass(o)?this.removeClass(o):this.addClass(o)}}),U("Dom",{css:function(o,e){const t={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(i){return!!i.length}).forEach(function(i){const a=i.split(/\s*:\s*/);t[a[0]]=a[1]}),t;if(arguments.length<2){if(Array.isArray(o)){for(const i of o){const a=i;t[i]=this.node.style.getPropertyValue(a)}return t}if(typeof o=="string")return this.node.style.getPropertyValue(o);if(typeof o=="object")for(const i in o)this.node.style.setProperty(i,o[i]==null||aa.test(o[i])?"":o[i])}return arguments.length===2&&this.node.style.setProperty(o,e==null||aa.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),U("Dom",{data:function(o,e,t){if(o==null)return this.data(Ri(function(i,a){let s;const r=i.length,n=[];for(s=0;si.nodeName.indexOf("data-")===0),i=>i.nodeName.slice(5)));if(o instanceof Array){const i={};for(const a of o)i[a]=this.data(a);return i}if(typeof o=="object")for(e in o)this.data(e,o[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+o))}catch{return this.attr("data-"+o)}else this.attr("data-"+o,e===null?null:t===!0||typeof e=="string"||typeof e=="number"?e:JSON.stringify(e));return this}}),U("Dom",{remember:function(o,e){if(typeof arguments[0]=="object")for(const t in o)this.remember(t,o[t]);else{if(arguments.length===1)return this.memory()[o];this.memory()[o]=e}return this},forget:function(){if(arguments.length===0)this._memory={};else for(let o=arguments.length-1;o>=0;o--)delete this.memory()[arguments[o]];return this},memory:function(){return this._memory=this._memory||{}}});class ae{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof ae||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&typeof e.r=="number"&&typeof e.g=="number"&&typeof e.b=="number"}static random(e="vibrant",t){const{random:i,round:a,sin:s,PI:r}=Math;if(e==="vibrant"){const n=24*i()+57,l=38*i()+45,h=360*i();return new ae(n,l,h,"lch")}if(e==="sine"){const n=a(80*s(2*r*(t=t??i())/.5+.01)+150),l=a(50*s(2*r*t/.5+4.6)+200),h=a(100*s(2*r*t/.5+2.3)+150);return new ae(n,l,h)}if(e==="pastel"){const n=8*i()+86,l=17*i()+9,h=360*i();return new ae(n,l,h,"lch")}if(e==="dark"){const n=10+10*i(),l=50*i()+86,h=360*i();return new ae(n,l,h,"lch")}if(e==="rgb"){const n=255*i(),l=255*i(),h=255*i();return new ae(n,l,h)}if(e==="lab"){const n=100*i(),l=256*i()-128,h=256*i()-128;return new ae(n,l,h,"lab")}if(e==="grey"){const n=255*i();return new ae(n,n,n)}throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(ta.test(e)||ia.test(e))}cmyk(){const{_a:e,_b:t,_c:i}=this.rgb(),[a,s,r]=[e,t,i].map(l=>l/255),n=Math.min(1-a,1-s,1-r);return n===1?new ae(0,0,0,1,"cmyk"):new ae((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:e,_b:t,_c:i}=this.rgb(),[a,s,r]=[e,t,i].map(u=>u/255),n=Math.max(a,s,r),l=Math.min(a,s,r),h=(n+l)/2,d=n===l,c=n-l;return new ae(360*(d?0:n===a?((s-r)/c+(s.5?c/(2-n-l):c/(n+l)),100*h,"hsl")}init(e=0,t=0,i=0,a=0,s="rgb"){if(e=e||0,this.space)for(const c in this.space)delete this[this.space[c]];if(typeof e=="number")s=typeof a=="string"?a:s,a=typeof a=="string"?0:a,Object.assign(this,{_a:e,_b:t,_c:i,_d:a,space:s});else if(e instanceof Array)this.space=t||(typeof e[3]=="string"?e[3]:e[4])||"rgb",Object.assign(this,{_a:e[0],_b:e[1],_c:e[2],_d:e[3]||0});else if(e instanceof Object){const c=function(u,g){const f=Ke(u,"rgb")?{_a:u.r,_b:u.g,_c:u.b,_d:0,space:"rgb"}:Ke(u,"xyz")?{_a:u.x,_b:u.y,_c:u.z,_d:0,space:"xyz"}:Ke(u,"hsl")?{_a:u.h,_b:u.s,_c:u.l,_d:0,space:"hsl"}:Ke(u,"lab")?{_a:u.l,_b:u.a,_c:u.b,_d:0,space:"lab"}:Ke(u,"lch")?{_a:u.l,_b:u.c,_c:u.h,_d:0,space:"lch"}:Ke(u,"cmyk")?{_a:u.c,_b:u.m,_c:u.y,_d:u.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return f.space=g||f.space,f}(e,t);Object.assign(this,c)}else if(typeof e=="string")if(ia.test(e)){const c=e.replace(Ts,""),[u,g,f]=Ms.exec(c).slice(1,4).map(p=>parseInt(p));Object.assign(this,{_a:u,_b:g,_c:f,_d:0,space:"rgb"})}else{if(!ta.test(e))throw Error("Unsupported string format, can't construct Color");{const c=p=>parseInt(p,16),[,u,g,f]=Ls.exec(function(p){return p.length===4?["#",p.substring(1,2),p.substring(1,2),p.substring(2,3),p.substring(2,3),p.substring(3,4),p.substring(3,4)].join(""):p}(e)).map(c);Object.assign(this,{_a:u,_b:g,_c:f,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:l,_d:h}=this,d=this.space==="rgb"?{r,g:n,b:l}:this.space==="xyz"?{x:r,y:n,z:l}:this.space==="hsl"?{h:r,s:n,l}:this.space==="lab"?{l:r,a:n,b:l}:this.space==="lch"?{l:r,c:n,h:l}:this.space==="cmyk"?{c:r,m:n,y:l,k:h}:{};Object.assign(this,d)}lab(){const{x:e,y:t,z:i}=this.xyz();return new ae(116*t-16,500*(e-t),200*(t-i),"lab")}lch(){const{l:e,a:t,b:i}=this.lab(),a=Math.sqrt(t**2+i**2);let s=180*Math.atan2(i,t)/Math.PI;return s<0&&(s*=-1,s=360-s),new ae(e,a,s,"lch")}rgb(){if(this.space==="rgb")return this;if((e=this.space)==="lab"||e==="xyz"||e==="lch"){let{x:t,y:i,z:a}=this;if(this.space==="lab"||this.space==="lch"){let{l:g,a:f,b:p}=this;if(this.space==="lch"){const{c:C,h:w}=this,A=Math.PI/180;f=C*Math.cos(A*w),p=C*Math.sin(A*w)}const x=(g+16)/116,b=f/500+x,m=x-p/200,v=16/116,k=.008856,y=7.787;t=.95047*(b**3>k?b**3:(b-v)/y),i=1*(x**3>k?x**3:(x-v)/y),a=1.08883*(m**3>k?m**3:(m-v)/y)}const s=3.2406*t+-1.5372*i+-.4986*a,r=-.9689*t+1.8758*i+.0415*a,n=.0557*t+-.204*i+1.057*a,l=Math.pow,h=.0031308,d=s>h?1.055*l(s,1/2.4)-.055:12.92*s,c=r>h?1.055*l(r,1/2.4)-.055:12.92*r,u=n>h?1.055*l(n,1/2.4)-.055:12.92*n;return new ae(255*d,255*c,255*u)}if(this.space==="hsl"){let{h:t,s:i,l:a}=this;if(t/=360,i/=100,a/=100,i===0)return a*=255,new ae(a,a,a);const s=a<.5?a*(1+i):a+i-a*i,r=2*a-s,n=255*Zt(r,s,t+1/3),l=255*Zt(r,s,t),h=255*Zt(r,s,t-1/3);return new ae(n,l,h)}if(this.space==="cmyk"){const{c:t,m:i,y:a,k:s}=this,r=255*(1-Math.min(1,t*(1-s)+s)),n=255*(1-Math.min(1,i*(1-s)+s)),l=255*(1-Math.min(1,a*(1-s)+s));return new ae(r,n,l)}return this;var e}toArray(){const{_a:e,_b:t,_c:i,_d:a,space:s}=this;return[e,t,i,a,s]}toHex(){const[e,t,i]=this._clamped().map(Xs);return`#${e}${t}${i}`}toRgb(){const[e,t,i]=this._clamped();return`rgb(${e},${t},${i})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:t,_c:i}=this.rgb(),[a,s,r]=[e,t,i].map(x=>x/255),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,l=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,d=(.4124*n+.3576*l+.1805*h)/.95047,c=(.2126*n+.7152*l+.0722*h)/1,u=(.0193*n+.1192*l+.9505*h)/1.08883,g=d>.008856?Math.pow(d,1/3):7.787*d+16/116,f=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=u>.008856?Math.pow(u,1/3):7.787*u+16/116;return new ae(g,f,p,"xyz")}_clamped(){const{_a:e,_b:t,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[e,t,i].map(n=>a(0,s(r(n),255)))}}class Q{constructor(...e){this.init(...e)}clone(){return new Q(this)}init(e,t){const s=Array.isArray(e)?{x:e[0],y:e[1]}:typeof e=="object"?{x:e.x,y:e.y}:{x:e,y:t};return this.x=s.x==null?0:s.x,this.y=s.y==null?0:s.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){D.isMatrixLike(e)||(e=new D(e));const{x:t,y:i}=this;return this.x=e.a*t+e.c*i+e.e,this.y=e.b*t+e.d*i+e.f,this}}function Qe(o,e,t){return Math.abs(e-o)<1e-6}class D{constructor(...e){this.init(...e)}static formatTransforms(e){const t=e.flip==="both"||e.flip===!0,i=e.flip&&(t||e.flip==="x")?-1:1,a=e.flip&&(t||e.flip==="y")?-1:1,s=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,r=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,n=e.scale&&e.scale.length?e.scale[0]*i:isFinite(e.scale)?e.scale*i:isFinite(e.scaleX)?e.scaleX*i:i,l=e.scale&&e.scale.length?e.scale[1]*a:isFinite(e.scale)?e.scale*a:isFinite(e.scaleY)?e.scaleY*a:a,h=e.shear||0,d=e.rotate||e.theta||0,c=new Q(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),u=c.x,g=c.y,f=new Q(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),p=f.x,x=f.y,b=new Q(e.translate||e.tx||e.translateX,e.ty||e.translateY),m=b.x,v=b.y,k=new Q(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:n,scaleY:l,skewX:s,skewY:r,shear:h,theta:d,rx:k.x,ry:k.y,tx:m,ty:v,ox:u,oy:g,px:p,py:x}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return e.a!=null||e.b!=null||e.c!=null||e.d!=null||e.e!=null||e.f!=null}static matrixMultiply(e,t,i){const a=e.a*t.a+e.c*t.b,s=e.b*t.a+e.d*t.b,r=e.a*t.c+e.c*t.d,n=e.b*t.c+e.d*t.d,l=e.e+e.a*t.e+e.c*t.f,h=e.f+e.b*t.e+e.d*t.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=l,i.f=h,i}around(e,t,i){return this.clone().aroundO(e,t,i)}aroundO(e,t,i){const a=e||0,s=t||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new D(this)}decompose(e=0,t=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,l=this.f,h=i*r-a*s,d=h>0?1:-1,c=d*Math.sqrt(i*i+a*a),u=Math.atan2(d*a,d*i),g=180/Math.PI*u,f=Math.cos(u),p=Math.sin(u),x=(i*s+a*r)/h,b=s*c/(x*i-a)||r*c/(x*a+i);return{scaleX:c,scaleY:b,shear:x,rotate:g,translateX:n-e+e*f*c+t*(x*f*c-p*b),translateY:l-t+e*p*c+t*(x*p*c+f*b),originX:e,originY:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const t=new D(e);return Qe(this.a,t.a)&&Qe(this.b,t.b)&&Qe(this.c,t.c)&&Qe(this.d,t.d)&&Qe(this.e,t.e)&&Qe(this.f,t.f)}flip(e,t){return this.clone().flipO(e,t)}flipO(e,t){return e==="x"?this.scaleO(-1,1,t,0):e==="y"?this.scaleO(1,-1,0,t):this.scaleO(-1,-1,e,t||e)}init(e){const t=D.fromArray([1,0,0,1,0,0]);return e=e instanceof ge?e.matrixify():typeof e=="string"?D.fromArray(e.split(Ye).map(parseFloat)):Array.isArray(e)?D.fromArray(e):typeof e=="object"&&D.isMatrixLike(e)?e:typeof e=="object"?new D().transform(e):arguments.length===6?D.fromArray([].slice.call(arguments)):t,this.a=e.a!=null?e.a:t.a,this.b=e.b!=null?e.b:t.b,this.c=e.c!=null?e.c:t.c,this.d=e.d!=null?e.d:t.d,this.e=e.e!=null?e.e:t.e,this.f=e.f!=null?e.f:t.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,t=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=e*a-t*i;if(!n)throw new Error("Cannot invert "+this);const l=a/n,h=-t/n,d=-i/n,c=e/n,u=-(l*s+d*r),g=-(h*s+c*r);return this.a=l,this.b=h,this.c=d,this.d=c,this.e=u,this.f=g,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const t=e instanceof D?e:new D(e);return D.matrixMultiply(t,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const t=e instanceof D?e:new D(e);return D.matrixMultiply(this,t,this)}rotate(e,t,i){return this.clone().rotateO(e,t,i)}rotateO(e,t=0,i=0){e=Vt(e);const a=Math.cos(e),s=Math.sin(e),{a:r,b:n,c:l,d:h,e:d,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=l*a-h*s,this.d=h*a+l*s,this.e=d*a-c*s+i*s-t*a+t,this.f=c*a+d*s-t*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(e,t=e,i=0,a=0){arguments.length===3&&(a=i,i=t,t=e);const{a:s,b:r,c:n,d:l,e:h,f:d}=this;return this.a=s*e,this.b=r*t,this.c=n*e,this.d=l*t,this.e=h*e-i*e+i,this.f=d*t-a*t+a,this}shear(e,t,i){return this.clone().shearO(e,t,i)}shearO(e,t=0,i=0){const{a,b:s,c:r,d:n,e:l,f:h}=this;return this.a=a+s*e,this.c=r+n*e,this.e=l+h*e-i*e,this}skew(){return this.clone().skewO(...arguments)}skewO(e,t=e,i=0,a=0){arguments.length===3&&(a=i,i=t,t=e),e=Vt(e),t=Vt(t);const s=Math.tan(e),r=Math.tan(t),{a:n,b:l,c:h,d,e:c,f:u}=this;return this.a=n+l*s,this.b=l+n*r,this.c=h+d*s,this.d=d+h*r,this.e=c+u*s-a*s,this.f=u+c*r-i*r,this}skewX(e,t,i){return this.skew(e,0,t,i)}skewY(e,t,i){return this.skew(0,e,t,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(D.isMatrixLike(e))return new D(e).multiplyO(this);const t=D.formatTransforms(e),{x:i,y:a}=new Q(t.ox,t.oy).transform(this),s=new D().translateO(t.rx,t.ry).lmultiplyO(this).translateO(-i,-a).scaleO(t.scaleX,t.scaleY).skewO(t.skewX,t.skewY).shearO(t.shear).rotateO(t.theta).translateO(i,a);if(isFinite(t.px)||isFinite(t.py)){const r=new Q(i,a).transform(s),n=isFinite(t.px)?t.px-r.x:0,l=isFinite(t.py)?t.py-r.y:0;s.translateO(n,l)}return s.translateO(t.tx,t.ty),s}translate(e,t){return this.clone().translateO(e,t)}translateO(e,t){return this.e+=e||0,this.f+=t||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function He(){if(!He.nodes){const o=me().size(2,0);o.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),o.attr("focusable","false"),o.attr("aria-hidden","true");const e=o.path().node;He.nodes={svg:o,path:e}}if(!He.nodes.svg.node.parentNode){const o=q.document.body||q.document.documentElement;He.nodes.svg.addTo(o)}return He.nodes}function Ra(o){return!(o.width||o.height||o.x||o.y)}Z(D,"Matrix");class le{constructor(...e){this.init(...e)}addOffset(){return this.x+=q.window.pageXOffset,this.y+=q.window.pageYOffset,new le(this)}init(e){return e=typeof e=="string"?e.split(Ye).map(parseFloat):Array.isArray(e)?e:typeof e=="object"?[e.left!=null?e.left:e.x,e.top!=null?e.top:e.y,e.width,e.height]:arguments.length===4?[].slice.call(arguments):[0,0,0,0],this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Ra(this)}merge(e){const t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),a=Math.max(this.x+this.width,e.x+e.width)-t,s=Math.max(this.y+this.height,e.y+e.height)-i;return new le(t,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof D||(e=new D(e));let t=1/0,i=-1/0,a=1/0,s=-1/0;return[new Q(this.x,this.y),new Q(this.x2,this.y),new Q(this.x,this.y2),new Q(this.x2,this.y2)].forEach(function(r){r=r.transform(e),t=Math.min(t,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)}),new le(t,a,i-t,s-a)}}function ra(o,e,t){let i;try{if(i=e(o.node),Ra(i)&&(a=o.node)!==q.document&&!(q.document.documentElement.contains||function(s){for(;s.parentNode;)s=s.parentNode;return s===q.document}).call(q.document.documentElement,a))throw new Error("Element not in the dom")}catch{i=t(o)}var a;return i}U({viewbox:{viewbox(o,e,t,i){return o==null?new le(this.attr("viewBox")):this.attr("viewBox",new le(o,e,t,i))},zoom(o,e){let{width:t,height:i}=this.attr(["width","height"]);if((t||i)&&typeof t!="string"&&typeof i!="string"||(t=this.node.clientWidth,i=this.node.clientHeight),!t||!i)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const a=this.viewbox(),s=t/a.width,r=i/a.height,n=Math.min(s,r);if(o==null)return n;let l=n/o;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new Q(t/2/s+a.x,i/2/r+a.y);const h=new le(a).transform(new D({scale:l,origin:e}));return this.viewbox(h)}}}),Z(le,"Box");class qe extends Array{constructor(e=[],...t){if(super(e,...t),typeof e=="number")return this;this.length=0,this.push(...e)}}N([qe],{each(o,...e){return typeof o=="function"?this.map((t,i,a)=>o.call(t,t,i,a)):this.map(t=>t[o](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const Rs=["toArray","constructor","each"];function $e(o,e){return new qe(Ri((e||q.document).querySelectorAll(o),function(t){return Ce(t)}))}qe.extend=function(o){o=o.reduce((e,t)=>(Rs.includes(t)||t[0]==="_"||(t in Array.prototype&&(e["$"+t]=Array.prototype[t]),e[t]=function(...i){return this.each(t,...i)}),e),{}),N([qe],o)};let Es=0;const Ea={};function Ya(o){let e=o.getEventHolder();return e===q.window&&(e=Ea),e.events||(e.events={}),e.events}function Fi(o){return o.getEventTarget()}function Ee(o,e,t,i,a){const s=t.bind(i||o),r=me(o),n=Ya(r),l=Fi(r);e=Array.isArray(e)?e:e.split(Ye),t._svgjsListenerId||(t._svgjsListenerId=++Es),e.forEach(function(h){const d=h.split(".")[0],c=h.split(".")[1]||"*";n[d]=n[d]||{},n[d][c]=n[d][c]||{},n[d][c][t._svgjsListenerId]=s,l.addEventListener(d,s,a||!1)})}function Se(o,e,t,i){const a=me(o),s=Ya(a),r=Fi(a);(typeof t!="function"||(t=t._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Ye)).forEach(function(n){const l=n&&n.split(".")[0],h=n&&n.split(".")[1];let d,c;if(t)s[l]&&s[l][h||"*"]&&(r.removeEventListener(l,s[l][h||"*"][t],i||!1),delete s[l][h||"*"][t]);else if(l&&h){if(s[l]&&s[l][h]){for(c in s[l][h])Se(r,[l,h].join("."),c);delete s[l][h]}}else if(h)for(n in s)for(d in s[n])h===d&&Se(r,[n,h].join("."));else if(l){if(s[l]){for(d in s[l])Se(r,[l,d].join("."));delete s[l]}}else{for(n in s)Se(r,n);(function(u){let g=u.getEventHolder();g===q.window&&(g=Ea),g.events&&(g.events={})})(a)}})}class Lt extends Yi{addEventListener(){}dispatch(e,t,i){return function(a,s,r,n){const l=Fi(a);return s instanceof q.window.Event||(s=new q.window.CustomEvent(s,{detail:r,cancelable:!0,...n})),l.dispatchEvent(s),s}(this,e,t,i)}dispatchEvent(e){const t=this.getEventHolder().events;if(!t)return!0;const i=t[e.type];for(const a in i)for(const s in i[a])i[a][s](e);return!e.defaultPrevented}fire(e,t,i){return this.dispatch(e,t,i),this}getEventHolder(){return this}getEventTarget(){return this}off(e,t,i){return Se(this,e,t,i),this}on(e,t,i,a){return Ee(this,e,t,i,a),this}removeEventListener(){}}function na(){}Z(Lt,"EventTarget");const $t=400,Ys=">",Hs=0,Os={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Ze extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return typeof e=="number"||(this.length=0,this.push(...this.parse(e))),this}parse(e=[]){return e instanceof Array?e:e.trim().split(Ye).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class V{constructor(...e){this.init(...e)}convert(e){return new V(this.value,e)}divide(e){return e=new V(e),new V(this/e,this.unit||e.unit)}init(e,t){return t=Array.isArray(e)?e[1]:t,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=t||"",typeof e=="number"?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:typeof e=="string"?(t=e.match(Xa))&&(this.value=parseFloat(t[1]),t[5]==="%"?this.value/=100:t[5]==="s"&&(this.value*=1e3),this.unit=t[5]):e instanceof V&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new V(e),new V(this-e,this.unit||e.unit)}plus(e){return e=new V(e),new V(this+e,this.unit||e.unit)}times(e){return e=new V(e),new V(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit==="%"?~~(1e8*this.value)/1e6:this.unit==="s"?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Fs=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Ha=[];class Fe extends Lt{constructor(e,t){super(),this.node=e,this.type=e.nodeName,t&&e!==t&&this.attr(t)}add(e,t){return(e=me(e)).removeNamespace&&this.node instanceof q.window.SVGElement&&e.removeNamespace(),t==null?this.node.appendChild(e.node):e.node!==this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this}addTo(e,t){return me(e).put(this,t)}children(){return new qe(Ri(this.node.children,function(e){return Ce(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,t=!0){this.writeDataToDom();let i=this.node.cloneNode(e);return t&&(i=za(i)),new this.constructor(i)}each(e,t){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(e,t){return this.xml(e,t,"http://www.w3.org/1999/xhtml")}id(e){return e!==void 0||this.node.id||(this.node.id=Ta(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Ce(this.node.lastChild)}matches(e){const t=this.node,i=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return i&&i.call(t,e)}parent(e){let t=this;if(!t.node.parentNode)return null;if(t=Ce(t.node.parentNode),!e)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=Ce(t.node.parentNode));return t}put(e,t){return e=me(e),this.add(e,t),e}putIn(e,t){return me(e).add(this,t)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=me(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,t=null){const i=10**e,a=this.attr(t);for(const s in a)typeof a[s]=="number"&&(a[s]=Math.round(a[s]*i)/i);return this.attr(a),this}svg(e,t){return this.xml(e,t,Ei)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const t=this.parent();if(!t)return this.addTo(e);const i=t.index(this);return t.put(e,i).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,t,i){if(typeof e=="boolean"&&(i=t,t=e,e=null),e==null||typeof e=="function"){t=t==null||t,this.writeDataToDom();let n=this;if(e!=null){if(n=Ce(n.node.cloneNode(!0)),t){const l=e(n);if(n=l||n,l===!1)return""}n.each(function(){const l=e(this),h=l||this;l===!1?this.remove():l&&this!==h&&this.replace(h)},!0)}return t?n.node.outerHTML:n.node.innerHTML}t=t!=null&&t;const a=bt("wrapper",i),s=q.document.createDocumentFragment();a.innerHTML=e;for(let n=a.children.length;n--;)s.appendChild(a.firstElementChild);const r=this.parent();return t?this.replace(s)&&r:this.add(s)}}N(Fe,{attr:function(o,e,t){if(o==null){o={},e=this.node.attributes;for(const i of e)o[i.nodeName]=sa.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return o}if(o instanceof Array)return o.reduce((i,a)=>(i[a]=this.attr(a),i),{});if(typeof o=="object"&&o.constructor===Object)for(e in o)this.attr(e,o[e]);else if(e===null)this.node.removeAttribute(o);else{if(e==null)return(e=this.node.getAttribute(o))==null?Os[o]:sa.test(e)?parseFloat(e):e;typeof(e=Ha.reduce((i,a)=>a(o,i,this),e))=="number"?e=new V(e):Fs.has(o)&&ae.isColor(e)?e=new ae(e):e.constructor===Array&&(e=new Ze(e)),o==="leading"?this.leading&&this.leading(e):typeof t=="string"?this.node.setAttributeNS(t,o,e.toString()):this.node.setAttribute(o,e.toString()),!this.rebuild||o!=="font-size"&&o!=="x"||this.rebuild()}return this},find:function(o){return $e(o,this.node)},findOne:function(o){return Ce(this.node.querySelector(o))}}),Z(Fe,"Dom");let ge=class extends Fe{constructor(o,e){super(o,e),this.dom={},this.node.instance=this,(o.hasAttribute("data-svgjs")||o.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(o.getAttribute("data-svgjs"))??JSON.parse(o.getAttribute("svgjs:data"))??{})}center(o,e){return this.cx(o).cy(e)}cx(o){return o==null?this.x()+this.width()/2:this.x(o-this.width()/2)}cy(o){return o==null?this.y()+this.height()/2:this.y(o-this.height()/2)}defs(){const o=this.root();return o&&o.defs()}dmove(o,e){return this.dx(o).dy(e)}dx(o=0){return this.x(new V(o).plus(this.x()))}dy(o=0){return this.y(new V(o).plus(this.y()))}getEventHolder(){return this}height(o){return this.attr("height",o)}move(o,e){return this.x(o).y(e)}parents(o=this.root()){const e=typeof o=="string";e||(o=me(o));const t=new qe;let i=this;for(;(i=i.parent())&&i.node!==q.document&&i.nodeName!=="#document-fragment"&&(t.push(i),e||i.node!==o.node)&&(!e||!i.matches(o));)if(i.node===this.root().node)return null;return t}reference(o){if(!(o=this.attr(o)))return null;const e=(o+"").match(Ps);return e?me(e[1]):null}root(){const o=this.parent(function(e){return Ue[e]}(Hi));return o&&o.root()}setData(o){return this.dom=o,this}size(o,e){const t=lt(this,o,e);return this.width(new V(t.width)).height(new V(t.height))}width(o){return this.attr("width",o)}writeDataToDom(){return Ia(this,this.dom),super.writeDataToDom()}x(o){return this.attr("x",o)}y(o){return this.attr("y",o)}};N(ge,{bbox:function(){const o=ra(this,e=>e.getBBox(),e=>{try{const t=e.clone().addTo(He().svg).show(),i=t.node.getBBox();return t.remove(),i}catch(t){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${t.toString()}`)}});return new le(o)},rbox:function(o){const e=ra(this,i=>i.getBoundingClientRect(),i=>{throw new Error(`Getting rbox of element "${i.node.nodeName}" is not possible`)}),t=new le(e);return o?t.transform(o.screenCTM().inverseO()):t.addOffset()},inside:function(o,e){const t=this.bbox();return o>t.x&&e>t.y&&o=0;t--)i[gt[o][t]]!=null&&this.attr(gt.prefix(o,gt[o][t]),i[gt[o][t]]);return this},U(["Element","Runner"],e)}),U(["Element","Runner"],{matrix:function(o,e,t,i,a,s){return o==null?new D(this):this.attr("transform",new D(o,e,t,i,a,s))},rotate:function(o,e,t){return this.transform({rotate:o,ox:e,oy:t},!0)},skew:function(o,e,t,i){return arguments.length===1||arguments.length===3?this.transform({skew:o,ox:e,oy:t},!0):this.transform({skew:[o,e],ox:t,oy:i},!0)},shear:function(o,e,t){return this.transform({shear:o,ox:e,oy:t},!0)},scale:function(o,e,t,i){return arguments.length===1||arguments.length===3?this.transform({scale:o,ox:e,oy:t},!0):this.transform({scale:[o,e],ox:t,oy:i},!0)},translate:function(o,e){return this.transform({translate:[o,e]},!0)},relative:function(o,e){return this.transform({relative:[o,e]},!0)},flip:function(o="both",e="center"){return"xybothtrue".indexOf(o)===-1&&(e=o,o="both"),this.transform({flip:o,origin:e},!0)},opacity:function(o){return this.attr("opacity",o)}}),U("radius",{radius:function(o,e=o){return(this._element||this).type==="radialGradient"?this.attr("r",new V(o)):this.rx(o).ry(e)}}),U("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(o){return new Q(this.node.getPointAtLength(o))}}),U(["Element","Runner"],{font:function(o,e){if(typeof o=="object"){for(e in o)this.font(e,o[e]);return this}return o==="leading"?this.leading(e):o==="anchor"?this.attr("text-anchor",e):o==="size"||o==="family"||o==="weight"||o==="stretch"||o==="variant"||o==="style"?this.attr("font-"+o,e):this.attr(o,e)}});U("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce(function(o,e){return o[e]=function(t){return t===null?this.off(e):this.on(e,t),this},o},{})),U("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(Is).slice(0,-1).map(function(e){const t=e.trim().split("(");return[t[0],t[1].split(Ye).map(function(i){return parseFloat(i)})]}).reverse().reduce(function(e,t){return t[0]==="matrix"?e.lmultiply(D.fromArray(t[1])):e[t[0]].apply(e,t[1])},new D)},toParent:function(o,e){if(this===o)return this;if(fi(this.node))return this.addTo(o,e);const t=this.screenCTM(),i=o.screenCTM().inverse();return this.addTo(o,e).untransform().transform(i.multiply(t)),this},toRoot:function(o){return this.toParent(this.root(),o)},transform:function(o,e){if(o==null||typeof o=="string"){const i=new D(this).decompose();return o==null?i:i[o]}D.isMatrixLike(o)||(o={...o,origin:pi(o,this)});const t=new D(e===!0?this:e||!1).transform(o);return this.attr("transform",t)}});class ve extends ge{flatten(){return this.each(function(){if(this instanceof ve)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),t=e.index(this)){return t=t===-1?e.children().length:t,this.each(function(i,a){return a[a.length-i-1].toParent(e,t)}),this.remove()}}Z(ve,"Container");class _t extends ve{constructor(e,t=e){super(re("defs",e),t)}flatten(){return this}ungroup(){return this}}Z(_t,"Defs");class ke extends ge{}function Di(o){return this.attr("rx",o)}function Ni(o){return this.attr("ry",o)}function Oa(o){return o==null?this.cx()-this.rx():this.cx(o+this.rx())}function Fa(o){return o==null?this.cy()-this.ry():this.cy(o+this.ry())}function Da(o){return this.attr("cx",o)}function Na(o){return this.attr("cy",o)}function Wa(o){return o==null?2*this.rx():this.rx(new V(o).divide(2))}function _a(o){return o==null?2*this.ry():this.ry(new V(o).divide(2))}Z(ke,"Shape");var Ds=Object.freeze({__proto__:null,cx:Da,cy:Na,height:_a,rx:Di,ry:Ni,width:Wa,x:Oa,y:Fa});class zt extends ke{constructor(e,t=e){super(re("ellipse",e),t)}size(e,t){const i=lt(this,e,t);return this.rx(new V(i.width).divide(2)).ry(new V(i.height).divide(2))}}N(zt,Ds),U("Container",{ellipse:se(function(o=0,e=o){return this.put(new zt).size(o,e).move(0,0)})}),Z(zt,"Ellipse");class Ba extends Fe{constructor(e=q.document.createDocumentFragment()){super(e)}xml(e,t,i){if(typeof e=="boolean"&&(i=t,t=e,e=null),e==null||typeof e=="function"){const a=new Fe(bt("wrapper",i));return a.add(this.node.cloneNode(!0)),a.xml(!1,i)}return super.xml(e,!1,i)}}function Ga(o,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new V(o),fy:new V(e)}):this.attr({x1:new V(o),y1:new V(e)})}function ja(o,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new V(o),cy:new V(e)}):this.attr({x2:new V(o),y2:new V(e)})}Z(Ba,"Fragment");var Ns=Object.freeze({__proto__:null,from:Ga,to:ja});class xt extends ve{constructor(e,t){super(re(e+"Gradient",typeof e=="string"?null:e),t)}attr(e,t,i){return e==="transform"&&(e="gradientTransform"),super.attr(e,t,i)}bbox(){return new le}targets(){return $e("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}N(xt,Ns),U({Container:{gradient(...o){return this.defs().gradient(...o)}},Defs:{gradient:se(function(o,e){return this.put(new xt(o)).update(e)})}}),Z(xt,"Gradient");class mt extends ve{constructor(e,t=e){super(re("pattern",e),t)}attr(e,t,i){return e==="transform"&&(e="patternTransform"),super.attr(e,t,i)}bbox(){return new le}targets(){return $e("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}U({Container:{pattern(...o){return this.defs().pattern(...o)}},Defs:{pattern:se(function(o,e,t){return this.put(new mt).update(t).attr({x:0,y:0,width:o,height:e,patternUnits:"userSpaceOnUse"})})}}),Z(mt,"Pattern");let Xt=class extends ke{constructor(o,e=o){super(re("image",o),e)}load(o,e){if(!o)return this;const t=new q.window.Image;return Ee(t,"load",function(i){const a=this.parent(mt);this.width()===0&&this.height()===0&&this.size(t.width,t.height),a instanceof mt&&a.width()===0&&a.height()===0&&a.size(this.width(),this.height()),typeof e=="function"&&e.call(this,i)},this),Ee(t,"load error",function(){Se(t)}),this.attr("href",t.src=o,ht)}};var oa;oa=function(o,e,t){return o!=="fill"&&o!=="stroke"||zs.test(e)&&(e=t.root().defs().image(e)),e instanceof Xt&&(e=t.root().defs().pattern(0,0,i=>{i.add(e)})),e},Ha.push(oa),U({Container:{image:se(function(o,e){return this.put(new Xt).size(0,0).load(o,e)})}}),Z(Xt,"Image");class De extends Ze{bbox(){let e=-1/0,t=-1/0,i=1/0,a=1/0;return this.forEach(function(s){e=Math.max(s[0],e),t=Math.max(s[1],t),i=Math.min(s[0],i),a=Math.min(s[1],a)}),new le(i,a,e-i,t-a)}move(e,t){const i=this.bbox();if(e-=i.x,t-=i.y,!isNaN(e)&&!isNaN(t))for(let a=this.length-1;a>=0;a--)this[a]=[this[a][0]+e,this[a][1]+t];return this}parse(e=[0,0]){const t=[];(e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(Ye).map(parseFloat)).length%2!=0&&e.pop();for(let i=0,a=e.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*e/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*t/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let t=0,i=this.length;t":function(o){return-Math.cos(o*Math.PI)/2+.5},">":function(o){return Math.sin(o*Math.PI/2)},"<":function(o){return 1-Math.cos(o*Math.PI/2)},bezier:function(o,e,t,i){return function(a){return a<0?o>0?e/o*a:t>0?i/t*a:0:a>1?t<1?(1-i)/(1-t)*a+(i-t)/(1-t):o<1?(1-e)/(1-o)*a+(e-o)/(1-o):1:3*a*(1-a)**2*e+3*a**2*(1-a)*i+a**3}},steps:function(o,e="end"){e=e.split("-").reverse()[0];let t=o;return e==="none"?--t:e==="both"&&++t,(i,a=!1)=>{let s=Math.floor(i*o);const r=i*s%1==0;return e!=="start"&&e!=="both"||++s,a&&r&&--s,i>=0&&s<0&&(s=0),i<=1&&s>t&&(s=t),s/t}}};class _i{done(){return!1}}class xi extends _i{constructor(e=Ys){super(),this.ease=_s[e]||e}step(e,t,i){return typeof e!="number"?i<1?e:t:e+(t-e)*this.ease(i)}}class Ft extends _i{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,t,i,a){return this.stepper(e,t,i,a)}}function la(){const o=(this._duration||500)/1e3,e=this._overshoot||0,t=Math.PI,i=Math.log(e/100+1e-10),a=-i/Math.sqrt(t*t+i*i),s=3.9/(a*o);this.d=2*a*s,this.k=s*s}N(class extends Ft{constructor(o=500,e=0){super(),this.duration(o).overshoot(e)}step(o,e,t,i){if(typeof o=="string")return o;if(i.done=t===1/0,t===1/0)return e;if(t===0)return o;t>100&&(t=16),t/=1e3;const a=i.velocity||0,s=-this.d*a-this.k*(o-e),r=o+a*t+s*t*t/2;return i.velocity=a+s*t,i.done=Math.abs(e-r)+Math.abs(a)<.002,i.done?e:r}},{duration:tt("_duration",la),overshoot:tt("_overshoot",la)});N(class extends Ft{constructor(o=.1,e=.01,t=0,i=1e3){super(),this.p(o).i(e).d(t).windup(i)}step(o,e,t,i){if(typeof o=="string")return o;if(i.done=t===1/0,t===1/0)return e;if(t===0)return o;const a=e-o;let s=(i.integral||0)+a*t;const r=(a-(i.error||0))/t,n=this._windup;return n!==!1&&(s=Math.max(-n,Math.min(s,n))),i.error=a,i.integral=s,i.done=Math.abs(a)<.001,i.done?e:o+(this.P*a+this.I*s+this.D*r)}},{windup:tt("_windup"),p:tt("P"),i:tt("I"),d:tt("D")});const Bs={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},bi={M:function(o,e,t){return e.x=t.x=o[0],e.y=t.y=o[1],["M",e.x,e.y]},L:function(o,e){return e.x=o[0],e.y=o[1],["L",o[0],o[1]]},H:function(o,e){return e.x=o[0],["H",o[0]]},V:function(o,e){return e.y=o[0],["V",o[0]]},C:function(o,e){return e.x=o[4],e.y=o[5],["C",o[0],o[1],o[2],o[3],o[4],o[5]]},S:function(o,e){return e.x=o[2],e.y=o[3],["S",o[0],o[1],o[2],o[3]]},Q:function(o,e){return e.x=o[2],e.y=o[3],["Q",o[0],o[1],o[2],o[3]]},T:function(o,e){return e.x=o[0],e.y=o[1],["T",o[0],o[1]]},Z:function(o,e,t){return e.x=t.x,e.y=t.y,["Z"]},A:function(o,e){return e.x=o[5],e.y=o[6],["A",o[0],o[1],o[2],o[3],o[4],o[5],o[6]]}},Jt="mlhvqtcsaz".split("");for(let o=0,e=Jt.length;o=0;s--)a=this[s][0],a==="M"||a==="L"||a==="T"?(this[s][1]+=e,this[s][2]+=t):a==="H"?this[s][1]+=e:a==="V"?this[s][1]+=t:a==="C"||a==="S"||a==="Q"?(this[s][1]+=e,this[s][2]+=t,this[s][3]+=e,this[s][4]+=t,a==="C"&&(this[s][5]+=e,this[s][6]+=t)):a==="A"&&(this[s][6]+=e,this[s][7]+=t);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),function(t,i=!0){let a=0,s="";const r={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:i,p0:new Q,p:new Q};for(;r.lastToken=s,s=t.charAt(a++);)if(r.inSegment||!Gs(r,s))if(s!==".")if(isNaN(parseInt(s)))if(Us.has(s))r.inNumber&&We(r,!1);else if(s!=="-"&&s!=="+")if(s.toUpperCase()!=="E"){if(Oi.test(s)){if(r.inNumber)We(r,!1);else{if(!mi(r))throw new Error("parser Error");vi(r)}--a}}else r.number+=s,r.hasExponent=!0;else{if(r.inNumber&&!Vs(r)){We(r,!1),--a;continue}r.number+=s,r.inNumber=!0}else{if(r.number==="0"||js(r)){r.inNumber=!0,r.number=s,We(r,!0);continue}r.inNumber=!0,r.number+=s}else{if(r.pointSeen||r.hasExponent){We(r,!1),--a;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=s}return r.inNumber&&We(r,!1),r.inSegment&&mi(r)&&vi(r),r.segments}(e)}size(e,t){const i=this.bbox();let a,s;for(i.width=i.width===0?1:i.width,i.height=i.height===0?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],s==="M"||s==="L"||s==="T"?(this[a][1]=(this[a][1]-i.x)*e/i.width+i.x,this[a][2]=(this[a][2]-i.y)*t/i.height+i.y):s==="H"?this[a][1]=(this[a][1]-i.x)*e/i.width+i.x:s==="V"?this[a][1]=(this[a][1]-i.y)*t/i.height+i.y:s==="C"||s==="S"||s==="Q"?(this[a][1]=(this[a][1]-i.x)*e/i.width+i.x,this[a][2]=(this[a][2]-i.y)*t/i.height+i.y,this[a][3]=(this[a][3]-i.x)*e/i.width+i.x,this[a][4]=(this[a][4]-i.y)*t/i.height+i.y,s==="C"&&(this[a][5]=(this[a][5]-i.x)*e/i.width+i.x,this[a][6]=(this[a][6]-i.y)*t/i.height+i.y)):s==="A"&&(this[a][1]=this[a][1]*e/i.width,this[a][2]=this[a][2]*t/i.height,this[a][6]=(this[a][6]-i.x)*e/i.width+i.x,this[a][7]=(this[a][7]-i.y)*t/i.height+i.y);return this}toString(){return function(e){let t="";for(let i=0,a=e.length;i{const e=typeof o;return e==="number"?V:e==="string"?ae.isColor(o)?ae:Ye.test(o)?Oi.test(o)?Pe:Ze:Xa.test(o)?V:yi:wi.indexOf(o.constructor)>-1?o.constructor:Array.isArray(o)?Ze:e==="object"?vt:yi};class _e{constructor(e){this._stepper=e||new xi("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(e,t){return e&&t},!0)}from(e){return e==null?this._from:(this._from=this._set(e),this)}stepper(e){return e==null?this._stepper:(this._stepper=e,this)}to(e){return e==null?this._to:(this._to=this._set(e),this)}type(e){return e==null?this._type:(this._type=e,this)}_set(e){this._type||this.type(Va(e));let t=new this._type(e);return this._type===ae&&(t=this._to?t[this._to[4]]():this._from?t[this._from[4]]():t),this._type===vt&&(t=this._to?t.align(this._to):this._from?t.align(this._from):t),t=t.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(t.length)).map(Object).map(function(i){return i.done=!0,i}),t}}class yi{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class Mt{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,Mt.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Mt.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const qs=(o,e)=>o[0]e[0]?1:0;class vt{constructor(...e){this.init(...e)}align(e){const t=this.values;for(let i=0,a=t.length;ii.concat(a),[]),this}toArray(){return this.values}valueOf(){const e={},t=this.values;for(;t.length;){const i=t.shift(),a=t.shift(),s=t.shift(),r=t.splice(0,s);e[i]=new a(r)}return e}}const wi=[yi,Mt,vt];class it extends ke{constructor(e,t=e){super(re("path",e),t)}array(){return this._array||(this._array=new Pe(this.attr("d")))}clear(){return delete this._array,this}height(e){return e==null?this.bbox().height:this.size(this.bbox().width,e)}move(e,t){return this.attr("d",this.array().move(e,t))}plot(e){return e==null?this.array():this.clear().attr("d",typeof e=="string"?e:this._array=new Pe(e))}size(e,t){const i=lt(this,e,t);return this.attr("d",this.array().size(i.width,i.height))}width(e){return e==null?this.bbox().width:this.size(e,this.bbox().height)}x(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)}y(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}}it.prototype.MorphArray=Pe,U({Container:{path:se(function(o){return this.put(new it).plot(o||new Pe)})}}),Z(it,"Path");var Ua=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new De(this.attr("points")))},clear:function(){return delete this._array,this},move:function(o,e){return this.attr("points",this.array().move(o,e))},plot:function(o){return o==null?this.array():this.clear().attr("points",typeof o=="string"?o:this._array=new De(o))},size:function(o,e){const t=lt(this,o,e);return this.attr("points",this.array().size(t.width,t.height))}});class je extends ke{constructor(e,t=e){super(re("polygon",e),t)}}U({Container:{polygon:se(function(o){return this.put(new je).plot(o||new De)})}}),N(je,Wi),N(je,Ua),Z(je,"Polygon");class Ve extends ke{constructor(e,t=e){super(re("polyline",e),t)}}U({Container:{polyline:se(function(o){return this.put(new Ve).plot(o||new De)})}}),N(Ve,Wi),N(Ve,Ua),Z(Ve,"Polyline");class Et extends ke{constructor(e,t=e){super(re("rect",e),t)}}N(Et,{rx:Di,ry:Ni}),U({Container:{rect:se(function(o,e){return this.put(new Et).size(o,e)})}}),Z(Et,"Rect");class Kt{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const t=e.next!==void 0?e:{value:e,next:null,prev:null};return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._last=t,this._first=t),t}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const te={nextDraw:null,frames:new Kt,timeouts:new Kt,immediates:new Kt,timer:()=>q.window.performance||q.window.Date,transforms:[],frame(o){const e=te.frames.push({run:o});return te.nextDraw===null&&(te.nextDraw=q.window.requestAnimationFrame(te._draw)),e},timeout(o,e){e=e||0;const t=te.timer().now()+e,i=te.timeouts.push({run:o,time:t});return te.nextDraw===null&&(te.nextDraw=q.window.requestAnimationFrame(te._draw)),i},immediate(o){const e=te.immediates.push(o);return te.nextDraw===null&&(te.nextDraw=q.window.requestAnimationFrame(te._draw)),e},cancelFrame(o){o!=null&&te.frames.remove(o)},clearTimeout(o){o!=null&&te.timeouts.remove(o)},cancelImmediate(o){o!=null&&te.immediates.remove(o)},_draw(o){let e=null;const t=te.timeouts.last();for(;(e=te.timeouts.shift())&&(o>=e.time?e.run():te.timeouts.push(e),e!==t););let i=null;const a=te.frames.last();for(;i!==a&&(i=te.frames.shift());)i.run(o);let s=null;for(;s=te.immediates.shift();)s();te.nextDraw=te.timeouts.first()||te.frames.first()?q.window.requestAnimationFrame(te._draw):null}},Zs=function(o){const e=o.start,t=o.runner.duration();return{start:e,duration:t,end:e+t,runner:o.runner}},$s=function(){const o=q.window;return(o.performance||o.Date).now()};class qa extends Lt{constructor(e=$s){super(),this._timeSource=e,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),t=e?e.runner.duration():0;return(e?e.start:this._time)+t}getEndTimeOfTimeline(){const e=this._runners.map(t=>t.start+t.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return e==null?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const t=this.speed();if(e==null)return this.speed(-t);const i=Math.abs(t);return this.speed(e?-i:i)}schedule(e,t,i){if(e==null)return this._runners.map(Zs);let a=0;const s=this.getEndTime();if(t=t||0,i==null||i==="last"||i==="after")a=s;else if(i==="absolute"||i==="start")a=t,t=0;else if(i==="now")a=this._time;else if(i==="relative"){const l=this.getRunnerInfoById(e.id);l&&(a=l.start+t,t=0)}else{if(i!=="with-last")throw new Error('Invalid value for the "when" parameter');{const l=this.getLastRunnerInfo();a=l?l.start:this._time}}e.unschedule(),e.timeline(this);const r=e.persist(),n={persist:r===null?this._persist:r,start:a+t,runner:e};return this._lastRunnerId=e.id,this._runners.push(n),this._runners.sort((l,h)=>l.start-h.start),this._runnerIds=this._runners.map(l=>l.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return e==null?this._timeSource:(this._timeSource=e,this)}speed(e){return e==null?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return e==null?this._time:(this._time=e,this._continue(!0))}unschedule(e){const t=this._runnerIds.indexOf(e.id);return t<0||(this._runners.splice(t,1),this._runnerIds.splice(t,1),e.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return te.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=te.frame(this._step)),this)}_stepFn(e=!1){const t=this._timeSource();let i=t-this._lastSourceTime;e&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=t,e||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let r=this._runners.length;r--;){const n=this._runners[r],l=n.runner;this._time-n.start<=0&&l.reset()}let s=!1;for(let r=0,n=this._runners.length;r0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}U({Element:{timeline:function(o){return o==null?(this._timeline=this._timeline||new qa,this._timeline):(this._timeline=o,this)}}});class we extends Lt{constructor(e){super(),this.id=we.id++,e=typeof(e=e??$t)=="function"?new Ft(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof Ft,this._stepper=this._isDeclarative?e:new xi,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new D,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(e,t,i){let a=1,s=!1,r=0;return t=t??Hs,i=i||"last",typeof(e=e??$t)!="object"||e instanceof _i||(t=e.delay??t,i=e.when??i,s=e.swing||s,a=e.times??a,r=e.wait??r,e=e.duration??$t),{duration:e,delay:t,swing:s,times:a,wait:r,when:i}}active(e){return e==null?this.enabled:(this.enabled=e,this)}addTransform(e){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,t,i){const a=we.sanitise(e,t,i),s=new we(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new D,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new xi(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,t,i){return typeof e=="object"&&(t=e.swing,i=e.wait,e=e.times),this._times=e||1/0,this._swing=t||!1,this._wait=i||0,this._times===!0&&(this._times=1/0),this}loops(e){const t=this._duration+this._wait;if(e==null){const s=Math.floor(this._time/t),r=(this._time-s*t)/this._duration;return Math.min(s+r,this._times)}const i=e%1,a=t*Math.floor(e)+this._duration*i;return this.time(a)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const t=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let l;if(e==null){const c=function(g){const f=r*Math.floor(g%(2*(a+i))/(a+i)),p=f&&!n||!f&&n,x=Math.pow(-1,p)*(g%(a+i))/i+p;return Math.max(Math.min(x,1),0)},u=s*(a+i)-a;return l=t<=0?Math.round(c(1e-5)):t=0;this._lastPosition=t;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let l=!1;return(i||n)&&(this._initialise(i),this.transforms=new D,l=this._run(n?e:t),this.fire("step",this)),this.done=this.done||l&&n,r&&this.fire("finished",this),this}time(e){if(e==null)return this._time;const t=e-this._time;return this.step(t),this}timeline(e){return e===void 0?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(e||this._isDeclarative)for(let t=0,i=this._queue.length;to.lmultiplyO(e),$a=o=>o.transforms;function Js(){const o=this._transformationRunners.runners.map($a).reduce(Za,new D);this.transform(o),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class Ks{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const t=e.id+1;return this.runners.push(e),this.ids.push(t),this}clearBefore(e){const t=this.ids.indexOf(e+1)||1;return this.ids.splice(0,t,0),this.runners.splice(0,t,new Dt).forEach(i=>i.clearTransformsFromQueue()),this}edit(e,t){const i=this.ids.indexOf(e+1);return this.ids.splice(i,1,e+1),this.runners.splice(i,1,t),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let t=0;te.id<=o.id).map($a).reduce(Za,new D)},_addRunner(o){this._transformationRunners.add(o),te.cancelImmediate(this._frameId),this._frameId=te.immediate(Js.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new Ks().add(new Dt(new D(this))))}}});N(we,{attr(o,e){return this.styleAttr("attr",o,e)},css(o,e){return this.styleAttr("css",o,e)},styleAttr(o,e,t){if(typeof e=="string")return this.styleAttr(o,{[e]:t});let i=e;if(this._tryRetarget(o,i))return this;let a=new _e(this._stepper).to(i),s=Object.keys(i);return this.queue(function(){a=a.from(this.element()[o](s))},function(r){return this.element()[o](a.at(r).valueOf()),a.done()},function(r){const n=Object.keys(r),l=(h=s,n.filter(c=>!h.includes(c)));var h;if(l.length){const c=this.element()[o](l),u=new vt(a.from()).valueOf();Object.assign(u,c),a.from(u)}const d=new vt(a.to()).valueOf();Object.assign(d,r),a.to(d),s=n,i=r}),this._rememberMorpher(o,a),this},zoom(o,e){if(this._tryRetarget("zoom",o,e))return this;let t=new _e(this._stepper).to(new V(o));return this.queue(function(){t=t.from(this.element().zoom())},function(i){return this.element().zoom(t.at(i),e),t.done()},function(i,a){e=a,t.to(i)}),this._rememberMorpher("zoom",t),this},transform(o,e,t){if(e=o.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",o))return this;const i=D.isMatrixLike(o);t=o.affine!=null?o.affine:t??!i;const a=new _e(this._stepper).type(t?Mt:D);let s,r,n,l,h;return this.queue(function(){r=r||this.element(),s=s||pi(o,r),h=new D(e?void 0:r),r._addRunner(this),e||r._clearTransformRunnersBefore(this)},function(d){e||this.clearTransform();const{x:c,y:u}=new Q(s).transform(r._currentTransform(this));let g=new D({...o,origin:[c,u]}),f=this._isDeclarative&&n?n:h;if(t){g=g.decompose(c,u),f=f.decompose(c,u);const x=g.rotate,b=f.rotate,m=[x-360,x,x+360],v=m.map(C=>Math.abs(C-b)),k=Math.min(...v),y=v.indexOf(k);g.rotate=m[y]}e&&(i||(g.rotate=o.rotate||0),this._isDeclarative&&l&&(f.rotate=l)),a.from(f),a.to(g);const p=a.at(d);return l=p.rotate,n=new D(p),this.addTransform(n),r._addRunner(this),a.done()},function(d){(d.origin||"center").toString()!==(o.origin||"center").toString()&&(s=pi(d,r)),o={...d,origin:s}},!0),this._isDeclarative&&this._rememberMorpher("transform",a),this},x(o){return this._queueNumber("x",o)},y(o){return this._queueNumber("y",o)},ax(o){return this._queueNumber("ax",o)},ay(o){return this._queueNumber("ay",o)},dx(o=0){return this._queueNumberDelta("x",o)},dy(o=0){return this._queueNumberDelta("y",o)},dmove(o,e){return this.dx(o).dy(e)},_queueNumberDelta(o,e){if(e=new V(e),this._tryRetarget(o,e))return this;const t=new _e(this._stepper).to(e);let i=null;return this.queue(function(){i=this.element()[o](),t.from(i),t.to(i+e)},function(a){return this.element()[o](t.at(a)),t.done()},function(a){t.to(i+new V(a))}),this._rememberMorpher(o,t),this},_queueObject(o,e){if(this._tryRetarget(o,e))return this;const t=new _e(this._stepper).to(e);return this.queue(function(){t.from(this.element()[o]())},function(i){return this.element()[o](t.at(i)),t.done()}),this._rememberMorpher(o,t),this},_queueNumber(o,e){return this._queueObject(o,new V(e))},cx(o){return this._queueNumber("cx",o)},cy(o){return this._queueNumber("cy",o)},move(o,e){return this.x(o).y(e)},amove(o,e){return this.ax(o).ay(e)},center(o,e){return this.cx(o).cy(e)},size(o,e){let t;return o&&e||(t=this._element.bbox()),o||(o=t.width/t.height*e),e||(e=t.height/t.width*o),this.width(o).height(e)},width(o){return this._queueNumber("width",o)},height(o){return this._queueNumber("height",o)},plot(o,e,t,i){if(arguments.length===4)return this.plot([o,e,t,i]);if(this._tryRetarget("plot",o))return this;const a=new _e(this._stepper).type(this._element.MorphArray).to(o);return this.queue(function(){a.from(this._element.array())},function(s){return this._element.plot(a.at(s)),a.done()}),this._rememberMorpher("plot",a),this},leading(o){return this._queueNumber("leading",o)},viewbox(o,e,t,i){return this._queueObject("viewbox",new le(o,e,t,i))},update(o){return typeof o!="object"?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(o.opacity!=null&&this.attr("stop-opacity",o.opacity),o.color!=null&&this.attr("stop-color",o.color),o.offset!=null&&this.attr("offset",o.offset),this)}}),N(we,{rx:Di,ry:Ni,from:Ga,to:ja}),Z(we,"Runner");class ki extends ve{constructor(e,t=e){super(re("svg",e),t),this.namespace()}defs(){return this.isRoot()?Ce(this.node.querySelector("defs"))||this.put(new _t):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof q.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:Ei,version:"1.1"}).attr("xmlns:xlink",ht,Ut):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Ut).attr("xmlns:svgjs",null,Ut)}root(){return this.isRoot()?this:super.root()}}U({Container:{nested:se(function(){return this.put(new ki)})}}),Z(ki,"Svg",!0);let Ai=class extends ve{constructor(o,e=o){super(re("symbol",o),e)}};U({Container:{symbol:se(function(){return this.put(new Ai)})}}),Z(Ai,"Symbol");var Ja=Object.freeze({__proto__:null,amove:function(o,e){return this.ax(o).ay(e)},ax:function(o){return this.attr("x",o)},ay:function(o){return this.attr("y",o)},build:function(o){return this._build=!!o,this},center:function(o,e,t=this.bbox()){return this.cx(o,t).cy(e,t)},cx:function(o,e=this.bbox()){return o==null?e.cx:this.attr("x",this.attr("x")+o-e.cx)},cy:function(o,e=this.bbox()){return o==null?e.cy:this.attr("y",this.attr("y")+o-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(o,e,t=this.bbox()){return this.x(o,t).y(e,t)},plain:function(o){return this._build===!1&&this.clear(),this.node.appendChild(q.document.createTextNode(o)),this},x:function(o,e=this.bbox()){return o==null?e.x:this.attr("x",this.attr("x")+o-e.x)},y:function(o,e=this.bbox()){return o==null?e.y:this.attr("y",this.attr("y")+o-e.y)}});class Ie extends ke{constructor(e,t=e){super(re("text",e),t),this.dom.leading=this.dom.leading??new V(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new V(e),this.rebuild())}rebuild(e){if(typeof e=="boolean"&&(this._rebuild=e),this._rebuild){const t=this;let i=0;const a=this.dom.leading;this.each(function(s){if(fi(this.node))return;const r=q.window.getComputedStyle(this.node).getPropertyValue("font-size"),n=a*new V(r);this.dom.newLined&&(this.attr("x",t.attr("x")),this.text()===` `?i+=n:(this.attr("dy",s?n+i:0),i=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new V(e.leading||1.3),this}writeDataToDom(){return Ia(this,this.dom,{leading:1.3}),this}text(e){if(e===void 0){const t=this.node.childNodes;let i=0;e="";for(let a=0,s=t.length;a{let i;try{i=t.node instanceof St().SVGSVGElement?new le(t.attr(["x","y","width","height"])):t.bbox()}catch{return}const a=new D(t),s=a.translate(o,e).transform(a.inverse()),r=new Q(i.x,i.y).transform(s);t.move(r.x,r.y)}),this},dx:function(o){return this.dmove(o,0)},dy:function(o){return this.dmove(0,o)},height:function(o,e=this.bbox()){return o==null?e.height:this.size(e.width,o,e)},move:function(o=0,e=0,t=this.bbox()){const i=o-t.x,a=e-t.y;return this.dmove(i,a)},size:function(o,e,t=this.bbox()){const i=lt(this,o,e,t),a=i.width/t.width,s=i.height/t.height;return this.children().forEach(r=>{const n=new Q(t).transform(new D(r).inverse());r.scale(a,s,n.x,n.y)}),this},width:function(o,e=this.bbox()){return o==null?e.width:this.size(o,e.height,e)},x:function(o,e=this.bbox()){return o==null?e.x:this.move(o,e.y,e)},y:function(o,e=this.bbox()){return o==null?e.y:this.move(e.x,o,e)}});class Oe extends ve{constructor(e,t=e){super(re("g",e),t)}}N(Oe,Ka),U({Container:{group:se(function(){return this.put(new Oe)})}}),Z(Oe,"G");class It extends ve{constructor(e,t=e){super(re("a",e),t)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,ht)}}N(It,Ka),U({Container:{link:se(function(o){return this.put(new It).to(o)})},Element:{unlink(){const o=this.linker();if(!o)return this;const e=o.parent();if(!e)return this.remove();const t=e.index(o);return e.add(this,t),o.remove(),this},linkTo(o){let e=this.linker();return e||(e=new It,this.wrap(e)),typeof o=="function"?o.call(e,e):e.to(o),this},linker(){const o=this.parent();return o&&o.node.nodeName.toLowerCase()==="a"?o:null}}}),Z(It,"A");class ti extends ve{constructor(e,t=e){super(re("mask",e),t)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return $e("svg [mask*="+this.id()+"]")}}U({Container:{mask:se(function(){return this.defs().put(new ti)})},Element:{masker(){return this.reference("mask")},maskWith(o){const e=o instanceof ti?o:this.parent().mask().add(o);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),Z(ti,"Mask");class ca extends ge{constructor(e,t=e){super(re("stop",e),t)}update(e){return(typeof e=="number"||e instanceof V)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),e.opacity!=null&&this.attr("stop-opacity",e.opacity),e.color!=null&&this.attr("stop-color",e.color),e.offset!=null&&this.attr("offset",new V(e.offset)),this}}U({Gradient:{stop:function(o,e,t){return this.put(new ca).update(o,e,t)}}}),Z(ca,"Stop");class ii extends ge{constructor(e,t=e){super(re("style",e),t)}addText(e=""){return this.node.textContent+=e,this}font(e,t,i={}){return this.rule("@font-face",{fontFamily:e,src:t,...i})}rule(e,t){return this.addText(function(i,a){if(!i)return"";if(!a)return i;let s=i+"{";for(const r in a)s+=r.replace(/([A-Z])/g,function(n,l){return"-"+l.toLowerCase()})+":"+a[r]+";";return s+="}",s}(e,t))}}U("Dom",{style(o,e){return this.put(new ii).rule(o,e)},fontface(o,e,t){return this.put(new ii).font(o,e,t)}}),Z(ii,"Style");class ai extends Ie{constructor(e,t=e){super(re("textPath",e),t)}array(){const e=this.track();return e?e.array():null}plot(e){const t=this.track();let i=null;return t&&(i=t.plot(e)),e==null?i:this}track(){return this.reference("href")}}U({Container:{textPath:se(function(o,e){return o instanceof Ie||(o=this.text(o)),o.path(e)})},Text:{path:se(function(o,e=!0){const t=new ai;let i;if(o instanceof it||(o=this.defs().path(o)),t.attr("href","#"+o,ht),e)for(;i=this.node.firstChild;)t.node.appendChild(i);return this.put(t)}),textPath(){return this.findOne("textPath")}},Path:{text:se(function(o){return o instanceof Ie||(o=new Ie().addTo(this.parent()).text(o)),o.path(this)}),targets(){return $e("svg textPath").filter(o=>(o.attr("href")||"").includes(this.id()))}}}),ai.prototype.MorphArray=Pe,Z(ai,"TextPath");class da extends ke{constructor(e,t=e){super(re("use",e),t)}use(e,t){return this.attr("href",(t||"")+"#"+e,ht)}}U({Container:{use:se(function(o,e){return this.put(new da).use(o,e)})}}),Z(da,"Use");const Qs=me;N([ki,Ai,Xt,mt,Rt],ye("viewbox")),N([Ge,Ve,je,it],ye("marker")),N(Ie,ye("Text")),N(it,ye("Path")),N(_t,ye("Defs")),N([Ie,Yt],ye("Tspan")),N([Et,zt,xt,we],ye("radius")),N(Lt,ye("EventTarget")),N(Fe,ye("Dom")),N(ge,ye("Element")),N(ke,ye("Shape")),N([ve,Ba],ye("Container")),N(xt,ye("Gradient")),N(we,ye("Runner")),qe.extend([...new Set(Ma)]),function(o=[]){wi.push(...[].concat(o))}([V,ae,le,D,Ze,De,Pe,Q]),N(wi,{to(o){return new _e().type(this.constructor).from(this.toArray()).to(o)},fromArray(o){return this.init(o),this},toConsumable(){return this.toArray()},morph(o,e,t,i,a){return this.fromArray(o.map(function(s,r){return i.step(s,e[r],t,a[r],a)}))}});class ne extends ge{constructor(e){super(re("filter",e),e),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(e,t){return!(e=super.put(e,t)).attr("in")&&this.$autoSetIn&&e.attr("in",this.$source),e.attr("result")||e.attr("result",e.id()),e}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return $e('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class Bi extends ge{constructor(e,t){super(e,t),this.result(this.id())}in(e){if(e==null){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",e)}result(e){return this.attr("result",e)}toString(){return this.result()}}const Ae=o=>function(...e){for(let t=o.length;t--;)e[t]!=null&&this.attr(o[t],e[t])},er={blend:Ae(["in","in2","mode"]),colorMatrix:Ae(["type","values"]),composite:Ae(["in","in2","operator"]),convolveMatrix:function(o){o=new Ze(o).toString(),this.attr({order:Math.sqrt(o.split(" ").length),kernelMatrix:o})},diffuseLighting:Ae(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ae(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ae(["in","dx","dy","stdDeviation"]),flood:Ae(["flood-color","flood-opacity"]),gaussianBlur:function(o=0,e=o){this.attr("stdDeviation",o+" "+e)},image:function(o){this.attr("href",o,ht)},morphology:Ae(["operator","radius"]),offset:Ae(["dx","dy"]),specularLighting:Ae(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ae([]),turbulence:Ae(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach(o=>{const e=ot(o),t=er[o];ne[e+"Effect"]=class extends Bi{constructor(i){super(re("fe"+e,i),i)}update(i){return t.apply(this,i),this}},ne.prototype[o]=se(function(i,...a){const s=new ne[e+"Effect"];return i==null?this.put(s):(typeof i=="function"?i.call(s,s):a.unshift(i),this.put(s).update(a))})}),N(ne,{merge(o){const e=this.put(new ne.MergeEffect);return typeof o=="function"?(o.call(e,e),e):((o instanceof Array?o:[...arguments]).forEach(t=>{t instanceof ne.MergeNode?e.put(t):e.mergeNode(t)}),e)},componentTransfer(o={}){const e=this.put(new ne.ComponentTransferEffect);if(typeof o=="function")return o.call(e,e),e;o.r||o.g||o.b||o.a||(o={r:o,g:o,b:o,a:o});for(const t in o)e.add(new ne["Func"+t.toUpperCase()](o[t]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach(o=>{const e=ot(o);ne[e]=class extends Bi{constructor(t){super(re("fe"+e,t),t)}}});["funcR","funcG","funcB","funcA"].forEach(function(o){const e=ne[ot(o)],t=se(function(){return this.put(new e)});ne.ComponentTransferEffect.prototype[o]=t});["distantLight","pointLight","spotLight"].forEach(o=>{const e=ne[ot(o)],t=se(function(){return this.put(new e)});ne.DiffuseLightingEffect.prototype[o]=t,ne.SpecularLightingEffect.prototype[o]=t}),N(ne.MergeEffect,{mergeNode(o){return this.put(new ne.MergeNode).attr("in",o)}}),N(_t,{filter:function(o){const e=this.put(new ne);return typeof o=="function"&&o.call(e,e),e}}),N(ve,{filter:function(o){return this.defs().filter(o)}}),N(ge,{filterWith:function(o){const e=o instanceof ne?o:this.defs().filter(o);return this.attr("filter",e)},unfilter:function(o){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const tr={blend:function(o,e){return this.parent()&&this.parent().blend(this,o,e)},colorMatrix:function(o,e){return this.parent()&&this.parent().colorMatrix(o,e).in(this)},componentTransfer:function(o){return this.parent()&&this.parent().componentTransfer(o).in(this)},composite:function(o,e){return this.parent()&&this.parent().composite(this,o,e)},convolveMatrix:function(o){return this.parent()&&this.parent().convolveMatrix(o).in(this)},diffuseLighting:function(o,e,t,i){return this.parent()&&this.parent().diffuseLighting(o,t,i).in(this)},displacementMap:function(o,e,t,i){return this.parent()&&this.parent().displacementMap(this,o,e,t,i)},dropShadow:function(o,e,t){return this.parent()&&this.parent().dropShadow(this,o,e,t).in(this)},flood:function(o,e){return this.parent()&&this.parent().flood(o,e)},gaussianBlur:function(o,e){return this.parent()&&this.parent().gaussianBlur(o,e).in(this)},image:function(o){return this.parent()&&this.parent().image(o)},merge:function(o){return o=o instanceof Array?o:[...o],this.parent()&&this.parent().merge(this,...o)},morphology:function(o,e){return this.parent()&&this.parent().morphology(o,e).in(this)},offset:function(o,e){return this.parent()&&this.parent().offset(o,e).in(this)},specularLighting:function(o,e,t,i,a){return this.parent()&&this.parent().specularLighting(o,t,i,a).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(o,e,t,i,a){return this.parent()&&this.parent().turbulence(o,e,t,i,a).in(this)}};N(Bi,tr),N(ne.MergeEffect,{in:function(o){return o instanceof ne.MergeNode?this.add(o,0):this.add(new ne.MergeNode().in(o),0),this}}),N([ne.CompositeEffect,ne.BlendEffect,ne.DisplacementMapEffect],{in2:function(o){if(o==null){const e=this.attr("in2");return this.parent()&&this.parent().find(`[result="${e}"]`)[0]||e}return this.attr("in2",o)}}),ne.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var ue=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"getDefaultFilter",value:function(e,t){var i=this.w;e.unfilter(!0),new ne().size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"applyFilter",value:function(e,t,i){var a,s=this,r=this.w;if(e.unfilter(!0),i!=="none"){var n,l,h=r.config.chart.dropShadow,d=i==="lighten"?2:.3;e.filterWith(function(c){c.colorMatrix({type:"matrix",values:` `.concat(d,` 0 0 0 0 0 `).concat(d,` 0 0 0 0 0 `).concat(d,` 0 0 0 0 0 1 0 `),in:"SourceGraphic",result:"brightness"}),h.enabled&&s.addShadow(c,t,h,"brightness")}),!h.noUserSpaceOnUse&&((n=e.filterer())===null||n===void 0||(l=n.node)===null||l===void 0||l.setAttribute("filterUnits","userSpaceOnUse")),this._scaleFilterSize((a=e.filterer())===null||a===void 0?void 0:a.node)}else this.getDefaultFilter(e,t)}},{key:"addShadow",value:function(e,t,i,a){var s,r=this.w,n=i.blur,l=i.top,h=i.left,d=i.color,c=i.opacity;if(d=Array.isArray(d)?d[t]:d,((s=r.config.chart.dropShadow.enabledOnSeries)===null||s===void 0?void 0:s.length)>0&&r.config.chart.dropShadow.enabledOnSeries.indexOf(t)===-1)return e;e.offset({in:a,dx:h,dy:l,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),e.flood({"flood-color":d,"flood-opacity":c,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",a])}},{key:"dropShadow",value:function(e,t){var i,a,s,r,n,l=this,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,d=this.w;return e.unfilter(!0),L.isMsEdge()&&d.config.chart.type==="radialBar"||((i=d.config.chart.dropShadow.enabledOnSeries)===null||i===void 0?void 0:i.length)>0&&((s=d.config.chart.dropShadow.enabledOnSeries)===null||s===void 0?void 0:s.indexOf(h))===-1?e:(e.filterWith(function(c){l.addShadow(c,h,t,"SourceGraphic")}),t.noUserSpaceOnUse||(r=e.filterer())===null||r===void 0||(n=r.node)===null||n===void 0||n.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((a=e.filterer())===null||a===void 0?void 0:a.node),e)}},{key:"setSelectionFilter",value:function(e,t,i){var a=this.w;if(a.globals.selectedDataPoints[t]!==void 0&&a.globals.selectedDataPoints[t].indexOf(i)>-1){e.node.setAttribute("selected",!0);var s=a.config.states.active.filter;s!=="none"&&this.applyFilter(e,t,s.type)}}},{key:"_scaleFilterSize",value:function(e){e&&function(t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),o}(),X=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"roundPathCorners",value:function(e,t){function i(A,S,M){var P=S.x-A.x,I=S.y-A.y,T=Math.sqrt(P*P+I*I);return a(A,S,Math.min(1,M/T))}function a(A,S,M){return{x:A.x+(S.x-A.x)*M,y:A.y+(S.y-A.y)*M}}function s(A,S){A.length>2&&(A[A.length-2]=S.x,A[A.length-1]=S.y)}function r(A){return{x:parseFloat(A[A.length-2]),y:parseFloat(A[A.length-1])}}e.indexOf("NaN")>-1&&(e="");var n=e.split(/[,\s]/).reduce(function(A,S){var M=S.match("([a-zA-Z])(.+)");return M?(A.push(M[1]),A.push(M[2])):A.push(S),A},[]).reduce(function(A,S){return parseFloat(S)==S&&A.length?A[A.length-1].push(S):A.push([S]),A},[]),l=[];if(n.length>1){var h=r(n[0]),d=null;n[n.length-1][0]=="Z"&&n[0].length>2&&(d=["L",h.x,h.y],n[n.length-1]=d),l.push(n[0]);for(var c=1;c2&&g[0]=="L"&&f.length>2&&f[0]=="L"){var p,x,b=r(u),m=r(g),v=r(f);p=i(m,b,t),x=i(m,v,t),s(g,p),g.origPoint=m,l.push(g);var k=a(p,m,.5),y=a(m,x,.5),C=["C",k.x,k.y,y.x,y.y,x.x,x.y];C.origPoint=m,l.push(C)}else l.push(g)}if(d){var w=r(l[l.length-1]);l.push(["Z"]),s(l[0],w)}}else l=n;return l.reduce(function(A,S){return A+S.join(" ")+" "},"")}},{key:"drawLine",value:function(e,t,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,n=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:t,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":l})}},{key:"drawRect",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",n=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null,d=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:e,y:t,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":l!==null?l:0,stroke:h!==null?h:"none","stroke-dasharray":d}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:a,stroke:t,"stroke-width":i})}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e<0&&(e=0);var i=this.w.globals.dom.Paper.circle(2*e);return t!==null&&i.attr(t),i}},{key:"drawPath",value:function(e){var t=e.d,i=t===void 0?"":t,a=e.stroke,s=a===void 0?"#a8a8a8":a,r=e.strokeWidth,n=r===void 0?1:r,l=e.fill,h=e.fillOpacity,d=h===void 0?1:h,c=e.strokeOpacity,u=c===void 0?1:c,g=e.classes,f=e.strokeLinecap,p=f===void 0?null:f,x=e.strokeDashArray,b=x===void 0?0:x,m=this.w;return p===null&&(p=m.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(m.globals.gridHeight)),m.globals.dom.Paper.path(i).attr({fill:l,"fill-opacity":d,stroke:s,"stroke-opacity":u,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":b,class:g})}},{key:"group",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=this.w.globals.dom.Paper.group();return e!==null&&t.attr(e),t}},{key:"move",value:function(e,t){var i=["M",e,t].join(" ");return i}},{key:"line",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=null;return i===null?a=[" L",e,t].join(" "):i==="H"?a=[" H",e].join(" "):i==="V"&&(a=[" V",t].join(" ")),a}},{key:"curve",value:function(e,t,i,a,s,r){var n=["C",e,t,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(e,t,i,a){return["Q",e,t,i,a].join(" ")}},{key:"arc",value:function(e,t,i,a,s,r,n){var l="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(l="a");var h=[l,e,t,i,a,s,r,n].join(" ");return h}},{key:"renderPaths",value:function(e){var t,i=e.j,a=e.realIndex,s=e.pathFrom,r=e.pathTo,n=e.stroke,l=e.strokeWidth,h=e.strokeLinecap,d=e.fill,c=e.animationDelay,u=e.initialSpeed,g=e.dataChangeSpeed,f=e.className,p=e.chartType,x=e.shouldClipToGrid,b=x===void 0||x,m=e.bindEventsOnPaths,v=m===void 0||m,k=e.drawShadow,y=k===void 0||k,C=this.w,w=new ue(this.ctx),A=new nt(this.ctx),S=this.w.config.chart.animations.enabled,M=S&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(S&&!C.globals.resized||M&&C.globals.dataChanged&&C.globals.shouldAnimate);P?t=s:(t=r,C.globals.animationEnded=!0);var I=C.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:C.config.stroke.dashArray;var z=this.drawPath({d:t,stroke:n,strokeWidth:l,fill:d,fillOpacity:1,classes:f,strokeLinecap:h,strokeDashArray:T});z.attr("index",a),b&&(p==="bar"&&!C.globals.isHorizontal||C.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(C.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(C.globals.cuid,")")})),C.config.chart.dropShadow.enabled&&y&&w.dropShadow(z,C.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var E={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:d,strokeWidth:l,delay:c};return!S||C.globals.resized||C.globals.dataChanged?!C.globals.resized&&C.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(R(R({},E),{},{speed:u})),C.globals.dataChanged&&M&&P&&A.animatePathsGradually(R(R({},E),{},{speed:g})),z}},{key:"drawPattern",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(t,i,function(r){e==="horizontalLines"?r.line(0,0,i,0).stroke({color:a,width:s+1}):e==="verticalLines"?r.line(0,0,0,t).stroke({color:a,width:s+1}):e==="slantedLines"?r.line(0,0,t,i).stroke({color:a,width:s}):e==="squares"?r.rect(t,i).fill("none").stroke({color:a,width:s}):e==="circles"&&r.circle(t).fill("none").stroke({color:a,width:s})})}},{key:"drawGradient",value:function(e,t,i,a,s){var r,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],d=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0,c=this.w;t.length<9&&t.indexOf("#")===0&&(t=L.hexToRgba(t,a)),i.length<9&&i.indexOf("#")===0&&(i=L.hexToRgba(i,s));var u=0,g=1,f=1,p=null;l!==null&&(u=l[0]!==void 0?l[0]/100:0,g=l[1]!==void 0?l[1]/100:1,f=l[2]!==void 0?l[2]/100:1,p=l[3]!==void 0?l[3]/100:null);var x=!(c.config.chart.type!=="donut"&&c.config.chart.type!=="pie"&&c.config.chart.type!=="polarArea"&&c.config.chart.type!=="bubble");if(r=h&&h.length!==0?c.globals.dom.Paper.gradient(x?"radial":"linear",function(v){(Array.isArray(h[d])?h[d]:h).forEach(function(k){v.stop(k.offset/100,k.color,k.opacity)})}):c.globals.dom.Paper.gradient(x?"radial":"linear",function(v){v.stop(u,t,a),v.stop(g,i,s),v.stop(f,i,s),p!==null&&v.stop(p,t,a)}),x){var b=c.globals.gridWidth/2,m=c.globals.gridHeight/2;c.config.chart.type!=="bubble"?r.attr({gradientUnits:"userSpaceOnUse",cx:b,cy:m,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else e==="vertical"?r.from(0,0).to(0,1):e==="diagonal"?r.from(0,0).to(1,1):e==="horizontal"?r.from(0,1).to(1,1):e==="diagonal2"&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(e){var t=e.text,i=e.maxWidth,a=e.fontSize,s=e.fontFamily,r=this.getTextRects(t,a,s),n=r.width/t.length,l=Math.floor(i/n);return i-1){var l=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(l,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var h=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),d=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(f){Array.prototype.forEach.call(f,function(p){p.node.setAttribute("selected","false"),a.getDefaultFilter(p,s)})};c(h),c(d)}e.node.setAttribute("selected","true"),n="true",i.globals.selectedDataPoints[s]===void 0&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if(n==="true"){var u=i.config.states.active.filter;if(u!=="none")a.applyFilter(e,s,u.type);else if(i.config.states.hover.filter!=="none"&&!i.globals.isTouchDevice){var g=i.config.states.hover.filter;a.applyFilter(e,s,g.type)}}else i.config.states.active.filter.type!=="none"&&(i.config.states.hover.filter.type==="none"||i.globals.isTouchDevice?a.getDefaultFilter(e,s):(g=i.config.states.hover.filter,a.applyFilter(e,s,g.type)));typeof i.config.chart.events.dataPointSelection=="function"&&i.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&typeof e.getBBox=="function"&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,i,a){var s=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var l=n.bbox();return s||(l=n.node.getBoundingClientRect()),n.remove(),{width:l.width,height:l.height}}},{key:"placeTextWithEllipsis",value:function(e,t,i){if(typeof e.getComputedTextLength=="function"&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=i/1.1)){for(var a=t.length-3;a>0;a-=3)if(e.getSubStringLength(0,a)<=i/1.1)return void(e.textContent=t.substring(0,a)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}}]),o}(),he=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=this.w,i=[];if(t.globals.series.length===0)return i;for(var a=0;a0&&arguments[0]!==void 0?arguments[0]:null;return e===null?this.w.config.series.reduce(function(t,i){return t+i},0):this.w.globals.series[e].reduce(function(t,i){return t+i},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,t=this.w,i=[];return t.globals.seriesGroups.forEach(function(a){var s=[];t.config.series.forEach(function(n,l){a.indexOf(t.globals.seriesNames[l])>-1&&s.push(l)});var r=t.globals.series.map(function(n,l){return s.indexOf(l)===-1?l:-1}).filter(function(n){return n!==-1});i.push(e.getStackedSeriesTotals(r))}),i}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,t=this.w.config,i=[],a=[],s=[],r=e.series.length>t.yaxis.length||t.yaxis.some(function(c){return Array.isArray(c.seriesName)});t.series.forEach(function(c,u){s.push(u),a.push(null)}),t.yaxis.forEach(function(c,u){i[u]=[]});var n=[];t.yaxis.forEach(function(c,u){var g=!1;if(c.seriesName){var f=[];Array.isArray(c.seriesName)?f=c.seriesName:f.push(c.seriesName),f.forEach(function(p){t.series.forEach(function(x,b){if(x.name===p){var m=b;u===b||r?!r||s.indexOf(b)>-1?i[u].push([u,b]):console.warn("Series '"+x.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."):(i[b].push([b,u]),m=u),g=!0,(m=s.indexOf(m))!==-1&&s.splice(m,1)}})})}g||n.push(u)}),i=i.map(function(c,u){var g=[];return c.forEach(function(f){a[f[1]]=f[0],g.push(f[1])}),g});for(var l=t.yaxis.length-1,h=0;h0&&arguments[0]!==void 0?arguments[0]:null;return(e===null?this.w.config.series.filter(function(t){return t!==null}):this.w.config.series[e].data.filter(function(t){return t!==null})).length===0}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(t,i,a){return t===a[0]})}},{key:"getCategoryLabels",value:function(e){var t=this.w,i=e.slice();return t.config.xaxis.convertedCatToNumeric&&(i=e.map(function(a,s){return t.config.xaxis.labels.formatter(a-t.globals.minX+1)})),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(t){return t.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(t){return t.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach(function(i){t=Math.max(t,i)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(i){t=Math.max(t,i.size)}),t>0&&(e.config.markers.hover.size>0?t=e.config.markers.hover.size:t+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(t,i){var a=0;if(Array.isArray(t))for(var s=0;se&&i.globals.seriesX[s][n]0){var f=function(x,b){var m=s.config.yaxis[s.globals.seriesYAxisReverseMap[b]],v=x<0?-1:1;return x=Math.abs(x),m.logarithmic&&(x=a.getBaseLog(m.logBase,x)),-v*x/n[b]};if(r.isMultipleYAxis){h=[];for(var p=0;p0&&t.forEach(function(n){var l=[],h=[];e.i.forEach(function(d,c){s.config.series[d].group===n&&(l.push(e.series[c]),h.push(d))}),l.length>0&&r.push(a.draw(l,i,h))}),r}}],[{key:"checkComboSeries",value:function(e,t){var i=!1,a=0,s=0;return t===void 0&&(t="line"),e.length&&e[0].type!==void 0&&e.forEach(function(r){r.type!=="bar"&&r.type!=="column"&&r.type!=="candlestick"&&r.type!=="boxPlot"||a++,r.type!==void 0&&r.type!==t&&s++}),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(e,t,i){var a,s,r,n,l,h;return(a=t)!==null&&a!==void 0&&a.yaxis&&(t=e.extendYAxis(t,i)),(s=t)!==null&&s!==void 0&&s.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),(r=t)!==null&&r!==void 0&&(n=r.annotations)!==null&&n!==void 0&&n.xaxis&&(t=e.extendXAxisAnnotations(t)),(l=t)!==null&&l!==void 0&&(h=l.annotations)!==null&&h!==void 0&&h.points&&(t=e.extendPointAnnotations(t))),t}}]),o}(),Bt=function(){function o(e){H(this,o),this.w=e.w,this.annoCtx=e}return O(o,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.w;if(e.label.orientation==="vertical"){var a=t!==null?t:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(s!==null){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n=e.label.position==="top"?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var l=this.annoCtx.graphics.rotateAroundCenter(s),h=l.x,d=l.y;s.setAttribute("transform","rotate(-90 ".concat(h," ").concat(d,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var i=this.w;if(!e||!t.label.text||!String(t.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=e.getBoundingClientRect(),r=t.label.style.padding,n=r.left,l=r.right,h=r.top,d=r.bottom;if(t.label.orientation==="vertical"){var c=[n,l,h,d];h=c[0],d=c[1],n=c[2],l=c[3]}var u=s.left-a.left-n,g=s.top-a.top-h,f=this.annoCtx.graphics.drawRect(u-i.globals.barPadForNumericAxis,g,s.width+n+l,s.height+h+d,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&f.node.classList.add(t.id),f}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,i=function(a,s,r){var n=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(s,"']"));if(n){var l=n.parentNode,h=e.addBackgroundToAnno(n,a);h&&(l.insertBefore(h.node,n),a.label.mouseEnter&&h.node.addEventListener("mouseenter",a.label.mouseEnter.bind(e,a)),a.label.mouseLeave&&h.node.addEventListener("mouseleave",a.label.mouseLeave.bind(e,a)),a.label.click&&h.node.addEventListener("click",a.label.click.bind(e,a)))}};t.config.annotations.xaxis.forEach(function(a,s){return i(a,s,"xaxis")}),t.config.annotations.yaxis.forEach(function(a,s){return i(a,s,"yaxis")}),t.config.annotations.points.forEach(function(a,s){return i(a,s,"point")})}},{key:"getY1Y2",value:function(e,t){var i,a=this.w,s=e==="y1"?t.y:t.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,l=n.indexOf(s),h=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(l+1,")"));i=h?parseFloat(h.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(l+1)-a.globals.barHeight,t.seriesIndex!==void 0&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*t.seriesIndex)}else{var d,c=a.globals.seriesYAxisMap[t.yAxisIndex][0],u=a.config.yaxis[t.yAxisIndex].logarithmic?new he(this.annoCtx.ctx).getLogVal(a.config.yaxis[t.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(u,0),a.globals.gridHeight),r=u>a.globals.gridHeight||u<0,!t.marker||t.y!==void 0&&t.y!==null||(i=0),(d=a.config.yaxis[t.yAxisIndex])!==null&&d!==void 0&&d.reversed&&(i=u)}return typeof s=="string"&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(e,t){var i=this.w,a=e==="x1"?t.x:t.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,l=!1,h=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return i.config.xaxis.type!=="category"&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(h=this.getStringX(a)),typeof a=="string"&&a.includes("px")&&(h=parseFloat(a)),a==null&&t.marker&&(h=i.globals.gridWidth),t.seriesIndex!==void 0&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(h-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*t.seriesIndex),h>i.globals.gridWidth?(h=i.globals.gridWidth,l=!0):h<0&&(h=0,l=!0),{x:h,clipped:l}}},{key:"getStringX",value:function(e){var t=this.w,i=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var a=t.globals.labels.map(function(r){return Array.isArray(r)?r.join(" "):r}).indexOf(e),s=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),o}(),ir=function(){function o(e){H(this,o),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Bt(this.annoCtx)}return O(o,[{key:"addXaxisAnnotation",value:function(e,t,i){var a,s=this.w,r=this.helpers.getX1X2("x1",e),n=r.x,l=r.clipped,h=!0,d=e.label.text,c=e.strokeDashArray;if(L.isNumber(n)){if(e.x2===null||e.x2===void 0){if(!l){var u=this.annoCtx.graphics.drawLine(n+e.offsetX,0+e.offsetY,n+e.offsetX,s.globals.gridHeight+e.offsetY,e.borderColor,c,e.borderWidth);t.appendChild(u.node),e.id&&u.node.classList.add(e.id)}}else{var g=this.helpers.getX1X2("x2",e);if(a=g.x,h=g.clipped,!l||!h){if(a12?g-12:g===0?12:g;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+h(g))).replace(/(^|[^\\])H/g,"$1"+g)).replace(/(^|[^\\])hh+/g,"$1"+h(f))).replace(/(^|[^\\])h/g,"$1"+f);var p=a?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+h(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+h(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+h(b,3)),b=Math.round(b/10),t=t.replace(/(^|[^\\])ff/g,"$1"+h(b)),b=Math.round(b/10);var m=g<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var k=-e.getTimezoneOffset(),y=a||!k?"Z":k>0?"+":"-";if(!a){var C=(k=Math.abs(k))%60;y+=h(Math.floor(k/60))+":"+h(C)}t=t.replace(/(^|[^\\])K/g,"$1"+y);var w=(a?e.getUTCDay():e.getDay())+1;return t=(t=(t=(t=(t=t.replace(new RegExp(n[0],"g"),n[w])).replace(new RegExp(l[0],"g"),l[w])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,i){var a=this.w;a.config.xaxis.min!==void 0&&(e=a.config.xaxis.min),a.config.xaxis.max!==void 0&&(t=a.config.xaxis.max);var s=this.getDate(e),r=this.getDate(t),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),l=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(l[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(l[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(l[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(l[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(l[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(l[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(l[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,i){return this.determineDaysOfMonths(e,t)-i}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,i){var a=this.daysCntOfYear[t]+i;return t>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(e,t){var i=30;switch(e=L.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(i=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),o}(),Pt=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return O(o,[{key:"xLabelFormat",value:function(e,t,i,a){var s=this.w;if(s.config.xaxis.type==="datetime"&&s.config.xaxis.labels.formatter===void 0&&s.config.tooltip.x.formatter===void 0){var r=new de(this.ctx);return r.formatDate(r.getDate(t),s.config.tooltip.x.format)}return e(t,i,a)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(t){return t}):e}},{key:"defaultYFormatter",value:function(e,t,i){var a=this.w;if(L.isNumber(e))if(a.globals.yValueDecimal!==0)e=e.toFixed(t.decimalsInFloat!==void 0?t.decimalsInFloat:a.globals.yValueDecimal);else{var s=e.toFixed(0);e=e==s?s:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttKeyFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttZFormatter=function(i){return i},t.globals.legendFormatter=function(i){return e.defaultGeneralFormatter(i)},t.config.xaxis.labels.formatter!==void 0?t.globals.xLabelFormatter=t.config.xaxis.labels.formatter:t.globals.xLabelFormatter=function(i){if(L.isNumber(i)){if(!t.config.xaxis.convertedCatToNumeric&&t.config.xaxis.type==="numeric"){if(L.isNumber(t.config.xaxis.decimalsInFloat))return i.toFixed(t.config.xaxis.decimalsInFloat);var a=t.globals.maxX-t.globals.minX;return a>0&&a<100?i.toFixed(1):i.toFixed(0)}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?i.toFixed(1):i.toFixed(0)}return i},typeof t.config.tooltip.x.formatter=="function"?t.globals.ttKeyFormatter=t.config.tooltip.x.formatter:t.globals.ttKeyFormatter=t.globals.xLabelFormatter,typeof t.config.xaxis.tooltip.formatter=="function"&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||t.config.tooltip.y.formatter!==void 0)&&(t.globals.ttVal=t.config.tooltip.y),t.config.tooltip.z.formatter!==void 0&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),t.config.legend.formatter!==void 0&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach(function(i,a){i.labels.formatter!==void 0?t.globals.yLabelFormatters[a]=i.labels.formatter:t.globals.yLabelFormatters[a]=function(s){return t.globals.xyCharts?Array.isArray(s)?s.map(function(r){return e.defaultYFormatter(r,i,a)}):e.defaultYFormatter(s,i,a):s}}),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce(function(i,a){return i.length>a.length?i:a},0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),o}(),Ne=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"getLabel",value:function(e,t,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",n=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],l=this.w,h=e[a]===void 0?"":e[a],d=h,c=l.globals.xLabelFormatter,u=l.config.xaxis.labels.formatter,g=!1,f=new Pt(this.ctx),p=h;n&&(d=f.xLabelFormat(c,h,p,{i:a,dateFormatter:new de(this.ctx).formatDate,w:l}),u!==void 0&&(d=u(h,e[a],{i:a,dateFormatter:new de(this.ctx).formatDate,w:l})));var x,b;t.length>0?(x=t[a].unit,b=null,t.forEach(function(y){y.unit==="month"?b="year":y.unit==="day"?b="month":y.unit==="hour"?b="day":y.unit==="minute"&&(b="hour")}),g=b===x,i=t[a].position,d=t[a].value):l.config.xaxis.type==="datetime"&&u===void 0&&(d=""),d===void 0&&(d=""),d=Array.isArray(d)?d:d.toString();var m=new X(this.ctx),v={};v=l.globals.rotateXLabels&&n?m.getTextRects(d,parseInt(r,10),null,"rotate(".concat(l.config.xaxis.labels.rotate," 0 0)"),!1):m.getTextRects(d,parseInt(r,10));var k=!l.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(d)&&(String(d)==="NaN"||s.indexOf(d)>=0&&k)&&(d=""),{x:i,text:d,textRect:v,isBold:g}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var a=this.w,s=a.config.xaxis.tickAmount;return s==="dataPoints"&&(s=Math.round(a.globals.gridWidth/120)),s>i||e%Math.round(i/(s+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,a,s){var r=this.w;if(e===0&&r.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&r.globals.skipLastTimelinelabel&&(t.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];t.xa.length||a.some(function(s){return Array.isArray(s.seriesName)})?e:i.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var t=this.w,i=t.config.yaxis[e];if(!i.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!i.showForNullSeries){var a=t.globals.seriesYAxisMap[e],s=new he(this.ctx);return a.every(function(r){return s.isSeriesNull(r)})}return!1}},{key:"getYAxisForeColor",value:function(e,t){var i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[t]&&this.ctx.theme.pushExtraColors(e,i.globals.yAxisScale[t].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,t,i,a,s,r,n){var l=this.w,h=new X(this.ctx),d=l.globals.translateY+l.config.yaxis[s].labels.offsetY;if(l.globals.isBarHorizontal?d=0:l.config.chart.type==="heatmap"&&(d+=r/2),a.show&&t>0){l.config.yaxis[s].opposite===!0&&(e+=a.width);for(var c=t;c>=0;c--){var u=h.drawLine(e+i.offsetX-a.width+a.offsetX,d+a.offsetY,e+i.offsetX+a.offsetX,d+a.offsetY,a.color);n.add(u),d+=r}}}}]),o}(),ar=function(){function o(e){H(this,o),this.w=e.w,this.annoCtx=e,this.helpers=new Bt(this.annoCtx),this.axesUtils=new Ne(this.annoCtx)}return O(o,[{key:"addYaxisAnnotation",value:function(e,t,i){var a,s=this.w,r=e.strokeDashArray,n=this.helpers.getY1Y2("y1",e),l=n.yP,h=n.clipped,d=!0,c=!1,u=e.label.text;if(e.y2===null||e.y2===void 0){if(!h){c=!0;var g=this.annoCtx.graphics.drawLine(0+e.offsetX,l+e.offsetY,this._getYAxisAnnotationWidth(e),l+e.offsetY,e.borderColor,r,e.borderWidth);t.appendChild(g.node),e.id&&g.node.classList.add(e.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",e)).yP,d=n.clipped,a>l){var f=l;l=a,a=f}if(!h||!d){c=!0;var p=this.annoCtx.graphics.drawRect(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),l-a,0,e.fillColor,e.opacity,1,e.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),t.appendChild(p.node),e.id&&p.node.classList.add(e.id)}}if(c){var x=e.label.position==="right"?s.globals.gridWidth:e.label.position==="center"?s.globals.gridWidth/2:0,b=this.annoCtx.graphics.drawText({x:x+e.label.offsetX,y:(a??l)+e.label.offsetY-3,text:u,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});b.attr({rel:i}),t.appendChild(b.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return t.globals.gridWidth,(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach(function(a,s){a.yAxisIndex=e.axesUtils.translateYAxisIndex(a.yAxisIndex),e.axesUtils.isYAxisHidden(a.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(a.yAxisIndex)||e.addYaxisAnnotation(a,i.node,s)}),i}}]),o}(),sr=function(){function o(e){H(this,o),this.w=e.w,this.annoCtx=e,this.helpers=new Bt(this.annoCtx)}return O(o,[{key:"addPointAnnotation",value:function(e,t,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",e),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",e)).yP,l=a.clipped;if(L.isNumber(s)&&!l&&!r){var h={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},d=this.annoCtx.graphics.drawMarker(s+e.marker.offsetX,n+e.marker.offsetY,h);t.appendChild(d.node);var c=e.label.text?e.label.text:"",u=this.annoCtx.graphics.drawText({x:s+e.label.offsetX,y:n+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:c,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(u.attr({rel:i}),t.appendChild(u.node),e.customSVG.SVG){var g=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});g.attr({transform:"translate(".concat(s+e.customSVG.offsetX,", ").concat(n+e.customSVG.offsetY,")")}),g.node.innerHTML=e.customSVG.SVG,t.appendChild(g.node)}if(e.image.path){var f=e.image.width?e.image.width:20,p=e.image.height?e.image.height:20;d=this.annoCtx.addImage({x:s+e.image.offsetX-f/2,y:n+e.image.offsetY-p/2,width:f,height:p,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&d.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&d.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&d.node.addEventListener("click",e.click.bind(this,e))}}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map(function(a,s){e.addPointAnnotation(a,i.node,s)}),i}}]),o}(),Qa={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Be=function(){function o(){H(this,o),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return O(o,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Qa],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),o}(),rr=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.graphics=new X(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Bt(this),this.xAxisAnnotations=new ir(this),this.yAxisAnnotations=new ar(this),this.pointsAnnotations=new sr(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return O(o,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=e.config.chart.animations.enabled,r=[t,i,a],n=[i.node,t.node,a.node],l=0;l<3;l++)e.globals.dom.elGraphical.add(r[l]),!s||e.globals.resized||e.globals.dataChanged||e.config.chart.type!=="scatter"&&e.config.chart.type!=="bubble"&&e.globals.dataPoints>1&&n[l].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:n[l],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(t,i){e.addImage(t,i)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(t,i){e.addText(t,i)})}},{key:"addXaxisAnnotation",value:function(e,t,i){this.xAxisAnnotations.addXaxisAnnotation(e,t,i)}},{key:"addYaxisAnnotation",value:function(e,t,i){this.yAxisAnnotations.addYaxisAnnotation(e,t,i)}},{key:"addPointAnnotation",value:function(e,t,i){this.pointsAnnotations.addPointAnnotation(e,t,i)}},{key:"addText",value:function(e,t){var i=e.x,a=e.y,s=e.text,r=e.textAnchor,n=e.foreColor,l=e.fontSize,h=e.fontFamily,d=e.fontWeight,c=e.cssClass,u=e.backgroundColor,g=e.borderWidth,f=e.strokeDashArray,p=e.borderRadius,x=e.borderColor,b=e.appendTo,m=b===void 0?".apexcharts-svg":b,v=e.paddingLeft,k=v===void 0?4:v,y=e.paddingRight,C=y===void 0?4:y,w=e.paddingBottom,A=w===void 0?2:w,S=e.paddingTop,M=S===void 0?2:S,P=this.w,I=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:l||"12px",fontWeight:d||"regular",fontFamily:h||P.config.chart.fontFamily,foreColor:n||P.config.chart.foreColor,cssClass:c}),T=P.globals.dom.baseEl.querySelector(m);T&&T.appendChild(I.node);var z=I.bbox();if(s){var E=this.graphics.drawRect(z.x-k,z.y-M,z.width+k+C,z.height+A+M,p,u||"transparent",1,g,x,f);T.insertBefore(E.node,I.node)}}},{key:"addImage",value:function(e,t){var i=this.w,a=e.path,s=e.x,r=s===void 0?0:s,n=e.y,l=n===void 0?0:n,h=e.width,d=h===void 0?20:h,c=e.height,u=c===void 0?20:c,g=e.appendTo,f=g===void 0?".apexcharts-svg":g,p=i.globals.dom.Paper.image(a);p.size(d,u).move(r,l);var x=i.globals.dom.baseEl.querySelector(f);return x&&x.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,t,i){return this.invertAxis===void 0&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var t=e.params,i=e.pushToMemory,a=e.context,s=e.type,r=e.contextMethod,n=a,l=n.w,h=l.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),d=h.childNodes.length+1,c=new Be,u=Object.assign({},s==="xaxis"?c.xAxisAnnotation:s==="yaxis"?c.yAxisAnnotation:c.pointAnnotation),g=L.extend(u,t);switch(s){case"xaxis":this.addXaxisAnnotation(g,h,d);break;case"yaxis":this.addYaxisAnnotation(g,h,d);break;case"point":this.addPointAnnotation(g,h,d)}var f=l.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(d,"']")),p=this.helpers.addBackgroundToAnno(f,g);return p&&h.insertBefore(p.node,f),i&&l.globals.memory.methodsToExec.push({context:n,id:g.id?g.id:L.randomId(),method:r,label:"addAnnotation",params:t}),a}},{key:"clearAnnotations",value:function(e){for(var t=e.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=t.globals.memory.methodsToExec.length-1;a>=0;a--)t.globals.memory.methodsToExec[a].label!=="addText"&&t.globals.memory.methodsToExec[a].label!=="addAnnotation"||t.globals.memory.methodsToExec.splice(a,1);i=L.listToArray(i),Array.prototype.forEach.call(i,function(s){for(;s.firstChild;)s.removeChild(s.firstChild)})}},{key:"removeAnnotation",value:function(e,t){var i=e.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(t));a&&(i.globals.memory.methodsToExec.map(function(s,r){s.id===t&&i.globals.memory.methodsToExec.splice(r,1)}),Array.prototype.forEach.call(a,function(s){s.parentElement.removeChild(s)}))}}]),o}(),si=function(o){var e,t=o.isTimeline,i=o.ctx,a=o.seriesIndex,s=o.dataPointIndex,r=o.y1,n=o.y2,l=o.w,h=l.globals.seriesRangeStart[a][s],d=l.globals.seriesRangeEnd[a][s],c=l.globals.labels[s],u=l.config.series[a].name?l.config.series[a].name:"",g=l.globals.ttKeyFormatter,f=l.config.tooltip.y.title.formatter,p={w:l,seriesIndex:a,dataPointIndex:s,start:h,end:d};typeof f=="function"&&(u=f(u,p)),(e=l.config.series[a].data[s])!==null&&e!==void 0&&e.x&&(c=l.config.series[a].data[s].x),t||l.config.xaxis.type==="datetime"&&(c=new Pt(i).xLabelFormat(l.globals.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new de(i).formatDate,w:l})),typeof g=="function"&&(c=g(c,p)),Number.isFinite(r)&&Number.isFinite(n)&&(h=r,d=n);var x="",b="",m=l.globals.colors[a];if(l.config.tooltip.x.formatter===void 0)if(l.config.xaxis.type==="datetime"){var v=new de(i);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(d),l.config.tooltip.x.format)}else x=h,b=d;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(d);return{start:h,end:d,startVal:x,endVal:b,ylabel:c,color:m,seriesName:u}},ri=function(o){var e=o.color,t=o.seriesName,i=o.ylabel,a=o.start,s=o.end,r=o.seriesIndex,n=o.dataPointIndex,l=o.ctx.tooltip.tooltipLabels.getFormatters(r);a=l.yLbFormatter(a),s=l.yLbFormatter(s);var h=l.yLbFormatter(o.w.globals.series[r][n]),d=` `.concat(a,` - `).concat(s,` `);return'
'+(t||"")+'
'+i+": "+(o.w.globals.comboCharts?o.w.config.series[r].type==="rangeArea"||o.w.config.series[r].type==="rangeBar"?d:"".concat(h,""):d)+"
"},yt=function(){function o(e){H(this,o),this.opts=e}return O(o,[{key:"hideYAxis",value:function(){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}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.hideYAxis(),L.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(e,t){var i=t.w.config.series[t.seriesIndex].name;return e!==null?i+": "+e:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},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}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),R(R({},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}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,a=t.dataPointIndex,s=t.w;return e._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,a=t.dataPointIndex,s=t.w;return e._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,t){t.ctx;var i=t.seriesIndex,a=t.dataPointIndex,s=t.w,r=function(){var n=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-n};return s.globals.comboCharts?s.config.series[i].type==="rangeBar"||s.config.series[i].type==="rangeArea"?r():e:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(t){var i=si(R(R({},t),{},{isTimeline:!0})),a=i.color,s=i.seriesName,r=i.ylabel,n=i.startVal,l=i.endVal;return ri(R(R({},t),{},{color:a,seriesName:s,ylabel:r,start:n,end:l}))}(e):function(t){var i=si(t),a=i.color,s=i.seriesName,r=i.ylabel,n=i.start,l=i.end;return ri(R(R({},t),{},{color:a,seriesName:s,ylabel:r,start:n,end:l}))}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var t,i;return(t=e.plotOptions.bar)!==null&&t!==void 0&&t.barHeight||(e.plotOptions.bar.barHeight=2),(i=e.plotOptions.bar)!==null&&i!==void 0&&i.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{key:"area",value:function(){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}}}},{key:"rangeArea",value:function(){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:function(e){return function(t){var i=si(t),a=i.color,s=i.seriesName,r=i.ylabel,n=i.start,l=i.end;return ri(R(R({},t),{},{color:a,seriesName:s,ylabel:r,start:n,end:l}))}(e)}}}}},{key:"brush",value:function(e){return L.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach(function(i,a){e.yaxis[a].min=0,e.yaxis[a].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=t||function(i){return typeof i=="number"&&i?i.toFixed(0)+"%":i}),e}},{key:"stackedBars",value:function(){var e=this.bar();return R(R({},e),{},{plotOptions:R(R({},e.plotOptions),{},{bar:R(R({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(r){return L.isNumber(r)?Math.floor(r):r};var a=e.xaxis.labels.formatter,s=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(s=i.map(function(r){return Array.isArray(r)?r:String(r)})),s&&s.length&&(e.xaxis.labels.formatter=function(r){return L.isNumber(r)?a(s[Math.floor(r)-1]):a(r)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){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}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){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}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){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:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(e,t,i,a,s){var r=e.globals.seriesCandleO[t][i],n=e.globals.seriesCandleH[t][i],l=e.globals.seriesCandleM[t][i],h=e.globals.seriesCandleL[t][i],d=e.globals.seriesCandleC[t][i];return e.config.series[t].type&&e.config.series[t].type!==s?`
`.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": ").concat(e.globals.series[t][i],`
`):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(l?"
".concat(a[2],': ')+l+"
":"")+"
".concat(a[3],': ')+h+"
"+"
".concat(a[4],': ')+d+"
"}}]),o}(),wt=function(){function o(e){H(this,o),this.opts=e}return O(o,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,a=new Be,s=new yt(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&at(i)==="object"){var l,h,d,c,u,g,f,p,x,b,m={};m=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)!==-1?s[i.chart.type]():s.line(),(l=i.plotOptions)!==null&&l!==void 0&&(h=l.bar)!==null&&h!==void 0&&h.isFunnel&&(m=s.funnel()),i.chart.stacked&&i.chart.type==="bar"&&(m=s.stackedBars()),(d=i.chart.brush)!==null&&d!==void 0&&d.enabled&&(m=s.brush(m)),(c=i.plotOptions)!==null&&c!==void 0&&(u=c.line)!==null&&u!==void 0&&u.isSlopeChart&&(m=s.slope()),i.chart.stacked&&i.chart.stackType==="100%"&&(i=s.stacked100(i)),(g=i.plotOptions)!==null&&g!==void 0&&(f=g.bar)!==null&&f!==void 0&&f.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},t||(i.xaxis.convertedCatToNumeric=!1),((p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)!==null&&p!==void 0&&p.enabled||(x=window.Apex.chart)!==null&&x!==void 0&&(b=x.sparkline)!==null&&b!==void 0&&b.enabled)&&(m=s.sparkline(m)),n=L.extend(r,m)}var v=L.extend(n,window.Apex);return r=L.extend(v,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var a,s,r=new yt(i),n=(e==="bar"||e==="boxPlot")&&((a=i.plotOptions)===null||a===void 0||(s=a.bar)===null||s===void 0?void 0:s.horizontal),l=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",h=i.xaxis.type!=="datetime"&&i.xaxis.type!=="numeric",d=i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return n||l||!h||d==="between"||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new Be;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=L.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[L.extend(i.yAxis,e.yaxis)]:e.yaxis=L.extendArray(e.yaxis,i.yAxis);var a=!1;e.yaxis.forEach(function(r){r.logarithmic&&(a=!0)});var s=e.series;return t&&!s&&(s=t.config.series),a&&s.length!==e.yaxis.length&&s.length&&(e.yaxis=s.map(function(r,n){if(r.name||(s[n].name="series-".concat(n+1)),e.yaxis[n])return e.yaxis[n].seriesName=s[n].name,e.yaxis[n];var l=L.extend(i.yAxis,e.yaxis[0]);return l.show=!1,l})),a&&s.length>1&&s.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}},{key:"extendAnnotations",value:function(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new Be;return e.annotations.yaxis=L.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new Be;return e.annotations.xaxis=L.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new Be;return e.annotations.points=L.extendArray(e.annotations.points!==void 0?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(t.chart.type==="bar"&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return t.chart.type!=="bar"&&t.chart.type!=="rangeBar"||t.tooltip.shared&&t.xaxis.crosshairs.width==="barWidth"&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),t.chart.type!=="candlestick"&&t.chart.type!=="boxPlot"||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t}}]),o}(),es=function(){function o(){H(this,o)}return O(o,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:e.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[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],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=L.extend({},e),t.initialSeries=L.clone(e.series),t.lastXAxis=L.clone(t.initialConfig.xaxis),t.lastYAxis=L.clone(t.initialConfig.yaxis),t}}]),o}(),nr=function(){function o(e){H(this,o),this.opts=e}return O(o,[{key:"init",value:function(){var e=new wt(this.opts).init({responsiveOverride:!1});return{config:e,globals:new es().init(e)}}}]),o}(),Te=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return O(o,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,a=parseInt(t.globals.gridWidth,10),s=parseInt(t.globals.gridHeight,10),r=a>s?a:s,n=e.image,l=0,h=0;e.width===void 0&&e.height===void 0?i.fill.image.width!==void 0&&i.fill.image.height!==void 0?(l=i.fill.image.width+1,h=i.fill.image.height):(l=r+1,h=r):(l=e.width,h=e.height);var d=document.createElementNS(t.globals.SVGNS,"pattern");X.setAttrs(d,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:l+"px",height:h+"px"});var c=document.createElementNS(t.globals.SVGNS,"image");d.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),X.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:h+"px"}),c.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(d)}},{key:"getSeriesIndex",value:function(e){var t=this.w,i=t.config.chart.type;return(i==="bar"||i==="rangeBar")&&t.config.plotOptions.bar.distributed||i==="heatmap"||i==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(e,t){var i,a=this.w,s=null,r=null,n=pt(e);try{for(n.s();!(i=n.n()).done;){var l=i.value;l>=t.threshold?(s===null||l>s)&&(s=l):(r===null||l-1?x=L.getOpacityFromRGBA(c):m=L.hexToRgba(L.rgb2hex(c),x),e.opacity&&(x=e.opacity),p==="pattern"&&(n=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var v=ce(h.fill.gradient.colorStops)||[],k=h.fill.gradient.type;d&&(v[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],h.plotOptions.line.colors),k="vertical"),l=this.handleGradientFill({type:k,fillConfig:e.fillConfig,fillColor:c,fillOpacity:x,colorStops:v,i:this.seriesIndex})}if(p==="image"){var y=h.fill.image.src,C=e.patternID?e.patternID:"",w="pattern".concat(s.globals.cuid).concat(e.seriesNumber+1).concat(C);this.patternIDs.indexOf(w)===-1&&(this.clippedImgArea({opacity:x,image:Array.isArray(y)?e.seriesNumber-1&&(f=L.getOpacityFromRGBA(g));var p=l.gradient.opacityTo===void 0?a:Array.isArray(l.gradient.opacityTo)?l.gradient.opacityTo[n]:l.gradient.opacityTo;if(l.gradient.gradientToColors===void 0||l.gradient.gradientToColors.length===0)u=l.gradient.shade==="dark"?c.shadeColor(-1*parseFloat(l.gradient.shadeIntensity),i.indexOf("rgb")>-1?L.rgb2hex(i):i):c.shadeColor(parseFloat(l.gradient.shadeIntensity),i.indexOf("rgb")>-1?L.rgb2hex(i):i);else if(l.gradient.gradientToColors[h.seriesNumber]){var x=l.gradient.gradientToColors[h.seriesNumber];u=x,x.indexOf("rgba")>-1&&(p=L.getOpacityFromRGBA(x))}else u=i;if(l.gradient.gradientFrom&&(g=l.gradient.gradientFrom),l.gradient.gradientTo&&(u=l.gradient.gradientTo),l.gradient.inverseColors){var b=g;g=u,u=b}return g.indexOf("rgb")>-1&&(g=L.rgb2hex(g)),u.indexOf("rgb")>-1&&(u=L.rgb2hex(u)),d.drawGradient(t,g,u,f,p,h.size,l.gradient.stops,r,n)}}]),o}(),ct=function(){function o(e,t){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length4&&arguments[4]!==void 0&&arguments[4],r=this.w,n=t,l=e,h=null,d=new X(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(var u=0;u0:r.config.markers.size>0)||s||c){p||(x+=" w".concat(L.randomId()));var b=this.getMarkerConfig({cssClass:x,seriesIndex:t,dataPointIndex:f});r.config.series[n].data[f]&&(r.config.series[n].data[f].fillColor&&(b.pointFillColor=r.config.series[n].data[f].fillColor),r.config.series[n].data[f].strokeColor&&(b.pointStrokeColor=r.config.series[n].data[f].strokeColor)),a!==void 0&&(b.pSize=a),(l.x[u]<-r.globals.markers.largestSize||l.x[u]>r.globals.gridWidth+r.globals.markers.largestSize||l.y[u]<-r.globals.markers.largestSize||l.y[u]>r.globals.gridHeight+r.globals.markers.largestSize)&&(b.pSize=0),!p&&((r.globals.markers.size[t]>0||s||c)&&!h&&(h=d.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(g=d.drawMarker(l.x[u],l.y[u],b)).attr("rel",f),g.attr("j",f),g.attr("index",t),g.node.setAttribute("default-marker-size",b.pSize),new ue(this.ctx).setSelectionFilter(g,t,f),this.addEvents(g),h&&h.add(g))}else r.globals.pointsArray[t]===void 0&&(r.globals.pointsArray[t]=[]),r.globals.pointsArray[t].push([l.x[u],l.y[u]])}return h}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,i=e.seriesIndex,a=e.dataPointIndex,s=a===void 0?null:a,r=e.radius,n=r===void 0?null:r,l=e.size,h=l===void 0?null:l,d=e.strokeWidth,c=d===void 0?null:d,u=this.w,g=this.getMarkerStyle(i),f=h===null?u.globals.markers.size[i]:h,p=u.config.markers;return s!==null&&p.discrete.length&&p.discrete.map(function(x){x.seriesIndex===i&&x.dataPointIndex===s&&(g.pointStrokeColor=x.strokeColor,g.pointFillColor=x.fillColor,f=x.size,g.pointShape=x.shape)}),{pSize:n===null?f:n,pRadius:n!==null?n:p.radius,pointStrokeWidth:c!==null?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:g.pointStrokeColor,pointFillColor:g.pointFillColor,shape:g.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:t,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var t=this.w,i=new X(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,i=t.globals.markers.colors,a=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[e]:a,pointFillColor:Array.isArray(i)?i[e]:i}}}]),o}(),ts=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return O(o,[{key:"draw",value:function(e,t,i){var a=this.w,s=new X(this.ctx),r=i.realIndex,n=i.pointsPos,l=i.zRatio,h=i.elParent,d=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(d.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(f=p.maxBubbleRadius)}var x=n.x[c],b=n.y[c];if(f=f||0,b!==null&&a.globals.series[r][u]!==void 0||(g=!1),g){var m=this.drawPoint(x,b,f,r,u,t);d.add(m)}h.add(d)}}},{key:"drawPoint",value:function(e,t,i,a,s,r){var n=this.w,l=a,h=new nt(this.ctx),d=new ue(this.ctx),c=new Te(this.ctx),u=new ct(this.ctx),g=new X(this.ctx),f=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:s,radius:n.config.chart.type==="bubble"||n.globals.comboCharts&&n.config.series[a]&&n.config.series[a].type==="bubble"?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:f.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),x=g.drawMarker(e,t,f);if(n.config.series[l].data[s]&&n.config.series[l].data[s].fillColor&&(p=n.config.series[l].data[s].fillColor),x.attr({fill:p}),n.config.chart.dropShadow.enabled){var b=n.config.chart.dropShadow;d.dropShadow(x,b,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var m=n.config.chart.animations.speed;h.animateMarker(x,m,n.globals.easing,function(){window.setTimeout(function(){h.animationCompleted(x)},100)})}return x.attr({rel:s,j:s,index:a,"default-marker-size":f.pSize}),d.setSelectionFilter(x,a,s),u.addEvents(x),x.node.classList.add("apexcharts-marker"),x}},{key:"centerTextInBubble",value:function(e){var t=this.w;return{y:e+=parseInt(t.config.dataLabels.style.fontSize,10)/4}}}]),o}(),st=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"dataLabelsCorrection",value:function(e,t,i,a,s,r,n){var l=this.w,h=!1,d=new X(this.ctx).getTextRects(i,n),c=d.width,u=d.height;t<0&&(t=0),t>l.globals.gridHeight+u&&(t=l.globals.gridHeight+u/2),l.globals.dataLabelsRects[a]===void 0&&(l.globals.dataLabelsRects[a]=[]),l.globals.dataLabelsRects[a].push({x:e,y:t,width:c,height:u});var g=l.globals.dataLabelsRects[a].length-2,f=l.globals.lastDrawnDataLabelsIndexes[a]!==void 0?l.globals.lastDrawnDataLabelsIndexes[a][l.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(l.globals.dataLabelsRects[a][g]!==void 0){var p=l.globals.dataLabelsRects[a][f];(e>p.x+p.width||t>p.y+p.height||t+ut.globals.gridWidth+m.textRects.width+30)&&(l="");var v=t.globals.dataLabels.style.colors[r];((t.config.chart.type==="bar"||t.config.chart.type==="rangeBar")&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(v=t.globals.dataLabels.style.colors[n]),typeof v=="function"&&(v=v({series:t.globals.series,seriesIndex:r,dataPointIndex:n,w:t})),g&&(v=g);var k=u.offsetX,y=u.offsetY;if(t.config.chart.type!=="bar"&&t.config.chart.type!=="rangeBar"||(k=0,y=0),t.globals.isSlopeChart&&(n!==0&&(k=-2*u.offsetX+5),n!==0&&n!==t.config.series[r].data.length-1&&(k=0)),m.drawnextLabel){if((b=i.drawText({width:100,height:parseInt(u.style.fontSize,10),x:a+k,y:s+y,foreColor:v,textAnchor:h||u.textAnchor,text:l,fontSize:d||u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight||"normal"})).attr({class:x||"apexcharts-datalabel",cx:a,cy:s}),u.dropShadow.enabled){var C=u.dropShadow;new ue(this.ctx).dropShadow(b,C)}c.add(b),t.globals.lastDrawnDataLabelsIndexes[r]===void 0&&(t.globals.lastDrawnDataLabelsIndexes[r]=[]),t.globals.lastDrawnDataLabelsIndexes[r].push(n)}return b}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=t.width,l=t.height,h=new X(this.ctx).drawRect(t.x-s,t.y-r/2,n+2*s,l+r,a.borderRadius,i.config.chart.background!=="transparent"&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new ue(this.ctx).dropShadow(h,a.dropShadow),h}},{key:"dataLabelsBackground",value:function(){var e=this.w;if(e.config.chart.type!=="bubble")for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&arguments[0]!==void 0)||arguments[0],t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],a=this.w,s=L.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,e&&(t&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,i=0;i-1&&(e[i].data=[]);return e}},{key:"highlightSeries",value:function(e){var t=this.w,i=this.getSeriesByName(e),a=parseInt(i==null?void 0:i.getAttribute("data:realIndex"),10),s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,l=null;if(t.globals.axisCharts||t.config.chart.type==="radialBar")if(t.globals.axisCharts){r=t.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=t.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var h=t.globals.seriesYAxisReverseMap[a];l=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(h,"']"))}else r=t.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=t.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var d=0;d=h.from&&(u0&&arguments[0]!==void 0?arguments[0]:"asc",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1){for(var s=i.config.series.map(function(n,l){return n.data&&n.data.length>0&&i.globals.collapsedSeriesIndices.indexOf(l)===-1&&(!i.globals.comboCharts||t.length===0||t.length&&t.indexOf(i.config.series[l].type)>-1)?l:-1}),r=e==="asc"?0:s.length-1;e==="asc"?r=0;e==="asc"?r++:r--)if(s[r]!==-1){a=s[r];break}}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,t){return e.type==="bar"||e.type==="column"?t:-1}).filter(function(e){return e!==-1}):this.w.config.series.map(function(e,t){return t})}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(r,n,l){for(var h=r[n].childNodes,d={type:l,paths:[],realIndex:r[n].getAttribute("data:realIndex")},c=0;c0)for(var a=function(r){for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(r,"'] rect")),l=[],h=function(c){var u=function(f){return n[c].getAttribute(f)},g={x:parseFloat(u("x")),y:parseFloat(u("y")),width:parseFloat(u("width")),height:parseFloat(u("height"))};l.push({rect:g,color:n[c].getAttribute("color")})},d=0;d0?t:[]});return e}}]),o}(),Gi=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new he(this.ctx)}return O(o,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new Le(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].x!==void 0&&e[this.activeSeriesIndex].data[0]!==null)return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new Le(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==void 0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var i=this.w.config,a=this.w.globals,s=i.chart.type==="boxPlot"||i.series[t].type==="boxPlot",r=0;r=5?this.twoDSeries.push(L.parseNumber(e[t].data[r][4])):this.twoDSeries.push(L.parseNumber(e[t].data[r][1])),a.dataFormatXNumeric=!0),i.xaxis.type==="datetime"){var n=new Date(e[t].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(e[t].data[r][0]);for(var l=0;l-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new de(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar=a.chart.type==="rangeBar"&&s.isBarHorizontal,s.hasXaxisGroups=a.xaxis.type==="category"&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),e.forEach(function(g,f){g.name!==void 0?s.seriesNames.push(g.name):s.seriesNames.push("series-"+parseInt(f+1,10))}),this.coreUtils.setSeriesYAxisMappings();var l=[],h=ce(new Set(a.series.map(function(g){return g.group})));a.series.forEach(function(g,f){var p=h.indexOf(g.group);l[p]||(l[p]=[]),l[p].push(s.seriesNames[f])}),s.seriesGroups=l;for(var d=function(){for(var g=0;g0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var u=e[c].data.map(function(g){return L.parseNumber(g)});s.series.push(u)}s.seriesZ.push(this.threeDSeries),e[c].color!==void 0?s.seriesColors.push(e[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,i=this.w.config;t.series=e.slice(),t.seriesNames=i.labels.slice();for(var a=0;a0?i.labels=t.xaxis.categories:t.labels.length>0?i.labels=t.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map(function(a){a.forEach(function(s){i.labels.indexOf(s.x)<0&&s.x&&i.labels.push(s.x)})}),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),t.xaxis.convertedCatToNumeric&&(new yt(t).convertCatToNumericXaxis(t,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,i=this.w.config,a=[];if(t.axisCharts){if(t.series.length>0)if(this.isFormatXY())for(var s=i.series.map(function(c,u){return c.data.filter(function(g,f,p){return p.findIndex(function(x){return x.x===g.x})===f})}),r=s.reduce(function(c,u,g,f){return f[c].length>u.length?c:g},0),n=0;n0&&s==i.length&&t.push(a)}),e.globals.ignoreYAxisIndexes=t.map(function(i){return i})}}]),o}(),Nt=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"scaleSvgNode",value:function(e,t){var i=parseFloat(e.getAttributeNS(null,"width")),a=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*t),e.setAttributeNS(null,"height",a*t),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var e=this;return new Promise(function(t){var i=e.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=e.w.globals.dom.Paper.svg(),n=e.w.globals.dom.Paper.node.cloneNode(!0);s!==1&&e.scaleSvgNode(n,s),e.convertImagesToBase64(n).then(function(){r=new XMLSerializer().serializeToString(n),t(r.replace(/ /g," "))})})}},{key:"convertImagesToBase64",value:function(e){var t=this,i=e.getElementsByTagName("image"),a=Array.from(i).map(function(s){var r=s.getAttributeNS("http://www.w3.org/1999/xlink","href");return r&&!r.startsWith("data:")?t.getBase64FromUrl(r).then(function(n){s.setAttributeNS("http://www.w3.org/1999/xlink","href",n)}).catch(function(n){console.error("Error converting image to base64:",n)}):Promise.resolve()});return Promise.all(a)}},{key:"getBase64FromUrl",value:function(e){return new Promise(function(t,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var s=document.createElement("canvas");s.width=a.width,s.height=a.height,s.getContext("2d").drawImage(a,0,0),t(s.toDataURL())},a.onerror=i,a.src=e})}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,function(s){s.setAttribute("width",0)}),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var e=this;return new Promise(function(t){e.cleanup(),e.getSvgString().then(function(i){var a=new Blob([i],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(a))})})}},{key:"dataURI",value:function(e){var t=this;return new Promise(function(i){var a=t.w,s=e?e.scale||e.width/a.globals.svgWidth:1;t.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n=a.config.chart.background!=="transparent"&&a.config.chart.background?a.config.chart.background:"#fff",l=r.getContext("2d");l.fillStyle=n,l.fillRect(0,0,r.width*s,r.height*s),t.getSvgString().then(function(h){var d="data:image/svg+xml,"+encodeURIComponent(h),c=new Image;c.crossOrigin="anonymous",c.onload=function(){if(l.drawImage(c,0,0),r.msToBlob){var u=r.msToBlob();i({blob:u})}else{var g=r.toDataURL("image/png");i({imgURI:g})}},c.src=d})})}},{key:"exportToSVG",value:function(){var e=this;this.svgUrl().then(function(t){e.triggerDownload(t,e.w.config.chart.toolbar.export.svg.filename,".svg")})}},{key:"exportToPng",value:function(){var e=this,t=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=t?{scale:t}:i?{width:i}:void 0;this.dataURI(a).then(function(s){var r=s.imgURI,n=s.blob;n?navigator.msSaveOrOpenBlob(n,e.w.globals.chartID+".png"):e.triggerDownload(r,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,a=e.fileName,s=e.columnDelimiter,r=s===void 0?",":s,n=e.lineDelimiter,l=n===void 0?` `:n,h=this.w;i||(i=h.config.series);var d=[],c=[],u="",g=h.globals.series.map(function(y,C){return h.globals.collapsedSeriesIndices.indexOf(C)===-1?y:[]}),f=function(y){return typeof h.config.chart.toolbar.export.csv.categoryFormatter=="function"?h.config.chart.toolbar.export.csv.categoryFormatter(y):h.config.xaxis.type==="datetime"&&String(y).length>=10?new Date(y).toDateString():L.isNumber(y)?y:y.split(r).join("")},p=function(y){return typeof h.config.chart.toolbar.export.csv.valueFormatter=="function"?h.config.chart.toolbar.export.csv.valueFormatter(y):y},x=Math.max.apply(Math,ce(i.map(function(y){return y.data?y.data.length:0}))),b=new Gi(this.ctx),m=new Ne(this.ctx),v=function(y){var C="";if(h.globals.axisCharts){if(h.config.xaxis.type==="category"||h.config.xaxis.convertedCatToNumeric)if(h.globals.isBarHorizontal){var w=h.globals.yLabelFormatters[0],A=new Le(t.ctx).getActiveConfigSeriesIndex();C=w(h.globals.labels[y],{seriesIndex:A,dataPointIndex:y,w:h})}else C=m.getLabel(h.globals.labels,h.globals.timescaleLabels,0,y).text;h.config.xaxis.type==="datetime"&&(h.config.xaxis.categories.length?C=h.config.xaxis.categories[y]:h.config.labels.length&&(C=h.config.labels[y]))}else C=h.config.labels[y];return C===null?"nullvalue":(Array.isArray(C)&&(C=C.join(" ")),L.isNumber(C)?C:C.split(r).join(""))},k=function(y,C){if(d.length&&C===0&&c.push(d.join(r)),y.data){y.data=y.data.length&&y.data||ce(Array(x)).map(function(){return""});for(var w=0;w0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],i.config.xaxis.position==="top"?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=i.config.chart.type==="bar"&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return O(o,[{key:"drawXaxis",value:function(){var e=this.w,t=new X(this.ctx),i=t.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),a=t.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&arguments[6]!==void 0?arguments[6]:{},d=[],c=[],u=this.w,g=h.xaxisFontSize||this.xaxisFontSize,f=h.xaxisFontFamily||this.xaxisFontFamily,p=h.xaxisForeColors||this.xaxisForeColors,x=h.fontWeight||u.config.xaxis.labels.style.fontWeight,b=h.cssClass||u.config.xaxis.labels.style.cssClass,m=u.globals.padHorizontal,v=a.length,k=u.config.xaxis.type==="category"?u.globals.dataPoints:v;if(k===0&&v>k&&(k=v),s){var y=Math.max(Number(u.config.xaxis.tickAmount)||1,k>1?k-1:k);n=u.globals.gridWidth/Math.min(y,v-1),m=m+r(0,n)/2+u.config.xaxis.labels.offsetX}else n=u.globals.gridWidth/k,m=m+r(0,n)+u.config.xaxis.labels.offsetX;for(var C=function(A){var S=m-r(A,n)/2+u.config.xaxis.labels.offsetX;A===0&&v===1&&n/2===m&&k===1&&(S=u.globals.gridWidth/2);var M=l.axesUtils.getLabel(a,u.globals.timescaleLabels,S,A,d,g,e),P=28;if(u.globals.rotateXLabels&&e&&(P=22),u.config.xaxis.title.text&&u.config.xaxis.position==="top"&&(P+=parseFloat(u.config.xaxis.title.style.fontSize)+2),e||(P=P+parseFloat(g)+(u.globals.xAxisLabelsHeight-u.globals.xAxisGroupLabelsHeight)+(u.globals.rotateXLabels?10:0)),M=u.config.xaxis.tickAmount!==void 0&&u.config.xaxis.tickAmount!=="dataPoints"&&u.config.xaxis.type!=="datetime"?l.axesUtils.checkLabelBasedOnTickamount(A,M,v):l.axesUtils.checkForOverflowingLabels(A,M,v,d,c),u.config.xaxis.labels.show){var I=t.drawText({x:M.x,y:l.offY+u.config.xaxis.labels.offsetY+P-(u.config.xaxis.position==="top"?u.globals.xAxisHeight+u.config.xaxis.axisTicks.height-2:0),text:M.text,textAnchor:"middle",fontWeight:M.isBold?600:x,fontSize:g,fontFamily:f,foreColor:Array.isArray(p)?e&&u.config.xaxis.convertedCatToNumeric?p[u.globals.minX+A-1]:p[A]:p,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(i.add(I),I.on("click",function(z){if(typeof u.config.chart.events.xAxisLabelClick=="function"){var E=Object.assign({},u,{labelIndex:A});u.config.chart.events.xAxisLabelClick(z,l.ctx,E)}}),e){var T=document.createElementNS(u.globals.SVGNS,"title");T.textContent=Array.isArray(M.text)?M.text.join(" "):M.text,I.node.appendChild(T),M.text!==""&&(d.push(M.text),c.push(M))}}Aa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(t=t+r+a.config.xaxis.axisTicks.height,a.config.xaxis.position==="top"&&(t=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new X(this.ctx).drawLine(e+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,t+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],i=this.xaxisLabels.length,a=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var s=0;s0){var d=s[s.length-1].getBBox(),c=s[0].getBBox();d.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var u=0;u0&&(this.xaxisLabels=t.globals.timescaleLabels.slice())}return O(o,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=this.w,i=new X(this.ctx);e||(e=i.group({class:"apexcharts-grid"}));var a=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),s=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(s),e.add(a),e}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var e=this.renderGrid();return this.drawGridArea(e.el),e}return null}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new X(this.ctx),a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,ce(e.config.stroke.width)):e.config.stroke.width,s=function(d){var c=document.createElementNS(t.SVGNS,"clipPath");return c.setAttribute("id",d),c};t.dom.elGridRectMask=s("gridRectMask".concat(t.cuid)),t.dom.elGridRectBarMask=s("gridRectBarMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=s("forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=s("nonForecastMask".concat(t.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(e.config.chart.type)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(r=Math.max(e.config.grid.padding.left,t.barPadForNumericAxis),n=Math.max(e.config.grid.padding.right,t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(0,0,t.gridWidth,t.gridHeight,0,"#fff"),t.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,t.gridWidth+a+n+r+4,t.gridHeight+a+4,0,"#fff");var l=e.globals.markers.largestSize;t.dom.elGridRectMarker=i.drawRect(-l,-l,t.gridWidth+2*l,t.gridHeight+2*l,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);var h=t.dom.baseEl.querySelector("defs");h.appendChild(t.dom.elGridRectMask),h.appendChild(t.dom.elGridRectBarMask),h.appendChild(t.dom.elGridRectMarkerMask),h.appendChild(t.dom.elForecastMask),h.appendChild(t.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,a=e.y1,s=e.x2,r=e.y2,n=e.xCount,l=e.parent,h=this.w;if(!(t===0&&h.globals.skipFirstTimelinelabel||t===n-1&&h.globals.skipLastTimelinelabel&&!h.config.xaxis.labels.formatter||h.config.chart.type==="radar")){h.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:l});var d=0;if(h.globals.hasXaxisGroups&&h.config.xaxis.tickPlacement==="between"){var c=h.globals.groups;if(c){for(var u=0,g=0;u0&&e.config.xaxis.type!=="datetime"&&(s=t.yAxisScale[a].result.length-1)),this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=t.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:t.gridWidth/s}}},{key:"drawGridBands",value:function(e,t){var i,a,s=this,r=this.w;if(((i=r.config.grid.row.colors)===null||i===void 0?void 0:i.length)>0&&function(f,p,x,b,m,v){for(var k=0,y=0;k=r.config.grid[f].colors.length&&(y=0),s._drawGridBandRect({c:y,x1:x,y1:b,x2:m,y2:v,type:f}),b+=r.globals.gridHeight/t}("row",t,0,0,r.globals.gridWidth,r.globals.gridHeight/t),((a=r.config.grid.column.colors)===null||a===void 0?void 0:a.length)>0){var n=r.globals.isBarHorizontal||r.config.xaxis.tickPlacement!=="on"||r.config.xaxis.type!=="category"&&!r.config.xaxis.convertedCatToNumeric?e:e-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var l=r.globals.padHorizontal,h=r.globals.padHorizontal+r.globals.gridWidth/n,d=r.globals.gridHeight,c=0,u=0;c=r.config.grid.column.colors.length&&(u=0),r.config.xaxis.type==="datetime"&&(l=this.xaxisLabels[c].position,h=(((g=this.xaxisLabels[c+1])===null||g===void 0?void 0:g.position)||r.globals.gridWidth)-this.xaxisLabels[c].position),this._drawGridBandRect({c:u,x1:l,y1:0,x2:h,y2:d,type:"column"}),l+=r.globals.gridWidth/n}}}}]),o}(),as=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.coreUtils=new he(this.ctx)}return O(o,[{key:"niceScale",value:function(e,t){var i,a,s,r,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,l=1e-11,h=this.w,d=h.globals;d.isBarHorizontal?(i=h.config.xaxis,a=Math.max((d.svgWidth-100)/25,2)):(i=h.config.yaxis[n],a=Math.max((d.svgHeight-100)/15,2)),L.isNumber(a)||(a=10),s=i.min!==void 0&&i.min!==null,r=i.max!==void 0&&i.min!==null;var c=i.stepSize!==void 0&&i.stepSize!==null,u=i.tickAmount!==void 0&&i.tickAmount!==null,g=u?i.tickAmount:d.niceScaleDefaultTicks[Math.min(Math.round(a/2),d.niceScaleDefaultTicks.length-1)];if(d.isMultipleYAxis&&!u&&d.multiAxisTickAmount>0&&(g=d.multiAxisTickAmount,u=!0),g=g==="dataPoints"?d.dataPoints-1:Math.abs(Math.round(g)),(e===Number.MIN_VALUE&&t===0||!L.isNumber(e)&&!L.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=L.isNumber(i.min)?i.min:0,t=L.isNumber(i.max)?i.max:e+g,d.allSeriesCollapsed=!1),e>t){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var f=t;t=e,e=f}else e===t&&(e=e===0?0:e-1,t=t===0?2:t+1);var p=[];g<1&&(g=1);var x=g,b=Math.abs(t-e);!s&&e>0&&e/b<.15&&(e=0,s=!0),!r&&t<0&&-t/b<.15&&(t=0,r=!0);var m=(b=Math.abs(t-e))/x,v=m,k=Math.floor(Math.log10(v)),y=Math.pow(10,k),C=Math.ceil(v/y);if(m=v=(C=d.niceScaleAllowedMagMsd[d.yValueDecimal===0?0:1][C])*y,d.isBarHorizontal&&i.stepSize&&i.type!=="datetime"?(m=i.stepSize,c=!0):c&&(m=i.stepSize),c&&i.forceNiceScale){var w=Math.floor(Math.log10(m));m*=Math.pow(10,k-w)}if(s&&r){var A=b/x;if(u)if(c)if(L.mod(b,m)!=0){var S=L.getGCD(m,A);m=A/S<10?S:A}else L.mod(m,A)==0?m=A:(A=m,u=!1);else m=A;else if(c)L.mod(b,m)==0?A=m:m=A;else if(L.mod(b,m)==0)A=m;else{A=b/(x=Math.ceil(b/m));var M=L.getGCD(b,m);b/Ma&&(e=t-m*g,e+=m*Math.floor((P-e)/m))}else if(s)if(u)t=e+m*x;else{var I=t;t=m*Math.ceil(t/m),Math.abs(t-e)/L.getGCD(b,m)>a&&(t=e+m*g,t+=m*Math.ceil((I-t)/m))}}else if(d.isMultipleYAxis&&u){var T=m*Math.floor(e/m),z=T+m*x;z0&&e16&&L.getPrimeFactors(x).length<2&&x++,!u&&i.forceNiceScale&&d.yValueDecimal===0&&x>b&&(x=b,m=Math.round(b/x)),x>a&&(!u&&!c||i.forceNiceScale)){var E=L.getPrimeFactors(x),Y=E.length-1,F=x;e:for(var W=0;Wpe);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,r=Math.abs(t-e),n=[];if(e===t)return{result:n=[e],niceMin:n[0],niceMax:n[n.length-1]};(i=this._adjustTicksForSmallRange(i,a,r))==="dataPoints"&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var l=e;i>=0;)n.push(l),l=L.preciseAddition(l,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(e,t,i){t<=0&&(t=Math.max(e,i)),e<=0&&(e=Math.min(t,i));for(var a=[],s=Math.ceil(Math.log(t)/Math.log(i)+1),r=Math.floor(Math.log(e)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=r.forceNiceScale?this.logarithmicScaleNice(t,i,r.logBase):this.logarithmicScale(t,i,r.logBase)):i!==-Number.MAX_VALUE&&L.isNumber(i)&&t!==Number.MAX_VALUE&&L.isNumber(t)?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=this.niceScale(t,i,e)):a.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,t){var i=this.w,a=i.globals,s=Math.abs(t-e);if(t!==-Number.MAX_VALUE&&L.isNumber(t)){var r=a.xTickAmount;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(e,t,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var e=this,t=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach(function(n,l){var h=[];n.forEach(function(d){var c=t.series[d].group;h.indexOf(c)<0&&h.push(c)}),n.length>0?function(){var d,c,u=Number.MAX_VALUE,g=-Number.MAX_VALUE,f=u,p=g;if(t.chart.stacked)(function(){var m=new Array(i.dataPoints).fill(0),v=[],k=[],y=[];h.forEach(function(){v.push(m.map(function(){return Number.MIN_VALUE})),k.push(m.map(function(){return Number.MIN_VALUE})),y.push(m.map(function(){return Number.MIN_VALUE}))});for(var C=function(A){!d&&t.series[n[A]].type&&(d=t.series[n[A]].type);var S=n[A];c=t.series[S].group?t.series[S].group:"axis-".concat(l),!(i.collapsedSeriesIndices.indexOf(S)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(S)<0)||(i.allSeriesCollapsed=!1,h.forEach(function(M,P){if(t.series[S].group===M)for(var I=0;I=0?k[P][I]+=T:y[P][I]+=T,v[P][I]+=T,f=Math.min(f,T),p=Math.max(p,T)}})),d!=="bar"&&d!=="column"||i.barGroups.push(c)},w=0;w1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,l=Number.MIN_VALUE;a===null&&(a=e+1);var h=r.series,d=h,c=h;s.chart.type==="candlestick"?(d=r.seriesCandleL,c=r.seriesCandleH):s.chart.type==="boxPlot"?(d=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(d=r.seriesRangeStart,c=r.seriesRangeEnd);var u=!1;if(r.seriesX.length>=a){var g,f=(g=r.brushSource)===null||g===void 0?void 0:g.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||f!=null&&f.enabled&&f!=null&&f.autoScaleYaxis)&&(u=!0)}for(var p=e;pb&&r.seriesX[p][m]>s.xaxis.max;m--);}for(var v=b;v<=m&&vd[p][v]&&d[p][v]<0&&(l=d[p][v])}else r.hasNullValues=!0}x!=="bar"&&x!=="column"||(l<0&&n<0&&(n=0,i=Math.max(i,0)),l===Number.MIN_VALUE&&(l=0,t=Math.min(t,0)))}return s.chart.type==="rangeBar"&&r.seriesRangeStart.length&&r.isBarHorizontal&&(l=t),s.chart.type==="bar"&&(l<0&&n<0&&(n=0),l===Number.MIN_VALUE&&(l=0)),{minY:l,maxY:n,lowestY:t,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(e.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;se.dataPoints&&e.dataPoints!==0&&(a=e.dataPoints-1);else if(t.xaxis.tickAmount==="dataPoints"){if(e.series.length>1&&(a=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var s=e.maxX-e.minX;s<30&&(a=s-1)}}else a=t.xaxis.tickAmount;if(e.xTickAmount=a,t.xaxis.max!==void 0&&typeof t.xaxis.max=="number"&&(e.maxX=t.xaxis.max),t.xaxis.min!==void 0&&typeof t.xaxis.min=="number"&&(e.minX=t.xaxis.min),t.xaxis.range!==void 0&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var r=[],n=e.minX-1;n0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,a-1,0,t.xaxis.stepSize),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ){for(var t=0;t0){var n=s-a[r-1];n>0&&(e.minXDiff=Math.min(n,e.minXDiff))}}),e.dataPoints!==1&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}})}},{key:"_setStackedMinMax",value:function(){var e=this,t=this.w.globals;if(t.series.length){var i=t.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map(function(r){return r})]);var a={},s={};i.forEach(function(r){a[r]=[],s[r]=[],e.w.config.series.map(function(n,l){return r.indexOf(t.seriesNames[l])>-1?l:null}).filter(function(n){return n!==null}).forEach(function(n){for(var l=0;l0?a[r][l]+=parseFloat(t.series[n][l])+1e-4:s[r][l]+=parseFloat(t.series[n][l]))}})}),Object.entries(a).forEach(function(r){var n=Sa(r,1)[0];a[n].forEach(function(l,h){t.maxY=Math.max(t.maxY,a[n][h]),t.minY=Math.min(t.minY,s[n][h])})})}}}]),o}(),ji=function(){function o(e,t){H(this,o),this.ctx=e,this.elgrid=t,this.w=e.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=i.config.chart.type==="bar"&&i.config.plotOptions.bar.horizontal,this.xAxisoffX=i.config.xaxis.position==="bottom"?i.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ne(e)}return O(o,[{key:"drawYaxis",value:function(e){var t=this.w,i=new X(this.ctx),a=t.config.yaxis[e].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,l=i.group({class:"apexcharts-yaxis",rel:e,transform:"translate(".concat(t.globals.translateYAxisX[e],", 0)")});if(this.axesUtils.isYAxisHidden(e))return l;var h=i.group({class:"apexcharts-yaxis-texts-g"});l.add(h);var d=t.globals.yAxisScale[e].result.length-1,c=t.globals.gridHeight/d,u=t.globals.yLabelFormatters[e],g=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice());if(t.config.yaxis[e].labels.show){var f=t.globals.translateY+t.config.yaxis[e].labels.offsetY;t.globals.isBarHorizontal?f=0:t.config.chart.type==="heatmap"&&(f-=c/2),f+=parseInt(s,10)/3;for(var p=d;p>=0;p--){var x=u(g[p],p,t),b=t.config.yaxis[e].labels.padding;t.config.yaxis[e].opposite&&t.config.yaxis.length!==0&&(b*=-1);var m=this.getTextAnchor(t.config.yaxis[e].labels.align,t.config.yaxis[e].opposite),v=this.axesUtils.getYAxisForeColor(a.colors,e),k=Array.isArray(v)?v[p]:v,y=L.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(w){return w.textContent}),C=i.drawText({x:b,y:f,text:y.includes(x)&&!t.config.yaxis[e].labels.showDuplicates?"":x,textAnchor:m,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:t.config.yaxis[e].labels.maxWidth,foreColor:k,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});h.add(C),this.addTooltip(C,x),t.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(i,C,firstLabel,t.config.yaxis[e].labels.rotate),f+=c}}return this.addYAxisTitle(i,l,e),this.addAxisBorder(i,l,e,d,c),l}},{key:"getTextAnchor",value:function(e,t){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":t?"start":"end"}},{key:"addTooltip",value:function(e,t){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(t)?t.join(" "):t,e.node.appendChild(i)}},{key:"rotateLabel",value:function(e,t,i,a){var s=e.rotateAroundCenter(i.node),r=e.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(e,t,i){var a=this.w;if(a.config.yaxis[i].title.text!==void 0){var s=e.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=e.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),t.add(s)}}},{key:"addAxisBorder",value:function(e,t,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,l=31+n.offsetX;if(r.config.yaxis[i].opposite&&(l=-31-n.offsetX),n.show){var h=e.drawLine(l,r.globals.translateY+n.offsetY-2,l,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);t.add(h)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(l,a,n,r.config.yaxis[i].axisTicks,i,s,t)}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new X(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});a.add(s);var r=t.globals.yAxisScale[e].result.length-1,n=t.globals.gridWidth/r+.1,l=n+t.config.xaxis.labels.offsetX,h=t.globals.xLabelFormatter,d=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice()),c=t.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(d=c.slice()).length),t.config.xaxis.labels.show)for(var u=c.length?0:r;c.length?u=0;c.length?u++:u--){var g=h(d[u],u,t),f=t.globals.gridWidth+t.globals.padHorizontal-(l-n+t.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(d,c,f,u,this.drawnLabels,this.xaxisFontSize);f=p.x,g=p.text,this.drawnLabels.push(p.text),u===0&&t.globals.skipFirstTimelinelabel&&(g=""),u===d.length-1&&t.globals.skipLastTimelinelabel&&(g="")}var x=i.drawText({x:f,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-(t.config.xaxis.position==="top"?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:g,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(t.config.xaxis.labels.style.cssClass)});s.add(x),x.tspan(g),this.addTooltip(x,g),l+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new X(this.ctx),a=t.config.xaxis.axisBorder;if(a.show){var s=0;t.config.chart.type==="bar"&&t.globals.isXNumeric&&(s-=15);var r=i.drawLine(t.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):e.add(r)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new X(this.ctx);if(t.config.xaxis.title.text!==void 0){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(t.config.xaxis.title.style.cssClass)});a.add(s),e.add(a)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,a=new X(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text")),l=n?n.getBoundingClientRect():{width:0,height:0};if(n){var h=this.xPaddingForYAxisTitle(e,r,l,t);n.setAttribute("x",h.xPos-(t?10:0));var d=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(t?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(d.x," ").concat(d.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,i,a){var s=this.w,r=0,n=10;return s.config.yaxis[e].title.text===void 0||e<0?{xPos:r,padd:0}:(a?r=t.width+s.config.yaxis[e].title.offsetX+i.width/2+n/2:(r=-1*t.width+s.config.yaxis[e].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*t.width-s.config.yaxis[e].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach(function(l,h){var d=i.globals.ignoreYAxisIndexes.includes(h)||!l.show||l.floating||e[h].width===0,c=e[h].width+t[h].width;l.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[h]=s-l.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,d||(n+=c+20),i.globals.translateYAxisX[h]=s-l.labels.offsetX+20):(a=i.globals.translateX-r,d||(r+=c+20),i.globals.translateYAxisX[h]=a+l.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w;L.listToArray(e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach(function(t,i){var a=e.config.yaxis[i];if(a&&!a.floating&&a.labels.align!==void 0){var s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=L.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach(function(l){l.setAttribute("text-anchor",a.labels.align)}),a.labels.align!=="left"||a.opposite?a.labels.align==="center"?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):a.labels.align==="right"&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}})}}]),o}(),or=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.documentEvent=L.bind(this.documentEvent,this)}return O(o,[{key:"addEventListener",value:function(e,t){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(t):i.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var a=i.globals.events[e].indexOf(t);a!==-1&&i.globals.events[e].splice(a,1)}}},{key:"fireEvent",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var a=i.globals.events[e],s=a.length,r=0;r0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter(function(s){return s.name===e})[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=L.extend(Qa,i);this.w.globals.locale=a.options}}]),o}(),hr=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"drawAxis",value:function(e,t){var i,a,s=this,r=this.w.globals,n=this.w.config,l=new kt(this.ctx,t),h=new ji(this.ctx,t);r.axisCharts&&e!=="radar"&&(r.isBarHorizontal?(a=h.drawYaxisInversed(0),i=l.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=l.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map(function(d,c){if(r.ignoreYAxisIndexes.indexOf(c)===-1&&(a=h.drawYaxis(c),r.dom.Paper.add(a),s.w.config.grid.position==="back")){var u=r.dom.Paper.children()[1];u.remove(),r.dom.Paper.add(u)}})))}}]),o}(),Si=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new X(this.ctx),i=new ue(this.ctx),a=e.config.xaxis.crosshairs.fill.gradient,s=e.config.xaxis.crosshairs.dropShadow,r=e.config.xaxis.crosshairs.fill.type,n=a.colorFrom,l=a.colorTo,h=a.opacityFrom,d=a.opacityTo,c=a.stops,u=s.enabled,g=s.left,f=s.top,p=s.blur,x=s.color,b=s.opacity,m=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){r==="gradient"&&(m=t.drawGradient("vertical",n,l,h,d,null,c,null));var v=t.drawRect();e.config.xaxis.crosshairs.width===1&&(v=t.drawLine());var k=e.globals.gridHeight;(!L.isNumber(k)||k<0)&&(k=0);var y=e.config.xaxis.crosshairs.width;(!L.isNumber(y)||y<0)&&(y=0),v.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:k,width:y,height:k,fill:m,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),u&&(v=i.dropShadow(v,{left:g,top:f,blur:p,color:x,opacity:b})),e.globals.dom.elGraphical.add(v)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new X(this.ctx),i=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var s=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(s)}var r=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(r)}}]),o}(),cr=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,a=i.config;if(a.responsive.length!==0){var s=a.responsive.slice();s.sort(function(h,d){return h.breakpoint>d.breakpoint?1:d.breakpoint>h.breakpoint?-1:0}).reverse();var r=new wt({}),n=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=s[0].breakpoint,c=window.innerWidth>0?window.innerWidth:screen.width;if(c>d){var u=L.clone(i.globals.initialConfig);u.series=L.clone(i.config.series);var g=he.extendArrayProps(r,u,i);h=L.extend(g,h),h=L.extend(i.config,h),t.overrideResponsiveOptions(h)}else for(var f=0;f0&&typeof e[0]=="function"?(this.isColorFn=!0,i.config.series.map(function(a,s){var r=e[s]||e[0];return typeof r=="function"?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:t.w}):r})):e:this.predefined()}},{key:"applySeriesColors",value:function(e,t){e.forEach(function(i,a){i&&(t[a]=i)})}},{key:"getMonochromeColors",value:function(e,t,i){var a=e.color,s=e.shadeIntensity,r=e.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?t[0].length*t.length:t.length,l=1/(n/s),h=0;return Array.from({length:n},function(){var d=r==="dark"?i.shadeColor(-1*h,a):i.shadeColor(h,a);return h+=l,d})}},{key:"applyColorTypes",value:function(e,t){var i=this,a=this.w;e.forEach(function(s){a.globals[s].colors=a.config[s].colors===void 0?i.isColorFn?a.config.colors:t:a.config[s].colors.slice(),i.pushExtraColors(a.globals[s].colors)})}},{key:"applyDataLabelsColors",value:function(e){var t=this.w;t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors===void 0?e:t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#424242":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(e){var t=this.w;t.globals.markers.colors=t.config.markers.colors===void 0?e:t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.w,s=t||a.globals.series.length;if(i===null&&(i=this.isBarDistributed||this.isHeatmapDistributed||a.config.chart.type==="heatmap"&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),e.lengthe.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var e=this,t=this.w,i=[];t.config.series.forEach(function(l,h){l.data.forEach(function(d,c){var u;u=t.globals.series[h][c],a=t.config.dataLabels.formatter(u,{ctx:e.dCtx.ctx,seriesIndex:h,dataPointIndex:c,w:t}),i.push(a)})});var a=L.getLargestStringFromArr(i),s=new X(this.dCtx.ctx),r=t.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(e,t){var i=e;if(this.w.globals.isMultiLineX){var a=t.map(function(r,n){return Array.isArray(r)?r.length:1}),s=Math.max.apply(Math,ce(a));i=t[a.indexOf(s)]}return i}}]),o}(),pr=function(){function o(e){H(this,o),this.w=e.w,this.dCtx=e}return O(o,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,i=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&i.length===0&&(i=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();e={width:a.width,height:a.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=t.config.legend.position!=="left"&&t.config.legend.position!=="right"||t.config.legend.floating?0:this.dCtx.lgRect.width;var s=t.globals.xLabelFormatter,r=L.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);t.globals.isBarHorizontal&&(n=r=t.globals.yAxisScale[0].result.reduce(function(f,p){return f.length>p.length?f:p},0));var l=new Pt(this.dCtx.ctx),h=r;r=l.xLabelFormat(s,r,h,{i:void 0,dateFormatter:new de(this.dCtx.ctx).formatDate,w:t}),n=l.xLabelFormat(s,n,h,{i:void 0,dateFormatter:new de(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&r===void 0||String(r).trim()==="")&&(n=r="1");var d=new X(this.dCtx.ctx),c=d.getTextRects(r,t.config.xaxis.labels.style.fontSize),u=c;if(r!==n&&(u=d.getTextRects(n,t.config.xaxis.labels.style.fontSize)),(e={width:c.width>=u.width?c.width:u.width,height:c.height>=u.height?c.height:u.height}).width*i.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.globals.rotateXLabels=!0;var g=function(f){return d.getTextRects(f,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};c=g(r),r!==n&&(u=g(n)),e.height=(c.height>u.height?c.height:u.height)/1.5,e.width=c.width>u.width?c.width:u.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,t=this.w;if(!t.globals.hasXaxisGroups)return{width:0,height:0};var i,a=((e=t.config.xaxis.group.style)===null||e===void 0?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,s=t.globals.groups.map(function(c){return c.title}),r=L.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),l=new X(this.dCtx.ctx),h=l.getTextRects(r,a),d=h;return r!==n&&(d=l.getTextRects(n,a)),i={width:h.width>=d.width?h.width:d.width,height:h.height>=d.height?h.height:d.height},t.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,i=0;if(e.config.xaxis.title.text!==void 0){var a=new X(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=a.width,i=a.height}return{width:t,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map(function(s){return s.value}),a=i.reduce(function(s,r){return s===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):s.length>r.length?s:r},0);return 1.05*(e=new X(this.dCtx.ctx).getTextRects(a,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&t.config.xaxis.labels.rotate!==0&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=e.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var l=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,h=function(d,c){s.yaxis.length>1&&function(u){return a.collapsedSeriesIndices.indexOf(u)!==-1}(c)||function(u){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var g=t.dCtx.timescaleLabels[0],f=t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+n/1.75-t.dCtx.yAxisWidthRight,p=g.position-n/1.75+t.dCtx.yAxisWidthLeft,x=i.config.legend.position==="right"&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0;f>a.svgWidth-a.translateX-x&&(a.skipLastTimelinelabel=!0),p<-(u.show&&!u.floating||s.chart.type!=="bar"&&s.chart.type!=="candlestick"&&s.chart.type!=="rangeBar"&&s.chart.type!=="boxPlot"?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else r==="datetime"?t.dCtx.gridPad.right((w=String(c(y,l)))===null||w===void 0?void 0:w.length)?k:y},u),f=g=c(g,l);if(g!==void 0&&g.length!==0||(g=h.niceMax),t.globals.isBarHorizontal){a=0;var p=t.globals.labels.slice();g=L.getLargestStringFromArr(p),g=c(g,{seriesIndex:n,dataPointIndex:-1,w:t}),f=e.dCtx.dimHelpers.getLargestStringFromMultiArr(g,p)}var x=new X(e.dCtx.ctx),b="rotate(".concat(r.labels.rotate," 0 0)"),m=x.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1),v=m;g!==f&&(v=x.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1)),i.push({width:(d>v.width||d>m.width?d:v.width>m.width?v.width:m.width)+a,height:v.height>m.height?v.height:m.height})}else i.push({width:0,height:0})}),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,t=this.w,i=[];return t.config.yaxis.map(function(a,s){if(a.show&&a.title.text!==void 0){var r=new X(e.dCtx.ctx),n="rotate(".concat(a.title.rotate," 0 0)"),l=r.getTextRects(a.title.text,a.title.style.fontSize,a.title.style.fontFamily,n,!1);i.push({width:l.width,height:l.height})}else i.push({width:0,height:0})}),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,i=0,a=0,s=e.globals.yAxisScale.length>1?10:0,r=new Ne(this.dCtx.ctx),n=function(l,h){var d=e.config.yaxis[h].floating,c=0;l.width>0&&!d?(c=l.width+s,function(u){return e.globals.ignoreYAxisIndexes.indexOf(u)>-1}(h)&&(c=c-l.width-s)):c=d||r.isYAxisHidden(h)?0:5,e.config.yaxis[h].opposite?a+=c:i+=c,t+=c};return e.globals.yLabelsCoords.map(function(l,h){n(l,h)}),e.globals.yTitleCoords.map(function(l,h){n(l,h)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,t}}]),o}(),xr=function(){function o(e){H(this,o),this.w=e.w,this.dCtx=e}return O(o,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w,i=t.config,a=t.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(g){return["bar","rangeBar","candlestick","boxPlot"].includes(g)},r=i.chart.type,n=0,l=s(r)?i.series.length:1;a.comboBarCount>0&&(l=a.comboBarCount),a.collapsedSeries.forEach(function(g){s(g.type)&&(l-=1)}),i.chart.stacked&&(l=1);var h=s(r)||a.comboBarCount>0,d=Math.abs(a.initialMaxX-a.initialMinX);if(h&&a.isXNumeric&&!a.isBarHorizontal&&l>0&&d!==0){d<=3&&(d=a.dataPoints);var c=d/e,u=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;u>e/2&&(u/=2),(n=u*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,i=t.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach(function(n){t.config[n].text!==void 0?a+=t.config[n].margin:a+=e.dCtx.isSparkline||!i.axisCharts?0:5}),!t.config.legend.show||t.config.legend.position!=="bottom"||t.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,a=new Ne(this.dCtx.ctx);i.config.yaxis.forEach(function(s,r){i.globals.ignoreYAxisIndexes.indexOf(r)!==-1||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=t[r].width+e[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))})}}]),o}(),Wt=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,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 gr(this),this.dimYAxis=new fr(this),this.dimXAxis=new pr(this),this.dimGrid=new xr(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return O(o,[{key:"plotCoords",value:function(){var e=this,t=this.w,i=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,ce(t.config.stroke.width)):t.config.stroke.width;this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(r){var n=Sa(r,2),l=n[0],h=n[1];e.gridPad[l]=Math.max(h,e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,i=t.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map(function(g,f){t.globals.yLabelsCoords.push({width:a[f].width,index:f}),t.globals.yTitleCoords.push({width:s[f].width,index:f})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),l=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,l,n),i.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+t.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+t.config.xaxis.labels.offsetX;var h=this.yAxisWidth,d=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-l.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;(t.config.chart.type==="radar"||this.isSparkline)&&(h=0,d=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||t.config.chart.type==="treemap")&&(h=0,d=0,c=0),this.isSparkline||t.config.chart.type==="treemap"||this.dimXAxis.additionalPaddingXLabels(r);var u=function(){i.translateX=h+e.datalabelsCoords.width,i.gridHeight=i.svgHeight-e.lgRect.height-d-(e.isSparkline||t.config.chart.type==="treemap"?0:t.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-h-2*e.datalabelsCoords.width};switch(t.config.xaxis.position==="top"&&(c=i.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":i.translateY=c,u();break;case"top":i.translateY=this.lgRect.height+c,u();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+h+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-d-12,i.gridWidth=i.svgWidth-this.lgRect.width-h-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=h+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-d-12,i.gridWidth=i.svgWidth-this.lgRect.width-h-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ji(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=e.config,a=0;e.config.legend.show&&!e.config.legend.floating&&(a=20);var s=i.chart.type==="pie"||i.chart.type==="polarArea"||i.chart.type==="donut"?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){t.gridHeight=t.svgHeight;var l=t.dom.elWrap.getBoundingClientRect().width;return t.gridWidth=Math.min(l,t.gridHeight),t.translateY=r,void(t.translateX=n+(t.svgWidth-t.gridWidth)/2)}switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height,t.gridWidth=t.svgWidth,t.translateY=r-10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+r+10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-a,t.gridHeight=i.chart.height!=="auto"?t.svgHeight:t.gridWidth,t.translateY=r,t.translateX=n+this.lgRect.width+a;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-a-5,t.gridHeight=i.chart.height!=="auto"?t.svgHeight:t.gridWidth,t.translateY=r,t.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+e.height+t.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,l=a.globals.rotateXLabels?22:10,h=a.globals.rotateXLabels&&a.config.legend.position==="bottom"?10:0;this.xAxisHeight=r*n+s*l+h,this.xAxisWidth=e.width,this.xAxisHeight-t.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),o}(),br=function(){function o(e){H(this,o),this.w=e.w,this.lgCtx=e}return O(o,[{key:"getLegendStyles",value:function(){var e,t,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=((e=this.lgCtx.ctx)===null||e===void 0||(t=e.opts)===null||t===void 0||(i=t.chart)===null||i===void 0?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode(` .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; } `);return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),t=e.width;return{clwh:e.height,clww:t}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,t){var i=this,a=this.w;if(a.globals.axisCharts||a.config.chart.type==="radialBar"){a.globals.resized=!0;var s=null,r=null;a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),t?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(function(d){i.riseCollapsedSeries(d.cs,d.csi,r)}):this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(e+1,"'] path")),l=a.config.chart.type;if(l==="pie"||l==="polarArea"||l==="donut"){var h=a.config.plotOptions.pie.donut.labels;new X(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,h)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(e){var t=e.realIndex,i=this.w,a=i.globals,s=L.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[t]],n={index:t,data:s[t].data.slice(),type:s[t].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(t)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(t));else if(a.collapsedSeriesIndices.indexOf(t)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(t);var l=a.risingSeries.indexOf(t);a.risingSeries.splice(l,1)}}else a.collapsedSeries.push({index:t,data:s[t]}),a.collapsedSeriesIndices.push(t);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(e){for(var t=e.seriesEl,i=e.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=t.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),i.legend.position==="bottom"||i.legend.position==="top"?this.legendAlignHorizontal():i.legend.position!=="right"&&i.legend.position!=="left"||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var t=e.i,i=e.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[t]);var l=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[t]):parseFloat(a.config.legend.markers.size),h=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[t]):parseFloat(a.config.legend.markers.offsetX),d=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[t]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[t]):parseFloat(a.config.legend.markers.strokeWidth),u=s.style;if(u.height=2*(l+c)+"px",u.width=2*(l+c)+"px",u.left=h+"px",u.top=d+"px",a.config.legend.markers.customHTML)u.background="transparent",u.color=i[t],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[t]&&(s.innerHTML=a.config.legend.markers.customHTML[t]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new ct(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:t,strokeWidth:c,size:l}),f=window.SVG().addTo(s).size("100%","100%"),p=new X(this.ctx).drawMarker(0,0,R(R({},g),{},{pointFillColor:Array.isArray(i)?i[t]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(function(x){x.node.classList.contains("apexcharts-marker-triangle")?x.node.style.transform="translate(50%, 45%)":x.node.style.transform="translate(50%, 50%)"}),f.add(p)}return s}},{key:"drawLegends",value:function(){var e=this,t=this,i=this.w,a=i.config.legend.fontFamily,s=i.globals.seriesNames,r=i.config.legend.markers.fillColors?i.config.legend.markers.fillColors.slice():i.globals.colors.slice();if(i.config.chart.type==="heatmap"){var n=i.config.plotOptions.heatmap.colorScale.ranges;s=n.map(function(g){return g.name?g.name:g.from+" - "+g.to}),r=n.map(function(g){return g.color})}else this.isBarsDistributed&&(s=i.globals.labels.slice());i.config.legend.customLegendItems.length&&(s=i.config.legend.customLegendItems);var l=i.globals.legendFormatter,h=i.config.legend.inverseOrder,d=[];i.globals.seriesGroups.length>1&&i.config.legend.clusterGroupedSeries&&i.globals.seriesGroups.forEach(function(g,f){d[f]=document.createElement("div"),d[f].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(f)),i.config.legend.clusterGroupedSeriesOrientation==="horizontal"?i.globals.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):d[f].classList.add("apexcharts-legend-group-vertical")});for(var c=function(g){var f,p=l(s[g],{seriesIndex:g,w:i}),x=!1,b=!1;if(i.globals.collapsedSeries.length>0)for(var m=0;m0)for(var v=0;v=0:u<=s.length-1;h?u--:u++)c(u);i.globals.dom.elWrap.addEventListener("click",t.onLegendClick,!0),i.config.legend.onItemHover.highlightDataSeries&&i.config.legend.customLegendItems.length===0&&(i.globals.dom.elWrap.addEventListener("mousemove",t.onLegendHovered,!0),i.globals.dom.elWrap.addEventListener("mouseout",t.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,t){var i=this.w,a=i.globals.dom.elLegendWrap,s=a.clientHeight,r=0,n=0;if(i.config.legend.position==="bottom")n=i.globals.svgHeight-Math.min(s,i.globals.svgHeight/2)-5;else if(i.config.legend.position==="top"){var l=new Wt(this.ctx),h=l.dimHelpers.getTitleSubtitleCoords("title").height,d=l.dimHelpers.getTitleSubtitleCoords("subtitle").height;n=(h>0?h-10:0)+(d>0?d-10:0)}a.style.position="absolute",r=r+e+i.config.legend.offsetX,n=n+t+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px",i.config.legend.position==="right"&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach(function(c){a.style[c]&&(a.style[c]=parseInt(i.config.legend[c],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var t=new Wt(this.ctx),i=t.dimHelpers.getTitleSubtitleCoords("title"),a=t.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;e.config.legend.position==="top"&&(s=i.height+a.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendDimensions(),i=0;e.config.legend.position==="left"&&(i=20),e.config.legend.position==="right"&&(i=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,i=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if(t.config.chart.type==="heatmap"||this.isBarsDistributed){if(i){var a=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Le(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new Le(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,a=e.target.getAttribute("data:collapsed")==="true",s=this.w.config.chart.events.legendClick;typeof s=="function"&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;typeof r=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),t.config.chart.type!=="treemap"&&t.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),o}(),rs=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w;var t=this.w;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}return O(o,[{key:"createToolbar",value:function(){var e=this,t=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=t.config.chart.toolbar.offsetY+"px",a.style.right=3-t.config.chart.toolbar.offsetX+"px",t.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s `),n("zoomOut",this.elZoomOut,` `);var l=function(c){e.t[c]&&t.config.chart[c].enabled&&r.push({el:c==="zoom"?e.elZoom:e.elSelection,icon:typeof e.t[c]=="string"?e.t[c]:c==="zoom"?` `:` `,title:e.localeValues[c==="zoom"?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(c,"-icon")})};l("zoom"),l("selection"),this.t.pan&&t.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:` `,title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,` `),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var h=0;hthis.wheelDelay&&(this.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){r-s.globals.lastWheelExecution>a.wheelDelay&&(a.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(i){var a,s=this.w;this.minX=s.globals.isRangeBar?s.globals.minY:s.globals.minX,this.maxX=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;var r=(a=this.gridRect)===null||a===void 0?void 0:a.getBoundingClientRect();if(r){var n,l,h,d=(i.clientX-r.left)/r.width,c=this.minX,u=this.maxX,g=u-c;if(i.deltaY<0){var f=c+d*g;l=f-(n=.5*g)/2,h=f+n/2}else l=c-(n=1.5*g)/2,h=u+n/2;if(!s.globals.isRangeBar){l=Math.max(l,s.globals.initialMinX),h=Math.min(h,s.globals.initialMaxX);var p=.01*(s.globals.initialMaxX-s.globals.initialMinX);if(h-l0&&s.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(r,n,l,h,d){return d==="l"||d==="r"?r.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):r.circle(0)},updateHandle:function(r,n){return r.center(n[0],n[1])}}).resize().on("resize",function(){var r=a.globals.zoomEnabled?a.config.chart.zoom.type:a.config.chart.selection.type;i.handleMouseUp({zoomtype:r,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var i=this.w,a=this.xyRatios;if(!i.globals.zoomEnabled){if(i.globals.selection!==void 0&&i.globals.selection!==null)this.drawSelectionRect(R(R({},i.globals.selection),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}));else if(i.config.chart.selection.xaxis.min!==void 0&&i.config.chart.selection.xaxis.max!==void 0){var s=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio,r=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-s;i.globals.isRangeBar&&(s=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/a.invertedYRatio,r=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/a.invertedYRatio);var n={x:s,y:0,width:r,height:i.globals.gridHeight,translateX:i.globals.translateX,translateY:i.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(i){var a=i.x,s=i.y,r=i.width,n=i.height,l=i.translateX,h=l===void 0?0:l,d=i.translateY,c=d===void 0?0:d,u=this.w,g=this.zoomRect,f=this.selectionRect;if(this.dragged||u.globals.selection!==null){var p={transform:"translate("+h+", "+c+")"};u.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),g.attr({x:a,y:s,width:r,height:n,fill:u.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":u.config.chart.zoom.zoomedArea.fill.opacity,stroke:u.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":u.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":u.config.chart.zoom.zoomedArea.stroke.opacity}),X.setAttrs(g.node,p)),u.globals.selectionEnabled&&(f.attr({x:a,y:s,width:r>0?r:0,height:n>0?n:0,fill:u.config.chart.selection.fill.color,"fill-opacity":u.config.chart.selection.fill.opacity,stroke:u.config.chart.selection.stroke.color,"stroke-width":u.config.chart.selection.stroke.width,"stroke-dasharray":u.config.chart.selection.stroke.dashArray,"stroke-opacity":u.config.chart.selection.stroke.opacity}),X.setAttrs(f.node,p))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var a=i.context,s=i.zoomtype,r=this.w,n=a,l=this.gridRect.getBoundingClientRect(),h=n.startX-1,d=n.startY,c=!1,u=!1,g=n.clientX-l.left-r.globals.barPadForNumericAxis,f=n.clientY-l.top,p=g-h,x=f-d,b={translateX:r.globals.translateX,translateY:r.globals.translateY};return Math.abs(p+h)>r.globals.gridWidth?p=r.globals.gridWidth-h:g<0&&(p=h),h>g&&(c=!0,p=Math.abs(p)),d>f&&(u=!0,x=Math.abs(x)),b=R(R({},b=s==="x"?{x:c?h-p:h,y:0,width:p,height:r.globals.gridHeight}:s==="y"?{x:0,y:u?d-x:d,width:r.globals.gridWidth,height:x}:{x:c?h-p:h,y:u?d-x:d,width:p,height:x}),{},{translateX:r.globals.translateX,translateY:r.globals.translateY}),n.drawSelectionRect(b),n.selectionDragging("resizing"),b}},{key:"selectionDragging",value:function(i,a){var s=this,r=this.w;if(a){a.preventDefault();var n=a.detail,l=n.handler,h=n.box,d=h.x,c=h.y;dthis.constraints.x2&&(d=this.constraints.x2-h.w),h.y2>this.constraints.y2&&(c=this.constraints.y2-h.h),l.move(d,c);var u=this.xyRatios,g=this.selectionRect,f=0;i==="resizing"&&(f=30);var p=function(b){return parseFloat(g.node.getAttribute(b))},x={x:p("x"),y:p("y"),width:p("width"),height:p("height")};r.globals.selection=x,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var b,m,v,k,y=s.gridRect.getBoundingClientRect(),C=g.node.getBoundingClientRect();r.globals.isRangeBar?(b=r.globals.yAxisScale[0].niceMin+(C.left-y.left)*u.invertedYRatio,m=r.globals.yAxisScale[0].niceMin+(C.right-y.left)*u.invertedYRatio,v=0,k=1):(b=r.globals.xAxisScale.niceMin+(C.left-y.left)*u.xRatio,m=r.globals.xAxisScale.niceMin+(C.right-y.left)*u.xRatio,v=r.globals.yAxisScale[0].niceMin+(y.bottom-C.bottom)*u.yRatio[0],k=r.globals.yAxisScale[0].niceMax-(C.top-y.top)*u.yRatio[0]);var w={xaxis:{min:b,max:m},yaxis:{min:v,max:k}};r.config.chart.events.selection(s.ctx,w),r.config.chart.brush.enabled&&r.config.chart.events.brushScrolled!==void 0&&r.config.chart.events.brushScrolled(s.ctx,w)},f))}}},{key:"selectionDrawn",value:function(i){var a=i.context,s=i.zoomtype,r=this.w,n=a,l=this.xyRatios,h=this.ctx.toolbar;if(n.startX>n.endX){var d=n.startX;n.startX=n.endX,n.endX=d}if(n.startY>n.endY){var c=n.startY;n.startY=n.endY,n.endY=c}var u=void 0,g=void 0;r.globals.isRangeBar?(u=r.globals.yAxisScale[0].niceMin+n.startX*l.invertedYRatio,g=r.globals.yAxisScale[0].niceMin+n.endX*l.invertedYRatio):(u=r.globals.xAxisScale.niceMin+n.startX*l.xRatio,g=r.globals.xAxisScale.niceMin+n.endX*l.xRatio);var f=[],p=[];if(r.config.yaxis.forEach(function(C,w){var A=r.globals.seriesYAxisMap[w][0];f.push(r.globals.yAxisScale[w].niceMax-l.yRatio[A]*n.startY),p.push(r.globals.yAxisScale[w].niceMax-l.yRatio[A]*n.endY)}),n.dragged&&(n.dragX>10||n.dragY>10)&&u!==g){if(r.globals.zoomEnabled){var x=L.clone(r.globals.initialConfig.yaxis),b=L.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(u=Math.floor(u),g=Math.floor(g),u<1&&(u=1,g=r.globals.dataPoints),g-u<2&&(g=u+1)),s!=="xy"&&s!=="x"||(b={min:u,max:g}),s!=="xy"&&s!=="y"||x.forEach(function(C,w){x[w].min=p[w],x[w].max=f[w]}),h){var m=h.getBeforeZoomRange(b,x);m&&(b=m.xaxis?m.xaxis:b,x=m.yaxis?m.yaxis:x)}var v={xaxis:b};r.config.chart.group||(v.yaxis=x),n.ctx.updateHelpers._updateOptions(v,!1,n.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed=="function"&&h.zoomCallback(b,x)}else if(r.globals.selectionEnabled){var k,y=null;k={min:u,max:g},s!=="xy"&&s!=="y"||(y=L.clone(r.config.yaxis)).forEach(function(C,w){y[w].min=p[w],y[w].max=f[w]}),r.globals.selection=n.selection,typeof r.config.chart.events.selection=="function"&&r.config.chart.events.selection(n.ctx,{xaxis:k,yaxis:y})}}}},{key:"panDragging",value:function(i){var a=i.context,s=this.w,r=a;if(s.globals.lastClientPosition.x!==void 0){var n=s.globals.lastClientPosition.x-r.clientX,l=s.globals.lastClientPosition.y-r.clientY;Math.abs(n)>Math.abs(l)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(l)&&n<0?this.moveDirection="right":Math.abs(l)>Math.abs(n)&&l>0?this.moveDirection="up":Math.abs(l)>Math.abs(n)&&l<0&&(this.moveDirection="down")}s.globals.lastClientPosition={x:r.clientX,y:r.clientY};var h=s.globals.isRangeBar?s.globals.minY:s.globals.minX,d=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;s.config.xaxis.convertedCatToNumeric||r.panScrolled(h,d)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,s=i.globals.maxX,r=(i.globals.maxX-i.globals.minX)/2;this.moveDirection==="left"?(a=i.globals.minX+r,s=i.globals.maxX+r):this.moveDirection==="right"&&(a=i.globals.minX-r,s=i.globals.maxX-r),a=Math.floor(a),s=Math.floor(s),this.updateScrolledChart({xaxis:{min:a,max:s}},a,s)}},{key:"panScrolled",value:function(i,a){var s=this.w,r=this.xyRatios,n=L.clone(s.globals.initialConfig.yaxis),l=r.xRatio,h=s.globals.minX,d=s.globals.maxX;s.globals.isRangeBar&&(l=r.invertedYRatio,h=s.globals.minY,d=s.globals.maxY),this.moveDirection==="left"?(i=h+s.globals.gridWidth/15*l,a=d+s.globals.gridWidth/15*l):this.moveDirection==="right"&&(i=h-s.globals.gridWidth/15*l,a=d-s.globals.gridWidth/15*l),s.globals.isRangeBar||(is.globals.initialMaxX)&&(i=h,a=d);var c={xaxis:{min:i,max:a}};s.config.chart.group||(c.yaxis=n),this.updateScrolledChart(c,i,a)}},{key:"updateScrolledChart",value:function(i,a,s){var r=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),typeof r.config.chart.events.scrolled=="function"&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:s}})}}]),t}(),ns=function(){function o(e){H(this,o),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return O(o,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,i=e.elGrid,a=e.clientX,s=e.clientY,r=this.w,n=i.getBoundingClientRect(),l=n.width,h=n.height,d=l/(r.globals.dataPoints-1),c=h/r.globals.dataPoints,u=this.hasBars();!r.globals.comboCharts&&!u||r.config.xaxis.convertedCatToNumeric||(d=l/r.globals.dataPoints);var g=a-n.left-r.globals.barPadForNumericAxis,f=s-n.top;g<0||f<0||g>l||f>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var p=Math.round(g/d),x=Math.floor(f/c);u&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(g/d),p-=1);var b=null,m=null,v=r.globals.seriesXvalues.map(function(A){return A.filter(function(S){return L.isNumber(S)})}),k=r.globals.seriesYvalues.map(function(A){return A.filter(function(S){return L.isNumber(S)})});if(r.globals.isXNumeric){var y=this.ttCtx.getElGrid().getBoundingClientRect(),C=g*(y.width/l),w=f*(y.height/h);b=(m=this.closestInMultiArray(C,w,v,k)).index,p=m.j,b!==null&&r.globals.hasNullValues&&(v=r.globals.seriesXvalues[b],p=(m=this.closestInArray(C,v)).j)}return r.globals.capturedSeriesIndex=b===null?-1:b,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=x:r.globals.capturedDataPointIndex=p,{capturedSeries:b,j:r.globals.isBarHorizontal?x:p,hoverX:g,hoverY:f}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map(function(r,n){return r.length>0?n:-1}),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");i=ce(i),t&&(i=i.filter(function(s){var r=Number(s.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),i.sort(function(s,r){var n=Number(s.getAttribute("data:realIndex")),l=Number(r.getAttribute("data:realIndex"));return ln?-1:0});var a=[];return i.forEach(function(s){a.push(s.querySelector(".apexcharts-marker"))}),a}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,t){var i=Number(e.getAttribute("cx")),a=Number(e.getAttribute("cy")),s=e.getAttribute("shape");return new X(this.ctx).getMarkerPath(i,a,s,t)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,i=t.config.markers.hover.size;return i===void 0&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;i.allTooltipSeriesGroups.length===0&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(M.attrs.name,""),S+="
".concat(M.val,"
")}),v.innerHTML=A+"",k.innerHTML=S+""};n?h.globals.seriesGoals[t][i]&&Array.isArray(h.globals.seriesGoals[t][i])?y():(v.innerHTML="",k.innerHTML=""):y()}else v.innerHTML="",k.innerHTML="";if(p!==null&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=h.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=p!==void 0?p:""),n&&x[0]){if(h.config.tooltip.hideEmptySeries){var C=a[t].querySelector(".apexcharts-tooltip-marker"),w=a[t].querySelector(".apexcharts-tooltip-text");parseFloat(c)==0?(C.style.display="none",w.style.display="none"):(C.style.display="block",w.style.display="block")}c==null||h.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||h.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(d.tConfig.enabledOnSeries)&&d.tConfig.enabledOnSeries.indexOf(t)===-1?x[0].parentNode.style.display="none":x[0].parentNode.style.display=h.config.tooltip.items.display}else Array.isArray(d.tConfig.enabledOnSeries)&&d.tConfig.enabledOnSeries.indexOf(t)===-1&&(x[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,t){var i=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(t));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",l=null,h=null,d={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;i===null?h=a.globals.series[t]:a.globals.isXNumeric&&a.config.chart.type!=="treemap"?(r=s[t][i],s[t].length===0&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new Gi(this.ctx).isFormatXY()?a.config.series[t].data[i]!==void 0?a.config.series[t].data[i].x:"":a.globals.labels[i]!==void 0?a.globals.labels[i]:"";var u=r;return a.globals.isXNumeric&&a.config.xaxis.type==="datetime"?r=new Pt(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,u,u,{i:void 0,dateFormatter:new de(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](u,d):a.globals.xLabelFormatter(u,d),a.config.tooltip.x.formatter!==void 0&&(r=a.globals.ttKeyFormatter(u,d)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(l=c(a.globals.seriesZ[t][i],a)),n=typeof a.config.xaxis.tooltip.formatter=="function"?a.globals.xaxisTooltipFormatter(u,d):r,{val:Array.isArray(h)?h.join(" "):h,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:l}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,s=e.y2,r=e.w,n=this.ttCtx.getElTooltip(),l=r.config.tooltip.custom;Array.isArray(l)&&l[t]&&(l=l[t]);var h=l({ctx:this.ctx,series:r.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:s,w:r});typeof h=="string"?n.innerHTML=h:(h instanceof Element||typeof h.nodeName=="string")&&(n.innerHTML="",n.appendChild(h))}}]),o}(),os=function(){function o(e){H(this,o),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return O(o,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=e-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(t!==null&&(r=a.globals.gridWidth/n*t),s===null||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var l=r;a.config.xaxis.crosshairs.width!=="tickWidth"&&a.config.xaxis.crosshairs.width!=="barWidth"||(l=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;t.ycrosshairs!==null&&X.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&X.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(i.xaxisTooltip!==null&&i.xcrosshairsWidth!==0){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;if(e-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=t.globals.translateX;var s;s=new X(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;i.yaxisTTEls===null&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=t.globals.translateY+a,r=i.yaxisTTEls[e].getBoundingClientRect().height,n=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(n-=26),s-=r/2,t.globals.ignoreYAxisIndexes.indexOf(e)===-1?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=s+"px",i.yaxisTTEls[e].style.left=n+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,l=i!==null?parseFloat(i):1,h=parseFloat(e)+l+5,d=parseFloat(t)+l/2;if(h>a.globals.gridWidth/2&&(h=h-n.ttWidth-l-10),h>a.globals.gridWidth-n.ttWidth-10&&(h=a.globals.gridWidth-n.ttWidth),h<-20&&(h=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(h=s.e.clientX-c.left)>a.globals.gridWidth/2&&(h-=s.tooltipRect.ttWidth),(d=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(d-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+d>a.globals.gridHeight&&(d=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(h)||(h+=a.globals.translateX,r.style.left=h+"px",r.style.top=d+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),r=0;r0){var f=g.getAttribute("shape"),p=h.getMarkerPath(s,r,f,1.5*c);g.setAttribute("d",p)}this.moveXCrosshairs(s),l.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,l=new Le(this.ctx),h=new X(this.ctx);t=l.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var d=i.tooltipUtil.getHoverMarkerSize(t);if(n[t]&&(s=n[t][e][0],r=n[t][e][1]),!isNaN(s)){var c=i.tooltipUtil.getAllMarkers();if(c.length)for(var u=0;u0){var m=h.getMarkerPath(s,f,x,d);c[u].setAttribute("d",m)}else c[u].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,d)}}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Le(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']"));n||typeof t!="number"||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(t,"'] path[j='").concat(e,`'], .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,`'], .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,`'], .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,"']")));var l=n?parseFloat(n.getAttribute("cx")):0,h=n?parseFloat(n.getAttribute("cy")):0,d=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),u=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!u&&(l-=s%2!=0?d/2:0),n&&u&&(l-=d/2)):i.globals.isBarHorizontal||(l=a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(l)&&(l=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?h-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?h=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:h+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(h=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(l),a.fixedTooltip||this.moveTooltip(l,h||i.globals.gridHeight)}}]),o}(),yr=function(){function o(e){H(this,o),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new os(e)}return O(o,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new X(this.ctx),i=new ct(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=ce(a),e.config.chart.stacked&&a.sort(function(c,u){return parseFloat(c.getAttribute("data:realIndex"))-parseFloat(u.getAttribute("data:realIndex"))});for(var s=0;s2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=this.w;s.config.chart.type!=="bubble"&&this.newPointSize(e,t);var r=t.getAttribute("cx"),n=t.getAttribute("cy");if(i!==null&&a!==null&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(s.config.chart.type==="radar"){var l=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,s=e,r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=t.config.markers.hover.size,l=0;l0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],i);e[t].setAttribute("d",a)}else e[t].setAttribute("d","M0,0")}}}]),o}(),wr=function(){function o(e){H(this,o),this.w=e.w;var t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.config.chart.type==="rangeBar"&&t.config.plotOptions.bar.rangeBarGroupRows}return O(o,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,a=e.x,s=e.y,r=e.type,n=this.ttCtx,l=this.w;if(t.target.classList.contains("apexcharts-".concat(r,"-rect"))){var h=this.getAttr(t,"i"),d=this.getAttr(t,"j"),c=this.getAttr(t,"cx"),u=this.getAttr(t,"cy"),g=this.getAttr(t,"width"),f=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:h,j:d,shared:!1,e:t}),l.globals.capturedSeriesIndex=h,l.globals.capturedDataPointIndex=d,a=c+n.tooltipRect.ttWidth/2+g,s=u+n.tooltipRect.ttHeight/2-f/2,n.tooltipPosition.moveXCrosshairs(c+g/2),a>l.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+g),n.w.config.tooltip.followCursor){var p=l.globals.dom.elWrap.getBoundingClientRect();a=l.globals.clientX-p.left-(a>l.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=l.globals.clientY-p.top-(s>l.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=e.x,n=e.y,l=this.w,h=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var d=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),u=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),t=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,h.intersect){var g=L.findAncestor(s.paths,"apexcharts-series");g&&(t=parseInt(g.getAttribute("data:realIndex"),10))}if(h.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:i,shared:!h.showOnIntersect&&l.config.tooltip.shared,e:a}),a.type==="mouseup"&&h.markerClick(a,t,i),l.globals.capturedSeriesIndex=t,l.globals.capturedDataPointIndex=i,r=d,n=c+l.globals.translateY-1.4*h.tooltipRect.ttHeight,h.w.config.tooltip.followCursor){var f=h.getElGrid().getBoundingClientRect();n=h.e.clientY+l.globals.translateY-f.top}u<0&&(n=c),h.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,n=this.ttCtx,l=n.getElTooltip(),h=0,d=0,c=0,u=this.getBarTooltipXY({e:a,opt:s});if(u.j!==null||u.barHeight!==0||u.barWidth!==0){t=u.i;var g=u.j;if(r.globals.capturedSeriesIndex=t,r.globals.capturedDataPointIndex=g,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(d=u.x,c=u.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[t]:r.config.stroke.width,h=d):r.globals.comboCharts||r.config.tooltip.shared||(h/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),d+n.tooltipRect.ttWidth>r.globals.gridWidth?d-=n.tooltipRect.ttWidth:d<0&&(d=0),n.w.config.tooltip.followCursor){var f=n.getElGrid().getBoundingClientRect();c=n.e.clientY-f.top}n.tooltip===null&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(h+i/2):n.tooltipPosition.moveXCrosshairs(h)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,l.style.left=d+r.globals.translateX+"px",l.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(e){var t=this,i=e.e,a=e.opt,s=this.w,r=null,n=this.ttCtx,l=0,h=0,d=0,c=0,u=0,g=i.target.classList;if(g.contains("apexcharts-bar-area")||g.contains("apexcharts-candlestick-area")||g.contains("apexcharts-boxPlot-area")||g.contains("apexcharts-rangebar-area")){var f=i.target,p=f.getBoundingClientRect(),x=a.elGrid.getBoundingClientRect(),b=p.height;u=p.height;var m=p.width,v=parseInt(f.getAttribute("cx"),10),k=parseInt(f.getAttribute("cy"),10);c=parseFloat(f.getAttribute("barWidth"));var y=i.type==="touchmove"?i.touches[0].clientX:i.clientX;r=parseInt(f.getAttribute("j"),10),l=parseInt(f.parentNode.getAttribute("rel"),10)-1;var C=f.getAttribute("data-range-y1"),w=f.getAttribute("data-range-y2");s.globals.comboCharts&&(l=parseInt(f.parentNode.getAttribute("data:realIndex"),10));var A=function(M){return s.globals.isXNumeric?v-m/2:t.isVerticalGroupedRangeBar?v+m/2:v-n.dataPointsDividedWidth+m/2},S=function(){return k-n.dataPointsDividedHeight+b/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:l,j:r,y1:C?parseInt(C,10):null,y2:w?parseInt(w,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(h=y-x.left+15,d=S()):(h=A(),d=i.clientY-x.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((h=v)0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&n.length>0){var l=r.yLabelFormatters[e],h=a.getElGrid().getBoundingClientRect(),d=n[0],c=0;i.yRatio.length>1&&(c=d);var u=(t-h.top)*i.yRatio[c],g=r.maxYArr[d]-r.minYArr[d],f=r.minYArr[d]+(g-u);s.config.yaxis[e].reversed&&(f=r.maxYArr[d]-(g-u)),a.tooltipPosition.moveYCrosshairs(t-h.top),a.yaxisTooltipText[e].innerHTML=l(f),a.tooltipPosition.moveYAxisTooltip(e)}}}]),o}(),ua=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new ns(this),this.tooltipLabels=new vr(this),this.tooltipPosition=new os(this),this.marker=new yr(this),this.intersect=new wr(this),this.axesTooltip=new kr(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return O(o,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(function(r,n){return!!(r.show&&r.tooltip.enabled&&t.globals.axisCharts)}),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&i.classList.add(t.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new kt(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&t.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),t.config.markers.size!==0&&t.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],s=this.getElTooltip(),r=function(l){var h=document.createElement("div");h.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(l)),h.style.order=i.config.tooltip.inverseOrder?e-l:l+1;var d=document.createElement("span");d.classList.add("apexcharts-tooltip-marker"),d.style.backgroundColor=i.globals.colors[l],h.appendChild(d);var c=document.createElement("div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,c.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach(function(u){var g=document.createElement("div");g.classList.add("apexcharts-tooltip-".concat(u,"-group"));var f=document.createElement("span");f.classList.add("apexcharts-tooltip-text-".concat(u,"-label")),g.appendChild(f);var p=document.createElement("span");p.classList.add("apexcharts-tooltip-text-".concat(u,"-value")),g.appendChild(p),c.appendChild(g)}),h.appendChild(c),s.appendChild(h),a.push(h)},n=0;n0&&this.addPathsEventListeners(f,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,l=this.tConfig.fixed.position.toLowerCase();return l.indexOf("right")>-1&&(r=r+e.globals.svgWidth-a+10),l.indexOf("bottom")>-1&&(n=n+e.globals.svgHeight-s-10),t.style.left=r+"px",t.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,a=function(r){var n={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(l){return e[r].addEventListener(l,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})})},s=0;s=20?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,t)},20-a))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||s.globals.dataPoints===0)||(a.length?a.forEach(function(r){var n=i.getElTooltip(r),l={paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===i.w.globals.minX&&r.w.globals.maxX===i.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:l,e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,a=e.opt,s=e.e,r=t.w,n=this.getElTooltip(t);n&&(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Le(t).toggleSeriesOnHover(s,s.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),l=a.type==="touchmove"?a.touches[0].clientX:a.clientX,h=a.type==="touchmove"?a.touches[0].clientY:a.clientY;if(this.clientY=h,this.clientX=l,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,hn.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var d=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(d)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),u=this.getElXCrosshairs(),g=[];r.config.chart.group&&(g=this.ctx.getSyncedCharts());var f=r.globals.xyCharts||r.config.chart.type==="bar"&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if(a.type==="mousemove"||a.type==="touchmove"||a.type==="mouseup"){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;u!==null&&u.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter(function(m){return m===!0});if(this.ycrosshairs!==null&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),f&&!this.showOnIntersect||g.length>1)this.handleStickyTooltip(a,l,h,s);else if(r.config.chart.type==="heatmap"||r.config.chart.type==="treemap"){var x=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:t,y:i,type:r.config.chart.type});t=x.x,i=x.y,c.style.left=t+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:t,y:i});if(this.yaxisTooltips.length)for(var b=0;bh.width)this.handleMouseOut(a);else if(l!==null)this.handleStickyCapturedSeries(e,l,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var d=s.globals.series.findIndex(function(c,u){return!s.globals.collapsedSeriesIndices.includes(u)});this.create(e,this,d,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var s=this.w;if(!this.tConfig.shared&&s.globals.series[t][a]===null)return void this.handleMouseOut(i);if(s.globals.series[t][a]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,a,i.ttItems):this.create(e,this,t,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex(function(n,l){return!s.globals.collapsedSeriesIndices.includes(l)});this.create(e,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new X(this.ctx),i=e.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&arguments[5]!==void 0?arguments[5]:null,w=this.w,A=t;e.type==="mouseup"&&this.markerClick(e,i,a),C===null&&(C=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),M=this.tooltipUtil.getElBars(),P=function(){w.globals.markers.largestSize>0?A.marker.enlargePoints(a):A.tooltipPosition.moveDynamicPointsOnHover(a)};if(w.config.legend.tooltipHoverFormatter){var I=w.config.legend.tooltipHoverFormatter,T=Array.from(this.legendLabels);T.forEach(function(oe){var K=oe.getAttribute("data:default-text");oe.innerHTML=decodeURIComponent(K)});for(var z=0;z0)){var G=new X(this.ctx),B=w.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),A.tooltipPosition.moveStickyTooltipOverBars(a,i),A.tooltipUtil.getAllMarkers(!0).length&&P();for(var ee=0;ee0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(g-=d*w)),C&&(g=g+u.height/2-m/2-2);var S=t.globals.series[i][a]<0,M=l;switch(this.barCtx.isReversed&&(M=l+(S?c:-c)),x.position){case"center":f=C?S?M-c/2+k:M+c/2-k:S?M-c/2+u.height/2+k:M+c/2+u.height/2-k;break;case"bottom":f=C?S?M-c+k:M+c-k:S?M-c+u.height+m+k:M+c-u.height/2+m-k;break;case"top":f=C?S?M+k:M-k:S?M-u.height/2-k:M+u.height+k}if(this.barCtx.lastActiveBarSerieIndex===s&&b.enabled){var P=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=S?M-P.height/2-k-b.offsetY+18:M+P.height+k+b.offsetY-18;var I=A;n=y+(t.globals.isXNumeric?-d*t.globals.barGroups.length/2:t.globals.barGroups.length*d/2-(t.globals.barGroups.length-1)*d-I)+b.offsetX}return t.config.chart.stacked||(f<0?f=0+m:f+u.height/3>t.globals.gridHeight&&(f=t.globals.gridHeight-m)),{bcx:h,bcy:l,dataLabelsX:g,dataLabelsY:f,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,s=e.j,r=e.realIndex,n=e.bcy,l=e.barHeight,h=e.barWidth,d=e.textRects,c=e.dataLabelsX,u=e.strokeWidth,g=e.dataLabelsConfig,f=e.barDataLabelsConfig,p=e.barTotalDataLabelsConfig,x=e.offX,b=e.offY,m=t.globals.gridHeight/t.globals.dataPoints;h=Math.abs(h);var v,k,y=n-(this.barCtx.isRangeBar?0:m)+l/2+d.height/2+b-3,C="start",w=t.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(w?-h:h),C=w?"start":"end"),f.position){case"center":c=w?A+h/2-x:Math.max(d.width/2,A-h/2)+x;break;case"bottom":c=w?A+h-u-x:A-h+u+x;break;case"top":c=w?A-u-x:A-u+x}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var S=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),g.fontSize);w?(v=A-u-x-p.offsetX,C="end"):v=A+x+p.offsetX+(this.barCtx.isReversed?-(h+u):u),k=y-d.height/2+S.height/2+p.offsetY+u}return t.config.chart.stacked||(g.textAnchor==="start"?c-d.width<0?c=w?d.width+u:u:c+d.width>t.globals.gridWidth&&(c=w?t.globals.gridWidth-u:t.globals.gridWidth-d.width-u):g.textAnchor==="middle"?c-d.width/2<0?c=d.width/2+u:c+d.width/2>t.globals.gridWidth&&(c=t.globals.gridWidth-d.width/2-u):g.textAnchor==="end"&&(c<1?c=d.width+u:c+1>t.globals.gridWidth&&(c=t.globals.gridWidth-d.width-u))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:v,totalDataLabelsY:k,totalDataLabelsAnchor:C}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.i,r=e.j,n=e.textRects,l=e.barHeight,h=e.barWidth,d=e.dataLabelsConfig,c=this.w,u="rotate(0)";c.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(u="rotate(-90, ".concat(t,", ").concat(i,")"));var g=new st(this.barCtx.ctx),f=new X(this.barCtx.ctx),p=d.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(d.enabled&&!b){x=f.group({class:"apexcharts-data-labels",transform:u});var m="";a!==void 0&&(m=p(a,R(R({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,k=c.config.plotOptions.bar.dataLabels.position;c.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(k==="top"&&(d.textAnchor=v?"end":"start"),k==="center"&&(d.textAnchor="middle"),k==="bottom"&&(d.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&hMath.abs(h)&&(m=""):n.height/1.6>Math.abs(l)&&(m=""));var y=R({},d);this.barCtx.isHorizontal&&a<0&&(d.textAnchor==="start"?y.textAnchor="end":d.textAnchor==="end"&&(y.textAnchor="start")),g.plotDataLabelsText({x:t,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:y,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.realIndex,r=e.textAnchor,n=e.barTotalDataLabelsConfig;this.w;var l,h=new X(this.barCtx.ctx);return n.enabled&&t!==void 0&&i!==void 0&&this.barCtx.lastActiveBarSerieIndex===s&&(l=h.drawText({x:t,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),l}}]),o}(),Cr=function(){function o(e){H(this,o),this.w=e.w,this.barCtx=e}return O(o,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;at.globals.minX&&t.globals.seriesX[i][a]0&&(a=h.globals.minXDiff/u),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=h.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?h.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=h.globals.padHorizontal+L.noExponents(a-r*this.barCtx.seriesLen)/2}return h.globals.barHeight=s,h.globals.barWidth=r,{x:e,y:t,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:l}}},{key:"initializeStackedPrevVars",value:function(e){e.w.globals.seriesGroups.forEach(function(t){e[t]||(e[t]={}),e[t].prevY=[],e[t].prevX=[],e[t].prevYF=[],e[t].prevXF=[],e[t].prevYVal=[],e[t].prevXVal=[]})}},{key:"initializeStackedXYVars",value:function(e){e.w.globals.seriesGroups.forEach(function(t){e[t]||(e[t]={}),e[t].xArrj=[],e[t].xArrjF=[],e[t].xArrjVal=[],e[t].yArrj=[],e[t].yArrjF=[],e[t].yArrjVal=[]})}},{key:"getPathFillColor",value:function(e,t,i,a){var s,r,n,l,h=this.w,d=this.barCtx.ctx.fill,c=null,u=this.barCtx.barOptions.distributed?i:t,g=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(f){e[t][i]>=f.from&&e[t][i]<=f.to&&(c=f.color,g=!0)}),{color:d.fillPath({seriesNumber:this.barCtx.barOptions.distributed?u:a,dataPointIndex:i,color:c,value:e[t][i],fillConfig:(s=h.config.series[t].data[i])===null||s===void 0?void 0:s.fill,fillType:(r=h.config.series[t].data[i])!==null&&r!==void 0&&(n=r.fill)!==null&&n!==void 0&&n.type?(l=h.config.series[t].data[i])===null||l===void 0?void 0:l.fill.type:Array.isArray(h.config.fill.type)?h.config.fill.type[a]:h.config.fill.type}),useRangeColor:g}}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,s=this.w;return this.barCtx.series[e][t]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(e){var t,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=e.length,r=0|((t=e[0])===null||t===void 0?void 0:t.length),n=Array.from({length:s},function(){return Array(r).fill(a?"top":"none")});if(a)return n;for(var l=0;l0?(h.push(u),c++):g<0&&(d.push(u),c++)}if(h.length>0&&d.length===0)if(h.length===1)n[h[0]][l]="both";else{var f,p=h[0],x=h[h.length-1],b=pt(h);try{for(b.s();!(f=b.n()).done;){var m=f.value;n[m][l]=m===p?"bottom":m===x?"top":"none"}}catch(Y){b.e(Y)}finally{b.f()}}else if(d.length>0&&h.length===0)if(d.length===1)n[d[0]][l]="both";else{var v,k=Math.max.apply(Math,d),y=Math.min.apply(Math,d),C=pt(d);try{for(C.s();!(v=C.n()).done;){var w=v.value;n[w][l]=w===k?"bottom":w===y?"top":"none"}}catch(Y){C.e(Y)}finally{C.f()}}else if(h.length>0&&d.length>0){var A,S=h[h.length-1],M=pt(h);try{for(M.s();!(A=M.n()).done;){var P=A.value;n[P][l]=P===S?"top":"none"}}catch(Y){M.e(Y)}finally{M.f()}var I,T=Math.max.apply(Math,d),z=pt(d);try{for(z.s();!(I=z.n()).done;){var E=I.value;n[E][l]=E===T?"bottom":"none"}}catch(Y){z.e(Y)}finally{z.f()}}else c===1&&(n[h[0]||d[0]][l]="both")}return n}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,s=e.x2,r=e.y1,n=e.y2,l=e.elSeries,h=this.w,d=new X(this.barCtx.ctx),c=new Le(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var u=this.barCtx.barOptions.colors.backgroundBarColors[t],g=d.drawRect(a!==void 0?a:0,r!==void 0?r:0,s!==void 0?s:h.globals.gridWidth,n!==void 0?n:h.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,u,this.barCtx.barOptions.colors.backgroundBarOpacity);l.add(g),g.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,s=e.y1,r=e.y2,n=e.strokeWidth,l=e.isReversed,h=e.series,d=e.seriesGroup,c=e.realIndex,u=e.i,g=e.j,f=e.w,p=new X(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var x=i,b=a;(t=f.config.series[c].data[g])!==null&&t!==void 0&&t.columnWidthOffset&&(b=a-f.config.series[c].data[g].columnWidthOffset/2,x=i+f.config.series[c].data[g].columnWidthOffset);var m=n/2,v=b+m,k=b+x-m,y=(h[u][g]>=0?1:-1)*(l?-1:1);s+=.001-m*y,r+=.001+m*y;var C=p.move(v,s),w=p.move(v,s),A=p.line(k,s);if(f.globals.previousPaths.length>0&&(w=this.barCtx.getPreviousPath(c,g,!1)),C=C+p.line(v,r)+p.line(k,r)+A+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][g]==="both"?" Z":" z"),w=w+p.line(v,s)+A+A+A+A+A+p.line(v,s)+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][g]==="both"?" Z":" z"),this.arrBorderRadius[c][g]!=="none"&&(C=p.roundPathCorners(C,f.config.plotOptions.bar.borderRadius)),f.config.chart.stacked){var S=this.barCtx;(S=this.barCtx[d]).yArrj.push(r-m*y),S.yArrjF.push(Math.abs(s-r+n*y)),S.yArrjVal.push(this.barCtx.series[u][g])}return{pathTo:C,pathFrom:w}}},{key:"getBarpaths",value:function(e){var t,i=e.barYPosition,a=e.barHeight,s=e.x1,r=e.x2,n=e.strokeWidth,l=e.isReversed,h=e.series,d=e.seriesGroup,c=e.realIndex,u=e.i,g=e.j,f=e.w,p=new X(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var x=i,b=a;(t=f.config.series[c].data[g])!==null&&t!==void 0&&t.barHeightOffset&&(x=i-f.config.series[c].data[g].barHeightOffset/2,b=a+f.config.series[c].data[g].barHeightOffset);var m=n/2,v=x+m,k=x+b-m,y=(h[u][g]>=0?1:-1)*(l?-1:1);s+=.001+m*y,r+=.001-m*y;var C=p.move(s,v),w=p.move(s,v);f.globals.previousPaths.length>0&&(w=this.barCtx.getPreviousPath(c,g,!1));var A=p.line(s,k);if(C=C+p.line(r,v)+p.line(r,k)+A+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][g]==="both"?" Z":" z"),w=w+p.line(s,v)+A+A+A+A+A+p.line(s,v)+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][g]==="both"?" Z":" z"),this.arrBorderRadius[c][g]!=="none"&&(C=p.roundPathCorners(C,f.config.plotOptions.bar.borderRadius)),f.config.chart.stacked){var S=this.barCtx;(S=this.barCtx[d]).xArrj.push(r+m*y),S.xArrjF.push(Math.abs(s-r-n*y)),S.xArrjVal.push(this.barCtx.series[u][g])}return{pathTo:C,pathFrom:w}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,a=0;a2&&arguments[2]!==void 0)||arguments[2]?t:null;return e!=null&&(i=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(e,t,i){var a=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?t:null;return e!=null&&(a=t-e/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(e,t,i,a,s,r){var n=this,l=this.w,h=[],d=function(g,f){var p;h.push((Ht(p={},e,e==="x"?n.getXForValue(g,t,!1):n.getYForValue(g,i,r,!1)),Ht(p,"attrs",f),p))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach(function(g){d(g.value,g)}),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var c=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,u={strokeHeight:e==="x"?0:l.globals.markers.size[a],strokeWidth:e==="x"?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(c[a])?c[a][0]:c[a]};d(l.globals.seriesRangeStart[a][s],u),d(l.globals.seriesRangeEnd[a][s],R(R({},u),{},{strokeColor:Array.isArray(c[a])?c[a][1]:c[a]}))}return h}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,s=e.goalY,r=e.barWidth,n=e.barHeight,l=new X(this.barCtx.ctx),h=l.group({className:"apexcharts-bar-goals-groups"});h.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:h.node}),h.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var d=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(c){if(c.x>=-1&&c.x<=l.w.globals.gridWidth+1){var u=c.attrs.strokeHeight!==void 0?c.attrs.strokeHeight:n/2,g=i+u+n/2;d=l.drawLine(c.x,g-2*u,c.x,g,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeWidth?c.attrs.strokeWidth:2,c.attrs.strokeLineCap),h.add(d)}}):Array.isArray(s)&&s.forEach(function(c){if(c.y>=-1&&c.y<=l.w.globals.gridHeight+1){var u=c.attrs.strokeWidth!==void 0?c.attrs.strokeWidth:r/2,g=t+u+r/2;d=l.drawLine(g-2*u,c.y,g,c.y,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeHeight?c.attrs.strokeHeight:2,c.attrs.strokeLineCap),h.add(d)}}),h}},{key:"drawBarShadow",value:function(e){var t=e.prevPaths,i=e.currPaths,a=e.color,s=this.w,r=t.x,n=t.x1,l=t.barYPosition,h=i.x,d=i.x1,c=i.barYPosition,u=l+i.barHeight,g=new X(this.barCtx.ctx),f=new L,p=g.move(n,u)+g.line(r,u)+g.line(h,c)+g.line(d,c)+g.line(n,u)+(s.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return g.drawPath({d:p,fill:f.shadeColor(.5,L.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var t,i=e.i,a=e.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map(function(l,h){return h}):((t=s.globals.columnSeries)===null||t===void 0?void 0:t.i.map(function(l){return l}))||[]).forEach(function(l){var h=s.globals.seriesPercent[l][a];h&&r++,l-1}),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),o}(),rt=function(){function o(e,t){H(this,o),this.ctx=e,this.w=e.w;var i=this.w;this.barOptions=i.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=i.config.stroke.width,this.isNullValue=!1,this.isRangeBar=i.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&i.globals.seriesRange.length&&i.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=t,this.xyRatios!==null&&(this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.invertedXRatio=t.invertedXRatio,this.invertedYRatio=t.invertedYRatio,this.baseLineY=t.baseLineY,this.baseLineInvertedY=t.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var a=new Le(this.ctx);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var s=a.getBarSeriesIndices(),r=new he(this.ctx);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map(function(n,l){return s.indexOf(l)===-1?l:-1}).filter(function(n){return n!==-1})),this.barHelpers=new Cr(this)}return O(o,[{key:"draw",value:function(e,t){var i=this.w,a=new X(this.ctx),s=new he(this.ctx,i);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.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(var n=0,l=0;n0&&(this.visibleI=this.visibleI+1);var k=0,y=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var C=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var w=this.barHelpers.initialPositions();f=w.y,k=w.barHeight,d=w.yDivision,u=w.zeroW,g=w.x,y=w.barWidth,h=w.xDivision,c=w.zeroH,this.isHorizontal||x.push(g+y/2);var A=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var S=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var Y,F=this.barHelpers.drawBarShadow({color:typeof E.color=="string"&&((Y=E.color)===null||Y===void 0?void 0:Y.indexOf("url"))===-1?E.color:L.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});M.add(F),i.config.chart.dropShadow.enabled&&new ue(this.ctx).dropShadow(F,i.config.chart.dropShadow,b)}this.pathArr.push(T);var W=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:k,barWidth:y});W&&S.add(W),f=T.y,g=T.x,P>0&&x.push(g+y/2),p.push(f),this.renderSeries(R(R({realIndex:b,pathFill:E.color},E.useRangeColor?{lineFill:E.color}:{}),{},{j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:v,x:g,y:f,series:e,barHeight:Math.abs(T.barHeight?T.barHeight:k),barWidth:Math.abs(T.barWidth?T.barWidth:y),elDataLabelsWrap:A,elGoalsMarkers:S,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"}))}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=p,r.add(v)}return r}},{key:"renderSeries",value:function(e){var t=e.realIndex,i=e.pathFill,a=e.lineFill,s=e.j,r=e.i,n=e.columnGroupIndex,l=e.pathFrom,h=e.pathTo,d=e.strokeWidth,c=e.elSeries,u=e.x,g=e.y,f=e.y1,p=e.y2,x=e.series,b=e.barHeight,m=e.barWidth,v=e.barXPosition,k=e.barYPosition,y=e.elDataLabelsWrap,C=e.elGoalsMarkers,w=e.elBarShadows,A=e.visibleSeries,S=e.type,M=e.classes,P=this.w,I=new X(this.ctx);if(!a){var T=typeof P.globals.stroke.colors[t]=="function"?function(W){var _,G=P.config.stroke.colors;return Array.isArray(G)&&G.length>0&&((_=G[W])||(_=""),typeof _=="function")?_({value:P.globals.series[W][s],dataPointIndex:s,w:P}):_}(t):P.globals.stroke.colors[t];a=this.barOptions.distributed?P.globals.stroke.colors[s]:T}P.config.series[r].data[s]&&P.config.series[r].data[s].strokeColor&&(a=P.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var z=s/P.config.chart.animations.animateGradually.delay*(P.config.chart.animations.speed/P.globals.dataPoints)/2.4,E=I.renderPaths({i:r,j:s,realIndex:t,pathFrom:l,pathTo:h,stroke:a,strokeWidth:d,strokeLineCap:P.config.stroke.lineCap,fill:i,animationDelay:z,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:P.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(S,"-area ").concat(M),chartType:S});E.attr("clip-path","url(#gridRectBarMask".concat(P.globals.cuid,")"));var Y=P.config.forecastDataPoints;Y.count>0&&s>=P.globals.dataPoints-Y.count&&(E.node.setAttribute("stroke-dasharray",Y.dashArray),E.node.setAttribute("stroke-width",Y.strokeWidth),E.node.setAttribute("fill-opacity",Y.fillOpacity)),f!==void 0&&p!==void 0&&(E.attr("data-range-y1",f),E.attr("data-range-y2",p)),new ue(this.ctx).setSelectionFilter(E,t,s),c.add(E);var F=new Ar(this).handleBarDataLabels({x:u,y:g,y1:f,y2:p,i:r,j:s,series:x,realIndex:t,columnGroupIndex:n,barHeight:b,barWidth:m,barXPosition:v,barYPosition:k,renderedPath:E,visibleSeries:A});return F.dataLabels!==null&&y.add(F.dataLabels),F.totalDataLabels&&y.add(F.totalDataLabels),c.add(y),C&&c.add(C),w&&c.add(w),c}},{key:"drawBarPaths",value:function(e){var t,i=e.indexes,a=e.barHeight,s=e.strokeWidth,r=e.zeroW,n=e.x,l=e.y,h=e.yDivision,d=e.elSeries,c=this.w,u=i.i,g=i.j;if(c.globals.isXNumeric)t=(l=(c.globals.seriesX[u][g]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var f=0,p=0;c.globals.seriesPercent.forEach(function(b,m){b[g]&&f++,m0&&(a=this.seriesLen*a/f),t=l+a*this.visibleI,t-=a*p}else t=l+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[u][g],r)-r)/2),n=this.barHelpers.getXForValue(this.series[u][g],r);var x=this.barHelpers.getBarpaths({barYPosition:t,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:u,j:g,w:c});return c.globals.isXNumeric||(l+=h),this.barHelpers.barBackground({j:g,i:u,y1:t-a*this.visibleI,y2:a*this.seriesLen,elSeries:d}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x1:r,x:n,y:l,goalX:this.barHelpers.getGoalValues("x",r,null,u,g),barYPosition:t,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var t,i=e.indexes,a=e.x,s=e.y,r=e.xDivision,n=e.barWidth,l=e.zeroH,h=e.strokeWidth,d=e.elSeries,c=this.w,u=i.realIndex,g=i.translationsIndex,f=i.i,p=i.j,x=i.bc;if(c.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:a,j:p,realIndex:u,barWidth:n});a=b.x,t=b.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var m=this.barHelpers.getZeroValueEncounters({i:f,j:p}),v=m.nonZeroColumns,k=m.zeroEncounters;v>0&&(n=this.seriesLen*n/v),t=a+n*this.visibleI,t-=n*k}else t=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[f][p],l,g);var y=this.barHelpers.getColumnPaths({barXPosition:t,barWidth:n,y1:l,y2:s,strokeWidth:h,isReversed:this.isReversed,series:this.series,realIndex:u,i:f,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:x,j:p,i:f,x1:t-h/2-n*this.visibleI,x2:n*this.seriesLen+h/2,elSeries:d}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,l,f,p,g),barXPosition:t,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(e){var t=e.x,i=e.barWidth,a=e.realIndex,s=e.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),L.isNumber(r.globals.seriesX[n][s])&&(t=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:t+i*this.visibleI,x:t}}},{key:"getPreviousPath",value:function(e,t){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(e,10)&&a.globals.previousPaths[s].paths[t]!==void 0&&(i=a.globals.previousPaths[s].paths[t].d)}return i}}]),o}(),ga=function(o){Ct(t,rt);var e=At(t);function t(){return H(this,t),e.apply(this,arguments)}return O(t,[{key:"draw",value:function(i,a){var s=this,r=this.w;this.graphics=new X(this.ctx),this.bar=new rt(this.ctx,this.xyRatios);var n=new he(this.ctx,r);i=n.getLogSeries(i),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),r.config.chart.stackType==="100%"&&(i=r.globals.comboCharts?a.map(function(f){return r.globals.seriesPercent[f]}):r.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var l=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),h=0,d=0,c=function(f,p){var x=void 0,b=void 0,m=void 0,v=void 0,k=r.globals.comboCharts?a[f]:f,y=s.barHelpers.getGroupIndex(k),C=y.groupIndex,w=y.columnGroupIndex;s.groupCtx=s[r.globals.seriesGroups[C]];var A=[],S=[],M=0;s.yRatio.length>1&&(s.yaxisIndex=r.globals.seriesYAxisReverseMap[k][0],M=k),s.isReversed=r.config.yaxis[s.yaxisIndex]&&r.config.yaxis[s.yaxisIndex].reversed;var P=s.graphics.group({class:"apexcharts-series",seriesName:L.escapeString(r.globals.seriesNames[k]),rel:f+1,"data:realIndex":k});s.ctx.series.addCollapsedClassToSeries(P,k);var I=s.graphics.group({class:"apexcharts-datalabels","data:realIndex":k}),T=s.graphics.group({class:"apexcharts-bar-goals-markers"}),z=0,E=0,Y=s.initialPositions(h,d,x,b,m,v,M);d=Y.y,z=Y.barHeight,b=Y.yDivision,v=Y.zeroW,h=Y.x,E=Y.barWidth,x=Y.xDivision,m=Y.zeroH,r.globals.barHeight=z,r.globals.barWidth=E,s.barHelpers.initializeStackedXYVars(s),s.groupCtx.prevY.length===1&&s.groupCtx.prevY[0].every(function(pe){return isNaN(pe)})&&(s.groupCtx.prevY[0]=s.groupCtx.prevY[0].map(function(){return m}),s.groupCtx.prevYF[0]=s.groupCtx.prevYF[0].map(function(){return 0}));for(var F=0;F0||s.barHelpers.arrBorderRadius[k][F]==="top"&&r.globals.series[k][F]<0)&&(oe=K),P=s.renderSeries(R(R({realIndex:k,pathFill:ee.color},ee.useRangeColor?{lineFill:ee.color}:{}),{},{j:F,i:f,columnGroupIndex:w,pathFrom:G.pathFrom,pathTo:G.pathTo,strokeWidth:W,elSeries:P,x:h,y:d,series:i,barHeight:z,barWidth:E,elDataLabelsWrap:I,elGoalsMarkers:T,type:"bar",visibleSeries:w,classes:oe}))}r.globals.seriesXvalues[k]=A,r.globals.seriesYvalues[k]=S,s.groupCtx.prevY.push(s.groupCtx.yArrj),s.groupCtx.prevYF.push(s.groupCtx.yArrjF),s.groupCtx.prevYVal.push(s.groupCtx.yArrjVal),s.groupCtx.prevX.push(s.groupCtx.xArrj),s.groupCtx.prevXF.push(s.groupCtx.xArrjF),s.groupCtx.prevXVal.push(s.groupCtx.xArrjVal),l.add(P)},u=0,g=0;u1?c=(s=u.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(f).indexOf("%")===-1?c=parseInt(f,10):c*=parseInt(f,10)/100,n=this.isReversed?this.baseLineY[h]:u.globals.gridHeight-this.baseLineY[h],i=u.globals.padHorizontal+(s-c)/2}var p=u.globals.barGroups.length||1;return{x:i,y:a,yDivision:r,xDivision:s,barHeight:d/p,barWidth:c/p,zeroH:n,zeroW:l}}},{key:"drawStackedBarPaths",value:function(i){for(var a,s=i.indexes,r=i.barHeight,n=i.strokeWidth,l=i.zeroW,h=i.x,d=i.y,c=i.columnGroupIndex,u=i.seriesGroup,g=i.yDivision,f=i.elSeries,p=this.w,x=d+c*r,b=s.i,m=s.j,v=s.realIndex,k=s.translationsIndex,y=0,C=0;C0){var A=l;this.groupCtx.prevXVal[w-1][m]<0?A=this.series[b][m]>=0?this.groupCtx.prevX[w-1][m]+y-2*(this.isReversed?y:0):this.groupCtx.prevX[w-1][m]:this.groupCtx.prevXVal[w-1][m]>=0&&(A=this.series[b][m]>=0?this.groupCtx.prevX[w-1][m]:this.groupCtx.prevX[w-1][m]-y+2*(this.isReversed?y:0)),a=A}else a=l;h=this.series[b][m]===null?a:a+this.series[b][m]/this.invertedYRatio-2*(this.isReversed?this.series[b][m]/this.invertedYRatio:0);var S=this.barHelpers.getBarpaths({barYPosition:x,barHeight:r,x1:a,x2:h,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:s.realIndex,seriesGroup:u,i:b,j:m,w:p});return this.barHelpers.barBackground({j:m,i:b,y1:x,y2:r,elSeries:f}),d+=g,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",l,null,b,m,k),barXPosition:a,barYPosition:x,x:h,y:d}}},{key:"drawStackedColumnPaths",value:function(i){var a=i.indexes,s=i.x,r=i.y,n=i.xDivision,l=i.barWidth,h=i.zeroH,d=i.columnGroupIndex,c=i.seriesGroup,u=i.elSeries,g=this.w,f=a.i,p=a.j,x=a.bc,b=a.realIndex,m=a.translationsIndex;if(g.globals.isXNumeric){var v=g.globals.seriesX[b][p];v||(v=0),s=(v-g.globals.minX)/this.xRatio-l/2*g.globals.barGroups.length}for(var k,y=s+d*l,C=0,w=0;w0&&!g.globals.isXNumeric||A>0&&g.globals.isXNumeric&&g.globals.seriesX[b-1][p]===g.globals.seriesX[b][p]){var S,M,P,I=Math.min(this.yRatio.length+1,b+1);if(this.groupCtx.prevY[A-1]!==void 0&&this.groupCtx.prevY[A-1].length)for(var T=1;T=0?P-C+2*(this.isReversed?C:0):P;break}if(((F=this.groupCtx.prevYVal[A-E])===null||F===void 0?void 0:F[p])>=0){M=this.series[f][p]>=0?P:P+C-2*(this.isReversed?C:0);break}}M===void 0&&(M=g.globals.gridHeight),k=(S=this.groupCtx.prevYF[0])!==null&&S!==void 0&&S.every(function(_){return _===0})&&this.groupCtx.prevYF.slice(1,A).every(function(_){return _.every(function(G){return isNaN(G)})})?h:M}else k=h;r=this.series[f][p]?k-this.series[f][p]/this.yRatio[m]+2*(this.isReversed?this.series[f][p]/this.yRatio[m]:0):k;var W=this.barHelpers.getColumnPaths({barXPosition:y,barWidth:l,y1:k,y2:r,yRatio:this.yRatio[m],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:c,realIndex:a.realIndex,i:f,j:p,w:g});return this.barHelpers.barBackground({bc:x,j:p,i:f,x1:y,x2:l,elSeries:u}),{pathTo:W.pathTo,pathFrom:W.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,h,f,p),barXPosition:y,x:g.globals.isXNumeric?s:s+n,y:r}}}]),t}(),ni=function(o){Ct(t,rt);var e=At(t);function t(){return H(this,t),e.apply(this,arguments)}return O(t,[{key:"draw",value:function(i,a,s){var r=this,n=this.w,l=new X(this.ctx),h=n.globals.comboCharts?a:n.config.chart.type,d=new Te(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=n.config.plotOptions.bar.horizontal;var c=new he(this.ctx,n);i=c.getLogSeries(i),this.series=i,this.yRatio=c.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var u=l.group({class:"apexcharts-".concat(h,"-series apexcharts-plot-series")}),g=function(p){r.isBoxPlot=n.config.chart.type==="boxPlot"||n.config.series[p].type==="boxPlot";var x,b,m,v,k=void 0,y=void 0,C=[],w=[],A=n.globals.comboCharts?s[p]:p,S=r.barHelpers.getGroupIndex(A).columnGroupIndex,M=l.group({class:"apexcharts-series",seriesName:L.escapeString(n.globals.seriesNames[A]),rel:p+1,"data:realIndex":A});r.ctx.series.addCollapsedClassToSeries(M,A),i[p].length>0&&(r.visibleI=r.visibleI+1);var P,I,T=0;r.yRatio.length>1&&(r.yaxisIndex=n.globals.seriesYAxisReverseMap[A][0],T=A);var z=r.barHelpers.initialPositions();y=z.y,P=z.barHeight,b=z.yDivision,v=z.zeroW,k=z.x,I=z.barWidth,x=z.xDivision,m=z.zeroH,w.push(k+I/2);for(var E=l.group({class:"apexcharts-datalabels","data:realIndex":A}),Y=l.group({class:"apexcharts-bar-goals-markers"}),F=function(_){var G=r.barHelpers.getStrokeWidth(p,_,A),B=null,ee={indexes:{i:p,j:_,realIndex:A,translationsIndex:T},x:k,y,strokeWidth:G,elSeries:M};B=r.isHorizontal?r.drawHorizontalBoxPaths(R(R({},ee),{},{yDivision:b,barHeight:P,zeroW:v})):r.drawVerticalBoxPaths(R(R({},ee),{},{xDivision:x,barWidth:I,zeroH:m})),y=B.y,k=B.x;var oe=r.barHelpers.drawGoalLine({barXPosition:B.barXPosition,barYPosition:B.barYPosition,goalX:B.goalX,goalY:B.goalY,barHeight:P,barWidth:I});oe&&Y.add(oe),_>0&&w.push(k+I/2),C.push(y),B.pathTo.forEach(function(K,pe){var J=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?B.color[pe]:n.globals.stroke.colors[p],$=d.fillPath({seriesNumber:A,dataPointIndex:_,color:B.color[pe],value:i[p][_]});r.renderSeries({realIndex:A,pathFill:$,lineFill:J,j:_,i:p,pathFrom:B.pathFrom,pathTo:K,strokeWidth:G,elSeries:M,x:k,y,series:i,columnGroupIndex:S,barHeight:P,barWidth:I,elDataLabelsWrap:E,elGoalsMarkers:Y,visibleSeries:r.visibleI,type:n.config.chart.type})})},W=0;W0&&(z=this.getPreviousPath(x,g,!0)),T=this.isBoxPlot?[c.move(I,S)+c.line(I+n/2,S)+c.line(I+n/2,C)+c.line(I+n/4,C)+c.line(I+n-n/4,C)+c.line(I+n/2,C)+c.line(I+n/2,S)+c.line(I+n,S)+c.line(I+n,P)+c.line(I,P)+c.line(I,S+h/2),c.move(I,P)+c.line(I+n,P)+c.line(I+n,M)+c.line(I+n/2,M)+c.line(I+n/2,w)+c.line(I+n-n/4,w)+c.line(I+n/4,w)+c.line(I+n/2,w)+c.line(I+n/2,M)+c.line(I,M)+c.line(I,P)+"z"]:[c.move(I,M)+c.line(I+n/2,M)+c.line(I+n/2,C)+c.line(I+n/2,M)+c.line(I+n,M)+c.line(I+n,S)+c.line(I+n/2,S)+c.line(I+n/2,w)+c.line(I+n/2,S)+c.line(I,S)+c.line(I,M-h/2)],z+=c.move(I,S),d.globals.isXNumeric||(s+=r),{pathTo:T,pathFrom:z,x:s,y:M,goalY:this.barHelpers.getGoalValues("y",null,l,u,g,a.translationsIndex),barXPosition:I,color:A}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes;i.x;var s=i.y,r=i.yDivision,n=i.barHeight,l=i.zeroW,h=i.strokeWidth,d=this.w,c=new X(this.ctx),u=a.i,g=a.j,f=this.boxOptions.colors.lower;this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var p=this.invertedYRatio,x=a.realIndex,b=this.getOHLCValue(x,g),m=l,v=l,k=Math.min(b.o,b.c),y=Math.max(b.o,b.c),C=b.m;d.globals.isXNumeric&&(s=(d.globals.seriesX[x][g]-d.globals.minX)/this.invertedXRatio-n/2);var w=s+n*this.visibleI;this.series[u][g]===void 0||this.series[u][g]===null?(k=l,y=l):(k=l+k/p,y=l+y/p,m=l+b.h/p,v=l+b.l/p,C=l+b.m/p);var A=c.move(l,w),S=c.move(k,w+n/2);return d.globals.previousPaths.length>0&&(S=this.getPreviousPath(x,g,!0)),A=[c.move(k,w)+c.line(k,w+n/2)+c.line(m,w+n/2)+c.line(m,w+n/2-n/4)+c.line(m,w+n/2+n/4)+c.line(m,w+n/2)+c.line(k,w+n/2)+c.line(k,w+n)+c.line(C,w+n)+c.line(C,w)+c.line(k+h/2,w),c.move(C,w)+c.line(C,w+n)+c.line(y,w+n)+c.line(y,w+n/2)+c.line(v,w+n/2)+c.line(v,w+n-n/4)+c.line(v,w+n/4)+c.line(v,w+n/2)+c.line(y,w+n/2)+c.line(y,w)+c.line(C,w)+"z"],S+=c.move(k,w),d.globals.isXNumeric||(s+=r),{pathTo:A,pathFrom:S,x:y,y:s,goalX:this.barHelpers.getGoalValues("x",l,null,u,g),barYPosition:w,color:f}}},{key:"getOHLCValue",value:function(i,a){var s=this.w,r=new he(this.ctx,s),n=r.getLogValAtSeriesIndex(s.globals.seriesCandleH[i][a],i),l=r.getLogValAtSeriesIndex(s.globals.seriesCandleO[i][a],i),h=r.getLogValAtSeriesIndex(s.globals.seriesCandleM[i][a],i),d=r.getLogValAtSeriesIndex(s.globals.seriesCandleC[i][a],i),c=r.getLogValAtSeriesIndex(s.globals.seriesCandleL[i][a],i);return{o:this.isBoxPlot?n:l,h:this.isBoxPlot?l:n,m:h,l:this.isBoxPlot?d:c,c:this.isBoxPlot?c:d}}}]),t}(),ls=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(a,s){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var s=this.w,r=1,n=s.config.plotOptions[e].shadeIntensity,l=this.determineColor(e,t,i);s.globals.hasNegs||a?r=s.config.plotOptions[e].reverseNegativeShade?l.percent<0?l.percent/100*(1.25*n):(1-l.percent/100)*(1.25*n):l.percent<=0?1-(1+l.percent/100)*n:(1-l.percent/100)*n:(r=1-l.percent/100,e==="treemap"&&(r=(1-l.percent/100)*(1.25*n)));var h=l.color,d=new L;if(s.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var c=d.shadeColor(-1*r,l.color);h=L.hexToRgba(L.isColorHex(c)?c:L.rgb2hex(c),s.config.fill.opacity)}else{var u=d.shadeColor(r,l.color);h=L.hexToRgba(L.isColorHex(u)?u:L.rgb2hex(u),s.config.fill.opacity)}return{color:h,colorProps:l}}},{key:"determineColor",value:function(e,t,i){var a=this.w,s=a.globals.series[t][i],r=a.config.plotOptions[e],n=r.colorScale.inverse?i:t;r.distributed&&a.config.chart.type==="treemap"&&(n=i);var l=a.globals.colors[n],h=null,d=Math.min.apply(Math,ce(a.globals.series[t])),c=Math.max.apply(Math,ce(a.globals.series[t]));r.distributed||e!=="heatmap"||(d=a.globals.minY,c=a.globals.maxY),r.colorScale.min!==void 0&&(d=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var u=Math.abs(c)+Math.abs(d),g=100*s/(u===0?u-1e-6:u);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(function(f,p){if(s>=f.from&&s<=f.to){l=f.color,h=f.foreColor?f.foreColor:null,d=f.from,c=f.to;var x=Math.abs(c)+Math.abs(d);g=100*s/(x===0?x-1e-6:x)}}),{color:l,foreColor:h,percent:g}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,s=e.i,r=e.j,n=e.colorProps,l=e.fontSize,h=this.w.config.dataLabels,d=new X(this.ctx),c=new st(this.ctx),u=null;if(h.enabled){u=d.group({class:"apexcharts-data-labels"});var g=h.offsetX,f=h.offsetY,p=i+g,x=a+parseFloat(h.style.fontSize)/3+f;c.plotDataLabelsText({x:p,y:x,text:t,i:s,j:r,color:n.foreColor,parent:u,fontSize:l,dataLabelsConfig:h})}return u}},{key:"addListeners",value:function(e){var t=new X(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),o}(),Sr=function(){function o(e,t){H(this,o),this.ctx=e,this.w=e.w,this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new ls(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return O(o,[{key:"draw",value:function(e){var t=this.w,i=new X(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var s=t.globals.gridWidth/t.globals.dataPoints,r=t.globals.gridHeight/t.globals.series.length,n=0,l=!1;this.negRange=this.helpers.checkColorRange();var h=e.slice();t.config.yaxis[0].reversed&&(l=!0,h.reverse());for(var d=l?0:h.length-1;l?d=0;l?d++:d--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:L.escapeString(t.globals.seriesNames[d]),rel:d+1,"data:realIndex":d});if(this.ctx.series.addCollapsedClassToSeries(c,d),t.config.chart.dropShadow.enabled){var u=t.config.chart.dropShadow;new ue(this.ctx).dropShadow(c,u,d)}for(var g=0,f=t.config.plotOptions.heatmap.shadeIntensity,p=0,x=0;x=h[d].length)break;var b=this.helpers.getShadeColor(t.config.chart.type,d,p,this.negRange),m=b.color,v=b.colorProps;t.config.fill.type==="image"&&(m=new Te(this.ctx).fillPath({seriesNumber:d,dataPointIndex:p,opacity:t.globals.hasNegs?v.percent<0?1-(1+v.percent/100):f+v.percent/100:v.percent/100,patternID:L.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:s,height:t.config.fill.image.height?t.config.fill.image.height:r}));var k=this.rectRadius,y=i.drawRect(g,n,s,r,k);if(y.attr({cx:g,cy:n}),y.node.classList.add("apexcharts-heatmap-rect"),c.add(y),y.attr({fill:m,i:d,index:d,j:p,val:e[d][p],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?m:t.globals.stroke.colors[0],color:m}),this.helpers.addListeners(y),t.config.chart.animations.enabled&&!t.globals.dataChanged){var C=1;t.globals.resized||(C=t.config.chart.animations.speed),this.animateHeatMap(y,g,n,s,r,C)}if(t.globals.dataChanged){var w=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){w=this.dynamicAnim.speed;var A=t.globals.previousPaths[d]&&t.globals.previousPaths[d][p]&&t.globals.previousPaths[d][p].color;A||(A="rgba(255, 255, 255, 0)"),this.animateHeatColor(y,L.isColorHex(A)?A:L.rgb2hex(A),L.isColorHex(m)?m:L.rgb2hex(m),w)}}var S=(0,t.config.dataLabels.formatter)(t.globals.series[d][p],{value:t.globals.series[d][p],seriesIndex:d,dataPointIndex:p,w:t}),M=this.helpers.calculateDataLabels({text:S,x:g+s/2,y:n+r/2,i:d,j:p,colorProps:v,series:h});M!==null&&c.add(M),g+=s,p++}n+=r,a.add(c)}var P=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?P.unshift(""):P.push(""),t.globals.yAxisScale[0].result=P,a}},{key:"animateHeatMap",value:function(e,t,i,a,s,r){var n=new nt(this.ctx);n.animateRect(e,{x:t+a/2,y:i+s/2,width:0,height:0},{x:t,y:i,width:a,height:s},r,function(){n.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,t,i,a){e.attr({fill:t}).animate(a).attr({fill:i})}}]),o}(),hs=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"drawYAxisTexts",value:function(e,t,i,a){var s=this.w,r=s.config.yaxis[0],n=s.globals.yLabelFormatters[0];return new X(this.ctx).drawText({x:e+r.labels.offsetX,y:t+r.labels.offsetY,text:n(a,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[i]:r.labels.style.colors})}}]),o}(),cs=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w;var t=this.w;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.globals.gridWidth,t.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.globals.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.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100;var i=t.config.plotOptions.pie.customScale,a=t.globals.gridWidth/2,s=t.globals.gridHeight/2;this.translateX=a-a*i,this.translateY=s-s*i,this.dataLabelsGroup=new X(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return O(o,[{key:"draw",value:function(e){var t=this,i=this.w,a=new X(this.ctx),s=a.group({class:"apexcharts-pie"});if(i.globals.noData)return s;for(var r=0,n=0;n-1&&this.pieClicked(u),i.config.dataLabels.enabled){var y=v.x,C=v.y,w=100*f/this.fullAngle+"%";if(f!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?t.endAngle=t.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(d=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(d)>this.fullAngle&&(d-=this.fullAngle);var c=Math.PI*(d-90)/180,u=i.centerX+r*Math.cos(h),g=i.centerY+r*Math.sin(h),f=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),x=L.polarToCartesian(i.centerX,i.centerY,i.donutSize,d),b=L.polarToCartesian(i.centerX,i.centerY,i.donutSize,l),m=s>180?1:0,v=["M",u,g,"A",r,r,0,m,1,f,p];return t=i.chartType==="donut"?[].concat(v,["L",x.x,x.y,"A",i.donutSize,i.donutSize,0,m,0,b.x,b.y,"L",u,g,"z"]).join(" "):i.chartType==="pie"||i.chartType==="polarArea"?[].concat(v,["L",i.centerX,i.centerY,"L",u,g]).join(" "):[].concat(v).join(" "),n.roundPathCorners(t,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new as(this.ctx),a=new X(this.ctx),s=new hs(this.ctx),r=a.group(),n=a.group(),l=i.niceScale(0,Math.ceil(this.maxY),0),h=l.result.reverse(),d=l.result.length;this.maxY=l.niceMax;for(var c=t.globals.radialSize,u=c/(d-1),g=0;g1&&e.total.show&&(s=e.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),l=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,r),a||typeof e.total.formatter!="function"||(i=e.total.formatter(r));var h=t===e.total.label;t=this.donutDataLabels.total.label?e.name.formatter(t,h,r):"",n!==null&&(n.textContent=t),l!==null&&(l.textContent=i),n!==null&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,s,a,e);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");r!==null&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new X(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(s.strokeWidth!==0){for(var r=[],n=360/i.globals.series.length,l=0;l0&&(C=t.getPreviousPath(b));for(var w=0;w=10?e.x>0?(i="start",a+=10):e.x<0&&(i="end",a-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?s-=10:e.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(e,10)&&t.globals.previousPaths[a].paths[0]!==void 0&&(i=t.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var a=[],s=0;s=360&&(p=360-Math.abs(this.startAngle)-.1);var x=s.drawPath({d:"",stroke:g,strokeWidth:h*parseInt(u.strokeWidth,10)/100,fill:"none",strokeOpacity:u.opacity,classes:"apexcharts-radialbar-area"});if(u.dropShadow.enabled){var b=u.dropShadow;n.dropShadow(x,b)}c.add(x),x.attr("id","apexcharts-radialbarTrack-"+d),this.animatePaths(x,{centerX:i.centerX,centerY:i.centerY,endAngle:p,startAngle:f,size:i.size,i:d,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}},{key:"drawArcs",value:function(i){var a=this.w,s=new X(this.ctx),r=new Te(this.ctx),n=new ue(this.ctx),l=s.group(),h=this.getStrokeWidth(i);i.size=i.size-h/2;var d=a.config.plotOptions.radialBar.hollow.background,c=i.size-h*i.series.length-this.margin*i.series.length-h*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,u=c-a.config.plotOptions.radialBar.hollow.margin;a.config.plotOptions.radialBar.hollow.image!==void 0&&(d=this.drawHollowImage(i,l,c,d));var g=this.drawHollow({size:u,centerX:i.centerX,centerY:i.centerY,fill:d||"transparent"});if(a.config.plotOptions.radialBar.hollow.dropShadow.enabled){var f=a.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(g,f)}var p=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(p=0);var x=null;if(this.radialDataLabels.show){var b=a.globals.dom.Paper.findOne(".apexcharts-datalabels-group");x=this.renderInnerDataLabels(b,this.radialDataLabels,{hollowSize:c,centerX:i.centerX,centerY:i.centerY,opacity:p})}a.config.plotOptions.radialBar.hollow.position==="back"&&(l.add(g),x&&l.add(x));var m=!1;a.config.plotOptions.radialBar.inverseOrder&&(m=!0);for(var v=m?i.series.length-1:0;m?v>=0:v100?100:i.series[v])/100,S=Math.round(this.totalAngle*A)+this.startAngle,M=void 0;a.globals.dataChanged&&(w=this.startAngle,M=Math.round(this.totalAngle*L.negToZero(a.globals.previousPaths[v])/100)+w),Math.abs(S)+Math.abs(C)>360&&(S-=.01),Math.abs(M)+Math.abs(w)>360&&(M-=.01);var P=S-C,I=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[v]:a.config.stroke.dashArray,T=s.drawPath({d:"",stroke:y,strokeWidth:h,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+v,strokeDashArray:I});if(X.setAttrs(T.node,{"data:angle":P,"data:value":i.series[v]}),a.config.chart.dropShadow.enabled){var z=a.config.chart.dropShadow;n.dropShadow(T,z,v)}if(n.setSelectionFilter(T,0,v),this.addListeners(T,this.radialDataLabels),k.add(T),T.attr({index:0,j:v}),this.barLabels.enabled){var E=L.polarToCartesian(i.centerX,i.centerY,i.size,C),Y=this.barLabels.formatter(a.globals.seriesNames[v],{seriesIndex:v,w:a}),F=["apexcharts-radialbar-label"];this.barLabels.onClick||F.push("apexcharts-no-click");var W=this.barLabels.useSeriesColors?a.globals.colors[v]:a.config.chart.foreColor;W||(W=a.config.chart.foreColor);var _=E.x+this.barLabels.offsetX,G=E.y+this.barLabels.offsetY,B=s.drawText({x:_,y:G,text:Y,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:W,cssClass:F.join(" ")});B.on("click",this.onBarLabelClick),B.attr({rel:v+1}),C!==0&&B.attr({"transform-origin":"".concat(_," ").concat(G),transform:"rotate(".concat(C," 0 0)")}),k.add(B)}var ee=0;!this.initialAnim||a.globals.resized||a.globals.dataChanged||(ee=a.config.chart.animations.speed),a.globals.dataChanged&&(ee=a.config.chart.animations.dynamicAnimation.speed),this.animDur=ee/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(T,{centerX:i.centerX,centerY:i.centerY,endAngle:S,startAngle:C,prevEndAngle:M,prevStartAngle:w,size:i.size,i:v,totalItems:2,animBeginArr:this.animBeginArr,dur:ee,shouldSetPrevPaths:!0})}return{g:l,elHollow:g,dataLabels:x}}},{key:"drawHollow",value:function(i){var a=new X(this.ctx).drawCircle(2*i.size);return a.attr({class:"apexcharts-radialbar-hollow",cx:i.centerX,cy:i.centerY,r:i.size,fill:i.fill}),a}},{key:"drawHollowImage",value:function(i,a,s,r){var n=this.w,l=new Te(this.ctx),h=L.randomId(),d=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)l.clippedImgArea({width:s,height:s,image:d,patternID:"pattern".concat(n.globals.cuid).concat(h)}),r="url(#pattern".concat(n.globals.cuid).concat(h,")");else{var c=n.config.plotOptions.radialBar.hollow.imageWidth,u=n.config.plotOptions.radialBar.hollow.imageHeight;if(c===void 0&&u===void 0){var g=n.globals.dom.Paper.image(d,function(p){this.move(i.centerX-p.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-p.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(g)}else{var f=n.globals.dom.Paper.image(d,function(p){this.move(i.centerX-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-u/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(c,u)});a.add(f)}}return r}},{key:"getStrokeWidth",value:function(i){var a=this.w;return i.size*(100-parseInt(a.config.plotOptions.radialBar.hollow.size,10))/100/(i.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(i){var a=parseInt(i.target.getAttribute("rel"),10)-1,s=this.barLabels.onClick,r=this.w;s&&s(r.globals.seriesNames[a],{w:r,seriesIndex:a})}}]),t}(),Pr=function(o){Ct(t,rt);var e=At(t);function t(){return H(this,t),e.apply(this,arguments)}return O(t,[{key:"draw",value:function(i,a){var s=this.w,r=new X(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=s.globals.seriesRangeStart,this.seriesRangeEnd=s.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var n=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),l=0;l0&&(this.visibleI=this.visibleI+1);var m=0,v=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[p][0],k=p);var y=this.barHelpers.initialPositions();f=y.y,u=y.zeroW,g=y.x,v=y.barWidth,m=y.barHeight,h=y.xDivision,d=y.yDivision,c=y.zeroH;for(var C=r.group({class:"apexcharts-datalabels","data:realIndex":p}),w=r.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0});return this.isHorizontal?(r=p.config.plotOptions.bar.rangeBarGroupRows?l+u*k:l+d*this.visibleI+u*k,y>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=p.globals.seriesRange[a][y].overlaps).indexOf(b)>-1&&(r=(d=f.barHeight/x.length)*this.visibleI+u*(100-parseInt(this.barOptions.barHeight,10))/100/2+d*(this.visibleI+x.indexOf(b))+u*k)):(k>-1&&!p.globals.timescaleLabels.length&&(n=p.config.plotOptions.bar.rangeBarGroupRows?h+g*k:h+c*this.visibleI+g*k),y>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=p.globals.seriesRange[a][y].overlaps).indexOf(b)>-1&&(n=(c=f.barWidth/x.length)*this.visibleI+g*(100-parseInt(this.barOptions.barWidth,10))/100/2+c*(this.visibleI+x.indexOf(b))+g*k)),{barYPosition:r,barXPosition:n,barHeight:d,barWidth:c}}},{key:"drawRangeColumnPaths",value:function(i){var a=i.indexes,s=i.x,r=i.xDivision,n=i.barWidth,l=i.barXPosition,h=i.zeroH,d=this.w,c=a.i,u=a.j,g=a.realIndex,f=a.translationsIndex,p=this.yRatio[f],x=this.getRangeValue(g,u),b=Math.min(x.start,x.end),m=Math.max(x.start,x.end);this.series[c][u]===void 0||this.series[c][u]===null?b=h:(b=h-b/p,m=h-m/p);var v=Math.abs(m-b),k=this.barHelpers.getColumnPaths({barXPosition:l,barWidth:n,y1:b,y2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:g,i:g,j:u,w:d});if(d.globals.isXNumeric){var y=this.getBarXForNumericXAxis({x:s,j:u,realIndex:g,barWidth:n});s=y.x,l=y.barXPosition}else s+=r;return{pathTo:k.pathTo,pathFrom:k.pathFrom,barHeight:v,x:s,y:x.start<0&&x.end<0?b:m,goalY:this.barHelpers.getGoalValues("y",null,h,c,u,f),barXPosition:l}}},{key:"preventBarOverflow",value:function(i){var a=this.w;return i<0&&(i=0),i>a.globals.gridWidth&&(i=a.globals.gridWidth),i}},{key:"drawRangeBarPaths",value:function(i){var a=i.indexes,s=i.y,r=i.y1,n=i.y2,l=i.yDivision,h=i.barHeight,d=i.barYPosition,c=i.zeroW,u=this.w,g=a.realIndex,f=a.j,p=this.preventBarOverflow(c+r/this.invertedYRatio),x=this.preventBarOverflow(c+n/this.invertedYRatio),b=this.getRangeValue(g,f),m=Math.abs(x-p),v=this.barHelpers.getBarpaths({barYPosition:d,barHeight:h,x1:p,x2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:g,realIndex:g,j:f,w:u});return u.globals.isXNumeric||(s+=l),{pathTo:v.pathTo,pathFrom:v.pathFrom,barWidth:m,x:b.start<0&&b.end<0?p:x,goalX:this.barHelpers.getGoalValues("x",c,null,g,f),y:s}}},{key:"getRangeValue",value:function(i,a){var s=this.w;return{start:s.globals.seriesRangeStart[i][a],end:s.globals.seriesRangeEnd[i][a]}}}]),t}(),Ir=function(){function o(e){H(this,o),this.w=e.w,this.lineCtx=e}return O(o,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if((i.config.fill.type==="gradient"||i.config.fill.type[e]==="gradient")&&new he(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var a=t[e].slice();a[a.length-1]=a[a.length-1]+1e-6,t[e]=a}return t}},{key:"calculatePoints",value:function(e){var t=e.series,i=e.realIndex,a=e.x,s=e.y,r=e.i,n=e.j,l=e.prevY,h=this.w,d=[],c=[];if(n===0){var u=this.lineCtx.categoryAxisCorrection+h.config.markers.offsetX;h.globals.isXNumeric&&(u=(h.globals.seriesX[i][0]-h.globals.minX)/this.lineCtx.xRatio+h.config.markers.offsetX),d.push(u),c.push(L.isNumber(t[r][0])?l+h.config.markers.offsetY:null),d.push(a+h.config.markers.offsetX),c.push(L.isNumber(t[r][n+1])?s+h.config.markers.offsetY:null)}else d.push(a+h.config.markers.offsetX),c.push(L.isNumber(t[r][n+1])?s+h.config.markers.offsetY:null);return{x:d,y:c}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,a=e.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&(n.type==="line"?(this.lineCtx.appendPathFrom=!1,t=s.globals.previousPaths[r].paths[0].d):n.type==="area"&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(t=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t,i,a,s=e.i,r=e.realIndex,n=e.series,l=e.prevY,h=e.lineYPosition,d=e.translationsIndex,c=this.w,u=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((t=this.w.config.series[r])===null||t===void 0?void 0:t.type)==="bar"||((i=this.w.config.series[r])===null||i===void 0?void 0:i.type)==="column");if(((a=n[s])===null||a===void 0?void 0:a[0])!==void 0)l=(h=u&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[d]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[d]:0);else if(u&&s>0&&n[s][0]===void 0){for(var g=s-1;g>=0;g--)if(n[g][0]!==null&&n[g][0]!==void 0){l=h=this.lineCtx.prevSeriesY[g][0];break}}return{prevY:l,lineYPosition:h}}}]),o}(),Tr=function(o){for(var e,t,i,a,s=function(d){for(var c=[],u=d[0],g=d[1],f=c[0]=oi(u,g),p=1,x=d.length-1;p9&&(a=3*i/Math.sqrt(a),s[l]=a*e,s[l+1]=a*t);for(var h=0;h<=r;h++)a=(o[Math.min(r,h+1)][0]-o[Math.max(0,h-1)][0])/(6*(1+s[h]*s[h])),n.push([a||0,s[h]*a||0]);return n},zr=function(o){var e=Tr(o),t=o[1],i=o[0],a=[],s=e[1],r=e[0];a.push(i,[i[0]+r[0],i[1]+r[1],t[0]-s[0],t[1]-s[1],t[0],t[1]]);for(var n=2,l=e.length;n1&&i[1].length<6){var a=i[0].length;i[1]=[2*i[0][a-2]-i[0][a-4],2*i[0][a-1]-i[0][a-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function oi(o,e){return(e[1]-o[1])/(e[0]-o[0])}var li=function(){function o(e,t,i){H(this,o),this.ctx=e,this.w=e.w,this.xyRatios=t,this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||i,this.scatter=new ts(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Ir(this),this.markers=new ct(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return O(o,[{key:"draw",value:function(e,t,i,a){var s,r=this.w,n=new X(this.ctx),l=r.globals.comboCharts?t:r.config.chart.type,h=n.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),d=new he(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=d.getLogSeries(e),this.yRatio=d.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],u=0;u1?g:0;this._initSerieVariables(e,u,g);var p=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,k=m,y=void 0,C=k,w=this.zeroY,A=this.zeroY;w=this.lineHelpers.determineFirstPrevY({i:u,realIndex:g,series:e,prevY:w,lineYPosition:0,translationsIndex:f}).prevY,r.config.stroke.curve==="monotoneCubic"&&e[u][0]===null?p.push(null):p.push(w),v=w,l==="rangeArea"&&(y=A=this.lineHelpers.determineFirstPrevY({i:u,realIndex:g,series:a,prevY:A,lineYPosition:0,translationsIndex:f}).prevY,x.push(p[0]!==null?A:null));var S=this._calculatePathsFrom({type:l,series:e,i:u,realIndex:g,translationsIndex:f,prevX:C,prevY:w,prevY2:A}),M=[p[0]],P=[x[0]],I={type:l,series:e,realIndex:g,translationsIndex:f,i:u,x:m,y:1,pX:k,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:p,y2Arrj:x,seriesRangeEnd:a},T=this._iterateOverDataPoints(R(R({},I),{},{iterations:l==="rangeArea"?e[u].length-1:void 0,isRangeStart:!0}));if(l==="rangeArea"){for(var z=this._calculatePathsFrom({series:a,i:u,realIndex:g,prevX:C,prevY:A}),E=this._iterateOverDataPoints(R(R({},I),{},{series:a,xArrj:[m],yArrj:M,y2Arrj:P,pY:y,areaPaths:T.areaPaths,pathsFrom:z,iterations:a[u].length-1,isRangeStart:!1})),Y=T.linePaths.length/2,F=0;F=0;W--)h.add(c[W]);else for(var _=0;_1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||a.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:a.config.series[i].zIndex!==void 0?a.config.series[i].zIndex:i,seriesName:L.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=e[t].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,a,s,r=e.type,n=e.series,l=e.i,h=e.realIndex,d=e.translationsIndex,c=e.prevX,u=e.prevY,g=e.prevY2,f=this.w,p=new X(this.ctx);if(n[l][0]===null){for(var x=0;x0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:h});a=b.pathFromLine,s=b.pathFromArea}return{prevX:c,prevY:u,linePath:t,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,a=e.i,s=e.paths,r=this.w,n=new X(this.ctx),l=new Te(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var h=r.config.forecastDataPoints;if(h.count>0&&t!=="rangeArea"){var d=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-h.count-1],c=n.drawRect(d,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var u=n.drawRect(0,0,d,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if(t==="area")for(var f=l.fillPath({seriesNumber:i}),p=0;p0&&t!=="rangeArea"){var w=n.renderPaths(y);w.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&w.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(w),w.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),C.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var t,i,a=this,s=e.type,r=e.series,n=e.iterations,l=e.realIndex,h=e.translationsIndex,d=e.i,c=e.x,u=e.y,g=e.pX,f=e.pY,p=e.pathsFrom,x=e.linePaths,b=e.areaPaths,m=e.seriesIndex,v=e.lineYPosition,k=e.xArrj,y=e.yArrj,C=e.y2Arrj,w=e.isRangeStart,A=e.seriesRangeEnd,S=this.w,M=new X(this.ctx),P=this.yRatio,I=p.prevY,T=p.linePath,z=p.areaPath,E=p.pathFromLine,Y=p.pathFromArea,F=L.isNumber(S.globals.minYArr[l])?S.globals.minYArr[l]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var W=function(fe,xe){return xe-fe/P[h]+2*(a.isReversed?fe/P[h]:0)},_=u,G=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((t=this.w.config.series[l])===null||t===void 0?void 0:t.type)==="bar"||((i=this.w.config.series[l])===null||i===void 0?void 0:i.type)==="column"),B=S.config.stroke.curve;Array.isArray(B)&&(B=Array.isArray(m)?B[m[d]]:B[d]);for(var ee,oe=0,K=0;K0&&S.globals.collapsedSeries.length0;xe--){if(!(S.globals.collapsedSeriesIndices.indexOf((m==null?void 0:m[xe])||xe)>-1))return xe;xe--}return 0}(d-1)][K+1]:v=this.zeroY:v=this.zeroY,pe?u=W(F,v):(u=W(r[d][K+1],v),s==="rangeArea"&&(_=W(A[d][K+1],v))),k.push(r[d][K+1]===null?null:c),!pe||S.config.stroke.curve!=="smooth"&&S.config.stroke.curve!=="monotoneCubic"?(y.push(u),C.push(_)):(y.push(null),C.push(null));var $=this.lineHelpers.calculatePoints({series:r,x:c,y:u,realIndex:l,i:d,j:K,prevY:I}),ie=this._createPaths({type:s,series:r,i:d,realIndex:l,j:K,x:c,y:u,y2:_,xArrj:k,yArrj:y,y2Arrj:C,pX:g,pY:f,pathState:oe,segmentStartX:ee,linePath:T,areaPath:z,linePaths:x,areaPaths:b,curve:B,isRangeStart:w});b=ie.areaPaths,x=ie.linePaths,g=ie.pX,f=ie.pY,oe=ie.pathState,ee=ie.segmentStartX,z=ie.areaPath,T=ie.linePath,!this.appendPathFrom||S.globals.hasNullValues||B==="monotoneCubic"&&s==="rangeArea"||(E+=M.line(c,this.areaBottomY),Y+=M.line(c,this.areaBottomY)),this.handleNullDataPoints(r,$,d,K,l),this._handleMarkersAndLabels({type:s,pointsPos:$,i:d,j:K,realIndex:l,isRangeStart:w})}return{yArrj:y,xArrj:k,pathFromArea:Y,areaPaths:b,pathFromLine:E,linePaths:x,linePath:T,areaPath:z}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.type,i=e.pointsPos,a=e.isRangeStart,s=e.i,r=e.j,n=e.realIndex,l=this.w,h=new st(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{l.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var d=this.markers.plotChartMarkers(i,n,r+1);d!==null&&this.elPointsMain.add(d)}var c=h.drawDataLabel({type:t,isRangeStart:a,pos:i,i:n,j:r+1});c!==null&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(e){var t=e.type,i=e.series,a=e.i;e.realIndex;var s,r=e.j,n=e.x,l=e.y,h=e.xArrj,d=e.yArrj,c=e.y2,u=e.y2Arrj,g=e.pX,f=e.pY,p=e.pathState,x=e.segmentStartX,b=e.linePath,m=e.areaPath,v=e.linePaths,k=e.areaPaths,y=e.curve,C=e.isRangeStart,w=new X(this.ctx),A=this.areaBottomY,S=t==="rangeArea",M=t==="rangeArea"&&C;switch(y){case"monotoneCubic":var P=C?d:u;switch(p){case 0:if(P[r+1]===null)break;p=1;case 1:if(!(S?h.length===i[a].length:r===i[a].length-2))break;case 2:var I=C?h:h.slice().reverse(),T=C?P:P.slice().reverse(),z=(s=T,I.map(function(J,$){return[J,s[$]]}).filter(function(J){return J[1]!==null})),E=z.length>1?zr(z):z,Y=[];S&&(M?k=z:Y=k.reverse());var F=0,W=0;if(function(J,$){for(var ie=function(dt){var be=[],Xe=0;return dt.forEach(function(ps){ps!==null?Xe++:Xe>0&&(be.push(Xe),Xe=0)}),Xe>0&&be.push(Xe),be}(J),fe=[],xe=0,ze=0;xe4?(ze+="C".concat(be[0],", ").concat(be[1]),ze+=", ".concat(be[2],", ").concat(be[3]),ze+=", ".concat(be[4],", ").concat(be[5])):Xe>2&&(ze+="S".concat(be[0],", ").concat(be[1]),ze+=", ".concat(be[2],", ").concat(be[3]))}return ze}(J),ie=W,fe=(W+=J.length)-1;M?b=w.move(z[ie][0],z[ie][1])+$:S?b=w.move(Y[ie][0],Y[ie][1])+w.line(z[ie][0],z[ie][1])+$+w.line(Y[fe][0],Y[fe][1]):(b=w.move(z[ie][0],z[ie][1])+$,m=b+w.line(z[fe][0],A)+w.line(z[ie][0],A)+"z",k.push(m)),v.push(b)}),S&&F>1&&!M){var _=v.slice(F).reverse();v.splice(F),_.forEach(function(J){return v.push(J)})}p=0}break;case"smooth":var G=.35*(n-g);if(i[a][r]===null)p=0;else switch(p){case 0:if(x=g,b=M?w.move(g,u[r])+w.line(g,f):w.move(g,f),m=w.move(g,f),i[a][r+1]===null||i[a][r+1]===void 0){v.push(b),k.push(m);break}if(p=1,r=i[a].length-2&&(M&&(b+=w.curve(n,l,n,l,n,c)+w.move(n,c)),m+=w.curve(n,l,n,l,n,A)+w.line(x,A)+"z",v.push(b),k.push(m),p=-1)}}g=n,f=l;break;default:var oe=function(J,$,ie){var fe=[];switch(J){case"stepline":fe=w.line($,null,"H")+w.line(null,ie,"V");break;case"linestep":fe=w.line(null,ie,"V")+w.line($,null,"H");break;case"straight":fe=w.line($,ie)}return fe};if(i[a][r]===null)p=0;else switch(p){case 0:if(x=g,b=M?w.move(g,u[r])+w.line(g,f):w.move(g,f),m=w.move(g,f),i[a][r+1]===null||i[a][r+1]===void 0){v.push(b),k.push(m);break}if(p=1,r=i[a].length-2&&(M&&(b+=w.line(n,c)),m+=w.line(n,A)+w.line(x,A)+"z",v.push(b),k.push(m),p=-1)}}g=n,f=l}return{linePaths:v,areaPaths:k,pX:g,pY:f,pathState:p,segmentStartX:x,linePath:b,areaPath:m}}},{key:"handleNullDataPoints",value:function(e,t,i,a,s){var r=this.w;if(e[i][a]===null&&r.config.markers.showNullDataPoints||e[i].length===1){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var l=this.markers.plotChartMarkers(t,s,a+1,n,!0);l!==null&&this.elPointsMain.add(l)}}}]),o}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function o(n,l,h,d){this.xoffset=n,this.yoffset=l,this.height=d,this.width=h,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(c){var u,g=[],f=this.xoffset,p=this.yoffset,x=s(c)/this.height,b=s(c)/this.width;if(this.width>=this.height)for(u=0;u=this.height){var g=c/this.height,f=this.width-g;u=new o(this.xoffset+g,this.yoffset,f,this.height)}else{var p=c/this.width,x=this.height-p;u=new o(this.xoffset,this.yoffset+p,this.width,x)}return u}}function e(n,l,h,d,c){d=d===void 0?0:d,c=c===void 0?0:c;var u=t(function(g,f){var p,x=[],b=f/s(g);for(p=0;p=v}(l,u=n[0],c)?(l.push(u),t(n.slice(1),l,h,d)):(g=h.cutArea(s(l),d),d.push(h.getCoordinates(l)),t(n,[],g,d)),d;d.push(h.getCoordinates(l))}function i(n,l){var h=Math.min.apply(Math,n),d=Math.max.apply(Math,n),c=s(n);return Math.max(Math.pow(l,2)*d/Math.pow(c,2),Math.pow(c,2)/(Math.pow(l,2)*h))}function a(n){return n&&n.constructor===Array}function s(n){var l,h=0;for(l=0;lr-a&&h.width<=n-s){var d=l.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(d.x," ").concat(d.y,") translate(").concat(h.height/3,")"))}}},{key:"truncateLabels",value:function(e,t,i,a,s,r){var n=new X(this.ctx),l=n.getTextRects(e,t).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,h=n.getTextBasedOnMaxWidth({text:e,maxWidth:l,fontSize:t});return e.length!==h.length&&l/t<5?"":h}},{key:"animateTreemap",value:function(e,t,i,a){var s=new nt(this.ctx);s.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,function(){s.animationCompleted(e)})}}]),o}(),ds=86400,Er=10/ds,Yr=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return O(o,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new de(this.ctx),r=(t-e)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(e,t,this.utc),l=a.globals.gridWidth/r,h=l/24,d=h/60,c=d/60,u=Math.floor(24*r),g=Math.floor(1440*r),f=Math.floor(r*ds),p=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:h,minutesWidthOnXAxis:d,secondsWidthOnXAxis:c,numberOfSeconds:f,numberOfMinutes:g,numberOfHours:u,numberOfDays:p,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var k=this.timeScaleArray.map(function(y){var C={position:y.position,unit:y.unit,year:y.year,day:y.day?y.day:1,hour:y.hour?y.hour:0,month:y.month+1};return y.unit==="month"?R(R({},C),{},{day:1,value:y.value+1}):y.unit==="day"||y.unit==="hour"?R(R({},C),{},{value:y.value}):y.unit==="minute"?R(R({},C),{},{value:y.value,minute:y.value}):y.unit==="second"?R(R({},C),{},{value:y.value,minute:y.minute,second:y.second}):y});return k.filter(function(y){var C=1,w=Math.ceil(a.globals.gridWidth/120),A=y.value;a.config.xaxis.tickAmount!==void 0&&(w=a.config.xaxis.tickAmount),k.length>w&&(C=Math.floor(k.length/w));var S=!1,M=!1;switch(i.tickInterval){case"years":y.unit==="year"&&(S=!0);break;case"half_year":C=7,y.unit==="year"&&(S=!0);break;case"months":C=1,y.unit==="year"&&(S=!0);break;case"months_fortnight":C=15,y.unit!=="year"&&y.unit!=="month"||(S=!0),A===30&&(M=!0);break;case"months_days":C=10,y.unit==="month"&&(S=!0),A===30&&(M=!0);break;case"week_days":C=8,y.unit==="month"&&(S=!0);break;case"days":C=1,y.unit==="month"&&(S=!0);break;case"hours":y.unit==="day"&&(S=!0);break;case"minutes_fives":case"seconds_fives":A%5!=0&&(M=!0);break;case"seconds_tens":A%10!=0&&(M=!0)}if(i.tickInterval==="hours"||i.tickInterval==="minutes_fives"||i.tickInterval==="seconds_tens"||i.tickInterval==="seconds_fives"){if(!M)return!0}else if((A%C==0||S)&&!M)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var i=this.w,a=this.formatDates(e),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new Wt(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,i=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,s=e.daysWidthOnXAxis,r=e.numberOfYears,n=t.minYear,l=0,h=new de(this.ctx),d="year";if(t.minDate>1||t.minMonth>0){var c=h.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);l=(h.determineDaysOfYear(t.minYear)-c+1)*s,n=t.minYear+1,this.timeScaleArray.push({position:l,value:n,unit:d,year:n,month:L.monthMod(i+1)})}else t.minDate===1&&t.minMonth===0&&this.timeScaleArray.push({position:l,value:n,unit:d,year:a,month:L.monthMod(i+1)});for(var u=n,g=l,f=0;f1){h=(d.determineDaysOfMonths(a+1,t.minYear)-i+1)*r,l=L.monthMod(a+1);var g=s+u,f=L.monthMod(l),p=l;l===0&&(c="year",p=g,f=1,g+=u+=1),this.timeScaleArray.push({position:h,value:p,unit:c,year:g,month:f})}else this.timeScaleArray.push({position:h,value:l,unit:c,year:s,month:L.monthMod(a)});for(var x=l+1,b=h,m=0,v=1;mn.determineDaysOfMonths(k+1,y)&&(d=1,l="month",g=k+=1),k},u=(24-t.minHour)*s,g=h,f=c(d,i,a);t.minHour===0&&t.minDate===1?(u=0,g=L.monthMod(t.minMonth),l="month",d=t.minDate):t.minDate!==1&&t.minHour===0&&t.minMinute===0&&(u=0,h=t.minDate,g=h,f=c(d=h,i,a),g!==1&&(l="day")),this.timeScaleArray.push({position:u,value:g,unit:l,year:this._getYear(a,f,0),month:L.monthMod(f),day:d});for(var p=u,x=0;xl.determineDaysOfMonths(w+1,s)&&(x=1,w+=1),{month:w,date:x}},c=function(C,w){return C>l.determineDaysOfMonths(w+1,s)?w+=1:w},u=60-(t.minMinute+t.minSecond/60),g=u*r,f=t.minHour+1,p=f;u===60&&(g=0,p=f=t.minHour);var x=i;p>=24&&(p=0,h="day",f=x+=1);var b=d(x,a).month;b=c(x,b),f>31&&(f=x=1),this.timeScaleArray.push({position:g,value:f,unit:h,day:x,hour:p,year:s,month:L.monthMod(b)}),p++;for(var m=g,v=0;v=24&&(p=0,h="day",b=d(x+=1,b).month,b=c(x,b));var k=this._getYear(s,b,0);m=60*r+m;var y=p===0?x:p;this.timeScaleArray.push({position:m,value:y,unit:h,hour:p,day:x,year:k,month:L.monthMod(b)}),p++}}},{key:"generateMinuteScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,a=e.currentMinute,s=e.currentHour,r=e.currentDate,n=e.currentMonth,l=e.currentYear,h=e.minutesWidthOnXAxis,d=e.secondsWidthOnXAxis,c=e.numberOfMinutes,u=a+1,g=r,f=n,p=l,x=s,b=(60-i-t/1e3)*d,m=0;m=60&&(u=0,(x+=1)===24&&(x=0)),this.timeScaleArray.push({position:b,value:u,unit:"minute",hour:x,minute:u,day:g,year:this._getYear(p,f,0),month:L.monthMod(f)}),b+=h,u++}},{key:"generateSecondScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,a=e.currentMinute,s=e.currentHour,r=e.currentDate,n=e.currentMonth,l=e.currentYear,h=e.secondsWidthOnXAxis,d=e.numberOfSeconds,c=i+1,u=a,g=r,f=n,p=l,x=s,b=(1e3-t)/1e3*h,m=0;m=60&&(c=0,++u>=60&&(u=0,++x===24&&(x=0))),this.timeScaleArray.push({position:b,value:c,unit:"second",hour:x,minute:u,second:c,day:g,year:this._getYear(p,f,0),month:L.monthMod(f)}),b+=h,c++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return e.month===0&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?i+=e.unit==="day"?"-"+("0"+t).slice(-2):"-01":i+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?i+=e.unit==="hour"?"T"+("0"+t).slice(-2):"T00":i+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?i+=":"+("0"+t).slice(-2):i+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?i+=":"+("0"+t).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map(function(a){var s=a.value.toString(),r=new de(t.ctx),n=t.createRawDateString(a,s),l=r.getDate(r.parseDate(n));if(t.utc||(l=r.getDate(r.parseDateWithTimezone(n))),i.config.xaxis.labels.format===void 0){var h="dd MMM",d=i.config.xaxis.labels.datetimeFormatter;a.unit==="year"&&(h=d.year),a.unit==="month"&&(h=d.month),a.unit==="day"&&(h=d.day),a.unit==="hour"&&(h=d.hour),a.unit==="minute"&&(h=d.minute),a.unit==="second"&&(h=d.second),s=r.formatDate(l,h)}else s=r.formatDate(l,i.config.xaxis.labels.format);return{dateString:n,position:a.position,value:s,unit:a.unit,year:a.year,month:a.month}})}},{key:"removeOverlappingTS",value:function(e){var t,i=this,a=new X(this.ctx),s=!1;e.length>0&&e[0].value&&e.every(function(l){return l.value.length===e[0].value.length})&&(s=!0,t=a.getTextRects(e[0].value).width);var r=0,n=e.map(function(l,h){if(h>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var d=s?t:a.getTextRects(e[r].value).width,c=e[r].position;return l.position>c+d+10?(r=h,l):null}return l});return n=n.filter(function(l){return l!==null})}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),o}(),Hr=function(){function o(e,t){H(this,o),this.ctx=t,this.w=t.w,this.el=e}return O(o,[{key:"setupElements",value:function(){var e=this.w,t=e.globals,i=e.config,a=i.chart.type;t.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),t.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),t.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,t.chartClass=".apexcharts".concat(t.chartID),t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),X.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas ".concat(t.chartClass.substring(1))}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=window.SVG().addTo(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),t.dom.Paper.node.style.background=i.theme.mode!=="dark"||i.chart.background?i.theme.mode!=="light"||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject"),X.setAttrs(t.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.dom.elLegendForeign.appendChild(t.dom.elLegendWrap),t.dom.Paper.node.appendChild(t.dom.elLegendForeign),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},l=s.chart.type||"line",h=null,d=0;r.series.forEach(function(C,w){var A=e[w].type||l;n[A]?(A==="rangeArea"?(n[A].series.push(r.seriesRangeStart[w]),n[A].seriesRangeEnd.push(r.seriesRangeEnd[w])):n[A].series.push(C),n[A].i.push(w),A!=="column"&&A!=="bar"||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(A)?h=A:A==="bar"?(n.column.series.push(C),n.column.i.push(w)):console.warn("You have specified an unrecognized series type (".concat(A,").")),l!==A&&A!=="scatter"&&d++}),d>0&&(h&&console.warn("Chart or series type ".concat(h," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(d-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=d>0);var c=new li(a,t),u=new ni(a,t);a.pie=new cs(a);var g=new Mr(a);a.rangeBar=new Pr(a,t);var f=new Lr(a),p=[];if(r.comboCharts){var x,b,m=new he(a);if(n.area.series.length>0&&(x=p).push.apply(x,ce(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c))),n.column.series.length>0)if(s.chart.stacked){var v=new ga(a,t);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new rt(a,t),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0&&(b=p).push.apply(b,ce(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c))),n.candlestick.series.length>0&&p.push(u.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(u.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var k=new li(a,t,!0);p.push(k.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var y=new li(a,t,!0);p.push(y.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":s.chart.stacked?p=new ga(a,t).draw(r.series):(a.bar=new rt(a,t),p=a.bar.draw(r.series));break;case"candlestick":p=new ni(a,t).draw(r.series,"candlestick");break;case"boxPlot":p=new ni(a,t).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Sr(a,t).draw(r.series);break;case"treemap":p=new Rr(a,t).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=g.draw(r.series);break;case"radar":p=f.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var e=this.w,t=e.globals,i=e.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",t.svgWidth=i.chart.width,t.svgHeight=i.chart.height;var a=L.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();s==="%"?L.isNumber(a[0])&&(a[0].width===0&&(a=L.getDimensions(this.el.parentNode)),t.svgWidth=a[0]*parseInt(i.chart.width,10)/100):s!=="px"&&s!==""||(t.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if(t.svgHeight!=="auto"&&t.svgHeight!=="")if(r==="%"){var n=L.getDimensions(this.el.parentNode);t.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else t.svgHeight=parseInt(i.chart.height,10);else t.svgHeight=t.axisCharts?t.svgWidth/1.61:t.svgWidth/1.2;if(t.svgWidth=Math.max(t.svgWidth,0),t.svgHeight=Math.max(t.svgHeight,0),X.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),r!=="%"){var l=i.chart.sparkline.enabled?0:t.axisCharts?i.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(t.svgHeight+l,"px")}t.dom.elWrap.style.width="".concat(t.svgWidth,"px"),t.dom.elWrap.style.height="".concat(t.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,t=e.translateY,i=e.translateX;X.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(t,")")})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=0,a=e.config.chart.sparkline.enabled?1:15;a+=e.config.grid.padding.bottom,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(i=new ss(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*e.globals.radialSize;if(s&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){var n=L.getBoundingClientRect(s);r=n.bottom;var l=n.bottom-n.top;r=Math.max(2.05*e.globals.radialSize,l)}var h=Math.ceil(r+t.translateY+i+a);t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",h),e.config.chart.height&&String(e.config.chart.height).includes("%")||(t.dom.elWrap.style.height="".concat(h,"px"),X.setAttrs(t.dom.Paper.node,{height:h}),t.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(h,"px"))}},{key:"coreCalculations",value:function(){new Ci(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map(function(){return[]})},i=new es,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=t(),a.seriesYvalues=t()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var e=this.w,t=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new Si(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new Si(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Yr(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}t=new he(this.ctx).getCalculatedRatios()}return t}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.ctx,i=this.w;if(i.config.chart.brush.enabled&&typeof i.config.chart.events.selection!="function"){var a=Array.isArray(i.config.chart.brush.targets)?i.config.chart.brush.targets:[i.config.chart.brush.target];a.forEach(function(s){var r=t.constructor.getChartByID(s);r.w.globals.brushSource=e.ctx,typeof r.w.config.chart.events.zoomed!="function"&&(r.w.config.chart.events.zoomed=function(){return e.updateSourceChart(r)}),typeof r.w.config.chart.events.scrolled!="function"&&(r.w.config.chart.events.scrolled=function(){return e.updateSourceChart(r)})}),i.config.chart.events.selection=function(s,r){a.forEach(function(n){t.constructor.getChartByID(n).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}}]),o}(),Or=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(n){var l=[t.ctx];s&&(l=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(l=[t.ctx],t.ctx.w.globals.isExecCalled=!1),l.forEach(function(h,d){var c=h.w;if(c.globals.shouldAnimate=a,i||(c.globals.resized=!0,c.globals.dataChanged=!0,a&&h.series.getPreviousPaths()),e&&at(e)==="object"&&(h.config=new wt(e),e=he.extendArrayProps(h.config,e,c),h.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,c.config=L.extend(c.config,e),r&&(c.globals.lastXAxis=e.xaxis?L.clone(e.xaxis):[],c.globals.lastYAxis=e.yaxis?L.clone(e.yaxis):[],c.globals.initialConfig=L.extend({},c.config),c.globals.initialSeries=L.clone(c.config.series),e.series))){for(var u=0;u2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(s){var r,n=i.w;return n.globals.shouldAnimate=t,n.globals.dataChanged=!0,t&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?((r=e.map(function(l,h){return i._extendSeries(l,h)})).length===0&&(r=[{data:[]}]),n.config.series=r):n.config.series=e.slice(),a&&(n.globals.initialConfig.series=L.clone(n.config.series),n.globals.initialSeries=L.clone(n.config.series)),i.ctx.update().then(function(){s(i.ctx)})})}},{key:"_extendSeries",value:function(e,t){var i=this.w,a=i.config.series[t];return R(R({},i.config.series[t]),{},{name:e.name?e.name:a==null?void 0:a.name,color:e.color?e.color:a==null?void 0:a.color,type:e.type?e.type:a==null?void 0:a.type,group:e.group?e.group:a==null?void 0:a.group,hidden:e.hidden!==void 0?e.hidden:a==null?void 0:a.hidden,data:e.data?e.data:a==null?void 0:a.data,zIndex:e.zIndex!==void 0?e.zIndex:t})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"'], ").concat(s," circle[j='").concat(t,"'], ").concat(s," rect[j='").concat(t,"']")):t===void 0&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"']")),i.config.chart.type!=="pie"&&i.config.chart.type!=="polarArea"&&i.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),a?(new X(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach(function(a){e.xaxis[a]!==void 0&&(t.config.xaxis[a]=e.xaxis[a],t.globals.lastXAxis[a]=e.xaxis[a])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var i=new yt(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;e&&e.xaxis&&(a=e.xaxis),e&&e.yaxis&&(s=e.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(n){s[n]!==void 0&&(i.config.yaxis[n].min=s[n].min,i.config.yaxis[n].max=s[n].max)};i.config.yaxis.map(function(n,l){i.globals.zoomed||s[l]!==void 0?r(l):t.ctx.opts.yaxis[l]!==void 0&&(n.min=t.ctx.opts.yaxis[l].min,n.max=t.ctx.opts.yaxis[l].max)})}}]),o}();(function(){function o(){for(var s=arguments.length>0&&arguments[0]!==c?arguments[0]:[],r=arguments.length>1?arguments[1]:c,n=arguments.length>2?arguments[2]:c,l=arguments.length>3?arguments[3]:c,h=arguments.length>4?arguments[4]:c,d=arguments.length>5?arguments[5]:c,c=arguments.length>6?arguments[6]:c,u=s.slice(r,n||c),g=l.slice(h,d||c),f=0,p={pos:[0,0],start:[0,0]},x={pos:[0,0],start:[0,0]};u[f]=e.call(p,u[f]),g[f]=e.call(x,g[f]),u[f][0]!=g[f][0]||u[f][0]=="M"||u[f][0]=="A"&&(u[f][4]!=g[f][4]||u[f][5]!=g[f][5])?(Array.prototype.splice.apply(u,[f,1].concat(i.call(p,u[f]))),Array.prototype.splice.apply(g,[f,1].concat(i.call(x,g[f])))):(u[f]=t.call(p,u[f]),g[f]=t.call(x,g[f])),!(++f==u.length&&f==g.length);)f==u.length&&u.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]),f==g.length&&g.push(["C",x.pos[0],x.pos[1],x.pos[0],x.pos[1],x.pos[0],x.pos[1]]);return{start:u,dest:g}}function e(s){switch(s[0]){case"z":case"Z":s[0]="L",s[1]=this.start[0],s[2]=this.start[1];break;case"H":s[0]="L",s[2]=this.pos[1];break;case"V":s[0]="L",s[2]=s[1],s[1]=this.pos[0];break;case"T":s[0]="Q",s[3]=s[1],s[4]=s[2],s[1]=this.reflection[1],s[2]=this.reflection[0];break;case"S":s[0]="C",s[6]=s[4],s[5]=s[3],s[4]=s[2],s[3]=s[1],s[2]=this.reflection[1],s[1]=this.reflection[0]}return s}function t(s){var r=s.length;return this.pos=[s[r-2],s[r-1]],"SCQT".indexOf(s[0])!=-1&&(this.reflection=[2*this.pos[0]-s[r-4],2*this.pos[1]-s[r-3]]),s}function i(s){var r=[s];switch(s[0]){case"M":return this.pos=this.start=[s[1],s[2]],r;case"L":s[5]=s[3]=s[1],s[6]=s[4]=s[2],s[1]=this.pos[0],s[2]=this.pos[1];break;case"Q":s[6]=s[4],s[5]=s[3],s[4]=1*s[4]/3+2*s[2]/3,s[3]=1*s[3]/3+2*s[1]/3,s[2]=1*this.pos[1]/3+2*s[2]/3,s[1]=1*this.pos[0]/3+2*s[1]/3;break;case"A":r=function(n,l){var h,d,c,u,g,f,p,x,b,m,v,k,y,C,w,A,S,M,P,I,T,z,E,Y,F,W,_=Math.abs(l[1]),G=Math.abs(l[2]),B=l[3]%360,ee=l[4],oe=l[5],K=l[6],pe=l[7],J=new Q(n),$=new Q(K,pe),ie=[];if(_===0||G===0||J.x===$.x&&J.y===$.y)return[["C",J.x,J.y,$.x,$.y,$.x,$.y]];for(h=new Q((J.x-$.x)/2,(J.y-$.y)/2).transform(new D().rotate(B)),d=h.x*h.x/(_*_)+h.y*h.y/(G*G),d>1&&(_*=d=Math.sqrt(d),G*=d),c=new D().rotate(B).scale(1/_,1/G).rotate(-B),J=J.transform(c),$=$.transform(c),u=[$.x-J.x,$.y-J.y],f=u[0]*u[0]+u[1]*u[1],g=Math.sqrt(f),u[0]/=g,u[1]/=g,p=f<4?Math.sqrt(1-f/4):0,ee===oe&&(p*=-1),x=new Q(($.x+J.x)/2+p*-u[1],($.y+J.y)/2+p*u[0]),b=new Q(J.x-x.x,J.y-x.y),m=new Q($.x-x.x,$.y-x.y),v=Math.acos(b.x/Math.sqrt(b.x*b.x+b.y*b.y)),b.y<0&&(v*=-1),k=Math.acos(m.x/Math.sqrt(m.x*m.x+m.y*m.y)),m.y<0&&(k*=-1),oe&&v>k&&(k+=2*Math.PI),!oe&&v0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(r===!1)return!1;for(var n=r,l=s.length;n(o.changedTouches&&(o=o.changedTouches[0]),{x:o.clientX,y:o.clientY});class Fr{constructor(e){e.remember("_draggable",this),this.el=e,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(e){e?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(e){const t=!e.type.indexOf("mouse");if(t&&e.which!==1&&e.buttons!==0||this.el.dispatch("beforedrag",{event:e,handler:this}).defaultPrevented)return;e.preventDefault(),e.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point(pa(e));const i=(t?"mouseup":"touchend")+".drag";Ee(window,(t?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),Ee(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:e,handler:this,box:this.box})}drag(e){const{box:t,lastClick:i}=this,a=this.el.point(pa(e)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return t;const n=t.x+s,l=t.y+r;this.box=new le(n,l,t.w,t.h),this.lastClick=a,this.el.dispatch("dragmove",{event:e,handler:this,box:this.box}).defaultPrevented||this.move(n,l)}move(e,t){this.el.type==="svg"?Oe.prototype.move.call(this.el,e,t):this.el.move(e,t)}endDrag(e){this.drag(e),this.el.fire("dragend",{event:e,handler:this,box:this.box}),Se(window,"mousemove.drag"),Se(window,"touchmove.drag"),Se(window,"mouseup.drag"),Se(window,"touchend.drag"),this.init(!0)}}/*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse * @version 4.0.1 * https://github.com/svgdotjs/svg.select.js * * @copyright Ulrich-Matthias Schäfer * @license MIT * * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) */function Li(o,e,t,i=null){return function(a){a.preventDefault(),a.stopPropagation();var s=a.pageX||a.touches[0].pageX,r=a.pageY||a.touches[0].pageY;e.fire(o,{x:s,y:r,event:a,index:i,points:t})}}function Mi([o,e],{a:t,b:i,c:a,d:s,e:r,f:n}){return[o*t+e*a+r,o*i+e*s+n]}N(ge,{draggable(o=!0){return(this.remember("_draggable")||new Fr(this)).init(o),this}});let us=class{constructor(o){this.el=o,o.remember("_selectHandler",this),this.selection=new Oe,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=St();this.observer=new e.MutationObserver(this.mutationHandler)}init(o){this.createHandle=o.createHandle||this.createHandleFn,this.createRot=o.createRot||this.createRotFn,this.updateHandle=o.updateHandle||this.updateHandleFn,this.updateRot=o.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(o,e){if(!o)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((o,e,t)=>{const i=this.order[e];this.createHandle.call(this,this.selection,o,e,t,i),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+i).on("mousedown.selection touchstart.selection",Li(i,this.el,this.handlePoints,e))})}createHandleFn(o){o.polyline()}updateHandleFn(o,e,t,i){const a=i.at(t-1),s=i[(t+1)%i.length],r=e,n=[r[0]-a[0],r[1]-a[1]],l=[r[0]-s[0],r[1]-s[1]],h=Math.sqrt(n[0]*n[0]+n[1]*n[1]),d=Math.sqrt(l[0]*l[0]+l[1]*l[1]),c=[n[0]/h,n[1]/h],u=[l[0]/d,l[1]/d],g=[r[0]-10*c[0],r[1]-10*c[1]],f=[r[0]-10*u[0],r[1]-10*u[1]];o.plot([g,r,f])}updateResizeHandles(){this.handlePoints.forEach((o,e,t)=>{const i=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),o,e,t,i)})}createRotFn(o){o.line(),o.circle(5)}getPoint(o){return this.handlePoints[this.order.indexOf(o)]}getPointHandle(o){return this.selection.get(this.order.indexOf(o)+1)}updateRotFn(o,e){const t=this.getPoint("t");o.get(0).plot(t[0],t[1],e[0],e[1]),o.get(1).center(e[0],e[1])}createRotationHandle(){const o=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",Li("rot",this.el,this.handlePoints));this.createRot.call(this,o)}updateRotationHandle(){const o=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(o,this.rotationPoint,this.handlePoints)}updatePoints(){const o=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(o).map(t=>Mi(t,e)),this.rotationPoint=Mi(this.getRotationPoint(o),e)}getHandlePoints({x:o,x2:e,y:t,y2:i,cx:a,cy:s}=this.el.bbox()){return[[o,t],[a,t],[e,t],[e,s],[e,i],[a,i],[o,i],[o,s]]}getRotationPoint({y:o,cx:e}=this.el.bbox()){return[e,o-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const fa=o=>function(e=!0,t={}){typeof e=="object"&&(t=e,e=!0);let i=this.remember("_"+o.name);return i||(e.prototype instanceof us?(i=new e(this),e=!0):i=new o(this),this.remember("_"+o.name,i)),i.active(e,t),this};/*! * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected * @version 2.0.4 * https://github.com/svgdotjs/svg.resize.js * * @copyright [object Object] * @license MIT * * BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time) *//*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse * @version 4.0.1 * https://github.com/svgdotjs/svg.select.js * * @copyright Ulrich-Matthias Schäfer * @license MIT * * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) */function Pi(o,e,t,i=null){return function(a){a.preventDefault(),a.stopPropagation();var s=a.pageX||a.touches[0].pageX,r=a.pageY||a.touches[0].pageY;e.fire(o,{x:s,y:r,event:a,index:i,points:t})}}function Ii([o,e],{a:t,b:i,c:a,d:s,e:r,f:n}){return[o*t+e*a+r,o*i+e*s+n]}N(ge,{select:fa(us)}),N([je,Ve,Ge],{pointSelect:fa(class{constructor(o){this.el=o,o.remember("_pointSelectHandler",this),this.selection=new Oe,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=St();this.observer=new e.MutationObserver(this.mutationHandler)}init(o){this.createHandle=o.createHandle||this.createHandleFn,this.updateHandle=o.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(o,e){if(!o)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((o,e,t)=>{this.createHandle.call(this,this.selection,o,e,t),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Li("point",this.el,this.points,e))})}createHandleFn(o){o.circle(5)}updateHandleFn(o,e){o.center(e[0],e[1])}updatePointHandles(){this.points.forEach((o,e,t)=>{this.updateHandle.call(this,this.selection.get(e+1),o,e,t)})}updatePoints(){const o=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>Mi(e,o))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class gs{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new Oe,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const t=St();this.observer=new t.MutationObserver(this.mutationHandler)}init(e){this.createHandle=e.createHandle||this.createHandleFn,this.createRot=e.createRot||this.createRotFn,this.updateHandle=e.updateHandle||this.updateHandleFn,this.updateRot=e.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(e,t){if(!e)return this.selection.clear().remove(),void this.observer.disconnect();this.init(t)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((e,t,i)=>{const a=this.order[t];this.createHandle.call(this,this.selection,e,t,i,a),this.selection.get(t+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",Pi(a,this.el,this.handlePoints,t))})}createHandleFn(e){e.polyline()}updateHandleFn(e,t,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=t,l=[n[0]-s[0],n[1]-s[1]],h=[n[0]-r[0],n[1]-r[1]],d=Math.sqrt(l[0]*l[0]+l[1]*l[1]),c=Math.sqrt(h[0]*h[0]+h[1]*h[1]),u=[l[0]/d,l[1]/d],g=[h[0]/c,h[1]/c],f=[n[0]-10*u[0],n[1]-10*u[1]],p=[n[0]-10*g[0],n[1]-10*g[1]];e.plot([f,n,p])}updateResizeHandles(){this.handlePoints.forEach((e,t,i)=>{const a=this.order[t];this.updateHandle.call(this,this.selection.get(t+1),e,t,i,a)})}createRotFn(e){e.line(),e.circle(5)}getPoint(e){return this.handlePoints[this.order.indexOf(e)]}getPointHandle(e){return this.selection.get(this.order.indexOf(e)+1)}updateRotFn(e,t){const i=this.getPoint("t");e.get(0).plot(i[0],i[1],t[0],t[1]),e.get(1).center(t[0],t[1])}createRotationHandle(){const e=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",Pi("rot",this.el,this.handlePoints));this.createRot.call(this,e)}updateRotationHandle(){const e=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(e,this.rotationPoint,this.handlePoints)}updatePoints(){const e=this.el.bbox(),t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(e).map(i=>Ii(i,t)),this.rotationPoint=Ii(this.getRotationPoint(e),t)}getHandlePoints({x:e,x2:t,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[e,i],[s,i],[t,i],[t,r],[t,a],[s,a],[e,a],[e,r]]}getRotationPoint({y:e,cx:t}=this.el.bbox()){return[t,e-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const xa=o=>function(e=!0,t={}){typeof e=="object"&&(t=e,e=!0);let i=this.remember("_"+o.name);return i||(e.prototype instanceof gs?(i=new e(this),e=!0):i=new o(this),this.remember("_"+o.name,i)),i.active(e,t),this};N(ge,{select:xa(gs)}),N([je,Ve,Ge],{pointSelect:xa(class{constructor(o){this.el=o,o.remember("_pointSelectHandler",this),this.selection=new Oe,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=St();this.observer=new e.MutationObserver(this.mutationHandler)}init(o){this.createHandle=o.createHandle||this.createHandleFn,this.updateHandle=o.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(o,e){if(!o)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((o,e,t)=>{this.createHandle.call(this,this.selection,o,e,t),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Pi("point",this.el,this.points,e))})}createHandleFn(o){o.circle(5)}updateHandleFn(o,e){o.center(e[0],e[1])}updatePointHandles(){this.points.forEach((o,e,t)=>{this.updateHandle.call(this,this.selection.get(e+1),o,e,t)})}updatePoints(){const o=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>Ii(e,o))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const Tt=o=>(o.changedTouches&&(o=o.changedTouches[0]),{x:o.clientX,y:o.clientY}),ba=o=>{let e=1/0,t=1/0,i=-1/0,a=-1/0;for(let s=0;s{const C=k-b[0],w=(y-b[1])*m;return[C*m+b[0],w+b[1]]});return ba(v)}(this.box,f,p)}this.el.dispatch("resize",{box:new le(h),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.size(h.width,h.height).move(h.x,h.y)}movePoint(e){this.lastEvent=e;const{x:t,y:i}=this.snapToGrid(this.el.point(Tt(e))),a=this.el.array().slice();a[this.index]=[t,i],this.el.dispatch("resize",{box:ba(a),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.plot(a)}rotate(e){this.lastEvent=e;const t=this.startPoint,i=this.el.point(Tt(e)),{cx:a,cy:s}=this.box,r=t.x-a,n=t.y-s,l=i.x-a,h=i.y-s,d=Math.sqrt(r*r+n*n)*Math.sqrt(l*l+h*h);if(d===0)return;let c=Math.acos((r*l+n*h)/d)/Math.PI*180;if(!c)return;i.xdiv { margin: 4px 0 } .apexcharts-tooltip-box span.value { font-weight: 700 } .apexcharts-tooltip-rangebar { padding: 5px 8px } .apexcharts-tooltip-rangebar .category { font-weight: 600; color: #777 } .apexcharts-tooltip-rangebar .series-name { font-weight: 700; display: block; margin-bottom: 5px } .apexcharts-xaxistooltip, .apexcharts-yaxistooltip { opacity: 0; pointer-events: none; color: #373d3f; font-size: 13px; text-align: center; border-radius: 2px; position: absolute; z-index: 10; background: #eceff1; border: 1px solid #90a4ae } .apexcharts-xaxistooltip { padding: 9px 10px; transition: .15s ease all } .apexcharts-xaxistooltip.apexcharts-theme-dark { background: rgba(0, 0, 0, .7); border: 1px solid rgba(0, 0, 0, .5); color: #fff } .apexcharts-xaxistooltip:after, .apexcharts-xaxistooltip:before { left: 50%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none } .apexcharts-xaxistooltip:after { border-color: transparent; border-width: 6px; margin-left: -6px } .apexcharts-xaxistooltip:before { border-color: transparent; border-width: 7px; margin-left: -7px } .apexcharts-xaxistooltip-bottom:after, .apexcharts-xaxistooltip-bottom:before { bottom: 100% } .apexcharts-xaxistooltip-top:after, .apexcharts-xaxistooltip-top:before { top: 100% } .apexcharts-xaxistooltip-bottom:after { border-bottom-color: #eceff1 } .apexcharts-xaxistooltip-bottom:before { border-bottom-color: #90a4ae } .apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after, .apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before { border-bottom-color: rgba(0, 0, 0, .5) } .apexcharts-xaxistooltip-top:after { border-top-color: #eceff1 } .apexcharts-xaxistooltip-top:before { border-top-color: #90a4ae } .apexcharts-xaxistooltip-top.apexcharts-theme-dark:after, .apexcharts-xaxistooltip-top.apexcharts-theme-dark:before { border-top-color: rgba(0, 0, 0, .5) } .apexcharts-xaxistooltip.apexcharts-active { opacity: 1; transition: .15s ease all } .apexcharts-yaxistooltip { padding: 4px 10px } .apexcharts-yaxistooltip.apexcharts-theme-dark { background: rgba(0, 0, 0, .7); border: 1px solid rgba(0, 0, 0, .5); color: #fff } .apexcharts-yaxistooltip:after, .apexcharts-yaxistooltip:before { top: 50%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none } .apexcharts-yaxistooltip:after { border-color: transparent; border-width: 6px; margin-top: -6px } .apexcharts-yaxistooltip:before { border-color: transparent; border-width: 7px; margin-top: -7px } .apexcharts-yaxistooltip-left:after, .apexcharts-yaxistooltip-left:before { left: 100% } .apexcharts-yaxistooltip-right:after, .apexcharts-yaxistooltip-right:before { right: 100% } .apexcharts-yaxistooltip-left:after { border-left-color: #eceff1 } .apexcharts-yaxistooltip-left:before { border-left-color: #90a4ae } .apexcharts-yaxistooltip-left.apexcharts-theme-dark:after, .apexcharts-yaxistooltip-left.apexcharts-theme-dark:before { border-left-color: rgba(0, 0, 0, .5) } .apexcharts-yaxistooltip-right:after { border-right-color: #eceff1 } .apexcharts-yaxistooltip-right:before { border-right-color: #90a4ae } .apexcharts-yaxistooltip-right.apexcharts-theme-dark:after, .apexcharts-yaxistooltip-right.apexcharts-theme-dark:before { border-right-color: rgba(0, 0, 0, .5) } .apexcharts-yaxistooltip.apexcharts-active { opacity: 1 } .apexcharts-yaxistooltip-hidden { display: none } .apexcharts-xcrosshairs, .apexcharts-ycrosshairs { pointer-events: none; opacity: 0; transition: .15s ease all } .apexcharts-xcrosshairs.apexcharts-active, .apexcharts-ycrosshairs.apexcharts-active { opacity: 1; transition: .15s ease all } .apexcharts-ycrosshairs-hidden { opacity: 0 } .apexcharts-selection-rect { cursor: move } .svg_select_shape { stroke-width: 1; stroke-dasharray: 10 10; stroke: black; stroke-opacity: 0.1; pointer-events: none; fill: none; } .svg_select_handle { stroke-width: 3; stroke: black; fill: none; } .svg_select_handle_r { cursor: e-resize; } .svg_select_handle_l { cursor: w-resize; } .apexcharts-svg.apexcharts-zoomable.hovering-zoom { cursor: crosshair } .apexcharts-svg.apexcharts-zoomable.hovering-pan { cursor: move } .apexcharts-menu-icon, .apexcharts-pan-icon, .apexcharts-reset-icon, .apexcharts-selection-icon, .apexcharts-toolbar-custom-icon, .apexcharts-zoom-icon, .apexcharts-zoomin-icon, .apexcharts-zoomout-icon { cursor: pointer; width: 20px; height: 20px; line-height: 24px; color: #6e8192; text-align: center } .apexcharts-menu-icon svg, .apexcharts-reset-icon svg, .apexcharts-zoom-icon svg, .apexcharts-zoomin-icon svg, .apexcharts-zoomout-icon svg { fill: #6e8192 } .apexcharts-selection-icon svg { fill: #444; transform: scale(.76) } .apexcharts-theme-dark .apexcharts-menu-icon svg, .apexcharts-theme-dark .apexcharts-pan-icon svg, .apexcharts-theme-dark .apexcharts-reset-icon svg, .apexcharts-theme-dark .apexcharts-selection-icon svg, .apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg, .apexcharts-theme-dark .apexcharts-zoom-icon svg, .apexcharts-theme-dark .apexcharts-zoomin-icon svg, .apexcharts-theme-dark .apexcharts-zoomout-icon svg { fill: #f3f4f5 } .apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg, .apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg, .apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg { fill: #008ffb } .apexcharts-theme-light .apexcharts-menu-icon:hover svg, .apexcharts-theme-light .apexcharts-reset-icon:hover svg, .apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg, .apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg, .apexcharts-theme-light .apexcharts-zoomin-icon:hover svg, .apexcharts-theme-light .apexcharts-zoomout-icon:hover svg { fill: #333 } .apexcharts-menu-icon, .apexcharts-selection-icon { position: relative } .apexcharts-reset-icon { margin-left: 5px } .apexcharts-menu-icon, .apexcharts-reset-icon, .apexcharts-zoom-icon { transform: scale(.85) } .apexcharts-zoomin-icon, .apexcharts-zoomout-icon { transform: scale(.7) } .apexcharts-zoomout-icon { margin-right: 3px } .apexcharts-pan-icon { transform: scale(.62); position: relative; left: 1px; top: 0 } .apexcharts-pan-icon svg { fill: #fff; stroke: #6e8192; stroke-width: 2 } .apexcharts-pan-icon.apexcharts-selected svg { stroke: #008ffb } .apexcharts-pan-icon:not(.apexcharts-selected):hover svg { stroke: #333 } .apexcharts-toolbar { position: absolute; z-index: 11; max-width: 176px; text-align: right; border-radius: 3px; padding: 0 6px 2px; display: flex; justify-content: space-between; align-items: center } .apexcharts-menu { background: #fff; position: absolute; top: 100%; border: 1px solid #ddd; border-radius: 3px; padding: 3px; right: 10px; opacity: 0; min-width: 110px; transition: .15s ease all; pointer-events: none } .apexcharts-menu.apexcharts-menu-open { opacity: 1; pointer-events: all; transition: .15s ease all } .apexcharts-menu-item { padding: 6px 7px; font-size: 12px; cursor: pointer } .apexcharts-theme-light .apexcharts-menu-item:hover { background: #eee } .apexcharts-theme-dark .apexcharts-menu { background: rgba(0, 0, 0, .7); color: #fff } @media screen and (min-width:768px) { .apexcharts-canvas:hover .apexcharts-toolbar { opacity: 1 } } .apexcharts-canvas .apexcharts-element-hidden, .apexcharts-datalabel.apexcharts-element-hidden, .apexcharts-hide .apexcharts-series-points { opacity: 0; } .apexcharts-hidden-element-shown { opacity: 1; transition: 0.25s ease all; } .apexcharts-datalabel, .apexcharts-datalabel-label, .apexcharts-datalabel-value, .apexcharts-datalabels, .apexcharts-pie-label { cursor: default; pointer-events: none } .apexcharts-pie-label-delay { opacity: 0; animation-name: opaque; animation-duration: .3s; animation-fill-mode: forwards; animation-timing-function: ease } .apexcharts-radialbar-label { cursor: pointer; } .apexcharts-annotation-rect, .apexcharts-area-series .apexcharts-area, .apexcharts-gridline, .apexcharts-line, .apexcharts-point-annotation-label, .apexcharts-radar-series path:not(.apexcharts-marker), .apexcharts-radar-series polygon, .apexcharts-toolbar svg, .apexcharts-tooltip .apexcharts-marker, .apexcharts-xaxis-annotation-label, .apexcharts-yaxis-annotation-label, .apexcharts-zoom-rect, .no-pointer-events { pointer-events: none } .apexcharts-tooltip-active .apexcharts-marker { transition: .15s ease all } .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 }`;var d=((h=e.opts.chart)===null||h===void 0?void 0:h.nonce)||e.w.config.chart.nonce;d&&l.setAttribute("nonce",d),r?s.prepend(l):n.head.appendChild(l)}var c=e.create(e.w.config.series,{});if(!c)return t(e);e.mount(c).then(function(){typeof e.w.config.chart.events.mounted=="function"&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(c)}).catch(function(u){i(u)})}else i(new Error("Element not found"))})}},{key:"create",value:function(e,t){var i=this,a=this.w;new va(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!L.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;if(this.responsive.checkResponsiveConfig(t),a.config.xaxis.convertedCatToNumeric&&new yt(a.config).convertCatToNumericXaxis(a.config,this.ctx),this.core.setupElements(),a.config.chart.type==="treemap"&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),s.svgWidth===0)return s.animationEnded=!0,null;var r=e;e.forEach(function(u,g){u.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:g}))});var n=he.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var l=r.every(function(u){return u.data&&u.data.length===0});(r.length===0||l&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new ct(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),a.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new he(this).getLargestMarkerSize(),this.dimensions.plotCoords();var h=this.core.xySettings();this.grid.createGridMask();var d=this.core.plotChartType(r,h),c=new st(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:d,xyRatios:h,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this,a=i.w;return new Promise(function(s,r){if(i.el===null)return r(new Error("Not enough data to display or target element not found"));(t===null||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new is(i);var n,l,h=i.grid.drawGrid();if(i.annotations=new rr(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),a.config.grid.position==="back"&&(h&&a.globals.dom.elGraphical.add(h.el),h!=null&&(n=h.elGridBorders)!==null&&n!==void 0&&n.node&&a.globals.dom.elGraphical.add(h.elGridBorders)),Array.isArray(t.elGraph))for(var d=0;d0&&a.globals.memory.methodsToExec.forEach(function(f){f.method(f.params,!1,f.context)}),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)})}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,i){var a=hi.get(i);a&&(a.disconnect(),hi.delete(i))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(t,i){t.id===L.escapeString(e)&&Apex._chartInstances.splice(i,1)}),new ya(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],n=this.w;return n.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(l,h){return t.updateHelpers._extendSeries(l,h)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,a,s,r)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,i)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],a=this.w.config.series.slice();return a.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,t,i)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&arguments[0]!==void 0)||arguments[0],t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(e,t)}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(e,t,a)}},{key:"addYaxisAnnotation",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(e,t,a)}},{key:"addPointAnnotation",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(e,t,a)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=this;t&&(i=t),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Ci(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Ci(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new Nt(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Nt(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;typeof e=="function"&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=L.escapeString(e);if(Apex._chartInstances){var i=Apex._chartInstances.filter(function(a){return a.id===t})[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),t=0;t2?s-2:0),n=2;ne.reduce((t,i)=>Ti(t,i,"",o),{})}const Wr=Nr();var _r=zi("
"),Br=o=>{let e,t;const i=fs({height:"auto",width:"100%",series:[],type:"line"},o),a=()=>{var n;const s={chart:{type:i.type,height:i.height,width:i.width,events:{}},series:Vi(i.series)};for(const l in o)if(l.startsWith("on")){const h=l.charAt(2).toLowerCase()+l.slice(3);s.chart.events[h]=o[l]}const r=Wr(Vi(i.options),s);t=new Dr(e,r),(n=o.ref)==null||n.call(o,t),t.render()};return xs(()=>{a()}),ft(Gt(()=>i.series,s=>{t.updateSeries(s)},{defer:!0})),ft(Gt(()=>i.options,s=>{t.updateOptions(s)},{defer:!0})),ft(Gt(()=>[i.type,i.height,i.width],()=>{t.destroy(),a()},{defer:!0})),ka(()=>{t.destroy()}),(()=>{var s=_r(),r=e;return typeof r=="function"?bs(r,s):e=s,s})()},wa=Br,Gr=zi('
'),jr=zi('