metacubexd/assets/Overview-B99qGorf.js

851 lines
559 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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<e;t++)i[t]=o[t];return i}function Aa(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function H(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function Qi(o,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(o,La(i.key),i)}}function O(o,e,t){return e&&Qi(o.prototype,e),t&&Qi(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}function pt(o,e){var t=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!t){if(Array.isArray(o)||(t=Xi(o))||e){t&&(o=t);var i=0,a=function(){};return{s:a,n:function(){return i>=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<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ea(Object(t),!0).forEach(function(i){Ht(o,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ea(Object(t)).forEach(function(i){Object.defineProperty(o,i,Object.getOwnPropertyDescriptor(t,i))})}return o}function ui(o,e){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ui(o,e)}function Sa(o,e){return function(t){if(Array.isArray(t))return t}(o)||function(t,i){var a=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var s,r,n,l,h=[],d=!0,c=!1;try{if(n=(a=a.call(t)).next,i===0){if(Object(a)!==a)return;d=!1}else for(;!(d=(s=n.call(a)).done)&&(h.push(s.value),h.length!==i);d=!0);}catch(u){c=!0,r=u}finally{try{if(!d&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw r}}return h}}(o,e)||Xi(o,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ce(o){return function(e){if(Array.isArray(e))return di(e)}(o)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(o)||Xi(o)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function La(o){var e=function(t,i){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var s=a.call(t,i||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(t)}(o,"string");return typeof e=="symbol"?e:e+""}function at(o){return at=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(o)}function Xi(o,e){if(o){if(typeof o=="string")return di(o,e);var t={}.toString.call(o).slice(8,-1);return t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set"?Array.from(o):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?di(o,e):void 0}}var L=function(){function o(){H(this,o)}return O(o,[{key:"shadeRGBColor",value:function(e,t){var i=t.split(","),a=e<0?0:255,s=e<0?-1*e:e,r=parseInt(i[0].slice(4),10),n=parseInt(i[1],10),l=parseInt(i[2],10);return"rgb("+(Math.round((a-r)*s)+r)+","+(Math.round((a-n)*s)+n)+","+(Math.round((a-l)*s)+l)+")"}},{key:"shadeHexColor",value:function(e,t){var i=parseInt(t.slice(1),16),a=e<0?0:255,s=e<0?-1*e:e,r=i>>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;t<e.length;t++)i[t]=e[t];return i}},{key:"extend",value:function(e,t){var i=this;typeof Object.assign!="function"&&(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(s),n=1;n<arguments.length;n++){var l=arguments[n];if(l!=null)for(var h in l)l.hasOwnProperty(h)&&(r[h]=l[h])}return r});var a=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(function(s){i.isObject(t[s])&&s in e?a[s]=i.extend(e[s],t[s]):Object.assign(a,Ht({},s,t[s]))}),a}},{key:"extendArray",value:function(e,t){var i=[];return e.map(function(a){i.push(o.extend(t,a))}),e=i}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){var t,i=arguments.length>1&&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;a<e.length;a++)t[a]=this.clone(e[a],i)}else if(e instanceof Date)t=new Date(e.getTime());else for(var s in t={},i.set(e,t),e)e.hasOwnProperty(s)&&(t[s]=this.clone(e[s],i));return t}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,t){return Math.pow(t,Math.floor(Math.log(e)/Math.log(t)))}},{key:"parseNumber",value:function(e){return e===null?e:parseFloat(e)}},{key:"stripNumber",value:function(e){var t=arguments.length>1&&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;a<i.length;a++)i[a]=parseInt(i[a].length===1?i[a]+i[a]:i[a],16);return t!==void 0&&i.push(t),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,t){for(var i=[],a=2*Math.PI/t,s=0;s<t;s++){var r={};r.x=e*Math.sin(s*a),r.y=-e*Math.cos(s*a),i.push(r)}return i}},{key:"polarToCartesian",value:function(e,t,i,a){var s=(a-90)*Math.PI/180;return{x:e+i*Math.cos(s),y:t+i*Math.sin(s)}}},{key:"escapeString",value:function(e){var t=arguments.length>1&&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;t<i;t++)a.push(e(o[t]));return a}function Vt(o){return o%360*Math.PI/180}function ot(o){return o.charAt(0).toUpperCase()+o.slice(1)}function lt(o,e,t,i){return e!=null&&t!=null||(i=i||o.bbox(),e==null?e=i.width/i.height*t:t==null&&(t=i.height/i.width*e)),{width:e,height:t}}function pi(o,e){const t=o.origin;let i=o.ox!=null?o.ox:o.originX!=null?o.originX:"center",a=o.oy!=null?o.oy:o.originY!=null?o.originY:"center";t!=null&&([i,a]=Array.isArray(t)?t:typeof t=="object"?[t.x,t.y]:[t,t]);const s=typeof i=="string",r=typeof a=="string";if(s||r){const{height:n,width:l,x:h,y:d}=e.bbox();s&&(i=i.includes("left")?h:i.includes("right")?h+l:h+l/2),r&&(a=a.includes("top")?d:a.includes("bottom")?d+n:d+n/2)}return[i,a]}const Cs=new Set(["desc","metadata","title"]),fi=o=>Cs.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;s<r;s++)a(i[s])&&n.push(i[s]);return n}(this.node.attributes,i=>i.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<r?6:0))/6:n===s?((r-a)/c+2)/6:n===r?((a-s)/c+4)/6:0),100*(d?0:h>.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<s;a++)e.apply(i[a],[a,i]),t&&i[a].each(e,t);return this}element(e,t){return this.put(new Fe(bt(e),t))}first(){return Ce(this.node.firstChild)}get(e){return Ce(this.node.childNodes[e])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(e){return this.index(e)>=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<t.x+t.width&&e<t.y+t.height},point:function(o,e){return new Q(o,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new D(this.node.getCTM())},screenCTM:function(){try{if(typeof this.isRoot=="function"&&!this.isRoot()){const o=this.rect(1,1),e=o.node.getScreenCTM();return o.remove(),new D(e)}return new D(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new D}}}),Z(ge,"Element");const gt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(o,e){return e==="color"?o:o+"-"+e}};["fill","stroke"].forEach(function(o){const e={};let t;e[o]=function(i){if(i===void 0)return this.attr(o);if(typeof i=="string"||i instanceof ae||ae.isRgb(i)||i instanceof ge)this.attr(o,i);else for(t=gt[o].length-1;t>=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<a;i+=2)t.push([e[i],e[i+1]]);return t}size(e,t){let i;const a=this.bbox();for(i=this.length-1;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<i;t++)e.push(this[t].join(","));return e.join(" ")}transform(e){return this.clone().transformO(e)}transformO(e){D.isMatrixLike(e)||(e=new D(e));for(let t=this.length;t--;){const[i,a]=this[t];this[t][0]=e.a*i+e.c*a+e.e,this[t][1]=e.b*i+e.d*a+e.f}return this}}const Ws=De;var Wi=Object.freeze({__proto__:null,MorphArray:Ws,height:function(o){const e=this.bbox();return o==null?e.height:this.size(e.width,o)},width:function(o){const e=this.bbox();return o==null?e.width:this.size(o,e.height)},x:function(o){return o==null?this.bbox().x:this.move(o,this.bbox().y)},y:function(o){return o==null?this.bbox().y:this.move(this.bbox().x,o)}});let Ge=class extends ke{constructor(o,e=o){super(re("line",o),e)}array(){return new De([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(o,e){return this.attr(this.array().move(o,e).toLine())}plot(o,e,t,i){return o==null?this.array():(o=e!==void 0?{x1:o,y1:e,x2:t,y2:i}:new De(o).toLine(),this.attr(o))}size(o,e){const t=lt(this,o,e);return this.attr(this.array().size(t.width,t.height).toLine())}};N(Ge,Wi),U({Container:{line:se(function(...o){return Ge.prototype.plot.apply(this.put(new Ge),o[0]!=null?o:[0,0,0,0])})}}),Z(Ge,"Line");let Rt=class extends ve{constructor(o,e=o){super(re("marker",o),e)}height(o){return this.attr("markerHeight",o)}orient(o){return this.attr("orient",o)}ref(o,e){return this.attr("refX",o).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(o){return this.clear(),typeof o=="function"&&o.call(this,this),this}width(o){return this.attr("markerWidth",o)}};function tt(o,e){return function(t){return t==null?this[o]:(this[o]=t,e&&e.call(this),this)}}U({Container:{marker(...o){return this.defs().marker(...o)}},Defs:{marker:se(function(o,e,t){return this.put(new Rt).size(o,e).ref(o/2,e/2).viewbox(0,0,o,e).attr("orient","auto").update(t)})},marker:{marker(o,e,t,i){let a=["marker"];return o!=="all"&&a.push(o),a=a.join("-"),o=arguments[1]instanceof Rt?arguments[1]:this.defs().marker(e,t,i),this.attr(a,o)}}}),Z(Rt,"Marker");const _s={"-":function(o){return o},"<>":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<e;++o)bi[Jt[o]]=function(t){return function(i,a,s){if(t==="H")i[0]=i[0]+a.x;else if(t==="V")i[0]=i[0]+a.y;else if(t==="A")i[5]=i[5]+a.x,i[6]=i[6]+a.y;else for(let r=0,n=i.length;r<n;++r)i[r]=i[r]+(r%2?a.y:a.x);return bi[t](i,a,s)}}(Jt[o].toUpperCase());function mi(o){return o.segment.length&&o.segment.length-1===Bs[o.segment[0].toUpperCase()]}function Gs(o,e){o.inNumber&&We(o,!1);const t=Oi.test(e);if(t)o.segment=[e];else{const i=o.lastCommand,a=i.toLowerCase(),s=i===a;o.segment=[a==="m"?s?"l":"L":i]}return o.inSegment=!0,o.lastCommand=o.segment[0],t}function We(o,e){if(!o.inNumber)throw new Error("Parser Error");o.number&&o.segment.push(parseFloat(o.number)),o.inNumber=e,o.number="",o.pointSeen=!1,o.hasExponent=!1,mi(o)&&vi(o)}function vi(o){o.inSegment=!1,o.absolute&&(o.segment=function(e){const t=e.segment[0];return bi[t](e.segment.slice(1),e.p,e.p0)}(o)),o.segments.push(o.segment)}function js(o){if(!o.segment.length)return!1;const e=o.segment[0].toUpperCase()==="A",t=o.segment.length;return e&&(t===4||t===5)}function Vs(o){return o.lastToken.toUpperCase()==="E"}const Us=new Set([" ",","," ",`
`,"\r","\f"]);class Pe extends Ze{bbox(){return He().path.setAttribute("d",this.toString()),new le(He.nodes.path.getBBox())}move(e,t){const i=this.bbox();if(e-=i.x,t-=i.y,!isNaN(e)&&!isNaN(t))for(let a,s=this.length-1;s>=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<a;i++)t+=e[i][0],e[i][1]!=null&&(t+=e[i][1],e[i][2]!=null&&(t+=" ",t+=e[i][2],e[i][3]!=null&&(t+=" ",t+=e[i][3],t+=" ",t+=e[i][4],e[i][5]!=null&&(t+=" ",t+=e[i][5],t+=" ",t+=e[i][6],e[i][7]!=null&&(t+=" ",t+=e[i][7])))));return t+" "}(this)}}const Va=o=>{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: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;i<a;++i){if(t[i+1]===e[i+1]){if(t[i+1]===ae&&e[i+7]!==t[i+7]){const n=e[i+7],l=new ae(this.values.splice(i+3,5))[n]().toArray();this.values.splice(i+3,0,...l)}i+=t[i+2]+2;continue}if(!e[i+1])return this;const s=new e[i+1]().toArray(),r=t[i+2]+3;t.splice(i,r,e[i],e[i+1],e[i+2],...s),i+=t[i+2]+2}return this}init(e){if(this.values=[],Array.isArray(e))return void(this.values=e.slice());e=e||{};const t=[];for(const i in e){const a=Va(e[i]),s=new a(e[i]).toArray();t.push([i,a,s.length,...s])}return t.sort(qs),this.values=t.reduce((i,a)=>i.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;r<n;r++){const l=this._runners[r],h=l.runner;let d=a;const c=this._time-l.start;if(c<=0){s=!0;continue}c<d&&(d=c),h.active()&&(h.step(d).done?l.persist!==!0&&h.duration()-h.time()+this._time+l.persist<this._time&&(h.unschedule(),--r,--n):s=!0)}return s&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?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<u?c(t):Math.round(c(u-1e-5)),l}const h=Math.floor(this.loops()),d=r&&h%2==0;return l=h+(d&&!n||n&&d?e:1-e),this.loops(l)}progress(e){return e==null?Math.min(1,this._time/this.duration()):this.time(e*this.duration())}queue(e,t,i,a){return this._queue.push({initialiser:e||na,runner:t||na,retarget:i,isTransform:a,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(e){return this._reverse=e??!this._reverse,this}schedule(e,t,i){if(e instanceof qa||(i=t,t=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,t,i),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const t=this.position(),i=this._lastPosition!==t&&this._time>=0;this._lastPosition=t;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime<a&&this._time>=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;t<i;++t){const a=this._queue[t],s=this._isDeclarative||!a.initialised&&e;e=!a.finished,s&&e&&(a.initialiser.call(this),a.initialised=!0)}}_rememberMorpher(e,t){if(this._history[e]={morpher:t,caller:this._queue[this._queue.length-1]},this._isDeclarative){const i=this.timeline();i&&i.play()}}_run(e){let t=!0;for(let i=0,a=this._queue.length;i<a;++i){const s=this._queue[i],r=s.runner.call(this,e);s.finished=s.finished||r===!0,t=t&&s.finished}return t}_tryRetarget(e,t,i){if(this._history[e]){if(!this._history[e].caller.initialised){const s=this._queue.indexOf(this._history[e].caller);return this._queue.splice(s,1),!1}this._history[e].caller.retarget?this._history[e].caller.retarget.call(this,t,i):this._history[e].morpher.to(t),this._history[e].caller.finished=!1;const a=this.timeline();return a&&a.play(),!0}return!1}}we.id=0;class Dt{constructor(e=new D,t=-1,i=!0){this.transforms=e,this.id=t,this.done=i}clearTransformsFromQueue(){}}N([we,Dt],{mergeWith(o){return new Dt(o.transforms.lmultiply(this.transforms),o.id)}});const Za=(o,e)=>o.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;t<this.runners.length;++t){const i=this.runners[t];if(e&&i.done&&e.done&&(!i._timeline||!i._timeline._runnerIds.includes(i.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(i.id);const a=i.mergeWith(e);this.edit(e.id,a),e=a,--t}else e=i}return this}remove(e){const t=this.ids.indexOf(e+1);return this.ids.splice(t,1),this.runners.splice(t,1),this}}U({Element:{animate(o,e,t){const i=we.sanitise(o,e,t),a=this.timeline();return new we(i.duration).loop(i).element(this).timeline(a.play()).schedule(i.delay,i.when)},delay(o,e){return this.animate(0,o,e)},_clearTransformRunnersBefore(o){this._transformationRunners.clearBefore(o.id)},_currentTransform(o){return this._transformationRunners.runners.filter(e=>e.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<s;++a)t[a].nodeName==="textPath"||fi(t[a])?a===0&&(i=a+1):(a!==i&&t[a].nodeType!==3&&Ce(t[a]).dom.newLined===!0&&(e+=`
`),e+=t[a].textContent);return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else for(let t=0,i=(e=(e+"").split(`
`)).length;t<i;t++)this.newLine(e[t]);return this.build(!1).rebuild()}}N(Ie,Ja),U({Container:{text:se(function(o=""){return this.put(new Ie).text(o)}),plain:se(function(o=""){return this.put(new Ie).plain(o)})}}),Z(Ie,"Text");class Yt extends ke{constructor(e,t=e){super(re("tspan",e),t),this._build=!1}dx(e){return this.attr("dx",e)}dy(e){return this.attr("dy",e)}newLine(){this.dom.newLined=!0;const e=this.parent();if(!(e instanceof Ie))return this;const t=e.index(this),i=q.window.getComputedStyle(this.node).getPropertyValue("font-size"),a=e.dom.leading*new V(i);return this.dy(t?a:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}N(Yt,Ja),U({Tspan:{tspan:se(function(o=""){const e=new Yt;return this._build||this.clear(),this.put(e).text(o)})},Text:{newLine:function(o=""){return this.tspan(o).newLine()}}}),Z(Yt,"Tspan");class Qt extends ke{constructor(e,t=e){super(re("circle",e),t)}radius(e){return this.attr("r",e)}rx(e){return this.attr("r",e)}ry(e){return this.rx(e)}size(e){return this.radius(new V(e).divide(2))}}N(Qt,{x:Oa,y:Fa,cx:Da,cy:Na,width:Wa,height:_a}),U({Container:{circle:se(function(o=0){return this.put(new Qt).size(o).move(0,0)})}}),Z(Qt,"Circle");class ei extends ve{constructor(e,t=e){super(re("clipPath",e),t)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return $e("svg [clip-path*="+this.id()+"]")}}U({Container:{clip:se(function(){return this.defs().put(new ei)})},Element:{clipper(){return this.reference("clip-path")},clipWith(o){const e=o instanceof ei?o:this.parent().clip().add(o);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),Z(ei,"ClipPath");class ha extends ge{constructor(e,t=e){super(re("foreignObject",e),t)}}U({Container:{foreignObject:se(function(o,e){return this.put(new ha).size(o,e)})}}),Z(ha,"ForeignObject");var Ka=Object.freeze({__proto__:null,dmove:function(o,e){return this.children().forEach(t=>{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;c<n.length;c++){var u=l[l.length-1],g=n[c],f=g==d?n[1]:n[c+1];if(f&&u&&u.length>2&&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<r.width?t.slice(0,l-3)+"...":t}},{key:"drawText",value:function(e){var t=this,i=e.x,a=e.y,s=e.text,r=e.textAnchor,n=e.fontSize,l=e.fontFamily,h=e.fontWeight,d=e.foreColor,c=e.opacity,u=e.maxWidth,g=e.cssClass,f=g===void 0?"":g,p=e.isPlainText,x=p===void 0||p,b=e.dominantBaseline,m=b===void 0?"auto":b,v=this.w;s===void 0&&(s="");var k=s;r||(r="start"),d&&d.length||(d=v.config.chart.foreColor),l=l||v.config.chart.fontFamily,h=h||"regular";var y,C={maxWidth:u,fontSize:n=n||"11px",fontFamily:l};return Array.isArray(s)?y=v.globals.dom.Paper.text(function(w){for(var A=0;A<s.length;A++)k=s[A],u&&(k=t.getTextBasedOnMaxWidth(R({text:s[A]},C))),A===0?w.tspan(k):w.tspan(k).newLine()}):(u&&(k=this.getTextBasedOnMaxWidth(R({text:s},C))),y=x?v.globals.dom.Paper.plain(s):v.globals.dom.Paper.text(function(w){return w.tspan(k)})),y.attr({x:i,y:a,"text-anchor":r,"dominant-baseline":m,"font-size":n,"font-family":l,"font-weight":h,fill:d,class:"apexcharts-text "+f}),y.node.style.fontFamily=l,y.node.style.opacity=c,y}},{key:"getMarkerPath",value:function(e,t,i,a){var s="";switch(i){case"cross":s="M ".concat(e-(a/=1.4)," ").concat(t-a," L ").concat(e+a," ").concat(t+a," M ").concat(e-a," ").concat(t+a," L ").concat(e+a," ").concat(t-a);break;case"plus":s="M ".concat(e-(a/=1.12)," ").concat(t," L ").concat(e+a," ").concat(t," M ").concat(e," ").concat(t-a," L ").concat(e," ").concat(t+a);break;case"star":case"sparkle":var r=5;a*=1.15,i==="sparkle"&&(a/=1.1,r=4);for(var n=Math.PI/r,l=0;l<=2*r;l++){var h=l*n,d=l%2==0?a:a/2;s+=(l===0?"M":"L")+(e+d*Math.sin(h))+","+(t-d*Math.cos(h))}s+="Z";break;case"triangle":s="M ".concat(e," ").concat(t-a,`
L `).concat(e+a," ").concat(t+a,`
L `).concat(e-a," ").concat(t+a,`
Z`);break;case"square":case"rect":s="M ".concat(e-(a/=1.125)," ").concat(t-a,`
L `).concat(e+a," ").concat(t-a,`
L `).concat(e+a," ").concat(t+a,`
L `).concat(e-a," ").concat(t+a,`
Z`);break;case"diamond":a*=1.05,s="M ".concat(e," ").concat(t-a,`
L `).concat(e+a," ").concat(t,`
L `).concat(e," ").concat(t+a,`
L `).concat(e-a," ").concat(t,`
Z`);break;case"line":s="M ".concat(e-(a/=1.1)," ").concat(t,`
L `).concat(e+a," ").concat(t);break;default:a*=2,s="M ".concat(e,", ").concat(t,`
m -`).concat(a/2,`, 0
a `).concat(a/2,",").concat(a/2," 0 1,0 ").concat(a,`,0
a `).concat(a/2,",").concat(a/2," 0 1,0 -").concat(a,",0")}return s}},{key:"drawMarkerShape",value:function(e,t,i,a,s){var r=this.drawPath({d:this.getMarkerPath(e,t,i,a,s),stroke:s.pointStrokeColor,strokeDashArray:s.pointStrokeDashArray,strokeWidth:s.pointStrokeWidth,fill:s.pointFillColor,fillOpacity:s.pointFillOpacity,strokeOpacity:s.pointStrokeOpacity});return r.attr({cx:e,cy:t,shape:s.shape,class:s.class?s.class:""}),r}},{key:"drawMarker",value:function(e,t,i){e=e||0;var a=i.pSize||0;return L.isNumber(t)||(a=0,t=0),this.drawMarkerShape(e,t,i==null?void 0:i.shape,a,R(R({},i),i.shape==="line"||i.shape==="plus"||i.shape==="cross"?{pointStrokeColor:i.pointFillColor,pointStrokeOpacity:i.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(e,t){var i=this.w,a=new ue(this.ctx),s=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);if(typeof i.config.chart.events.dataPointMouseEnter=="function"&&i.config.chart.events.dataPointMouseEnter(t,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[t,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}]),(i.config.states.active.filter.type==="none"||e.node.getAttribute("selected")!=="true")&&i.config.states.hover.filter.type!=="none"&&!i.globals.isTouchDevice){var n=i.config.states.hover.filter;a.applyFilter(e,s,n.type)}}},{key:"pathMouseLeave",value:function(e,t){var i=this.w,a=new ue(this.ctx),s=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);typeof i.config.chart.events.dataPointMouseLeave=="function"&&i.config.chart.events.dataPointMouseLeave(t,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[t,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}]),i.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||i.config.states.hover.filter.type!=="none"&&a.getDefaultFilter(e,s)}},{key:"pathMouseDown",value:function(e,t){var i=this.w,a=new ue(this.ctx),s=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10),n="false";if(e.node.getAttribute("selected")==="true"){if(e.node.setAttribute("selected","false"),i.globals.selectedDataPoints[s].indexOf(r)>-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;a<t.globals.series[t.globals.maxValsInArrayIndex].length;a++){for(var s=0,r=0;r<t.globals.series.length;r++)t.globals.series[r][a]!==void 0&&e.indexOf(r)===-1&&(s+=t.globals.series[r][a]);i.push(s)}return i}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&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;h<n.length&&(l=n[h],i[l]=[],s);h++){var d=s[0];s.shift(),i[l].push(d),a[d]=l}s.forEach(function(c){i[l].push(c),a[c]=l}),e.seriesYAxisMap=i.map(function(c){return c}),e.seriesYAxisReverseMap=a.map(function(c){return c}),e.seriesYAxisMap.forEach(function(c,u){c.forEach(function(g){t.series[g]&&t.series[g].group===void 0&&(t.series[g].group="apexcharts-axis-".concat(u.toString()))})})}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&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;s<t.length;s++)a+=t[s];else a+=t;return a})}},{key:"getSeriesTotalsXRange",value:function(e,t){var i=this.w;return i.globals.series.map(function(a,s){for(var r=0,n=0;n<a.length;n++)i.globals.seriesX[s][n]>e&&i.globals.seriesX[s][n]<t&&(r+=a[n]);return r})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(t,i){var a=[];if(Array.isArray(t))for(var s=0;s<t.length;s++){var r=e.globals.stackedSeriesTotals[s],n=0;r&&(n=100*t[s]/r),a.push(n)}else{var l=100*t/e.globals.seriesTotals.reduce(function(h,d){return h+d},0);a.push(l)}return a})}},{key:"getCalculatedRatios",value:function(){var e,t,i,a=this,s=this.w,r=s.globals,n=[],l=0,h=[],d=.1,c=0;if(r.yRange=[],r.isMultipleYAxis)for(var u=0;u<r.minYArr.length;u++)r.yRange.push(Math.abs(r.minYArr[u]-r.maxYArr[u])),h.push(0);else r.yRange.push(Math.abs(r.minY-r.maxY));r.xRange=Math.abs(r.maxX-r.minX),r.zRange=Math.abs(r.maxZ-r.minZ);for(var g=0;g<r.yRange.length;g++)n.push(r.yRange[g]/r.gridHeight);if(t=r.xRange/r.gridWidth,e=r.yRange/r.gridWidth,i=r.xRange/r.gridHeight,(l=r.zRange/r.gridHeight*16)||(l=1),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(r.hasNegs=!0),s.globals.seriesYAxisReverseMap.length>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;p<n.length;p++)h.push(f(r.minYArr[p],p))}else(h=[]).push(f(r.minY,0)),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(d=-r.minY/e,c=r.minX/t)}else(h=[]).push(0),d=0,c=0;return{yRatio:n,invertedYRatio:e,zRatio:l,xRatio:t,invertedXRatio:i,baseLineInvertedY:d,baseLineY:h,baseLineX:c}}},{key:"getLogSeries",value:function(e){var t=this,i=this.w;return i.globals.seriesLog=e.map(function(a,s){var r=i.globals.seriesYAxisReverseMap[s];return i.config.yaxis[r]&&i.config.yaxis[r].logarithmic?a.map(function(n){return n===null?null:t.getLogVal(i.config.yaxis[r].logBase,n,s)}):a}),i.globals.invalidLogScale?e:i.globals.seriesLog}},{key:"getLogValAtSeriesIndex",value:function(e,t){if(e===null)return null;var i=this.w,a=i.globals.seriesYAxisReverseMap[t];return i.config.yaxis[a]&&i.config.yaxis[a].logarithmic?this.getLogVal(i.config.yaxis[a].logBase,e,t):e}},{key:"getBaseLog",value:function(e,t){return Math.log(t)/Math.log(e)}},{key:"getLogVal",value:function(e,t,i){if(t<=0)return 0;var a=this.w,s=a.globals.minYArr[i]===0?-1:this.getBaseLog(e,a.globals.minYArr[i]),r=(a.globals.maxYArr[i]===0?0:this.getBaseLog(e,a.globals.maxYArr[i]))-s;return t<1?t/r:(this.getBaseLog(e,t)-s)/r}},{key:"getLogYRatios",value:function(e){var t=this,i=this.w,a=this.w.globals;return a.yLogRatio=e.slice(),a.logYRange=a.yRange.map(function(s,r){var n=i.globals.seriesYAxisReverseMap[r];if(i.config.yaxis[n]&&t.w.config.yaxis[n].logarithmic){var l,h=-Number.MAX_VALUE,d=Number.MIN_VALUE;return a.seriesLog.forEach(function(c,u){c.forEach(function(g){i.config.yaxis[u]&&i.config.yaxis[u].logarithmic&&(h=Math.max(g,h),d=Math.min(g,d))})}),l=Math.pow(a.yRange[r],Math.abs(d-h)/a.yRange[r]),a.yLogRatio[r]=l/a.gridHeight,l}}),a.invalidLogScale?e.slice():a.yLogRatio}},{key:"drawSeriesByGroup",value:function(e,t,i,a){var s=this.w,r=[];return e.series.length>0&&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(a<n){var f=n;n=a,a=f}var p=this.annoCtx.graphics.drawRect(n+e.offsetX,0+e.offsetY,a-n,s.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,c);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(!l||!h){var x=this.annoCtx.graphics.getTextRects(d,parseFloat(e.label.style.fontSize)),b=e.label.position==="top"?4:e.label.position==="center"?s.globals.gridHeight/2+(e.label.orientation==="vertical"?x.width/2:0):s.globals.gridHeight,m=this.annoCtx.graphics.drawText({x:n+e.label.offsetX,y:b+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?x.width/2-12:-x.width/2:0),text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});m.attr({rel:i}),t.appendChild(m.node),this.annoCtx.helpers.setOrientations(e,i)}}}},{key:"drawXAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map(function(a,s){e.addXaxisAnnotation(a,i.node,s)}),i}}]),o}(),de=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return O(o,[{key:"isValidDate",value:function(e){return typeof e!="number"&&!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);var i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,t){var i=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,s=["\0"].concat(ce(i.months)),r=[""].concat(ce(i.shortMonths)),n=[""].concat(ce(i.days)),l=[""].concat(ce(i.shortDays));function h(A,S){var M=A+"";for(S=S||2;M.length<S;)M="0"+M;return M}var d=a?e.getUTCFullYear():e.getFullYear();t=(t=(t=t.replace(/(^|[^\\])yyyy+/g,"$1"+d)).replace(/(^|[^\\])yy/g,"$1"+d.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+d);var c=(a?e.getUTCMonth():e.getMonth())+1;t=(t=(t=(t=t.replace(/(^|[^\\])MMMM+/g,"$1"+s[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+h(c))).replace(/(^|[^\\])M/g,"$1"+c);var u=a?e.getUTCDate():e.getDate();t=(t=(t=(t=t.replace(/(^|[^\\])dddd+/g,"$1"+n[0])).replace(/(^|[^\\])ddd/g,"$1"+l[0])).replace(/(^|[^\\])dd/g,"$1"+h(u))).replace(/(^|[^\\])d/g,"$1"+u);var g=a?e.getUTCHours():e.getHours(),f=g>12?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.x<n.textRect.width/(r.globals.rotateXLabels?Math.abs(r.config.xaxis.labels.rotate)/12:1.01)+n.x&&(t.text="")}return t}},{key:"checkForReversedLabels",value:function(e,t){var i=this.w;return i.config.yaxis[e]&&i.config.yaxis[e].reversed&&t.reverse(),t}},{key:"yAxisAllSeriesCollapsed",value:function(e){var t=this.w.globals;return!t.seriesYAxisMap[e].some(function(i){return t.collapsedSeriesIndices.indexOf(i)===-1})}},{key:"translateYAxisIndex",value:function(e){var t=this.w,i=t.globals,a=t.config.yaxis;return i.series.length>a.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=`<span class="value start-value">
`.concat(a,`
</span> <span class="separator">-</span> <span class="value end-value">
`).concat(s,`
</span>`);return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(t||"")+'</span></div><div> <span class="category">'+i+": </span> "+(o.w.globals.comboCharts?o.w.config.series[r].type==="rangeArea"||o.w.config.series[r].type==="rangeBar"?d:"<span>".concat(h,"</span>"):d)+" </div></div>"},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?`<div class="apexcharts-custom-tooltip">
`.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": <strong>").concat(e.globals.series[t][i],`</strong>
</div>`):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(a[0],': <span class="value">')+r+"</span></div>"+"<div>".concat(a[1],': <span class="value">')+n+"</span></div>"+(l?"<div>".concat(a[2],': <span class="value">')+l+"</span></div>":"")+"<div>".concat(a[3],': <span class="value">')+h+"</span></div>"+"<div>".concat(a[4],': <span class="value">')+d+"</span></div></div>"}}]),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<r)&&(r=l)}}catch(c){n.e(c)}finally{n.f()}s===null&&(s=t.threshold),r===null&&(r=t.threshold);var h=s-t.threshold+(t.threshold-r);h===0&&(h=1);var d=100-(t.threshold-r)/h*100;return[{offset:d=Math.max(0,Math.min(d,100)),color:t.colorAboveThreshold,opacity:a.config.fill.opacity},{offset:0,color:t.colorBelowThreshold,opacity:a.config.fill.opacity}]}},{key:"fillPath",value:function(e){var t,i,a,s=this.w;this.opts=e;var r,n,l,h=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var d=h.plotOptions.line.colors.colorAboveThreshold&&h.plotOptions.line.colors.colorBelowThreshold,c=this.getFillColors()[this.seriesIndex];s.globals.seriesColors[this.seriesIndex]!==void 0&&(c=s.globals.seriesColors[this.seriesIndex]),typeof c=="function"&&(c=c({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:s}));var u,g,f,p=e.fillType?e.fillType:this.getFillType(this.seriesIndex),x=Array.isArray(h.fill.opacity)?h.fill.opacity[this.seriesIndex]:h.fill.opacity,b=p==="gradient"||d;e.color&&(c=e.color),(t=s.config.series[this.seriesIndex])!==null&&t!==void 0&&(i=t.data)!==null&&i!==void 0&&(a=i[e.dataPointIndex])!==null&&a!==void 0&&a.fillColor&&(c=(u=s.config.series[this.seriesIndex])===null||u===void 0||(g=u.data)===null||g===void 0||(f=g[e.dataPointIndex])===null||f===void 0?void 0:f.fillColor),c||(c="#fff",console.warn("undefined color - ApexCharts"));var m=c;if(c.indexOf("rgb")===-1?c.indexOf("#")===-1?m=c:c.length<9&&(m=L.hexToRgba(c,x)):c.indexOf("rgba")>-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<y.length?y[e.seriesNumber]:y[0]:y,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:w}),this.patternIDs.push(w)),r="url(#".concat(w,")")}else r=b?l:p==="pattern"?n:m;return e.solid&&(r=m),r}},{key:"getFillType",value:function(e){var t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,t=e.config,i=this.opts,a=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors):t.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors),i.fillColors!==void 0&&(a=[],Array.isArray(i.fillColors)?a=i.fillColors.slice():a.push(i.fillColors)),a}},{key:"handlePatternFill",value:function(e){var t=e.fillConfig,i=e.patternFill,a=e.fillColor,s=e.fillOpacity,r=e.defaultColor,n=this.w.config.fill;t&&(n=t);var l=this.opts,h=new X(this.ctx),d=Array.isArray(n.pattern.strokeWidth)?n.pattern.strokeWidth[this.seriesIndex]:n.pattern.strokeWidth,c=a;return Array.isArray(n.pattern.style)?i=n.pattern.style[l.seriesNumber]!==void 0?h.drawPattern(n.pattern.style[l.seriesNumber],n.pattern.width,n.pattern.height,c,d,s):r:i=h.drawPattern(n.pattern.style,n.pattern.width,n.pattern.height,c,d,s),i}},{key:"handleGradientFill",value:function(e){var t=e.type,i=e.fillColor,a=e.fillOpacity,s=e.fillConfig,r=e.colorStops,n=e.i,l=this.w.config.fill;s&&(l=R(R({},l),s));var h=this.opts,d=new X(this.ctx),c=new L;t=t||l.gradient.type;var u,g=i,f=l.gradient.opacityFrom===void 0?a:Array.isArray(l.gradient.opacityFrom)?l.gradient.opacityFrom[n]:l.gradient.opacityFrom;g.indexOf("rgba")>-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.length<e.globals.series.length+1)for(var t=0;t<=e.globals.series.length;t++)e.globals.markers.size[t]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(function(i){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e,t,i,a){var s=arguments.length>4&&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;u<l.x.length;u++){var g=void 0,f=i,p=!L.isNumber(l.y[u]);i===1&&u===0&&(f=0),i===1&&u===1&&(f=1);var x="apexcharts-marker";if(r.config.chart.type!=="line"&&r.config.chart.type!=="area"||r.globals.comboCharts||r.config.tooltip.intersect||(x+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[t]>0: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;c<n.x.length;c++){var u=t+1,g=!0;t===0&&c===0&&(u=0),t===0&&c===1&&(u=1);var f=a.globals.markers.size[r];if(l!==1/0){var p=a.config.plotOptions.bubble;f=a.globals.seriesZ[r][u],p.zScaling&&(f/=l),p.minBubbleRadius&&f<p.minBubbleRadius&&(f=p.minBubbleRadius),p.maxBubbleRadius&&f>p.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+u<p.y||e+c<p.x)&&(h=!0)}return(s===0||r)&&(h=!0),{x:e,y:t,textRects:d,drawnextLabel:h}}},{key:"drawDataLabel",value:function(e){var t=this,i=e.type,a=e.pos,s=e.i,r=e.j,n=e.isRangeStart,l=e.strokeWidth,h=l===void 0?2:l,d=this.w,c=new X(this.ctx),u=d.config.dataLabels,g=0,f=0,p=r,x=null;if(d.globals.collapsedSeriesIndices.indexOf(s)!==-1||!u.enabled||!Array.isArray(a.x))return x;x=c.group({class:"apexcharts-data-labels"});for(var b=0;b<a.x.length;b++)if(g=a.x[b]+u.offsetX,f=a.y[b]+u.offsetY+h,!isNaN(g)){r===1&&b===0&&(p=0),r===1&&b===1&&(p=1);var m=d.globals.series[s][p];i==="rangeArea"&&(m=n?d.globals.seriesRangeStart[s][p]:d.globals.seriesRangeEnd[s][p]);var v="",k=function(C){return d.config.dataLabels.formatter(C,{ctx:t.ctx,seriesIndex:s,dataPointIndex:p,w:d})};d.config.chart.type==="bubble"?(v=k(m=d.globals.seriesZ[s][p]),f=a.y[b],f=new ts(this.ctx).centerTextInBubble(f,s,p).y):m!==void 0&&(v=k(m));var y=d.config.dataLabels.textAnchor;d.globals.isSlopeChart&&(y=p===0?"end":p===d.config.series[s].data.length-1?"start":"middle"),this.plotDataLabelsText({x:g,y:f,text:v,i:s,j:p,parent:x,offsetCorrection:!0,dataLabelsConfig:d.config.dataLabels,textAnchor:y})}return x}},{key:"plotDataLabelsText",value:function(e){var t=this.w,i=new X(this.ctx),a=e.x,s=e.y,r=e.i,n=e.j,l=e.text,h=e.textAnchor,d=e.fontSize,c=e.parent,u=e.dataLabelsConfig,g=e.color,f=e.alwaysDrawDataLabel,p=e.offsetCorrection,x=e.className,b=null;if(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(r)<0)return b;var m={x:a,y:s,drawnextLabel:!0,textRects:null};p&&(m=this.dataLabelsCorrection(a,s,l,r,n,f,parseInt(u.style.fontSize,10))),t.globals.zoomed||(a=m.x,s=m.y),m.textRects&&(a<-20-m.textRects.width||a>t.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;i<t.length;i++){var a=t[i],s=a.getBBox(),r=null;if(s.width&&s.height&&(r=this.addBackgroundToDataLabel(a,s)),r){a.parentNode.insertBefore(r.node,a);var n=a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:n}):r.attr({fill:n}),a.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),a=0;a<t.length;a++)i&&i.insertBefore(t[a],i.nextSibling)}}]),o}(),Le=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return O(o,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(L.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var t=this.getSeriesByName(e),i=parseInt(t.getAttribute("data:realIndex"),10);return{isHidden:t.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(e,t){var i=this.w;function a(s){for(var r=0;r<s.length;r++)s[r].index===t&&e.node.classList.add("apexcharts-series-collapsed")}a(i.globals.collapsedSeries),a(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var t=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,t.isHidden),t.isHidden}},{key:"showSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!0)}},{key:"hideSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!1)}},{key:"resetSeries",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],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<e.length;i++)t.globals.collapsedSeriesIndices.indexOf(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<s.length;d++)s[d].classList.add(this.legendInactiveClass);if(r)t.globals.axisCharts||r.parentNode.classList.remove(this.legendInactiveClass),r.classList.remove(this.legendInactiveClass),n!==null&&n.classList.remove(this.legendInactiveClass),l!==null&&l.classList.remove(this.legendInactiveClass);else for(var c=0;c<s.length;c++)s[c].classList.remove(this.legendInactiveClass)}},{key:"toggleSeriesOnHover",value:function(e,t){var i=this.w;t||(t=e.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){var s=parseInt(t.getAttribute("rel"),10)-1;this.highlightSeries(i.globals.seriesNames[s])}else if(e.type==="mouseout")for(var r=0;r<a.length;r++)a[r].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,t){var i=this,a=this.w,s=a.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),r=function(h){for(var d=0;d<s.length;d++)s[d].classList[h](i.legendInactiveClass)};if(e.type==="mousemove"){var n=parseInt(t.getAttribute("rel"),10)-1;r("add");var l=a.config.plotOptions.heatmap.colorScale.ranges;(function(h,d){for(var c=0;c<s.length;c++){var u=Number(s[c].getAttribute("val"));u>=h.from&&(u<h.to||h.to===d&&u===d)&&s[c].classList.remove(i.legendInactiveClass)}})(l[n],l.reduce(function(h,d){return Math.max(h,d.to)},0))}else e.type==="mouseout"&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&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<s.length: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;c<h.length;c++)if(h[c].hasAttribute("pathTo")){var u=h[c].getAttribute("pathTo");d.paths.push({d:u})}e.globals.previousPaths.push(d)}e.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(function(r){for(var n,l=(n=r,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(n,"-series .apexcharts-series"))),h=0;h<l.length;h++)t(l,h,r)});var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(i.length>0)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;d<n.length;d++)h(d);e.globals.previousPaths.push(l)},s=0;s<i.length;s++)a(s);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,t=e.config.noData,i=new X(this.ctx),a=e.globals.svgWidth/2,s=e.globals.svgHeight/2,r="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,t.align==="left"?(a=10,r="start"):t.align==="right"&&(a=e.globals.svgWidth-10,r="end"),t.verticalAlign==="top"?s=50:t.verticalAlign==="bottom"&&(s=e.globals.svgHeight-50),a+=t.offsetX,s=s+parseInt(t.style.fontSize,10)+2+t.offsetY,t.text!==void 0&&t.text!==""){var n=i.drawText({x:a,y:s,text:t.text,textAnchor:r,fontSize:t.style.fontSize,fontFamily:t.style.fontFamily,foreColor:t.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(n)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var t=this.w,i=0;i<e.length;i++)if(e[i].length===0)for(var a=0;a<e[t.globals.maxValsInArrayIndex].length;a++)e[i].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,t=this.w,i=this.filteredSeriesX(),a=0;a<i.length-1;a++)if(i[a][0]!==i[a+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){var e=this.w.globals.seriesX.map(function(t){return t.length>0?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<e[t].data.length;r++)if(e[t].data[r][1]!==void 0&&(Array.isArray(e[t].data[r][1])&&e[t].data[r][1].length===4&&!s?this.twoDSeries.push(L.parseNumber(e[t].data[r][1][3])):e[t].data[r].length>=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<e[t].data.length;l++)e[t].data[l][2]!==void 0&&(this.threeDSeries.push(e[t].data[l][2]),a.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,t){var i=this.w.config,a=this.w.globals,s=new de(this.ctx),r=t;a.collapsedSeriesIndices.indexOf(t)>-1&&(r=this.activeSeriesIndex);for(var n=0;n<e[t].data.length;n++)e[t].data[n].y!==void 0&&(Array.isArray(e[t].data[n].y)?this.twoDSeries.push(L.parseNumber(e[t].data[n].y[e[t].data[n].y.length-1])):this.twoDSeries.push(L.parseNumber(e[t].data[n].y))),e[t].data[n].goals!==void 0&&Array.isArray(e[t].data[n].goals)?(this.seriesGoals[t]===void 0&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(e[t].data[n].goals)):(this.seriesGoals[t]===void 0&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(null));for(var l=0;l<e[r].data.length;l++){var h=typeof e[r].data[l].x=="string",d=Array.isArray(e[r].data[l].x),c=!d&&!!s.isValidDate(e[r].data[l].x);if(h||c)if(h||i.xaxis.convertedCatToNumeric){var u=a.isBarHorizontal&&a.isRangeData;i.xaxis.type!=="datetime"||u?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[l].x),isNaN(e[r].data[l].x)||this.w.config.xaxis.type==="category"||typeof e[r].data[l].x=="string"||(a.isXNumeric=!0)):this.twoDSeriesX.push(s.parseDate(e[r].data[l].x))}else i.xaxis.type==="datetime"?this.twoDSeriesX.push(s.parseDate(e[r].data[l].x.toString())):(a.dataFormatXNumeric=!0,a.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[r].data[l].x)));else d?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[l].x)):(a.isXNumeric=!0,a.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[r].data[l].x))}if(e[t].data[0]&&e[t].data[0].z!==void 0){for(var g=0;g<e[t].data.length;g++)this.threeDSeries.push(e[t].data[g].z);a.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,t){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleRangeDataFormat("array",e,t):this.isFormatXY()&&(a=this.handleRangeDataFormat("xy",e,t)),i.seriesRangeStart.push(a.start===void 0?[]:a.start),i.seriesRangeEnd.push(a.end===void 0?[]:a.end),i.seriesRange.push(a.rangeUniques),i.seriesRange.forEach(function(s,r){s&&s.forEach(function(n,l){n.y.forEach(function(h,d){for(var c=0;c<n.y.length;c++)if(d!==c){var u=h.y1,g=h.y2,f=n.y[c].y1;u<=n.y[c].y2&&f<=g&&(n.overlaps.indexOf(h.rangeName)<0&&n.overlaps.push(h.rangeName),n.overlaps.indexOf(n.y[c].rangeName)<0&&n.overlaps.push(n.y[c].rangeName))}})})}),a}},{key:"handleCandleStickBoxData",value:function(e,t){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleCandleStickBoxDataFormat("array",e,t):this.isFormatXY()&&(a=this.handleCandleStickBoxDataFormat("xy",e,t)),i.seriesCandleO[t]=a.o,i.seriesCandleH[t]=a.h,i.seriesCandleM[t]=a.m,i.seriesCandleL[t]=a.l,i.seriesCandleC[t]=a.c,a}},{key:"handleRangeDataFormat",value:function(e,t,i){var a=[],s=[],r=t[i].data.filter(function(d,c,u){return c===u.findIndex(function(g){return g.x===d.x})}).map(function(d,c){return{x:d.x,overlaps:[],y:[]}});if(e==="array")for(var n=0;n<t[i].data.length;n++)Array.isArray(t[i].data[n])?(a.push(t[i].data[n][1][0]),s.push(t[i].data[n][1][1])):(a.push(t[i].data[n]),s.push(t[i].data[n]));else if(e==="xy")for(var l=function(d){var c=Array.isArray(t[i].data[d].y),u=L.randomId(),g=t[i].data[d].x,f={y1:c?t[i].data[d].y[0]:t[i].data[d].y,y2:c?t[i].data[d].y[1]:t[i].data[d].y,rangeName:u};t[i].data[d].rangeName=u;var p=r.findIndex(function(x){return x.x===g});r[p].y.push(f),a.push(f.y1),s.push(f.y2)},h=0;h<t[i].data.length;h++)l(h);return{start:a,end:s,rangeUniques:r}}},{key:"handleCandleStickBoxDataFormat",value:function(e,t,i){var a=this.w,s=a.config.chart.type==="boxPlot"||a.config.series[i].type==="boxPlot",r=[],n=[],l=[],h=[],d=[];if(e==="array")if(s&&t[i].data[0].length===6||!s&&t[i].data[0].length===5)for(var c=0;c<t[i].data.length;c++)r.push(t[i].data[c][1]),n.push(t[i].data[c][2]),s?(l.push(t[i].data[c][3]),h.push(t[i].data[c][4]),d.push(t[i].data[c][5])):(h.push(t[i].data[c][3]),d.push(t[i].data[c][4]));else for(var u=0;u<t[i].data.length;u++)Array.isArray(t[i].data[u][1])&&(r.push(t[i].data[u][1][0]),n.push(t[i].data[u][1][1]),s?(l.push(t[i].data[u][1][2]),h.push(t[i].data[u][1][3]),d.push(t[i].data[u][1][4])):(h.push(t[i].data[u][1][2]),d.push(t[i].data[u][1][3])));else if(e==="xy")for(var g=0;g<t[i].data.length;g++)Array.isArray(t[i].data[g].y)&&(r.push(t[i].data[g].y[0]),n.push(t[i].data[g].y[1]),s?(l.push(t[i].data[g].y[2]),h.push(t[i].data[g].y[3]),d.push(t[i].data[g].y[4])):(h.push(t[i].data[g].y[2]),d.push(t[i].data[g].y[3])));return{o:r,h:n,m:l,l:h,c:d}}},{key:"parseDataAxisCharts",value:function(e){var t=this,i=arguments.length>1&&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;g<n.length;g++)if(typeof n[g]=="string"){if(!r.isValidDate(n[g]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");t.twoDSeriesX.push(r.parseDate(n[g]))}else t.twoDSeriesX.push(n[g])},c=0;c<e.length;c++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],e[c].data===void 0)return void console.error("It is a possibility that you may have not included 'data' property in series.");if(a.chart.type!=="rangeBar"&&a.chart.type!=="rangeArea"&&e[c].type!=="rangeBar"&&e[c].type!=="rangeArea"||(s.isRangeData=!0,a.chart.type!=="rangeBar"&&a.chart.type!=="rangeArea"||this.handleRangeData(e,c)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,c):this.isFormatXY()&&this.handleFormatXY(e,c),a.chart.type!=="candlestick"&&e[c].type!=="candlestick"&&a.chart.type!=="boxPlot"&&e[c].type!=="boxPlot"||this.handleCandleStickBoxData(e,c),s.series.push(this.twoDSeries),s.labels.push(this.twoDSeriesX),s.seriesX.push(this.twoDSeriesX),s.seriesGoals=this.seriesGoals,c!==this.activeSeriesIndex||this.fallbackToCategory||(s.isXNumeric=!0);else{a.xaxis.type==="datetime"?(s.isXNumeric=!0,d(),s.seriesX.push(this.twoDSeriesX)):a.xaxis.type==="numeric"&&(s.isXNumeric=!0,n.length>0&&(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;a<t.series.length;a++)t.seriesNames[a]===void 0&&t.seriesNames.push("series-"+(a+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var t=this.w.config,i=this.w.globals;t.xaxis.categories.length>0?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;n<s[r].length;n++)a.push(n+1);else for(var l=0;l<t.series[t.maxValsInArrayIndex].length;l++)a.push(l+1);t.seriesX=[];for(var h=0;h<e.length;h++)t.seriesX.push(a);this.w.globals.isBarHorizontal||(t.isXNumeric=!0)}if(a.length===0){a=t.axisCharts?[]:t.series.map(function(c,u){return u+1});for(var d=0;d<e.length;d++)t.seriesX.push(a)}t.labels=a,i.xaxis.convertedCatToNumeric&&(t.categoryLabels=a.map(function(c){return i.xaxis.labels.formatter(c)})),t.noLabelsProvided=!0}},{key:"parseData",value:function(e){var t=this.w,i=t.config,a=t.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),a.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),i.chart.stacked){var s=new Le(this.ctx);a.series=s.setNullSeriesToZeroValues(a.series)}this.coreUtils.getSeriesTotals(),a.axisCharts&&(a.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),a.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),a.dataFormatXNumeric||a.isXNumeric&&(i.xaxis.type!=="numeric"||i.labels.length!==0||i.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);for(var r=this.coreUtils.getCategoryLabels(a.labels),n=0;n<r.length;n++)if(Array.isArray(r[n])){a.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this.w,t=[];e.globals.seriesYAxisMap.forEach(function(i,a){var s=0;i.forEach(function(r){e.globals.collapsedSeriesIndices.indexOf(r)!==-1&&s++}),s>0&&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(/&nbsp;/g,"&#160;"))})})}},{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;w<y.data.length;w++){d=[];var A=v(w);if(A!=="nullvalue"){if(A||(b.isFormatXY()?A=i[C].data[w].x:b.isFormat2DArray()&&(A=i[C].data[w]?i[C].data[w][0]:"")),C===0){d.push(f(A));for(var S=0;S<h.globals.series.length;S++){var M,P=b.isFormatXY()?(M=i[S].data[w])===null||M===void 0?void 0:M.y:g[S][w];d.push(p(P))}}(h.config.chart.type==="candlestick"||y.type&&y.type==="candlestick")&&(d.pop(),d.push(h.globals.seriesCandleO[C][w]),d.push(h.globals.seriesCandleH[C][w]),d.push(h.globals.seriesCandleL[C][w]),d.push(h.globals.seriesCandleC[C][w])),(h.config.chart.type==="boxPlot"||y.type&&y.type==="boxPlot")&&(d.pop(),d.push(h.globals.seriesCandleO[C][w]),d.push(h.globals.seriesCandleH[C][w]),d.push(h.globals.seriesCandleM[C][w]),d.push(h.globals.seriesCandleL[C][w]),d.push(h.globals.seriesCandleC[C][w])),h.config.chart.type==="rangeBar"&&(d.pop(),d.push(h.globals.seriesRangeStart[C][w]),d.push(h.globals.seriesRangeEnd[C][w])),d.length&&c.push(d.join(r))}}}};d.push(h.config.chart.toolbar.export.csv.headerCategory),h.config.chart.type==="boxPlot"?(d.push("minimum"),d.push("q1"),d.push("median"),d.push("q3"),d.push("maximum")):h.config.chart.type==="candlestick"?(d.push("open"),d.push("high"),d.push("low"),d.push("close")):h.config.chart.type==="rangeBar"?(d.push("minimum"),d.push("maximum")):i.map(function(y,C){var w=(y.name?y.name:"series-".concat(C))+"";h.globals.axisCharts&&d.push(w.split(r).join("")?w.split(r).join(""):"series-".concat(C))}),h.globals.axisCharts||(d.push(h.config.chart.toolbar.export.csv.headerValue),c.push(d.join(r))),h.globals.allSeriesHasEqualX||!h.globals.axisCharts||h.config.xaxis.categories.length||h.config.labels.length?i.map(function(y,C){h.globals.axisCharts?k(y,C):((d=[]).push(f(h.globals.labels[C])),d.push(p(g[C])),c.push(d.join(r)))}):function(){var y=new Set,C={};i.forEach(function(w,A){w==null||w.data.forEach(function(S){var M,P;if(b.isFormatXY())M=S.x,P=S.y;else{if(!b.isFormat2DArray())return;M=S[0],P=S[1]}C[M]||(C[M]=Array(i.length).fill("")),C[M][A]=p(P),y.add(M)})}),d.length&&c.push(d.join(r)),Array.from(y).sort().forEach(function(w){c.push([f(w),C[w].join(r)])})}(),u+=c.join(l),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+u),a||h.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,t,i){var a=document.createElement("a");a.href=e,a.download=(t||this.w.globals.chartID)+i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}]),o}(),kt=function(){function o(e,t){H(this,o),this.ctx=e,this.elgrid=t,this.w=e.w;var i=this.w;this.axesUtils=new Ne(e),this.xaxisLabels=i.globals.labels.slice(),i.globals.timescaleLabels.length>0&&!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;r<this.xaxisLabels.length;r++)s.push(this.xaxisLabels[r]);if(this.drawXAxisLabelAndGroup(!0,t,a,s,e.globals.isXNumeric,function(f,p){return p}),e.globals.hasXaxisGroups){var n=e.globals.groups;s=[];for(var l=0;l<n.length;l++)s.push(n[l].title);var h={};e.config.xaxis.group.style&&(h.xaxisFontSize=e.config.xaxis.group.style.fontSize,h.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,h.xaxisForeColors=e.config.xaxis.group.style.colors,h.fontWeight=e.config.xaxis.group.style.fontWeight,h.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,t,a,s,!1,function(f,p){return n[f].cols*p},h)}if(e.config.xaxis.title.text!==void 0){var d=t.group({class:"apexcharts-xaxis-title"}),c=t.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.globals.xAxisLabelsHeight:-e.globals.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});d.add(c),i.add(d)}if(e.config.xaxis.axisBorder.show){var u=e.globals.barPadForNumericAxis,g=t.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-u,this.offY,this.xaxisBorderWidth+u,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(g):i.add(g)}return i}},{key:"drawXAxisLabelAndGroup",value:function(e,t,i,a,s,r){var n,l=this,h=arguments.length>6&&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))}}A<v-1&&(m+=r(A+1,n))},w=0;w<=v-1;w++)C(w)}},{key:"drawXaxisInversed",value:function(e){var t,i,a=this,s=this.w,r=new X(this.ctx),n=s.config.yaxis[0].opposite?s.globals.translateYAxisX[e]:0,l=r.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),h=r.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+n+", 0)"});l.add(h);var d=[];if(s.config.yaxis[e].show)for(var c=0;c<this.xaxisLabels.length;c++)d.push(this.xaxisLabels[c]);t=s.globals.gridHeight/d.length,i=-t/2.2;var u=s.globals.yLabelFormatters[0],g=s.config.yaxis[0].labels;if(g.show)for(var f=function(y){var C=d[y]===void 0?"":d[y];C=u(C,{seriesIndex:e,dataPointIndex:y,w:s});var w=a.axesUtils.getYAxisForeColor(g.style.colors,e),A=0;Array.isArray(C)&&(A=C.length/2*parseInt(g.style.fontSize,10));var S=g.offsetX-15,M="end";a.yaxis.opposite&&(M="start"),s.config.yaxis[0].labels.align==="left"?(S=g.offsetX,M="start"):s.config.yaxis[0].labels.align==="center"?(S=g.offsetX,M="middle"):s.config.yaxis[0].labels.align==="right"&&(M="end");var P=r.drawText({x:S,y:i+t+g.offsetY-A,text:C,textAnchor:M,foreColor:Array.isArray(w)?w[y]:w,fontSize:g.style.fontSize,fontFamily:g.style.fontFamily,fontWeight:g.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+g.style.cssClass,maxWidth:g.maxWidth});h.add(P),P.on("click",function(z){if(typeof s.config.chart.events.xAxisLabelClick=="function"){var E=Object.assign({},s,{labelIndex:y});s.config.chart.events.xAxisLabelClick(z,a.ctx,E)}});var I=document.createElementNS(s.globals.SVGNS,"title");if(I.textContent=Array.isArray(C)?C.join(" "):C,P.node.appendChild(I),s.config.yaxis[e].labels.rotate!==0){var T=r.rotateAroundCenter(P.node);P.node.setAttribute("transform","rotate(".concat(s.config.yaxis[e].labels.rotate," 0 ").concat(T.y,")"))}i+=t},p=0;p<=d.length-1;p++)f(p);if(s.config.yaxis[0].title.text!==void 0){var x=r.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+n+", 0)"}),b=r.drawText({x:s.config.yaxis[0].title.offsetX,y:s.globals.gridHeight/2+s.config.yaxis[0].title.offsetY,text:s.config.yaxis[0].title.text,textAnchor:"middle",foreColor:s.config.yaxis[0].title.style.color,fontSize:s.config.yaxis[0].title.style.fontSize,fontWeight:s.config.yaxis[0].title.style.fontWeight,fontFamily:s.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+s.config.yaxis[0].title.style.cssClass});x.add(b),l.add(x)}var m=0;this.isCategoryBarHorizontal&&s.config.yaxis[0].opposite&&(m=s.globals.gridWidth);var v=s.config.xaxis.axisBorder;if(v.show){var k=r.drawLine(s.globals.padHorizontal+v.offsetX+m,1+v.offsetY,s.globals.padHorizontal+v.offsetX+m,s.globals.gridHeight+v.offsetY,v.color,0);this.elgrid&&this.elgrid.elGridBorders&&s.config.grid.show?this.elgrid.elGridBorders.add(k):l.add(k)}return s.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(m,d.length,s.config.yaxis[0].axisBorder,s.config.yaxis[0].axisTicks,0,t,l),l}},{key:"drawXaxisTicks",value:function(e,t,i){var a=this.w,s=e;if(!(e<0||e-2>a.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;s<i;s++)a=this.xaxisLabels[s].position,t.push(a);else for(var r=i,n=0;n<r;n++){var l=r;e.globals.isXNumeric&&e.config.chart.type!=="bar"&&(l-=1),a+=e.globals.gridWidth/l,t.push(a)}return t}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,t=new X(this.ctx),i=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var n=0;n<a.length;n++){var l=t.rotateAroundCenter(a[n]);l.y=l.y-1,l.x=l.x+1,a[n].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(l.x," ").concat(l.y,")")),a[n].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")"));var h=a[n].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(h,function(g){t.placeTextWithEllipsis(g,g.textContent,e.globals.xAxisLabelsHeight-(e.config.legend.position==="bottom"?20:10))})}else(function(){for(var g=e.globals.gridWidth/(e.globals.labels.length+1),f=0;f<a.length;f++){var p=a[f].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(p,function(x){t.placeTextWithEllipsis(x,x.textContent,g)})}})();if(s.length>0){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;u<r.length;u++)t.placeTextWithEllipsis(r[u],r[u].textContent,e.config.yaxis[0].labels.maxWidth-(e.config.yaxis[0].title.text?2*parseFloat(e.config.yaxis[0].title.style.fontSize):0)-15)}}}]),o}(),is=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w;var t=this.w;this.xaxisLabels=t.globals.labels.slice(),this.axesUtils=new Ne(e),this.isRangeBar=t.globals.seriesRange.length&&t.globals.isBarHorizontal,t.globals.timescaleLabels.length>0&&(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;u<t&&g<c.length;g++)u+=c[g].cols;u===t&&(d=.6*h.globals.xAxisLabelsHeight)}}new kt(this.ctx).drawXaxisTicks(i,d,h.globals.dom.elGraphical)}}},{key:"_drawGridLine",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,d=l.node.classList.contains("apexcharts-gridlines-horizontal"),c=h.globals.barPadForNumericAxis,u=a===0&&r===0||i===0&&s===0||a===h.globals.gridHeight&&r===h.globals.gridHeight||h.globals.isBarHorizontal&&(t===0||t===n-1),g=new X(this).drawLine(i-(d?c:0),a,s+(d?c:0),r,h.config.grid.borderColor,h.config.grid.strokeDashArray);g.node.classList.add("apexcharts-gridline"),u&&h.config.grid.show?this.elGridBorders.add(g):l.add(g)}},{key:"_drawGridBandRect",value:function(e){var t=e.c,i=e.x1,a=e.y1,s=e.x2,r=e.y2,n=e.type,l=this.w,h=new X(this.ctx),d=l.globals.barPadForNumericAxis,c=l.config.grid[n].colors[t],u=h.drawRect(i-(n==="row"?d:0),a,s+(n==="row"?2*d:0),r,0,c,l.config.grid[n].opacity);this.elg.add(u),u.attr("clip-path","url(#gridRectMask".concat(l.globals.cuid,")")),u.node.classList.add("apexcharts-grid-".concat(n))}},{key:"_drawXYLines",value:function(e){var t=this,i=e.xCount,a=e.tickAmount,s=this.w;if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show){var r,n=s.globals.padHorizontal,l=s.globals.gridHeight;s.globals.timescaleLabels.length?function(f){for(var p=f.xC,x=f.x1,b=f.y1,m=f.x2,v=f.y2,k=0;k<p;k++)x=t.xaxisLabels[k].position,m=t.xaxisLabels[k].position,t._drawGridLines({i:k,x1:x,y1:b,x2:m,y2:v,xCount:i,parent:t.elgridLinesV})}({xC:i,x1:n,y1:0,x2:r,y2:l}):(s.globals.isXNumeric&&(i=s.globals.xAxisScale.result.length),function(f){for(var p=f.xC,x=f.x1,b=f.y1,m=f.x2,v=f.y2,k=0;k<p+(s.globals.isXNumeric?0:1);k++)k===0&&p===1&&s.globals.dataPoints===1&&(m=x=s.globals.gridWidth/2),t._drawGridLines({i:k,x1:x,y1:b,x2:m,y2:v,xCount:i,parent:t.elgridLinesV}),m=x+=s.globals.gridWidth/(s.globals.isXNumeric?p-1:p)}({xC:i,x1:n,y1:0,x2:r,y2:l}))}if(s.config.grid.yaxis.lines.show){var h=0,d=0,c=s.globals.gridWidth,u=a+1;this.isRangeBar&&(u=s.globals.labels.length);for(var g=0;g<u+(this.isRangeBar?1:0);g++)this._drawGridLine({i:g,xCount:u+(this.isRangeBar?1:0),x1:0,y1:h,x2:c,y2:d,parent:this.elgridLinesH}),d=h+=s.globals.gridHeight/(this.isRangeBar?u:a)}}},{key:"_drawInvertedXYLines",value:function(e){var t=e.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var a,s=i.globals.padHorizontal,r=i.globals.gridHeight,n=0;n<t+1;n++)i.config.grid.xaxis.lines.show&&this._drawGridLine({i:n,xCount:t+1,x1:s,y1:0,x2:a,y2:r,parent:this.elgridLinesV}),new kt(this.ctx).drawXaxisTicks(s,0,i.globals.dom.elGraphical),a=s+=i.globals.gridWidth/t;if(i.config.grid.yaxis.lines.show)for(var l=0,h=0,d=i.globals.gridWidth,c=0;c<i.globals.dataPoints+1;c++)this._drawGridLine({i:c,xCount:i.globals.dataPoints+1,x1:0,y1:l,x2:d,y2:h,parent:this.elgridLinesH}),h=l+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,t=e.globals,i=new X(this.ctx);this.elg=i.group({class:"apexcharts-grid"}),this.elgridLinesH=i.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=i.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=i.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());for(var a=0;a<t.seriesYAxisMap.length&&t.ignoreYAxisIndexes.includes(a);)a++;a===t.seriesYAxisMap.length&&(a=0);var s,r=t.yAxisScale[a].result.length-1;if(!t.isBarHorizontal||this.isRangeBar){var n,l,h;s=this.xaxisLabels.length,this.isRangeBar&&(r=t.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(s=e.config.xaxis.tickAmount),((n=t.yAxisScale)===null||n===void 0||(l=n[a])===null||l===void 0||(h=l.result)===null||h===void 0?void 0:h.length)>0&&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<p;k++,y++)y>=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<e;c++,u++){var g;u>=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/M<a&&(A=M),m=A}x=Math.round(b/m)}else{if(s||r){if(r)if(u)e=t-m*x;else{var P=e;e=m*Math.floor(e/m),Math.abs(t-e)/L.getGCD(b,m)>a&&(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;z<t&&(m*=2),z=t,t=(e=T)+m*x,b=Math.abs(t-e),e>0&&e<Math.abs(z-t)&&(e=0,t=m*x),t<0&&-t<Math.abs(T-e)&&(t=0,e=-m*x)}else e=m*Math.floor(e/m),t=m*Math.ceil(t/m);b=Math.abs(t-e),m=L.getGCD(b,m),x=Math.round(b/m)}if(u||s||r||(x=Math.ceil((b-l)/(m+l)))>16&&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;W<Y;W++)for(var _=0;_<=Y-W;_++){for(var G=Math.min(_+W,Y),B=F,ee=1,oe=_;oe<=G;oe++)ee*=E[oe];if((B/=ee)<a){F=B;break e}}m=F===x?b:b/F,x=Math.round(b/m)}d.isMultipleYAxis&&d.multiAxisTickAmount==0&&d.ignoreYAxisIndexes.indexOf(n)<0&&(d.multiAxisTickAmount=x);var K=e-m,pe=m*l;do K+=m,p.push(L.stripNumber(K,7));while(t-K>pe);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));r<s;r++)a.push(Math.pow(i,r));return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScale",value:function(e,t,i){t<=0&&(t=Math.max(e,i)),e<=0&&(e=Math.min(t,i));for(var a=[],s=Math.log(t)/Math.log(i),r=Math.log(e)/Math.log(i),n=s-r,l=Math.round(n),h=n/l,d=0,c=r;d<l;d++,c+=h)a.push(Math.pow(i,c));return a.push(Math.pow(i,s)),{result:a,niceMin:e,niceMax:t}}},{key:"_adjustTicksForSmallRange",value:function(e,t,i){var a=e;if(t!==void 0&&this.w.config.yaxis[t].labels.formatter&&this.w.config.yaxis[t].tickAmount===void 0){var s=Number(this.w.config.yaxis[t].labels.formatter(1));L.isNumber(s)&&this.w.globals.yValueDecimal===0&&(a=Math.ceil(i))}return a<e?a:e}},{key:"setYScaleForIndex",value:function(e,t,i){var a=this.w.globals,s=this.w.config,r=a.isBarHorizontal?s.xaxis:s.yaxis[e];a.yAxisScale[e]===void 0&&(a.yAxisScale[e]=[]);var n=Math.abs(i-t);r.logarithmic&&n<=5&&(a.invalidLogScale=!0),r.logarithmic&&n>5?(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<i.series[S].length;I++){var T=i.series[S][I];T>=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;w<n.length;w++)C(w);d||(d=t.chart.type),d==="bar"||d==="column"?h.forEach(function(A,S){u=Math.min(u,Math.min.apply(null,y[S])),g=Math.max(g,Math.max.apply(null,k[S]))}):(h.forEach(function(A,S){f=Math.min(f,Math.min.apply(null,v[S])),p=Math.max(p,Math.max.apply(null,v[S]))}),u=f,g=p),u===Number.MIN_VALUE&&g===Number.MIN_VALUE&&(g=-Number.MAX_VALUE)})();else for(var x=0;x<n.length;x++){var b=n[x];u=Math.min(u,s[b]),g=Math.max(g,r[b]),!(i.collapsedSeriesIndices.indexOf(b)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(b)<0)||(i.allSeriesCollapsed=!1)}t.yaxis[l].min!==void 0&&(u=typeof t.yaxis[l].min=="function"?t.yaxis[l].min(u):t.yaxis[l].min),t.yaxis[l].max!==void 0&&(g=typeof t.yaxis[l].max=="function"?t.yaxis[l].max(g):t.yaxis[l].max),i.barGroups=i.barGroups.filter(function(m,v,k){return k.indexOf(m)===v}),e.setYScaleForIndex(l,u,g),n.forEach(function(m){s[m]=i.yAxisScale[l].niceMin,r[m]=i.yAxisScale[l].niceMax})}():e.setYScaleForIndex(l,0,-Number.MAX_VALUE)})}}]),o}(),Ci=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.scales=new as(e)}return O(o,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var t=arguments.length>1&&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;p<a;p++){r.dataPoints=Math.max(r.dataPoints,h[p].length);var x=s.series[p].type;r.categoryLabels.length&&(r.dataPoints=r.categoryLabels.filter(function(y){return y!==void 0}).length),r.labels.length&&s.xaxis.type!=="datetime"&&r.series.reduce(function(y,C){return y+C.length},0)!==0&&(r.dataPoints=Math.max(r.dataPoints,r.labels.length));var b=0,m=h[p].length-1;if(u){if(s.xaxis.min)for(;b<m&&r.seriesX[p][b]<s.xaxis.min;b++);if(s.xaxis.max)for(;m>b&&r.seriesX[p][m]>s.xaxis.max;m--);}for(var v=b;v<=m&&v<r.series[p].length;v++){var k=h[p][v];if(k!==null&&L.isNumber(k)){switch(c[p][v]!==void 0&&(n=Math.max(n,c[p][v]),t=Math.min(t,c[p][v])),d[p][v]!==void 0&&(t=Math.min(t,d[p][v]),i=Math.max(i,d[p][v])),x){case"candlestick":r.seriesCandleC[p][v]!==void 0&&(n=Math.max(n,r.seriesCandleH[p][v]),t=Math.min(t,r.seriesCandleL[p][v]));break;case"boxPlot":r.seriesCandleC[p][v]!==void 0&&(n=Math.max(n,r.seriesCandleC[p][v]),t=Math.min(t,r.seriesCandleO[p][v]))}x&&x!=="candlestick"&&x!=="boxPlot"&&x!=="rangeArea"&&x!=="rangeBar"&&(n=Math.max(n,r.series[p][v]),t=Math.min(t,r.series[p][v])),r.seriesGoals[p]&&r.seriesGoals[p][v]&&Array.isArray(r.seriesGoals[p][v])&&r.seriesGoals[p][v].forEach(function(y){n=Math.max(n,y.value),t=Math.min(t,y.value)}),i=n,L.isFloat(k)&&(k=L.noExponents(k),r.yValueDecimal=Math.max(r.yValueDecimal,k.toString().split(".")[1].length)),l>d[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;s<e.series.length;s++)i=this.getMinYMaxY(s),e.minYArr[s]=i.lowestY,e.maxYArr[s]=i.highestY,a=Math.min(a,i.lowestY)}return i=this.getMinYMaxY(0,a,null,e.series.length),t.chart.type==="bar"?(e.minY=i.minY,e.maxY=i.maxY):(e.minY=i.lowestY,e.maxY=i.highestY),a=i.lowestY,t.chart.stacked&&this._setStackedMinMax(),t.chart.type==="line"||t.chart.type==="area"||t.chart.type==="scatter"||t.chart.type==="candlestick"||t.chart.type==="boxPlot"||t.chart.type==="rangeBar"&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&a!==-Number.MAX_VALUE&&a!==e.maxY&&(e.minY=a):e.minY=e.minY!==Number.MIN_VALUE?Math.min(i.minY,e.minY):i.minY,t.yaxis.forEach(function(r,n){r.max!==void 0&&(typeof r.max=="number"?e.maxYArr[n]=r.max:typeof r.max=="function"&&(e.maxYArr[n]=r.max(e.isMultipleYAxis?e.maxYArr[n]:e.maxY)),e.maxY=e.maxYArr[n]),r.min!==void 0&&(typeof r.min=="number"?e.minYArr[n]=r.min:typeof r.min=="function"&&(e.minYArr[n]=r.min(e.isMultipleYAxis?e.minYArr[n]===Number.MIN_VALUE?0:e.minYArr[n]:e.minY)),e.minY=e.minYArr[n])}),e.isBarHorizontal&&["min","max"].forEach(function(r){t.xaxis[r]!==void 0&&typeof t.xaxis[r]=="number"&&(r==="min"?e.minY=t.xaxis[r]:e.maxY=t.xaxis[r])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=a):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],t.series.forEach(function(r){switch(r.type||t.chart.type){case"bar":case"column":e.barGroups.push(r.group);break;case"line":e.lineGroups.push(r.group);break;case"area":e.areaGroups.push(r.group)}}),e.barGroups=e.barGroups.filter(function(r,n,l){return l.indexOf(r)===n}),e.lineGroups=e.lineGroups.filter(function(r,n,l){return l.indexOf(r)===n}),e.areaGroups=e.areaGroups.filter(function(r,n,l){return l.indexOf(r)===n}),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,t=this.w.config,i=t.xaxis.type==="numeric"||t.xaxis.type==="datetime"||t.xaxis.type==="category"&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var l=0;l<e.series.length;l++)if(e.labels[l])for(var h=0;h<e.labels[l].length;h++)e.labels[l][h]!==null&&L.isNumber(e.labels[l][h])&&(e.maxX=Math.max(e.maxX,e.labels[l][h]),e.initialMaxX=Math.max(e.maxX,e.labels[l][h]),e.minX=Math.min(e.minX,e.labels[l][h]),e.initialMinX=Math.min(e.minX,e.labels[l][h]))}(),e.noLabelsProvided&&t.xaxis.categories.length===0&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var a=10;if(t.xaxis.tickAmount===void 0)a=Math.round(e.svgWidth/150),t.xaxis.type==="numeric"&&e.dataPoints<30&&(a=e.dataPoints-1),a>e.dataPoints&&e.dataPoints!==0&&(a=e.dataPoints-1);else if(t.xaxis.tickAmount==="dataPoints"){if(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;n<e.maxX;n++)r.push(n+1);e.xAxisScale={result:r,niceMin:r[0],niceMax:r[r.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,a,a,0,t.xaxis.stepSize),e.noLabelsProvided&&e.labels.length>0&&(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;t<e.series.length;t++)if(e.seriesZ[t]!==void 0)for(var i=0;i<e.seriesZ[t].length;i++)e.seriesZ[t][i]!==null&&L.isNumber(e.seriesZ[t][i])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[t][i]),e.minZ=Math.min(e.minZ,e.seriesZ[t][i]))}}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){var i=new de(this.ctx);if(t.xaxis.type==="datetime"){var a=i.getDate(e.minX);t.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()-2):a.setDate(a.getDate()-2),e.minX=new Date(a).getTime();var s=i.getDate(e.maxX);t.xaxis.labels.datetimeUTC?s.setUTCDate(s.getUTCDate()+2):s.setDate(s.getDate()+2),e.maxX=new Date(s).getTime()}else(t.xaxis.type==="numeric"||t.xaxis.type==="category"&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach(function(t,i){if(t.length){t.length===1&&t.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var a=t.slice();a.sort(function(s,r){return s-r}),a.forEach(function(s,r){if(r>0){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;l<t.series[t.maxValsInArrayIndex].length;l++){var h,d,c,u;a[r][l]===void 0&&(a[r][l]=0,s[r][l]=0),(e.w.config.chart.stacked&&!t.comboCharts||e.w.config.chart.stacked&&t.comboCharts&&(!e.w.config.chart.stackOnlyBar||((h=e.w.config.series)===null||h===void 0||(d=h[n])===null||d===void 0?void 0:d.type)==="bar"||((c=e.w.config.series)===null||c===void 0||(u=c[n])===null||u===void 0?void 0:u.type)==="column"))&&t.series[n][l]!==null&&L.isNumber(t.series[n][l])&&(t.series[n][l]>0?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<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;r<s;r++)a[r].apply(null,t)}}},{key:"setupEventHandlers",value:function(){var e=this,t=this.w,i=this.ctx,a=t.globals.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(function(s){a.addEventListener(s,function(r){var n=Object.assign({},t,{seriesIndex:t.globals.axisCharts?t.globals.capturedSeriesIndex:0,dataPointIndex:t.globals.capturedDataPointIndex});r.type==="mousemove"||r.type==="touchmove"?typeof t.config.chart.events.mouseMove=="function"&&t.config.chart.events.mouseMove(r,i,n):r.type==="mouseleave"||r.type==="touchleave"?typeof t.config.chart.events.mouseLeave=="function"&&t.config.chart.events.mouseLeave(r,i,n):(r.type==="mouseup"&&r.which===1||r.type==="touchend")&&(typeof t.config.chart.events.click=="function"&&t.config.chart.events.click(r,i,n),i.ctx.events.fireEvent("click",[r,i,n]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(function(s){t.globals.dom.baseEl.addEventListener(s,e.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var t=this.w,i=e.target.className;if(e.type==="click"){var a=t.globals.dom.baseEl.querySelector(".apexcharts-menu");a&&a.classList.contains("apexcharts-menu-open")&&i!=="apexcharts-menu-icon"&&a.classList.remove("apexcharts-menu-open")}t.globals.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,t.globals.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}}]),o}(),lr=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"setCurrentLocaleValues",value:function(e){var t=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(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;f<s.length;f++)c<s[f].breakpoint&&(h=he.extendArrayProps(r,s[f].options,i),h=L.extend(i.config,h),t.overrideResponsiveOptions(h))};if(e){var l=he.extendArrayProps(r,e,i);l=L.extend(i.config,l),n(l=L.extend(l,e))}else n({})}}},{key:"overrideResponsiveOptions",value:function(e){var t=new wt(e).init({responsiveOverride:!0});this.w.config=t}}]),o}(),dr=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}return O(o,[{key:"checkHeatmapDistributed",value:function(){var e=this.w.config,t=e.chart,i=e.plotOptions;return t.type==="treemap"&&i.treemap&&i.treemap.distributed||t.type==="heatmap"&&i.heatmap&&i.heatmap.distributed}},{key:"checkBarDistributed",value:function(){var e=this.w.config,t=e.chart,i=e.plotOptions;return i.bar&&i.bar.distributed&&(t.type==="bar"||t.type==="rangeBar")}},{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this.w,t=new L;e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode));var i=ce(e.config.colors||e.config.fill.colors||[]);e.globals.colors=this.getColors(i),this.applySeriesColors(e.globals.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.globals.series,t));var a=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],a),this.applyDataLabelsColors(a),this.applyRadarPolygonsColors(),this.applyMarkersColors(a)}},{key:"getColors",value:function(e){var t=this,i=this.w;return e&&e.length!==0?Array.isArray(e)&&e.length>0&&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.length<s)for(var r=s-e.length,n=0;n<r;n++)e.push(e[n])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var t=e.theme.mode,i=t==="dark"?"palette4":t==="light"?"palette1":e.theme.palette||"palette1",a=t==="dark"?"#f6f7f8":t==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=t||"light",e.chart.foreColor=a,e.theme.palette=i,e}},{key:"predefined",value:function(){var e={palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"],palette3:["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"],palette4:["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"],palette5:["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],default:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"]};return e[this.w.config.theme.palette]||e.default}}]),o}(),ur=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var t=this.w,i=e==="title"?t.config.title:t.config.subtitle,a=t.globals.svgWidth/2,s=i.offsetY,r="middle";if(i.align==="left"?(a=10,r="start"):i.align==="right"&&(a=t.globals.svgWidth-10,r="end"),a+=i.offsetX,s=s+parseInt(i.style.fontSize,10)+i.margin/2,i.text!==void 0){var n=new X(this.ctx).drawText({x:a,y:s,text:i.text,textAnchor:r,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});n.node.setAttribute("class","apexcharts-".concat(e,"-text")),t.globals.dom.Paper.add(n)}}}]),o}(),gr=function(){function o(e){H(this,o),this.w=e.w,this.dCtx=e}return O(o,[{key:"getTitleSubtitleCoords",value:function(e){var t=this.w,i=0,a=0,s=e==="title"?t.config.title.floating:t.config.subtitle.floating,r=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(r!==null&&!s){var n=r.getBoundingClientRect();i=n.width,a=t.globals.axisCharts?n.height+5:n.height}return{width:i,height:a}}},{key:"getLegendsRect",value:function(){var e=this.w,t=e.globals.dom.elLegendWrap;e.config.legend.height||e.config.legend.position!=="top"&&e.config.legend.position!=="bottom"||(t.style.maxHeight=e.globals.svgHeight/2+"px");var i=Object.assign({},L.getBoundingClientRect(t));return t!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:i.height===0?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},e.config.legend.position!=="left"&&e.config.legend.position!=="right"||1.5*this.dCtx.lgRect.width>e.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<n&&!a.rotateXLabels&&(a.skipLastTimelinelabel=!0):r!=="datetime"&&t.dCtx.gridPad.right<n/2-t.dCtx.yAxisWidthRight&&!a.rotateXLabels&&!i.config.xaxis.labels.trim&&(t.dCtx.xPadRight=n/2+1)}(d)};s.yaxis.forEach(function(d,c){l?(t.dCtx.gridPad.left<n&&(t.dCtx.xPadLeft=n/2+1),t.dCtx.xPadRight=n/2+1):h(d,c)})}}]),o}(),fr=function(){function o(e){H(this,o),this.w=e.w,this.dCtx=e}return O(o,[{key:"getyAxisLabelsCoords",value:function(){var e=this,t=this.w,i=[],a=10,s=new Ne(this.dCtx.ctx);return t.config.yaxis.map(function(r,n){var l={seriesIndex:n,dataPointIndex:-1,w:t},h=t.globals.yAxisScale[n],d=0;if(!s.isYAxisHidden(n)&&r.labels.show&&r.labels.minWidth!==void 0&&(d=r.labels.minWidth),!s.isYAxisHidden(n)&&r.labels.show&&h.result.length){var c=t.globals.yLabelFormatters[n],u=h.niceMin===Number.MIN_VALUE?0:h.niceMin,g=h.result.reduce(function(k,y){var C,w;return((C=String(c(k,l)))===null||C===void 0?void 0:C.length)>((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.xAxisHeight<a.config.xaxis.labels.minHeight&&(this.xAxisHeight=a.config.xaxis.labels.minHeight),a.config.xaxis.floating&&(this.xAxisHeight=0);var d=0,c=0;a.config.yaxis.forEach(function(u){d+=u.labels.minWidth,c+=u.labels.maxWidth}),this.yAxisWidth<d&&(this.yAxisWidth=d),this.yAxisWidth>c&&(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;n<r.length;n++)r[n].classList.contains("apexcharts-series-markers-wrap")&&(r[n].classList.contains("apexcharts-hide")?r[n].classList.remove("apexcharts-hide"):r[n].classList.add("apexcharts-hide"));this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,t,i){var a=this.w,s=L.clone(a.config.series);if(e.length>0){for(var r=0;r<e.length;r++)e[r].index===i&&(a.globals.axisCharts?s[i].data=e[r].data.slice():s[i]=e[r].data,typeof s[i]!="number"&&(s[i].hidden=!1),e.splice(r,1),t.splice(r,1),a.globals.risingSeries.push(i));s=this._getSeriesBasedOnCollapsedState(s),this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var t=this.w,i=0;return t.globals.axisCharts?e.forEach(function(a,s){t.globals.collapsedSeriesIndices.indexOf(s)<0&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(s)<0||(e[s].data=[],i++)}):e.forEach(function(a,s){!t.globals.collapsedSeriesIndices.indexOf(s)<0&&(e[s]=0,i++)}),t.globals.allSeriesCollapsed=i===e.length,e}}]),o}(),ss=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new br(this)}return O(o,[{key:"init",value:function(){var e=this.w,t=e.globals,i=e.config,a=i.legend.showForSingleSeries&&t.series.length===1||this.isBarsDistributed||t.series.length>1;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;m<i.globals.collapsedSeries.length;m++)i.globals.collapsedSeries[m].index===g&&(x=!0);if(i.globals.ancillaryCollapsedSeriesIndices.length>0)for(var v=0;v<i.globals.ancillaryCollapsedSeriesIndices.length;v++)i.globals.ancillaryCollapsedSeriesIndices[v]===g&&(b=!0);var k=e.createLegendMarker({i:g,fillcolor:r});X.setAttrs(k,{rel:g+1,"data:collapsed":x||b}),(x||b)&&k.classList.add("apexcharts-inactive-legend");var y=document.createElement("div"),C=document.createElement("span");C.classList.add("apexcharts-legend-text"),C.innerHTML=Array.isArray(p)?p.join(" "):p;var w=i.config.legend.labels.useSeriesColors?i.globals.colors[g]:Array.isArray(i.config.legend.labels.colors)?(f=i.config.legend.labels.colors)===null||f===void 0?void 0:f[g]:i.config.legend.labels.colors;w||(w=i.config.chart.foreColor),C.style.color=w,C.style.fontSize=parseFloat(i.config.legend.fontSize)+"px",C.style.fontWeight=i.config.legend.fontWeight,C.style.fontFamily=a||i.config.chart.fontFamily,X.setAttrs(C,{rel:g+1,i:g,"data:default-text":encodeURIComponent(p),"data:collapsed":x||b}),y.appendChild(k),y.appendChild(C);var A=new he(e.ctx);i.config.legend.showForZeroSeries||A.getSeriesTotalByIndex(g)===0&&A.seriesHaveSameValues(g)&&!A.isSeriesNull(g)&&i.globals.collapsedSeriesIndices.indexOf(g)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(g)===-1&&y.classList.add("apexcharts-hidden-zero-series"),i.config.legend.showForNullSeries||A.isSeriesNull(g)&&i.globals.collapsedSeriesIndices.indexOf(g)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(g)===-1&&y.classList.add("apexcharts-hidden-null-series"),d.length?i.globals.seriesGroups.forEach(function(S,M){var P;S.includes((P=i.config.series[g])===null||P===void 0?void 0:P.name)&&(i.globals.dom.elLegendWrap.appendChild(d[M]),d[M].appendChild(y))}):i.globals.dom.elLegendWrap.appendChild(y),i.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(i.config.legend.horizontalAlign)),i.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+i.config.legend.position),y.classList.add("apexcharts-legend-series"),y.style.margin="".concat(i.config.legend.itemMargin.vertical,"px ").concat(i.config.legend.itemMargin.horizontal,"px"),i.globals.dom.elLegendWrap.style.width=i.config.legend.width?i.config.legend.width+"px":"",i.globals.dom.elLegendWrap.style.height=i.config.legend.height?i.config.legend.height+"px":"",X.setAttrs(y,{rel:g+1,seriesName:L.escapeString(s[g]),"data:collapsed":x||b}),(x||b)&&y.classList.add("apexcharts-inactive-legend"),i.config.legend.onItemClick.toggleDataSeries||y.classList.add("apexcharts-no-click")},u=h?s.length-1:0;h?u>=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<this.t.customIcons.length;s++)this.elCustomIcons.push(i());var r=[],n=function(c,u,g){var f=c.toLowerCase();e.t[f]&&t.config.chart.zoom.enabled&&r.push({el:u,icon:typeof e.t[f]=="string"?e.t[f]:g,title:e.localeValues[c],class:"apexcharts-".concat(f,"-icon")})};n("zoomIn",this.elZoomIn,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`),n("zoomOut",this.elZoomOut,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`);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"?`<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>
</svg>`:`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>
</svg>`,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:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
<defs>
<path d="M0 0h24v24H0z" id="a"/>
</defs>
<clipPath id="b">
<use overflow="visible" xlink:href="#a"/>
</clipPath>
<path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>
</svg>`,title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>`),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var h=0;h<this.elCustomIcons.length;h++)r.push({el:this.elCustomIcons[h],icon:this.t.customIcons[h].icon,title:this.t.customIcons[h].title,index:this.t.customIcons[h].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[h].class});r.forEach(function(c,u){c.index&&L.moveIndexInArray(r,u,c.index)});for(var d=0;d<r.length;d++)X.setAttrs(r[d].el,{class:r[d].class,title:r[d].title}),r[d].el.innerHTML=r[d].icon,a.appendChild(r[d].el);this._createHamburgerMenu(a),t.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):t.globals.panEnabled?this.elPan.classList.add(this.selectedClass):t.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),X.setAttrs(this.elMenu,{class:"apexcharts-menu"});for(var t=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}],i=0;i<t.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=t[i].title,X.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(t[i].name),title:t[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var e=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(function(i){i.classList.contains("exportSVG")?i.addEventListener("click",e.handleDownload.bind(e,"svg")):i.classList.contains("exportPNG")?i.addEventListener("click",e.handleDownload.bind(e,"png")):i.classList.contains("exportCSV")&&i.addEventListener("click",e.handleDownload.bind(e,"csv"))});for(var t=0;t<this.t.customIcons.length;t++)this.elCustomIcons[t].addEventListener("click",this.t.customIcons[t].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach(function(t){t.ctx.toolbar.toggleOtherControls();var i=e==="selection"?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,a=e==="selection"?"selectionEnabled":"zoomEnabled";t.w.globals[a]=!t.w.globals[a],i.classList.contains(t.ctx.toolbar.selectedClass)?i.classList.remove(t.ctx.toolbar.selectedClass):i.classList.add(t.ctx.toolbar.selectedClass)})}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),e==="pan"?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var t=e==="pan"?this.elPan:this.elZoom,i=e==="pan"?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach(function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)})}},{key:"toggleOtherControls",value:function(){var e=this,t=this.w;t.globals.panEnabled=!1,t.globals.zoomEnabled=!1,t.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(function(i){i&&i.classList.remove(e.selectedClass)})}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var t=(this.minX+this.maxX)/2,i=(this.minX+t)/2,a=(this.maxX+t)/2,s=this._getNewMinXMaxX(i,a);e.globals.disableZoomIn||this.zoomUpdateOptions(s.minX,s.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!(e.config.xaxis.type==="datetime"&&new Date(this.minX).getUTCFullYear()<1e3)){var t=(this.minX+this.maxX)/2,i=this.minX-(t-this.minX),a=this.maxX-(t-this.maxX),s=this._getNewMinXMaxX(i,a);e.globals.disableZoomOut||this.zoomUpdateOptions(s.minX,s.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,t){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(e):e,maxX:i?Math.floor(t):t}}},{key:"zoomUpdateOptions",value:function(e,t){var i=this.w;if(e!==void 0||t!==void 0){if(!(i.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=i.globals.dataPoints),t-e<2))){var a={min:e,max:t},s=this.getBeforeZoomRange(a);s&&(a=s.xaxis);var r={xaxis:a},n=L.clone(i.globals.initialConfig.yaxis);i.config.chart.group||(r.yaxis=n),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(r,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(a,n)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,t){typeof this.ev.zoomed=="function"&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t})}},{key:"getBeforeZoomRange",value:function(e,t){var i=null;return typeof this.ev.beforeZoom=="function"&&(i=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),i}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout(function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")},0)}},{key:"handleDownload",value:function(e){var t=this.w,i=new Nt(this.ctx);switch(e){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach(function(t){var i=t.w;if(i.globals.lastXAxis.min=i.globals.initialConfig.xaxis.min,i.globals.lastXAxis.max=i.globals.initialConfig.xaxis.max,t.updateHelpers.revertDefaultAxisMinMax(),typeof i.config.chart.events.beforeResetZoom=="function"){var a=i.config.chart.events.beforeResetZoom(t,i);a&&t.updateHelpers.revertDefaultAxisMinMax(a)}typeof i.config.chart.events.zoomed=="function"&&t.ctx.toolbar.zoomCallback({min:i.config.xaxis.min,max:i.config.xaxis.max}),i.globals.zoomed=!1;var s=t.ctx.series.emptyCollapsedSeries(L.clone(i.globals.initialSeries));t.updateHelpers._updateSeries(s,i.config.chart.animations.dynamicAnimation.enabled)})}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),o}(),mr=function(o){Ct(t,rs);var e=At(t);function t(i){var a;return H(this,t),(a=e.call(this,i)).ctx=i,a.w=i.w,a.dragged=!1,a.graphics=new X(a.ctx),a.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],a.clientX=0,a.clientY=0,a.startX=0,a.endX=0,a.dragX=0,a.startY=0,a.endY=0,a.dragY=0,a.moveDirection="none",a.debounceTimer=null,a.debounceDelay=100,a.wheelDelay=400,a}return O(t,[{key:"init",value:function(i){var a=this,s=i.xyRatios,r=this.w,n=this;this.xyRatios=s,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=r.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new le(0,0,r.globals.gridWidth,r.globals.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),r.globals.dom.Paper.add(this.zoomRect),r.globals.dom.Paper.add(this.selectionRect),r.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:r.globals.gridWidth,maxY:r.globals.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):r.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:r.globals.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=r.globals.dom.baseEl.querySelector("".concat(r.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(function(l){a.hoverArea.addEventListener(l,n.svgMouseEvents.bind(n,s),{capture:!1,passive:!0})}),r.config.chart.zoom.enabled&&r.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",n.mouseWheelEvent.bind(n),{capture:!1,passive:!1})}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(i,a){var s=this.w,r=this.ctx.toolbar,n=s.globals.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type,l=s.config.chart.toolbar.autoSelected;if(a.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar(l==="pan"?"zoom":"pan")):this.shiftWasPressed&&(r.enableZoomPanFromToolbar(l),this.shiftWasPressed=!1),a.target){var h,d=a.target.classList;if(a.target.parentNode&&a.target.parentNode!==null&&(h=a.target.parentNode.classList),!(d.contains("apexcharts-legend-marker")||d.contains("apexcharts-legend-text")||h&&h.contains("apexcharts-toolbar"))){if(this.clientX=a.type==="touchmove"||a.type==="touchstart"?a.touches[0].clientX:a.type==="touchend"?a.changedTouches[0].clientX:a.clientX,this.clientY=a.type==="touchmove"||a.type==="touchstart"?a.touches[0].clientY:a.type==="touchend"?a.changedTouches[0].clientY:a.clientY,a.type==="mousedown"&&a.which===1||a.type==="touchstart"){var c=this.gridRect.getBoundingClientRect();this.startX=this.clientX-c.left-s.globals.barPadForNumericAxis,this.startY=this.clientY-c.top,this.dragged=!1,this.w.globals.mousedown=!0}(a.type==="mousemove"&&a.which===1||a.type==="touchmove")&&(this.dragged=!0,s.globals.panEnabled?(s.globals.selection=null,this.w.globals.mousedown&&this.panDragging({context:this,zoomtype:n,xyRatios:i})):(this.w.globals.mousedown&&s.globals.zoomEnabled||this.w.globals.mousedown&&s.globals.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:n}))),a.type!=="mouseup"&&a.type!=="touchend"&&a.type!=="mouseleave"||this.handleMouseUp({zoomtype:n}),this.makeSelectionRectDraggable()}}}},{key:"handleMouseUp",value:function(i){var a,s=i.zoomtype,r=i.isResized,n=this.w,l=(a=this.gridRect)===null||a===void 0?void 0:a.getBoundingClientRect();l&&(this.w.globals.mousedown||r)&&(this.endX=this.clientX-l.left-n.globals.barPadForNumericAxis,this.endY=this.clientY-l.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(n.globals.zoomEnabled||n.globals.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:s}),n.globals.panEnabled&&n.config.xaxis.convertedCatToNumeric&&this.delayedPanScrolled()),n.globals.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.globals.mousedown=!1}},{key:"mouseWheelEvent",value:function(i){var a=this,s=this.w;i.preventDefault();var r=Date.now();r-s.globals.lastWheelExecution>this.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-l<p){var x=(l+h)/2;l=x-p/2,h=x+p/2}}var b=this._getNewMinXMaxX(l,h);isNaN(b.minX)||isNaN(b.maxX)||this.zoomUpdateOptions(b.minX,b.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var i=this,a=this.w;if(this.selectionRect){var s=this.selectionRect.node.getBoundingClientRect();s.width>0&&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;d<this.constraints.x&&(d=this.constraints.x),c<this.constraints.y&&(c=this.constraints.y),h.x2>this.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||(i<s.globals.initialMinX||a>s.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;s<a.length;s++)if(a[s]!==-1&&t.globals.collapsedSeriesIndices.indexOf(s)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(s)===-1){i=a[s];break}return i}},{key:"closestInMultiArray",value:function(e,t,i,a){for(var s,r=this.w,n=1/0,l=null,h=null,d=0;d<i.length;d++)if(s=d,r.globals.collapsedSeriesIndices.indexOf(s)===-1&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(s)===-1)for(var c=i[d],u=a[d],g=Math.min(c.length,u.length),f=0;f<g;f++){var p=e-c[f],x=t-u[f],b=Math.sqrt(p*p+x*x);b<n&&(n=b,l=d,h=f)}return{index:l,j:h}}},{key:"closestInArray",value:function(e,t){for(var i=t[0],a=null,s=Math.abs(e-i),r=0;r<t.length;r++){var n=Math.abs(e-t[r]);n<s&&(s=n,a=r)}return{j:a}}},{key:"isXoverlap",value:function(e){var t=[],i=this.w.globals.seriesX.filter(function(s){return s[0]!==void 0});if(i.length>0)for(var a=0;a<i.length-1;a++)i[a][e]!==void 0&&i[a+1][e]!==void 0&&i[a][e]!==i[a+1][e]&&t.push("unEqual");return t.length===0}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,t=this.w.globals.initialSeries,i=0;i<t.length-1;i++)if(t[i].data.length!==t[i+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return ce(e).reduce(function(t,i){return t+i.getBBox().height},0)}},{key:"getElMarkers",value:function(e){return typeof e=="number"?this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers-wrap > *")):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 l<n?1:l>n?-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<a.length;s++)e==="enable"?(a[s].classList.add("apexcharts-active"),a[s].style.display=t.config.tooltip.items.display):(a[s].classList.remove("apexcharts-active"),a[s].style.display="none")}}]),o}(),vr=function(){function o(e){H(this,o),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new ns(e)}return O(o,[{key:"drawSeriesTexts",value:function(e){var t=e.shared,i=t===void 0||t,a=e.ttItems,s=e.i,r=s===void 0?0:s,n=e.j,l=n===void 0?null:n,h=e.y1,d=e.y2,c=e.e,u=this.w;u.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:r,j:l,y1:h,y2:d,w:u}):this.toggleActiveInactiveSeries(i,r);var g=this.getValuesToPrint({i:r,j:l});this.printLabels({i:r,j:l,values:g,ttItems:a,shared:i,e:c});var f=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=f.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=f.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var t,i=this,a=e.i,s=e.j,r=e.values,n=e.ttItems,l=e.shared,h=e.e,d=this.w,c=[],u=function(y){return d.globals.seriesGoals[y]&&d.globals.seriesGoals[y][s]&&Array.isArray(d.globals.seriesGoals[y][s])},g=r.xVal,f=r.zVal,p=r.xAxisTTVal,x="",b=d.globals.colors[a];s!==null&&d.config.plotOptions.bar.distributed&&(b=d.globals.colors[s]);for(var m=function(y,C){var w=i.getFormatters(a);x=i.getSeriesName({fn:w.yLbTitleFormatter,index:a,seriesIndex:a,j:s}),d.config.chart.type==="treemap"&&(x=w.yLbTitleFormatter(String(d.config.series[a].data[s].x),{series:d.globals.series,seriesIndex:a,dataPointIndex:s,w:d}));var A=d.config.tooltip.inverseOrder?C:y;if(d.globals.axisCharts){var S=function(I){var T,z,E,Y;return d.globals.isRangeData?w.yLbFormatter((T=d.globals.seriesRangeStart)===null||T===void 0||(z=T[I])===null||z===void 0?void 0:z[s],{series:d.globals.seriesRangeStart,seriesIndex:I,dataPointIndex:s,w:d})+" - "+w.yLbFormatter((E=d.globals.seriesRangeEnd)===null||E===void 0||(Y=E[I])===null||Y===void 0?void 0:Y[s],{series:d.globals.seriesRangeEnd,seriesIndex:I,dataPointIndex:s,w:d}):w.yLbFormatter(d.globals.series[I][s],{series:d.globals.series,seriesIndex:I,dataPointIndex:s,w:d})};if(l)w=i.getFormatters(A),x=i.getSeriesName({fn:w.yLbTitleFormatter,index:A,seriesIndex:a,j:s}),b=d.globals.colors[A],t=S(A),u(A)&&(c=d.globals.seriesGoals[A][s].map(function(I){return{attrs:I,val:w.yLbFormatter(I.value,{seriesIndex:A,dataPointIndex:s,w:d})}}));else{var M,P=h==null||(M=h.target)===null||M===void 0?void 0:M.getAttribute("fill");P&&(P.indexOf("url")!==-1?P.indexOf("Pattern")!==-1&&(b=d.globals.dom.baseEl.querySelector(P.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):b=P),t=S(a),u(a)&&Array.isArray(d.globals.seriesGoals[a][s])&&(c=d.globals.seriesGoals[a][s].map(function(I){return{attrs:I,val:w.yLbFormatter(I.value,{seriesIndex:a,dataPointIndex:s,w:d})}}))}}s===null&&(t=w.yLbFormatter(d.globals.series[a],R(R({},d),{},{seriesIndex:a,dataPointIndex:a}))),i.DOMHandling({i:a,t:A,j:s,ttItems:n,values:{val:t,goalVals:c,xVal:g,xAxisTTVal:p,zVal:f},seriesName:x,shared:l,pColor:b})},v=0,k=d.globals.series.length-1;v<d.globals.series.length;v++,k--)m(v,k)}},{key:"getFormatters",value:function(e){var t,i=this.w,a=i.globals.yLabelFormatters[e];return i.globals.ttVal!==void 0?Array.isArray(i.globals.ttVal)?(a=i.globals.ttVal[e]&&i.globals.ttVal[e].formatter,t=i.globals.ttVal[e]&&i.globals.ttVal[e].title&&i.globals.ttVal[e].title.formatter):(a=i.globals.ttVal.formatter,typeof i.globals.ttVal.title.formatter=="function"&&(t=i.globals.ttVal.title.formatter)):t=i.config.tooltip.y.title.formatter,typeof a!="function"&&(a=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(s){return s}),typeof t!="function"&&(t=function(s){return s?s+": ":""}),{yLbFormatter:a,yLbTitleFormatter:t}}},{key:"getSeriesName",value:function(e){var t=e.fn,i=e.index,a=e.seriesIndex,s=e.j,r=this.w;return t(String(r.globals.seriesNames[i]),{series:r.globals.series,seriesIndex:a,dataPointIndex:s,w:r})}},{key:"DOMHandling",value:function(e){e.i;var t=e.t,i=e.j,a=e.ttItems,s=e.values,r=e.seriesName,n=e.shared,l=e.pColor,h=this.w,d=this.ttCtx,c=s.val,u=s.goalVals,g=s.xVal,f=s.xAxisTTVal,p=s.zVal,x=null;x=a[t].children,h.config.tooltip.fillSeriesColor&&(a[t].style.backgroundColor=l,x[0].style.display="none"),d.showTooltipTitle&&(d.tooltipTitle===null&&(d.tooltipTitle=h.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),d.tooltipTitle.innerHTML=g),d.isXAxisTooltipEnabled&&(d.xaxisTooltipText.innerHTML=f!==""?f:g);var b=a[t].querySelector(".apexcharts-tooltip-text-y-label");b&&(b.innerHTML=r||"");var m=a[t].querySelector(".apexcharts-tooltip-text-y-value");m&&(m.innerHTML=c!==void 0?c:""),x[0]&&x[0].classList.contains("apexcharts-tooltip-marker")&&(h.config.tooltip.marker.fillColors&&Array.isArray(h.config.tooltip.marker.fillColors)&&(l=h.config.tooltip.marker.fillColors[t]),x[0].style.backgroundColor=l),h.config.tooltip.marker.show||(x[0].style.display="none");var v=a[t].querySelector(".apexcharts-tooltip-text-goals-label"),k=a[t].querySelector(".apexcharts-tooltip-text-goals-value");if(u.length&&h.globals.seriesGoals[t]){var y=function(){var A="<div >",S="<div>";u.forEach(function(M,P){A+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(M.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(M.attrs.name,"</div>"),S+="<div>".concat(M.val,"</div>")}),v.innerHTML=A+"</div>",k.innerHTML=S+"</div>"};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;r<s.length;r++)parseInt(s[r].getAttribute("rel"),10)===t&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(t,s[r]));else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}},{key:"moveDynamicPointOnHover",value:function(e,t){var i,a,s,r,n=this.w,l=this.ttCtx,h=new X(this.ctx),d=n.globals.pointsArray,c=l.tooltipUtil.getHoverMarkerSize(t),u=n.config.series[t].type;if(!u||u!=="column"&&u!=="candlestick"&&u!=="boxPlot"){s=(i=d[t][e])===null||i===void 0?void 0:i[0],r=((a=d[t][e])===null||a===void 0?void 0:a[1])||0;var g=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-series-markers path"));if(g&&r<n.globals.gridHeight&&r>0){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;u<a.globals.series.length;u++){var g=n[u];if(a.globals.comboCharts&&g===void 0&&c.splice(u,0,null),g&&g.length){var f=n[u][e][1],p=void 0;c[u].setAttribute("cx",s);var x=c[u].getAttribute("shape");if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){var b=e+a.globals.series[u].length;p=n[u][b][1],f-=Math.abs(f-p)/2}if(f!==null&&!isNaN(f)&&f<a.globals.gridHeight+d&&f+d>0){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;s<a.length;s++){var r=a[s].querySelector(".apexcharts-series-markers-wrap");if(r!==null){var n=void 0,l="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));e.config.chart.type!=="line"&&e.config.chart.type!=="area"||e.globals.comboCharts||e.config.tooltip.intersect||(l+=" no-pointer-events");var h=i.getMarkerConfig({cssClass:l,seriesIndex:Number(r.getAttribute("data:realIndex"))});(n=t.drawMarker(0,0,h)).node.setAttribute("default-marker-size",0);var d=document.createElementNS(e.globals.SVGNS,"g");d.classList.add("apexcharts-series-markers"),d.appendChild(n.node),r.appendChild(d)}}}},{key:"enlargeCurrentPoint",value:function(e,t){var i=arguments.length>2&&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;l<r.length;l++){var h=r[l].getAttribute("rel"),d=r[l].getAttribute("index");if(n===void 0&&(n=t.globals.markers.size[d]+t.config.markers.hover.sizeOffset),s===parseInt(h,10)){i.newPointSize(s,r[l]);var c=r[l].getAttribute("cx"),u=r[l].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(c),a.fixedTooltip||i.tooltipPosition.moveTooltip(c,u,n)}else i.oldPointSize(r[l])}}},{key:"newPointSize",value:function(e,t){var i=this.w,a=i.config.markers.hover.size,s=e===0?t.parentNode.firstChild:t.parentNode.lastChild;if(s.getAttribute("default-marker-size")!=="0"){var r=parseInt(s.getAttribute("index"),10);a===void 0&&(a=i.globals.markers.size[r]+i.config.markers.hover.sizeOffset),a<0&&(a=0);var n=this.ttCtx.tooltipUtil.getPathFromPoint(t,a);t.setAttribute("d",n)}}},{key:"oldPointSize",value:function(e){var t=parseFloat(e.getAttribute("default-marker-size")),i=this.ttCtx.tooltipUtil.getPathFromPoint(e,t);e.setAttribute("d",i)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),t=0;t<e.length;t++){var i=parseFloat(e[t].getAttribute("default-marker-size"));if(L.isNumber(i)&&i>0){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)<n.xyRatios.baseLineInvertedY&&(h=v-n.tooltipRect.ttWidth),d=S()):(h=A(),d=k)}return{x:h,y:d,barHeight:u,barWidth:c,i:l,j:r}}}]),o}(),kr=function(){function o(e){H(this,o),this.w=e.w,this.ttCtx=e}return O(o,[{key:"drawXaxisTooltip",value:function(){var e=this.w,t=this.ttCtx,i=e.config.xaxis.position==="bottom";t.xaxisOffY=i?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var a=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",s=e.globals.dom.elWrap;t.isXAxisTooltipEnabled&&e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(t.xaxisTooltip=document.createElement("div"),t.xaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+e.config.tooltip.theme),s.appendChild(t.xaxisTooltip),t.xaxisTooltipText=document.createElement("div"),t.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,t=this.ttCtx,i=0;i<e.config.yaxis.length;i++){var a=e.config.yaxis[i].opposite||e.config.yaxis[i].crosshairs.opposite;t.yaxisOffX=a?e.globals.gridWidth+1:1;var s="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,a?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),r=e.globals.dom.elWrap;e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))===null&&(t.yaxisTooltip=document.createElement("div"),t.yaxisTooltip.setAttribute("class",s+" apexcharts-theme-"+e.config.tooltip.theme),r.appendChild(t.yaxisTooltip),i===0&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[i]=document.createElement("div"),t.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),t.yaxisTooltip.appendChild(t.yaxisTooltipText[i]))}}},{key:"setXCrosshairWidth",value:function(){var e=this.w,t=this.ttCtx,i=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var a=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(a!==null&&e.config.xaxis.crosshairs.width==="barWidth"){var s=parseFloat(a.getAttribute("barWidth"));t.xcrosshairsWidth=s}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var r=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/r}}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var n=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/n}else if(e.config.xaxis.crosshairs.width==="barWidth"){var l=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(l!==null){var h=parseFloat(l.getAttribute("barWidth"));t.xcrosshairsWidth=h}else t.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),i!==null&&t.xcrosshairsWidth>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;n<e;n++)r(n);return a}},{key:"addSVGEvents",value:function(){var e=this.w,t=e.config.chart.type,i=this.getElTooltip(),a=!(t!=="bar"&&t!=="candlestick"&&t!=="boxPlot"&&t!=="rangeBar"),s=t==="area"||t==="line"||t==="scatter"||t==="bubble"||t==="radar",r=e.globals.dom.Paper.node,n=this.getElGrid();n&&(this.seriesBound=n.getBoundingClientRect());var l,h=[],d=[],c={hoverArea:r,elGrid:n,tooltipEl:i,tooltipY:h,tooltipX:d,ttItems:this.ttItems};if(e.globals.axisCharts&&(s?l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):a?l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):t!=="heatmap"&&t!=="treemap"||(l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),l&&l.length))for(var u=0;u<l.length;u++)h.push(l[u].getAttribute("cy")),d.push(l[u].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||a&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],c);else if(a&&!e.globals.comboCharts||s&&this.showOnIntersect)this.addDatapointEventsListeners(c);else if(!e.globals.axisCharts||t==="heatmap"||t==="treemap"){var g=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(g,c)}if(this.showOnIntersect){var f=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");f.length>0&&this.addPathsEventListeners(f,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{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<e.length;s++)a(s)}},{key:"onSeriesHover",value:function(e,t){var i=this,a=Date.now()-this.lastHoverTime;a>=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,h<n.top||h>n.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;b<r.config.yaxis.length;b++)this.axesTooltip.drawYaxisTooltipText(b,h,this.xyRatios);r.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),s.tooltipEl.classList.add("apexcharts-active")}else a.type!=="mouseout"&&a.type!=="touchend"||this.handleMouseOut(s)}}},{key:"nonAxisChartsTooltips",value:function(e){var t=e.e,i=e.opt,a=e.tooltipRect,s=this.w,r=i.paths.getAttribute("rel"),n=this.getElTooltip(),l=s.globals.dom.elWrap.getBoundingClientRect();if(t.type==="mousemove"||t.type==="touchmove"){s.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),n.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(r,10)-1,shared:!1});var h=s.globals.clientX-l.left-a.ttWidth/2,d=s.globals.clientY-l.top-a.ttHeight-10;if(n.style.left=h+"px",n.style.top=d+"px",s.config.legend.tooltipHoverFormatter){var c=r-1,u=(0,s.config.legend.tooltipHoverFormatter)(this.legendLabels[c].getAttribute("data:default-text"),{seriesIndex:c,dataPointIndex:c,w:s});this.legendLabels[c].innerHTML=u}}else t.type!=="mouseout"&&t.type!=="touchend"||(n.classList.remove("apexcharts-active"),s.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),s.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(g){var f=g.getAttribute("data:default-text");g.innerHTML=decodeURIComponent(f)}))}},{key:"handleStickyTooltip",value:function(e,t,i,a){var s=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:a.hoverArea,elGrid:a.elGrid,clientX:t,clientY:i}),n=r.j,l=r.capturedSeries;s.globals.collapsedSeriesIndices.includes(l)&&(l=null);var h=a.elGrid.getBoundingClientRect();if(r.hoverX<0||r.hoverX>h.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;a<i.length;a++)t.pathMouseLeave(i[a])}},{key:"handleMouseOut",value:function(e){var t=this.w,i=this.getElXCrosshairs();if(t.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),t.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),i!==null&&i.classList.remove("apexcharts-active"),this.ycrosshairs!==null&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var a=0;a<this.yaxisTTEls.length;a++)this.yaxisTTEls[a].classList.remove("apexcharts-active")}t.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(s){var r=s.getAttribute("data:default-text");s.innerHTML=decodeURIComponent(r)})}},{key:"markerClick",value:function(e,t,i){var a=this.w;typeof a.config.chart.events.markerClick=="function"&&a.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:a}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:a}])}},{key:"create",value:function(e,t,i,a,s){var r,n,l,h,d,c,u,g,f,p,x,b,m,v,k,y,C=arguments.length>5&&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;z<T.length;z++){var E=T[z],Y=parseInt(E.getAttribute("i"),10),F=decodeURIComponent(E.getAttribute("data:default-text")),W=I(F,{seriesIndex:C?Y:i,dataPointIndex:a,w});if(C)E.innerHTML=w.globals.collapsedSeriesIndices.indexOf(Y)<0?W:F;else if(E.innerHTML=Y===i?W:F,i===Y)break}}var _=R(R({ttItems:s,i,j:a},((r=w.globals.seriesRange)===null||r===void 0||(n=r[i])===null||n===void 0||(l=n[a])===null||l===void 0||(h=l.y[0])===null||h===void 0?void 0:h.y1)!==void 0&&{y1:(d=w.globals.seriesRange)===null||d===void 0||(c=d[i])===null||c===void 0||(u=c[a])===null||u===void 0||(g=u.y[0])===null||g===void 0?void 0:g.y1}),((f=w.globals.seriesRange)===null||f===void 0||(p=f[i])===null||p===void 0||(x=p[a])===null||x===void 0||(b=x.y[0])===null||b===void 0?void 0:b.y2)!==void 0&&{y2:(m=w.globals.seriesRange)===null||m===void 0||(v=m[i])===null||v===void 0||(k=v[a])===null||k===void 0||(y=k.y[0])===null||y===void 0?void 0:y.y2});if(C){if(A.tooltipLabels.drawSeriesTexts(R(R({},_),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),S)P();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(M),this.barSeriesHeight>0)){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;ee<B.length;ee++)G.pathMouseEnter(B[ee])}}else A.tooltipLabels.drawSeriesTexts(R({shared:!1},_)),this.tooltipUtil.hasBars()&&A.tooltipPosition.moveStickyTooltipOverBars(a,i),S&&A.tooltipPosition.moveMarkers(i,a)}}]),o}(),Ar=function(){function o(e){H(this,o),this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}return O(o,[{key:"handleBarDataLabels",value:function(e){var t,i,a=e.x,s=e.y,r=e.y1,n=e.y2,l=e.i,h=e.j,d=e.realIndex,c=e.columnGroupIndex,u=e.series,g=e.barHeight,f=e.barWidth,p=e.barXPosition,x=e.barYPosition,b=e.visibleSeries,m=e.renderedPath,v=this.w,k=new X(this.barCtx.ctx),y=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[d]:this.barCtx.strokeWidth;v.globals.isXNumeric&&!v.globals.isBarHorizontal?(t=a+parseFloat(f*(b+1)),i=s+parseFloat(g*(b+1))-y):(t=a+parseFloat(f*b),i=s+parseFloat(g*b));var C,w=null,A=a,S=s,M={},P=v.config.dataLabels,I=this.barCtx.barOptions.dataLabels,T=this.barCtx.barOptions.dataLabels.total;x!==void 0&&this.barCtx.isRangeBar&&(i=x,S=x),p!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(t=p,A=p);var z=P.offsetX,E=P.offsetY,Y={width:0,height:0};if(v.config.dataLabels.enabled){var F=v.globals.series[l][h];Y=k.getTextRects(v.config.dataLabels.formatter?v.config.dataLabels.formatter(F,R(R({},v),{},{seriesIndex:l,dataPointIndex:h,w:v})):v.globals.yLabelFormatters[0](F),parseFloat(P.style.fontSize))}var W={x:a,y:s,i:l,j:h,realIndex:d,columnGroupIndex:c,renderedPath:m,bcx:t,bcy:i,barHeight:g,barWidth:f,textRects:Y,strokeWidth:y,dataLabelsX:A,dataLabelsY:S,dataLabelsConfig:P,barDataLabelsConfig:I,barTotalDataLabelsConfig:T,offX:z,offY:E};return M=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(W):this.calculateColumnsDataLabelsPosition(W),m.attr({cy:M.bcy,cx:M.bcx,j:h,val:v.globals.series[l][h],barHeight:g,barWidth:f}),C=this.drawCalculatedDataLabels({x:M.dataLabelsX,y:M.dataLabelsY,val:this.barCtx.isRangeBar?[r,n]:v.config.chart.stackType==="100%"?u[d][h]:v.globals.series[d][h],i:d,j:h,barWidth:f,barHeight:g,textRects:Y,dataLabelsConfig:P}),v.config.chart.stacked&&T.enabled&&(w=this.drawTotalDataLabels({x:M.totalDataLabelsX,y:M.totalDataLabelsY,barWidth:f,barHeight:g,realIndex:d,textAnchor:M.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:d,j:h}),dataLabelsConfig:P,barTotalDataLabelsConfig:T})),{dataLabels:C,totalDataLabels:w}}},{key:"getStackedTotalDataLabel",value:function(e){var t=e.realIndex,i=e.j,a=this.w,s=this.barCtx.stackedSeriesTotals[i];return this.totalFormatter&&(s=this.totalFormatter(s,R(R({},a),{},{seriesIndex:t,dataPointIndex:i,w:a}))),s}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var t=this.w,i=e.i,a=e.j,s=e.realIndex;e.columnGroupIndex;var r,n,l=e.y,h=e.bcx,d=e.barWidth,c=e.barHeight,u=e.textRects,g=e.dataLabelsX,f=e.dataLabelsY,p=e.dataLabelsConfig,x=e.barDataLabelsConfig,b=e.barTotalDataLabelsConfig,m=e.strokeWidth,v=e.offX,k=e.offY,y=h;c=Math.abs(c);var C=t.config.plotOptions.bar.dataLabels.orientation==="vertical",w=this.barCtx.barHelpers.getZeroValueEncounters({i,j:a}).zeroEncounters;h-=m/2;var A=t.globals.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?g+=d/2:(g=t.globals.isXNumeric?h-d/2+v:h-A+d/2+v,w>0&&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&&h<f.getTextRects(m,parseFloat(d.style.fontSize)).width&&(m=""),c.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?n.width/1.6>Math.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;i<e.length;i++)if(e[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;a<e[i].length;a++)t.globals.seriesX[i][a]>t.globals.minX&&t.globals.seriesX[i][a]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(t.globals.series),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],t.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(){var e,t,i,a,s,r,n,l,h=this.w,d=h.globals.dataPoints;this.barCtx.isRangeBar&&(d=h.globals.labels.length);var c=this.barCtx.seriesLen;if(h.config.plotOptions.bar.rangeBarGroupRows&&(c=1),this.barCtx.isHorizontal)s=(i=h.globals.gridHeight/d)/c,h.globals.isXNumeric&&(s=(i=h.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),s=s*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(s=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+h.globals.padHorizontal+(this.barCtx.isReversed?h.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(l=h.globals.gridWidth/2),t=(i-s*this.barCtx.seriesLen)/2;else{if(a=h.globals.gridWidth/this.barCtx.visibleItems,h.config.xaxis.convertedCatToNumeric&&(a=h.globals.gridWidth/h.globals.dataPoints),r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,h.globals.isXNumeric){var u=this.barCtx.xRatio;h.globals.minXDiff&&h.globals.minXDiff!==.5&&h.globals.minXDiff/u>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;l<r;l++){for(var h=[],d=[],c=0,u=0;u<s;u++){var g=e[u][l];g>0?(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;a<t.length;a++){for(var s=0,r=0;r<t[i.globals.maxValsInArrayIndex].length;r++)s+=t[a][r];s===0&&this.barCtx.zeroSerieses.push(a)}}},{key:"getXForValue",value:function(e,t){var i=!(arguments.length>2&&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<i&&h===0&&n++}),{nonZeroColumns:r,zeroEncounters:n}}},{key:"getGroupIndex",value:function(e){var t=this.w,i=t.globals.seriesGroups.findIndex(function(r){return r.indexOf(t.globals.seriesNames[e])>-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;n<e.length;n++,l++){var h,d,c,u,g=void 0,f=void 0,p=[],x=[],b=i.globals.comboCharts?t[n]:n,m=this.barHelpers.getGroupIndex(b).columnGroupIndex,v=a.group({class:"apexcharts-series",rel:n+1,seriesName:L.escapeString(i.globals.seriesNames[b]),"data:realIndex":b});this.ctx.series.addCollapsedClassToSeries(v,b),e[n].length>0&&(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;P<e[n].length;P++){var I=this.barHelpers.getStrokeWidth(n,P,b),T=null,z={indexes:{i:n,j:P,realIndex:b,translationsIndex:C,bc:l},x:g,y:f,strokeWidth:I,elSeries:v};this.isHorizontal?(T=this.drawBarPaths(R(R({},z),{},{barHeight:k,zeroW:u,yDivision:d})),y=this.series[n][P]/this.invertedYRatio):(T=this.drawColumnPaths(R(R({},z),{},{xDivision:h,barWidth:y,zeroH:c})),k=this.series[n][P]/this.yRatio[C]);var E=this.barHelpers.getPathFillColor(e,n,P,b);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&P>0){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++,m<u&&b[g]===0&&p++}),f>0&&(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;s<a.globals.previousPaths.length;s++){var r=a.globals.previousPaths[s];r.paths&&r.paths.length>0&&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;F<r.globals.dataPoints;F++){var W=s.barHelpers.getStrokeWidth(f,F,k),_={indexes:{i:f,j:F,realIndex:k,translationsIndex:M,bc:p},strokeWidth:W,x:h,y:d,elSeries:P,columnGroupIndex:w,seriesGroup:r.globals.seriesGroups[C]},G=null;s.isHorizontal?(G=s.drawStackedBarPaths(R(R({},_),{},{zeroW:v,barHeight:z,yDivision:b})),E=s.series[f][F]/s.invertedYRatio):(G=s.drawStackedColumnPaths(R(R({},_),{},{xDivision:x,barWidth:E,zeroH:m})),z=s.series[f][F]/s.yRatio[M]);var B=s.barHelpers.drawGoalLine({barXPosition:G.barXPosition,barYPosition:G.barYPosition,goalX:G.goalX,goalY:G.goalY,barHeight:z,barWidth:E});B&&T.add(B),d=G.y,h=G.x,A.push(h),S.push(d);var ee=s.barHelpers.getPathFillColor(i,f,F,k),oe="",K=r.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(s.barHelpers.arrBorderRadius[k][F]==="bottom"&&r.globals.series[k][F]>0||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;u<i.length;u++,g++)c(u,g);return l}},{key:"initialPositions",value:function(i,a,s,r,n,l,h){var d,c,u=this.w;if(this.isHorizontal){r=u.globals.gridHeight/u.globals.dataPoints;var g=u.config.plotOptions.bar.barHeight;d=String(g).indexOf("%")===-1?parseInt(g,10):r*parseInt(g,10)/100,l=u.globals.padHorizontal+(this.isReversed?u.globals.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),a=(r-d)/2}else{c=s=u.globals.gridWidth/u.globals.dataPoints;var f=u.config.plotOptions.bar.columnWidth;u.globals.isXNumeric&&u.globals.dataPoints>1?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;C<this.groupCtx.prevXF.length;C++)y+=this.groupCtx.prevXF[C][m];var w;if((w=u.indexOf(p.config.series[v].name))>0){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;w<this.groupCtx.prevYF.length;w++)C+=isNaN(this.groupCtx.prevYF[w][p])?0:this.groupCtx.prevYF[w][p];var A=f;if(c&&(A=c.indexOf(g.globals.seriesNames[b])),A>0&&!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<I;T++){var z;if(!isNaN((z=this.groupCtx.prevY[A-T])===null||z===void 0?void 0:z[p])){P=this.groupCtx.prevY[A-T][p];break}}for(var E=1;E<I;E++){var Y,F;if(((Y=this.groupCtx.prevYVal[A-E])===null||Y===void 0?void 0:Y[p])<0){M=this.series[f][p]>=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;W<n.globals.dataPoints;W++)F(W);n.globals.seriesXvalues[A]=w,n.globals.seriesYvalues[A]=C,u.add(M)},f=0;f<i.length;f++)g(f);return u}},{key:"drawVerticalBoxPaths",value:function(i){var a=i.indexes,s=i.x;i.y;var r=i.xDivision,n=i.barWidth,l=i.zeroH,h=i.strokeWidth,d=this.w,c=new X(this.ctx),u=a.i,g=a.j,f=d.config.plotOptions.candlestick.colors,p=this.boxOptions.colors,x=a.realIndex,b=function(E){return Array.isArray(E)?E[x]:E},m=b(f.upward),v=b(f.downward),k=this.yRatio[a.translationsIndex],y=this.getOHLCValue(x,g),C=l,w=l,A=y.o<y.c?[m]:[v];this.isBoxPlot&&(A=[b(p.lower),b(p.upper)]);var S=Math.min(y.o,y.c),M=Math.max(y.o,y.c),P=y.m;d.globals.isXNumeric&&(s=(d.globals.seriesX[x][g]-d.globals.minX)/this.xRatio-n/2);var I=s+n*this.visibleI;this.series[u][g]===void 0||this.series[u][g]===null?(S=l,M=l):(S=l-S/k,M=l-M/k,C=l-y.h/k,w=l-y.l/k,P=l-y.m/k);var T=c.move(I,l),z=c.move(I+n/2,S);return d.globals.previousPaths.length>0&&(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.min<a.globals.minY?r.colorScale.min:a.globals.minY,c=r.colorScale.max>a.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<h.length: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<t.globals.dataPoints;x++)if(t.globals.seriesX.length&&!t.globals.allSeriesHasEqualX&&t.globals.minX+t.globals.minXDiff*x<t.globals.seriesX[d][p])g+=s;else{if(p>=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<e.length;n++)r+=L.negToZero(e[n]);var l=[],h=a.group();r===0&&(r=1e-5),e.forEach(function(v){t.maxY=Math.max(t.maxY,v)}),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),i.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(s);for(var d=0;d<e.length;d++){var c=this.fullAngle*L.negToZero(e[d])/r;l.push(c),this.chartType==="polarArea"?(l[d]=this.fullAngle/e.length,this.sliceSizes.push(i.globals.radialSize*e[d]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var u,g=0,f=0;f<i.globals.previousPaths.length;f++)g+=L.negToZero(i.globals.previousPaths[f]);for(var p=0;p<i.globals.previousPaths.length;p++)u=this.fullAngle*L.negToZero(i.globals.previousPaths[p])/g,this.prevSectorAngleArr.push(u)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){var x=a.drawCircle(this.donutSize);x.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),h.add(x)}var b=this.drawArcs(l,e);if(this.sliceLabels.forEach(function(v){b.add(v)}),h.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),h.add(b),s.add(h),this.donutDataLabels.show){var m=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});s.add(m)}return i.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(s),s}},{key:"drawArcs",value:function(e,t){var i=this.w,a=new ue(this.ctx),s=new X(this.ctx),r=new Te(this.ctx),n=s.group({class:"apexcharts-slices"}),l=this.initialAngle,h=this.initialAngle,d=this.initialAngle,c=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var u=0;u<e.length;u++){var g=s.group({class:"apexcharts-series apexcharts-pie-series",seriesName:L.escapeString(i.globals.seriesNames[u]),rel:u+1,"data:realIndex":u});n.add(g),h=c,d=(l=d)+e[u],c=h+this.prevSectorAngleArr[u];var f=d<l?this.fullAngle+d-l:d-l,p=r.fillPath({seriesNumber:u,size:this.sliceSizes[u],value:t[u]}),x=this.getChangedPath(h,c),b=s.drawPath({d:x,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[u]:this.lineColorArr,strokeWidth:0,fill:p,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(u)});if(b.attr({index:0,j:u}),a.setSelectionFilter(b,0,u),i.config.chart.dropShadow.enabled){var m=i.config.chart.dropShadow;a.dropShadow(b,m,u)}this.addListeners(b,this.donutDataLabels),X.setAttrs(b.node,{"data:angle":f,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":t[u]});var v={x:0,y:0};this.chartType==="pie"||this.chartType==="polarArea"?v=L.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(l+f/2)%this.fullAngle):this.chartType==="donut"&&(v=L.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(l+f/2)%this.fullAngle)),g.add(b);var k=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):((k=f/this.fullAngle*i.config.chart.animations.speed)===0&&(k=1),this.animDur=k+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(b,{size:this.sliceSizes[u],endAngle:d,startAngle:l,prevStartAngle:h,prevEndAngle:c,animateStartingPos:!0,i:u,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(b,{size:this.sliceSizes[u],endAngle:d,startAngle:l,i:u,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:k}),i.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&b.node.addEventListener("mouseup",this.pieClicked.bind(this,u)),i.globals.selectedDataPoints[0]!==void 0&&i.globals.selectedDataPoints[0].indexOf(u)>-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.minAngleToShowLabel<e[u]){var A=i.config.dataLabels.formatter;A!==void 0&&(w=A(i.globals.seriesPercent[u][0],{seriesIndex:u,w:i}));var S=i.globals.dataLabels.style.colors[u],M=s.group({class:"apexcharts-datalabels"}),P=s.drawText({x:y,y:C,text:w,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:S});if(M.add(P),i.config.dataLabels.dropShadow.enabled){var I=i.config.dataLabels.dropShadow;a.dropShadow(P,I)}P.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&i.globals.resized===!1&&(P.node.classList.add("apexcharts-pie-label-delay"),P.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(M)}}}return n}},{key:"addListeners",value:function(e,t){var i=new X(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}},{key:"animatePaths",value:function(e,t){var i=this.w,a=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,s=a,r=t.startAngle,n=t.startAngle;t.prevStartAngle!==void 0&&t.prevEndAngle!==void 0&&(r=t.prevEndAngle,s=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===i.config.series.length-1&&(a+n>this.fullAngle?t.endAngle=t.endAngle-(a+n):a+n<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(a+n)))),a===this.fullAngle&&(a=this.fullAngle-.01),this.animateArc(e,r,n,a,s,t)}},{key:"animateArc",value:function(e,t,i,a,s,r){var n,l=this,h=this.w,d=new nt(this.ctx),c=r.size;(isNaN(t)||isNaN(s))&&(t=i,s=a,r.dur=0);var u=a,g=i,f=t<i?this.fullAngle+t-i:t-i;h.globals.dataChanged&&r.shouldSetPrevPaths&&r.prevEndAngle&&(n=l.getPiePath({me:l,startAngle:r.prevStartAngle,angle:r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle,size:c}),e.attr({d:n})),r.dur!==0?e.animate(r.dur,r.animBeginArr[r.i]).after(function(){l.chartType!=="pie"&&l.chartType!=="donut"&&l.chartType!=="polarArea"||this.animate(h.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":l.strokeWidth}),r.i===h.config.series.length-1&&d.animationCompleted(e)}).during(function(p){u=f+(a-f)*p,r.animateStartingPos&&(u=s+(a-s)*p,g=t-s+(i-(t-s))*p),n=l.getPiePath({me:l,startAngle:g,angle:u,size:c}),e.node.setAttribute("data:pathOrig",n),e.attr({d:n})}):(n=l.getPiePath({me:l,startAngle:g,angle:a,size:c}),r.isTrack||(h.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",n),e.attr({d:n,"stroke-width":l.strokeWidth}))}},{key:"pieClicked",value:function(e){var t,i=this.w,a=this,s=a.sliceSizes[e]+(i.config.plotOptions.pie.expandOnClick?4:0),r=i.globals.dom.Paper.findOne(".apexcharts-".concat(a.chartType.toLowerCase(),"-slice-").concat(e));if(r.attr("data:pieClicked")!=="true"){var n=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(n,function(c){c.setAttribute("data:pieClicked","false");var u=c.getAttribute("data:pathOrig");u&&c.setAttribute("d",u)}),i.globals.capturedDataPointIndex=e,r.attr("data:pieClicked","true");var l=parseInt(r.attr("data:startAngle"),10),h=parseInt(r.attr("data:angle"),10);t=a.getPiePath({me:a,startAngle:l,angle:h,size:s}),h!==360&&r.plot(t)}else{r.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(r.node,this.donutDataLabels);var d=r.attr("data:pathOrig");r.attr({d})}}},{key:"getChangedPath",value:function(e,t){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),i}},{key:"getPiePath",value:function(e){var t,i=e.me,a=e.startAngle,s=e.angle,r=e.size,n=new X(this.ctx),l=a,h=Math.PI*(l-90)/180,d=s+a;Math.ceil(d)>=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;g<d-1;g++){var f=a.drawCircle(c);if(f.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){var p=s.drawYAxisTexts(this.centerX,this.centerY-c+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,g,h[g]);n.add(p)}r.add(f),c-=u}this.drawSpokes(e),e.add(r),e.add(n)}},{key:"renderInnerDataLabels",value:function(e,t,i){var a=this.w,s=new X(this.ctx),r=t.total.show;e.node.innerHTML="",e.node.style.opacity=i.opacity;var n,l,h=i.centerX,d=this.donutDataLabels.total.label?i.centerY:i.centerY-i.centerY/6;n=t.name.color===void 0?a.globals.colors[0]:t.name.color;var c=t.name.fontSize,u=t.name.fontFamily,g=t.name.fontWeight;l=t.value.color===void 0?a.config.chart.foreColor:t.value.color;var f=t.value.formatter,p="",x="";if(r?(n=t.total.color,c=t.total.fontSize,u=t.total.fontFamily,g=t.total.fontWeight,x=this.donutDataLabels.total.label?t.total.label:"",p=t.total.formatter(a)):a.globals.series.length===1&&(p=f(a.globals.series[0],a),x=a.globals.seriesNames[0]),x&&(x=t.name.formatter(x,t.total.show,a)),t.name.show){var b=s.drawText({x:h,y:d+parseFloat(t.name.offsetY),text:x,textAnchor:"middle",foreColor:n,fontSize:c,fontWeight:g,fontFamily:u});b.node.classList.add("apexcharts-datalabel-label"),e.add(b)}if(t.value.show){var m=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,v=s.drawText({x:h,y:d+m,text:p,textAnchor:"middle",foreColor:l,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});v.node.classList.add("apexcharts-datalabel-value"),e.add(v)}return e}},{key:"printInnerLabels",value:function(e,t,i,a){var s,r=this.w;a?s=e.name.color===void 0?r.globals.colors[parseInt(a.parentNode.getAttribute("rel"),10)-1]:e.name.color:r.globals.series.length>1&&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;l<i.globals.series.length;l++)r.push(L.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+n*l));r.forEach(function(h,d){var c=a.drawLine(h.x,h.y,t.centerX,t.centerY,Array.isArray(s.connectorColors)?s.connectorColors[d]:s.connectorColors);e.add(c)})}}},{key:"revertDataLabelsInner",value:function(){var e=this.w;if(this.donutDataLabels.show){var t=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group"),i=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.globals.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(i)}}}]),o}(),Lr=function(){function o(e){H(this,o),this.ctx=e,this.w=e.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.animDur=0;var t=this.w;this.graphics=new X(this.ctx),this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight<t.globals.svgWidth?t.globals.gridHeight:t.globals.gridWidth,this.isLog=t.config.yaxis[0].logarithmic,this.logBase=t.config.yaxis[0].logBase,this.coreUtils=new he(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,t.globals.maxY,0):t.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):t.globals.minY,this.polygons=t.config.plotOptions.radar.polygons,this.strokeWidth=t.config.stroke.show?t.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-t.config.chart.dropShadow.blur,t.config.xaxis.labels.show&&(this.size=this.size-t.globals.xAxisLabelsWidth/1.75),t.config.plotOptions.radar.size!==void 0&&(this.size=t.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return O(o,[{key:"draw",value:function(e){var t=this,i=this.w,a=new Te(this.ctx),s=[],r=new st(this.ctx);e.length&&(this.dataPointsLen=e[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var n=i.globals.gridWidth/2,l=i.globals.gridHeight/2,h=n+i.config.plotOptions.radar.offsetX,d=l+i.config.plotOptions.radar.offsetY,c=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(h||0,", ").concat(d||0,")")}),u=[],g=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach(function(x,b){var m=x.length===i.globals.dataPoints,v=t.graphics.group().attr({class:"apexcharts-series","data:longestSeries":m,seriesName:L.escapeString(i.globals.seriesNames[b]),rel:b+1,"data:realIndex":b});t.dataRadiusOfPercent[b]=[],t.dataRadius[b]=[],t.angleArr[b]=[],x.forEach(function(T,z){var E=Math.abs(t.maxValue-t.minValue);T-=t.minValue,t.isLog&&(T=t.coreUtils.getLogVal(t.logBase,T,0)),t.dataRadiusOfPercent[b][z]=T/E,t.dataRadius[b][z]=t.dataRadiusOfPercent[b][z]*t.size,t.angleArr[b][z]=z*t.disAngle}),u=t.getDataPointsPos(t.dataRadius[b],t.angleArr[b]);var k=t.createPaths(u,{x:0,y:0});g=t.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=t.graphics.group({class:"apexcharts-datalabels","data:realIndex":b}),i.globals.delayedElements.push({el:g.node,index:b});var y={i:b,realIndex:b,animationDelay:b,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[b],strokeLineCap:i.config.stroke.lineCap},C=null;i.globals.previousPaths.length>0&&(C=t.getPreviousPath(b));for(var w=0;w<k.linePathsTo.length;w++){var A=t.graphics.renderPaths(R(R({},y),{},{pathFrom:C===null?k.linePathsFrom[w]:C,pathTo:k.linePathsTo[w],strokeWidth:Array.isArray(t.strokeWidth)?t.strokeWidth[b]:t.strokeWidth,fill:"none",drawShadow:!1}));v.add(A);var S=a.fillPath({seriesNumber:b}),M=t.graphics.renderPaths(R(R({},y),{},{pathFrom:C===null?k.areaPathsFrom[w]:C,pathTo:k.areaPathsTo[w],strokeWidth:0,fill:S,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var P=new ue(t.ctx),I=i.config.chart.dropShadow;P.dropShadow(M,Object.assign({},I,{noUserSpaceOnUse:!0}),b)}v.add(M)}x.forEach(function(T,z){var E=new ct(t.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:b,dataPointIndex:z}),Y=t.graphics.drawMarker(u[z].x,u[z].y,E);Y.attr("rel",z),Y.attr("j",z),Y.attr("index",b),Y.node.setAttribute("default-marker-size",E.pSize);var F=t.graphics.group({class:"apexcharts-series-markers"});F&&F.add(Y),g.add(F),v.add(g);var W=i.config.dataLabels;if(W.enabled){var _=W.formatter(i.globals.series[b][z],{seriesIndex:b,dataPointIndex:z,w:i});r.plotDataLabelsText({x:u[z].x,y:u[z].y,text:_,textAnchor:"middle",i:b,j:b,parent:f,offsetCorrection:!1,dataLabelsConfig:R({},W)})}v.add(f)}),s.push(v)}),this.drawPolygons({parent:c}),i.config.xaxis.labels.show){var p=this.drawXAxisTexts();c.add(p)}return s.forEach(function(x){c.add(x)}),c.add(this.yaxisLabels),c}},{key:"drawPolygons",value:function(e){for(var t=this,i=this.w,a=e.parent,s=new hs(this.ctx),r=i.globals.yAxisScale[0].result.reverse(),n=r.length,l=[],h=this.size/(n-1),d=0;d<n;d++)l[d]=h*d;l.reverse();var c=[],u=[];l.forEach(function(g,f){var p=L.getPolygonPos(g,t.dataPointsLen),x="";p.forEach(function(b,m){if(f===0){var v=t.graphics.drawLine(b.x,b.y,0,0,Array.isArray(t.polygons.connectorColors)?t.polygons.connectorColors[m]:t.polygons.connectorColors);u.push(v)}m===0&&t.yaxisLabelsTextsPos.push({x:b.x,y:b.y}),x+=b.x+","+b.y+" "}),c.push(x)}),c.forEach(function(g,f){var p=t.polygons.strokeColors,x=t.polygons.strokeWidth,b=t.graphics.drawPolygon(g,Array.isArray(p)?p[f]:p,Array.isArray(x)?x[f]:x,i.globals.radarPolygons.fill.colors[f]);a.add(b)}),u.forEach(function(g){a.add(g)}),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(function(g,f){var p=s.drawYAxisTexts(g.x,g.y,f,r[f]);t.yaxisLabels.add(p)})}},{key:"drawXAxisTexts",value:function(){var e=this,t=this.w,i=t.config.xaxis.labels,a=this.graphics.group({class:"apexcharts-xaxis"}),s=L.getPolygonPos(this.size,this.dataPointsLen);return t.globals.labels.forEach(function(r,n){var l=t.config.xaxis.labels.formatter,h=new st(e.ctx);if(s[n]){var d=e.getTextPos(s[n],e.size),c=l(r,{seriesIndex:-1,dataPointIndex:n,w:t});h.plotDataLabelsText({x:d.newX,y:d.newY,text:c,textAnchor:d.textAnchor,i:n,j:n,parent:a,className:"apexcharts-xaxis-label",color:Array.isArray(i.style.colors)&&i.style.colors[n]?i.style.colors[n]:"#a8a8a8",dataLabelsConfig:R({textAnchor:d.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1}).on("click",function(u){if(typeof t.config.chart.events.xAxisLabelClick=="function"){var g=Object.assign({},t,{labelIndex:n});t.config.chart.events.xAxisLabelClick(u,e.ctx,g)}})}}),a}},{key:"createPaths",value:function(e,t){var i=this,a=[],s=[],r=[],n=[];if(e.length){s=[this.graphics.move(t.x,t.y)],n=[this.graphics.move(t.x,t.y)];var l=this.graphics.move(e[0].x,e[0].y),h=this.graphics.move(e[0].x,e[0].y);e.forEach(function(d,c){l+=i.graphics.line(d.x,d.y),h+=i.graphics.line(d.x,d.y),c===e.length-1&&(l+="Z",h+="Z")}),a.push(l),r.push(h)}return{linePathsFrom:s,linePathsTo:a,areaPathsFrom:n,areaPathsTo:r}}},{key:"getTextPos",value:function(e,t){var i="middle",a=e.x,s=e.y;return Math.abs(e.x)>=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;a<t.globals.previousPaths.length;a++){var s=t.globals.previousPaths[a];s.paths.length>0&&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<i;s++){var r={};r.x=e[s]*Math.sin(t[s]),r.y=-e[s]*Math.cos(t[s]),a.push(r)}return a}}]),o}(),Mr=function(o){Ct(t,cs);var e=At(t);function t(i){var a;H(this,t),(a=e.call(this,i)).ctx=i,a.w=i.w,a.animBeginArr=[0],a.animDur=0;var s=a.w;return a.startAngle=s.config.plotOptions.radialBar.startAngle,a.endAngle=s.config.plotOptions.radialBar.endAngle,a.totalAngle=Math.abs(s.config.plotOptions.radialBar.endAngle-s.config.plotOptions.radialBar.startAngle),a.trackStartAngle=s.config.plotOptions.radialBar.track.startAngle,a.trackEndAngle=s.config.plotOptions.radialBar.track.endAngle,a.barLabels=a.w.config.plotOptions.radialBar.barLabels,a.donutDataLabels=a.w.config.plotOptions.radialBar.dataLabels,a.radialDataLabels=a.donutDataLabels,a.trackStartAngle||(a.trackStartAngle=a.startAngle),a.trackEndAngle||(a.trackEndAngle=a.endAngle),a.endAngle===360&&(a.endAngle=359.99),a.margin=parseInt(s.config.plotOptions.radialBar.track.margin,10),a.onBarLabelClick=a.onBarLabelClick.bind(Aa(a)),a}return O(t,[{key:"draw",value:function(i){var a=this.w,s=new X(this.ctx),r=s.group({class:"apexcharts-radialbar"});if(a.globals.noData)return r;var n=s.group(),l=this.defaultSize/2,h=a.globals.gridWidth/2,d=this.defaultSize/2.05;a.config.chart.sparkline.enabled||(d=d-a.config.stroke.width-a.config.chart.dropShadow.blur);var c=a.globals.fill.colors;if(a.config.plotOptions.radialBar.track.show){var u=this.drawTracks({size:d,centerX:h,centerY:l,colorArr:c,series:i});n.add(u)}var g=this.drawArcs({size:d,centerX:h,centerY:l,colorArr:c,series:i}),f=360;a.config.plotOptions.radialBar.startAngle<0&&(f=this.totalAngle);var p=(360-f)/360;if(a.globals.radialSize=d-d*p,this.radialDataLabels.value.show){var x=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);a.globals.radialSize+=x*p}return n.add(g.g),a.config.plotOptions.radialBar.hollow.position==="front"&&(g.g.add(g.elHollow),g.dataLabels&&g.g.add(g.dataLabels)),r.add(n),r}},{key:"drawTracks",value:function(i){var a=this.w,s=new X(this.ctx),r=s.group({class:"apexcharts-tracks"}),n=new ue(this.ctx),l=new Te(this.ctx),h=this.getStrokeWidth(i);i.size=i.size-h/2;for(var d=0;d<i.series.length;d++){var c=s.group({class:"apexcharts-radialbar-track apexcharts-track"});r.add(c),c.attr({rel:d+1}),i.size=i.size-h-this.margin;var u=a.config.plotOptions.radialBar.track,g=l.fillPath({seriesNumber:0,size:i.size,fillColors:Array.isArray(u.background)?u.background[d]:u.background,solid:!0}),f=this.trackStartAngle,p=this.trackEndAngle;Math.abs(p)+Math.abs(f)>=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:v<i.series.length;m?v--:v++){var k=s.group({class:"apexcharts-series apexcharts-radial-series",seriesName:L.escapeString(a.globals.seriesNames[v])});l.add(k),k.attr({rel:v+1,"data:realIndex":v}),this.ctx.series.addCollapsedClassToSeries(k,v),i.size=i.size-h-this.margin;var y=r.fillPath({seriesNumber:v,size:i.size,value:i.series[v]}),C=this.startAngle,w=void 0,A=L.negToZero(i.series[v]>100?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;l<i.length;l++){var h,d,c,u,g=void 0,f=void 0,p=s.globals.comboCharts?a[l]:l,x=this.barHelpers.getGroupIndex(p).columnGroupIndex,b=r.group({class:"apexcharts-series",seriesName:L.escapeString(s.globals.seriesNames[p]),rel:l+1,"data:realIndex":p});this.ctx.series.addCollapsedClassToSeries(b,p),i[l].length>0&&(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;A<s.globals.dataPoints;A++){var S=this.barHelpers.getStrokeWidth(l,A,p),M=this.seriesRangeStart[l][A],P=this.seriesRangeEnd[l][A],I=null,T=null,z=null,E={x:g,y:f,strokeWidth:S,elSeries:b},Y=this.seriesLen;if(s.config.plotOptions.bar.rangeBarGroupRows&&(Y=1),s.config.series[l].data[A]===void 0)break;if(this.isHorizontal){z=f+m*this.visibleI;var F=(d-m*Y)/2;if(s.config.series[l].data[A].x){var W=this.detectOverlappingBars({i:l,j:A,barYPosition:z,srty:F,barHeight:m,yDivision:d,initPositions:y});m=W.barHeight,z=W.barYPosition}v=(I=this.drawRangeBarPaths(R({indexes:{i:l,j:A,realIndex:p},barHeight:m,barYPosition:z,zeroW:u,yDivision:d,y1:M,y2:P},E))).barWidth}else{s.globals.isXNumeric&&(g=(s.globals.seriesX[l][A]-s.globals.minX)/this.xRatio-v/2),T=g+v*this.visibleI;var _=(h-v*Y)/2;if(s.config.series[l].data[A].x){var G=this.detectOverlappingBars({i:l,j:A,barXPosition:T,srtx:_,barWidth:v,xDivision:h,initPositions:y});v=G.barWidth,T=G.barXPosition}m=(I=this.drawRangeColumnPaths(R({indexes:{i:l,j:A,realIndex:p,translationsIndex:k},barWidth:v,barXPosition:T,zeroH:c,xDivision:h},E))).barHeight}var B=this.barHelpers.drawGoalLine({barXPosition:I.barXPosition,barYPosition:z,goalX:I.goalX,goalY:I.goalY,barHeight:m,barWidth:v});B&&w.add(B),f=I.y,g=I.x;var ee=this.barHelpers.getPathFillColor(i,l,A,p);this.renderSeries({realIndex:p,pathFill:ee.color,lineFill:ee.useRangeColor?ee.color:s.globals.stroke.colors[p],j:A,i:l,x:g,y:f,y1:M,y2:P,pathFrom:I.pathFrom,pathTo:I.pathTo,strokeWidth:S,elSeries:b,series:i,barHeight:m,barWidth:v,barXPosition:T,barYPosition:z,columnGroupIndex:x,elDataLabelsWrap:C,elGoalsMarkers:w,visibleSeries:this.visibleI,type:"rangebar"})}n.add(b)}return n}},{key:"detectOverlappingBars",value:function(i){var a=i.i,s=i.j,r=i.barYPosition,n=i.barXPosition,l=i.srty,h=i.srtx,d=i.barHeight,c=i.barWidth,u=i.yDivision,g=i.xDivision,f=i.initPositions,p=this.w,x=[],b=p.config.series[a].data[s].rangeName,m=p.config.series[a].data[s].x,v=Array.isArray(m)?m.join(" "):m,k=p.globals.labels.map(function(C){return Array.isArray(C)?C.join(" "):C}).indexOf(v),y=p.globals.seriesRange[a].findIndex(function(C){return C.x===v&&C.overlaps.length>0});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;r<s.globals.previousPaths.length;r++){var n=s.globals.previousPaths[r];(n.type==="line"||n.type==="area")&&n.paths.length>0&&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;p<x;p++)u=g,g=d[p+1],c[p]=.5*(f+(f=oi(u,g)));return c[p]=f,c}(o),r=o.length-1,n=[],l=0;l<r;l++)i=oi(o[l],o[l+1]),Math.abs(i)<1e-6?s[l]=s[l+1]=0:(a=(e=s[l]/i)*e+(t=s[l+1]/i)*t)>9&&(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;n<l;n++){var h=o[n],d=e[n];a.push([h[0]-d[0],h[1]-d[1],h[0],h[1]])}return a},Xr=function(o,e,t){var i=o.slice(e,t);if(e){if(t-e>1&&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;u<e.length;u++){e=this.lineHelpers.sameValueSeriesFix(u,e);var g=r.globals.comboCharts?i[u]:u,f=this.yRatio.length>1?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<Y;F++)T.linePaths[F]=E.linePaths[F+Y]+T.linePaths[F];T.linePaths.splice(Y),T.pathFromLine=E.pathFromLine+T.pathFromLine}else T.pathFromArea+="z";this._handlePaths({type:l,realIndex:g,i:u,paths:T}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),c.push(this.elSeries)}if(((s=r.config.series[0])===null||s===void 0?void 0:s.zIndex)!==void 0&&c.sort(function(G,B){return Number(G.node.getAttribute("zIndex"))-Number(B.node.getAttribute("zIndex"))}),r.config.chart.stacked)for(var W=c.length-1;W>=0;W--)h.add(c[W]);else for(var _=0;_<c.length;_++)h.add(c[_]);return h}},{key:"_initSerieVariables",value:function(e,t,i){var a=this.w,s=new X(this.ctx);this.xDivision=a.globals.gridWidth/(a.globals.dataPoints-(a.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(a.config.stroke.width)?a.config.stroke.width[i]:a.config.stroke.width;var r=0;this.yRatio.length>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;x<n[l].length;x++)if(n[l][x]!==null){c=this.xDivision*x,u=this.zeroY-n[l][x]/this.yRatio[d],t=p.move(c,u),i=p.move(c,this.areaBottomY);break}}else t=p.move(c,u),r==="rangeArea"&&(t=p.move(c,g)+p.line(c,u)),i=p.move(c,this.areaBottomY)+p.line(c,u);if(a=p.move(0,this.areaBottomY)+p.line(0,this.areaBottomY),s=p.move(0,this.areaBottomY)+p.line(0,this.areaBottomY),f.globals.previousPaths.length>0){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;p<s.areaPaths.length;p++){var x=n.renderPaths(R(R({},g),{},{pathFrom:s.pathFromArea,pathTo:s.areaPaths[p],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:f}));this.elSeries.add(x)}if(r.config.stroke.show&&!this.pointsChart){var b=null;if(t==="line")b=l.fillPath({seriesNumber:i,i:a});else if(r.config.stroke.fill.type==="solid")b=r.globals.stroke.colors[i];else{var m=r.config.fill;r.config.fill=r.config.stroke.fill,b=l.fillPath({seriesNumber:i,i:a}),r.config.fill=m}for(var v=0;v<s.linePaths.length;v++){var k=b;t==="rangeArea"&&(k=l.fillPath({seriesNumber:i}));var y=R(R({},g),{},{pathFrom:s.pathFromLine,pathTo:s.linePaths[v],stroke:b,strokeWidth:this.strokeWidth,strokeLineCap:r.config.stroke.lineCap,fill:t==="rangeArea"?k:"none"}),C=n.renderPaths(y);if(this.elSeries.add(C),C.attr("fill-rule","evenodd"),h.count>0&&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;K<n&&r[d].length!==0;K++){var pe=r[d][K+1]===void 0||r[d][K+1]===null;if(S.globals.isXNumeric){var J=S.globals.seriesX[l][K+1];S.globals.seriesX[l][K+1]===void 0&&(J=S.globals.seriesX[l][n-1]),c=(J-S.globals.minX)/this.xRatio}else c+=this.xDivision;G?d>0&&S.globals.collapsedSeries.length<S.config.series.length-1?v=this.prevSeriesY[function(fe){for(var xe=fe;xe>0;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;xe<ie.length;ze+=ie[xe++])fe[xe]=Xr($,ze,ze+ie[xe]);return fe}(T,E).forEach(function(J){F++;var $=function(xe){for(var ze="",dt=0;dt<xe.length;dt++){var be=xe[dt],Xe=be.length;Xe>4?(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){var B=w.curve(g+G,f,n-G,l,n,l);b+=B,m+=B;break}case 1:if(i[a][r+1]===null)b+=M?w.line(g,c):w.move(g,f),m+=w.line(g,A)+w.line(x,A)+"z",v.push(b),k.push(m),p=-1;else{var ee=w.curve(g+G,f,n-G,l,n,l);b+=ee,m+=ee,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){var K=oe(y,n,l);b+=K,m+=K;break}case 1:if(i[a][r+1]===null)b+=M?w.line(g,c):w.move(g,f),m+=w.line(g,A)+w.line(x,A)+"z",v.push(b),k.push(m),p=-1;else{var pe=oe(y,n,l);b+=pe,m+=pe,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<c.length;u++)g.push([f,p,f+x,p+c[u]/x]),p+=c[u]/x;else for(u=0;u<c.length;u++)g.push([f,p,f+c[u]/b,p+b]),f+=c[u]/b;return g},this.cutArea=function(c){var u;if(this.width>=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<g.length;p++)x[p]=g[p]*b;return x}(n,l*h),[],new o(d,c,l,h),[]);return function(g){var f,p,x=[];for(f=0;f<g.length;f++)for(p=0;p<g[f].length;p++)x.push(g[f][p]);return x}(u)}function t(n,l,h,d){var c,u,g;if(n.length!==0)return c=h.shortestEdge(),function(f,p,x){var b;if(f.length===0)return!0;(b=f.slice()).push(p);var m=i(f,x),v=i(b,x);return m>=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;l<n.length;l++)h+=n[l];return h}function r(n){var l,h=0;if(a(n[0]))for(l=0;l<n.length;l++)h+=r(n[l]);else h=s(n);return h}return function n(l,h,d,c,u){c=c===void 0?0:c,u=u===void 0?0:u;var g,f,p=[],x=[];if(a(l[0])){for(f=0;f<l.length;f++)p[f]=r(l[f]);for(g=e(p,h,d,c,u),f=0;f<l.length;f++)x.push(n(l[f],g[f][2]-g[f][0],g[f][3]-g[f][1],g[f][0],g[f][1]))}else x=e(l,h,d,c,u);return x}}();var Rr=function(){function o(e,t){H(this,o),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new ls(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return O(o,[{key:"draw",value:function(e){var t=this,i=this.w,a=new X(this.ctx),s=new Te(this.ctx),r=a.group({class:"apexcharts-treemap"});if(i.globals.noData)return r;var n=[];return e.forEach(function(l){var h=l.map(function(d){return Math.abs(d)});n.push(h)}),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach(function(l,h){l.data.forEach(function(d){Array.isArray(t.labels[h])||(t.labels[h]=[]),t.labels[h].push(d.x)})}),window.TreemapSquared.generate(n,i.globals.gridWidth,i.globals.gridHeight).forEach(function(l,h){var d=a.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:L.escapeString(i.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(i.config.chart.dropShadow.enabled){var c=i.config.chart.dropShadow;new ue(t.ctx).dropShadow(r,c,h)}var u=a.group({class:"apexcharts-data-labels"});l.forEach(function(g,f){var p=g[0],x=g[1],b=g[2],m=g[3],v=a.drawRect(p,x,b-p,m-x,i.config.plotOptions.treemap.borderRadius,"#fff",1,t.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?y:i.globals.stroke.colors[h]);v.attr({cx:p,cy:x,index:h,i:h,j:f,width:b-p,height:m-x});var k=t.helpers.getShadeColor(i.config.chart.type,h,f,t.negRange),y=k.color,C=s.fillPath({color:y,seriesNumber:h,dataPointIndex:f});v.node.classList.add("apexcharts-treemap-rect"),v.attr({fill:C}),t.helpers.addListeners(v);var w={x:p+(b-p)/2,y:x+(m-x)/2,width:0,height:0},A={x:p,y:x,width:b-p,height:m-x};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var S=1;i.globals.resized||(S=i.config.chart.animations.speed),t.animateTreemap(v,w,A,S)}if(i.globals.dataChanged){var M=1;t.dynamicAnim.enabled&&i.globals.shouldAnimate&&(M=t.dynamicAnim.speed,i.globals.previousPaths[h]&&i.globals.previousPaths[h][f]&&i.globals.previousPaths[h][f].rect&&(w=i.globals.previousPaths[h][f].rect),t.animateTreemap(v,w,A,M))}var P=t.getFontSize(g),I=i.config.dataLabels.formatter(t.labels[h][f],{value:i.globals.series[h][f],seriesIndex:h,dataPointIndex:f,w:i});i.config.plotOptions.treemap.dataLabels.format==="truncate"&&(P=parseInt(i.config.dataLabels.style.fontSize,10),I=t.truncateLabels(I,P,p,x,b,m));var T=null;i.globals.series[h][f]&&(T=t.helpers.calculateDataLabels({text:I,x:(p+b)/2,y:(x+m)/2+t.strokeWidth/2+P/3,i:h,j:f,colorProps:k,fontSize:P,series:e})),i.config.dataLabels.enabled&&T&&t.rotateToFitLabel(T,P,I,p,x,b,m),d.add(v),T!==null&&d.add(T)}),d.add(u),r.add(d)}),r}},{key:"getFontSize",value:function(e){var t=this.w,i=function a(s){var r,n=0;if(Array.isArray(s[0]))for(r=0;r<s.length;r++)n+=a(s[r]);else for(r=0;r<s.length;r++)n+=s[r].length;return n}(this.labels)/function a(s){var r,n=0;if(Array.isArray(s[0]))for(r=0;r<s.length;r++)n+=a(s[r]);else for(r=0;r<s.length;r++)n+=1;return n}(this.labels);return function(a,s){var r=a*s,n=Math.pow(r,.5);return Math.min(n/i,parseInt(t.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}},{key:"rotateToFitLabel",value:function(e,t,i,a,s,r,n){var l=new X(this.ctx),h=l.getTextRects(i,t);if(h.width+this.w.config.stroke.width+5>r-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,r<Er?a.globals.disableZoomIn=!0:r>5e4&&(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;f<r;f++)u++,g=h.determineDaysOfYear(u-1)*s+g,this.timeScaleArray.push({position:g,value:u,unit:d,year:u,month:1})}},{key:"generateMonthScale",value:function(e){var t=e.firstVal,i=e.currentMonthDate,a=e.currentMonth,s=e.currentYear,r=e.daysWidthOnXAxis,n=e.numberOfMonths,l=a,h=0,d=new de(this.ctx),c="month",u=0;if(t.minDate>1){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;m<n;m++,v++){(x=L.monthMod(x))===0?(c="year",u+=1):c="month";var k=this._getYear(s,x,u);b=d.determineDaysOfMonths(x,k)*r+b;var y=x===0?k:x;this.timeScaleArray.push({position:b,value:y,unit:c,year:k,month:x===0?1:x}),x++}}},{key:"generateDayScale",value:function(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,s=e.hoursWidthOnXAxis,r=e.numberOfDays,n=new de(this.ctx),l="day",h=t.minDate+1,d=h,c=function(v,k,y){return v>n.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;x<r;x++){l="day",f=c(d+=1,f,this._getYear(a,f,0));var b=this._getYear(a,f,0);p=24*s+p;var m=d===1?L.monthMod(f):d;this.timeScaleArray.push({position:p,value:m,unit:l,year:b,month:L.monthMod(f),day:m})}}},{key:"generateHourScale",value:function(e){var t=e.firstVal,i=e.currentDate,a=e.currentMonth,s=e.currentYear,r=e.minutesWidthOnXAxis,n=e.numberOfHours,l=new de(this.ctx),h="hour",d=function(C,w){return C>l.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<n;v++){h="hour",p>=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<c;m++)u>=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<d;m++)c>=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;u<c.globals.collapsedSeriesIndices.length;u++){var g=c.config.series[c.globals.collapsedSeriesIndices[u]];c.globals.collapsedSeries[u].data=c.globals.axisCharts?g.data.slice():g}for(var f=0;f<c.globals.ancillaryCollapsedSeriesIndices.length;f++){var p=c.config.series[c.globals.ancillaryCollapsedSeriesIndices[f]];c.globals.ancillaryCollapsedSeries[f].data=c.globals.axisCharts?p.data.slice():p}h.series.emptyCollapsedSeries(c.config.series)}return h.update(e).then(function(){d===l.length-1&&n(h)})})})}},{key:"_updateSeries",value:function(e,t){var i=this,a=arguments.length>2&&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&&v<k&&(k-=2*Math.PI),C=Math.ceil(2*Math.abs(v-k)/Math.PI),A=[],S=v,y=(k-v)/C,w=4*Math.tan(y/4)/3,T=0;T<=C;T++)P=Math.cos(S),M=Math.sin(S),I=new Q(x.x+P,x.y+M),A[T]=[new Q(I.x+w*M,I.y-w*P),I,new Q(I.x-w*M,I.y+w*P)],S+=y;for(A[0][0]=A[0][1].clone(),A[A.length-1][2]=A[A.length-1][1].clone(),c=new D().rotate(B).scale(_,G).rotate(-B),T=0,z=A.length;T<z;T++)A[T][0]=A[T][0].transform(c),A[T][1]=A[T][1].transform(c),A[T][2]=A[T][2].transform(c);for(T=1,z=A.length;T<z;T++)E=(I=A[T-1][2]).x,Y=I.y,F=(I=A[T][0]).x,W=I.y,K=(I=A[T][1]).x,pe=I.y,ie.push(["C",E,Y,F,W,K,pe]);return ie}(this.pos,s),s=r[0]}return s[0]="C",this.pos=[s[5],s[6]],this.reflection=[2*s[5]-s[3],2*s[6]-s[4]],r}function a(){var s=arguments.length>0&&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<l;++n)if(s[n][0]=="M")return n;return!1}N(Pe,{morph:function(s,r,n,l,h){for(var d=this.parse(s),c=this.parse(r),u=0,g=0,f=!1,p=!1;u!==!1||g!==!1;){var x;f=a(d,u!==!1&&u+1),p=a(c,g!==!1&&g+1),u===!1&&(u=(x=new Pe(b.start).bbox()).height==0||x.width==0?d.push(d[0])-1:d.push(["M",x.x+x.width/2,x.y+x.height/2])-1),g===!1&&(g=(x=new Pe(b.dest).bbox()).height==0||x.width==0?c.push(c[0])-1:c.push(["M",x.x+x.width/2,x.y+x.height/2])-1);var b=o(d,u,f,c,g,p);d=d.slice(0,u).concat(b.start,f===!1?[]:d.slice(f)),c=c.slice(0,g).concat(b.dest,p===!1?[]:c.slice(p)),u=f!==!1&&u+b.start.length,g=p!==!1&&g+b.dest.length}this._array=d,this.destination=new Pe,this.destination._array=c;var m=this.fromArray(d.map(function(v,k){var y=c[k].map(function(C,w){return w===0?C:l.step(v[w],c[k][w],n,h[k],h)});return y}));return m}})})();const pa=o=>(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<o.length;s++){const r=o[s];e=Math.min(e,r[0]),t=Math.min(t,r[1]),i=Math.max(i,r[0]),a=Math.max(a,r[1])}return new le(e,t,i-e,a-t)};class ma{constructor(e){this.el=e,e.remember("_ResizeHandler",this),this.lastCoordinates=null,this.eventType="",this.lastEvent=null,this.handleResize=this.handleResize.bind(this),this.resize=this.resize.bind(this),this.endResize=this.endResize.bind(this),this.rotate=this.rotate.bind(this),this.movePoint=this.movePoint.bind(this)}active(e,t){this.preserveAspectRatio=t.preserveAspectRatio??!1,this.aroundCenter=t.aroundCenter??!1,this.grid=t.grid??0,this.degree=t.degree??0,this.el.off(".resize"),e&&(this.el.on(["lt.resize","rt.resize","rb.resize","lb.resize","t.resize","r.resize","b.resize","l.resize","rot.resize","point.resize"],this.handleResize),this.lastEvent&&(this.eventType==="rot"?this.rotate(this.lastEvent):this.eventType==="point"?this.movePoint(this.lastEvent):this.resize(this.lastEvent)))}handleResize(e){this.eventType=e.type;const{event:t,index:i,points:a}=e.detail,s=!t.type.indexOf("mouse");if(s&&(t.which||t.buttons)!==1||this.el.dispatch("beforeresize",{event:e,handler:this}).defaultPrevented)return;this.box=this.el.bbox(),this.startPoint=this.el.point(Tt(t)),this.index=i,this.points=a.slice();const r=(s?"mousemove":"touchmove")+".resize",n=(s?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?Ee(window,r,this.movePoint):e.type==="rot"?Ee(window,r,this.rotate):Ee(window,r,this.resize),Ee(window,n,this.endResize)}resize(e){this.lastEvent=e;const t=this.snapToGrid(this.el.point(Tt(e)));let i=t.x-this.startPoint.x,a=t.y-this.startPoint.y;this.preserveAspectRatio&&this.aroundCenter&&(i*=2,a*=2);const s=this.box.x+i,r=this.box.y+a,n=this.box.x2+i,l=this.box.y2+a;let h=new le(this.box);if(this.eventType.includes("l")&&(h.x=Math.min(s,this.box.x2),h.x2=Math.max(s,this.box.x2)),this.eventType.includes("r")&&(h.x=Math.min(n,this.box.x),h.x2=Math.max(n,this.box.x)),this.eventType.includes("t")&&(h.y=Math.min(r,this.box.y2),h.y2=Math.max(r,this.box.y2)),this.eventType.includes("b")&&(h.y=Math.min(l,this.box.y),h.y2=Math.max(l,this.box.y)),h.width=h.x2-h.x,h.height=h.y2-h.y,this.preserveAspectRatio){const d=h.width/this.box.width,c=h.height/this.box.height,u=["lt","t","rt","r","rb","b","lb","l"],g=(u.indexOf(this.eventType)+4)%u.length,f=this.aroundCenter?[this.box.cx,this.box.cy]:this.points[g];let p=this.eventType.includes("t")||this.eventType.includes("b")?c:d;p=this.eventType.length===2?Math.max(d,c):p,h=function(x,b,m){const v=[[x.x,x.y],[x.x+x.width,x.y],[x.x+x.width,x.y+x.height],[x.x,x.y+x.height]].map(([k,y])=>{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.x<t.x&&(c=-c);const u=new D(this.el),{x:g,y:f}=new Q(a,s).transformO(u),{rotate:p}=u.decompose(),x=this.snapToAngle(p+c)-p;this.el.dispatch("resize",{box:this.box,angle:x,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.transform(u.rotateO(x,g,f))}endResize(e){this.eventType!=="rot"&&this.eventType!=="point"&&this.resize(e),this.lastEvent=null,this.eventType="",Se(window,"mousemove.resize touchmove.resize"),Se(window,"mouseup.resize touchend.resize")}snapToGrid(e){return this.grid&&(e.x=Math.round(e.x/this.grid)*this.grid,e.y=Math.round(e.y/this.grid)*this.grid),e}snapToAngle(e){return this.degree&&(e=Math.round(e/this.degree)*this.degree),e}}N(ge,{resize:function(o=!0,e={}){typeof o=="object"&&(e=o,o=!0);let t=this.remember("_ResizeHandler");return t||(o.prototype instanceof ma?(t=new o(this),o=!0):t=new ma(this),this.remember("_resizeHandler",t)),t.active(o,e),this}}),window.SVG===void 0&&(window.SVG=Qs),window.Apex===void 0&&(window.Apex={});var va=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new nt(this.ctx),this.ctx.axes=new hr(this.ctx),this.ctx.core=new Hr(this.ctx.el,this.ctx),this.ctx.config=new wt({}),this.ctx.data=new Gi(this.ctx),this.ctx.grid=new is(this.ctx),this.ctx.graphics=new X(this.ctx),this.ctx.coreUtils=new he(this.ctx),this.ctx.crosshairs=new Si(this.ctx),this.ctx.events=new or(this.ctx),this.ctx.exports=new Nt(this.ctx),this.ctx.fill=new Te(this.ctx),this.ctx.localization=new lr(this.ctx),this.ctx.options=new Be,this.ctx.responsive=new cr(this.ctx),this.ctx.series=new Le(this.ctx),this.ctx.theme=new dr(this.ctx),this.ctx.formatters=new Pt(this.ctx),this.ctx.titleSubtitle=new ur(this.ctx),this.ctx.legend=new ss(this.ctx),this.ctx.toolbar=new rs(this.ctx),this.ctx.tooltip=new ua(this.ctx),this.ctx.dimensions=new Wt(this.ctx),this.ctx.updateHelpers=new Or(this.ctx),this.ctx.zoomPanSelection=new mr(this.ctx),this.ctx.w.globals.tooltip=new ua(this.ctx)}}]),o}(),ya=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"clear",value:function(e){var t=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:t})}},{key:"killSVG",value:function(e){e.each(function(){this.removeClass("*"),this.off()},!0),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,i=e.isUpdating,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!i&&(a.parentNode.parentNode.style.minHeight="unset");var s=this.w.globals.dom.baseEl;s&&this.ctx.eventList.forEach(function(n){s.removeEventListener(n,t.ctx.events.documentEvent)});var r=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(r.Paper),r.Paper.remove(),r.elWrap=null,r.elGraphical=null,r.elLegendWrap=null,r.elLegendForeign=null,r.baseEl=null,r.elGridRect=null,r.elGridRectMask=null,r.elGridRectBarMask=null,r.elGridRectMarkerMask=null,r.elForecastMask=null,r.elNonForecastMask=null,r.elDefs=null}}]),o}(),hi=new WeakMap,Dr=function(){function o(e,t){H(this,o),this.opts=t,this.ctx=this,this.w=new nr(t).init(),this.el=e,this.w.globals.cuid=L.randomId(),this.w.globals.chartID=this.w.config.chart.id?L.escapeString(this.w.config.chart.id):this.w.globals.cuid,new va(this).initModules(),this.create=L.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return O(o,[{key:"render",value:function(){var e=this;return new Promise(function(t,i){if(L.elementExists(e.el)){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var a=e.w.config.chart.events.beforeMount;typeof a=="function"&&a(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(u,g){var f=!1;if(u.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var p=u.getBoundingClientRect();u.style.display!=="none"&&p.width!==0||(f=!0)}var x=new ResizeObserver(function(b){f&&g.call(u,b),f=!0});u.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(u.children).forEach(function(b){return x.observe(b)}):x.observe(u),hi.set(g,x)}(e.el.parentNode,e.parentResizeHandler);var s=e.el.getRootNode&&e.el.getRootNode(),r=L.is("ShadowRoot",s),n=e.el.ownerDocument,l=r?s.getElementById("apexcharts-css"):n.getElementById("apexcharts-css");if(!l){var h;(l=document.createElement("style")).id="apexcharts-css",l.textContent=`@keyframes opaque {
0% {
opacity: 0
}
to {
opacity: 1
}
}
@keyframes resizeanim {
0%,
to {
opacity: 0
}
}
.apexcharts-canvas {
position: relative;
direction: ltr !important;
user-select: none
}
.apexcharts-canvas ::-webkit-scrollbar {
-webkit-appearance: none;
width: 6px
}
.apexcharts-canvas ::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0, 0, 0, .5);
box-shadow: 0 0 1px rgba(255, 255, 255, .5);
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
}
.apexcharts-inner {
position: relative
}
.apexcharts-text tspan {
font-family: inherit
}
rect.legend-mouseover-inactive,
.legend-mouseover-inactive rect,
.legend-mouseover-inactive path,
.legend-mouseover-inactive circle,
.legend-mouseover-inactive line,
.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
.legend-mouseover-inactive text.apexcharts-yaxis-label {
transition: .15s ease all;
opacity: .2
}
.apexcharts-legend-text {
padding-left: 15px;
margin-left: -15px;
}
.apexcharts-series-collapsed {
opacity: 0
}
.apexcharts-tooltip {
border-radius: 5px;
box-shadow: 2px 2px 6px -4px #999;
cursor: default;
font-size: 14px;
left: 62px;
opacity: 0;
pointer-events: none;
position: absolute;
top: 20px;
display: flex;
flex-direction: column;
overflow: hidden;
white-space: nowrap;
z-index: 12;
transition: .15s ease all
}
.apexcharts-tooltip.apexcharts-active {
opacity: 1;
transition: .15s ease all
}
.apexcharts-tooltip.apexcharts-theme-light {
border: 1px solid #e3e3e3;
background: rgba(255, 255, 255, .96)
}
.apexcharts-tooltip.apexcharts-theme-dark {
color: #fff;
background: rgba(30, 30, 30, .8)
}
.apexcharts-tooltip * {
font-family: inherit
}
.apexcharts-tooltip-title {
padding: 6px;
font-size: 15px;
margin-bottom: 4px
}
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
background: #eceff1;
border-bottom: 1px solid #ddd
}
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
background: rgba(0, 0, 0, .7);
border-bottom: 1px solid #333
}
.apexcharts-tooltip-text-goals-value,
.apexcharts-tooltip-text-y-value,
.apexcharts-tooltip-text-z-value {
display: inline-block;
margin-left: 5px;
font-weight: 600
}
.apexcharts-tooltip-text-goals-label:empty,
.apexcharts-tooltip-text-goals-value:empty,
.apexcharts-tooltip-text-y-label:empty,
.apexcharts-tooltip-text-y-value:empty,
.apexcharts-tooltip-text-z-value:empty,
.apexcharts-tooltip-title:empty {
display: none
}
.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
padding: 6px 0 5px
}
.apexcharts-tooltip-goals-group,
.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
display: flex
}
.apexcharts-tooltip-text-goals-label:not(:empty),
.apexcharts-tooltip-text-goals-value:not(:empty) {
margin-top: -6px
}
.apexcharts-tooltip-marker {
width: 12px;
height: 12px;
position: relative;
top: 0;
margin-right: 10px;
border-radius: 50%
}
.apexcharts-tooltip-series-group {
padding: 0 10px;
display: none;
text-align: left;
justify-content: left;
align-items: center
}
.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
opacity: 1
}
.apexcharts-tooltip-series-group.apexcharts-active,
.apexcharts-tooltip-series-group:last-child {
padding-bottom: 4px
}
.apexcharts-tooltip-y-group {
padding: 6px 0 5px
}
.apexcharts-custom-tooltip,
.apexcharts-tooltip-box {
padding: 4px 8px
}
.apexcharts-tooltip-boxPlot {
display: flex;
flex-direction: column-reverse
}
.apexcharts-tooltip-box>div {
margin: 4px 0
}
.apexcharts-tooltip-box span.value {
font-weight: 700
}
.apexcharts-tooltip-rangebar {
padding: 5px 8px
}
.apexcharts-tooltip-rangebar .category {
font-weight: 600;
color: #777
}
.apexcharts-tooltip-rangebar .series-name {
font-weight: 700;
display: block;
margin-bottom: 5px
}
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
opacity: 0;
pointer-events: none;
color: #373d3f;
font-size: 13px;
text-align: center;
border-radius: 2px;
position: absolute;
z-index: 10;
background: #eceff1;
border: 1px solid #90a4ae
}
.apexcharts-xaxistooltip {
padding: 9px 10px;
transition: .15s ease all
}
.apexcharts-xaxistooltip.apexcharts-theme-dark {
background: rgba(0, 0, 0, .7);
border: 1px solid rgba(0, 0, 0, .5);
color: #fff
}
.apexcharts-xaxistooltip:after,
.apexcharts-xaxistooltip:before {
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none
}
.apexcharts-xaxistooltip:after {
border-color: transparent;
border-width: 6px;
margin-left: -6px
}
.apexcharts-xaxistooltip:before {
border-color: transparent;
border-width: 7px;
margin-left: -7px
}
.apexcharts-xaxistooltip-bottom:after,
.apexcharts-xaxistooltip-bottom:before {
bottom: 100%
}
.apexcharts-xaxistooltip-top:after,
.apexcharts-xaxistooltip-top:before {
top: 100%
}
.apexcharts-xaxistooltip-bottom:after {
border-bottom-color: #eceff1
}
.apexcharts-xaxistooltip-bottom:before {
border-bottom-color: #90a4ae
}
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
border-bottom-color: rgba(0, 0, 0, .5)
}
.apexcharts-xaxistooltip-top:after {
border-top-color: #eceff1
}
.apexcharts-xaxistooltip-top:before {
border-top-color: #90a4ae
}
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
border-top-color: rgba(0, 0, 0, .5)
}
.apexcharts-xaxistooltip.apexcharts-active {
opacity: 1;
transition: .15s ease all
}
.apexcharts-yaxistooltip {
padding: 4px 10px
}
.apexcharts-yaxistooltip.apexcharts-theme-dark {
background: rgba(0, 0, 0, .7);
border: 1px solid rgba(0, 0, 0, .5);
color: #fff
}
.apexcharts-yaxistooltip:after,
.apexcharts-yaxistooltip:before {
top: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none
}
.apexcharts-yaxistooltip:after {
border-color: transparent;
border-width: 6px;
margin-top: -6px
}
.apexcharts-yaxistooltip:before {
border-color: transparent;
border-width: 7px;
margin-top: -7px
}
.apexcharts-yaxistooltip-left:after,
.apexcharts-yaxistooltip-left:before {
left: 100%
}
.apexcharts-yaxistooltip-right:after,
.apexcharts-yaxistooltip-right:before {
right: 100%
}
.apexcharts-yaxistooltip-left:after {
border-left-color: #eceff1
}
.apexcharts-yaxistooltip-left:before {
border-left-color: #90a4ae
}
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
border-left-color: rgba(0, 0, 0, .5)
}
.apexcharts-yaxistooltip-right:after {
border-right-color: #eceff1
}
.apexcharts-yaxistooltip-right:before {
border-right-color: #90a4ae
}
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
border-right-color: rgba(0, 0, 0, .5)
}
.apexcharts-yaxistooltip.apexcharts-active {
opacity: 1
}
.apexcharts-yaxistooltip-hidden {
display: none
}
.apexcharts-xcrosshairs,
.apexcharts-ycrosshairs {
pointer-events: none;
opacity: 0;
transition: .15s ease all
}
.apexcharts-xcrosshairs.apexcharts-active,
.apexcharts-ycrosshairs.apexcharts-active {
opacity: 1;
transition: .15s ease all
}
.apexcharts-ycrosshairs-hidden {
opacity: 0
}
.apexcharts-selection-rect {
cursor: move
}
.svg_select_shape {
stroke-width: 1;
stroke-dasharray: 10 10;
stroke: black;
stroke-opacity: 0.1;
pointer-events: none;
fill: none;
}
.svg_select_handle {
stroke-width: 3;
stroke: black;
fill: none;
}
.svg_select_handle_r {
cursor: e-resize;
}
.svg_select_handle_l {
cursor: w-resize;
}
.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
cursor: crosshair
}
.apexcharts-svg.apexcharts-zoomable.hovering-pan {
cursor: move
}
.apexcharts-menu-icon,
.apexcharts-pan-icon,
.apexcharts-reset-icon,
.apexcharts-selection-icon,
.apexcharts-toolbar-custom-icon,
.apexcharts-zoom-icon,
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
cursor: pointer;
width: 20px;
height: 20px;
line-height: 24px;
color: #6e8192;
text-align: center
}
.apexcharts-menu-icon svg,
.apexcharts-reset-icon svg,
.apexcharts-zoom-icon svg,
.apexcharts-zoomin-icon svg,
.apexcharts-zoomout-icon svg {
fill: #6e8192
}
.apexcharts-selection-icon svg {
fill: #444;
transform: scale(.76)
}
.apexcharts-theme-dark .apexcharts-menu-icon svg,
.apexcharts-theme-dark .apexcharts-pan-icon svg,
.apexcharts-theme-dark .apexcharts-reset-icon svg,
.apexcharts-theme-dark .apexcharts-selection-icon svg,
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
.apexcharts-theme-dark .apexcharts-zoom-icon svg,
.apexcharts-theme-dark .apexcharts-zoomin-icon svg,
.apexcharts-theme-dark .apexcharts-zoomout-icon svg {
fill: #f3f4f5
}
.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
fill: #008ffb
}
.apexcharts-theme-light .apexcharts-menu-icon:hover svg,
.apexcharts-theme-light .apexcharts-reset-icon:hover svg,
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
fill: #333
}
.apexcharts-menu-icon,
.apexcharts-selection-icon {
position: relative
}
.apexcharts-reset-icon {
margin-left: 5px
}
.apexcharts-menu-icon,
.apexcharts-reset-icon,
.apexcharts-zoom-icon {
transform: scale(.85)
}
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
transform: scale(.7)
}
.apexcharts-zoomout-icon {
margin-right: 3px
}
.apexcharts-pan-icon {
transform: scale(.62);
position: relative;
left: 1px;
top: 0
}
.apexcharts-pan-icon svg {
fill: #fff;
stroke: #6e8192;
stroke-width: 2
}
.apexcharts-pan-icon.apexcharts-selected svg {
stroke: #008ffb
}
.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
stroke: #333
}
.apexcharts-toolbar {
position: absolute;
z-index: 11;
max-width: 176px;
text-align: right;
border-radius: 3px;
padding: 0 6px 2px;
display: flex;
justify-content: space-between;
align-items: center
}
.apexcharts-menu {
background: #fff;
position: absolute;
top: 100%;
border: 1px solid #ddd;
border-radius: 3px;
padding: 3px;
right: 10px;
opacity: 0;
min-width: 110px;
transition: .15s ease all;
pointer-events: none
}
.apexcharts-menu.apexcharts-menu-open {
opacity: 1;
pointer-events: all;
transition: .15s ease all
}
.apexcharts-menu-item {
padding: 6px 7px;
font-size: 12px;
cursor: pointer
}
.apexcharts-theme-light .apexcharts-menu-item:hover {
background: #eee
}
.apexcharts-theme-dark .apexcharts-menu {
background: rgba(0, 0, 0, .7);
color: #fff
}
@media screen and (min-width:768px) {
.apexcharts-canvas:hover .apexcharts-toolbar {
opacity: 1
}
}
.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;d<t.elGraph.length;d++)a.globals.dom.elGraphical.add(t.elGraph[d]);else a.globals.dom.elGraphical.add(t.elGraph);a.config.grid.position==="front"&&(h&&a.globals.dom.elGraphical.add(h.el),h!=null&&(l=h.elGridBorders)!==null&&l!==void 0&&l.node&&a.globals.dom.elGraphical.add(h.elGridBorders)),a.config.xaxis.crosshairs.position==="front"&&i.crosshairs.drawXCrosshairs(),a.config.yaxis[0].crosshairs.position==="front"&&i.crosshairs.drawYCrosshairs(),a.config.chart.type!=="treemap"&&i.axes.drawAxis(a.config.chart.type,h);var c=new kt(e.ctx,h),u=new ji(e.ctx,h);if(h!==null&&(c.xAxisLabelCorrections(h.xAxisTickWidth),u.setYAxisTextAlignments(),a.config.yaxis.map(function(f,p){a.globals.ignoreYAxisIndexes.indexOf(p)===-1&&u.yAxisTitleRotate(p,f.opposite)})),i.annotations.drawAxesAnnotations(),!a.globals.noData){if(a.config.tooltip.enabled&&!a.globals.noData&&i.w.globals.tooltip.drawTooltip(t.xyRatios),a.globals.axisCharts&&(a.globals.isXNumeric||a.config.xaxis.convertedCatToNumeric||a.globals.isRangeBar))(a.config.chart.zoom.enabled||a.config.chart.selection&&a.config.chart.selection.enabled||a.config.chart.pan&&a.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:t.xyRatios});else{var g=a.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(f){g[f]=!1})}a.config.chart.toolbar.show&&!a.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}a.globals.memory.methodsToExec.length>0&&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;s<a.length;s++)if(e[s]!==null&&e[s]!==void 0)for(var r=0;r<e[s].data.length;r++)a[s].data.push(e[s].data[r]);return i.w.config.series=a,t&&(i.w.globals.initialSeries=L.clone(i.w.config.series)),this.update()}},{key:"update",value:function(e){var t=this;return new Promise(function(i,a){new ya(t.ctx).clear({isUpdating:!0});var s=t.create(t.w.config.series,e);if(!s)return i(t);t.mount(s).then(function(){typeof t.w.config.chart.events.updated=="function"&&t.w.config.chart.events.updated(t,t.w),t.events.fireEvent("updated",[t,t.w]),t.w.globals.isDirty=!0,i(t)}).catch(function(r){a(r)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),t=[this];return e.length&&(t=[],e.forEach(function(i){t.push(i)})),t}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter(function(t){if(t.group)return!0}).map(function(t){return e.w.config.chart.group===t.group?t.chart:e})}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,t){return this.series.toggleSeriesOnHover(e,t)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"highlightSeries",value:function(e){this.series.highlightSeries(e)}},{key:"isSeriesHidden",value:function(e){this.series.isSeriesHidden(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&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;t<e.length;t++)new o(e[t],JSON.parse(e[t].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,t){var i=this.getChartByID(e);if(i){i.w.globals.isExecCalled=!0;var a=null;if(i.publicMethods.indexOf(t)!==-1){for(var s=arguments.length,r=new Array(s>2?s-2:0),n=2;n<s;n++)r[n-2]=arguments[n];a=i[t].apply(i,r)}return a}}},{key:"merge",value:function(e,t){return L.extend(e,t)}}]),o}();function ci(o){if(o===null||typeof o!="object")return!1;const e=Object.getPrototypeOf(o);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in o?!1:Symbol.toStringTag in o?Object.prototype.toString.call(o)==="[object Module]":!0}function Ti(o,e,t=".",i){if(!ci(e))return Ti(o,{},t,i);const a=Object.assign({},e);for(const s in o){if(s==="__proto__"||s==="constructor")continue;const r=o[s];r!=null&&(i&&i(a,s,r,t)||(Array.isArray(r)&&Array.isArray(a[s])?a[s]=[...r,...a[s]]:ci(r)&&ci(a[s])?a[s]=Ti(r,a[s],(t?`${t}.`:"")+s.toString(),i):a[s]=r))}return a}function Nr(o){return(...e)=>e.reduce((t,i)=>Ti(t,i,"",o),{})}const Wr=Nr();var _r=zi("<div>"),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('<div class="stat flex-1 place-items-center"><div class="stat-title text-primary-content"></div><div class="stat-value w-full truncate text-center text-2xl text-primary-content lg:text-3xl">'),jr=zi('<div class="flex flex-col gap-2 lg:h-full"><div class="stats stats-vertical w-full flex-shrink-0 grid-cols-2 bg-gradient-to-br from-primary to-secondary shadow lg:stats-horizontal lg:flex"></div><div class="flex flex-col gap-2 rounded-box bg-base-300 py-4 lg:flex-row"><div class=flex-1></div><div class=flex-1></div></div><footer class="footer mx-auto mt-4 block rounded-box bg-neutral p-4 text-center text-lg font-bold text-neutral-content">');const et=o=>(()=>{var e=Gr(),t=e.firstChild,i=t.nextSibling;return Me(t,()=>o.label),Me(i,()=>ys(()=>o.children)()),e})(),qr=()=>{const o=ms();if(!Ui())return o("/setup",{replace:!0}),null;const[e]=vs(),[t,i]=qi([]),[a,s]=qi([]);As(()=>{ws(()=>{i(u=>u.slice(-Ki)),s(u=>u.slice(-Ki))})},60*1e3,setInterval);const r=Zi("traffic");ft(()=>{const u=r();u&&i(g=>[...g,u])});const n=Je(()=>$i.merge({title:{text:e("traffic")}},Ji)),l=Je(()=>[{name:e("down"),data:t().map(u=>u.down)},{name:e("up"),data:t().map(u=>u.up)}]),h=Zi("memory");ft(()=>{var g;const u=(g=h())==null?void 0:g.inuse;u&&s(f=>[...f,u])});const d=Je(()=>$i.merge({title:{text:e("memory")}},Ji)),c=Je(()=>[{name:e("memory"),data:a()}]);return[Re(ks,{get children(){return e("overview")}}),(()=>{var u=jr(),g=u.firstChild,f=g.nextSibling,p=f.firstChild,x=p.nextSibling,b=f.nextSibling;return Me(g,Re(et,{get label(){return e("upload")},get children(){return[Je(()=>{var m;return ut(((m=r())==null?void 0:m.up)||0).toString()}),"/s"]}}),null),Me(g,Re(et,{get label(){return e("download")},get children(){return[Je(()=>{var m;return ut(((m=r())==null?void 0:m.down)||0).toString()}),"/s"]}}),null),Me(g,Re(et,{get label(){return e("uploadTotal")},get children(){var m;return ut(((m=jt())==null?void 0:m.uploadTotal)||0).toString()}}),null),Me(g,Re(et,{get label(){return e("downloadTotal")},get children(){var m;return ut(((m=jt())==null?void 0:m.downloadTotal)||0).toString()}}),null),Me(g,Re(et,{get label(){return e("activeConnections")},get children(){var m,v;return((v=(m=jt())==null?void 0:m.connections)==null?void 0:v.length)||0}}),null),Me(g,Re(et,{get label(){return e("memoryUsage")},get children(){var m;return ut(((m=h())==null?void 0:m.inuse)||0).toString()}}),null),Me(p,Re(wa,{type:"area",get options(){return n()},get series(){return l()}})),Me(x,Re(wa,{type:"line",get options(){return d()},get series(){return c()}})),Me(b,()=>{var m;return(m=Ui())==null?void 0:m.url}),u})()]};export{qr as default};