function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function createCommonjsModule(t,e){return e={exports:{}},t(e,e.exports),e.exports}var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},apexcharts=createCommonjsModule(function(t,e){!function(e,i){t.exports=i()}(0,function(){return function(t){function e(a){if(i[a])return i[a].exports;var s=i[a]={i:a,l:!1,exports:{}};return t[a].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,a){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=68)}([function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":n,"stroke-width":r})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,fill:n,opacity:r,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,n=t.strokeWidth,r=t.fill,o=t.fillOpacity,l=void 0===o?1:o,h=t.strokeOpacity,c=void 0===h?1:h,d=t.classes,u=t.strokeLinecap,f=void 0===u?null:u,g=t.strokeDashArray,p=void 0===g?0:g,x=this.w;return null===f&&(f=x.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 "+x.globals.gridHeight),x.globals.dom.Paper.path(i).attr({fill:r,"fill-opacity":l,stroke:s,"stroke-opacity":c,"stroke-linecap":f,"stroke-width":n,"stroke-dasharray":p,class:d})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=["L",t,e].join(" "):"H"===i?a=["H",t].join(" "):"V"===i&&(a=["V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,n){var r=["C",t,e,i,a,s,n].join(" ");return r}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,n,r){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,n,r].join(" ");return l}},{key:"renderPaths",value:function(t){var e=t.i,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,o=t.stroke,c=t.strokeWidth,d=t.strokeLinecap,u=t.fill,f=t.animationDelay,g=t.initialSpeed,p=t.dataChangeSpeed,x=(t.hideStrokesInChange,t.className),b=t.id,v=this.w,m=new l.default(this.ctx),y=new h.default(this.ctx),w=this.w.config.chart.animations.enabled,k=w&&this.w.config.chart.animations.dynamicAnimation.enabled,S=void 0,A=!!(w&&!v.globals.resized||k&&v.globals.dataChanged&&v.globals.shouldAnimate);S=A?s:r;var C=v.config.stroke.dashArray,M=0;M=Array.isArray(C)?C[a]:v.config.stroke.dashArray;var P=this.drawPath({d:S,stroke:o,strokeWidth:c,fill:u,fillOpacity:1,classes:x,strokeLinecap:d,strokeDashArray:M});if(P.attr("id",b+"-"+e),P.attr("index",a),P.attr({"clip-path":"url(#gridRectMask"+v.globals.cuid+")"}),"none"!==v.config.states.normal.filter.type)m.getDefaultFilter(P,v.config.states.normal.filter.type,v.config.states.normal.filter.value);else if(v.config.chart.dropShadow.enabled&&(!v.config.chart.dropShadow.enabledSeries||v.config.chart.dropShadow.enabledSeries&&-1!==v.config.chart.dropShadow.enabledSeries.indexOf(a))){var L=v.config.chart.dropShadow;m.dropShadow(P,L)}P.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,P)),P.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,P)),P.node.addEventListener("mousedown",this.pathMouseDown.bind(this,P)),P.attr({pathTo:r,pathFrom:s});var E={el:P,j:i,pathFrom:s,pathTo:r,strokeWidth:c};return!w||v.globals.resized||v.globals.dataChanged?!v.globals.resized&&v.globals.dataChanged||y.showDelayedElements():y.animatePathsGradually(n({},E,{speed:g,delay:f})),v.globals.dataChanged&&k&&A&&y.animatePathsGradually(n({},E,{speed:p})),P}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,function(n){"horizontalLines"===t?n.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?n.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?n.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?n.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&n.circle(e).fill("none").stroke({color:a,width:s})})}},{key:"drawGradient",value:function(t,e,i,a,s){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=this.w;e=o.default.hexToRgba(e,a),i=o.default.hexToRgba(i,s);var h=0,c=1,d=1,u=null;null!==r&&(h=void 0!==r[0]?r[0]/100:0,c=void 0!==r[1]?r[1]/100:1,d=void 0!==r[2]?r[2]/100:1,u=void 0!==r[3]?r[3]/100:null);var f=!("donut"!==l.config.chart.type&&"pie"!==l.config.chart.type&&"bubble"!==l.config.chart.type),g=l.globals.dom.Paper.gradient(f?"radial":"linear",function(t){t.at(h,e,a),t.at(c,i,s),t.at(d,i,s),null!==u&&t.at(u,e,a)});if(f){var p=l.globals.gridWidth/2,x=l.globals.gridHeight/2;"bubble"!==l.config.chart.type?g.attr({gradientUnits:"userSpaceOnUse",cx:p,cy:x,r:n}):g.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?g.from(0,0).to(0,1):"diagonal"===t?g.from(0,0).to(1,1):"horizontal"===t?g.from(0,1).to(1,1):"diagonal2"===t&&g.from(0,1).to(2,2);return g}},{key:"drawText",value:function(t){var e=this.w,i=t.x,a=t.y,s=t.text,n=t.textAnchor,r=t.fontSize,o=t.fontFamily,l=t.foreColor,h=t.opacity;n||(n="start"),l||(l=e.config.chart.foreColor),o=o||e.config.chart.fontFamily;var c=void 0;return(c=Array.isArray(s)?e.globals.dom.Paper.text(function(t){for(var e=0;e-1){var o=i.globals.selectedDataPoints[s].indexOf(n);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var h=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle").members,d=!0,u=!1,f=void 0;try{for(var g,p=h[Symbol.iterator]();!(d=(g=p.next()).done);d=!0){var x=g.value;x.node.setAttribute("selected","false"),a.getDefaultFilter(x)}}catch(t){u=!0,f=t}finally{try{!d&&p.return&&p.return()}finally{if(u)throw f}}var b=!0,v=!1,m=void 0;try{for(var y,w=c[Symbol.iterator]();!(b=(y=w.next()).done);b=!0){var k=y.value;k.node.setAttribute("selected","false"),a.getDefaultFilter(k)}}catch(t){v=!0,m=t}finally{try{!b&&w.return&&w.return()}finally{if(v)throw m}}}t.node.setAttribute("selected","true"),r="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(n)}if("true"===r){var S=i.config.states.active.filter;"none"!==S&&a.applyFilter(t,S.type,S.value)}else"none"!==i.config.states.active.filter.type&&a.getDefaultFilter(t);"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:n,w:i}),this.ctx.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:n,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e=t.getBBox();return{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w,r=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&r.attr("transform",a),n.globals.dom.Paper.add(r);var o=r.bbox();return s||(o=r.node.getBoundingClientRect()),r.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if(t.textContent=e,e.length>0&&t.getSubStringLength(0,e.length)>=i){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i)return void(t.textContent=e.substring(0,a)+"...");t.textContent="..."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}();e.default=c},function(t,e,i){function a(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:void 0;if("#"===e[0]&&"r"===e[0]||(e=this.getHexColorFromName(e)),"number"!=typeof t||t<-1||t>1||"string"!=typeof e||"r"!==e[0]&&"#"!==e[0]||"string"!=typeof n&&void 0!==n)return null;var i=Math.round,a=e.length>9,a="string"==typeof n?n.length>9||"c"===n&&!a:a,s=t<0,t=s?-1*t:t,n=n&&"c"!==n?n:s?"#000000":"#FFFFFF",r=this.sbcRip(e),o=this.sbcRip(n);return r&&o?a?"rgb("+i((o[0]-r[0])*t+r[0])+","+i((o[1]-r[1])*t+r[1])+","+i((o[2]-r[2])*t+r[2])+(r[3]<0&&o[3]<0?")":","+(r[3]>-1&&o[3]>-1?i(1e4*((o[3]-r[3])*t+r[3]))/1e4:o[3]<0?r[3]:o[3])+")"):"#"+(4294967296+16777216*(r[3]>-1&&o[3]>-1?i(255*((o[3]-r[3])*t+r[3])):o[3]>-1?i(255*o[3]):r[3]>-1?i(255*r[3]):255)+65536*i((o[0]-r[0])*t+r[0])+256*i((o[1]-r[1])*t+r[1])+i((o[2]-r[2])*t+r[2])).toString(16).slice(r[3]>-1||o[3]>-1?1:3):null}},{key:"sbcRip",value:function(t){var e=t.length,i=new Object,a=parseInt,s=Math.round;if(e>9){if((t=t.split(",")).length<3||t.length>4)return null;i[0]=a(t[0].slice(4)),i[1]=a(t[1]),i[2]=a(t[2]),i[3]=t[3]?parseFloat(t[3]):-1}else{if(8===e||6===e||e<4)return null;e<6&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(e>4?t[4]+""+t[4]:"")),t=a(t.slice(1),16),i[0]=t>>16&255,i[1]=t>>8&255,i[2]=255&t,i[3]=9===e||5===e?s((t>>24&255)/255*1e4)/1e4:-1}return i}},{key:"getHexColorFromName",value:function(t){var e=document.createElement("div");e.style.color=t;var i=window.getComputedStyle(document.body.appendChild(e)).color.match(/\d+/g).map(function(t){return parseInt(t,10)});return document.body.removeChild(e),i.length>=3&&"#"+((1<<24)+(i[0]<<16)+(i[1]<<8)+i[2]).toString(16).substr(1)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===(void 0===t?"undefined":n(t))&&!Array.isArray(t)&&null!=t}},{key:"extend",value:function(t,e){var i=this;"function"!=typeof Object.assign&&function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i1?(e.shift(),this.addProps(a,e,i)):t[e[0]]=i,t}},{key:"clone",value:function(t){if("[object Array]"===Object.prototype.toString.call(t)){for(var e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var a=t.indexOf("Edge/");return a>0&&parseInt(t.substring(a+5,t.indexOf(".",a)),10)}}]),t}();e.default=o},function(t,e,i){function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:.5;switch(e){case"none":this.addNormalFilter(t);break;case"lighten":this.addLightenFilter(t,{intensity:i});break;case"darken":this.addDarkenFilter(t,{intensity:i});break;case"desaturate":this.addDesaturateFilter(t)}}},{key:"addShadow",value:function(t,e){var i=e.blur,a=e.top,s=e.left,n=e.opacity,r=t.flood("black",n).composite(t.sourceAlpha,"in").offset(s,a).gaussianBlur(i).merge(t.source);return t.blend(t.source,r)}},{key:"dropShadow",value:function(t,e){var i=e.top,a=e.left,s=e.blur,r=e.opacity;return t.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),t.filter(function(t){var e=null;e=n.default.isSafari()||n.default.isFirefox()||n.default.isIE()?t.flood("black",r).composite(t.sourceAlpha,"in").offset(a,i).gaussianBlur(s):t.flood("black",r).composite(t.sourceAlpha,"in").offset(a,i).gaussianBlur(s).merge(t.source),t.blend(t.source,e)}),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),t}}]),t}();e.default=r},function(t,e,i){function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce(function(t,e){return t+e},0):this.w.config.series[t].data.reduce(function(t,e){return t+e},0)}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map(function(t){return t.length}).indexOf(Math.max.apply(Math,t.globals.series.map(function(t){return t.length})))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach(function(t){e=Math.max(e,t)}),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map(function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][r]s?a:s,o=t.image,l=0,h=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(l=i.fill.image.width+1,h=i.fill.image.height):(l=n+1,h=n):(l=t.width,h=t.height);var c=document.createElementNS(e.globals.svgNS,"pattern");r.default.setAttrs(c,{id:t.patternID,patternUnits:"userSpaceOnUse",width:l+"px",height:h+"px"});var d=document.createElementNS(e.globals.svgNS,"image");c.appendChild(d),d.setAttributeNS("http://www.w3.org/1999/xlink","href",o),r.default.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:h+"px"}),d.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w;return"bar"===e.config.chart.type&&e.config.plotOptions.bar.distributed||"heatmap"===e.config.chart.type?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(t,e){var i=this.w;this.opts=e;var a=this.w.config,s=void 0,n=void 0,r=void 0;this.seriesIndex=this.getSeriesIndex(e);var l=this.getFillColors(),h=l[this.seriesIndex],c=Array.isArray(a.fill.opacity)?a.fill.opacity[this.seriesIndex]:a.fill.opacity,d=h;return-1===h.indexOf("rgb")?d=o.default.hexToRgba(h,c):h.indexOf("rgba")>-1&&(c="0."+o.default.getOpacityFromRGBA(l[this.seriesIndex])),"pattern"===a.fill.type&&(n=this.handlePatternFill(n,h,c,d)),"gradient"===a.fill.type&&(r=this.handleGradientFill(r,h,c)),a.fill.image.src.length>0&&"image"===a.fill.type?e.seriesNumber"}this.w.globals.easing=t}},{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateCircleRadius",value:function(t,e,i,a,s){e||(e=0),t.attr({r:e}).animate(a,s).attr({r:i})}},{key:"animateCircle",value:function(t,e,i,a,s){t.attr({r:e.r,cx:e.cx,cy:e.cy}).animate(a,s).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.j,a=t.pathFrom,s=t.pathTo,n=t.speed,r=t.delay,o=t.strokeWidth,l=this,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&(c=0),l.morphSVG(e,i,a,s,n,o,r*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(t){t.el.classList.remove("hidden")})}},{key:"morphSVG",value:function(t,e,i,a,s,r,o){var l=this,h=this.w;i||(i=t.attr("pathFrom")),a||(a=t.attr("pathTo")),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 "+h.globals.gridHeight,s=1),(a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a="M 0 "+h.globals.gridHeight,s=1),h.globals.shouldAnimate||(s=1),t.plot(i).animate(1,h.globals.easing,o).plot(i).animate(s,h.globals.easing,o).plot(a).afterAll(function(){"function"==typeof h.config.chart.events.animationEnd&&(n.default.isNumber(e)?e===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&h.config.chart.events.animationEnd(l.ctx,h):h.globals.shouldAnimate&&h.config.chart.events.animationEnd(l.ctx,h)),l.showDelayedElements()})}}]),t}();t.exports=r},function(t,e,i){function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=function(){function t(t,e){for(var i=0;i=t.from&&i<=t.to&&a[e].classList.remove("legend-mouseover-inactive")}}(i.config.plotOptions.heatmap.colorScale.ranges[n])}else"mouseout"===t.type&&s()}},{key:"getActiveSeriesIndex",value:function(){var t=this.w,e=0;if(t.globals.series.length>1)for(var i=t.globals.series.map(function(e,i){return e.length>0&&"bar"!==t.config.series[i].type&&"column"!==t.config.series[i].type?i:-1}),a=0;a1)for(var i=t.config.series.map(function(t,e){return t.data&&t.data.length>0?e:-1}),a=0;a0)for(var a=i.length-1;a>=0;a--)t(i,a,"line");var s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-area-series .apexcharts-series");if(s.length>0)for(var n=s.length-1;n>=0;n--)t(s,n,"area");var r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series .apexcharts-series");if(r.length>0)for(var o=0;o0)for(var h=0;h0)for(var d=0;d0)for(var x=0;x0)for(var w=0;w0?t:[]});return t}}]),t}();e.default=r},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;ie.length?t:e},0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}();e.default=l},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i0){if(t.globals.markers.size.length0&&(r=h.group({class:"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask"+s.globals.cuid+")"),n.x instanceof Array)for(var d=0;d0:s.config.markers.size>0){l.default.isNumber(n.y[t])?d+=" w"+(Math.random()+1).toString(36).substring(4):d="apexcharts-nullpoint";var u=a.getMarkerConfig(d,e);s.config.markers.discrete.map(function(t){t.seriesIndex===e&&t.dataPointIndex===o&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,u.pSize=t.size)}),c=h.drawMarker(n.x[t],n.y[t],u),1===i&&0===t&&(o=0),1===i&&1===t&&(o=1),c.attr("rel",o),c.attr("j",o),c.attr("index",e),c.node.setAttribute("default-marker-size",u.pSize),a.setSelectedPointFilter(c,e,o),a.addEvents(c),r&&r.add(c)}else void 0===s.globals.pointsArray[e]&&(s.globals.pointsArray[e]=[]),s.globals.pointsArray[e].push([n.x[t],n.y[t]])}(d);return r}},{key:"getMarkerConfig",value:function(t,e){var i=this.w,a=this.getMarkerStyle(e);return{pSize:i.globals.markers.size[e],pRadius:i.config.markers.radius,pWidth:i.config.markers.strokeWidth,pointStrokeColor:a.pointStrokeColor,pointFillColor:a.pointFillColor,shape:i.config.markers.shape instanceof Array?i.config.markers.shape[e]:i.config.markers.shape,class:t,pointStrokeOpacity:i.config.markers.strokeOpacity,pointFillOpacity:i.config.markers.fillOpacity,seriesIndex:e}}},{key:"addEvents",value:function(t){var e=new o.default(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("touchstart",e.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"setSelectedPointFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&new r.default(this.ctx).applyFilter(t,s.type,s.value)}}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors;return{pointStrokeColor:e.config.markers.strokeColor,pointFillColor:i instanceof Array?i[t]:i}}}]),t}();t.exports=h},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0&&(i.visibleI=i.visibleI+1);var w=0,k=0,S=0;i.yRatio.length>1&&(i.yaxisIndex=m);var A=i.initialPositions();u=A.y,k=A.barHeight,g=A.yDivision,x=A.zeroW,d=A.x,S=A.barWidth,f=A.xDivision,p=A.zeroH,i.horizontal||v.push(d+S/2);for(var C=s.group({class:"apexcharts-datalabels"}),M=0,P=a.globals.dataPoints;M0&&v.push(d+S/2),b.push(u);var A=i.barOptions.distributed?e:r,M=null;i.barOptions.colors.ranges.length>0&&i.barOptions.colors.ranges.map(function(i){t[r][e]>=i.from&&t[r][e]<=i.to&&(M=i.color)});var P=n.fillPath(y,{seriesNumber:i.barOptions.distributed?A:m,color:M});y=i.renderSeries({realIndex:m,pathFill:P,j:e,i:r,pathFrom:h,pathTo:l,strokeWidth:w,elSeries:y,x:d,y:u,series:t,barHeight:k,barWidth:S,elDataLabelsWrap:C,visibleSeries:i.visibleI,type:"bar"})}(M);a.globals.seriesXvalues[m]=v,a.globals.seriesYvalues[m]=b,c.add(y)}(d,u);return c}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,n=t.i,r=t.pathFrom,o=t.pathTo,l=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,f=t.series,g=t.barHeight,p=t.barWidth,x=t.elDataLabelsWrap,b=t.visibleSeries,v=t.type,m=this.w,y=new h.default(this.ctx);a||(a=m.globals.stroke.colors[e]),this.isNullValue&&(i="none");var w=s/m.config.chart.animations.animateGradually.delay*(m.config.chart.animations.speed/m.globals.dataPoints)/2.4,k=y.renderPaths({i:n,j:s,realIndex:e,pathFrom:r,pathTo:o,stroke:a,strokeWidth:l,strokeLineCap:m.config.stroke.lineCap,fill:i,animationDelay:w,initialSpeed:m.config.chart.animations.speed,dataChangeSpeed:m.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-"+v+"-area",id:"apexcharts-"+v+"-area"});this.setSelectedBarFilter(k,e,s),c.add(k);var S=this.calculateDataLabelsPos({x:d,y:u,i:n,j:s,series:f,realIndex:e,barHeight:g,barWidth:p,renderedPath:k,visibleSeries:b});return null!==S&&x.add(S),c.add(x),c}},{key:"initVariables",value:function(t){var e=this.w;this.series=t,this.totalItems=0,this.seriesLen=0,this.visibleI=-1,this.visibleItems=1;for(var i=0;i0&&(this.seriesLen=this.seriesLen+1,this.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(n=this.getPathFrom(x,p,!0));var m={barHeight:i,strokeWidth:a,barYPosition:v,x:o=void 0===this.series[g][p]||null===this.series[g][p]?r:r+this.series[g][p]/this.invertedYRatio,zeroW:r},y=this.barEndingShape(u,m,this.series,g,p);if(s=s+f.line(y.newX,v)+y.path+f.line(r,v+i-a)+f.line(r,v),n=n+f.line(r,v)+y.ending_p_from+f.line(r,v+i-a)+f.line(r,v+i-a)+f.line(r,v),u.globals.isXNumeric||(l+=c),this.barOptions.colors.backgroundBarColors.length>0&&0===g){b>=this.barOptions.colors.backgroundBarColors.length&&(b=0);var w=this.barOptions.colors.backgroundBarColors[b],k=f.drawRect(0,v-i*this.visibleI,u.globals.gridWidth,i*this.seriesLen,0,w,this.barOptions.colors.backgroundBarOpacity);d.add(k),k.node.classList.add("apexcharts-backgroundBar")}return{pathTo:s,pathFrom:n,x:o,y:l,barYPosition:v}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,n=t.pathTo,r=t.pathFrom,o=t.barWidth,l=t.zeroH,c=t.strokeWidth,d=t.elSeries,u=this.w,f=new h.default(this.ctx),g=e.i,p=e.j,x=e.realIndex,b=e.bc;u.globals.isXNumeric&&(i=(u.globals.seriesX[g][p]-u.globals.minX)/this.xRatio-o/2);var v=i+o*this.visibleI;n=f.move(v,l),r=f.move(v,l),u.globals.previousPaths.length>0&&(r=this.getPathFrom(x,p,!0));var m={barWidth:o,strokeWidth:c,barXPosition:v,y:a=void 0===this.series[g][p]||null===this.series[g][p]?l:l-this.series[g][p]/this.yRatio[this.yaxisIndex],zeroH:l},y=this.barEndingShape(u,m,this.series,g,p);if(n=n+f.line(v,y.newY)+y.path+f.line(v+o-c,l)+f.line(v,l),r=r+f.line(v,l)+y.ending_p_from+f.line(v+o-c,l)+f.line(v+o-c,l)+f.line(v,l),u.globals.isXNumeric||(i+=s),this.barOptions.colors.backgroundBarColors.length>0&&0===g){b>=this.barOptions.colors.backgroundBarColors.length&&(b=0);var w=this.barOptions.colors.backgroundBarColors[b],k=f.drawRect(v-o*this.visibleI,0,o*this.seriesLen,u.globals.gridHeight,0,w,this.barOptions.colors.backgroundBarOpacity);d.add(k),k.node.classList.add("apexcharts-backgroundBar")}return{pathTo:n,pathFrom:r,x:i,y:a,barXPosition:v}}},{key:"getPathFrom",value:function(t,e){for(var i=this.w,a=void 0,s=0;s0&&parseInt(n.realIndex)===parseInt(t)&&void 0!==i.globals.previousPaths[s].paths[e]&&(a=i.globals.previousPaths[s].paths[e].d)}return a}},{key:"calculateDataLabelsPos",value:function(t){var e=t.x,i=t.y,a=t.i,s=t.j,n=t.realIndex,r=t.series,o=t.barHeight,l=t.barWidth,c=t.visibleSeries,d=t.renderedPath,u=this.w,f=new h.default(this.ctx),g=Array.isArray(this.strokeWidth)?this.strokeWidth[n]:this.strokeWidth,p=e+parseFloat(l*c),x=i+parseFloat(o*c);u.globals.isXNumeric&&(p=e+parseFloat(l*(c+1))-g,x=i+parseFloat(o*(c+1))-g);var b=e,v=i,m={},y=u.config.dataLabels,w=this.barOptions.dataLabels,k=y.offsetX,S=y.offsetY,A=f.getTextRects(u.globals.yLabelFormatters[0](u.globals.maxY),parseInt(y.style.fontSize));return m=this.isHorizontal?this.calculateBarsDataLabelsPosition({x:e,y:i,i:a,j:s,bcy:x,barHeight:o,textRects:A,strokeWidth:g,dataLabelsX:b,dataLabelsY:v,barDataLabelsConfig:w,offX:k,offY:S}):this.calculateColumnsDataLabelsPosition({x:e,y:i,i:a,j:s,realIndex:n,bcx:p,bcy:x,barHeight:o,barWidth:l,textRects:A,strokeWidth:g,dataLabelsY:v,barDataLabelsConfig:w,offX:k,offY:S}),d.attr({cy:m.bcy,cx:m.bcx,j:s,val:r[a][s],barHeight:o,barWidth:l}),this.drawCalculatedDataLabels({x:m.dataLabelsX,y:m.dataLabelsY,val:r[a][s],i:n,j:s,dataLabelsConfig:y})}},{key:"calculateColumnsDataLabelsPosition",value:function(t){var e=this.w,i=t.i,a=t.j,s=t.realIndex,n=t.y,r=t.bcx,o=t.barWidth,l=t.textRects,h=t.dataLabelsY,c=t.barDataLabelsConfig,d=t.strokeWidth,u=t.offX,f=t.offY,g=void 0,p=this.series[i][a]/this.yRatio[this.yaxisIndex],x=e.globals.gridWidth/e.globals.dataPoints;r-=d/2,g=e.globals.isXNumeric?r-o/2+u:r-x+o/2+u;var b=!!(n>e.globals.gridHeight-this.baseLineY[this.yaxisIndex]&&0!==Math.abs(this.baseLineY[this.yaxisIndex])),v=0!==Math.abs(e.globals.minYArr[s]);switch(c.position){case"center":h=n+p/2+l.height/2-f,v&&(h=b?n+p/2+l.height/2+f:n+p/2+l.height/2-f);break;case"bottom":h=v?b?n+p+l.height+d+f:n+p-l.height/2+d-f:e.globals.gridHeight-l.height/2-f;break;case"top":h=v&&b?n-l.height/2-f:n+l.height+f}return{bcx:r,bcy:n,dataLabelsX:g,dataLabelsY:h}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,n=t.bcy,r=t.barHeight,o=t.textRects,l=t.dataLabelsX,h=t.strokeWidth,c=t.barDataLabelsConfig,d=t.offX,u=t.offY,f=n-e.globals.gridHeight/e.globals.dataPoints+r/2+o.height/2+u-3,g=this.series[a][s]/this.invertedYRatio,p=this.series[a][s]<=0,x=0!==Math.abs(e.globals.minY);switch(c.position){case"center":l=i-g/2+d,x&&(l=p?i-g/2-d:i-g/2+d);break;case"bottom":l=x&&p?i-g-h-Math.round(o.width/2)-d:i-g+h+Math.round(o.width/2)+d;break;case"top":l=x?p?i-h+Math.round(o.width/2)-d:i-h-Math.round(o.width/2)+d:i+h-Math.round(o.width/2)+d}return l<0?l=o.width+h:l+o.width/2>e.globals.gridWidth&&(l=l-o.width-h),{bcx:i,bcy:n,dataLabelsX:l,dataLabelsY:f}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,n=t.j,r=t.dataLabelsConfig,o=this.w,l=new c.default(this.ctx),d=new h.default(this.ctx),u=r.formatter,f=null,g=o.globals.collapsedSeriesIndices.indexOf(s)>-1;if(r.enabled&&!g){f=d.group({class:"apexcharts-data-labels"});var p="";void 0!==a&&(p=u(a,{seriesIndex:s,dataPointIndex:n,w:o})),l.plotDataLabelsText(e,i,p,s,n,f,r,!0)}return f}},{key:"barEndingShape",value:function(t,e,i,a,s){var n=new h.default(this.ctx);if(this.isHorizontal){var r=null,o="",l=e.x;if(void 0!==i[a][s]||null!==i[a][s]){var c=i[a][s]<0,d=e.barHeight/2-e.strokeWidth;switch(c&&(d=-e.barHeight/2-e.strokeWidth),t.config.chart.stacked||("arrow"===this.barOptions.endingShape?l=e.x-d:"rounded"===this.barOptions.endingShape&&(l=e.x-d/2)),this.barOptions.endingShape){case"flat":r=n.line(l,e.barYPosition+e.barHeight-e.strokeWidth);break;case"arrow":r=n.line(l+d,e.barYPosition+(e.barHeight-e.strokeWidth)/2)+n.line(l,e.barYPosition+e.barHeight-e.strokeWidth),o=n.line(e.zeroW,e.barYPosition+e.barHeight-e.strokeWidth);break;case"rounded":r=n.quadraticCurve(l+d,e.barYPosition+(e.barHeight-e.strokeWidth)/2,l,e.barYPosition+e.barHeight-e.strokeWidth)}}return{path:r,ending_p_from:o,newX:l}}var u=null,f="",g=e.y;if(void 0!==i[a][s]||null!==i[a][s]){var p=i[a][s]<0,x=e.barWidth/2-e.strokeWidth;switch(p&&(x=-e.barWidth/2-e.strokeWidth),t.config.chart.stacked||("arrow"===this.barOptions.endingShape?g+=x:"rounded"===this.barOptions.endingShape&&(g+=x/2)),this.barOptions.endingShape){case"flat":u=n.line(e.barXPosition+e.barWidth-e.strokeWidth,g);break;case"arrow":u=n.line(e.barXPosition+(e.barWidth-e.strokeWidth)/2,g-x)+n.line(e.barXPosition+e.barWidth-e.strokeWidth,g),f=n.line(e.barXPosition+e.barWidth-e.strokeWidth,e.zeroH);break;case"rounded":u=n.quadraticCurve(e.barXPosition+(e.barWidth-e.strokeWidth)/2,g-x,e.barXPosition+e.barWidth-e.strokeWidth,g)}}return{path:u,ending_p_from:f,newY:g}}},{key:"setSelectedBarFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&new l.default(this.ctx).applyFilter(t,s.type,s.value)}}}]),t}();e.default=d},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;ip.x+p.width+2||e>p.y+p.height+2||t+d7&&void 0!==arguments[7]&&arguments[7],c=this.w,d=new o.default(this.ctx),u=this.dataLabelsCorrection(t,e,i,a,s,h,parseInt(r.style.fontSize));if(c.globals.zoomed||(t=u.x,e=u.y),u.drawnextLabel){var f=d.drawText({width:100,height:parseInt(r.style.fontSize),x:t,y:e,foreColor:c.globals.dataLabels.style.colors[a],textAnchor:r.textAnchor,text:i,fontSize:r.style.fontSize,fontFamily:r.style.fontFamily});if(f.attr({class:"apexcharts-datalabel",cx:t,cy:e,"clip-path":"url(#gridRectMask"+c.globals.cuid+")"}),r.dropShadow.enabled){var g=r.dropShadow;new l.default(this.ctx).dropShadow(f,g)}n.add(f),void 0===c.globals.lastDrawnDataLabelsIndexes[a]&&(c.globals.lastDrawnDataLabelsIndexes[a]=[]),c.globals.lastDrawnDataLabelsIndexes[a].push(s)}}}]),t}();e.default=h},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;ii.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeighti.config.yaxis[0].labels.maxWidth&&(this.yAxisWidth=i.config.yaxis[0].labels.maxWidth))}},{key:"setGridCoordsForAxisCharts",value:function(t){var e=this.w,i=e.globals,a=this.getyAxisLabelsCoords(),s=this.getxAxisLabelsCoords(),n=this.getyAxisTitleCoords(),r=this.getxAxisTitleCoords();e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map(function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:n[i].width,index:i})}),this.conditionalChecksForAxisCoords(s,r),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,this.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var o=this.yAxisWidth,l=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight,i.xAxisHeight=this.xAxisHeight;var c=10;switch(e.config.grid.show||(o=0,l=35),this.isSparkline&&(t={height:0,width:0},l=0,o=0,c=0),e.config.legend.position){case"bottom":i.translateY=c,i.translateX=o,i.gridHeight=i.svgHeight-t.height-l-(this.isSparkline?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-o;break;case"top":i.translateY=t.height+c,i.translateX=o,i.gridHeight=i.svgHeight-t.height-l-(this.isSparkline?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-o;break;case"left":i.translateY=c,i.translateX=t.width+o,i.gridHeight=i.svgHeight-l-12,i.gridWidth=i.svgWidth-t.width-o;break;case"right":i.translateY=c,i.translateX=o,i.gridHeight=i.svgHeight-l-12,i.gridWidth=i.svgWidth-t.width-o-5;break;default:throw new Error("Legend position not supported")}i.gridHeight=i.gridHeight-e.config.grid.padding.top-e.config.grid.padding.bottom,i.gridWidth=i.gridWidth-e.config.grid.padding.left-e.config.grid.padding.right,i.translateX=i.translateX+e.config.grid.padding.left,i.translateY=i.translateY+e.config.grid.padding.top,this.isBarHorizontal||this.setGridXPosForDualYAxis(n,a),new h.default(this.ctx).setYAxisXPosition(a,n)}},{key:"setGridCoordsForNonAxisCharts",value:function(t){var e=this.w,i=e.globals,a=0;e.config.legend.show&&!e.config.legend.floating&&(a=20);var s=10;if("pie"===e.config.chart.type||"donut"===e.config.chart.type?s+=e.config.plotOptions.pie.offsetY:"radialBar"===e.config.chart.type&&(s+=e.config.plotOptions.radialBar.offsetY),!e.config.legend.show)return i.gridHeight=i.svgHeight-35,i.gridWidth=i.gridHeight,i.translateY=s-10,void(i.translateX=(i.svgWidth-i.gridWidth)/2);switch(e.config.legend.position){case"bottom":i.gridHeight=i.svgHeight-t.height-35,i.gridWidth=i.gridHeight,i.translateY=s-20,i.translateX=(i.svgWidth-i.gridWidth)/2;break;case"top":i.gridHeight=i.svgHeight-t.height-35,i.gridWidth=i.gridHeight,i.translateY=t.height+s,i.translateX=(i.svgWidth-i.gridWidth)/2;break;case"left":i.gridWidth=i.svgWidth-t.width-a,i.gridHeight=i.gridWidth,i.translateY=s,i.translateX=t.width+a;break;case"right":i.gridWidth=i.svgWidth-t.width-a-5,i.gridHeight=i.gridWidth,i.translateY=s,i.translateX=10;break;default:throw new Error("Legend position not supported")}}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w;i.config.yaxis.map(function(a,s){-1===i.globals.ignoreYAxisIndexes.indexOf(s)&&!i.config.yaxis[s].floating&&i.config.yaxis[s].show&&a.opposite&&(i.globals.translateX=i.globals.translateX-(e[s].width+t[s].width)-parseInt(i.config.yaxis[s].labels.style.fontSize)/1.2-12)})}},{key:"titleSubtitleOffset",value:function(){var t=this.w,e=t.globals,i=this.isSparkline?0:10;void 0!==t.config.title.text?i+=t.config.title.margin:i+=this.isSparkline?0:5,void 0!==t.config.subtitle.text?i+=t.config.subtitle.margin:i+=this.isSparkline?0:5,t.config.legend.show&&"bottom"===t.config.legend.position&&!t.config.legend.floating&&t.config.series.length>1&&(i+=10);var a=this.getTitleSubtitleCoords("title"),s=this.getTitleSubtitleCoords("subtitle");e.gridHeight=e.gridHeight-a.height-s.height-i,e.translateY=e.translateY+a.height+s.height+i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=10,a=function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1};return t.globals.yLabelsCoords.map(function(s,n){var r=t.config.yaxis[n].floating;s.width>0&&!r?(e=e+s.width+i,a(n)&&(e=e-s.width-i)):e+=r||!t.config.yaxis[n].show?0:5}),t.globals.yTitleCoords.map(function(s,n){var r=t.config.yaxis[n].floating;i=parseInt(t.config.yaxis[n].title.style.fontSize),s.width>0&&!r?(e=e+s.width+i,a(n)&&(e=e-s.width-i)):e+=r||!t.config.yaxis[n].show?0:5}),e}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t=this.w,e=void 0,i=t.globals.timelineLabels.slice().map(function(t){return t.value}),a=i.reduce(function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e},0);return 1.05*(e=new r.default(this.ctx).getTextRects(a,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"getxAxisLabelsCoords",value:function(){var t=this.w,e=t.globals.labels.slice(),i={width:0,height:0};if(t.globals.timelineLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();i={width:a.width,height:a.height}}else{var s="left"!==t.config.legend.position||"right"!==t.config.legend.position||t.config.legend.floating?0:this.lgRect.width,n=e.reduce(function(t,e){return t.length>e.length?t:e},0),l=t.globals.xLabelFormatter;n=new o.default(this.ctx).xLabelFormat(l,n);var h=new r.default(this.ctx),c=h.getTextRects(n,t.config.xaxis.labels.style.fontSize);(i={width:c.width,height:c.height}).width*e.length>t.globals.svgWidth-s-this.yAxisWidth&&0!==t.config.xaxis.labels.rotate?this.isBarHorizontal||(t.globals.rotateXLabels=!0,c=h.getTextRects(n,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate("+t.config.xaxis.labels.rotate+" 0 0)",!1),i.height=c.height/1.66):t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getyAxisLabelsCoords",value:function(){var t=this,e=this.w,i=[],a=10;return e.config.yaxis.map(function(s,n){if(s.show&&s.labels.show&&e.globals.yAxisScale[n].result.length){var o=e.globals.yLabelFormatters[n],l=o(e.globals.yAxisScale[n].niceMax,-1);void 0!==l&&0!==l.length||(l=e.globals.yAxisScale[n].niceMax),t.isBarHorizontal&&(a=0,l=o(l=e.globals.labels.slice().reduce(function(t,e){return t.length>e.length?t:e},0),-1));var h=new r.default(t.ctx).getTextRects(l,s.labels.style.fontSize);i.push({width:h.width+a,height:h.height})}else i.push({width:0,height:0})}),i}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new r.default(this.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=[];return this.w.config.yaxis.map(function(i,a){if(i.show&&void 0!==i.title.text){var s=new r.default(t.ctx).getTextRects(i.title.text,i.title.style.fontSize,i.title.style.fontFamily,"rotate(-90 0 0)",!1);e.push({width:s.width,height:s.height})}else e.push({width:0,height:0})}),e}},{key:"getTitleSubtitleCoords",value:function(t){var e=this.w,i=0,a=0,s="title"===t?e.config.title.floating:e.config.subtitle.floating,n=e.globals.dom.baseEl.querySelector(".apexcharts-"+t+"-text");if(null!==n&&!s){var r=n.getBoundingClientRect();i=r.width,a=e.globals.axisCharts?r.height+5:r.height}return{width:i,height:a}}},{key:"getLegendsRect",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelector(".apexcharts-legend"),i=Object.assign({},l.default.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.lgRect=i:this.lgRect={x:0,y:0,height:0,width:0},this.lgRect}}]),t}();t.exports=c},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i0&&(this.xaxisLabels=i.globals.timelineLabels.slice()),this.drawnLabels=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight+1,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,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.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return n(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new r.default(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate("+t.config.xaxis.offsetX+", "+t.config.xaxis.offsetY+")"}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate("+t.globals.translateXAxisX+", "+t.globals.translateXAxisY+")"});i.add(a);for(var s=void 0,n=t.globals.padHorizontal,o=[],h=0;h0&&(x=t.globals.timelineLabels[f].position,p=t.globals.timelineLabels[f].value),(0===(p=p.toString()).indexOf("NaN")||"undefined"===p||0===p.toLowerCase().indexOf("invalid")||p.toLowerCase().indexOf("infinity")>=0||this.drawnLabels.indexOf(p)>=0&&!t.config.xaxis.labels.showDuplicates)&&(p=""),this.drawnLabels.push(p);var b=28;t.globals.rotateXLabels&&(b=22);var v=e.drawText({x:x,y:this.offY+t.config.xaxis.labels.offsetY+b,text:"",textAnchor:"middle",fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[f]:this.xaxisForeColors,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});a.add(v),e.addTspan(v,p,this.xaxisFontFamily);var m=document.createElementNS(t.globals.svgNS,"title");m.textContent=p,v.node.appendChild(m),n+=s}if(void 0!==t.config.xaxis.title.text){var y=e.group({class:"apexcharts-xaxis-title"}),w=e.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY-parseInt(this.xaxisFontSize)+t.globals.xAxisLabelsHeight+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});y.add(w),i.add(y)}if(t.config.xaxis.axisBorder.show){var k=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(k-=15);var S=e.drawLine(t.globals.padHorizontal+k+t.config.xaxis.axisBorder.offsetX,this.offY,this.xaxisBorderWidth,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);i.add(S)}return i}},{key:"drawXaxisInversed",value:function(t){var e=this.w,i=new r.default(this.ctx),a=i.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),s=i.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g"});a.add(s);for(var n=void 0,l=void 0,h=[],c=0;ci.globals.gridWidth)){var s=this.offY+i.config.xaxis.axisTicks.offsetY,n=s+i.config.xaxis.axisTicks.height;if(i.config.xaxis.axisTicks.show){var o=new r.default(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,s+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,n+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);e.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timelineLabels.length>0)for(var s=0;s0){var f=s[s.length-1].getBBox(),g=s[0].getBBox();f.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),g.x+g.width>t.globals.gridWidth&&s[0].parentNode.removeChild(s[0]);for(var p=0;p=0;f--){var g=i.globals.yAxisScale[e].result[f];g=u(g,f);var p=20;i.config.yaxis[e].opposite&&(p*=-1),0===i.config.yaxis.length&&(p=20);var x=a.drawText({x:p,y:d+h/10+i.config.yaxis[e].labels.offsetY+1,text:g,textAnchor:i.config.yaxis[e].opposite?"start":"end",fontSize:s,fontFamily:r,foreColor:i.config.yaxis[e].labels.style.color,cssClass:"apexcharts-yaxis-label "+i.config.yaxis[e].labels.style.cssClass});l.add(x),d+=c}if(void 0!==i.config.yaxis[e].title.text){var b=a.group({class:"apexcharts-yaxis-title"}),v=0;i.config.yaxis[e].opposite&&(v=i.globals.translateYAxisX[e]);var m=a.drawText({x:v,y:i.globals.gridHeight/2+i.globals.translateY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].title.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,fontFamily:i.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});b.add(m),o.add(b)}var y=i.config.yaxis[e].axisBorder;if(y.show){var w=31+y.offsetX;i.config.yaxis[e].opposite&&(w=-31-y.offsetX);var k=a.drawLine(w,i.globals.translateY+y.offsetY-2,w,i.globals.gridHeight+i.globals.translateY+y.offsetY+2,y.color);o.add(k),this.drawAxisTicks(w,h,y,i.config.yaxis[e].axisTicks,e,c,o)}return o}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new n.default(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate("+e.globals.translateXAxisX+", "+e.globals.translateXAxisY+")"});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,o=e.globals.gridWidth/r+.1,l=o+e.config.xaxis.labels.offsetX,h=e.globals.xLabelFormatter;if(e.config.xaxis.labels.show)for(var c=r;c>=0;c--){var d=e.globals.yAxisScale[t].result[c];d=h(d);var u=i.drawText({x:e.globals.gridWidth+e.globals.padHorizontal-(l-o+e.config.xaxis.labels.offsetX),y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30,text:"",textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});s.add(u),u.tspan(d);var f=document.createElementNS(e.globals.svgNS,"title");f.textContent=d,u.node.appendChild(f),l+=o}if(void 0!==e.config.xaxis.title.text){var g=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),p=i.drawText({x:e.globals.gridWidth/2,y:this.xAxisoffX+parseInt(this.xaxisFontSize)+parseInt(e.config.xaxis.title.style.fontSize)+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});g.add(p),a.add(g)}var x=e.config.yaxis[t].axisBorder;if(x.show){var b=i.drawLine(e.globals.padHorizontal+x.offsetX,1+x.offsetY,e.globals.padHorizontal+x.offsetX,e.globals.gridHeight+x.offsetY,x.color);a.add(b)}return a}},{key:"drawAxisTicks",value:function(t,e,i,a,s,r,o){var l=this.w,h=new n.default(this.ctx),c=l.globals.translateY;if(a.show){!0===l.config.yaxis[s].opposite&&(t+=a.width);for(var d=e;d>=0;d--){var u=c+e/10+l.config.yaxis[s].labels.offsetY-1;this.isBarHorizontal&&(u=r*d);var f=h.drawLine(t+i.offsetX-a.width+a.offsetX,u+a.offsetY,t+i.offsetX+a.offsetX,u+a.offsetY,i.color);o.add(f),c+=r}}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new n.default(this.ctx),s={width:0,height:0},r={width:0,height:0},o=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='"+t+"'] .apexcharts-yaxis-texts-g");null!==o&&(s=o.getBoundingClientRect());var l=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='"+t+"'] .apexcharts-yaxis-title text");if(null!==l&&(r=l.getBoundingClientRect()),null!==l){var h=this.xPaddingForYAxisTitle(t,s,r,e);l.setAttribute("x",h.xPos-(e?10:0))}if(null!==l){var c=a.rotateAroundCenter(l);e?l.setAttribute("transform","rotate(90 "+c.x+" "+c.y+")"):l.setAttribute("transform","rotate(-90 "+c.x+" "+c.y+")")}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,n=0,r=0,o=20;return a?(r=e.width+s.config.yaxis[t].title.offsetX+o+i.width/2-15,0===(n+=1)&&(r-=15)):(r=-1*e.width+s.config.yaxis[t].title.offsetX+o+i.width/2-15,this.isBarHorizontal&&(o=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-o)),{xPos:r,padd:o}}},{key:"setYAxisXPosition",value:function(t,e){var i=this,a=this.w,s=0,n=0,r=0,o=1;this.multipleYs=!1,a.config.yaxis.length>1&&(this.multipleYs=!0),a.config.yaxis.map(function(l,h){var c=t[h].width+e[h].width,d=i.multipleYs&&e[h].width>0?20:8,u=i.xPaddingForYAxisTitle(h,{width:t[h].width},{width:e[h].width},l.opposite);if(a.config.yaxis.length>1?c+=Math.abs(u.padd):void 0===l.title.text?c=c+Math.abs(u.padd)+15:c+=Math.abs(u.padd),l.opposite)n=a.globals.gridWidth+a.globals.translateX+o+30+(a.globals.series.length-a.globals.collapsedSeries.length),a.globals.collapsedSeries.forEach(function(t){t.index===h&&(o-=c)}),o+=c,a.globals.translateYAxisX[h]=n-l.labels.offsetX;else{var f=c+5;a.globals.ignoreYAxisIndexes.indexOf(h)>-1&&(f=0),s=i.multipleYs?a.globals.translateX-c-r+d+parseInt(a.config.yaxis[h].labels.style.fontSize)+l.labels.offsetX:a.globals.translateX-c+t[h].width+l.labels.offsetX,r+=f,a.globals.translateYAxisX[h]=s}})}}]),t}();t.exports=r},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"===e.chart.type&&e.tooltip.shared&&("barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(console.warn('crosshairs.width = "barWidth" is only supported in single series, not in a multi-series barChart'),e.xaxis.crosshairs.width="tickWidth"),e.plotOptions.bar.horizontal&&(e.states.hover.type="none"),e.tooltip.followCursor||(console.warn("followCursor option in shared columns cannot be turned off"),e.tooltip.followCursor=!0)),Array.isArray(e.stroke.width)&&"line"!==e.chart.type&&"area"!==e.chart.type&&(console.warn("stroke.width option accepts array only for line and area charts. Reverted back to Number"),e.stroke.width=e.stroke.width[0]),e}}]),t}();t.exports=c},function(t,e,i){function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=this.w.globals.locale,o=["\0"].concat(a(r.months)),l=[""].concat(a(r.shortMonths)),h=[""].concat(a(r.days)),c=[""].concat(a(r.shortDays));n&&(t=this.treatAsUtc(t));var d=s?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+d)).replace(/(^|[^\\])yy/g,"$1"+d.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+d);var u=(s?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+o[0])).replace(/(^|[^\\])MMM/g,"$1"+l[0])).replace(/(^|[^\\])MM/g,"$1"+i(u))).replace(/(^|[^\\])M/g,"$1"+u);var f=s?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+h[0])).replace(/(^|[^\\])ddd/g,"$1"+c[0])).replace(/(^|[^\\])dd/g,"$1"+i(f))).replace(/(^|[^\\])d/g,"$1"+f);var g=s?t.getUTCHours():t.getHours();e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+i(g))).replace(/(^|[^\\])H/g,"$1"+g);var p=g>12?g-12:0===g?12:g;e=(e=e.replace(/(^|[^\\])hh+/g,"$1"+i(p))).replace(/(^|[^\\])h/g,"$1"+p);var x=s?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+i(x))).replace(/(^|[^\\])m/g,"$1"+x);var b=s?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+i(b))).replace(/(^|[^\\])s/g,"$1"+b);var v=s?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+i(v,3)),v=Math.round(v/10),e=e.replace(/(^|[^\\])ff/g,"$1"+i(v)),v=Math.round(v/10),e=e.replace(/(^|[^\\])f/g,"$1"+v);var m=g<12?"AM":"PM";e=(e=e.replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var y=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+y)).replace(/(^|[^\\])t/g,"$1"+y.charAt(0));var w=-t.getTimezoneOffset(),k=s||!w?"Z":w>0?"+":"-";if(!s){var S=(w=Math.abs(w))%60;k+=i(Math.floor(w/60))+":"+i(S)}e=e.replace(/(^|[^\\])K/g,"$1"+k);var A=(s?t.getUTCDay():t.getDay())+1;return e=e.replace(new RegExp(h[0],"g"),h[A]),e=e.replace(new RegExp(c[0],"g"),c[A]),e=e.replace(new RegExp(o[0],"g"),o[u]),e=e.replace(new RegExp(l[0],"g"),l[u]),e=e.replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var a=new Date(t).getFullYear(),s=new Date(e).getFullYear(),n=new Date(t).getMonth(),r=new Date(e).getMonth(),o=new Date(t).getDate(),l=new Date(e).getDate(),h=new Date(t).getHours(),c=new Date(e).getHours();return{minMinute:new Date(t).getMinutes(),maxMinute:new Date(e).getMinutes(),minHour:h,maxHour:c,minDate:o,maxDate:l,minMonth:n,maxMonth:r,minYear:a,maxYear:s}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=new r.default(this.ctx).monthMod(t),!0){case this.months30.includes(t):2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.includes(t):default:i=31}return i}}]),t}();e.default=o},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;ithis.fullAngle?e.endAngle=e.endAngle-(s+o):s+o360&&(h=360);var c=Math.PI*(h-90)/180,d=e.centerX+s*Math.cos(l),u=e.centerY+s*Math.sin(l),f=e.centerX+s*Math.cos(c),g=e.centerY+s*Math.sin(c),p=o.default.polarToCartesian(e.centerX,e.centerY,e.donutSize,h),x=o.default.polarToCartesian(e.centerX,e.centerY,e.donutSize,r),b=a>180?1:0;return"donut"===n.config.chart.type?["M",d,u,"A",s,s,0,b,1,f,g,"L",p.x,p.y,"A",e.donutSize,e.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"].join(" "):"pie"===n.config.chart.type?["M",d,u,"A",s,s,0,b,1,f,g,"L",e.centerX,e.centerY,"L",d,u].join(" "):["M",d,u,"A",s,s,0,b,1,f,g].join(" ")}},{key:"renderInnerDataLabels",value:function(t,e){var i=this.w,a=new l.default(this.ctx),s=a.group({class:"apexcharts-datalabels-group",transform:"translate("+(e.translateX?e.translateX:0)+", "+(e.translateY?e.translateY:0)+")"}),n=t.total.show;s.node.style.opacity=e.opacity;var r=e.centerX,o=e.centerY,h=void 0,c=void 0;h=void 0===t.name.color?i.globals.colors[0]:t.name.color,c=void 0===t.value.color?i.config.chart.foreColor:t.value.color;var d=t.value.formatter,u="",f="";if(n?(h=t.total.color,f=t.total.label,u=t.total.formatter(i)):1===i.globals.series.length&&(u=d(i.globals.series[0],i),f=i.globals.seriesNames[0]),t.name.show){var g=a.drawText({x:r,y:o+parseInt(t.name.offsetY),text:f,textAnchor:"middle",foreColor:h,fontSize:t.name.fontSize,fontFamily:t.name.fontFamily});g.node.classList.add("apexcharts-datalabel-label"),s.add(g)}if(t.value.show){var p=t.name.show?parseInt(t.value.offsetY)+16:t.value.offsetY,x=a.drawText({x:r,y:o+p,text:u,textAnchor:"middle",foreColor:c,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});x.node.classList.add("apexcharts-datalabel-value"),s.add(x)}return s}},{key:"printInnerLabels",value:function(t,e,i,a){var s=this.w,n=void 0;a?n=void 0===t.name.color?s.globals.colors[parseInt(a.parentNode.getAttribute("rel"))-1]:t.name.color:s.globals.series.length>1&&t.total.show&&(n=t.total.color);var r=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,s),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(s)),null!==r&&(r.textContent=e),null!==o&&(o.textContent=i),null!==r&&(r.style.fill=n)}},{key:"dataLabelsMouseIn",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"))-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var n=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==n&&(n.style.opacity=1)}},{key:"dataLabelsMouseout",value:function(e,i){var a=this.w,s=a.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");i.total.show&&a.globals.series.length>1?new t(this.ctx).printInnerLabels(i,i.total.label,i.total.formatter(a)):null!==s&&a.globals.series.length>1&&(s.style.opacity=0)}}]),t}();e.default=c},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MIN_SAFE_INTEGER,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w.globals,r=-Number.MAX_VALUE,l=Number.MIN_VALUE;null===a&&(a=t+1);var h=n.series,c=h,d=h;"candlestick"===this.w.config.chart.type&&(c=n.seriesCandleL,d=n.seriesCandleH);for(var u=t;uc[u][f]&&c[u][f]<0&&(l=c[u][f])):n.hasNullValues=!0}return{minY:l,maxY:r,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i=e.yaxis,a=Number.MAX_VALUE;if(t.isMultipleYAxis)for(var s=0;s0?d=d+parseInt(t.series[f][c])+1e-4:u+=parseInt(t.series[f][c])),f===t.series.length-1&&(l.push(d),h.push(u));for(var g=0;g=0&&a<=10&&(p=0),t.minY=a-5*p/100,(a>0&&t.maxY<50||a>0&&t.minY<0)&&(t.minY=0),t.maxY>10&&(t.maxY=t.maxY+5*p/100+.6)}e.yaxis.map(function(e,a){void 0!==e.max&&"number"==typeof e.max&&(t.maxYArr[a]=e.max,t.maxY=i[0].max),void 0!==e.min&&"number"==typeof e.min&&(t.minYArr[a]=e.min,t.minY=i[0].min)}),t.isMultipleYAxis?(this.scales.setMultipleYScales(),t.yAxisScale.forEach(function(e,i){t.minYArr[i]=e.niceMin,t.maxYArr[i]=e.niceMax})):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.yAxisScale[0].niceMin,t.maxYArr[0]=t.yAxisScale[0].niceMax)}},{key:"setXRange",value:function(){var t=this.w.globals,e=this.w.config;if(t.isXNumeric)for(var i=0;it.dataPoints&&0!==t.dataPoints&&(r=t.dataPoints-1)):r="dataPoints"===e.xaxis.tickAmount?t.series[t.maxValsInArrayIndex].length-1:e.xaxis.tickAmount,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE?t.xAxisScale=this.scales.linearScale(t.minX,t.maxX,r):(t.xAxisScale=this.scales.linearScale(1,r,r),t.noLabelsProvided&&t.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,r-1),t.seriesX=t.labels.slice())),("numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided)&&(t.labels=t.xAxisScale.result.slice())}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e5e4&&(a.globals.disableZoomOut=!0);var l=s.getTimeUnitsfromTimestamp(t,e),h=a.globals.gridWidth/r,c=h/24,d=c/60,u=Math.floor(24*r),f=Math.floor(24*r*60),g=Math.floor(r),p=Math.floor(r/30),x=Math.floor(r/365),b={minMinute:l.minMinute,minHour:l.minHour,minDate:l.minDate,minMonth:l.minMonth,minYear:l.minYear},v={firstVal:b,currentMinute:b.minMinute,currentHour:b.minHour,currentMonthDate:b.minDate,currentDate:b.minDate,currentMonth:b.minMonth,currentYear:b.minYear,daysWidthOnXAxis:h,hoursWidthOnXAxis:c,minutesWidthOnXAxis:d,numberOfMinutes:f,numberOfHours:u,numberOfDays:g,numberOfMonths:p,numberOfYears:x};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":this.generateMinuteScale(v)}var m=this.timeScaleArray.map(function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?n({},e,{value:t.value+1}):"day"===t.unit||"hour"===t.unit?n({},e,{value:t.value}):"minute"===t.unit?n({},e,{value:t.value,minute:t.value}):t});return m.filter(function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),n=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),m.length>s&&(e=Math.floor(m.length/s));var r=!1,o=!1;switch(i.tickInterval){case"half_year":e=7,"year"===t.unit&&(r=!0);break;case"months":e=1,"year"===t.unit&&(r=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(r=!0),30===n&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(r=!0),30===n&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(r=!0);break;case"days":e=1,"month"===t.unit&&(r=!0);break;case"hours":"day"===t.unit&&(r=!0);break;case"minutes":n%5!=0&&(o=!0)}if("minutes"===i.tickInterval||"hours"===i.tickInterval){if(!o)return!0}else if((n%e==0||r)&&!o)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(t){var e=this.w,i=this.formatDates(t),a=this.removeOverlappingTS(i);e.globals.timelineLabels=a.slice(),new l.default(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){switch(!0){case t>1825:this.tickInterval="years";break;case t>800&&t<=1825:this.tickInterval="half_year";break;case t>180&&t<=800:this.tickInterval="months";break;case t>90&&t<=180:this.tickInterval="months_fortnight";break;case t>60&&t<=90:this.tickInterval="months_days";break;case t>30&&t<=60:this.tickInterval="week_days";break;case t>2&&t<=30:this.tickInterval="days";break;case t>.1&&t<=2:this.tickInterval="hours";break;case t<.1:this.tickInterval="minutes";break;default:this.tickInterval="days"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,n=t.numberOfYears,r=e.minYear,l=0,h=new o.default(this.ctx);if(e.minDate>1&&e.minMonth>0){var c=h.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);l=(h.determineDaysOfYear(e.minYear)-c+1)*s,r=e.minYear+1,this.timeScaleArray.push({position:l,value:r,unit:"year",year:r,month:this.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:l,value:r,unit:"year",year:a,month:this.monthMod(i+1)});for(var d=r,u=l,f=0;f1){h=(c.determineDaysOfMonths(a+1,e.minYear)-i+1)*n,l=this.monthMod(a+1);var f=s+u,g=this.monthMod(l),p=l;0===l&&(d="year",p=f,g=1,f+=u+=1),this.timeScaleArray.push({position:h,value:p,unit:d,year:f,month:g})}else this.timeScaleArray.push({position:h,value:l,unit:d,year:s,month:this.monthMod(a)});for(var x=l+1,b=h,v=0,m=1;vr.determineDaysOfMonths(e+1,i)?(e+=1,f=1,l="month",d=e,e):e},f=c,g=u(f,i,a);this.timeScaleArray.push({position:h,value:d,unit:l,year:a,month:this.monthMod(g),day:f});for(var p=h,x=0;xl.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-e.minMinute,u=d*n,f=e.minHour+1,g=f+1;60===d&&(u=0,g=(f=e.minHour)+1);var p=i,x=c(p,a);this.timeScaleArray.push({position:u,value:f,unit:h,day:p,hour:g,year:s,month:this.monthMod(x)});for(var b=u,v=0;v=24){g=0,h="day";var m=function(t,e){return t>l.determineDaysOfMonths(e+1,s)&&(p=1,e+=1),{month:e,date:p}}(p+=1,x);x=m.month,x=c(p,x)}var y=s+Math.floor(x/12)+0;b=0===g&&0===v?d*n:60*n+b;var w=0===g?p:g;this.timeScaleArray.push({position:b,value:w,unit:h,hour:g,day:p,year:y,month:this.monthMod(x)}),g++}}},{key:"generateMinuteScale",value:function(t){var e=t.firstVal,i=t.currentMinute,a=t.currentHour,s=t.currentDate,n=t.currentMonth,r=t.currentYear,o=t.minutesWidthOnXAxis,l=t.numberOfMinutes,h=o-(i-e.minMinute),c=e.minMinute+1,d=c+1,u=s,f=n,g=r,p=a;this.timeScaleArray.push({position:h,value:c,unit:"minute",day:u,hour:p,minute:d,year:g,month:this.monthMod(f)});for(var x=h,b=0;b=60&&(d=0,24===(p+=1)&&(p=0));var v=r+Math.floor(f/12)+0;x=o+x;var m=d;this.timeScaleArray.push({position:x,value:m,unit:"minute",hour:p,minute:d,day:u,year:v,month:this.monthMod(f)}),d++}}},{key:"createRawDateString",value:function(t,e){var i=t.year;return i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),i+="minute"===t.unit?":"+("0"+e).slice(-2)+":00.000Z":":00:00.000Z"}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map(function(t){var a=t.value.toString(),s=new o.default(e.ctx),n=e.createRawDateString(t,a),r=new Date(Date.parse(n));if(void 0===i.config.xaxis.labels.format){var l="dd MMM",h=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(l=h.year),"month"===t.unit&&(l=h.month),"day"===t.unit&&(l=h.day),"hour"===t.unit&&(l=h.hour),"minute"===t.unit&&(l=h.minute),a=s.formatDate(r,l,!0,!1)}else a=s.formatDate(r,i.config.xaxis.labels.format);return{dateString:n,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}})}},{key:"removeOverlappingTS",value:function(t){var e=this,i=new h.default(this.ctx),a=0,s=t.map(function(s,n){if(n>0&&e.w.config.xaxis.labels.hideOverlappingLabels){var r=i.getTextRects(t[a].value).width,o=t[a].position;return s.position>o+r+10?(a=n,s):null}return s});return s=s.filter(function(t){return null!==t})}},{key:"monthMod",value:function(t){return t%12}}]),t}();e.default=c},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),n=t-i.xcrosshairsWidth/2,r=a.globals.labels.slice().length;if(null!==e&&(n=a.globals.gridWidth/r*e),"tickWidth"===a.config.xaxis.crosshairs.width||"barWidth"===a.config.xaxis.crosshairs.width?n+i.xcrosshairsWidth>a.globals.gridWidth&&(n=a.globals.gridWidth-i.xcrosshairsWidth):null!==e&&(n+=a.globals.gridWidth/r/2),n<0&&(n=0),n>a.globals.gridWidth&&(n=a.globals.gridWidth),null!==s&&(s.setAttribute("x",n),s.classList.add("active")),i.blxaxisTooltip){var o=n;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=n+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&(r.default.setAttrs(e.ycrosshairs,{y1:t,y2:t}),r.default.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t}))}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip){i.xaxisTooltip.classList.add("active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s=0;s=new r.default(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1")),s=e.globals.translateY+a,n=i.yaxisTTEls[t].getBoundingClientRect().height,r=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(r-=26),s-=n/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=r+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,n=s.getElTooltip(),r=s.tooltipRect,o=null!==i?parseInt(i):1,l=parseInt(t)+o+5,h=parseInt(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-r.ttWidth-o-15),l>a.globals.gridWidth-r.ttWidth-10&&(l=a.globals.gridWidth-r.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();h=s.e.clientY-c.top-r.ttHeight/2}var d=this.positionChecks(r,l,h);l=d.x,h=d.y,isNaN(l)||(l+=a.globals.translateX,n.style.left=l+"px",n.style.top=h+"px")}},{key:"positionChecks",value:function(t,e,i){var a=this.w;return t.ttHeight+i>a.globals.gridHeight&&(i=a.globals.gridHeight-t.ttHeight+a.globals.translateY),i<0&&(i=0),{x:e,y:i}}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='"+t+"'] .apexcharts-marker"),n=0;nr.globals.gridWidth||d>r.globals.gridHeight?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var u=Math.round(c/l);n&&(u=Math.ceil(c/l),u-=1);for(var f=null,g=null,p=[],x=[],b=0;b1?s=this.getFirstActiveXArray(i):n=0;var o=a[s][0],l=i[s][0],h=Math.abs(t-l),c=Math.abs(e-o),d=c+h;return a.map(function(s,o){s.map(function(s,l){var u=Math.abs(e-a[o][l]),f=Math.abs(t-i[o][l]),g=f+u;g0?e:-1}),a=0;a0)for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:{},i=this.w;this.initModules();var a=this.w.globals;if(a.noData=!1,this.responsive.checkResponsiveConfig(e),null===this.el)return null;this.core.setupElements(),this.coreUtils.checkComboSeries(),(0===t.length||1===t.length&&t[0].data&&0===t[0].data.length)&&this.series.handleNoData(),this.setupEventHandlers(),this.core.parseData(t),this.theme.init(),new y.default(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),this.legend.init(),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters(),this.dimensions.plotCoords();var s=this.core.xySettings();this.grid.createGridMask();var n=this.core.plotChartType(t,s);this.core.shiftGraphPosition();var r={plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}};return{elGraph:n,xyRatios:s,elInner:i.globals.dom.elGraphical,dimensions:r}}},{key:"mount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this,i=e.w;return new Promise(function(a,s){if(null===e.el)return s(new Error("Not enough data to display or target element not found"));if((null===t||i.globals.allSeriesCollapsed)&&e.series.handleNoData(),e.core.drawAxis(i.config.chart.type,t.xyRatios),e.grid=new v.default(e),"back"===i.config.grid.position&&e.grid.drawGrid(),"back"===i.config.annotations.position&&e.annotations.drawAnnotations(),t.elGraph instanceof Array)for(var n=0;n0){var o=!0,l=!1,h=void 0;try{for(var c,d=i.globals.memory.methodsToExec[Symbol.iterator]();!(o=(c=d.next()).done);o=!0){var u=c.value;u.method(u.params,!1,u.context)}}catch(t){l=!0,h=t}finally{try{!o&&d.return&&d.return()}finally{if(l)throw h}}}a(e)})}},{key:"clearPreviousPaths",value:function(){var t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1,t.globals.collapsedSeries=[],t.globals.collapsedSeriesIndices=[]}},{key:"updateOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=this.w;return t.series&&(t.series[0].data&&(t.series=t.series.map(function(t,e){return r({},s.config.series[e],{name:t.name?t.name:s.config.series[e].name,data:t.data})})),this.revertDefaultAxisMinMax()),t.xaxis&&(t.xaxis.min||t.xaxis.max)&&this.forceXAxisUpdate(t),s.globals.collapsedSeriesIndices.length>0&&this.clearPreviousPaths(),this._updateOptions(t,e,i,a)}},{key:"_updateOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.getSyncedCharts().forEach(function(s){var r=s.w;return r.globals.shouldAnimate=i,e||(r.globals.resized=!0,r.globals.dataChanged=!0,i&&s.series.getPreviousPaths()),t&&"object"===(void 0===t?"undefined":n(t))&&(s.config=new d.default(t),t=f.default.extendArrayProps(s.config,t),r.config=M.default.extend(r.config,t),a&&(r.globals.lastXAxis=[],r.globals.lastYAxis=[],r.globals.initialConfig=M.default.extend({},r.config),r.globals.initialSeries=JSON.parse(JSON.stringify(r.config.series)))),s.update(t)})}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.revertDefaultAxisMinMax(),this._updateSeries(t,e,i)}},{key:"_updateSeries",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this.w;this.w.globals.shouldAnimate=e,a.globals.dataChanged=!0,a.globals.allSeriesCollapsed&&(a.globals.allSeriesCollapsed=!1),e&&this.series.getPreviousPaths();var s=void 0;return t[0].data?(s=t.map(function(t,e){return r({},a.config.series[e],{name:t.name?t.name:a.config.series[e].name,data:t.data})}),a.config.series=s):a.config.series=t.slice(),i&&(a.globals.initialConfig.series=JSON.parse(JSON.stringify(a.config.series)),a.globals.initialSeries=JSON.parse(JSON.stringify(a.config.series))),this.update()}},{key:"getSyncedCharts",value:function(){var t=this.getGroupedCharts(),e=[this];return t.length&&(e=[],t.forEach(function(t){e.push(t)})),e}},{key:"getGroupedCharts",value:function(){var t=this;return Apex._chartInstances.filter(function(t){if(t.group)return!0}).map(function(e){return t.w.config.chart.group===e.group?e.chart:null})}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"addText",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addText(t,e,a)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new w.default(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new w.default(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"setLocale",value:function(t){this.setCurrentLocaleValues(t)}},{key:"setCurrentLocaleValues",value:function(t){var e=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.find(function(e){return e.name===t});if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=M.default.extend(z,i);this.w.globals.locale=a.options}},{key:"svgUrl",value:function(){return new b.default(this.ctx).svgUrl()}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.update()},150)}}],[{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?a-2:0),n=2;n0&&(this.totalItems+=t[n].length);this.zeroSerieses=[],this.endingShapeOnSeriesNumber=t.length-1,this.checkZeroSeries({series:t});var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});r.attr("clip-path","url(#gridRectMask"+a.globals.cuid+")");for(var o=0,u=0,f=0,g=0;f1&&(i.yaxisIndex=b);var v=i.graphics.group({class:"apexcharts-series "+a.globals.seriesNames[b].toString().replace(/ /g,"-"),rel:s+1,"data:realIndex":b}),m=i.graphics.group({class:"apexcharts-datalabels"}),y=0,w=0,k=0,S=i.initialPositions(o,u,c,d,f,g);u=S.y,w=S.barHeight,d=S.yDivision,g=S.zeroW,o=S.x,k=S.barWidth,c=S.xDivision,f=S.zeroH,i.yArrj=[],i.yArrjF=[],i.yArrjVal=[],i.xArrj=[],i.xArrjF=[],i.xArrjVal=[];for(var A=0;A0&&i.barOptions.colors.ranges.map(function(i,a){t[s][e]>=i.from&&t[s][e]<=i.to&&(A=i.color)});var C=i.fill.fillPath(v,{seriesNumber:S,color:A});v=i.renderSeries({realIndex:b,pathFill:C,j:e,i:s,pathFrom:h,pathTo:l,strokeWidth:y,elSeries:v,x:o,y:u,series:t,barHeight:w,barWidth:k,elDataLabelsWrap:m,type:"bar",visibleSeries:0})}(A);a.globals.seriesXvalues[b]=p,a.globals.seriesYvalues[b]=x,i.prevY.push(i.yArrj),i.prevYF.push(i.yArrjF),i.prevYVal.push(i.yArrjVal),i.prevX.push(i.xArrj),i.prevXF.push(i.xArrjF),i.prevXVal.push(i.xArrjVal),r.add(v)}(f,g);return r}},{key:"initialPositions",value:function(t,e,i,a,s,n){var r=this.w,o=void 0,l=void 0;return this.isHorizontal?(o=(o=a=r.globals.gridHeight/r.globals.dataPoints)*parseInt(r.config.plotOptions.bar.barHeight)/100,n=this.baseLineInvertedY+r.globals.padHorizontal,e=(a-o)/2):(l=i=r.globals.gridWidth/r.globals.dataPoints,l=r.globals.isXNumeric?(i=r.globals.gridWidth/(this.totalItems/r.globals.series.length))/1.8:l*parseInt(r.config.plotOptions.bar.columnWidth)/100,s=this.baseLineY[this.yaxisIndex]+1,t=r.globals.padHorizontal+(i-l)/2),{x:t,y:e,yDivision:a,xDivision:i,barHeight:o,barWidth:l,zeroH:s,zeroW:n}}},{key:"drawBarPaths",value:function(t){for(var e=t.indexes,i=t.barHeight,a=t.strokeWidth,s=t.pathTo,n=t.pathFrom,r=t.zeroW,o=t.x,l=t.y,h=t.yDivision,c=t.elSeries,d=this.w,u=l,f=void 0,g=e.i,p=e.j,x=e.realIndex,b=e.bc,v=0,m=0;m0){var y=r;this.prevXVal[g-1][p]<0?y=this.series[g][p]>=0?this.prevX[g-1][p]+v:this.prevX[g-1][p]:this.prevXVal[g-1][p]>=0&&(y=this.series[g][p]>=0?this.prevX[g-1][p]:this.prevX[g-1][p]-v),f=y}else f=r;o=null===this.series[g][p]?f:f+this.series[g][p]/this.invertedYRatio;var w={barHeight:i,strokeWidth:a,invertedYRatio:this.invertedYRatio,barYPosition:u,x:o},k=this.bar.barEndingShape(d,w,this.series,g,p);if(this.series.length>1&&g!==this.endingShapeOnSeriesNumber&&(k.path=this.graphics.line(k.newX,u+i-a)),this.xArrj.push(k.newX),this.xArrjF.push(Math.abs(f-k.newX)),this.xArrjVal.push(this.series[g][p]),s=this.graphics.move(f,u),n=this.graphics.move(f,u),d.globals.previousPaths.length>0&&(n=this.bar.getPathFrom(x,p,!1)),s=s+this.graphics.line(k.newX,u)+k.path+this.graphics.line(f,u+i-a)+this.graphics.line(f,u),n=n+this.graphics.line(f,u)+this.graphics.line(f,u+i-a)+this.graphics.line(f,u+i-a)+this.graphics.line(f,u+i-a)+this.graphics.line(f,u),d.config.plotOptions.bar.colors.backgroundBarColors.length>0&&0===g){b>=d.config.plotOptions.bar.colors.backgroundBarColors.length&&(b=0);var S=d.config.plotOptions.bar.colors.backgroundBarColors[b],A=this.graphics.drawRect(0,u,d.globals.gridWidth,i,0,S,d.config.plotOptions.bar.colors.backgroundBarOpacity);c.add(A),A.node.classList.add("apexcharts-backgroundBar")}return l+=h,{pathTo:s,pathFrom:n,x:o,y:l}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,n=t.pathTo,r=t.pathFrom,o=t.barWidth,l=t.zeroH,h=t.strokeWidth,c=t.elSeries,d=this.w,u=e.i,f=e.j,g=e.realIndex,p=e.bc;if(d.globals.isXNumeric){var x=d.globals.seriesX[u][f];x||(x=0),i=(x-d.globals.minX)/this.xRatio-o/2}for(var b=i,v=void 0,m=0,y=0;y0){var w=this.prevY[u-1][f];v=this.prevYVal[u-1][f]<0?this.series[u][f]>=0?w-m:w:this.series[u][f]>=0?w:w+m}else v=d.globals.gridHeight-l;a=(this.series[u][f],v-this.series[u][f]/this.yRatio[this.yaxisIndex]);var k={barWidth:o,strokeWidth:h,yRatio:this.yRatio[this.yaxisIndex],barXPosition:b,y:a},S=this.bar.barEndingShape(d,k,this.series,u,f);if(this.series.length>1&&u!==this.endingShapeOnSeriesNumber&&(S.path=this.graphics.line(b+o-h,S.newY)),this.yArrj.push(S.newY),this.yArrjF.push(Math.abs(v-S.newY)),this.yArrjVal.push(this.series[u][f]),n=this.graphics.move(b,v),r=this.graphics.move(b,v),d.globals.previousPaths.length>0&&(r=this.bar.getPathFrom(g,f,!1)),n=n+this.graphics.line(b,S.newY)+S.path+this.graphics.line(b+o-h,v)+this.graphics.line(b,v),r=r+this.graphics.line(b,v)+this.graphics.line(b+o-h,v)+this.graphics.line(b+o-h,v)+this.graphics.line(b+o-h,v)+this.graphics.line(b,v),d.config.plotOptions.bar.colors.backgroundBarColors.length>0&&0===u){p>=d.config.plotOptions.bar.colors.backgroundBarColors.length&&(p=0);var A=d.config.plotOptions.bar.colors.backgroundBarColors[p],C=this.graphics.drawRect(b,0,o,d.globals.gridHeight,0,A,d.config.plotOptions.bar.colors.backgroundBarOpacity);c.add(C),C.node.classList.add("apexcharts-backgroundBar")}return i+=s,{pathTo:n,pathFrom:r,x:d.globals.isXNumeric?i-s:i,y:a}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a=0;r--)this.zeroSerieses.indexOf(r)>-1&&r===this.endingShapeOnSeriesNumber&&(this.endingShapeOnSeriesNumber-=1)}}]),e}(h.default);e.default=u},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i0&&(this.visibleI=this.visibleI+1);var k=0,S=0,A=0;this.yRatio.length>1&&(this.yaxisIndex=y);var C=this.initialPositions();p=C.y,S=C.barHeight,g=C.x,A=C.barWidth,x=C.xDivision,b=C.zeroH,m.push(g+A/2);for(var M=a.group({class:"apexcharts-datalabels"}),P=0,L=i.globals.dataPoints;P0&&m.push(g+A/2),v.push(p);var z=s.fillPath(w,{seriesNumber:y,color:E}),X=this.candlestickOptions.wick.useFillColor?E:void 0;w=this.renderSeries({realIndex:y,pathFill:z,lineFill:X,j:P,i:o,pathFrom:f,pathTo:u,strokeWidth:k,elSeries:w,x:g,y:p,series:t,barHeight:S,barWidth:A,elDataLabelsWrap:M,visibleSeries:this.visibleI,type:"candlestick"})}i.globals.seriesXvalues[y]=m,i.globals.seriesYvalues[y]=v,r.add(w)}return r}},{key:"drawCandleStickPaths",value:function(t){var e=t.indexes,i=t.x,a=(t.y,t.xDivision),s=t.pathTo,n=t.pathFrom,r=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=this.w,c=new d.default(this.ctx),u=e.i,f=e.j,g=!0,p=h.config.plotOptions.candlestick.colors.upward,x=h.config.plotOptions.candlestick.colors.downward,b=this.yRatio[this.yaxisIndex],v=e.realIndex,m=this.getOHLCValue(v,f),y=o,w=o;m.o>m.c&&(g=!1);var k=Math.min(m.o,m.c),S=Math.max(m.o,m.c);h.globals.isXNumeric&&(i=(h.globals.seriesX[u][f]-h.globals.minX)/this.xRatio-r/2);var A=i+r*this.visibleI;return s=c.move(A,o),n=c.move(A,o),h.globals.previousPaths.length>0&&(n=this.getPathFrom(v,f,!0)),void 0===this.series[u][f]||null===this.series[u][f]?k=o:(k=o-k/b,S=o-S/b,y=o-m.h/b,w=o-m.l/b),s=c.move(A,S)+c.line(A+r/2,S)+c.line(A+r/2,y)+c.line(A+r/2,S)+c.line(A+r,S)+c.line(A+r,k)+c.line(A+r/2,k)+c.line(A+r/2,w)+c.line(A+r/2,k)+c.line(A,k)+c.line(A,S-l/2),h.globals.isXNumeric||(i+=a),{pathTo:s,pathFrom:n,x:i,y:S,barXPosition:A,color:g?p:x}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:i.globals.seriesCandleO[t][e],h:i.globals.seriesCandleH[t][e],l:i.globals.seriesCandleL[t][e],c:i.globals.seriesCandleC[t][e]}}}]),e}(h.default);e.default=u},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e=0;o--){var l=i.group({class:"apexcharts-series apexcharts-heatmap-series "+e.globals.seriesNames[o].toString().replace(/ /g,"-"),rel:o+1,"data:realIndex":o});if(e.config.chart.dropShadow.enabled){var u=e.config.chart.dropShadow;new d.default(this.ctx).dropShadow(l,u)}for(var f=0,g=0;gi.globals.maxY?n.colorScale.max:i.globals.maxY);var c=Math.abs(h)+Math.abs(l),d=100*a/(0===c?c-1e-6:c);return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(function(t,e){a>=t.from&&a<=t.to&&(o=t.color,l=t.from,h=t.to,c=Math.abs(h)+Math.abs(l),d=100*a/c)}),{color:o,percent:d}}},{key:"calculateHeatmapDataLabels",value:function(t){var e=t.x,i=t.y,a=t.i,s=t.j,n=(t.series,t.rectHeight),r=t.rectWidth,l=this.w,c=l.config.dataLabels,d=new h.default(this.ctx),u=new o.default(this.ctx),f=c.formatter,g=null;if(c.enabled){g=d.group({class:"apexcharts-data-labels"});var p=c.offsetX,x=c.offsetY,b=e+r/2+p,v=i+n/2+parseInt(c.style.fontSize)/3+x,m=f(l.globals.series[a][s],{seriesIndex:a,dataPointIndex:s,w:l});u.plotDataLabelsText(b,v,m,a,s,g,c)}return g}},{key:"animateHeatMap",value:function(t,e,i,a,s,n){new l.default(this.ctx).animateRect(t,{x:e+a/2,y:i+s/2,width:0,height:0},{x:e,y:i,width:a,height:s},n)}},{key:"animateHeatColor",value:function(t,e,i,a){t.attr({fill:e}).animate(a).attr({fill:i})}}]),t}();t.exports=u},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(t){for(var e=1;e1&&(this.yaxisIndex=C);var M=[],P=[],L=a.globals.gridHeight-m[this.yaxisIndex],E=L;L>a.globals.gridHeight&&(E=a.globals.gridHeight),k=A/2;var T=a.globals.padHorizontal+k,z=1;a.globals.isXNumeric&&(T=(a.globals.seriesX[C][0]-a.globals.minX)/v),P.push(T);var X=void 0,Y=void 0,O=void 0,I=void 0,F=[],D=[],N=s.group({class:"apexcharts-series "+a.globals.seriesNames[C].toString().replace(/ /g,"-")}),R=s.group({class:"apexcharts-series-markers-wrap"}),W=s.group({class:"apexcharts-datalabels"});this.ctx.series.addCollapsedClassToSeries(N,C);var H=t[S].length===a.globals.dataPoints;N.attr({"data:longestSeries":H,rel:S+1,"data:realIndex":C}),this.appendPathFrom=!0;var B=T,_=void 0,V=B,G=L,j=0;if(G=this.determineFirstPrevY({i:S,series:t,yRatio:x[this.yaxisIndex],zeroY:L,prevY:G,prevSeriesY:w,lineYPosition:j}).prevY,M.push(G),_=G,null===t[S][0]){for(var U=0;U0){var q=this.checkPreviousPaths({pathFromLine:O,pathFromArea:I,realIndex:C});O=q.pathFromLine,I=q.pathFromArea}for(var Z=a.globals.dataPoints>1?a.globals.dataPoints-1:a.globals.dataPoints,$=0;$0&&a.globals.collapsedSeries.length1&&R.node.classList.add("hidden");var et=tt.plotChartMarkers(K,C,$+1);null!==et&&R.add(et)}var it=new c.default(this.ctx).drawDataLabel(K,C,$+1);null!==it&&W.add(it)}w.push(M),a.globals.seriesXvalues[C]=P,a.globals.seriesYvalues[C]=M,this.pointsChart||a.globals.delayedElements.push({el:R.node,index:C});var at={i:S,realIndex:C,animationDelay:S,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-"+u,id:"apexcharts-"+u};if(a.config.stroke.show&&!this.pointsChart){var st=null;st="line"===u?r.fillPath(N,{seriesNumber:C,i:S}):a.globals.stroke.colors[C];for(var nt=0;nt0;ct--)g.add(y[ct-1]);return g}},{key:"createPaths",value:function(t){var e=t.series,i=t.i,a=t.j,s=t.x,n=t.y,r=t.pX,o=t.pY,h=t.xDivision,c=t.areaBottomY,d=t.linePath,u=t.areaPath,f=t.linePaths,g=t.areaPaths,p=this.w,x=new l.default(this.ctx),b=Array.isArray(p.config.stroke.curve)?p.config.stroke.curve[i]:p.config.stroke.curve;if("smooth"===b){var v=.35*(s-r);p.globals.hasNullValues?(null!==e[i][a]&&(null!==e[i][a+1]?(d=x.move(r,o)+x.curve(r+v,o,s-v,n,s+1,n),u=x.move(r+1,o)+x.curve(r+v,o,s-v,n,s+1,n)+x.line(s,c)+x.line(r,c)+"z"):(d=x.move(r,o),u=x.move(r,o)+"z")),f.push(d),g.push(u)):(d+=x.curve(r+v,o,s-v,n,s,n),u+=x.curve(r+v,o,s-v,n,s,n)),r=s,o=n,a===e[i].length-2&&(u=u+x.curve(r+v,o,s,n,s,c)+x.move(s,n)+"z",p.globals.hasNullValues||(f.push(d),g.push(u)))}else null===e[i][a+1]&&(d+=x.move(s,n),u=u+x.line(s-h,c)+x.move(s,n)),null===e[i][a]&&(d+=x.move(s,n),u+=x.move(s,c)),"stepline"===b?(d=d+x.line(s,null,"H")+x.line(null,n,"V"),u=u+x.line(s,null,"H")+x.line(null,n,"V")):"straight"===b&&(d+=x.line(s,n),u+=x.line(s,n)),a===e[i].length-2&&(u=u+x.line(s,c)+x.move(s,n)+"z",f.push(d),g.push(u));return{linePaths:f,areaPaths:g,pX:r,pY:o,linePath:d,areaPath:u}}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,n=t.i,r=t.j,o=t.prevY,l=t.categoryAxisCorrection,h=t.xRatio,c=this.w,d=[],u=[];if(0===r){var g=l+c.config.markers.offsetX;c.globals.isXNumeric&&(g=(c.globals.seriesX[i][0]-c.globals.minX)/h+c.config.markers.offsetX),d.push(g),u.push(f.default.isNumber(e[n][0])?o+c.config.markers.offsetY:null),d.push(a+c.config.markers.offsetX),u.push(f.default.isNumber(e[n][r+1])?s+c.config.markers.offsetY:null)}else d.push(a+c.config.markers.offsetX),u.push(f.default.isNumber(e[n][r+1])?s+c.config.markers.offsetY:null);return{x:d,y:u}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,n=0;n0&&parseInt(r.realIndex)===parseInt(a)&&("line"===r.type?(this.appendPathFrom=!1,e=s.globals.previousPaths[n].paths[0].d):"area"===r.type&&(this.appendPathFrom=!1,e=s.globals.previousPaths[n].paths[0].d,i=s.globals.previousPaths[n].paths[1].d))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e=t.i,i=t.series,a=t.yRatio,s=t.zeroY,n=t.prevY,r=t.prevSeriesY,o=t.lineYPosition,l=this.w;if(void 0!==i[e][0])n=l.config.chart.stacked?(o=e>0?r[e-1][0]:s)-i[e][0]/a:s-i[e][0]/a;else if(l.config.chart.stacked&&e>0&&void 0===i[e][0])for(var h=e-1;h>=0;h--)if(null!==i[h][0]&&void 0!==i[h][0]){n=o=r[h][0];break}return{prevY:n,lineYPosition:o}}}]),t}();e.default=g},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i=360&&(x=360-Math.abs(this.startAngle)-.1);var b=i.drawPath({d:"",stroke:g,strokeWidth:r*parseInt(f.strokeWidth)/100,fill:"none",strokeOpacity:f.opacity,classes:"apexcharts-radialbar-area"});if(f.dropShadow.enabled){var v=f.dropShadow;s.dropShadow(b,v)}h.add(b),b.attr("id","apexcharts-radialbarTrack-"+o),new l.default(this.ctx).animatePaths(b,{centerX:t.centerX,centerY:t.centerY,endAngle:x,startAngle:p,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,easing:e.globals.easing})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new d.default(this.ctx),a=new c.default(this.ctx),s=new u.default(this.ctx),n=i.group(),r=this.getStrokeWidth(t);t.size=t.size-r/2;var o=e.config.plotOptions.radialBar.hollow.background,f=t.size-r*t.series.length-this.margin*t.series.length-r*parseInt(e.config.plotOptions.radialBar.track.strokeWidth)/100/2,g=f-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,n,f,o));var p=this.drawHollow({size:g,centerX:t.centerX,centerY:t.centerY,fill:o});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var x=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(p,x)}var b=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(b=0);var v=new l.default(this.ctx),m=null;this.radialDataLabels.show&&(m=v.renderInnerDataLabels(this.radialDataLabels,{hollowSize:f,centerX:t.centerX,centerY:t.centerY,opacity:b})),"back"===e.config.plotOptions.radialBar.hollow.position&&(n.add(p),m&&n.add(m));var y=!1;e.config.plotOptions.radialBar.inverseOrder&&(y=!0);for(var w=y?t.series.length-1:0;y?w>=0:w=360&&(P-=.01),Math.abs(L)+Math.abs(C)>=360&&(L-=.01);var E=P-A,T=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[w]:e.config.stroke.dashArray,z=i.drawPath({d:"",stroke:S,strokeWidth:r,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area",strokeDashArray:T});if(d.default.setAttrs(z.node,{"data:angle":E,"data:value":t.series[w]}),e.config.chart.dropShadow.enabled){var X=e.config.chart.dropShadow;s.dropShadow(z,X)}this.addListeners(z,this.radialDataLabels);var Y=new l.default(this.ctx);z.node.addEventListener("mouseenter",Y.dataLabelsMouseIn.bind(this,z.node,this.radialDataLabels)),z.node.addEventListener("mouseleave",Y.dataLabelsMouseout.bind(this,z.node,this.radialDataLabels)),k.add(z),z.attr("id","apexcharts-radialArc-"+w);var O=0;!Y.initialAnim||e.globals.resized||e.globals.dataChanged||(O=(P-A)/360*e.config.chart.animations.speed,this.animDur=O/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),e.globals.dataChanged&&(O=(P-A)/360*e.config.chart.animations.dynamicAnimation.speed,this.animDur=O/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),Y.animatePaths(z,{centerX:t.centerX,centerY:t.centerY,endAngle:P,startAngle:A,prevEndAngle:L,prevStartAngle:C,size:t.size,i:w,totalItems:2,animBeginArr:this.animBeginArr,dur:O,shouldSetPrevPaths:!0,easing:e.globals.easing})}return{g:n,elHollow:p,dataLabels:m}}},{key:"drawHollow",value:function(t){var e=new d.default(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,n=new c.default(this.ctx),r=(Math.random()+1).toString(36).substring(4),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)n.clippedImgArea({width:i,height:i,image:o,patternID:"pattern"+s.globals.cuid+r}),a="url(#pattern"+s.globals.cuid+r+")";else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var d=s.globals.dom.Paper.image(o).loaded(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)});e.add(d)}else{var u=s.globals.dom.Paper.image(o).loaded(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)});e.add(u)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size))/100/(t.series.length+1)-this.margin}}]),e}(l.default);e.default=f},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,a=this.w;t.map(function(t,s){if("vertical"===t.label.orientation){var n=null!==i?i:s,r=a.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='"+n+"']");if(null!==r){var o=r.getBoundingClientRect();r.setAttribute("x",parseInt(r.getAttribute("x"))-o.height+4),"top"===t.label.position?r.setAttribute("y",parseInt(r.getAttribute("y"))+o.width):r.setAttribute("y",parseInt(r.getAttribute("y"))-o.width);var l=e.graphics.rotateAroundCenter(r),h=l.x,c=l.y;r.setAttribute("transform","rotate(-90 "+h+" "+c+")")}}})}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),a=t.getBoundingClientRect(),s=e.label.style.padding.left,n=e.label.style.padding.right,r=e.label.style.padding.top,o=e.label.style.padding.bottom;"vertical"===e.label.orientation&&(r=e.label.style.padding.left,o=e.label.style.padding.right,s=e.label.style.padding.top,n=e.label.style.padding.bottom);var l=a.left-i.left-s,h=a.top-i.top-r;return this.graphics.drawRect(l,h,a.width+s+n,a.height+r+o,0,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0)}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var n=e.globals.dom.baseEl.querySelector(".apexcharts-"+s+"-annotations .apexcharts-"+s+"-annotation-label[rel='"+a+"']"),r=n.parentNode,o=t.addBackgroundToAnno(n,i);r.insertBefore(o.node,n)};e.config.annotations.xaxis.map(function(t,e){i(t,e,"xaxis")}),e.config.annotations.yaxis.map(function(t,e){i(t,e,"yaxis")}),e.config.annotations.points.map(function(t,e){i(t,e,"point")})}},{key:"addText",value:function(t,e,i){var a=t.x,s=t.y,n=t.text,r=t.textAnchor,o=t.appendTo,l=void 0===o?".apexcharts-inner":o,h=t.foreColor,c=t.fontSize,d=t.fontFamily,u=t.cssClass,f=t.backgroundColor,g=t.borderWidth,p=t.strokeDashArray,x=t.radius,b=t.borderColor,v=t.paddingLeft,m=void 0===v?4:v,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,S=void 0===k?2:k,A=t.paddingTop,C=void 0===A?2:A,M=i,P=M.w,L=P.globals.dom.baseEl.querySelector(l),E=this.graphics.drawText({x:a,y:s,text:n,textAnchor:r||"start",fontSize:c||"12px",fontFamily:d||P.config.chart.fontFamily,foreColor:h||P.config.chart.foreColor,cssClass:u});L.appendChild(E.node);var T=E.bbox(),z=this.graphics.drawRect(T.x-m,T.y-C,T.width+m+w,T.height+S+C,x,f,1,g,b,p);return E.before(z),e&&P.globals.memory.methodsToExec.push({context:M,method:M.addText,params:{x:a,y:s,text:n,textAnchor:r,appendTo:l,foreColor:h,fontSize:c,cssClass:u,backgroundColor:f,borderWidth:g,strokeDashArray:p,radius:x,borderColor:b,paddingLeft:m,paddingRight:w,paddingBottom:S,paddingTop:C}}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,n=t.contextMethod,r=a,h=r.w,c=h.globals.dom.baseEl.querySelector(".apexcharts-"+s+"-annotations"),d=c.childNodes.length+1,u=new o.default,f=Object.assign({},"xaxis"===s?u.xAxisAnnotation:"yaxis"===s?u.yAxisAnnotation:u.pointAnnotation),g=l.default.extend(f,e);switch(s){case"xaxis":this.addXaxisAnnotation(g,c,d);break;case"yaxis":this.addYaxisAnnotation(g,c,d);break;case"point":this.addPointAnnotation(g,c,d)}var p=h.globals.dom.baseEl.querySelector(".apexcharts-"+s+"-annotations .apexcharts-"+s+"-annotation-label[rel='"+d+"']"),x=this.addBackgroundToAnno(p,g);return c.insertBefore(x.node,p),i&&h.globals.memory.methodsToExec.push({context:r,method:n,params:e}),a}}]),t}();t.exports=h},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i-1,t.xyCharts=s.indexOf(i)>-1,t.chartClass=".apexcharts"+t.cuid,t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),x.default.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas "+t.chartClass.substring(1)}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=new window.SVG.Doc(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate("+e.chart.offsetX+", "+e.chart.offsetY+")"}),t.dom.Paper.node.style.background=e.chart.background,this.setSVGDimensions(),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elWrap.appendChild(t.dom.elLegendWrap),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=i.config,s=i.globals,n={series:[],i:[]},h={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},x={series:[],i:[]};s.series.map(function(e,a){if(void 0!==t[a].type){if("column"===t[a].type||"bar"===t[a].type)i.config.plotOptions.bar.horizontal=!1,d.series.push(e),d.i.push(a);else if("area"===t[a].type)h.series.push(e),h.i.push(a);else if("line"===t[a].type)n.series.push(e),n.i.push(a);else if("scatter"===t[a].type)c.series.push(e),c.i.push(a);else{if("candlestick"!==t[a].type)throw new Error("You have specified an unrecognized chart type. Available types for this propery are line/area/column/bar");x.series.push(e),x.i.push(a)}s.comboCharts=!0}else n.series.push(e),n.i.push(a)});var b=new p.default(this.ctx,e),v=new l.default(this.ctx,e),m=new f.default(this.ctx),y=new g.default(this.ctx),w=[];if(s.comboCharts){if(h.series.length>0&&w.push(b.draw(h.series,"area",h.i)),d.series.length>0)if(i.config.chart.stacked){var k=new o.default(this.ctx,e);w.push(k.draw(d.series,d.i))}else{var S=new r.default(this.ctx,e);w.push(S.draw(d.series,d.i))}if(n.series.length>0&&w.push(b.draw(n.series,"line",n.i)),x.series.length>0&&w.push(v.draw(x.series,x.i)),c.series.length>0){var A=new p.default(this.ctx,e,!0);w.push(A.draw(c.series,"scatter",c.i))}}else switch(a.chart.type){case"line":w=b.draw(s.series,"line");break;case"area":w=b.draw(s.series,"area");break;case"bar":w=a.chart.stacked?new o.default(this.ctx,e).draw(s.series):new r.default(this.ctx,e).draw(s.series);break;case"candlestick":w=new l.default(this.ctx,e).draw(s.series);break;case"heatmap":w=new u.default(this.ctx,e).draw(s.series);break;case"pie":case"donut":w=m.draw(s.series);break;case"radialBar":w=y.draw(s.series);break;default:w=b.draw(s.series)}return w}},{key:"setSVGDimensions",value:function(){var t=this.w.globals,e=this.w.config;t.svgWidth=e.chart.width,t.svgHeight=e.chart.height;var i=y.default.getDimensions(this.el),a=e.chart.width.toString().split(/[0-9]+/g).pop();if("%"===a?y.default.isNumber(i[0])&&(t.svgWidth=i[0]*parseInt(e.chart.width)/100):"px"!==a&&""!==a||(t.svgWidth=parseInt(e.chart.width)),"auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===e.chart.height.toString().split(/[0-9]+/g).pop()){var s=y.default.getDimensions(this.el.parentNode);t.svgHeight=s[1]*parseInt(e.chart.height)/100}else t.svgHeight=parseInt(e.chart.height);else t.axisCharts?t.svgHeight=t.svgWidth/1.61:t.svgHeight=t.svgWidth;x.default.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight});var n=e.chart.sparkline.enabled?0:14;t.dom.Paper.node.parentNode.parentNode.style.minHeight=t.svgHeight+n+"px",t.dom.elWrap.style.width=t.svgWidth+"px",t.dom.elWrap.style.height=t.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i={transform:"translate("+t.translateX+", "+e+")"};x.default.setAttrs(t.dom.elGraphical.node,i)}},{key:"coreCalculations",value:function(){new m.default(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=this.w.globals;e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesPercent=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.stackedSeriesTotals=[],e.labels=[],e.timelineLabels=[],e.noLabelsProvided=!1,e.timescaleTicks=[],e.resizeTimer=null,e.selectionResizeTimer=null,e.seriesXvalues=function(){return t.w.config.series.map(function(t){return[]})}(),e.seriesYvalues=function(){return t.w.config.series.map(function(t){return[]})}(),e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.isDataXYZ=!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.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.config.chart.stacked=!1,this.w.globals.isMultipleYAxis=!0,!0}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var t=this,e=this.w;e.globals.ignoreYAxisIndexes=e.globals.collapsedSeries.map(function(e,i){if(t.w.globals.isMultipleYAxis)return e.index})}},{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new w.default(this.ctx).getActiveConfigSeriesIndex();if(void 0!==t[e].data&&t[e].data.length>0&&null!==t[e].data[0]&&void 0!==t[e].data[0].x&&null!==t[e].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new w.default(this.ctx).getActiveConfigSeriesIndex();if(void 0!==t[e].data&&t[e].data.length>0&&void 0!==t[e].data[0]&&null!==t[e].data[0]&&t[e].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s=0;s2&&void 0!==arguments[2]?arguments[2]:this.ctx,a=this.w.config,s=this.w.globals,n=new d.default(i),r=0;r0?a.labels.slice():a.xaxis.categories.slice(),l=0;l0?a.labels.slice():a.xaxis.categories.slice();h.length>0&&(this.twoDSeriesX=h,s.seriesX.push(this.twoDSeriesX))}s.labels.push(this.twoDSeriesX),s.series.push(t[r].data)}s.seriesZ.push(this.threeDSeries),void 0!==t[r].name?s.seriesNames.push(t[r].name):s.seriesNames.push("series-"+parseInt(r+1))}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory)i.labels=i.labels[0];else{var a=[];if(i.axisCharts){for(var s=0;s1||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),this.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"appendToForeignObject",value:function(){var t=this.w.globals,e=document.createElementNS(t.svgNS,"foreignObject");e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("width",t.svgWidth),e.setAttribute("height",t.svgHeight),t.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.appendChild(t.dom.elLegendWrap),e.append(this.getLegendStyles()),t.dom.Paper.node.appendChild(e)}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.globals.colors.slice();if("heatmap"===e.config.chart.type){var n=e.config.plotOptions.heatmap.colorScale.ranges;a=n.map(function(t){return t.name?t.name:t.from+" - "+t.to}),s=n.map(function(t){return t.color})}for(var r=e.globals.legendFormatter,l=0;l<=a.length-1;l++){var h=r(a[l],{seriesIndex:l,w:e}),c=!1;if(e.globals.collapsedSeries.length>0)for(var d=0;d0?h-10:0)+(c>0?c-10:0)}n=n+t+i.config.legend.offsetX,o=o+e+i.config.legend.offsetY,a.style.position="absolute",a.style.top=o+"px",a.style.left=n+"px","bottom"===i.config.legend.position?(a.style.top="auto",a.style.bottom=-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),a.style.maxWidth&&(a.style.maxWidth=i.config.legend.maxWidth),a.style.maxHeight&&(a.style.maxHeight=i.config.legend.maxHeight)}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var e=this.getLegendBBox(),i=new r.default(this.ctx),a=i.getTitleSubtitleCoords("title"),s=i.getTitleSubtitleCoords("subtitle"),n=0;"bottom"===t.config.legend.position?n=-e.clwh/1.8:"top"===t.config.legend.position&&(n=a.height+s.height+t.config.title.margin+t.config.subtitle.margin-15),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.getLegendBBox(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),console.log(e),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");"heatmap"!==e.config.chart.type?!t.target.classList.contains("inactive-legend")&&i&&new l.default(this.ctx).toggleSeriesOnHover(t,t.target):i&&new l.default(this.ctx).highlightRangeInSeries(t,t.target)}},{key:"onLegendClick",value:function(t){if(t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker")){var e=parseInt(t.target.getAttribute("rel"))-1,i="true"===t.target.getAttribute("data:collapsed"),a=this.w.config.chart.events.legendClick;"function"==typeof a&&a(this.ctx,e,this.w),this.ctx.fireEvent("legendClick",[this.ctx,e,this.w]),this.toggleDataSeries(e,i)}}},{key:"getLegendStyles",value:function(){var t=document.createElement("style");t.setAttribute("type","text/css");var e=document.createTextNode("\n \n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n\n .apexcharts-legend.position-bottom, .apexcharts-legend.position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.position-right, .apexcharts-legend.position-left {\n flex-direction: column;\n bottom: 0;\n }\n\n .apexcharts-legend.position-bottom.left, .apexcharts-legend.position-top.left, .apexcharts-legend.position-right, .apexcharts-legend.position-left {\n justify-content: flex-start;\n }\n\n .apexcharts-legend.position-bottom.center, .apexcharts-legend.position-top.center {\n justify-content: center; \n }\n\n .apexcharts-legend.position-bottom.right, .apexcharts-legend.position-top.right {\n justify-content: flex-end;\n }\n\n .apexcharts-legend-series {\n cursor: pointer;\n }\n\n .apexcharts-legend.position-bottom .apexcharts-legend-series, .apexcharts-legend.position-top .apexcharts-legend-series{\n display: flex;\n align-items: center;\n }\n\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n\n .apexcharts-legend-marker {\n position: relative;\n display: inline-block;\n cursor: pointer;\n margin-right: 3px;\n }\n \n .apexcharts-legend.right .apexcharts-legend-series, .apexcharts-legend.left .apexcharts-legend-series{\n display: inline-block;\n }\n\n .apexcharts-legend-series.no-click {\n cursor: auto;\n }\n\n .inactive-legend {\n opacity: 0.45;\n }");return t.appendChild(e),t}},{key:"resetToggleDataSeries",value:function(){var t=this.w,e=[];if(t.globals.axisCharts?t.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex]").forEach(function(t){e.push(parseInt(t.getAttribute("data:realIndex")))}):t.globals.dom.baseEl.querySelectorAll(".apexcharts-series[rel]").forEach(function(t){e.push(parseInt(t.getAttribute("rel"))-1)}),e.sort(),t.globals.collapsedSeries.length>0){for(var i=t.globals.risingSeries.slice(),a=t.config.series.slice(),s=0;s0)for(var n=0;n0?window.innerWidth:screen.width)2&&void 0!==arguments[2]?arguments[2]:10;if(t===Number.MIN_VALUE&&0===e||!n.default.isNumber(t)&&!n.default.isNumber(e))return t=0,e=1,i=1,this.linearScale(t,e,i);t>e?(console.warn("yaxis.min cannot be greater than yaxis.max"),e=t+.1):t===e&&(t=0===t?0:t-.1,e=0===e?2:e+.1);var a=[],s=e-t,r=i+1;r<2?r=2:r>2&&(r-=2);for(var o=s/r,l=Math.floor(n.default.log10(o)),h=Math.pow(10,l),c=parseInt(o/h)*h,d=c*Math.floor(t/c),u=c*Math.ceil(e/c),f=d;;)if(a.push(f),(f+=c)>u)break;if(void 0===this.w.config.yaxis[0].max&&void 0===this.w.config.yaxis[0].min)return{result:a,niceMin:a[0],niceMax:a[a.length-1]};var g=t;(a=[]).push(g);for(var p=Math.abs(e-t)/i,x=0;x<=i-1;x++)g+=p,a.push(g);return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=Math.abs(e-t)/i;i===Number.MAX_VALUE&&(i=10,a=1);for(var s=[],n=t;i>=0;)s.push(n),n+=a,i-=1;return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}},{key:"logarithmicScale",value:function(t,e,i,a){var s=this.w;(e<0||e===Number.MIN_VALUE)&&(e=.01);for(var r=s.config.yaxis[t].logBase,o=Math.log(e)/Math.log(r),l=Math.log(i)/Math.log(r),h=Math.abs(i-e)/a,c=[],d=e;a>=0;)c.push(d),d+=h,a-=1;var u=c.map(function(t,a){t<=0&&(t=.01);var s=(l-o)/(i-e),h=Math.pow(r,o+s*(t-o));return Math.round(h/n.default.roundToBase(h,r))*n.default.roundToBase(h,r)});return 0===u[0]&&(u[0]=1),{result:u,niceMin:u[0],niceMax:u[u.length-1]}}},{key:"setYScaleForIndex",value:function(t,e,i){var a=this.w.globals,s=this.w.config,r=s.yaxis[t];void 0===a.yAxisScale[t]&&(a.yAxisScale[t]=[]),s.yaxis[t].logarithmic?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.logarithmicScale(t,e,i,r.tickAmount?r.tickAmount:Math.floor(Math.log10(i)))):i!==-Number.MAX_VALUE&&n.default.isNumber(i)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,r.tickAmount?r.tickAmount:6)):a.yAxisScale[t]=this.linearScale(0,5,5)}},{key:"setMultipleYScales",value:function(){var t=this,e=this.w.globals,i=this.w.config,a=e.minYArr.concat([]),s=e.maxYArr.concat([]),n=[];i.yaxis.forEach(function(r,o){var l=o;i.series.forEach(function(t,i){t.name===r.seriesName&&-1===e.collapsedSeriesIndices.indexOf(i)&&(l=i,o!==i?n.push({index:i,similarIndex:o,alreadyExists:!0}):n.push({index:i}))});var h=a[l],c=s[l];t.setYScaleForIndex(o,h,c)}),this.sameScaleInMultipleAxes(a,s,n)}},{key:"sameScaleInMultipleAxes",value:function(t,e,i){function a(t,e){return t.filter(function(t){return-1!==e.indexOf(t)})}var s=this,n=this.w.config,r=[];i.forEach(function(t){t.alreadyExists&&(void 0===r[t.index]&&(r[t.index]=[]),r[t.index].push(t.index),r[t.index].push(t.similarIndex))}),r.forEach(function(t,e){r.forEach(function(i,s){e!==s&&a(t,i).length>0&&(r[e]=r[e].concat(r[s]))})});var o=r.map(function(t){return t.filter(function(e,i){return t.indexOf(e)===i})}).map(function(t){return t.sort()});r=r.filter(function(t){return!!t});var l=o.slice(),h=l.map(function(t){return JSON.stringify(t)});l=l.filter(function(t,e){return h.indexOf(JSON.stringify(t))===e});var c=[],d=[];t.forEach(function(t,i){l.forEach(function(a,s){a.includes(i)&&(void 0===c[s]&&(c[s]=[],d[s]=[]),c[s].push({key:i,value:t}),d[s].push({key:i,value:e[i]}))})});var u=Array(l.length).fill().map(function(t,e){return Number.MAX_SAFE_INTEGER}),f=Array(l.length).fill().map(function(t,e){return Number.MIN_SAFE_INTEGER});c.forEach(function(t,e){t.forEach(function(t,i){u[e]=Math.min(t.value,u[e])})}),d.forEach(function(t,e){t.forEach(function(t,i){f[e]=Math.max(t.value,f[e])})}),t.forEach(function(t,e){d.forEach(function(t,i){var a=u[i],r=f[i];t.forEach(function(i,o){t[o].key===e&&(void 0!==n.yaxis[e].min&&(a=n.yaxis[e].min),void 0!==n.yaxis[e].max&&(r=n.yaxis[e].max),s.setYScaleForIndex(e,a,r))})})})}}]),t}();e.default=r},function(t,e,i){function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=this.w,a=i.globals.series.length;if((e=null===e&&("bar"===i.config.chart.type&&i.config.plotOptions.bar.distributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap.colorScale.inverse))&&(a=i.globals.series[0].length*i.globals.series.length),t.length0&&e.height>0&&this.slDraggableRect.selectize().resize({constraint:{minX:0,minY:0,maxX:t.globals.gridWidth,maxY:t.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(t.globals.selection);else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a={x:i,y:0,width:t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i,height:t.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,n=t.translateX,r=t.translateY,o=this.w,h=this.zoomRect,c=this.selectionRect;if(this.dragged||null!==o.globals.selection){var d={transform:"translate("+n+", "+r+")"};o.globals.zoomEnabled&&this.dragged&&(h.attr({x:e,y:i,width:a,height:s,fill:o.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":o.config.chart.zoom.zoomedArea.fill.opacity,stroke:o.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":o.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":o.config.chart.zoom.zoomedArea.stroke.opacity}),l.default.setAttrs(h.node,d)),o.globals.selectionEnabled&&(c.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:o.config.chart.selection.fill.color,"fill-opacity":o.config.chart.selection.fill.opacity,stroke:o.config.chart.selection.stroke.color,"stroke-width":o.config.chart.selection.stroke.width,"stroke-dasharray":o.config.chart.selection.stroke.dashArray,"stroke-opacity":o.config.chart.selection.stroke.opacity}),l.default.setAttrs(c.node,d))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,n=this.gridRect.getBoundingClientRect(),r=s.startX-1,o=s.startY,l=s.clientX-n.left-r,h=s.clientY-n.top-o,c=0,d=0,u={};return(Math.abs(l+r)>a.globals.gridWidth||s.clientX-n.left<0)&&(s.hideSelectionRect(this.zoomRect),s.dragged=!1,s.w.globals.mousedown=!1),r>s.clientX-n.left&&(c=-(l=Math.abs(l))),o>s.clientY-n.top&&(d=-(h=Math.abs(h))),u="x"===i?{x:r,y:0,width:l,height:a.globals.gridHeight,translateX:c,translateY:0}:"y"===i?{x:0,y:o,width:a.globals.gridWidth,height:h,translateX:0,translateY:d}:{x:r,y:o,width:l,height:h,translateX:c,translateY:d},s.drawSelectionRect(u),u}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w,s=this.xyRatios,n=this.selectionRect,r=0;"resizing"===t&&(r=30),"function"==typeof a.config.chart.events.selection&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var t=i.gridRect.getBoundingClientRect(),e=n.node.getBoundingClientRect(),r=a.globals.xAxisScale.niceMin+(e.left-t.left)*s.xRatio,o=a.globals.xAxisScale.niceMin+(e.right-t.left)*s.xRatio,l=a.globals.yAxisScale[0].niceMin+(t.bottom-e.bottom)*s.yRatio[0],h=a.globals.yAxisScale[0].niceMax-(e.top-t.top)*s.yRatio[0];a.config.chart.events.selection(i.ctx,{xaxis:{min:r,max:o},yaxis:{min:l,max:h}})},r))}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,n=this.xyRatios,r=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var c=a.globals.xAxisScale.niceMin+s.startX*n.xRatio,d=a.globals.xAxisScale.niceMin+s.endX*n.xRatio,u=[],f=[];if(a.config.yaxis.forEach(function(t,e){u.push(Math.floor(a.globals.yAxisScale[e].niceMax-n.yRatio[e]*s.startY)),f.push(Math.floor(a.globals.yAxisScale[e].niceMax-n.yRatio[e]*s.endY))}),s.dragged&&(s.dragX>10||s.dragY>10)&&c!==d)if(a.globals.zoomEnabled){var g=h.default.clone(a.config.yaxis);a.globals.zoomed||(a.globals.lastXAxis=h.default.clone(a.config.xaxis),a.globals.lastYAxis=h.default.clone(a.config.yaxis));var p={min:c,max:d};if("xy"!==i&&"y"!==i||g.forEach(function(t,e){g[e].min=f[e],g[e].max=u[e]}),r){var x=r.getBeforeZoomRange(p,g);x&&(p=x.xaxis?x.xaxis:p,g=x.yaxis?x.yaxe:g)}"x"===i?s.ctx._updateOptions({xaxis:p},!1,s.w.config.chart.animations.dynamicAnimation.enabled):"y"===i?s.ctx._updateOptions({yaxis:g},!1,s.w.config.chart.animations.dynamicAnimation.enabled):s.ctx._updateOptions({xaxis:p,yaxis:g},!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&r.zoomCallback(p,g),a.globals.zoomed=!0}else if(a.globals.selectionEnabled){var b=null,v=null;v={min:c,max:d},"xy"!==i&&"y"!==i||(b=h.default.clone(a.config.yaxis)).forEach(function(t,e){b[e].min=f[e],b[e].max=u[e]}),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:v,yaxis:b})}}},{key:"panDragging",value:function(t){var e=t.context,i=(t.zoomtype,this.w),a=e,s=void 0;if(void 0!==i.globals.lastClientPosition.x){var n=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(n)>Math.abs(r)&&n>0?s="left":Math.abs(n)>Math.abs(r)&&n<0?s="right":Math.abs(r)>Math.abs(n)&&r>0?s="up":Math.abs(r)>Math.abs(n)&&r<0&&(s="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var o=i.globals.minX,l=i.globals.maxX;this.panScrolled(s,o,l)}},{key:"panScrolled",value:function(t,e,i){var a=this.w,s=this.xyRatios;"left"===t?(e=a.globals.minX+a.globals.gridWidth/15*s.xRatio,i=a.globals.maxX+a.globals.gridWidth/15*s.xRatio):"right"===t&&(e=a.globals.minX-a.globals.gridWidth/15*s.xRatio,i=a.globals.maxX-a.globals.gridWidth/15*s.xRatio),(ea.globals.initialmaxX)&&(e=a.globals.minX,i=a.globals.maxX),this.ctx._updateOptions({xaxis:{min:e,max:i}},!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),e}(a(i(23)).default);t.exports=c},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0&&(this.xaxisLabels=i.globals.timelineLabels.slice())}return n(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new l.default(this.ctx);null===t&&(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){var t=this.w,e=new h.default(this.ctx),i=this.w.globals,a=null;if(i.axisCharts){if(t.config.grid.show)a=this.renderGrid(),i.dom.elGraphical.add(a.el),this.drawGridArea(a.el);else{var s=this.drawGridArea();i.dom.elGraphical.add(s)}null!==a&&e.xAxisLabelCorrections(a.xAxisTickWidth)}}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new l.default(this.ctx),a=Array.isArray(t.config.stroke.width)?0:t.config.stroke.width;if(Array.isArray(t.config.stroke.width)){var s=0;t.config.stroke.width.forEach(function(t){s=Math.max(s,t)}),a=s}e.dom.elGridRectMask=document.createElementNS(e.svgNS,"clipPath"),e.dom.elGridRectMask.setAttribute("id","gridRectMask"+e.cuid),e.dom.elGridRectMarkerMask=document.createElementNS(e.svgNS,"clipPath"),e.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask"+e.cuid),e.dom.elGridRect=i.drawRect(-a/2,-a/2,e.gridWidth+a,e.gridHeight+a,0,"#fff"),new o.default(this).getLargestMarkerSize();var n=t.globals.markers.largestSize+t.config.markers.hover.sizeOffset+1;e.dom.elGridRectMarker=i.drawRect(-n,-n,e.gridWidth+2*n,e.gridHeight+2*n,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var r=e.dom.baseEl.querySelector("defs");r.appendChild(e.dom.elGridRectMask),r.appendChild(e.dom.elGridRectMarkerMask)}},{key:"renderGrid",value:function(){for(var t=this.w,e=new l.default(this.ctx),i=t.config.grid.strokeDashArray,a=e.group({class:"apexcharts-grid"}),s=8,n=0;n2));n++);var r=void 0;if(!(!t.config.plotOptions.bar.horizontal||"bar"!==t.config.chart.type)){if(r=s,t.config.grid.xaxis.lines.show||t.config.xaxis.axisTicks.show)for(var o=t.globals.padHorizontal,c=void 0,d=t.globals.gridHeight,u=0;u0)for(var k=0;k0&&m0)for(var n=0,r=a.globals.gridHeight/i,o=a.globals.gridWidth,h=0,c=0;h=a.config.grid.row.colors.length&&(c=0);var d=a.config.grid.row.colors[c],u=s.drawRect(0,n,o,r,0,d,a.config.grid.row.opacity);t.add(u),u.node.classList.add("apexcharts-gridRow"),n+=a.globals.gridHeight/i}if(void 0!==a.config.grid.column.colors&&a.config.grid.column.colors.length>0)for(var f=a.globals.padHorizontal,g=a.globals.padHorizontal+a.globals.gridWidth/e,p=a.globals.gridHeight,x=0,b=0;x=a.config.grid.column.colors.length&&(b=0);var v=a.config.grid.column.colors[b],m=s.drawRect(f,0,g,p,0,v,a.config.grid.column.opacity);m.node.classList.add("apexcharts-gridColumn"),t.add(m),f+=a.globals.gridWidth/e}}},{key:"animateLine",value:function(t,e,i){var a=this.w,s=a.config.chart.animations;if(s&&!a.globals.resized&&!a.globals.dataChanged){var n=s.speed;this.anim.animateLine(t,e,i,n)}}}]),t}();e.default=c},function(t,e,i){function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s=function(){function t(t,e){for(var i=0;i
Open: '+a.globals.seriesCandleO[e][i]+'
High: '+a.globals.seriesCandleH[e][i]+'
Low: '+a.globals.seriesCandleL[e][i]+'
Close: '+a.globals.seriesCandleC[e][i]+"
"}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"area",value:function(){return{stroke:{width:4},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:"brush",value:function(t){var e={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return n.default.extend(t,e)}},{key:"stacked100",value:function(){var t=this;this.opts.dataLabels=this.opts.dataLabels||{},this.opts.dataLabels.formatter=this.opts.dataLabels.formatter||void 0;var e=this.opts.dataLabels.formatter;this.opts.yaxis.forEach(function(e,i){t.opts.yaxis[i].min=0,t.opts.yaxis[i].max=100}),!("bar"!==this.opts.chart.type)&&(this.opts.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t})}},{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:2,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1,zoom:{enabled:!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",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"dark",shadeIntensity:.35,inverseColors:!1,stops:[0,100,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right",offsetY:30}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"vertical",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right",offsetY:30}}}},{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,offsetY:30},tooltip:{enabled:!1,fillSeriesColor:!0}}}}]),t}();t.exports=r},function(t,e,i){function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=function(){function t(t,e){for(var i=0;ir.globals.gridWidth/2&&(a=h-n.tooltipRect.ttWidth/2+d),n.w.config.tooltip.followCursor){var f=n.getElGrid().getBoundingClientRect();s=n.e.clientY-f.top+r.globals.translateY/2-10}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=this.w,o=this.ttCtx,l=void 0,h=void 0;if(e.target.classList.contains("apexcharts-marker")){var c=parseInt(i.paths.getAttribute("cx")),d=parseInt(i.paths.getAttribute("cy")),u=parseFloat(i.paths.getAttribute("val"));if(h=parseInt(i.paths.getAttribute("rel")),l=parseInt(i.paths.parentNode.parentNode.parentNode.getAttribute("rel"))-1,o.intersect){var f=n.default.findAncestor(i.paths,"apexcharts-series");f&&(l=parseInt(f.getAttribute("data:realIndex")))}if(o.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!o.intersect&&r.config.tooltip.shared}),o.marker.enlargeCurrentPoint(h,i.paths),a=c,s=d-1.4*o.tooltipRect.ttHeight,o.w.config.tooltip.followCursor){var g=o.getElGrid().getBoundingClientRect();s=o.e.clientY-g.top}u<0&&(s=d)}return{x:a,y:s}}},{key:"handleBarTooltip",value:function(t){var e=t.e,i=t.opt,a=this.w,s=this.ttCtx,n=s.getElTooltip(),r=0,o=0,l=0,h=0,c=void 0;if(s.isBarHorizontal&&s.hasBars()||!a.config.tooltip.shared){var d=this.getBarTooltipXY({e:e,opt:i});o=d.x,l=d.y,h=d.i,c=Array.isArray(a.config.stroke.width)?a.config.stroke.width[h]:a.config.stroke.width,r=o}else a.globals.comboCharts||a.config.tooltip.shared||(r/=2);if(isNaN(l)&&(l=a.globals.svgHeight-s.tooltipRect.ttHeight),o+s.tooltipRect.ttWidth>a.globals.gridWidth?o-=s.tooltipRect.ttWidth:o<0&&(o+=s.tooltipRect.ttWidth),s.w.config.tooltip.followCursor){var u=s.getElGrid().getBoundingClientRect();l=s.e.clientY-u.top}null===s.tooltip&&(s.tooltip=a.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),a.config.tooltip.shared||(a.globals.comboChartsHasBars?s.tooltipPosition.moveXCrosshairs(r+c/2):s.tooltipPosition.moveXCrosshairs(r)),!s.fixedTooltip&&(!a.config.tooltip.shared||s.isBarHorizontal&&s.hasBars())&&(n.style.left=o+a.globals.translateX+"px",s.tooltipRect.ttHeight+l>a.globals.gridHeight?(l=a.globals.gridHeight-s.tooltipRect.ttHeight+a.globals.translateY,n.style.top=l+"px"):n.style.top=l+a.globals.translateY-s.tooltipRect.ttHeight/2+"px")}},{key:"getBarTooltipXY",value:function(t){var e=t.e,i=t.opt,a=this.w,s=null,n=this.ttCtx,r=0,o=0,l=0,h=0,c=e.target.classList;if(c.contains("apexcharts-bar-area")||c.contains("apexcharts-candlestick-area")){var d=e.target,u=d.getBoundingClientRect(),f=i.elGrid.getBoundingClientRect(),g=u.height,p=u.width,x=parseInt(d.getAttribute("cx")),b=parseInt(d.getAttribute("cy"));h=parseFloat(d.getAttribute("barWidth"));var v="touchmove"===e.type?e.touches[0].clientX:e.clientX;s=parseInt(d.getAttribute("j")),r=parseInt(d.parentNode.getAttribute("rel"))-1,a.globals.comboCharts&&(r=parseInt(d.parentNode.getAttribute("data:realIndex"))),n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:r,j:s,shared:!n.showOnIntersect&&a.config.tooltip.shared}),a.config.tooltip.followCursor?a.config.plotOptions.bar.horizontal?(o=v-f.left+15,l=b-n.dataPointsDividedHeight+g/2-n.tooltipRect.ttHeight/2):(o=a.globals.isXNumeric?x-p/2:x-n.dataPointsDividedWidth+p/2,l=e.clientY-f.top-n.tooltipRect.ttHeight/2-15):a.config.plotOptions.bar.horizontal?((o=x)0&&a.globals.seriesZ[0].length>0&&(l=d(a.globals.seriesZ[e][i],a)),o="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(u,c):n,{val:h,xVal:n,xAxisTTVal:o,zVal:l}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=this.w;this.ttCtx.getElTooltip().innerHTML=a.config.tooltip.custom({series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a})}}]),t}();t.exports=l},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i0&&this.addPathsEventListeners(u,l);var f=t.globals.dom.baseEl.querySelectorAll(".apexcharts-area-series .apexcharts-marker");f.length>0&&this.addPathsEventListeners(f,l),this.hasBars()&&!t.config.tooltip.shared&&this.addBarsEventListeners(l)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,n=t.config.tooltip.fixed.offsetX,r=t.config.tooltip.fixed.offsetY;return t.config.tooltip.fixed.position.toLowerCase().indexOf("right")>-1&&(n=n+t.globals.svgWidth-a+10),t.config.tooltip.fixed.position.toLowerCase().indexOf("bottom")>-1&&(r=r+t.globals.svgHeight-s-10),e.style.left=n+"px",e.style.top=r+"px",{x:n,y:r,ttWidth:a,ttHeight:s}}},{key:"addPointsEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker");this.addPathsEventListeners(e,t)}},{key:"addBarsEventListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-area, .apexcharts-candlestick-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=this,s=0;sa.globals.gridWidth)return void o.handleMouseOut(i);if(null!==g){if(null===a.globals.series[g][s])return void i.tooltipEl.classList.remove("active");void 0!==a.globals.series[g][s]?a.config.tooltip.shared&&this.tooltipUtil.isXoverlap(s)&&this.tooltipUtil.isinitialSeriesSameLen()?this.create(o,g,s,i.ttItems):this.create(o,g,s,i.ttItems,!1):this.tooltipUtil.isXoverlap(s)&&o.create(o,0,s,i.ttItems)}else this.tooltipUtil.isXoverlap(s)&&o.create(o,0,s,i.ttItems)}else if("heatmap"===a.config.chart.type){var p=this.intersect.handleHeatTooltip({e:e,opt:i,x:n,y:r});n=p.x,r=p.y,h.style.left=n+"px",h.style.top=r+"px"}else this.hasBars&&this.intersect.handleBarTooltip({e:e,opt:i}),this.hasMarkers&&this.intersect.handleMarkerTooltip({e:e,opt:i,x:n,y:r});if(this.blyaxisTooltip)for(var x=0;xs.globals.gridWidth&&(u=c-d.left-a.ttWidth+o),f<0&&(f=a.ttHeight+20),r.style.left=u+s.globals.translateX+"px",r.style.top=f+"px"}else"mouseout"!==e.type&&"touchend"!==e.type||r.classList.remove("active")}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new d.default(this.ctx),i=t.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"create",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=this.w,r=t;null===s&&(s=n.config.tooltip.shared);var o=this.hasMarkers(),l=this.getElBars();if(s){if(r.tooltipLabels.drawSeriesTexts({ttItems:a,i:e,j:i,shared:!this.showOnIntersect&&n.config.tooltip.shared}),o&&(n.globals.markers.largestSize>0?r.marker.enlargePoints(i):r.tooltipPosition.moveDynamicPointsOnHover(i)),this.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(l),this.barSeriesHeight>0)){var h=new d.default(this.ctx),c=n.globals.dom.Paper.select(".apexcharts-bar-area[j='"+i+"']");this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(i);for(var u=0;ur.maxX-e.width&&(s=r.maxX-e.width),null!=r.minY&&nr.maxY-e.height&&(n=r.maxY-e.height),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:o,y:l},!0):this.el.move(s,n));return i},t.prototype.end=function(t){var e=this.drag(t);this.el.fire("dragend",{event:t,p:e,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,i){"function"!=typeof e&&"object"!=(void 0===e?"undefined":a(e))||(i=e,e=!0);var s=this.remember("_draggable")||new t(this);return e=void 0===e||e,e?s.init(i||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}).call(void 0)},function(t,e,i){(function(){function t(t){return Array.isArray(t)&&(t=new SVG.Array(t)),t.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function e(t){if(!Array.isArray(t))return t;for(var e=0,i=t.length,a=[];e1&&(L*=a=Math.sqrt(a),E*=a),s=(new SVG.Matrix).rotate(T).scale(1/L,1/E).rotate(-T),I=I.transform(s),o=(n=[(F=F.transform(s)).x-I.x,F.y-I.y])[0]*n[0]+n[1]*n[1],r=Math.sqrt(o),n[0]/=r,n[1]/=r,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1),h=new SVG.Point((F.x+I.x)/2+l*-n[1],(F.y+I.y)/2+l*n[0]),c=new SVG.Point(I.x-h.x,I.y-h.y),d=new SVG.Point(F.x-h.x,F.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1),f=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(f*=-1),X&&u>f&&(f+=2*Math.PI),!X&&u0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y+i[1]).size(this.parameters.box.width-i[0],this.parameters.box.height-i[1])}};break;case"rt":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).size(this.parameters.box.width+i[0],this.parameters.box.height-i[1])}};break;case"rb":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+i[0],this.parameters.box.height+i[1])}};break;case"lb":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).size(this.parameters.box.width-i[0],this.parameters.box.height+i[1])}};break;case"t":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).height(this.parameters.box.height-i[1])}};break;case"r":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+i[0])}};break;case"b":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+i[1])}};break;case"l":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).width(this.parameters.box.width-i[0])}};break;case"rot":this.calc=function(t,e){var i={x:t+this.parameters.p.x,y:e+this.parameters.p.y},a=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),s=180*(Math.atan2(i.y-this.parameters.box.y-this.parameters.box.height/2,i.x-this.parameters.box.x-this.parameters.box.width/2)-a)/Math.PI;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(this.parameters.rotation+s-s%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(t,e){var i=this.snapToGrid(t,e,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),a=this.el.array().valueOf();a[this.parameters.i][0]=this.parameters.pointCoords[0]+i[0],a[this.parameters.i][1]=this.parameters.pointCoords[1]+i[1],this.el.plot(a)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:t}),SVG.on(window,"touchmove.resize",function(t){e.update(t||window.event)}),SVG.on(window,"touchend.resize",function(){e.done()}),SVG.on(window,"mousemove.resize",function(t){e.update(t||window.event)}),SVG.on(window,"mouseup.resize",function(){e.done()})},t.prototype.update=function(t){if(!t)return void(this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1]));var e=this._extractPosition(t),i=this.transformPoint(e.x,e.y),a=i.x-this.parameters.p.x,s=i.y-this.parameters.p.y;this.lastUpdateCall=[a,s],this.calc(a,s),this.el.fire("resizing",{dx:a,dy:s,event:t})},t.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},t.prototype.snapToGrid=function(t,e,i,a){var s;return void 0!==a?s=[(i+t)%this.options.snapToGrid,(a+e)%this.options.snapToGrid]:(i=null==i?3:i,s=[(this.parameters.box.x+t+(1&i?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+e+(2&i?0:this.parameters.box.height))%this.options.snapToGrid]),t-=Math.abs(s[0])r.maxX&&(t=r.maxX-s),void 0!==r.minY&&n+er.maxY&&(e=r.maxY-n),[t,e]},t.prototype.checkAspectRatio=function(t){if(!this.options.saveAspectRatio)return t;var e=t.slice(),i=this.parameters.box.width/this.parameters.box.height,a=this.parameters.box.width+t[0],s=this.parameters.box.height-t[1],n=a/s;return ni&&(e[0]=this.parameters.box.width-s*i),e},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new t(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}()},function(t,e,i){var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function t(t){this.el=t,t.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1}}t.prototype.init=function(t,e){var i=this.el.bbox();this.options={};for(var a in this.el.selectize.defaults)this.options[a]=this.el.selectize.defaults[a],void 0!==e[a]&&(this.options[a]=e[a]);this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(t):this.selectRect(t),this.observe(),this.cleanup()},t.prototype.selectPoints=function(t){return this.pointSelection.isSelected=t,this.pointSelection.set?this:(this.pointSelection.set=this.parent.set(),this.drawCircles(),this)},t.prototype.getPointArray=function(){var t=this.el.bbox();return this.el.array().valueOf().map(function(e){return[e[0]-t.x,e[1]-t.y]})},t.prototype.drawCircles=function(){for(var t=this,e=this.getPointArray(),i=0,a=e.length;i=0;i--)e.childNodes[i]instanceof t.SVGElement&&b(e.childNodes[i]);return w.adopt(e).id(w.eid(e.nodeName))}function v(t){return null==t.x&&(t.x=0,t.y=0,t.width=0,t.height=0),t.w=t.width,t.h=t.height,t.x2=t.x+t.width,t.y2=t.y+t.height,t.cx=t.x+t.width/2,t.cy=t.y+t.height/2,t}function m(t){var e=(t||"").toString().match(w.regex.reference);if(e)return e[1]}function y(t){return Math.abs(t)>1e-37?t:0}var w=(void 0!==this?this:t).SVG=function(t){if(w.supported)return t=new w.Doc(t),w.parser.draw||w.prepare(),t};if(w.ns="http://www.w3.org/2000/svg",w.xmlns="http://www.w3.org/2000/xmlns/",w.xlink="http://www.w3.org/1999/xlink",w.svgjs="http://svgjs.com/svgjs",w.supported=!0,!w.supported)return!1;w.did=1e3,w.eid=function(t){return"Svgjs"+l(t)+w.did++},w.create=function(t){var i=e.createElementNS(this.ns,t);return i.setAttribute("id",this.eid(t)),i},w.extend=function(){var t,e,i,a;for(e=(t=[].slice.call(arguments)).pop(),a=t.length-1;a>=0;a--)if(t[a])for(i in e)t[a].prototype[i]=e[i];w.Set&&w.Set.inherit&&w.Set.inherit()},w.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,w.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&w.extend(e,t.extend),t.construct&&w.extend(t.parent||w.Container,t.construct),e},w.adopt=function(e){if(!e)return null;if(e.instance)return e.instance;var i;return i="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new w.Nested:new w.Doc:"linearGradient"==e.nodeName?new w.Gradient("linear"):"radialGradient"==e.nodeName?new w.Gradient("radial"):w[l(e.nodeName)]?new(w[l(e.nodeName)]):new w.Element(e),i.type=e.nodeName,i.node=e,e.instance=i,i instanceof w.Doc&&i.namespace().defs(),i.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),i},w.prepare=function(){var t=e.getElementsByTagName("body")[0],i=(t?new w.Doc(t):w.adopt(e.documentElement).nested()).size(2,0);w.parser={body:t||e.documentElement,draw:i.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:i.polyline().node,path:i.path().node,native:w.create("svg")}},w.parser={native:w.create("svg")},e.addEventListener("DOMContentLoaded",function(){w.parser.draw||w.prepare()},!1),w.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},w.utils={map:function(t,e){var i,a=t.length,s=[];for(i=0;i1?1:t,new w.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),w.Color.test=function(t){return t+="",w.regex.isHex.test(t)||w.regex.isRgb.test(t)},w.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},w.Color.isColor=function(t){return w.Color.isRgb(t)||w.Color.test(t)},w.Array=function(t,e){0==(t=(t||[]).valueOf()).length&&e&&(t=e.valueOf()),this.value=this.parse(t)},w.extend(w.Array,{morph:function(t){if(this.destination=this.parse(t),this.value.length!=this.destination.length){for(var e=this.value[this.value.length-1],i=this.destination[this.destination.length-1];this.value.length>this.destination.length;)this.destination.push(i);for(;this.value.length=0;a--)this.value[a]=[this.value[a][0]+t,this.value[a][1]+e];return this},size:function(t,e){var i,a=this.bbox();for(i=this.value.length-1;i>=0;i--)a.width&&(this.value[i][0]=(this.value[i][0]-a.x)*t/a.width+a.x),a.height&&(this.value[i][1]=(this.value[i][1]-a.y)*e/a.height+a.y);return this},bbox:function(){return w.parser.poly.setAttribute("points",this.toString()),w.parser.poly.getBBox()}});for(var k={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},S="mlhvqtcsaz".split(""),A=0,C=S.length;A=0;s--)"M"==(a=this.value[s][0])||"L"==a||"T"==a?(this.value[s][1]+=t,this.value[s][2]+=e):"H"==a?this.value[s][1]+=t:"V"==a?this.value[s][1]+=e:"C"==a||"S"==a||"Q"==a?(this.value[s][1]+=t,this.value[s][2]+=e,this.value[s][3]+=t,this.value[s][4]+=e,"C"==a&&(this.value[s][5]+=t,this.value[s][6]+=e)):"A"==a&&(this.value[s][6]+=t,this.value[s][7]+=e);return this},size:function(t,e){var i,a,s=this.bbox();for(i=this.value.length-1;i>=0;i--)"M"==(a=this.value[i][0])||"L"==a||"T"==a?(this.value[i][1]=(this.value[i][1]-s.x)*t/s.width+s.x,this.value[i][2]=(this.value[i][2]-s.y)*e/s.height+s.y):"H"==a?this.value[i][1]=(this.value[i][1]-s.x)*t/s.width+s.x:"V"==a?this.value[i][1]=(this.value[i][1]-s.y)*e/s.height+s.y:"C"==a||"S"==a||"Q"==a?(this.value[i][1]=(this.value[i][1]-s.x)*t/s.width+s.x,this.value[i][2]=(this.value[i][2]-s.y)*e/s.height+s.y,this.value[i][3]=(this.value[i][3]-s.x)*t/s.width+s.x,this.value[i][4]=(this.value[i][4]-s.y)*e/s.height+s.y,"C"==a&&(this.value[i][5]=(this.value[i][5]-s.x)*t/s.width+s.x,this.value[i][6]=(this.value[i][6]-s.y)*e/s.height+s.y)):"A"==a&&(this.value[i][1]=this.value[i][1]*t/s.width,this.value[i][2]=this.value[i][2]*e/s.height,this.value[i][6]=(this.value[i][6]-s.x)*t/s.width+s.x,this.value[i][7]=(this.value[i][7]-s.y)*e/s.height+s.y);return this},equalCommands:function(t){var e,i,a;for(t=new w.PathArray(t),a=this.value.length===t.value.length,e=0,i=this.value.length;a&&eo);return s},bbox:function(){return w.parser.path.setAttribute("d",this.toString()),w.parser.path.getBBox()}}),w.Number=w.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-3.4e38:3.4e38:"string"==typeof t?(e=t.match(w.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof w.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new w.Number(t),new w.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new w.Number(t),new w.Number(this-t,this.unit||t.unit)},times:function(t){return t=new w.Number(t),new w.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new w.Number(t),new w.Number(this/t,this.unit||t.unit)},to:function(t){var e=new w.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new w.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new w.Number(this.destination).minus(this).times(t).plus(this):this}}}),w.Element=w.invent({create:function(t){this._stroke=w.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var i=d(this,t,e);return this.width(new w.Number(i.width)).height(new w.Number(i.height))},clone:function(t){this.writeDataToDom();var e=b(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},inside:function(t,e){var i=this.bbox();return t>i.x&&e>i.y&&t/,"").replace(/<\/svg>$/,"");i.innerHTML=""+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var a=0,s=i.firstChild.childNodes.length;a":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)}},w.morph=function(t){return function(e,i){return new w.MorphObj(e,i).at(t)}},w.Situation=w.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new w.Number(t.duration).valueOf(),this.delay=new w.Number(t.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=t.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),w.FX=w.invent({create:function(t){this._target=t,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(t,e,i){"object"===(void 0===t?"undefined":s(t))&&(e=t.ease,i=t.delay,t=t.duration);var a=new w.Situation({duration:t||1e3,delay:i||0,ease:w.easing[e||"-"]||e});return this.queue(a),this},delay:function(t){var e=new w.Situation({duration:t,delay:0,ease:w.easing["-"]});return this.queue(e)},target:function(t){return t&&t instanceof w.Element?(this._target=t,this):this._target},timeToAbsPos:function(t){return(t-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(t){return this.situation.duration/this._speed*t+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=t.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){t.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(t){return("function"==typeof t||t instanceof w.Situation)&&this.situations.push(t),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof w.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var t,e,i,a=this.situation;if(a.init)return this;for(t in a.animations)for(i=this.target()[t](),Array.isArray(i)||(i=[i]),Array.isArray(a.animations[t])||(a.animations[t]=[a.animations[t]]),e=i.length;e--;)a.animations[t][e]instanceof w.Number&&(i[e]=new w.Number(i[e])),a.animations[t][e]=i[e].morph(a.animations[t][e]);for(t in a.attrs)a.attrs[t]=new w.MorphObj(this.target().attr(t),a.attrs[t]);for(t in a.styles)a.styles[t]=new w.MorphObj(this.target().style(t),a.styles[t]);return a.initialTransformation=this.target().matrixify(),a.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(t,e){var i=this.active;return this.active=!1,e&&this.clearQueue(),t&&this.situation&&(!i&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},reset:function(){if(this.situation){var t=this.situation;this.stop(),this.situation=t,this.atStart()}return this},finish:function(){for(this.stop(!0,!1);this.dequeue().situation&&this.stop(!0,!1););return this.clearQueue().clearCurrent(),this},atStart:function(){return this.at(0,!0)},atEnd:function(){return!0===this.situation.loops&&(this.situation.loops=this.situation.loop+1),"number"==typeof this.situation.loops?this.at(this.situation.loops,!0):this.at(1,!0)},at:function(t,e){var i=this.situation.duration/this._speed;return this.absPos=t,e||(this.situation.reversed&&(this.absPos=1-this.absPos),this.absPos+=this.situation.loop),this.situation.start=+new Date-this.absPos*i,this.situation.finish=this.situation.start+i,this.step(!0)},speed:function(t){return 0===t?this.pause():t?(this._speed=t,this.at(this.absPos,!0)):this._speed},loop:function(t,e){var i=this.last();return i.loops=null==t||t,i.loop=0,e&&(i.reversing=!0),this},pause:function(){return this.paused=!0,this.stopAnimFrame(),this},play:function(){return this.paused?(this.paused=!1,this.at(this.absPos,!0)):this},reverse:function(t){var e=this.last();return e.reversed=void 0===t?!e.reversed:t,this},progress:function(t){return t?this.situation.ease(this.pos):this.pos},after:function(t){var e=this.last(),i=function i(a){a.detail.situation==e&&(t.call(this,e),this.off("finished.fx",i))};return this.target().on("finished.fx",i),this._callStart()},during:function(t){var e=this.last(),i=function(i){i.detail.situation==e&&t.call(this,i.detail.pos,w.morph(i.detail.pos),i.detail.eased,e)};return this.target().off("during.fx",i).on("during.fx",i),this.after(function(){this.off("during.fx",i)}),this._callStart()},afterAll:function(t){var e=function e(i){t.call(this),this.off("allfinished.fx",e)};return this.target().off("allfinished.fx",e).on("allfinished.fx",e),this._callStart()},duringAll:function(t){var e=function(e){t.call(this,e.detail.pos,w.morph(e.detail.pos),e.detail.eased,e.detail.situation)};return this.target().off("during.fx",e).on("during.fx",e),this.afterAll(function(){this.off("during.fx",e)}),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(t,e,i){return this.last()[i||"animations"][t]=e,this._callStart()},step:function(t){if(t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops){var e,i,a;e=Math.max(this.absPos,0),i=Math.floor(e),!0===this.situation.loops||ithis.lastPos&&n<=s&&(this.situation.once[n].call(this.target(),this.pos,s),delete this.situation.once[n]);return this.active&&this.target().fire("during",{pos:this.pos,eased:s,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=s,this):this},eachAt:function(){var t,e,i,a=this,s=this.target(),n=this.situation;for(t in n.animations)i=[].concat(n.animations[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(n.ease(a.pos),a.pos):t}),s[t].apply(s,i);for(t in n.attrs)i=[t].concat(n.attrs[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(n.ease(a.pos),a.pos):t}),s.attr.apply(s,i);for(t in n.styles)i=[t].concat(n.styles[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(n.ease(a.pos),a.pos):t}),s.style.apply(s,i);if(n.transforms.length){for(i=n.initialTransformation,t=0,e=n.transforms.length;t=0;--e)this[P[e]]=null!=t[P[e]]?t[P[e]]:i[P[e]]},extend:{extract:function(){var t=u(this,0,1),e=u(this,1,0),i=180/Math.PI*Math.atan2(t.y,t.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(i*Math.PI/180)+this.f*Math.sin(i*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(i*Math.PI/180)+this.e*Math.sin(-i*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),skewX:-i,skewY:180/Math.PI*Math.atan2(e.y,e.x),scaleX:Math.sqrt(this.a*this.a+this.b*this.b),scaleY:Math.sqrt(this.c*this.c+this.d*this.d),rotation:i,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new w.Matrix(this)}},clone:function(){return new w.Matrix(this)},morph:function(t){return this.destination=new w.Matrix(t),this},at:function(t){return this.destination?new w.Matrix({a:this.a+(this.destination.a-this.a)*t,b:this.b+(this.destination.b-this.b)*t,c:this.c+(this.destination.c-this.c)*t,d:this.d+(this.destination.d-this.d)*t,e:this.e+(this.destination.e-this.e)*t,f:this.f+(this.destination.f-this.f)*t}):this},multiply:function(t){return new w.Matrix(this.native().multiply(g(t).native()))},inverse:function(){return new w.Matrix(this.native().inverse())},translate:function(t,e){return new w.Matrix(this.native().translate(t||0,e||0))},scale:function(t,e,i,a){return 1==arguments.length?e=t:3==arguments.length&&(a=i,i=e,e=t),this.around(i,a,new w.Matrix(t,0,0,e,0,0))},rotate:function(t,e,i){return t=w.utils.radians(t),this.around(e,i,new w.Matrix(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0))},flip:function(t,e){return"x"==t?this.scale(-1,1,e,0):"y"==t?this.scale(1,-1,0,e):this.scale(-1,-1,t,null!=e?e:t)},skew:function(t,e,i,a){return 1==arguments.length?e=t:3==arguments.length&&(a=i,i=e,e=t),t=w.utils.radians(t),e=w.utils.radians(e),this.around(i,a,new w.Matrix(1,Math.tan(e),Math.tan(t),1,0,0))},skewX:function(t,e,i){return this.skew(t,0,e,i)},skewY:function(t,e,i){return this.skew(0,t,e,i)},around:function(t,e,i){return this.multiply(new w.Matrix(1,0,0,1,t||0,e||0)).multiply(i).multiply(new w.Matrix(1,0,0,1,-t||0,-e||0))},native:function(){for(var t=w.parser.native.createSVGMatrix(),e=P.length-1;e>=0;e--)t[P[e]]=this[P[e]];return t},toString:function(){return"matrix("+y(this.a)+","+y(this.b)+","+y(this.c)+","+y(this.d)+","+y(this.e)+","+y(this.f)+")"}},parent:w.Element,construct:{ctm:function(){return new w.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof w.Nested){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new w.Matrix(e)}return new w.Matrix(this.node.getScreenCTM())}}}),w.Point=w.invent({create:function(t,e){var i,a={x:0,y:0};i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===(void 0===t?"undefined":s(t))?{x:t.x,y:t.y}:null!=t?{x:t,y:null!=e?e:t}:a,this.x=i.x,this.y=i.y},extend:{clone:function(){return new w.Point(this)},morph:function(t,e){return this.destination=new w.Point(t,e),this},at:function(t){return this.destination?new w.Point({x:this.x+(this.destination.x-this.x)*t,y:this.y+(this.destination.y-this.y)*t}):this},native:function(){var t=w.parser.native.createSVGPoint();return t.x=this.x,t.y=this.y,t},transform:function(t){return new w.Point(this.native().matrixTransform(t.native()))}}}),w.extend(w.Element,{point:function(t,e){return new w.Point(t,e).transform(this.screenCTM().inverse())}}),w.extend(w.Element,{attr:function(t,e,i){if(null==t){for(t={},i=(e=this.node.attributes).length-1;i>=0;i--)t[e[i].nodeName]=w.regex.isNumber.test(e[i].nodeValue)?parseFloat(e[i].nodeValue):e[i].nodeValue;return t}if("object"===(void 0===t?"undefined":s(t)))for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return e=this.node.getAttribute(t),null==e?w.defaults.attrs[t]:w.regex.isNumber.test(e)?parseFloat(e):e;"stroke-width"==t?this.attr("stroke",parseFloat(e)>0?this._stroke:null):"stroke"==t&&(this._stroke=e),"fill"!=t&&"stroke"!=t||(w.regex.isImage.test(e)&&(e=this.doc().defs().image(e,0,0)),e instanceof w.Image&&(e=this.doc().defs().pattern(0,0,function(){this.add(e)}))),"number"==typeof e?e=new w.Number(e):w.Color.isColor(e)?e=new w.Color(e):Array.isArray(e)&&(e=new w.Array(e)),"leading"==t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!=t&&"x"!=t||this.rebuild(t,e)}return this}}),w.extend(w.Element,{transform:function(t,e){var i,a,n=this;if("object"!==(void 0===t?"undefined":s(t)))return i=new w.Matrix(n).extract(),"string"==typeof t?i[t]:i;if(i=new w.Matrix(n),e=!!e||!!t.relative,null!=t.a)i=e?i.multiply(new w.Matrix(t)):new w.Matrix(t);else if(null!=t.rotation)p(t,n),i=e?i.rotate(t.rotation,t.cx,t.cy):i.rotate(t.rotation-i.extract().rotation,t.cx,t.cy);else if(null!=t.scale||null!=t.scaleX||null!=t.scaleY){if(p(t,n),t.scaleX=null!=t.scale?t.scale:null!=t.scaleX?t.scaleX:1,t.scaleY=null!=t.scale?t.scale:null!=t.scaleY?t.scaleY:1,!e){r=i.extract();t.scaleX=1*t.scaleX/r.scaleX,t.scaleY=1*t.scaleY/r.scaleY}i=i.scale(t.scaleX,t.scaleY,t.cx,t.cy)}else if(null!=t.skew||null!=t.skewX||null!=t.skewY){if(p(t,n),t.skewX=null!=t.skew?t.skew:null!=t.skewX?t.skewX:0,t.skewY=null!=t.skew?t.skew:null!=t.skewY?t.skewY:0,!e){var r=i.extract();i=i.multiply((new w.Matrix).skew(r.skewX,r.skewY,t.cx,t.cy).inverse())}i=i.skew(t.skewX,t.skewY,t.cx,t.cy)}else t.flip?("x"==t.flip||"y"==t.flip?t.offset=null==t.offset?n.bbox()["c"+t.flip]:t.offset:null==t.offset?(a=n.bbox(),t.flip=a.cx,t.offset=a.cy):t.flip=t.offset,i=(new w.Matrix).flip(t.flip,t.offset)):null==t.x&&null==t.y||(e?i=i.translate(t.x,t.y):(null!=t.x&&(i.e=t.x),null!=t.y&&(i.f=t.y)));return this.attr("transform",i)}}),w.extend(w.FX,{transform:function(t,e){var i,a,n=this.target();return"object"!==(void 0===t?"undefined":s(t))?(i=new w.Matrix(n).extract(),"string"==typeof t?i[t]:i):(e=!!e||!!t.relative,null!=t.a?i=new w.Matrix(t):null!=t.rotation?(p(t,n),i=new w.Rotate(t.rotation,t.cx,t.cy)):null!=t.scale||null!=t.scaleX||null!=t.scaleY?(p(t,n),t.scaleX=null!=t.scale?t.scale:null!=t.scaleX?t.scaleX:1,t.scaleY=null!=t.scale?t.scale:null!=t.scaleY?t.scaleY:1,i=new w.Scale(t.scaleX,t.scaleY,t.cx,t.cy)):null!=t.skewX||null!=t.skewY?(p(t,n),t.skewX=null!=t.skewX?t.skewX:0,t.skewY=null!=t.skewY?t.skewY:0,i=new w.Skew(t.skewX,t.skewY,t.cx,t.cy)):t.flip?("x"==t.flip||"y"==t.flip?t.offset=null==t.offset?n.bbox()["c"+t.flip]:t.offset:null==t.offset?(a=n.bbox(),t.flip=a.cx,t.offset=a.cy):t.flip=t.offset,i=(new w.Matrix).flip(t.flip,t.offset)):null==t.x&&null==t.y||(i=new w.Translate(t.x,t.y)),i?(i.relative=e,this.last().transforms.push(i),this._callStart()):this)}}),w.extend(w.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(w.regex.transforms).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(w.regex.delimiter).map(function(t){return parseFloat(t)})]}).reduce(function(t,e){return"matrix"==e[0]?t.multiply(f(e[1])):t[e[0]].apply(t,e[1])},new w.Matrix)},toParent:function(t){if(this==t)return this;var e=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t).untransform().transform(i.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())}}),w.Transformation=w.invent({create:function(t,e){if(arguments.length>1&&"boolean"!=typeof e)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(t))for(var i=0,a=this.arguments.length;i=0},index:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)},get:function(t){return w.adopt(this.node.childNodes[t])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(t,e){var i,a,s=this.children();for(i=0,a=s.length;ia/n?this.height/n:this.width/a,this.x=e,this.y=i,this.width=a,this.height=n)}else t="string"==typeof t?t.match(u).map(function(t){return parseFloat(t)}):Array.isArray(t)?t:"object"===(void 0===t?"undefined":s(t))?[t.x,t.y,t.width,t.height]:4==arguments.length?[].slice.call(arguments):h,this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]},extend:{toString:function(){return this.x+" "+this.y+" "+this.width+" "+this.height},morph:function(t,e,i,a){return this.destination=new w.ViewBox(t,e,i,a),this},at:function(t){return this.destination?new w.ViewBox([this.x+(this.destination.x-this.x)*t,this.y+(this.destination.y-this.y)*t,this.width+(this.destination.width-this.width)*t,this.height+(this.destination.height-this.height)*t]):this}},parent:w.Container,construct:{viewbox:function(t,e,i,a){return 0==arguments.length?new w.ViewBox(this):this.attr("viewBox",new w.ViewBox(t,e,i,a))}}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach(function(t){w.Element.prototype[t]=function(e){return w.on(this.node,t,e),this}}),w.listeners=[],w.handlerMap=[],w.listenerId=0,w.on=function(t,e,i,a,s){var n=i.bind(a||t.instance||t),r=(w.handlerMap.indexOf(t)+1||w.handlerMap.push(t))-1,o=e.split(".")[0],l=e.split(".")[1]||"*";w.listeners[r]=w.listeners[r]||{},w.listeners[r][o]=w.listeners[r][o]||{},w.listeners[r][o][l]=w.listeners[r][o][l]||{},i._svgjsListenerId||(i._svgjsListenerId=++w.listenerId),w.listeners[r][o][l][i._svgjsListenerId]=n,t.addEventListener(o,n,s||!1)},w.off=function(t,e,i){var a=w.handlerMap.indexOf(t),s=e&&e.split(".")[0],n=e&&e.split(".")[1],r="";if(-1!=a)if(i){if("function"==typeof i&&(i=i._svgjsListenerId),!i)return;w.listeners[a][s]&&w.listeners[a][s][n||"*"]&&(t.removeEventListener(s,w.listeners[a][s][n||"*"][i],!1),delete w.listeners[a][s][n||"*"][i])}else if(n&&s){if(w.listeners[a][s]&&w.listeners[a][s][n]){for(i in w.listeners[a][s][n])w.off(t,[s,n].join("."),i);delete w.listeners[a][s][n]}}else if(n)for(e in w.listeners[a])for(r in w.listeners[a][e])n===r&&w.off(t,[e,n].join("."));else if(s){if(w.listeners[a][s]){for(r in w.listeners[a][s])w.off(t,[s,r].join("."));delete w.listeners[a][s]}}else{for(e in w.listeners[a])w.off(t,e);delete w.listeners[a],delete w.handlerMap[a]}},w.extend(w.Element,{on:function(t,e,i,a){return w.on(this.node,t,e,i,a),this},off:function(t,e){return w.off(this.node,t,e),this},fire:function(e,i){return e instanceof t.Event?this.node.dispatchEvent(e):this.node.dispatchEvent(e=new w.CustomEvent(e,{detail:i,cancelable:!0})),this._event=e,this},event:function(){return this._event}}),w.Defs=w.invent({create:"defs",inherit:w.Container}),w.G=w.invent({create:"g",inherit:w.Container,extend:{x:function(t){return null==t?this.transform("x"):this.transform({x:t-this.x()},!0)},y:function(t){return null==t?this.transform("y"):this.transform({y:t-this.y()},!0)},cx:function(t){return null==t?this.gbox().cx:this.x(t-this.gbox().width/2)},cy:function(t){return null==t?this.gbox().cy:this.y(t-this.gbox().height/2)},gbox:function(){var t=this.bbox(),e=this.transform();return t.x+=e.x,t.x2+=e.x,t.cx+=e.x,t.y+=e.y,t.y2+=e.y,t.cy+=e.y,t}},construct:{group:function(){return this.put(new w.G)}}}),w.Doc=w.invent({create:function(t){t&&("svg"==(t="string"==typeof t?e.getElementById(t):t).nodeName?this.constructor.call(this,t):(this.constructor.call(this,w.create("svg")),t.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:w.Container,extend:{namespace:function(){return this.attr({xmlns:w.ns,version:"1.1"}).attr("xmlns:xlink",w.xlink,w.xmlns).attr("xmlns:svgjs",w.svgjs,w.xmlns)},defs:function(){if(!this._defs){var t;(t=this.node.getElementsByTagName("defs")[0])?this._defs=w.adopt(t):this._defs=new w.Defs,this.node.appendChild(this._defs.node)}return this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},spof:function(){var t=this.node.getScreenCTM();return t&&this.style("left",-t.e%1+"px").style("top",-t.f%1+"px"),this},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,w.parser.draw&&!w.parser.draw.parentNode&&this.node.appendChild(w.parser.draw),this},clone:function(t){this.writeDataToDom();var e=this.node,i=b(e.cloneNode(!0));return t?(t.node||t).appendChild(i.node):e.parentNode.insertBefore(i.node,e.nextSibling),i}}}),w.extend(w.Element,{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},previous:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),e instanceof w.Doc&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return t>0&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),t instanceof w.Doc&&t.node.appendChild(t.defs().node),this},back:function(){return this.position()>0&&this.parent().removeElement(this).add(this,0),this},before:function(t){t.remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){t.remove();var e=this.position();return this.parent().add(t,e+1),this}}),w.Mask=w.invent({create:function(){this.constructor.call(this,w.create("mask")),this.targets=[]},inherit:w.Container,extend:{remove:function(){for(var t=this.targets.length-1;t>=0;t--)this.targets[t]&&this.targets[t].unmask();return this.targets=[],w.Element.prototype.remove.call(this),this}},construct:{mask:function(){return this.defs().put(new w.Mask)}}}),w.extend(w.Element,{maskWith:function(t){return this.masker=t instanceof w.Mask?t:this.parent().mask().add(t),this.masker.targets.push(this),this.attr("mask",'url("#'+this.masker.attr("id")+'")')},unmask:function(){return delete this.masker,this.attr("mask",null)}}),w.ClipPath=w.invent({create:function(){this.constructor.call(this,w.create("clipPath")),this.targets=[]},inherit:w.Container,extend:{remove:function(){for(var t=this.targets.length-1;t>=0;t--)this.targets[t]&&this.targets[t].unclip();return this.targets=[],this.parent().removeElement(this),this}},construct:{clip:function(){return this.defs().put(new w.ClipPath)}}}),w.extend(w.Element,{clipWith:function(t){return this.clipper=t instanceof w.ClipPath?t:this.parent().clip().add(t),this.clipper.targets.push(this),this.attr("clip-path",'url("#'+this.clipper.attr("id")+'")')},unclip:function(){return delete this.clipper,this.attr("clip-path",null)}}),w.Gradient=w.invent({create:function(t){this.constructor.call(this,w.create(t+"Gradient")),this.type=t},inherit:w.Container,extend:{at:function(t,e,i){return this.put(new w.Stop).update(t,e,i)},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="gradientTransform"),w.Container.prototype.attr.call(this,t,e,i)}},construct:{gradient:function(t,e){return this.defs().gradient(t,e)}}}),w.extend(w.Gradient,w.FX,{from:function(t,e){return"radial"==(this._target||this).type?this.attr({fx:new w.Number(t),fy:new w.Number(e)}):this.attr({x1:new w.Number(t),y1:new w.Number(e)})},to:function(t,e){return"radial"==(this._target||this).type?this.attr({cx:new w.Number(t),cy:new w.Number(e)}):this.attr({x2:new w.Number(t),y2:new w.Number(e)})}}),w.extend(w.Defs,{gradient:function(t,e){return this.put(new w.Gradient(t)).update(e)}}),w.Stop=w.invent({create:"stop",inherit:w.Element,extend:{update:function(t){return("number"==typeof t||t instanceof w.Number)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new w.Number(t.offset)),this}}}),w.Pattern=w.invent({create:"pattern",inherit:w.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="patternTransform"),w.Container.prototype.attr.call(this,t,e,i)}},construct:{pattern:function(t,e,i){return this.defs().pattern(t,e,i)}}}),w.extend(w.Defs,{pattern:function(t,e,i){return this.put(new w.Pattern).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}}),w.Shape=w.invent({create:function(t){this.constructor.call(this,t)},inherit:w.Element}),w.Bare=w.invent({create:function(t,e){if(this.constructor.call(this,w.create(t)),e)for(var i in e.prototype)"function"==typeof e.prototype[i]&&(this[i]=e.prototype[i])},inherit:w.Element,extend:{words:function(t){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this.node.appendChild(e.createTextNode(t)),this}}}),w.extend(w.Parent,{element:function(t,e){return this.put(new w.Bare(t,e))}}),w.Symbol=w.invent({create:"symbol",inherit:w.Container,construct:{symbol:function(){return this.put(new w.Symbol)}}}),w.Use=w.invent({create:"use",inherit:w.Shape,extend:{element:function(t,e){return this.attr("href",(e||"")+"#"+t,w.xlink)}},construct:{use:function(t,e){return this.put(new w.Use).element(t,e)}}}),w.Rect=w.invent({create:"rect",inherit:w.Shape,construct:{rect:function(t,e){return this.put(new w.Rect).size(t,e)}}}),w.Circle=w.invent({create:"circle",inherit:w.Shape,construct:{circle:function(t){return this.put(new w.Circle).rx(new w.Number(t).divide(2)).move(0,0)}}}),w.extend(w.Circle,w.FX,{rx:function(t){return this.attr("r",t)},ry:function(t){return this.rx(t)}}),w.Ellipse=w.invent({create:"ellipse",inherit:w.Shape,construct:{ellipse:function(t,e){return this.put(new w.Ellipse).size(t,e).move(0,0)}}}),w.extend(w.Ellipse,w.Rect,w.FX,{rx:function(t){return this.attr("rx",t)},ry:function(t){return this.attr("ry",t)}}),w.extend(w.Circle,w.Ellipse,{x:function(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())},y:function(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())},cx:function(t){return null==t?this.attr("cx"):this.attr("cx",t)},cy:function(t){return null==t?this.attr("cy"):this.attr("cy",t)},width:function(t){return null==t?2*this.rx():this.rx(new w.Number(t).divide(2))},height:function(t){return null==t?2*this.ry():this.ry(new w.Number(t).divide(2))},size:function(t,e){var i=d(this,t,e);return this.rx(new w.Number(i.width).divide(2)).ry(new w.Number(i.height).divide(2))}}),w.Line=w.invent({create:"line",inherit:w.Shape,extend:{array:function(){return new w.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(t,e,i,a){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:i,y2:a}:new w.PointArray(t).toLine(),this.attr(t))},move:function(t,e){return this.attr(this.array().move(t,e).toLine())},size:function(t,e){var i=d(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}},construct:{line:function(t,e,i,a){return w.Line.prototype.plot.apply(this.put(new w.Line),null!=t?[t,e,i,a]:[0,0,0,0])}}}),w.Polyline=w.invent({create:"polyline",inherit:w.Shape,construct:{polyline:function(t){return this.put(new w.Polyline).plot(t||new w.PointArray)}}}),w.Polygon=w.invent({create:"polygon",inherit:w.Shape,construct:{polygon:function(t){return this.put(new w.Polygon).plot(t||new w.PointArray)}}}),w.extend(w.Polyline,w.Polygon,{array:function(){return this._array||(this._array=new w.PointArray(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new w.PointArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var i=d(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}}),w.extend(w.Line,w.Polyline,w.Polygon,{morphArray:w.PointArray,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),w.Path=w.invent({create:"path",inherit:w.Shape,extend:{morphArray:w.PathArray,array:function(){return this._array||(this._array=new w.PathArray(this.attr("d")))},plot:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new w.PathArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("d",this.array().move(t,e))},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},size:function(t,e){var i=d(this,t,e);return this.attr("d",this.array().size(i.width,i.height))},width:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)},height:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},construct:{path:function(t){return this.put(new w.Path).plot(t||new w.PathArray)}}}),w.Image=w.invent({create:"image",inherit:w.Shape,extend:{load:function(e){if(!e)return this;var i=this,a=new t.Image;return w.on(a,"load",function(){w.off(a);var t=i.parent(w.Pattern);null!==t&&(0==i.width()&&0==i.height()&&i.size(a.width,a.height),t&&0==t.width()&&0==t.height()&&t.size(i.width(),i.height()),"function"==typeof i._loaded&&i._loaded.call(i,{width:a.width,height:a.height,ratio:a.width/a.height,url:e}))}),w.on(a,"error",function(t){w.off(a),"function"==typeof i._error&&i._error.call(i,t)}),this.attr("href",a.src=this.src=e,w.xlink)},loaded:function(t){return this._loaded=t,this},error:function(t){return this._error=t,this}},construct:{image:function(t,e,i){return this.put(new w.Image).load(t).size(e||0,i||e||0)}}}),w.Text=w.invent({create:function(){this.constructor.call(this,w.create("text")),this.dom.leading=new w.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",w.defaults.attrs["font-family"])},inherit:w.Shape,extend:{x:function(t){return null==t?this.attr("x"):this.attr("x",t)},y:function(t){var e=this.attr("y"),i="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-i:e:this.attr("y","number"==typeof t.valueOf()?t+i:t)},cx:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)},cy:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)},text:function(t){if(void 0===t){for(var t="",e=this.node.childNodes,i=0,a=e.length;i=0;e--)null!=i[M[t][e]]&&this.attr(M.prefix(t,M[t][e]),i[M[t][e]]);return this},w.extend(w.Element,w.FX,i)}),w.extend(w.Element,w.FX,{rotate:function(t,e,i){return this.transform({rotation:t,cx:e,cy:i})},skew:function(t,e,i,a){return 1==arguments.length||3==arguments.length?this.transform({skew:t,cx:e,cy:i}):this.transform({skewX:t,skewY:e,cx:i,cy:a})},scale:function(t,e,i,a){return 1==arguments.length||3==arguments.length?this.transform({scale:t,cx:e,cy:i}):this.transform({scaleX:t,scaleY:e,cx:i,cy:a})},translate:function(t,e){return this.transform({x:t,y:e})},flip:function(t,e){return e="number"==typeof t?t:e,this.transform({flip:t||"both",offset:e})},matrix:function(t){return this.attr("transform",new w.Matrix(6==arguments.length?[].slice.call(arguments):t))},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new w.Number(t).plus(this instanceof w.FX?0:this.x()),!0)},dy:function(t){return this.y(new w.Number(t).plus(this instanceof w.FX?0:this.y()),!0)},dmove:function(t,e){return this.dx(t).dy(e)}}),w.extend(w.Rect,w.Ellipse,w.Circle,w.Gradient,w.FX,{radius:function(t,e){var i=(this._target||this).type;return"radial"==i||"circle"==i?this.attr("r",new w.Number(t)):this.rx(t).ry(null==e?t:e)}}),w.extend(w.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(t){return this.node.getPointAtLength(t)}}),w.extend(w.Parent,w.Text,w.Tspan,w.FX,{font:function(t,e){if("object"===(void 0===t?"undefined":s(t)))for(e in t)this.font(e,t[e]);return"leading"==t?this.leading(e):"anchor"==t?this.attr("text-anchor",e):"size"==t||"family"==t||"weight"==t||"stretch"==t||"variant"==t||"style"==t?this.attr("font-"+t,e):this.attr(t,e)}}),w.Set=w.invent({create:function(t){Array.isArray(t)?this.members=t:this.clear()},extend:{add:function(){var t,e,i=[].slice.call(arguments);for(t=0,e=i.length;t-1&&this.members.splice(e,1),this},each:function(t){for(var e=0,i=this.members.length;e=0},index:function(t){return this.members.indexOf(t)},get:function(t){return this.members[t]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members},bbox:function(){if(0==this.members.length)return new w.RBox;var t=this.members[0].rbox(this.members[0].doc());return this.each(function(){t=t.merge(this.rbox(this.doc()))}),t}},construct:{set:function(t){return new w.Set(t)}}}),w.FX.Set=w.invent({create:function(t){this.set=t}}),w.Set.inherit=function(){var t=[];for(var e in w.Shape.prototype)"function"==typeof w.Shape.prototype[e]&&"function"!=typeof w.Set.prototype[e]&&t.push(e);t.forEach(function(t){w.Set.prototype[t]=function(){for(var e=0,i=this.members.length;e=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory||(this._memory={})}}),w.get=function(t){var i=e.getElementById(m(t)||t);return w.adopt(i)},w.select=function(t,i){return new w.Set(w.utils.map((i||e).querySelectorAll(t),function(t){return w.adopt(t)}))},w.extend(w.Parent,{select:function(t){return w.select(t,this.node)}});var P="abcdef".split("");if("function"!=typeof t.CustomEvent){var L=function(t,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var a=e.createEvent("CustomEvent");return a.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),a};L.prototype=t.Event.prototype,w.CustomEvent=L}else w.CustomEvent=t.CustomEvent;return function(e){for(var i=0,a=["moz","webkit"],s=0;s