index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
presto-player
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/presto-player/dist/analytics.js
!function(){var t,e,i={5927:function(t,e,i){"use strict";var a;function n(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function r(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?n(Object(i),!0).forEach((function(e){h(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function s(t){return s="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},s(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function c(t,e,i){return e&&l(t.prototype,e),i&&l(t,i),t}function h(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function f(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,a=u(t);if(e){var n=u(this).constructor;i=Reflect.construct(a,arguments,n)}else i=a.apply(this,arguments);return f(this,i)}}function x(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){if(t){if("string"==typeof t)return b(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(t,e):void 0}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var v=function(){function t(){o(this,t)}return c(t,[{key:"shadeRGBColor",value:function(t,e){var i=e.split(","),a=t<0?0:255,n=t<0?-1*t:t,r=parseInt(i[0].slice(4),10),s=parseInt(i[1],10),o=parseInt(i[2],10);return"rgb("+(Math.round((a-r)*n)+r)+","+(Math.round((a-s)*n)+s)+","+(Math.round((a-o)*n)+o)+")"}},{key:"shadeHexColor",value:function(t,e){var i=parseInt(e.slice(1),16),a=t<0?0:255,n=t<0?-1*t:t,r=i>>16,s=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*n)+r)+256*(Math.round((a-s)*n)+s)+(Math.round((a-o)*n)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===s(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e<t.length;e++)i[e]=t[e];return i}},{key:"extend",value:function(t,e){var i=this;"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var a=arguments[i];if(null!=a)for(var n in a)a.hasOwnProperty(n)&&(e[n]=a[n])}return e});var a=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach((function(n){i.isObject(e[n])&&n in t?a[n]=i.extend(t[n],e[n]):Object.assign(a,h({},n,e[n]))})),a}},{key:"extendArray",value:function(e,i){var a=[];return e.map((function(e){a.push(t.extend(i,e))})),a}},{key:"monthMod",value:function(t){return t%12}},{key:"clone",value:function(e){if(t.is("Array",e)){for(var i=[],a=0;a<e.length;a++)i[a]=this.clone(e[a]);return i}if(t.is("Null",e))return null;if(t.is("Date",e))return e;if("object"===s(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=this.clone(e[r]));return n}return e}},{key:"log10",value:function(t){return Math.log(t)/Math.LN10}},{key:"roundToBase10",value:function(t){return Math.pow(10,Math.floor(Math.log10(t)))}},{key:"roundToBase",value:function(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}},{key:"parseNumber",value:function(t){return null===t?t:parseFloat(t)}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",n=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+n.replace(/^-/,"")}for(r-=n.length;r--;)i+="0";return n+i}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&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<i.length;a++)i[a]=parseInt(1===i[a].length?i[a]+i[a]:i[a],16);return void 0!==e&&i.push(e),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}},{key:"getPolygonPos",value:function(t,e){for(var i=[],a=2*Math.PI/e,n=0;n<e;n++){var r={};r.x=t*Math.sin(n*a),r.y=-t*Math.cos(n*a),i.push(r)}return i}},{key:"polarToCartesian",value:function(t,e,i,a){var n=(a-90)*Math.PI/180;return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}},{key:"escapeString",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-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}(),y=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return c(t,[{key:"setEasingFunctions",value:function(){var t;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":t="-";break;case"easein":t="<";break;case"easeout":t=">";break;case"easeinout":default:t="<>";break;case"swing":t=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1};break;case"bounce":t=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};break;case"elastic":t=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=t}}},{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a,n,r){e||(e=0),t.attr({r:e,width:e,height:e}).animate(a,n).attr({r:i,width:i.width,height:i.height}).afterAll((function(){r()}))}},{key:"animateCircle",value:function(t,e,i,a,n){t.attr({r:e.r,cx:e.cx,cy:e.cy}).animate(a,n).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(t,e,i,a,n){t.attr(e).animate(a).attr(i).afterAll((function(){return n()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,n=t.fill,r=t.pathFrom,s=t.pathTo,o=t.speed,l=t.delay,c=this.w,h=0;c.config.chart.animations.animateGradually.enabled&&(h=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(h=0),this.morphSVG(e,i,a,"line"!==c.config.chart.type||c.globals.comboCharts?n:"stroke",r,s,o,l*h)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){t.el.classList.remove("apexcharts-element-hidden")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,n,r,s,o){var l=this,c=this.w;n||(n=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var h=function(t){return"radar"===c.config.chart.type&&(s=1),"M 0 ".concat(c.globals.gridHeight)};(!n||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=h()),(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=h()),c.globals.shouldAnimate||(s=1),t.plot(n).animate(1,c.globals.easing,o).plot(n).animate(s,c.globals.easing,o).plot(r).afterAll((function(){v.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}(),w=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(t,e,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addNormalFilter",value:function(t,e){var i=this.w;i.config.chart.dropShadow.enabled&&!t.node.classList.contains("apexcharts-marker")&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addLightenFilter",value:function(t,e,i){var a=this,n=this.w,r=i.intensity;t.unfilter(!0),new window.SVG.Filter,t.filter((function(t){var i=n.config.chart.dropShadow;(i.enabled?a.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:r}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"addDarkenFilter",value:function(t,e,i){var a=this,n=this.w,r=i.intensity;t.unfilter(!0),new window.SVG.Filter,t.filter((function(t){var i=n.config.chart.dropShadow;(i.enabled?a.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:r}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"applyFilter",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(t,e);break;case"lighten":this.addLightenFilter(t,e,{intensity:a});break;case"darken":this.addDarkenFilter(t,e,{intensity:a})}}},{key:"addShadow",value:function(t,e,i){var a=i.blur,n=i.top,r=i.left,s=i.color,o=i.opacity,l=t.flood(Array.isArray(s)?s[e]:s,o).composite(t.sourceAlpha,"in").offset(r,n).gaussianBlur(a).merge(t.source);return t.blend(t.source,l)}},{key:"dropShadow",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=e.top,n=e.left,r=e.blur,s=e.color,o=e.opacity,l=e.noUserSpaceOnUse,c=this.w;return t.unfilter(!0),v.isIE()&&"radialBar"===c.config.chart.type||(s=Array.isArray(s)?s[i]:s,t.filter((function(t){var e;e=v.isSafari()||v.isFirefox()||v.isIE()?t.flood(s,o).composite(t.sourceAlpha,"in").offset(n,a).gaussianBlur(r):t.flood(s,o).composite(t.sourceAlpha,"in").offset(n,a).gaussianBlur(r).merge(t.source),t.blend(t.source,e)})),l||t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)),t}},{key:"setSelectionFilter",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 n=a.config.states.active.filter;"none"!==n&&this.applyFilter(t,e,n.type,n.value)}}},{key:"_scaleFilterSize",value:function(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),k=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var n=e.x-t.x,r=e.y-t.y,s=Math.sqrt(n*n+r*r);return a(t,e,Math.min(1,i/s))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function n(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}var s=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(s.length>1){var l=r(s[0]),c=null;"Z"==s[s.length-1][0]&&s[0].length>2&&(c=["L",l.x,l.y],s[s.length-1]=c),o.push(s[0]);for(var h=1;h<s.length;h++){var d=o[o.length-1],u=s[h],p=u==c?s[1]:s[h+1];if(p&&d&&d.length>2&&"L"==u[0]&&p.length>2&&"L"==p[0]){var f,g,x=r(d),m=r(u),b=r(p);f=i(m,x,e),g=i(m,b,e),n(u,f),u.origPoint=m,o.push(u);var v=a(f,m,.5),y=a(m,g,.5),w=["C",v.x,v.y,y.x,y.y,g.x,g.y];w.origPoint=m,o.push(w)}else o.push(u)}if(c){var k=r(o[o.length-1]);o.push(["Z"]),n(o[0],k)}}else o=s;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt",l=this.w,c=l.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:n,"stroke-dasharray":r,"stroke-width":s,"stroke-linecap":o});return c}},{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,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",s=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,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,h=this.w,d=h.globals.dom.Paper.rect();return d.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:n,ry:n,opacity:s,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",r),d}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",n=this.w,r=n.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i});return r}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;t<0&&(t=0);var a=i.globals.dom.Paper.circle(2*t);return null!==e&&a.attr(e),a}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,n=void 0===a?"#a8a8a8":a,r=t.strokeWidth,s=void 0===r?1:r,o=t.fill,l=t.fillOpacity,c=void 0===l?1:l,h=t.strokeOpacity,d=void 0===h?1:h,u=t.classes,p=t.strokeLinecap,f=void 0===p?null:p,g=t.strokeDashArray,x=void 0===g?0:g,m=this.w;return null===f&&(f=m.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(m.globals.gridHeight)),m.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":c,stroke:n,"stroke-opacity":d,"stroke-linecap":f,"stroke-width":s,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=e.globals.dom.Paper.group();return null!==t&&i.attr(t),i}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{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,n,r){return["C",t,e,i,a,n,r].join(" ")}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,n,r,s){var o=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l="A";o&&(l="a");var c=[l,t,e,i,a,n,r,s].join(" ");return c}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,n=t.pathFrom,s=t.pathTo,o=t.stroke,l=t.strokeWidth,c=t.strokeLinecap,h=t.fill,d=t.animationDelay,u=t.initialSpeed,p=t.dataChangeSpeed,f=t.className,g=t.shouldClipToGrid,x=void 0===g||g,m=t.bindEventsOnPaths,b=void 0===m||m,v=t.drawShadow,k=void 0===v||v,S=this.w,A=new w(this.ctx),C=new y(this.ctx),P=this.w.config.chart.animations.enabled,L=P&&this.w.config.chart.animations.dynamicAnimation.enabled,T=!!(P&&!S.globals.resized||L&&S.globals.dataChanged&&S.globals.shouldAnimate);T?e=n:(e=s,S.globals.animationEnded=!0);var D,M=S.config.stroke.dashArray;D=Array.isArray(M)?M[a]:S.config.stroke.dashArray;var E=this.drawPath({d:e,stroke:o,strokeWidth:l,fill:h,fillOpacity:1,classes:f,strokeLinecap:c,strokeDashArray:D});if(E.attr("index",a),x&&E.attr({"clip-path":"url(#gridRectMask".concat(S.globals.cuid,")")}),"none"!==S.config.states.normal.filter.type)A.getDefaultFilter(E,a);else if(S.config.chart.dropShadow.enabled&&k&&(!S.config.chart.dropShadow.enabledOnSeries||S.config.chart.dropShadow.enabledOnSeries&&-1!==S.config.chart.dropShadow.enabledOnSeries.indexOf(a))){var I=S.config.chart.dropShadow;A.dropShadow(E,I,a)}b&&(E.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,E)),E.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,E)),E.node.addEventListener("mousedown",this.pathMouseDown.bind(this,E))),E.attr({pathTo:s,pathFrom:n});var O={el:E,j:i,realIndex:a,pathFrom:n,pathTo:s,fill:h,strokeWidth:l,delay:d};return!P||S.globals.resized||S.globals.dataChanged?!S.globals.resized&&S.globals.dataChanged||C.showDelayedElements():C.animatePathsGradually(r(r({},O),{},{speed:u})),S.globals.dataChanged&&L&&T&&C.animatePathsGradually(r(r({},O),{},{speed:p})),E}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=this.w,s=r.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:n+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:n+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:n}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:n}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:n})}));return s}},{key:"drawGradient",value:function(t,e,i,a,n){var r,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,h=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,n));var d=0,u=1,p=1,f=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,p=void 0!==o[2]?o[2]/100:1,f=void 0!==o[3]?o[3]/100:null);var g=!("donut"!==h.config.chart.type&&"pie"!==h.config.chart.type&&"polarArea"!==h.config.chart.type&&"bubble"!==h.config.chart.type);if(r=null===l||0===l.length?h.globals.dom.Paper.gradient(g?"radial":"linear",(function(t){t.at(d,e,a),t.at(u,i,n),t.at(p,i,n),null!==f&&t.at(f,e,a)})):h.globals.dom.Paper.gradient(g?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.at(e.offset/100,e.color,e.opacity)}))})),g){var x=h.globals.gridWidth/2,m=h.globals.gridHeight/2;"bubble"!==h.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:m,r:s}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,n=t.fontFamily,r=this.getTextRects(e,a,n),s=r.width/e.length,o=Math.floor(i/s);return i<r.width?e.slice(0,o-3)+"...":e}},{key:"drawText",value:function(t){var e=this,i=t.x,a=t.y,n=t.text,s=t.textAnchor,o=t.fontSize,l=t.fontFamily,c=t.fontWeight,h=t.foreColor,d=t.opacity,u=t.maxWidth,p=t.cssClass,f=void 0===p?"":p,g=t.isPlainText,x=void 0===g||g,m=this.w;void 0===n&&(n="");var b=n;s||(s="start"),h&&h.length||(h=m.config.chart.foreColor),l=l||m.config.chart.fontFamily,c=c||"regular";var v,y={maxWidth:u,fontSize:o=o||"11px",fontFamily:l};return Array.isArray(n)?v=m.globals.dom.Paper.text((function(t){for(var i=0;i<n.length;i++)b=n[i],u&&(b=e.getTextBasedOnMaxWidth(r({text:n[i]},y))),0===i?t.tspan(b):t.tspan(b).newLine()})):(u&&(b=this.getTextBasedOnMaxWidth(r({text:n},y))),v=x?m.globals.dom.Paper.plain(n):m.globals.dom.Paper.text((function(t){return t.tspan(b)}))),v.attr({x:i,y:a,"text-anchor":s,"dominant-baseline":"auto","font-size":o,"font-family":l,"font-weight":c,fill:h,class:"apexcharts-text "+f}),v.node.style.fontFamily=l,v.node.style.opacity=d,v}},{key:"drawMarker",value:function(t,e,i){t=t||0;var a=i.pSize||0,n=null;if("square"===i.shape||"rect"===i.shape){var r=void 0===i.pRadius?a/2:i.pRadius;null!==e&&a||(a=0,r=0);var s=1.2*a+r,o=this.drawRect(s,s,s,s,r);o.attr({x:t-s/2,y:e-s/2,cx:t,cy:e,class:i.class?i.class:"",fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,stroke:i.pointStrokeColor,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}),n=o}else"circle"!==i.shape&&i.shape||(v.isNumber(e)||(a=0,e=0),n=this.drawCircle(a,{cx:t,cy:e,class:i.class?i.class:"",stroke:i.pointStrokeColor,fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}));return n}},{key:"pathMouseEnter",value:function(t,e){var i=this.w,a=new w(this.ctx),n=parseInt(t.node.getAttribute("index"),10),r=parseInt(t.node.getAttribute("j"),10);if("function"==typeof i.config.chart.events.dataPointMouseEnter&&i.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:n,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[e,this.ctx,{seriesIndex:n,dataPointIndex:r,w:i}]),("none"===i.config.states.active.filter.type||"true"!==t.node.getAttribute("selected"))&&"none"!==i.config.states.hover.filter.type&&!i.globals.isTouchDevice){var s=i.config.states.hover.filter;a.applyFilter(t,n,s.type,s.value)}}},{key:"pathMouseLeave",value:function(t,e){var i=this.w,a=new w(this.ctx),n=parseInt(t.node.getAttribute("index"),10),r=parseInt(t.node.getAttribute("j"),10);"function"==typeof i.config.chart.events.dataPointMouseLeave&&i.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:n,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[e,this.ctx,{seriesIndex:n,dataPointIndex:r,w:i}]),"none"!==i.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==i.config.states.hover.filter.type&&a.getDefaultFilter(t,n)}},{key:"pathMouseDown",value:function(t,e){var i=this.w,a=new w(this.ctx),n=parseInt(t.node.getAttribute("index"),10),r=parseInt(t.node.getAttribute("j"),10),s="false";if("true"===t.node.getAttribute("selected")){if(t.node.setAttribute("selected","false"),i.globals.selectedDataPoints[n].indexOf(r)>-1){var o=i.globals.selectedDataPoints[n].indexOf(r);i.globals.selectedDataPoints[n].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,h=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,n)}))};h(l),h(c)}t.node.setAttribute("selected","true"),s="true",void 0===i.globals.selectedDataPoints[n]&&(i.globals.selectedDataPoints[n]=[]),i.globals.selectedDataPoints[n].push(r)}if("true"===s){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,n,d.type,d.value);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,n,u.type,u.value)}}else"none"!==i.config.states.active.filter.type&&("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice?a.getDefaultFilter(t,n):(u=i.config.states.hover.filter,a.applyFilter(t,n,u.type,u.value)));"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,s=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&s.attr("transform",a),r.globals.dom.Paper.add(s);var o=s.bbox();return n||(o=s.node.getBoundingClientRect()),s.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)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}(),S=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a<e.globals.series[e.globals.maxValsInArrayIndex].length;a++){for(var n=0,r=0;r<e.globals.series.length;r++)void 0!==e.globals.series[r][a]&&-1===t.indexOf(r)&&(n+=e.globals.series[r][a]);i.push(n)}return i}},{key:"getSeriesTotalByIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"isSeriesNull",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{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.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(e+=t.config.markers.hover.sizeOffset+1),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;a<t.length;a++)i+=t[a];else i+=t;return i}))}},{key:"getSeriesTotalsXRange",value:function(t,e){var i=this.w;return i.globals.series.map((function(a,n){for(var r=0,s=0;s<a.length;s++)i.globals.seriesX[n][s]>t&&i.globals.seriesX[n][s]<e&&(r+=a[s]);return r}))}},{key:"getPercentSeries",value:function(){var t=this.w;t.globals.seriesPercent=t.globals.series.map((function(e,i){var a=[];if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=t.globals.stackedSeriesTotals[n],s=0;r&&(s=100*e[n]/r),a.push(s)}else{var o=100*e/t.globals.seriesTotals.reduce((function(t,e){return t+e}),0);a.push(o)}return a}))}},{key:"getCalculatedRatios",value:function(){var t,e,i,a,n=this.w.globals,r=[],s=0,o=[],l=.1,c=0;if(n.yRange=[],n.isMultipleYAxis)for(var h=0;h<n.minYArr.length;h++)n.yRange.push(Math.abs(n.minYArr[h]-n.maxYArr[h])),o.push(0);else n.yRange.push(Math.abs(n.minY-n.maxY));n.xRange=Math.abs(n.maxX-n.minX),n.zRange=Math.abs(n.maxZ-n.minZ);for(var d=0;d<n.yRange.length;d++)r.push(n.yRange[d]/n.gridHeight);if(e=n.xRange/n.gridWidth,i=Math.abs(n.initialMaxX-n.initialMinX)/n.gridWidth,t=n.yRange/n.gridWidth,a=n.xRange/n.gridHeight,(s=n.zRange/n.gridHeight*16)||(s=1),n.minY!==Number.MIN_VALUE&&0!==Math.abs(n.minY)&&(n.hasNegs=!0),n.isMultipleYAxis){o=[];for(var u=0;u<r.length;u++)o.push(-n.minYArr[u]/r[u])}else o.push(-n.minY/r[0]),n.minY!==Number.MIN_VALUE&&0!==Math.abs(n.minY)&&(l=-n.minY/t,c=n.minX/e);return{yRatio:r,invertedYRatio:t,zRatio:s,xRatio:e,initialXRatio:i,invertedXRatio:a,baseLineInvertedY:l,baseLineY:o,baseLineX:c}}},{key:"getLogSeries",value:function(t){var e=this,i=this.w;return i.globals.seriesLog=t.map((function(t,a){return i.config.yaxis[a]&&i.config.yaxis[a].logarithmic?t.map((function(t){return null===t?null:e.getLogVal(i.config.yaxis[a].logBase,t,a)})):t})),i.globals.invalidLogScale?t:i.globals.seriesLog}},{key:"getBaseLog",value:function(t,e){return Math.log(e)/Math.log(t)}},{key:"getLogVal",value:function(t,e,i){if(0===e)return 0;var a=this.w,n=0===a.globals.minYArr[i]?-1:this.getBaseLog(t,a.globals.minYArr[i]),r=(0===a.globals.maxYArr[i]?0:this.getBaseLog(t,a.globals.maxYArr[i]))-n;return e<1?e/r:(this.getBaseLog(t,e)-n)/r}},{key:"getLogYRatios",value:function(t){var e=this,i=this.w,a=this.w.globals;return a.yLogRatio=t.slice(),a.logYRange=a.yRange.map((function(t,n){if(i.config.yaxis[n]&&e.w.config.yaxis[n].logarithmic){var r,s=-Number.MAX_VALUE,o=Number.MIN_VALUE;return a.seriesLog.forEach((function(t,e){t.forEach((function(t){i.config.yaxis[e]&&i.config.yaxis[e].logarithmic&&(s=Math.max(t,s),o=Math.min(t,o))}))})),r=Math.pow(a.yRange[n],Math.abs(o-s)/a.yRange[n]),a.yLogRatio[n]=r/a.gridHeight,r}})),a.invalidLogScale?t.slice():a.yLogRatio}}],[{key:"checkComboSeries",value:function(t){var e=!1,i=0,a=0;return t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&a++})),a>0&&(e=!0),{comboBarCount:i,comboCharts:e}}},{key:"extendArrayProps",value:function(t,e,i){return e.yaxis&&(e=t.extendYAxis(e,i)),e.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),e.annotations.xaxis&&(e=t.extendXAxisAnnotations(e)),e.annotations.points&&(e=t.extendPointAnnotations(e))),e}}]),t}(),A=function(){function t(e){o(this,t),this.w=e.w,this.annoCtx=e}return c(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,n=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==n){var r=n.getBoundingClientRect();n.setAttribute("x",parseFloat(n.getAttribute("x"))-r.height+4),"top"===t.label.position?n.setAttribute("y",parseFloat(n.getAttribute("y"))+r.width):n.setAttribute("y",parseFloat(n.getAttribute("y"))-r.width);var s=this.annoCtx.graphics.rotateAroundCenter(n),o=s.x,l=s.y;n.setAttribute("transform","rotate(-90 ".concat(o," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||void 0===e.label.text||void 0!==e.label.text&&!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),n=t.getBoundingClientRect(),r=e.label.style.padding.left,s=e.label.style.padding.right,o=e.label.style.padding.top,l=e.label.style.padding.bottom;"vertical"===e.label.orientation&&(o=e.label.style.padding.left,l=e.label.style.padding.right,r=e.label.style.padding.top,s=e.label.style.padding.bottom);var c=n.left-a.left-r,h=n.top-a.top-o,d=this.annoCtx.graphics.drawRect(c-i.globals.barPadForNumericAxis,h,n.width+r+s,n.height+o+l,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&d.node.classList.add(e.id),d}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,n){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(a,"']"));if(r){var s=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(s.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};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:"getY1Y2",value:function(t,e){var i,a="y1"===t?e.y:e.y2,n=this.w;if(this.annoCtx.invertAxis){var r=n.globals.labels.indexOf(a);n.config.xaxis.convertedCatToNumeric&&(r=n.globals.categoryLabels.indexOf(a));var s=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(r+1)+")");s&&(i=parseFloat(s.getAttribute("y")))}else{var o;o=n.config.yaxis[e.yAxisIndex].logarithmic?(a=new S(this.annoCtx.ctx).getLogVal(a,e.yAxisIndex))/n.globals.yLogRatio[e.yAxisIndex]:(a-n.globals.minYArr[e.yAxisIndex])/(n.globals.yRange[e.yAxisIndex]/n.globals.gridHeight),i=n.globals.gridHeight-o,!e.marker||void 0!==e.y&&null!==e.y||(i=0),n.config.yaxis[e.yAxisIndex]&&n.config.yaxis[e.yAxisIndex].reversed&&(i=o)}return"string"==typeof a&&a.indexOf("px")>-1&&(i=parseFloat(a)),i}},{key:"getX1X2",value:function(t,e){var i=this.w,a=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,n=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,r=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,s=(e.x-a)/(r/i.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(s=(n-e.x)/(r/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(s=this.getStringX(e.x));var o=(e.x2-a)/(r/i.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(o=(n-e.x2)/(r/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(o=this.getStringX(e.x2)),void 0!==e.x&&null!==e.x||!e.marker||(s=i.globals.gridWidth),"x1"===t&&"string"==typeof e.x&&e.x.indexOf("px")>-1&&(s=parseFloat(e.x)),"x2"===t&&"string"==typeof e.x2&&e.x2.indexOf("px")>-1&&(o=parseFloat(e.x2)),"x1"===t?s:o}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.indexOf(t),n=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(a+1)+")");return n&&(i=parseFloat(n.getAttribute("x"))),i}}]),t}(),C=function(){function t(e){o(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new A(this.annoCtx)}return c(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,n=this.w,r=this.helpers.getX1X2("x1",t),s=t.label.text,o=t.strokeDashArray;if(v.isNumber(r)){if(null===t.x2||void 0===t.x2){var l=this.annoCtx.graphics.drawLine(r+t.offsetX,0+t.offsetY,r+t.offsetX,n.globals.gridHeight+t.offsetY,t.borderColor,o,t.borderWidth);e.appendChild(l.node),t.id&&l.node.classList.add(t.id)}else{if((a=this.helpers.getX1X2("x2",t))<r){var c=r;r=a,a=c}var h=this.annoCtx.graphics.drawRect(r+t.offsetX,0+t.offsetY,a-r,n.globals.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,o);h.node.classList.add("apexcharts-annotation-rect"),h.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),e.appendChild(h.node),t.id&&h.node.classList.add(t.id)}var d=this.annoCtx.graphics.getTextRects(s,parseFloat(t.label.style.fontSize)),u="top"===t.label.position?4:"center"===t.label.position?n.globals.gridHeight/2+("vertical"===t.label.orientation?d.width/2:0):n.globals.gridHeight,p=this.annoCtx.graphics.drawText({x:r+t.label.offsetX,y:u+t.label.offsetY-("vertical"===t.label.orientation?"top"===t.label.position?d.width/2-12:-d.width/2:0),text:s,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});p.attr({rel:i}),e.appendChild(p.node),this.annoCtx.helpers.setOrientations(t,i)}}},{key:"drawXAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return e.config.annotations.xaxis.map((function(e,a){t.addXaxisAnnotation(e,i.node,a)})),i}}]),t}(),P=function(){function t(e){o(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new A(this.annoCtx)}return c(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,n=this.w,r=t.strokeDashArray,s=this.helpers.getY1Y2("y1",t),o=t.label.text;if(null===t.y2||void 0===t.y2){var l=this.annoCtx.graphics.drawLine(0+t.offsetX,s+t.offsetY,this._getYAxisAnnotationWidth(t),s+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(l.node),t.id&&l.node.classList.add(t.id)}else{if((a=this.helpers.getY1Y2("y2",t))>s){var c=s;s=a,a=c}var h=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),s-a,0,t.fillColor,t.opacity,1,t.borderColor,r);h.node.classList.add("apexcharts-annotation-rect"),h.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),e.appendChild(h.node),t.id&&h.node.classList.add(t.id)}var d="right"===t.label.position?n.globals.gridWidth:"center"===t.label.position?n.globals.gridWidth/2:0,u=this.annoCtx.graphics.drawText({x:d+t.label.offsetX,y:(null!=a?a:s)+t.label.offsetY-3,text:o,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});u.attr({rel:i}),e.appendChild(u.node)}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.map((function(e,a){t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),L=function(){function t(e){o(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new A(this.annoCtx)}return c(t,[{key:"addPointAnnotation",value:function(t,e,i){this.w;var a=this.helpers.getX1X2("x1",t),n=this.helpers.getY1Y2("y1",t);if(v.isNumber(a)){var r={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},s=this.annoCtx.graphics.drawMarker(a+t.marker.offsetX,n+t.marker.offsetY,r);e.appendChild(s.node);var o=t.label.text?t.label.text:"",l=this.annoCtx.graphics.drawText({x:a+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:o,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(l.attr({rel:i}),e.appendChild(l.node),t.customSVG.SVG){var c=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});c.attr({transform:"translate(".concat(a+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),c.node.innerHTML=t.customSVG.SVG,e.appendChild(c.node)}if(t.image.path){var h=t.image.width?t.image.width:20,d=t.image.height?t.image.height:20;s=this.annoCtx.addImage({x:a+t.image.offsetX-h/2,y:n+t.image.offsetY-d/2,width:h,height:d,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&s.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&s.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&s.node.addEventListener("click",t.click.bind(this,t))}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}(),T={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},D=function(){function t(){o(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return c(t,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[T],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(t){return new Date(t).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),M=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.graphics=new k(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new A(this),this.xAxisAnnotations=new C(this),this.yAxisAnnotations=new P(this),this.pointsAnnotations=new L(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return c(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),n=t.config.chart.animations.enabled,r=[e,i,a],s=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!n||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&s[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:s[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,n=t.text,r=t.textAnchor,s=t.foreColor,o=t.fontSize,l=t.fontFamily,c=t.fontWeight,h=t.cssClass,d=t.backgroundColor,u=t.borderWidth,p=t.strokeDashArray,f=t.borderRadius,g=t.borderColor,x=t.appendTo,m=void 0===x?".apexcharts-annotations":x,b=t.paddingLeft,v=void 0===b?4:b,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,P=this.w,L=this.graphics.drawText({x:i,y:a,text:n,textAnchor:r||"start",fontSize:o||"12px",fontWeight:c||"regular",fontFamily:l||P.config.chart.fontFamily,foreColor:s||P.config.chart.foreColor,cssClass:h}),T=P.globals.dom.baseEl.querySelector(m);T&&T.appendChild(L.node);var D=L.bbox();if(n){var M=this.graphics.drawRect(D.x-v,D.y-C,D.width+v+w,D.height+S+C,f,d||"transparent",1,u,g,p);T.insertBefore(M.node,L.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,n=t.x,r=void 0===n?0:n,s=t.y,o=void 0===s?0:s,l=t.width,c=void 0===l?20:l,h=t.height,d=void 0===h?20:h,u=t.appendTo,p=void 0===u?".apexcharts-annotations":u,f=i.globals.dom.Paper.image(a);f.size(c,d).move(r,o);var g=i.globals.dom.baseEl.querySelector(p);return g&&g.appendChild(f.node),f}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,n=t.type,r=t.contextMethod,s=a,o=s.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations")),c=l.childNodes.length+1,h=new D,d=Object.assign({},"xaxis"===n?h.xAxisAnnotation:"yaxis"===n?h.yAxisAnnotation:h.pointAnnotation),u=v.extend(d,e);switch(n){case"xaxis":this.addXaxisAnnotation(u,l,c);break;case"yaxis":this.addYaxisAnnotation(u,l,c);break;case"point":this.addPointAnnotation(u,l,c)}var p=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(c,"']")),f=this.helpers.addBackgroundToAnno(p,u);return f&&l.insertBefore(f.node,p),i&&o.globals.memory.methodsToExec.push({context:s,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");e.globals.memory.methodsToExec.map((function(t,i){"addText"!==t.label&&"addAnnotation"!==t.label||e.globals.memory.methodsToExec.splice(i,1)})),i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),E=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return c(t,[{key:"isValidDate",value:function(t){return!isNaN(this.parseDate(t))}},{key:"getTimeStamp",value:function(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}},{key:"getDate",value:function(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}},{key:"parseDate",value:function(t){var e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);var i=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(t,e){var i=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,n=["\0"].concat(x(i.months)),r=[""].concat(x(i.shortMonths)),s=[""].concat(x(i.days)),o=[""].concat(x(i.shortDays));function l(t,e){var i=t+"";for(e=e||2;i.length<e;)i="0"+i;return i}var c=a?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);var h=(a?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+n[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+l(h))).replace(/(^|[^\\])M/g,"$1"+h);var d=a?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+s[0])).replace(/(^|[^\\])ddd/g,"$1"+o[0])).replace(/(^|[^\\])dd/g,"$1"+l(d))).replace(/(^|[^\\])d/g,"$1"+d);var u=a?t.getUTCHours():t.getHours(),p=u>12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(p))).replace(/(^|[^\\])h/g,"$1"+p);var f=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(f))).replace(/(^|[^\\])m/g,"$1"+f);var g=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var m=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(m,3)),m=Math.round(m/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(m)),m=Math.round(m/10);var b=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+m)).replace(/(^|[^\\])TT+/g,"$1"+b)).replace(/(^|[^\\])T/g,"$1"+b.charAt(0));var v=b.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var S=(a?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(o[0],"g"),o[S])).replace(new RegExp(n[0],"g"),n[h])).replace(new RegExp(r[0],"g"),r[h])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var n=this.getDate(t),r=this.getDate(e),s=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(s[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(s[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(s[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(s[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(s[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(s[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(s[0],10),maxYear:parseInt(o[0],10)}}},{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=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),I=function(t){var e,i=t.ctx,a=t.seriesIndex,n=t.dataPointIndex,r=t.y1,s=t.y2,o=t.w,l=o.globals.seriesRangeStart[a][n],c=o.globals.seriesRangeEnd[a][n],h=o.globals.labels[n],d=o.config.series[a].name?o.config.series[a].name:"",u=o.config.tooltip.y.formatter,p=o.config.tooltip.y.title.formatter,f={w:o,seriesIndex:a,dataPointIndex:n,start:l,end:c};"function"==typeof p&&(d=p(d,f)),null!==(e=o.config.series[a].data[n])&&void 0!==e&&e.x&&(h=o.config.series[a].data[n].x+":"),"function"==typeof u&&(h=u(h,f)),Number.isFinite(r)&&Number.isFinite(s)&&(l=r,c=s);var g="",x="",m=o.globals.colors[a];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){var b=new E(i);g=b.formatDate(b.getDate(l),o.config.tooltip.x.format),x=b.formatDate(b.getDate(c),o.config.tooltip.x.format)}else g=l,x=c;else g=o.config.tooltip.x.formatter(l),x=o.config.tooltip.x.formatter(c);return{start:l,end:c,startVal:g,endVal:x,ylabel:h,color:m,seriesName:d}},O=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,n=t.start,r=t.end,s=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(s);n=l.yLbFormatter(n),r=l.yLbFormatter(r);var c=l.yLbFormatter(t.w.globals.series[s][o]),h='<span class="value start-value">\n '.concat(n,'\n </span> <span class="separator">-</span> <span class="value end-value">\n ').concat(r,"\n </span>");return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(i||"")+'</span></div><div> <span class="category">'+a+" </span> "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[s].type||"rangeBar"===t.w.config.series[s].type?h:"<span>".concat(c,"</span>"):h)+" </div></div>"},R=function(){function t(e){o(this,t),this.opts=e}return c(t,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0,v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,n=e.w,r=function(){var t=n.globals.seriesRangeStart[i][a];return n.globals.seriesRangeEnd[i][a]-t};return n.globals.comboCharts?"rangeBar"===n.config.series[i].type||"rangeArea"===n.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=I(t),i=e.color,a=e.seriesName,n=e.ylabel,s=e.startVal,o=e.endVal;return O(r(r({},t),{},{color:i,seriesName:a,ylabel:n,start:s,end:o}))}(t):function(t){var e=I(t),i=e.color,a=e.seriesName,n=e.ylabel,s=e.start,o=e.end;return O(r(r({},t),{},{color:i,seriesName:a,ylabel:n,start:s,end:o}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=I(t),i=e.color,a=e.seriesName,n=e.ylabel,s=e.start,o=e.end;return O(r(r({},t),{},{color:i,seriesName:a,ylabel:n,start:s,end:o}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,n=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(n=i.map((function(t){return Array.isArray(t)?t:String(t)}))),n&&n.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(n[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",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:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,n){var r=t.globals.seriesCandleO[e][i],s=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],c=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==n?'<div class="apexcharts-custom-tooltip">\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": <strong>").concat(t.globals.series[e][i],"</strong>\n </div>"):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(t.config.chart.type,'">')+"<div>".concat(a[0],': <span class="value">')+r+"</span></div>"+"<div>".concat(a[1],': <span class="value">')+s+"</span></div>"+(o?"<div>".concat(a[2],': <span class="value">')+o+"</span></div>":"")+"<div>".concat(a[3],': <span class="value">')+l+"</span></div>"+"<div>".concat(a[4],': <span class="value">')+c+"</span></div></div>"}}]),t}(),N=function(){function t(e){o(this,t),this.opts=e}return c(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new D,n=new R(i);this.chartType=i.chart.type,"histogram"===this.chartType&&(i.chart.type="bar",i=v.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},i)),i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),o={};if(i&&"object"===s(i)){var l={};l=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","histogram","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?n[i.chart.type]():n.line(),i.chart.brush&&i.chart.brush.enabled&&(l=n.brush(l)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=n.stacked100(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),((i=this.checkForCatToNumericXAxis(this.chartType,l,i)).chart.sparkline&&i.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(l=n.sparkline(l)),o=v.extend(r,l)}var c=v.extend(o,window.Apex);return r=v.extend(c,i),this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a=new R(i),n=("bar"===t||"boxPlot"===t)&&i.plotOptions&&i.plotOptions.bar&&i.plotOptions.bar.horizontal,r="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,s="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,o=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||r||!s||"between"===o||(i=a.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new D;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var n=t.series;return e&&!n&&(n=e.config.series),a&&n.length!==t.yaxis.length&&n.length&&(t.yaxis=n.map((function(e,a){if(e.name||(n[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=n[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&n.length>1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new D;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new D;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new D;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.chart.background||(t.chart.background="#424242"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),z=function(){function t(){o(this,t)}return c(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasGroups=!1,t.groups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.xaxisLabelsCount=0,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),F=function(){function t(e){o(this,t),this.opts=e}return c(t,[{key:"init",value:function(){var t=new N(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new z).init(t)}}}]),t}(),Y=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return c(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),n=parseInt(e.globals.gridHeight,10),r=a>n?a:n,s=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");k.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var h=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(h),h.setAttributeNS(window.SVG.xlink,"href",s),k.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),h.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||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||"heatmap"===e.config.chart.type||"treemap"===e.config.chart.type?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(t){var e=this.w;this.opts=t;var i,a,n,r=this.w.config;this.seriesIndex=this.getSeriesIndex(t);var s=this.getFillColors()[this.seriesIndex];void 0!==e.globals.seriesColors[this.seriesIndex]&&(s=e.globals.seriesColors[this.seriesIndex]),"function"==typeof s&&(s=s({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:e}));var o=t.fillType?t.fillType:this.getFillType(this.seriesIndex),l=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;t.color&&(s=t.color);var c=s;if(-1===s.indexOf("rgb")?s.length<9&&(c=v.hexToRgba(s,l)):s.indexOf("rgba")>-1&&(l=v.getOpacityFromRGBA(s)),t.opacity&&(l=t.opacity),"pattern"===o&&(a=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:a,fillColor:s,fillOpacity:l,defaultColor:c})),"gradient"===o&&(n=this.handleGradientFill({fillConfig:t.fillConfig,fillColor:s,fillOpacity:l,i:this.seriesIndex})),"image"===o){var h=r.fill.image.src,d=t.patternID?t.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(h)?t.seriesNumber<h.length?h[t.seriesNumber]:h[0]:h,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:"pattern".concat(e.globals.cuid).concat(t.seriesNumber+1).concat(d)}),i="url(#pattern".concat(e.globals.cuid).concat(t.seriesNumber+1).concat(d,")")}else i="gradient"===o?n:"pattern"===o?a:c;return t.solid&&(i=c),i}},{key:"getFillType",value:function(t){var e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}},{key:"getFillColors",value:function(){var t=this.w,e=t.config,i=this.opts,a=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?a=t.globals.stroke.colors:a.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?a=t.globals.fill.colors:a.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?a=t.globals.stroke.colors:a.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?a=t.globals.fill.colors:a.push(t.globals.fill.colors),void 0!==i.fillColors&&(a=[],Array.isArray(i.fillColors)?a=i.fillColors.slice():a.push(i.fillColors)),a}},{key:"handlePatternFill",value:function(t){var e=t.fillConfig,i=(t.patternFill,t.fillColor),a=t.fillOpacity,n=t.defaultColor,r=this.w.config.fill;e&&(r=e);var s=this.opts,o=new k(this.ctx),l=Array.isArray(r.pattern.strokeWidth)?r.pattern.strokeWidth[this.seriesIndex]:r.pattern.strokeWidth,c=i;return Array.isArray(r.pattern.style)?void 0!==r.pattern.style[s.seriesNumber]?o.drawPattern(r.pattern.style[s.seriesNumber],r.pattern.width,r.pattern.height,c,l,a):n:o.drawPattern(r.pattern.style,r.pattern.width,r.pattern.height,c,l,a)}},{key:"handleGradientFill",value:function(t){var e=t.fillColor,i=t.fillOpacity,a=t.fillConfig,n=t.i,s=this.w.config.fill;a&&(s=r(r({},s),a));var o,l=this.opts,c=new k(this.ctx),h=new v,d=s.gradient.type,u=e,p=void 0===s.gradient.opacityFrom?i:Array.isArray(s.gradient.opacityFrom)?s.gradient.opacityFrom[n]:s.gradient.opacityFrom;u.indexOf("rgba")>-1&&(p=v.getOpacityFromRGBA(u));var f=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[n]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)o="dark"===s.gradient.shade?h.shadeColor(-1*parseFloat(s.gradient.shadeIntensity),e.indexOf("rgb")>-1?v.rgb2hex(e):e):h.shadeColor(parseFloat(s.gradient.shadeIntensity),e.indexOf("rgb")>-1?v.rgb2hex(e):e);else if(s.gradient.gradientToColors[l.seriesNumber]){var g=s.gradient.gradientToColors[l.seriesNumber];o=g,g.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(g))}else o=e;if(s.gradient.gradientFrom&&(u=s.gradient.gradientFrom),s.gradient.gradientTo&&(o=s.gradient.gradientTo),s.gradient.inverseColors){var x=u;u=o,o=x}return u.indexOf("rgb")>-1&&(u=v.rgb2hex(u)),o.indexOf("rgb")>-1&&(o=v.rgb2hex(o)),c.drawGradient(d,u,o,p,f,l.size,s.gradient.stops,s.gradient.colorStops,n)}}]),t}(),X=function(){function t(e,i){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.globals.series.length+1)for(var e=0;e<=t.globals.series.length;e++)void 0===t.globals.markers.size[e]&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map((function(e){return t.config.markers.size}))}},{key:"plotChartMarkers",value:function(t,e,i,a){var n,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=this.w,o=e,l=t,c=null,h=new k(this.ctx),d=s.config.markers.discrete&&s.config.markers.discrete.length;if((s.globals.markers.size[e]>0||r||d)&&(c=h.group({class:r||d?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(s.globals.cuid,")")),Array.isArray(l.x))for(var u=0;u<l.x.length;u++){var p=i;1===i&&0===u&&(p=0),1===i&&1===u&&(p=1);var f="apexcharts-marker";"line"!==s.config.chart.type&&"area"!==s.config.chart.type||s.globals.comboCharts||s.config.tooltip.intersect||(f+=" no-pointer-events");var g=Array.isArray(s.config.markers.size)?s.globals.markers.size[e]>0:s.config.markers.size>0;if(g||r||d){v.isNumber(l.y[u])?f+=" w".concat(v.randomId()):f="apexcharts-nullpoint";var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:p});s.config.series[o].data[p]&&(s.config.series[o].data[p].fillColor&&(x.pointFillColor=s.config.series[o].data[p].fillColor),s.config.series[o].data[p].strokeColor&&(x.pointStrokeColor=s.config.series[o].data[p].strokeColor)),a&&(x.pSize=a),(n=h.drawMarker(l.x[u],l.y[u],x)).attr("rel",p),n.attr("j",p),n.attr("index",e),n.node.setAttribute("default-marker-size",x.pSize);var m=new w(this.ctx);m.setSelectionFilter(n,e,p),this.addEvents(n),c&&c.add(n)}else void 0===s.globals.pointsArray[e]&&(s.globals.pointsArray[e]=[]),s.globals.pointsArray[e].push([l.x[u],l.y[u]])}return c}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,n=void 0===a?null:a,r=t.finishRadius,s=void 0===r?null:r,o=this.w,l=this.getMarkerStyle(i),c=o.globals.markers.size[i],h=o.config.markers;return null!==n&&h.discrete.length&&h.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===n&&(l.pointStrokeColor=t.strokeColor,l.pointFillColor=t.fillColor,c=t.size,l.pointShape=t.shape)})),{pSize:null===s?c:s,pRadius:h.radius,width:Array.isArray(h.width)?h.width[i]:h.width,height:Array.isArray(h.height)?h.height[i]:h.height,pointStrokeWidth:Array.isArray(h.strokeWidth)?h.strokeWidth[i]:h.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(h.shape)?h.shape[i]:h.shape),class:e,pointStrokeOpacity:Array.isArray(h.strokeOpacity)?h.strokeOpacity[i]:h.strokeOpacity,pointStrokeDashArray:Array.isArray(h.strokeDashArray)?h.strokeDashArray[i]:h.strokeDashArray,pointFillOpacity:Array.isArray(h.fillOpacity)?h.fillOpacity[i]:h.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new k(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),_=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return c(t,[{key:"draw",value:function(t,e,i){var a=this.w,n=new k(this.ctx),r=i.realIndex,s=i.pointsPos,o=i.zRatio,l=i.elParent,c=n.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(s.x))for(var h=0;h<s.x.length;h++){var d=e+1,u=!0;0===e&&0===h&&(d=0),0===e&&1===h&&(d=1);var p=0,f=a.globals.markers.size[r];if(o!==1/0){var g=a.config.plotOptions.bubble;f=a.globals.seriesZ[r][d],g.zScaling&&(f/=o),g.minBubbleRadius&&f<g.minBubbleRadius&&(f=g.minBubbleRadius),g.maxBubbleRadius&&f>g.maxBubbleRadius&&(f=g.maxBubbleRadius)}a.config.chart.animations.enabled||(p=f);var x=s.x[h],m=s.y[h];if(p=p||0,null!==m&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(x,m,p,f,r,d,e);c.add(b)}l.add(c)}}},{key:"drawPoint",value:function(t,e,i,a,n,r,s){var o=this.w,l=n,c=new y(this.ctx),h=new w(this.ctx),d=new Y(this.ctx),u=new X(this.ctx),p=new k(this.ctx),f=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:r,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[n]&&"bubble"===o.config.series[n].type?a:null});a=f.pSize;var g,x=d.fillPath({seriesNumber:n,dataPointIndex:r,color:f.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[n][s]});if("circle"===f.shape?g=p.drawCircle(i):"square"!==f.shape&&"rect"!==f.shape||(g=p.drawRect(0,0,f.width-f.pointStrokeWidth/2,f.height-f.pointStrokeWidth/2,f.pRadius)),o.config.series[l].data[r]&&o.config.series[l].data[r].fillColor&&(x=o.config.series[l].data[r].fillColor),g.attr({x:t-f.width/2-f.pointStrokeWidth/2,y:e-f.height/2-f.pointStrokeWidth/2,cx:t,cy:e,fill:x,"fill-opacity":f.pointFillOpacity,stroke:f.pointStrokeColor,r:a,"stroke-width":f.pointStrokeWidth,"stroke-dasharray":f.pointStrokeDashArray,"stroke-opacity":f.pointStrokeOpacity}),o.config.chart.dropShadow.enabled){var m=o.config.chart.dropShadow;h.dropShadow(g,m,n)}if(!this.initialAnim||o.globals.dataChanged||o.globals.resized)o.globals.animationEnded=!0;else{var b=o.config.chart.animations.speed;c.animateMarker(g,0,"circle"===f.shape?a:{width:f.width,height:f.height},b,o.globals.easing,(function(){window.setTimeout((function(){c.animationCompleted(g)}),100)}))}if(o.globals.dataChanged&&"circle"===f.shape)if(this.dynamicAnim){var v,S,A,C,P=o.config.chart.animations.dynamicAnimation.speed;null!=(C=o.globals.previousPaths[n]&&o.globals.previousPaths[n][s])&&(v=C.x,S=C.y,A=void 0!==C.r?C.r:a);for(var L=0;L<o.globals.collapsedSeries.length;L++)o.globals.collapsedSeries[L].index===n&&(P=1,a=0);0===t&&0===e&&(a=0),c.animateCircle(g,{cx:v,cy:S,r:A},{cx:t,cy:e,r:a},P,o.globals.easing)}else g.attr({r:a});return g.attr({rel:r,j:r,index:n,"default-marker-size":a}),h.setSelectionFilter(g,n,r),u.addEvents(g),g.node.classList.add("apexcharts-marker"),g}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),H=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,n,r,s){var o=this.w,l=!1,c=new k(this.ctx).getTextRects(i,s),h=c.width,d=c.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:h,height:d});var u=o.globals.dataLabelsRects[a].length-2,p=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var f=o.globals.dataLabelsRects[a][p];(t>f.x+f.width+2||e>f.y+f.height+2||t+h<f.x)&&(l=!0)}return(0===n||r)&&(l=!0),{x:t,y:e,textRects:c,drawnextLabel:l}}},{key:"drawDataLabel",value:function(t){var e=this,i=t.type,a=t.pos,n=t.i,r=t.j,s=t.isRangeStart,o=t.strokeWidth,l=void 0===o?2:o,c=this.w,h=new k(this.ctx),d=c.config.dataLabels,u=0,p=0,f=r,g=null;if(!d.enabled||!Array.isArray(a.x))return g;g=h.group({class:"apexcharts-data-labels"});for(var x=0;x<a.x.length;x++)if(u=a.x[x]+d.offsetX,p=a.y[x]+d.offsetY+l,!isNaN(u)){1===r&&0===x&&(f=0),1===r&&1===x&&(f=1);var m=c.globals.series[n][f];"rangeArea"===i&&(m=s?c.globals.seriesRangeStart[n][f]:c.globals.seriesRangeEnd[n][f]);var b="",v=function(t){return c.config.dataLabels.formatter(t,{ctx:e.ctx,seriesIndex:n,dataPointIndex:f,w:c})};"bubble"===c.config.chart.type?(b=v(m=c.globals.seriesZ[n][f]),p=a.y[x],p=new _(this.ctx).centerTextInBubble(p,n,f).y):void 0!==m&&(b=v(m)),this.plotDataLabelsText({x:u,y:p,text:b,i:n,j:f,parent:g,offsetCorrection:!0,dataLabelsConfig:c.config.dataLabels})}return g}},{key:"plotDataLabelsText",value:function(t){var e=this.w,i=new k(this.ctx),a=t.x,n=t.y,r=t.i,s=t.j,o=t.text,l=t.textAnchor,c=t.fontSize,h=t.parent,d=t.dataLabelsConfig,u=t.color,p=t.alwaysDrawDataLabel,f=t.offsetCorrection;if(!(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(r)<0)){var g={x:a,y:n,drawnextLabel:!0,textRects:null};f&&(g=this.dataLabelsCorrection(a,n,o,r,s,p,parseInt(d.style.fontSize,10))),e.globals.zoomed||(a=g.x,n=g.y),g.textRects&&(a<-10-g.textRects.width||a>e.globals.gridWidth+g.textRects.width+10)&&(o="");var x=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(x=e.globals.dataLabels.style.colors[s]),"function"==typeof x&&(x=x({series:e.globals.series,seriesIndex:r,dataPointIndex:s,w:e})),u&&(x=u);var m=d.offsetX,b=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(m=0,b=0),g.drawnextLabel){var v=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+m,y:n+b,foreColor:x,textAnchor:l||d.textAnchor,text:o,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"});if(v.attr({class:"apexcharts-datalabel",cx:a,cy:n}),d.dropShadow.enabled){var y=d.dropShadow;new w(this.ctx).dropShadow(v,y)}h.add(v),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(s)}}}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,n=a.padding,r=a.padding/2,s=e.width,o=e.height,l=new k(this.ctx).drawRect(e.x-n,e.y-r/2,s+2*n,o+r,a.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new w(this.ctx).dropShadow(l,a.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i<e.length;i++){var a=e[i],n=a.getBBox(),r=null;if(n.width&&n.height&&(r=this.addBackgroundToDataLabel(a,n)),r){a.parentNode.insertBefore(r.node,a);var s=a.getAttribute("fill");!t.config.chart.animations.enabled||t.globals.resized||t.globals.dataChanged?r.attr({fill:s}):r.animate().attr({fill:s}),a.setAttribute("fill",t.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var t=this.w,e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=t.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),a=0;a<e.length;a++)i&&i.insertBefore(e[a],i.nextSibling)}}]),t}(),$=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return c(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(t){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(v.escapeString(t),"']"))}},{key:"isSeriesHidden",value:function(t){var e=this.getSeriesByName(t),i=parseInt(e.getAttribute("data:realIndex"),10);return{isHidden:e.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(t,e){var i=this.w;function a(i){for(var a=0;a<i.length;a++)i[a].index===e&&t.node.classList.add("apexcharts-series-collapsed")}a(i.globals.collapsedSeries),a(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(t){var e=this.isSeriesHidden(t);return this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,e.isHidden),e.isHidden}},{key:"showSeries",value:function(t){var e=this.isSeriesHidden(t);e.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,!0)}},{key:"hideSeries",value:function(t){var e=this.isSeriesHidden(t);e.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,!1)}},{key:"resetSeries",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],a=this.w,n=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),a.config.series=n,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(n,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i<t.length;i++)e.globals.collapsedSeriesIndices.indexOf(i)>-1&&(t[i].data=[]);return t}},{key:"toggleSeriesOnHover",value:function(t,e){var i=this.w;e||(e=t.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===t.type){var n=parseInt(e.getAttribute("rel"),10)-1,r=null,s=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(r=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(n,"']")),s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(n,"']"))):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(n+1,"']")):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(n+1,"'] path"));for(var o=0;o<a.length;o++)a[o].classList.add(this.legendInactiveClass);null!==r&&(i.globals.axisCharts||r.parentNode.classList.remove(this.legendInactiveClass),r.classList.remove(this.legendInactiveClass),null!==s&&s.classList.remove(this.legendInactiveClass))}else if("mouseout"===t.type)for(var l=0;l<a.length;l++)a[l].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(t,e){var i=this,a=this.w,n=a.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),r=function(t){for(var e=0;e<n.length;e++)n[e].classList[t](i.legendInactiveClass)};if("mousemove"===t.type){var s=parseInt(e.getAttribute("rel"),10)-1;r("add"),function(t){for(var e=0;e<n.length;e++){var a=parseInt(n[e].getAttribute("val"),10);a>=t.from&&a<=t.to&&n[e].classList.remove(i.legendInactiveClass)}}(a.config.plotOptions.heatmap.colorScale.ranges[s])}else"mouseout"===t.type&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var n=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:n.length-1;"asc"===t?r<n.length:r>=0;"asc"===t?r++:r--)if(-1!==n[r]){a=n[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var n=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},s=0;s<n.length;s++)if(n[s].hasAttribute("pathTo")){var o=n[s].getAttribute("pathTo");r.paths.push({d:o})}t.globals.previousPaths.push(r)}t.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach((function(i){for(var a,n=(a=i,t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(a,"-series .apexcharts-series"))),r=0;r<n.length;r++)e(n,r,i)})),this.handlePrevBubbleScatterPaths("bubble"),this.handlePrevBubbleScatterPaths("scatter");var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series"));if(i.length>0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],n=function(t){var e=function(e){return i[t].getAttribute(e)},n={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:n,color:i[t].getAttribute("color")})},r=0;r<i.length;r++)n(r);t.globals.previousPaths.push(a)},n=0;n<i.length;n++)a(n);t.globals.axisCharts||(t.globals.previousPaths=t.globals.series)}},{key:"handlePrevBubbleScatterPaths",value:function(t){var e=this.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t,"-series .apexcharts-series"));if(i.length>0)for(var a=0;a<i.length;a++){for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t,"-series .apexcharts-series[data\\:realIndex='").concat(a,"'] circle")),r=[],s=0;s<n.length;s++)r.push({x:n[s].getAttribute("cx"),y:n[s].getAttribute("cy"),r:n[s].getAttribute("r")});e.globals.previousPaths.push(r)}}},{key:"clearPreviousPaths",value:function(){var t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var t=this.w,e=t.config.noData,i=new k(this.ctx),a=t.globals.svgWidth/2,n=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(a=10,r="start"):"right"===e.align&&(a=t.globals.svgWidth-10,r="end"),"top"===e.verticalAlign?n=50:"bottom"===e.verticalAlign&&(n=t.globals.svgHeight-50),a+=e.offsetX,n=n+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){var s=i.drawText({x:a,y:n,text:e.text,textAnchor:r,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,class:"apexcharts-text-nodata"});t.globals.dom.Paper.add(s)}}},{key:"setNullSeriesToZeroValues",value:function(t){for(var e=this.w,i=0;i<t.length;i++)if(0===t[i].length)for(var a=0;a<t[e.globals.maxValsInArrayIndex].length;a++)t[i].push(0);return t}},{key:"hasAllSeriesEqualX",value:function(){for(var t=!0,e=this.w,i=this.filteredSeriesX(),a=0;a<i.length-1;a++)if(i[a][0]!==i[a+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}},{key:"filteredSeriesX",value:function(){return this.w.globals.seriesX.map((function(t){return t.length>0?t:[]}))}}]),t}(),B=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new S(this.ctx)}return c(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new $(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new $(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,n="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r<t[e].data.length;r++)if(void 0!==t[e].data[r][1]&&(Array.isArray(t[e].data[r][1])&&4===t[e].data[r][1].length&&!n?this.twoDSeries.push(v.parseNumber(t[e].data[r][1][3])):t[e].data[r].length>=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var s=new Date(t[e].data[r][0]);s=new Date(s).getTime(),this.twoDSeriesX.push(s)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o<t[e].data.length;o++)void 0!==t[e].data[o][2]&&(this.threeDSeries.push(t[e].data[o][2]),a.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(t,e){var i=this.w.config,a=this.w.globals,n=new E(this.ctx),r=e;a.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);for(var s=0;s<t[e].data.length;s++)void 0!==t[e].data[s].y&&(Array.isArray(t[e].data[s].y)?this.twoDSeries.push(v.parseNumber(t[e].data[s].y[t[e].data[s].y.length-1])):this.twoDSeries.push(v.parseNumber(t[e].data[s].y))),void 0!==t[e].data[s].goals&&Array.isArray(t[e].data[s].goals)?(void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),this.seriesGoals[e].push(t[e].data[s].goals)):(void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),this.seriesGoals[e].push(null));for(var o=0;o<t[r].data.length;o++){var l="string"==typeof t[r].data[o].x,c=Array.isArray(t[r].data[o].x),h=!c&&!!n.isValidDate(t[r].data[o].x.toString());if(l||h)if(l||i.xaxis.convertedCatToNumeric){var d=a.isBarHorizontal&&a.isRangeData;"datetime"!==i.xaxis.type||d?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t[r].data[o].x)):this.twoDSeriesX.push(n.parseDate(t[r].data[o].x))}else"datetime"===i.xaxis.type?this.twoDSeriesX.push(n.parseDate(t[r].data[o].x.toString())):(a.dataFormatXNumeric=!0,a.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(t[r].data[o].x)));else c?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t[r].data[o].x)):(a.isXNumeric=!0,a.dataFormatXNumeric=!0,this.twoDSeriesX.push(t[r].data[o].x))}if(t[e].data[0]&&void 0!==t[e].data[0].z){for(var u=0;u<t[e].data.length;u++)this.threeDSeries.push(t[e].data[u].z);a.isDataXYZ=!0}}},{key:"handleRangeData",value:function(t,e){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(a=this.handleRangeDataFormat("xy",t,e)),i.seriesRangeStart.push(a.start),i.seriesRangeEnd.push(a.end),i.seriesRange.push(a.rangeUniques),i.seriesRange.forEach((function(t,e){t&&t.forEach((function(t,e){t.y.forEach((function(e,i){for(var a=0;a<t.y.length;a++)if(i!==a){var n=e.y1,r=e.y2,s=t.y[a].y1;n<=t.y[a].y2&&s<=r&&(t.overlaps.indexOf(e.rangeName)<0&&t.overlaps.push(e.rangeName),t.overlaps.indexOf(t.y[a].rangeName)<0&&t.overlaps.push(t.y[a].rangeName))}}))}))})),a}},{key:"handleCandleStickBoxData",value:function(t,e){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(a=this.handleCandleStickBoxDataFormat("xy",t,e)),i.seriesCandleO[e]=a.o,i.seriesCandleH[e]=a.h,i.seriesCandleM[e]=a.m,i.seriesCandleL[e]=a.l,i.seriesCandleC[e]=a.c,a}},{key:"handleRangeDataFormat",value:function(t,e,i){var a=[],n=[],r=e[i].data.filter((function(t,e,i){return e===i.findIndex((function(e){return e.x===t.x}))})).map((function(t,e){return{x:t.x,overlaps:[],y:[]}}));if("array"===t)for(var s=0;s<e[i].data.length;s++)Array.isArray(e[i].data[s])?(a.push(e[i].data[s][1][0]),n.push(e[i].data[s][1][1])):(a.push(e[i].data[s]),n.push(e[i].data[s]));else if("xy"===t)for(var o=function(t){var s=Array.isArray(e[i].data[t].y),o=v.randomId(),l=e[i].data[t].x,c={y1:s?e[i].data[t].y[0]:e[i].data[t].y,y2:s?e[i].data[t].y[1]:e[i].data[t].y,rangeName:o};e[i].data[t].rangeName=o;var h=r.findIndex((function(t){return t.x===l}));r[h].y.push(c),a.push(c.y1),n.push(c.y2)},l=0;l<e[i].data.length;l++)o(l);return{start:a,end:n,rangeUniques:r}}},{key:"handleCandleStickBoxDataFormat",value:function(t,e,i){var a=this.w,n="boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[i].type,r=[],s=[],o=[],l=[],c=[];if("array"===t)if(n&&6===e[i].data[0].length||!n&&5===e[i].data[0].length)for(var h=0;h<e[i].data.length;h++)r.push(e[i].data[h][1]),s.push(e[i].data[h][2]),n?(o.push(e[i].data[h][3]),l.push(e[i].data[h][4]),c.push(e[i].data[h][5])):(l.push(e[i].data[h][3]),c.push(e[i].data[h][4]));else for(var d=0;d<e[i].data.length;d++)Array.isArray(e[i].data[d][1])&&(r.push(e[i].data[d][1][0]),s.push(e[i].data[d][1][1]),n?(o.push(e[i].data[d][1][2]),l.push(e[i].data[d][1][3]),c.push(e[i].data[d][1][4])):(l.push(e[i].data[d][1][2]),c.push(e[i].data[d][1][3])));else if("xy"===t)for(var u=0;u<e[i].data.length;u++)Array.isArray(e[i].data[u].y)&&(r.push(e[i].data[u].y[0]),s.push(e[i].data[u].y[1]),n?(o.push(e[i].data[u].y[2]),l.push(e[i].data[u].y[3]),c.push(e[i].data[u].y[4])):(l.push(e[i].data[u].y[2]),c.push(e[i].data[u].y[3])));return{o:r,h:s,m:o,l:l,c:c}}},{key:"parseDataAxisCharts",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,n=this.w.globals,r=new E(i),s=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();n.isRangeBar="rangeBar"===a.chart.type&&n.isBarHorizontal,n.hasGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,n.hasGroups&&(n.groups=a.xaxis.group.groups);for(var o=function(){for(var t=0;t<s.length;t++)if("string"==typeof s[t]){if(!r.isValidDate(s[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");e.twoDSeriesX.push(r.parseDate(s[t]))}else e.twoDSeriesX.push(s[t])},l=0;l<t.length;l++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[l].data)return void console.error("It is a possibility that you may have not included 'data' property in series.");if("rangeBar"!==a.chart.type&&"rangeArea"!==a.chart.type&&"rangeBar"!==t[l].type&&"rangeArea"!==t[l].type||(n.isRangeData=!0,n.isComboCharts?"rangeBar"!==t[l].type&&"rangeArea"!==t[l].type||this.handleRangeData(t,l):"rangeBar"!==a.chart.type&&"rangeArea"!==a.chart.type||this.handleRangeData(t,l)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,l):this.isFormatXY()&&this.handleFormatXY(t,l),"candlestick"!==a.chart.type&&"candlestick"!==t[l].type&&"boxPlot"!==a.chart.type&&"boxPlot"!==t[l].type||this.handleCandleStickBoxData(t,l),n.series.push(this.twoDSeries),n.labels.push(this.twoDSeriesX),n.seriesX.push(this.twoDSeriesX),n.seriesGoals=this.seriesGoals,l!==this.activeSeriesIndex||this.fallbackToCategory||(n.isXNumeric=!0);else{"datetime"===a.xaxis.type?(n.isXNumeric=!0,o(),n.seriesX.push(this.twoDSeriesX)):"numeric"===a.xaxis.type&&(n.isXNumeric=!0,s.length>0&&(this.twoDSeriesX=s,n.seriesX.push(this.twoDSeriesX))),n.labels.push(this.twoDSeriesX);var c=t[l].data.map((function(t){return v.parseNumber(t)}));n.series.push(c)}n.seriesZ.push(this.threeDSeries),void 0!==t[l].name?n.seriesNames.push(t[l].name):n.seriesNames.push("series-"+parseInt(l+1,10)),void 0!==t[l].color?n.seriesColors.push(t[l].color):n.seriesColors.push(void 0)}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;a<e.series.length;a++)void 0===e.seriesNames[a]&&e.seriesNames.push("series-"+(a+1));return this.w}},{key:"handleExternalLabelsData",value:function(t){var e=this.w.config,i=this.w.globals;e.xaxis.categories.length>0?i.labels=e.xaxis.categories:e.labels.length>0?i.labels=e.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=i.labels.filter((function(t,e,i){return i.indexOf(t)===e}))),e.xaxis.convertedCatToNumeric&&(new R(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var n=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=n.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),s=0;s<n[r].length;s++)a.push(s+1);else for(var o=0;o<e.series[e.maxValsInArrayIndex].length;o++)a.push(o+1);e.seriesX=[];for(var l=0;l<t.length;l++)e.seriesX.push(a);e.isXNumeric=!0}if(0===a.length){a=e.axisCharts?[]:e.series.map((function(t,e){return e+1}));for(var c=0;c<t.length;c++)e.seriesX.push(a)}e.labels=a,i.xaxis.convertedCatToNumeric&&(e.categoryLabels=a.map((function(t){return i.xaxis.labels.formatter(t)}))),e.noLabelsProvided=!0}},{key:"parseData",value:function(t){var e=this.w,i=e.config,a=e.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),a.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),"bar"===i.chart.type&&i.chart.stacked){var n=new $(this.ctx);a.series=n.setNullSeriesToZeroValues(a.series)}this.coreUtils.getSeriesTotals(),a.axisCharts&&(a.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals()),this.coreUtils.getPercentSeries(),a.dataFormatXNumeric||a.isXNumeric&&("numeric"!==i.xaxis.type||0!==i.labels.length||0!==i.xaxis.categories.length)||this.handleExternalLabelsData(t);for(var r=this.coreUtils.getCategoryLabels(a.labels),s=0;s<r.length;s++)if(Array.isArray(r[s])){a.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var t=this,e=this.w;e.globals.ignoreYAxisIndexes=e.globals.collapsedSeries.map((function(i,a){if(t.w.globals.isMultipleYAxis&&!e.config.chart.stacked)return i.index}))}}]),t}(),W=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return c(t,[{key:"xLabelFormat",value:function(t,e,i,a){var n=this.w;if("datetime"===n.config.xaxis.type&&void 0===n.config.xaxis.labels.formatter&&void 0===n.config.tooltip.x.formatter){var r=new E(this.ctx);return r.formatDate(r.getDate(e),n.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;return v.isNumber(t)&&(t=0!==a.globals.yValueDecimal?t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal):a.globals.maxYArr[i]-a.globals.minYArr[i]<5?t.toFixed(1):t.toFixed(0)),t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(n){return e.globals.xyCharts?Array.isArray(n)?n.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(n,i,a):n}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),j=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"getLabel",value:function(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",s=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],c=l,h=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,p=new W(this.ctx),f=l;s&&(c=p.xLabelFormat(h,l,f,{i:a,dateFormatter:new E(this.ctx).formatDate,w:o}),void 0!==d&&(c=d(l,t[a],{i:a,dateFormatter:new E(this.ctx).formatDate,w:o})));var g=function(t){var i=null;return e.forEach((function(t){"month"===t.unit?i="year":"day"===t.unit?i="month":"hour"===t.unit?i="day":"minute"===t.unit&&(i="hour")})),i===t};e.length>0?(u=g(e[a].unit),i=e[a].position,c=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();var x=new k(this.ctx),m={};m=o.globals.rotateXLabels&&s?x.getTextRects(c,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):x.getTextRects(c,parseInt(r,10));var b=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&(0===c.indexOf("NaN")||0===c.toLowerCase().indexOf("invalid")||c.toLowerCase().indexOf("infinity")>=0||n.indexOf(c)>=0&&b)&&(c=""),{x:i,text:c,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,n=a.config.xaxis.tickAmount;return"dataPoints"===n&&(n=Math.round(a.globals.gridWidth/120)),n>i||t%Math.round(i/(n+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,n){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var s=n[n.length-1];e.x<s.textRect.width/(r.globals.rotateXLabels?Math.abs(r.config.xaxis.labels.rotate)/12:1.01)+s.x&&(e.text="")}return e}},{key:"checkForReversedLabels",value:function(t,e){var i=this.w;return i.config.yaxis[t]&&i.config.yaxis[t].reversed&&e.reverse(),e}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=new S(this.ctx);return!e.config.yaxis[t].show||!e.config.yaxis[t].showForNullSeries&&i.isSeriesNull(t)&&-1===e.globals.collapsedSeriesIndices.indexOf(t)}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,n,r,s){var o=this.w,l=new k(this.ctx),c=o.globals.translateY;if(a.show&&e>0){!0===o.config.yaxis[n].opposite&&(t+=a.width);for(var h=e;h>=0;h--){var d=c+e/10+o.config.yaxis[n].labels.offsetY-1;o.globals.isBarHorizontal&&(d=r*h),"heatmap"===o.config.chart.type&&(d+=r/2);var u=l.drawLine(t+i.offsetX-a.width+a.offsetX,d+a.offsetY,t+i.offsetX+a.offsetX,d+a.offsetY,a.color);s.add(u),c+=r}}}}]),t}(),V=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"fixSvgStringForIe11",value:function(t){if(!v.isIE11())return t.replace(/ /g," ");var e=0,i=t.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(t){return 2==++e?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':t}));return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(t){null==t&&(t=1);var e=this.w.globals.dom.Paper.svg();if(1!==t){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,t),e=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(e)}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,n=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*n,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*n;var s="transparent"===a.config.chart.background?"#fff":a.config.chart.background,o=r.getContext("2d");o.fillStyle=s,o.fillRect(0,0,r.width*n,r.height*n);var l=e.getSvgString(n);if(window.canvg&&v.isIE11()){var c=window.canvg.Canvg.fromString(o,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var h=r.msToBlob();c.stop(),i({blob:h})}else{var d="data:image/svg+xml,"+encodeURIComponent(l),u=new Image;u.crossOrigin="anonymous",u.onload=function(){if(o.drawImage(u,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},u.src=d}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var t=this;this.dataURI().then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,n=t.columnDelimiter,r=void 0===n?",":n,s=t.lineDelimiter,o=void 0===s?"\n":s,l=this.w;i||(i=l.config.series);var c=[],h=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),p=Math.max.apply(Math,x(i.map((function(t){return t.data?t.data.length:0})))),f=new B(this.ctx),g=new j(this.ctx),m=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],n=new $(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:n,dataPointIndex:t,w:l})}else i=g.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join("")};c.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(c.push("minimum"),c.push("q1"),c.push("median"),c.push("q3"),c.push("maximum")):"candlestick"===l.config.chart.type?(c.push("open"),c.push("high"),c.push("low"),c.push("close")):"rangeBar"===l.config.chart.type?(c.push("minimum"),c.push("maximum")):i.map((function(t,e){var i=t.name?t.name:"series-".concat(e);l.globals.axisCharts&&c.push(i.split(r).join("")?i.split(r).join(""):"series-".concat(e))})),l.globals.axisCharts||(c.push(l.config.chart.toolbar.export.csv.headerValue),h.push(c.join(r))),i.map((function(t,e){l.globals.axisCharts?function(t,e){if(c.length&&0===e&&h.push(c.join(r)),t.data){t.data=t.data.length&&t.data||x(Array(p)).map((function(){return""}));for(var a=0;a<t.data.length;a++){c=[];var n=m(a);if(n||(f.isFormatXY()?n=i[e].data[a].x:f.isFormat2DArray()&&(n=i[e].data[a]?i[e].data[a][0]:"")),0===e){c.push((o=n,"datetime"===l.config.xaxis.type&&String(o).length>=10?l.config.chart.toolbar.export.csv.dateFormatter(n):v.isNumber(n)?n:n.split(r).join("")));for(var s=0;s<l.globals.series.length;s++)f.isFormatXY()?c.push(i[s].data[a].y):c.push(u[s][a])}("candlestick"===l.config.chart.type||t.type&&"candlestick"===t.type)&&(c.pop(),c.push(l.globals.seriesCandleO[e][a]),c.push(l.globals.seriesCandleH[e][a]),c.push(l.globals.seriesCandleL[e][a]),c.push(l.globals.seriesCandleC[e][a])),("boxPlot"===l.config.chart.type||t.type&&"boxPlot"===t.type)&&(c.pop(),c.push(l.globals.seriesCandleO[e][a]),c.push(l.globals.seriesCandleH[e][a]),c.push(l.globals.seriesCandleM[e][a]),c.push(l.globals.seriesCandleL[e][a]),c.push(l.globals.seriesCandleC[e][a])),"rangeBar"===l.config.chart.type&&(c.pop(),c.push(l.globals.seriesRangeStart[e][a]),c.push(l.globals.seriesRangeEnd[e][a])),c.length&&h.push(c.join(r))}}var o}(t,e):((c=[]).push(l.globals.labels[e].split(r).join("")),c.push(u[e]),h.push(c.join(r)))})),d+=h.join(o),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+d),a||l.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(t,e,i){var a=document.createElement("a");a.href=t,a.download=(e||this.w.globals.chartID)+i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}]),t}(),G=function(){function t(e,i){o(this,t),this.ctx=e,this.elgrid=i,this.w=e.w;var a=this.w;this.axesUtils=new j(e),this.xaxisLabels=a.globals.labels.slice(),a.globals.timescaleLabels.length>0&&!a.globals.isBarHorizontal&&(this.xaxisLabels=a.globals.timescaleLabels.slice()),a.config.xaxis.overwriteCategories&&(this.xaxisLabels=a.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===a.config.xaxis.position?this.offY=0:this.offY=a.globals.gridHeight+1,this.offY=this.offY+a.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===a.config.chart.type&&a.config.plotOptions.bar.horizontal,this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.xaxisBorderWidth=a.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=a.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=a.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=a.config.xaxis.axisBorder.height,this.yaxis=a.config.yaxis[0]}return c(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new k(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var n=[],r=0;r<this.xaxisLabels.length;r++)n.push(this.xaxisLabels[r]);if(this.drawXAxisLabelAndGroup(!0,e,a,n,t.globals.isXNumeric,(function(t,e){return e})),t.globals.hasGroups){var s=t.globals.groups;n=[];for(var o=0;o<s.length;o++)n.push(s[o].title);var l={};t.config.xaxis.group.style&&(l.xaxisFontSize=t.config.xaxis.group.style.fontSize,l.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,l.xaxisForeColors=t.config.xaxis.group.style.colors,l.fontWeight=t.config.xaxis.group.style.fontWeight,l.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,a,n,!1,(function(t,e){return s[t].cols*e}),l)}if(void 0!==t.config.xaxis.title.text){var c=e.group({class:"apexcharts-xaxis-title"}),h=e.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+("bottom"===t.config.xaxis.title.position?t.globals.xAxisLabelsHeight:-t.globals.xAxisLabelsHeight-10)+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});c.add(h),i.add(c)}if(t.config.xaxis.axisBorder.show){var d=t.globals.barPadForNumericAxis,u=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-d,this.offY,this.xaxisBorderWidth+d,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders?this.elgrid.elGridBorders.add(u):i.add(u)}return i}},{key:"drawXAxisLabelAndGroup",value:function(t,e,i,a,n,r){var s,o=this,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=[],h=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,p=l.xaxisFontFamily||this.xaxisFontFamily,f=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,m=d.globals.padHorizontal,b=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:b;if(0===v&&b>v&&(v=b),n){var y=v>1?v-1:v;s=d.globals.gridWidth/y,m=m+r(0,s)/2+d.config.xaxis.labels.offsetX}else s=d.globals.gridWidth/v,m=m+r(0,s)+d.config.xaxis.labels.offsetX;for(var w=function(n){var l=m-r(n,s)/2+d.config.xaxis.labels.offsetX;0===n&&1===b&&s/2===m&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,n,c,u,t),w=28;if(d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(n,y,b):o.axesUtils.checkForOverflowingLabels(n,y,b,c,h),t&&y.text&&d.globals.xaxisLabelsCount++,d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:g,fontSize:u,fontFamily:p,foreColor:Array.isArray(f)?t&&d.config.xaxis.convertedCatToNumeric?f[d.globals.minX+n-1]:f[n]:f,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:n});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var S=document.createElementNS(d.globals.SVGNS,"title");S.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(S),""!==y.text&&(c.push(y.text),h.push(y))}}n<b-1&&(m+=r(n+1,s))},k=0;k<=b-1;k++)w(k)}},{key:"drawXaxisInversed",value:function(t){var e,i,a=this,n=this.w,r=new k(this.ctx),s=n.config.yaxis[0].opposite?n.globals.translateYAxisX[t]:0,o=r.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),l=r.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+s+", 0)"});o.add(l);var c=[];if(n.config.yaxis[t].show)for(var h=0;h<this.xaxisLabels.length;h++)c.push(this.xaxisLabels[h]);e=n.globals.gridHeight/c.length,i=-e/2.2;var d=n.globals.yLabelFormatters[0],u=n.config.yaxis[0].labels;if(u.show)for(var p=function(s){var o=void 0===c[s]?"":c[s];o=d(o,{seriesIndex:t,dataPointIndex:s,w:n});var h=a.axesUtils.getYAxisForeColor(u.style.colors,t),p=0;Array.isArray(o)&&(p=o.length/2*parseInt(u.style.fontSize,10));var f=r.drawText({x:u.offsetX-15,y:i+e+u.offsetY-p,text:o,textAnchor:a.yaxis.opposite?"start":"end",foreColor:Array.isArray(h)?h[s]:h,fontSize:u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+u.style.cssClass,maxWidth:u.maxWidth});l.add(f),f.on("click",(function(t){if("function"==typeof n.config.chart.events.xAxisLabelClick){var e=Object.assign({},n,{labelIndex:s});n.config.chart.events.xAxisLabelClick(t,a.ctx,e)}}));var g=document.createElementNS(n.globals.SVGNS,"title");if(g.textContent=Array.isArray(o)?o.join(" "):o,f.node.appendChild(g),0!==n.config.yaxis[t].labels.rotate){var x=r.rotateAroundCenter(f.node);f.node.setAttribute("transform","rotate(".concat(n.config.yaxis[t].labels.rotate," 0 ").concat(x.y,")"))}i+=e},f=0;f<=c.length-1;f++)p(f);if(void 0!==n.config.yaxis[0].title.text){var g=r.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+s+", 0)"}),x=r.drawText({x:n.config.yaxis[0].title.offsetX,y:n.globals.gridHeight/2+n.config.yaxis[0].title.offsetY,text:n.config.yaxis[0].title.text,textAnchor:"middle",foreColor:n.config.yaxis[0].title.style.color,fontSize:n.config.yaxis[0].title.style.fontSize,fontWeight:n.config.yaxis[0].title.style.fontWeight,fontFamily:n.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+n.config.yaxis[0].title.style.cssClass});g.add(x),o.add(g)}var m=0;this.isCategoryBarHorizontal&&n.config.yaxis[0].opposite&&(m=n.globals.gridWidth);var b=n.config.xaxis.axisBorder;if(b.show){var v=r.drawLine(n.globals.padHorizontal+b.offsetX+m,1+b.offsetY,n.globals.padHorizontal+b.offsetX+m,n.globals.gridHeight+b.offsetY,b.color,0);this.elgrid&&this.elgrid.elGridBorders?this.elgrid.elGridBorders.add(v):o.add(v)}return n.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(m,c.length,n.config.yaxis[0].axisBorder,n.config.yaxis[0].axisTicks,0,e,o),o}},{key:"drawXaxisTicks",value:function(t,e,i){var a=this.w,n=t;if(!(t<0||t-2>a.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var s=new k(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,n+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(s),s.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.timescaleLabels.length>0)for(var n=0;n<i;n++)a=this.xaxisLabels[n].position,e.push(a);else for(var r=i,s=0;s<r;s++){var o=r;t.globals.isXNumeric&&"bar"!==t.config.chart.type&&(o-=1),a+=t.globals.gridWidth/o,e.push(a)}return e}},{key:"xAxisLabelCorrections",value:function(){var t=this.w,e=new k(this.ctx),i=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(t.globals.rotateXLabels||t.config.xaxis.labels.rotateAlways)for(var s=0;s<a.length;s++){var o=e.rotateAroundCenter(a[s]);o.y=o.y-1,o.x=o.x+1,a[s].setAttribute("transform","rotate(".concat(t.config.xaxis.labels.rotate," ").concat(o.x," ").concat(o.y,")")),a[s].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")"));var l=a[s].childNodes;t.config.xaxis.labels.trim&&Array.prototype.forEach.call(l,(function(i){e.placeTextWithEllipsis(i,i.textContent,t.globals.xAxisLabelsHeight-("bottom"===t.config.legend.position?20:10))}))}else!function(){for(var i=t.globals.gridWidth/(t.globals.labels.length+1),n=0;n<a.length;n++){var r=a[n].childNodes;t.config.xaxis.labels.trim&&"datetime"!==t.config.xaxis.type&&Array.prototype.forEach.call(r,(function(t){e.placeTextWithEllipsis(t,t.textContent,i)}))}}();if(n.length>0){var c=n[n.length-1].getBBox(),h=n[0].getBBox();c.x<-20&&n[n.length-1].parentNode.removeChild(n[n.length-1]),h.x+h.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&n[0].parentNode.removeChild(n[0]);for(var d=0;d<r.length;d++)e.placeTextWithEllipsis(r[d],r[d].textContent,t.config.yaxis[0].labels.maxWidth-(t.config.yaxis[0].title.text?2*parseFloat(t.config.yaxis[0].title.style.fontSize):0)-15)}}}]),t}(),Z=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.xaxisLabels=i.globals.labels.slice(),this.axesUtils=new j(e),this.isRangeBar=i.globals.seriesRange.length,i.globals.timescaleLabels.length>0&&(this.xaxisLabels=i.globals.timescaleLabels.slice())}return c(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new k(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"),n=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(n),t.add(a),t}},{key:"drawGrid",value:function(){var t=null;return this.w.globals.axisCharts&&(t=this.renderGrid(),this.drawGridArea(t.el)),t}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new k(this.ctx),a=Array.isArray(t.config.stroke.width)?0:t.config.stroke.width;if(Array.isArray(t.config.stroke.width)){var n=0;t.config.stroke.width.forEach((function(t){n=Math.max(n,t)})),a=n}e.dom.elGridRectMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elForecastMask.setAttribute("id","forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(e.cuid));var r=t.config.chart.type,s=0,o=0;("bar"===r||"rangeBar"===r||"candlestick"===r||"boxPlot"===r||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(s=t.config.grid.padding.left,o=t.config.grid.padding.right,e.barPadForNumericAxis>s&&(s=e.barPadForNumericAxis,o=e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(-a/2-s-2,-a/2,e.gridWidth+a+o+s+4,e.gridHeight+a,0,"#fff");var l=t.globals.markers.largestSize+1;e.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,e.gridWidth+4*l,e.gridHeight+4*l,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var c=e.dom.baseEl.querySelector("defs");c.appendChild(e.dom.elGridRectMask),c.appendChild(e.dom.elForecastMask),c.appendChild(e.dom.elNonForecastMask),c.appendChild(e.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,n=t.x2,r=t.y2,s=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===s-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:n,y2:r,xCount:s,parent:o});var c=0;if(l.globals.hasGroups&&"between"===l.config.xaxis.tickPlacement){var h=l.globals.groups;if(h){for(var d=0,u=0;d<e&&u<h.length;u++)d+=h[u].cols;d===e&&(c=.6*l.globals.xAxisLabelsHeight)}}new G(this.ctx).drawXaxisTicks(i,c,l.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(t){var e=t.i,i=t.x1,a=t.y1,n=t.x2,r=t.y2,s=t.xCount,o=t.parent,l=this.w,c=!1,h=o.node.classList.contains("apexcharts-gridlines-horizontal"),d=l.config.grid.strokeDashArray,u=l.globals.barPadForNumericAxis;(0===a&&0===r||0===i&&0===n)&&(c=!0),a===l.globals.gridHeight&&r===l.globals.gridHeight&&(c=!0),!l.globals.isBarHorizontal||0!==e&&e!==s-1||(c=!0);var p=new k(this).drawLine(i-(h?u:0),a,n+(h?u:0),r,l.config.grid.borderColor,d);p.node.classList.add("apexcharts-gridline"),c?this.elGridBorders.add(p):o.add(p)}},{key:"_drawGridBandRect",value:function(t){var e=t.c,i=t.x1,a=t.y1,n=t.x2,r=t.y2,s=t.type,o=this.w,l=new k(this.ctx),c=o.globals.barPadForNumericAxis;if("column"!==s||"datetime"!==o.config.xaxis.type){var h=o.config.grid[s].colors[e],d=l.drawRect(i-("row"===s?c:0),a,n+("row"===s?2*c:0),r,0,h,o.config.grid[s].opacity);this.elg.add(d),d.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),d.node.classList.add("apexcharts-grid-".concat(s))}}},{key:"_drawXYLines",value:function(t){var e=this,i=t.xCount,a=t.tickAmount,n=this.w;if(n.config.grid.xaxis.lines.show||n.config.xaxis.axisTicks.show){var r,s=n.globals.padHorizontal,o=n.globals.gridHeight;n.globals.timescaleLabels.length?function(t){for(var a=t.xC,n=t.x1,r=t.y1,s=t.x2,o=t.y2,l=0;l<a;l++)n=e.xaxisLabels[l].position,s=e.xaxisLabels[l].position,e._drawGridLines({i:l,x1:n,y1:r,x2:s,y2:o,xCount:i,parent:e.elgridLinesV})}({xC:i,x1:s,y1:0,x2:r,y2:o}):(n.globals.isXNumeric&&(i=n.globals.xAxisScale.result.length),n.config.xaxis.convertedCatToNumeric&&(i=n.globals.xaxisLabelsCount),function(t){var a=t.xC,r=t.x1,s=t.y1,o=t.x2,l=t.y2;if(void 0!==n.config.xaxis.tickAmount&&"dataPoints"!==n.config.xaxis.tickAmount&&"on"===n.config.xaxis.tickPlacement)n.globals.dom.baseEl.querySelectorAll(".apexcharts-text.apexcharts-xaxis-label tspan:not(:empty)").forEach((function(t,a){var n=t.getBBox();e._drawGridLines({i:a,x1:n.x+n.width/2,y1:s,x2:n.x+n.width/2,y2:l,xCount:i,parent:e.elgridLinesV})}));else for(var c=0;c<a+(n.globals.isXNumeric?0:1);c++)0===c&&1===a&&1===n.globals.dataPoints&&(o=r=n.globals.gridWidth/2),e._drawGridLines({i:c,x1:r,y1:s,x2:o,y2:l,xCount:i,parent:e.elgridLinesV}),o=r+=n.globals.gridWidth/(n.globals.isXNumeric?a-1:a)}({xC:i,x1:s,y1:0,x2:r,y2:o}))}if(n.config.grid.yaxis.lines.show){var l=0,c=0,h=n.globals.gridWidth,d=a+1;this.isRangeBar&&(d=n.globals.labels.length);for(var u=0;u<d+(this.isRangeBar?1:0);u++)this._drawGridLine({i:u,xCount:d+(this.isRangeBar?1:0),x1:0,y1:l,x2:h,y2:c,parent:this.elgridLinesH}),c=l+=n.globals.gridHeight/(this.isRangeBar?d:a)}}},{key:"_drawInvertedXYLines",value:function(t){var e=t.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var a,n=i.globals.padHorizontal,r=i.globals.gridHeight,s=0;s<e+1;s++)i.config.grid.xaxis.lines.show&&this._drawGridLine({i:s,xCount:e+1,x1:n,y1:0,x2:a,y2:r,parent:this.elgridLinesV}),new G(this.ctx).drawXaxisTicks(n,0,i.globals.dom.elGraphical),a=n=n+i.globals.gridWidth/e+.3;if(i.config.grid.yaxis.lines.show)for(var o=0,l=0,c=i.globals.gridWidth,h=0;h<i.globals.dataPoints+1;h++)this._drawGridLine({i:h,xCount:i.globals.dataPoints+1,x1:0,y1:o,x2:c,y2:l,parent:this.elgridLinesH}),l=o+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var t=this.w,e=new k(this.ctx);this.elg=e.group({class:"apexcharts-grid"}),this.elgridLinesH=e.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=e.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=e.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),t.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());for(var i,a=t.globals.yAxisScale.length?t.globals.yAxisScale[0].result.length-1:5,n=0;n<t.globals.series.length&&(void 0!==t.globals.yAxisScale[n]&&(a=t.globals.yAxisScale[n].result.length-1),!(a>2));n++);return!t.globals.isBarHorizontal||this.isRangeBar?(i=this.xaxisLabels.length,this.isRangeBar&&(a=t.globals.labels.length,t.config.xaxis.tickAmount&&t.config.xaxis.labels.formatter&&(i=t.config.xaxis.tickAmount)),this._drawXYLines({xCount:i,tickAmount:a})):(i=a,a=t.globals.xTickAmount,this._drawInvertedXYLines({xCount:i,tickAmount:a})),this.drawGridBands(i,a),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:t.globals.gridWidth/i}}},{key:"drawGridBands",value:function(t,e){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var a=0,n=i.globals.gridHeight/e,r=i.globals.gridWidth,s=0,o=0;s<e;s++,o++)o>=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:a,x2:r,y2:n,type:"row"}),a+=i.globals.gridHeight/e;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?t:t-1,c=i.globals.padHorizontal,h=i.globals.padHorizontal+i.globals.gridWidth/l,d=i.globals.gridHeight,u=0,p=0;u<t;u++,p++)p>=i.config.grid.column.colors.length&&(p=0),this._drawGridBandRect({c:p,x1:c,y1:0,x2:h,y2:d,type:"column"}),c+=i.globals.gridWidth/l}}]),t}(),U=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"niceScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4?arguments[4]:void 0,r=this.w,s=Math.abs(e-t);if("dataPoints"===(i=this._adjustTicksForSmallRange(i,a,s))&&(i=r.globals.dataPoints-1),t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE){t=0,e=i;var o=this.linearScale(t,e,i);return o}t>e?(console.warn("axis.min cannot be greater than axis.max"),e=t+.1):t===e&&(t=0===t?0:t-.5,e=0===e?2:e+.5);var l=[];s<1&&n&&("candlestick"===r.config.chart.type||"candlestick"===r.config.series[a].type||"boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[a].type||r.globals.isRangeData)&&(e*=1.01);var c=i+1;c<2?c=2:c>2&&(c-=2);var h=s/c,d=Math.floor(v.log10(h)),u=Math.pow(10,d),p=Math.round(h/u);p<1&&(p=1);var f=p*u,g=f*Math.floor(t/f),x=f*Math.ceil(e/f),m=g;if(n&&s>2){for(;l.push(m),!((m+=f)>x););return{result:l,niceMin:l[0],niceMax:l[l.length-1]}}var b=t;(l=[]).push(b);for(var y=Math.abs(e-t)/i,w=0;w<=i;w++)b+=y,l.push(b);return l[l.length-2]>=e&&l.pop(),{result:l,niceMin:l[0],niceMax:l[l.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3?arguments[3]:void 0,n=Math.abs(e-t);"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,n))&&(i=this.w.globals.dataPoints-1);var r=n/i;i===Number.MAX_VALUE&&(i=10,r=1);for(var s=[],o=t;i>=0;)s.push(o),o+=r,i-=1;return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],n=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r<n;r++)a.push(Math.pow(i,r));return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScale",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],n=Math.log(e)/Math.log(i),r=Math.log(t)/Math.log(i),s=n-r,o=Math.round(s),l=s/o,c=0,h=r;c<o;c++,h+=l)a.push(Math.pow(i,h));return a.push(Math.pow(i,n)),{result:a,niceMin:t,niceMax:e}}},{key:"_adjustTicksForSmallRange",value:function(t,e,i){var a=t;if(void 0!==e&&this.w.config.yaxis[e].labels.formatter&&void 0===this.w.config.yaxis[e].tickAmount){var n=this.w.config.yaxis[e].labels.formatter(1);v.isNumber(Number(n))&&!v.isFloat(n)&&(a=Math.ceil(i))}return a<t?a:t}},{key:"setYScaleForIndex",value:function(t,e,i){var a=this.w.globals,n=this.w.config,r=a.isBarHorizontal?n.xaxis:n.yaxis[t];void 0===a.yAxisScale[t]&&(a.yAxisScale[t]=[]);var s=Math.abs(i-e);if(r.logarithmic&&s<=5&&(a.invalidLogScale=!0),r.logarithmic&&s>5)a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.logarithmicScale(e,i,r.logBase),a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase);else if(i!==-Number.MAX_VALUE&&v.isNumber(i))if(a.allSeriesCollapsed=!1,void 0===r.min&&void 0===r.max||r.forceNiceScale){var o=void 0===n.yaxis[t].max&&void 0===n.yaxis[t].min||n.yaxis[t].forceNiceScale;a.yAxisScale[t]=this.niceScale(e,i,r.tickAmount?r.tickAmount:s<5&&s>1?s+1:5,t,o)}else a.yAxisScale[t]=this.linearScale(e,i,r.tickAmount,t);else a.yAxisScale[t]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,n=i.config.xaxis,r=Math.abs(e-t);return e!==-Number.MAX_VALUE&&v.isNumber(e)?a.xAxisScale=this.linearScale(t,e,n.tickAmount?n.tickAmount:r<5&&r>1?r+1:5,0):a.xAxisScale=this.linearScale(0,5,5),a.xAxisScale}},{key:"setMultipleYScales",value:function(){var t=this,e=this.w.globals,i=this.w.config,a=e.minYArr.concat([]),n=e.maxYArr.concat([]),r=[];i.yaxis.forEach((function(e,s){var o=s;i.series.forEach((function(t,i){t.name===e.seriesName&&(o=i,s!==i?r.push({index:i,similarIndex:s,alreadyExists:!0}):r.push({index:i}))}));var l=a[o],c=n[o];t.setYScaleForIndex(s,l,c)})),this.sameScaleInMultipleAxes(a,n,r)}},{key:"sameScaleInMultipleAxes",value:function(t,e,i){var a=this,n=this.w.config,r=this.w.globals,s=[];i.forEach((function(t){t.alreadyExists&&(void 0===s[t.index]&&(s[t.index]=[]),s[t.index].push(t.index),s[t.index].push(t.similarIndex))})),r.yAxisSameScaleIndices=s,s.forEach((function(t,e){s.forEach((function(i,a){var n,r;e!==a&&(n=t,r=i,n.filter((function(t){return-1!==r.indexOf(t)}))).length>0&&(s[e]=s[e].concat(s[a]))}))}));var o=s.map((function(t){return t.filter((function(e,i){return t.indexOf(e)===i}))})).map((function(t){return t.sort()}));s=s.filter((function(t){return!!t}));var l=o.slice(),c=l.map((function(t){return JSON.stringify(t)}));l=l.filter((function(t,e){return c.indexOf(JSON.stringify(t))===e}));var h=[],d=[];t.forEach((function(t,i){l.forEach((function(a,n){a.indexOf(i)>-1&&(void 0===h[n]&&(h[n]=[],d[n]=[]),h[n].push({key:i,value:t}),d[n].push({key:i,value:e[i]}))}))}));var u=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),p=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);h.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){p[e]=Math.max(t.value,p[e])}))})),t.forEach((function(t,e){d.forEach((function(t,i){var s=u[i],o=p[i];n.chart.stacked&&(o=0,t.forEach((function(t,e){t.value!==-Number.MAX_VALUE&&(o+=t.value),s!==Number.MIN_VALUE&&(s+=h[i][e].value)}))),t.forEach((function(i,l){t[l].key===e&&(void 0!==n.yaxis[e].min&&(s="function"==typeof n.yaxis[e].min?n.yaxis[e].min(r.minY):n.yaxis[e].min),void 0!==n.yaxis[e].max&&(o="function"==typeof n.yaxis[e].max?n.yaxis[e].max(r.maxY):n.yaxis[e].max),a.setYScaleForIndex(e,s,o))}))}))}))}},{key:"autoScaleY",value:function(t,e,i){t||(t=this);var a=t.w;if(a.globals.isMultipleYAxis||a.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),e;var n=a.globals.seriesX[0],r=a.config.chart.stacked;return e.forEach((function(t,s){for(var o=0,l=0;l<n.length;l++)if(n[l]>=i.xaxis.min){o=l;break}var c,h,d=a.globals.minYArr[s],u=a.globals.maxYArr[s],p=a.globals.stackedSeriesTotals;a.globals.series.forEach((function(s,l){var f=s[o];r?(f=p[o],c=h=f,p.forEach((function(t,e){n[e]<=i.xaxis.max&&n[e]>=i.xaxis.min&&(t>h&&null!==t&&(h=t),s[e]<c&&null!==s[e]&&(c=s[e]))}))):(c=h=f,s.forEach((function(t,e){if(n[e]<=i.xaxis.max&&n[e]>=i.xaxis.min){var r=t,s=t;a.globals.series.forEach((function(i,a){null!==t&&(r=Math.min(i[e],r),s=Math.max(i[e],s))})),s>h&&null!==s&&(h=s),r<c&&null!==r&&(c=r)}}))),void 0===c&&void 0===h&&(c=d,h=u),h*=h<0?.9:1.1,0==(c*=c<0?1.1:.9)&&0===h&&(c=-1,h=1),h<0&&h<u&&(h=u),c<0&&c>d&&(c=d),e.length>1?(e[l].min=void 0===t.min?c:t.min,e[l].max=void 0===t.max?h:t.max):(e[0].min=void 0===t.min?c:t.min,e[0].max=void 0===t.max?h:t.max)}))})),e}}]),t}(),q=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.scales=new U(e)}return c(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w.config,r=this.w.globals,s=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,c=l,h=l;"candlestick"===n.chart.type?(c=r.seriesCandleL,h=r.seriesCandleH):"boxPlot"===n.chart.type?(c=r.seriesCandleO,h=r.seriesCandleC):r.isRangeData&&(c=r.seriesRangeStart,h=r.seriesRangeEnd);for(var d=t;d<a;d++){r.dataPoints=Math.max(r.dataPoints,l[d].length),r.categoryLabels.length&&(r.dataPoints=r.categoryLabels.filter((function(t){return void 0!==t})).length);for(var u=0;u<r.series[d].length;u++){var p=l[d][u];null!==p&&v.isNumber(p)?(void 0!==h[d][u]&&(s=Math.max(s,h[d][u]),e=Math.min(e,h[d][u])),void 0!==c[d][u]&&(e=Math.min(e,c[d][u]),i=Math.max(i,c[d][u])),"candlestick"!==this.w.config.chart.type&&"boxPlot"!==this.w.config.chart.type&&"rangeArea"===this.w.config.chart.type&&"rangeBar"===this.w.config.chart.type||("candlestick"!==this.w.config.chart.type&&"boxPlot"!==this.w.config.chart.type||void 0!==r.seriesCandleC[d][u]&&(s=Math.max(s,r.seriesCandleO[d][u]),s=Math.max(s,r.seriesCandleH[d][u]),s=Math.max(s,r.seriesCandleL[d][u]),s=Math.max(s,r.seriesCandleC[d][u]),"boxPlot"===this.w.config.chart.type&&(s=Math.max(s,r.seriesCandleM[d][u]))),!n.series[d].type||"candlestick"===n.series[d].type&&"boxPlot"===n.series[d].type&&"rangeArea"===n.series[d].type&&"rangeBar"===n.series[d].type||(s=Math.max(s,r.series[d][u]),e=Math.min(e,r.series[d][u])),i=s),r.seriesGoals[d]&&r.seriesGoals[d][u]&&Array.isArray(r.seriesGoals[d][u])&&r.seriesGoals[d][u].forEach((function(t){o!==Number.MIN_VALUE&&(o=Math.min(o,t.value),e=o),s=Math.max(s,t.value),i=s})),v.isFloat(p)&&(p=v.noExponents(p),r.yValueDecimal=Math.max(r.yValueDecimal,p.toString().split(".")[1].length)),o>c[d][u]&&c[d][u]<0&&(o=c[d][u])):r.hasNullValues=!0}}return"rangeBar"===n.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===n.chart.type&&(o<0&&s<0&&(s=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:s,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=Number.MAX_VALUE;if(t.isMultipleYAxis)for(var a=0;a<t.series.length;a++){var n=this.getMinYMaxY(a,i,null,a+1);t.minYArr.push(n.minY),t.maxYArr.push(n.maxY),i=n.lowestY}var r=this.getMinYMaxY(0,i,null,t.series.length);if(t.minY=r.minY,t.maxY=r.maxY,i=r.lowestY,e.chart.stacked&&this._setStackedMinMax(),("line"===e.chart.type||"area"===e.chart.type||"candlestick"===e.chart.type||"boxPlot"===e.chart.type||"rangeBar"===e.chart.type&&!t.isBarHorizontal)&&t.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==t.maxY){var s=t.maxY-i;(i>=0&&i<=10||void 0!==e.yaxis[0].min||void 0!==e.yaxis[0].max)&&(s=0),t.minY=i-5*s/100,i>0&&t.minY<0&&(t.minY=0),t.maxY=t.maxY+5*s/100}return e.yaxis.forEach((function(e,i){void 0!==e.max&&("number"==typeof e.max?t.maxYArr[i]=e.max:"function"==typeof e.max&&(t.maxYArr[i]=e.max(t.isMultipleYAxis?t.maxYArr[i]:t.maxY)),t.maxY=t.maxYArr[i]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[i]=e.min:"function"==typeof e.min&&(t.minYArr[i]=e.min(t.isMultipleYAxis?t.minYArr[i]===Number.MIN_VALUE?0:t.minYArr[i]:t.minY)),t.minY=t.minYArr[i])})),t.isBarHorizontal&&["min","max"].forEach((function(i){void 0!==e.xaxis[i]&&"number"==typeof e.xaxis[i]&&("min"===i?t.minY=e.xaxis[i]:t.maxY=e.xaxis[i])})),t.isMultipleYAxis?(this.scales.setMultipleYScales(),t.minY=i,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),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}},{key:"setXRange",value:function(){var t=this.w.globals,e=this.w.config,i="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided||t.noLabelsProvided||t.isXNumeric;if(t.isXNumeric&&function(){for(var e=0;e<t.series.length;e++)if(t.labels[e])for(var i=0;i<t.labels[e].length;i++)null!==t.labels[e][i]&&v.isNumber(t.labels[e][i])&&(t.maxX=Math.max(t.maxX,t.labels[e][i]),t.initialMaxX=Math.max(t.maxX,t.labels[e][i]),t.minX=Math.min(t.minX,t.labels[e][i]),t.initialMinX=Math.min(t.minX,t.labels[e][i]))}(),t.noLabelsProvided&&0===e.xaxis.categories.length&&(t.maxX=t.labels[t.labels.length-1],t.initialMaxX=t.labels[t.labels.length-1],t.minX=1,t.initialMinX=1),t.isXNumeric||t.noLabelsProvided||t.dataFormatXNumeric){var a;if(void 0===e.xaxis.tickAmount?(a=Math.round(t.svgWidth/150),"numeric"===e.xaxis.type&&t.dataPoints<30&&(a=t.dataPoints-1),a>t.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1)):"dataPoints"===e.xaxis.tickAmount?(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric&&(a=t.maxX-t.minX-1)):a=e.xaxis.tickAmount,t.xTickAmount=a,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)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var n=[],r=t.minX-1;r<t.maxX;r++)n.push(r+1);t.xAxisScale={result:n,niceMin:n[0],niceMax:n[n.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(1,a,a),t.noLabelsProvided&&t.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e<t.series.length;e++)if(void 0!==t.seriesZ[e])for(var i=0;i<t.seriesZ[e].length;i++)null!==t.seriesZ[e][i]&&v.isNumber(t.seriesZ[e][i])&&(t.maxZ=Math.max(t.maxZ,t.seriesZ[e][i]),t.minZ=Math.min(t.minZ,t.seriesZ[e][i]))}},{key:"_handleSingleDataPoint",value:function(){var t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){var i=new E(this.ctx);if("datetime"===e.xaxis.type){var a=i.getDate(t.minX);e.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()-2):a.setDate(a.getDate()-2),t.minX=new Date(a).getTime();var n=i.getDate(t.maxX);e.xaxis.labels.datetimeUTC?n.setUTCDate(n.getUTCDate()+2):n.setDate(n.getDate()+2),t.maxX=new Date(n).getTime()}else("numeric"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}},{key:"_getMinXDiff",value:function(){var t=this.w.globals;t.isXNumeric&&t.seriesX.forEach((function(e,i){1===e.length&&e.push(t.seriesX[t.maxValsInArrayIndex][t.seriesX[t.maxValsInArrayIndex].length-1]);var a=e.slice();a.sort((function(t,e){return t-e})),a.forEach((function(e,i){if(i>0){var n=e-a[i-1];n>0&&(t.minXDiff=Math.min(n,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this.w.globals,e=[],i=[];if(t.series.length)for(var a=0;a<t.series[t.maxValsInArrayIndex].length;a++)for(var n=0,r=0,s=0;s<t.series.length;s++)null!==t.series[s][a]&&v.isNumber(t.series[s][a])&&(t.series[s][a]>0?n=n+parseFloat(t.series[s][a])+1e-4:r+=parseFloat(t.series[s][a])),s===t.series.length-1&&(e.push(n),i.push(r));for(var o=0;o<e.length;o++)t.maxY=Math.max(t.maxY,e[o]),t.minY=Math.min(t.minY,i[o])}}]),t}(),J=function(){function t(e,i){o(this,t),this.ctx=e,this.elgrid=i,this.w=e.w;var a=this.w;this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.axisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===a.config.chart.type&&a.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===a.config.xaxis.position&&(this.xAxisoffX=a.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new j(e)}return c(t,[{key:"drawYaxis",value:function(t){var e=this,i=this.w,a=new k(this.ctx),n=i.config.yaxis[t].labels.style,r=n.fontSize,s=n.fontFamily,o=n.fontWeight,l=a.group({class:"apexcharts-yaxis",rel:t,transform:"translate("+i.globals.translateYAxisX[t]+", 0)"});if(this.axesUtils.isYAxisHidden(t))return l;var c=a.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var h=i.globals.yAxisScale[t].result.length-1,d=i.globals.gridHeight/h,u=i.globals.translateY,p=i.globals.yLabelFormatters[t],f=i.globals.yAxisScale[t].result.slice();f=this.axesUtils.checkForReversedLabels(t,f);var g="";if(i.config.yaxis[t].labels.show)for(var x=function(l){var x=f[l];x=p(x,l,i);var m=i.config.yaxis[t].labels.padding;i.config.yaxis[t].opposite&&0!==i.config.yaxis.length&&(m*=-1);var b=e.axesUtils.getYAxisForeColor(n.colors,t),v=a.drawText({x:m,y:u+h/10+i.config.yaxis[t].labels.offsetY+1,text:x,textAnchor:i.config.yaxis[t].opposite?"start":"end",fontSize:r,fontFamily:s,fontWeight:o,maxWidth:i.config.yaxis[t].labels.maxWidth,foreColor:Array.isArray(b)?b[l]:b,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+n.cssClass});l===h&&(g=v),c.add(v);var y=document.createElementNS(i.globals.SVGNS,"title");if(y.textContent=Array.isArray(x)?x.join(" "):x,v.node.appendChild(y),0!==i.config.yaxis[t].labels.rotate){var w=a.rotateAroundCenter(g.node),k=a.rotateAroundCenter(v.node);v.node.setAttribute("transform","rotate(".concat(i.config.yaxis[t].labels.rotate," ").concat(w.x," ").concat(k.y,")"))}u+=d},m=h;m>=0;m--)x(m);if(void 0!==i.config.yaxis[t].title.text){var b=a.group({class:"apexcharts-yaxis-title"}),v=0;i.config.yaxis[t].opposite&&(v=i.globals.translateYAxisX[t]);var y=a.drawText({x:v,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[t].title.offsetY,text:i.config.yaxis[t].title.text,textAnchor:"end",foreColor:i.config.yaxis[t].title.style.color,fontSize:i.config.yaxis[t].title.style.fontSize,fontWeight:i.config.yaxis[t].title.style.fontWeight,fontFamily:i.config.yaxis[t].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[t].title.style.cssClass});b.add(y),l.add(b)}var w=i.config.yaxis[t].axisBorder,S=31+w.offsetX;if(i.config.yaxis[t].opposite&&(S=-31-w.offsetX),w.show){var A=a.drawLine(S,i.globals.translateY+w.offsetY-2,S,i.globals.gridHeight+i.globals.translateY+w.offsetY+2,w.color,0,w.width);l.add(A)}return i.config.yaxis[t].axisTicks.show&&this.axesUtils.drawYAxisTicks(S,h,w,i.config.yaxis[t].axisTicks,t,d,l),l}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new k(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),n=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(n);var r=e.globals.yAxisScale[t].result.length-1,s=e.globals.gridWidth/r+.1,o=s+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=e.globals.yAxisScale[t].result.slice(),h=e.globals.timescaleLabels;h.length>0&&(this.xaxisLabels=h.slice(),r=(c=h.slice()).length),c=this.axesUtils.checkForReversedLabels(t,c);var d=h.length;if(e.config.xaxis.labels.show)for(var u=d?0:r;d?u<d:u>=0;d?u++:u--){var p=c[u];p=l(p,u,e);var f=e.globals.gridWidth+e.globals.padHorizontal-(o-s+e.config.xaxis.labels.offsetX);if(h.length){var g=this.axesUtils.getLabel(c,h,f,u,this.drawnLabels,this.xaxisFontSize);f=g.x,p=g.text,this.drawnLabels.push(g.text),0===u&&e.globals.skipFirstTimelinelabel&&(p=""),u===c.length-1&&e.globals.skipLastTimelinelabel&&(p="")}var x=i.drawText({x:f,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:p,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});n.add(x),x.tspan(p);var m=document.createElementNS(e.globals.SVGNS,"title");m.textContent=p,x.node.appendChild(m),o+=s}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new k(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var n=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(n-=15);var r=i.drawLine(e.globals.padHorizontal+n+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new k(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),n=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});a.add(n),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new k(this.ctx),n={width:0,height:0},r={width:0,height:0},s=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g"));null!==s&&(n=s.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text"));if(null!==o&&(r=o.getBoundingClientRect()),null!==o){var l=this.xPaddingForYAxisTitle(t,n,r,e);o.setAttribute("x",l.xPos-(e?10:0))}if(null!==o){var c=a.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var n=this.w,r=0,s=0,o=10;return void 0===n.config.yaxis[t].title.text||t<0?{xPos:s,padd:0}:(a?(s=e.width+n.config.yaxis[t].title.offsetX+i.width/2+o/2,0===(r+=1)&&(s-=o/2)):(s=-1*e.width+n.config.yaxis[t].title.offsetX+o/2+i.width/2,n.globals.isBarHorizontal&&(o=25,s=-1*e.width-n.config.yaxis[t].title.offsetX-o)),{xPos:s,padd:o})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,n=0,r=18,s=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(o,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!o.show||o.floating||0===t[l].width,h=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(n=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=n-o.labels.offsetX):(n=i.globals.gridWidth+i.globals.translateX+s,c||(s=s+h+20),i.globals.translateYAxisX[l]=n-o.labels.offsetX+20):(a=i.globals.translateX-r,c||(r=r+h+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(e=v.listToArray(e)).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&void 0!==a.labels.align){var n=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));r=v.listToArray(r);var s=n.getBoundingClientRect();"left"===a.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","start")})),a.opposite||n.setAttribute("transform","translate(-".concat(s.width,", 0)"))):"center"===a.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","middle")})),n.setAttribute("transform","translate(".concat(s.width/2*(a.opposite?1:-1),", 0)"))):"right"===a.labels.align&&(r.forEach((function(t,e){t.setAttribute("text-anchor","end")})),a.opposite&&n.setAttribute("transform","translate(".concat(s.width,", 0)")))}}))}}]),t}(),Q=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return c(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],n=a.length,r=0;r<n;r++)a[r].apply(null,e)}}},{key:"setupEventHandlers",value:function(){var t=this,e=this.w,i=this.ctx,a=e.globals.dom.baseEl.querySelector(e.globals.chartClass);this.ctx.eventList.forEach((function(t){a.addEventListener(t,(function(t){var a=Object.assign({},e,{seriesIndex:e.globals.capturedSeriesIndex,dataPointIndex:e.globals.capturedDataPointIndex});"mousemove"===t.type||"touchmove"===t.type?"function"==typeof e.config.chart.events.mouseMove&&e.config.chart.events.mouseMove(t,i,a):"mouseleave"===t.type||"touchleave"===t.type?"function"==typeof e.config.chart.events.mouseLeave&&e.config.chart.events.mouseLeave(t,i,a):("mouseup"===t.type&&1===t.which||"touchend"===t.type)&&("function"==typeof e.config.chart.events.click&&e.config.chart.events.click(t,i,a),i.ctx.events.fireEvent("click",[t,i,a]))}),{capture:!1,passive:!0})})),this.ctx.eventList.forEach((function(i){e.globals.dom.baseEl.addEventListener(i,t.documentEvent,{passive:!0})})),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(t){var e=this.w,i=t.target.className;if("click"===t.type){var a=e.globals.dom.baseEl.querySelector(".apexcharts-menu");a&&a.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==i&&a.classList.remove("apexcharts-menu-open")}e.globals.clientX="touchmove"===t.type?t.touches[0].clientX:t.clientX,e.globals.clientY="touchmove"===t.type?t.touches[0].clientY:t.clientY}}]),t}(),K=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(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.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(T,i);this.w.globals.locale=a.options}}]),t}(),tt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"drawAxis",value:function(t,e){var i,a,n=this.w.globals,r=this.w.config,s=new G(this.ctx,e),o=new J(this.ctx,e);n.axisCharts&&"radar"!==t&&(n.isBarHorizontal?(a=o.drawYaxisInversed(0),i=s.drawXaxisInversed(0),n.dom.elGraphical.add(i),n.dom.elGraphical.add(a)):(i=s.drawXaxis(),n.dom.elGraphical.add(i),r.yaxis.map((function(t,e){-1===n.ignoreYAxisIndexes.indexOf(e)&&(a=o.drawYaxis(e),n.dom.Paper.add(a))}))))}}]),t}(),et=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new k(this.ctx),i=new w(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,n=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,s=a.colorFrom,o=a.colorTo,l=a.opacityFrom,c=a.opacityTo,h=a.stops,d=n.enabled,u=n.left,p=n.top,f=n.blur,g=n.color,x=n.opacity,m=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(m=e.drawGradient("vertical",s,o,l,c,null,h,null));var b=e.drawRect();1===t.config.xaxis.crosshairs.width&&(b=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var S=t.config.xaxis.crosshairs.width;(!v.isNumber(S)||S<0)&&(S=0),b.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:S,height:y,fill:m,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(b=i.dropShadow(b,{left:u,top:p,blur:f,color:g,opacity:x})),t.globals.dom.elGraphical.add(b)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new k(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var n=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);n.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(n)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),it=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var n=a.responsive.slice();n.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new N({}),s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n[0].breakpoint,s=window.innerWidth>0?window.innerWidth:screen.width;if(s>a){var o=S.extendArrayProps(r,i.globals.initialConfig,i);t=v.extend(o,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var l=0;l<n.length;l++)s<n[l].breakpoint&&(t=S.extendArrayProps(r,n[l].options,i),t=v.extend(i.config,t),e.overrideResponsiveOptions(t))};if(t){var o=S.extendArrayProps(r,t,i);o=v.extend(i.config,o),s(o=v.extend(o,t))}else s({})}}},{key:"overrideResponsiveOptions",value:function(t){var e=new N(t).init({responsiveOverride:!0});this.w.config=e}}]),t}(),at=function(){function t(e){o(this,t),this.ctx=e,this.colors=[],this.w=e.w;var i=this.w;this.isColorFn=!1,this.isHeatmapDistributed="treemap"===i.config.chart.type&&i.config.plotOptions.treemap.distributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap.distributed,this.isBarDistributed=i.config.plotOptions.bar.distributed&&("bar"===i.config.chart.type||"rangeBar"===i.config.chart.type)}return c(t,[{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var t=this,e=this.w,i=new v;if(e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode)),void 0===e.config.colors?e.globals.colors=this.predefined():(e.globals.colors=e.config.colors,Array.isArray(e.config.colors)&&e.config.colors.length>0&&"function"==typeof e.config.colors[0]&&(e.globals.colors=e.config.series.map((function(i,a){var n=e.config.colors[a];return n||(n=e.config.colors[0]),"function"==typeof n?(t.isColorFn=!0,n({value:e.globals.axisCharts?e.globals.series[a][0]?e.globals.series[a][0]:0:e.globals.series[a],seriesIndex:a,dataPointIndex:a,w:e})):n})))),e.globals.seriesColors.map((function(t,i){t&&(e.globals.colors[i]=t)})),e.config.theme.monochrome.enabled){var a=[],n=e.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(n=e.globals.series[0].length*e.globals.series.length);for(var r=e.config.theme.monochrome.color,s=1/(n/e.config.theme.monochrome.shadeIntensity),o=e.config.theme.monochrome.shadeTo,l=0,c=0;c<n;c++){var h=void 0;"dark"===o?(h=i.shadeColor(-1*l,r),l+=s):(h=i.shadeColor(l,r),l+=s),a.push(h)}e.globals.colors=a.slice()}var d=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),["fill","stroke"].forEach((function(i){void 0===e.config[i].colors?e.globals[i].colors=t.isColorFn?e.config.colors:d:e.globals[i].colors=e.config[i].colors.slice(),t.pushExtraColors(e.globals[i].colors)})),void 0===e.config.dataLabels.style.colors?e.globals.dataLabels.style.colors=d:e.globals.dataLabels.style.colors=e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50),void 0===e.config.plotOptions.radar.polygons.fill.colors?e.globals.radarPolygons.fill.colors=["dark"===e.config.theme.mode?"#424242":"none"]:e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20),void 0===e.config.markers.colors?e.globals.markers.colors=d:e.globals.markers.colors=e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,n=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(n=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.length<n)for(var r=n-t.length,s=0;s<r;s++)t.push(t[s])}},{key:"updateThemeOptions",value:function(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};var e=t.theme.mode||"light",i=t.theme.palette?t.theme.palette:"dark"===e?"palette4":"palette1",a=t.chart.foreColor?t.chart.foreColor:"dark"===e?"#f6f7f8":"#373d3f";return t.tooltip.theme=e,t.chart.foreColor=a,t.theme.palette=i,t}},{key:"predefined",value:function(){switch(this.w.config.theme.palette){case"palette1":default:this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"];break;case"palette2":this.colors=["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"];break;case"palette3":this.colors=["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"];break;case"palette4":this.colors=["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"];break;case"palette5":this.colors=["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"];break;case"palette6":this.colors=["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"];break;case"palette7":this.colors=["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"];break;case"palette8":this.colors=["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"];break;case"palette9":this.colors=["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"];break;case"palette10":this.colors=["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"]}return this.colors}}]),t}(),nt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(t){var e=this.w,i="title"===t?e.config.title:e.config.subtitle,a=e.globals.svgWidth/2,n=i.offsetY,r="middle";if("left"===i.align?(a=10,r="start"):"right"===i.align&&(a=e.globals.svgWidth-10,r="end"),a+=i.offsetX,n=n+parseInt(i.style.fontSize,10)+i.margin/2,void 0!==i.text){var s=new k(this.ctx).drawText({x:a,y:n,text:i.text,textAnchor:r,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});s.node.setAttribute("class","apexcharts-".concat(t,"-text")),e.globals.dom.Paper.add(s)}}}]),t}(),rt=function(){function t(e){o(this,t),this.w=e.w,this.dCtx=e}return c(t,[{key:"getTitleSubtitleCoords",value:function(t){var e=this.w,i=0,a=0,n="title"===t?e.config.title.floating:e.config.subtitle.floating,r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(t,"-text"));if(null!==r&&!n){var s=r.getBoundingClientRect();i=s.width,a=e.globals.axisCharts?s.height+5:s.height}return{width:i,height:a}}},{key:"getLegendsRect",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelector(".apexcharts-legend");t.config.legend.height||"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||(e.style.maxHeight=t.globals.svgHeight/2+"px");var i=Object.assign({},v.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:0===i.height?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==t.config.legend.position&&"right"!==t.config.legend.position||1.5*this.dCtx.lgRect.width>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),n=Math.max.apply(Math,x(a));i=e[a.indexOf(n)]}return i}}]),t}(),st=function(){function t(e){o(this,t),this.w=e.w,this.dCtx=e}return c(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var n=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(s=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new W(this.dCtx.ctx),l=r;r=o.xLabelFormat(n,r,l,{i:void 0,dateFormatter:new E(this.dCtx.ctx).formatDate,w:e}),s=o.xLabelFormat(n,s,l,{i:void 0,dateFormatter:new E(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(s=r="1");var c=new k(this.dCtx.ctx),h=c.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=h;if(r!==s&&(d=c.getTextRects(s,e.config.xaxis.labels.style.fontSize)),(t={width:h.width>=d.width?h.width:d.width,height:h.height>=d.height?h.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};h=u(r),r!==s&&(d=u(s)),t.height=(h.height>d.height?h.height:d.height)/1.5,t.width=h.width>d.width?h.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,n=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(n),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,n),o=new k(this.dCtx.ctx),l=o.getTextRects(r,a),c=l;return r!==s&&(c=o.getTextRects(s,a)),i={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new k(this.dCtx.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:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.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*(t=new k(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,n=i.config,r=n.xaxis.type,s=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){(function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)})(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+s/1.75-e.dCtx.yAxisWidthRight,c=o.position-s/1.75+e.dCtx.yAxisWidthLeft,h="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-h&&(a.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==n.chart.type&&"candlestick"!==n.chart.type&&"rangeBar"!==n.chart.type&&"boxPlot"!==n.chart.type?10:s/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right<s&&!a.rotateXLabels&&(a.skipLastTimelinelabel=!0):"datetime"!==r&&e.dCtx.gridPad.right<s/2-e.dCtx.yAxisWidthRight&&!a.rotateXLabels&&!i.config.xaxis.labels.trim&&("between"!==i.config.xaxis.tickPlacement||i.globals.isBarHorizontal)&&(e.dCtx.xPadRight=s/2+1)}(t)};n.yaxis.forEach((function(t,i){o?(e.dCtx.gridPad.left<s&&(e.dCtx.xPadLeft=s/2+1),e.dCtx.xPadRight=s/2+1):l(t,i)}))}}]),t}(),ot=function(){function t(e){o(this,t),this.w=e.w,this.dCtx=e}return c(t,[{key:"getyAxisLabelsCoords",value:function(){var t=this,e=this.w,i=[],a=10,n=new j(this.dCtx.ctx);return e.config.yaxis.map((function(r,s){var o=e.globals.yAxisScale[s],l=0;if(!n.isYAxisHidden(s)&&r.labels.show&&void 0!==r.labels.minWidth&&(l=r.labels.minWidth),!n.isYAxisHidden(s)&&r.labels.show&&o.result.length){var c=e.globals.yLabelFormatters[s],h=o.niceMin===Number.MIN_VALUE?0:o.niceMin,d=String(h).length>String(o.niceMax).length?h:o.niceMax,u=c(d,{seriesIndex:s,dataPointIndex:-1,w:e}),p=u;if(void 0!==u&&0!==u.length||(u=d),e.globals.isBarHorizontal){a=0;var f=e.globals.labels.slice();u=c(u=v.getLargestStringFromArr(f),{seriesIndex:s,dataPointIndex:-1,w:e}),p=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,f)}var g=new k(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),m=g.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),b=m;u!==p&&(b=g.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(l>b.width||l>m.width?l:b.width>m.width?b.width:m.width)+a,height:b.height>m.height?b.height:m.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var n=new k(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),s=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:s.width,height:s.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,n=t.globals.yAxisScale.length>1?10:0,r=new j(this.dCtx.ctx),s=function(s,o){var l=t.config.yaxis[o].floating,c=0;s.width>0&&!l?(c=s.width+n,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(c=c-s.width-n)):c=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=c:i+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){s(t,e)})),t.globals.yTitleCoords.map((function(t,e){s(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),lt=function(){function t(e){o(this,t),this.w=e.w,this.dCtx=e}return c(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w;if(e.globals.noData||e.globals.allSeriesCollapsed)return 0;var i=function(t){return"bar"===t||"rangeBar"===t||"candlestick"===t||"boxPlot"===t},a=e.config.chart.type,n=0,r=i(a)?e.config.series.length:1;if(e.globals.comboBarCount>0&&(r=e.globals.comboBarCount),e.globals.collapsedSeries.forEach((function(t){i(t.type)&&(r-=1)})),e.config.chart.stacked&&(r=1),(i(a)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&r>0){var s,o,l=Math.abs(e.globals.initialMaxX-e.globals.initialMinX);l<=3&&(l=e.globals.dataPoints),s=l/t,e.globals.minXDiff&&e.globals.minXDiff/s>0&&(o=e.globals.minXDiff/s),o>t/2&&(o/=2),(n=o/r*parseInt(e.config.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),n=n/(r>1?1:1.5)+5,e.globals.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!e.globals.axisCharts?0:10;["title","subtitle"].forEach((function(i){void 0!==e.config[i].text?a+=e.config[i].margin:a+=t.dCtx.isSparkline||!e.globals.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||e.globals.axisCharts||(a+=10);var n=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-n.height-r.height-a,i.translateY=i.translateY+n.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new j(this.dCtx.ctx);i.config.yaxis.map((function(n,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||n.floating||a.isYAxisHidden(r)||(n.opposite&&(i.globals.translateX=i.globals.translateX-(e[r].width+t[r].width)-parseInt(i.config.yaxis[r].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),ct=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new rt(this),this.dimYAxis=new ot(this),this.dimXAxis=new st(this),this.dimGrid=new lt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return c(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&(e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,n,r=[],s=!0,o=!1;try{for(i=i.call(t);!(s=(a=i.next()).done)&&(r.push(a.value),2!==r.length);s=!0);}catch(t){o=!0,n=t}finally{try{s||null==i.return||i.return()}finally{if(o)throw n}}return r}}(t)||m(t,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e),a=i[0],n=i[1];t.gridPad[a]=Math.max(n,t.w.globals.markers.largestSize/1.5)})),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var a=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*a,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(a>0?a+4:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),n=this.dimYAxis.getyAxisTitleCoords();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.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),s=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,s),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,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var h=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,h=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l,i.gridHeight=i.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l};switch("top"===e.config.xaxis.position&&(h=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=h,d();break;case"top":i.translateY=this.lgRect.height+h,d();break;case"left":i.translateY=h,i.translateX=this.lgRect.width+l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l;break;case"right":i.translateY=h,i.translateX=l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(n,a),new J(this.ctx).setYAxisXPosition(a,n)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var n="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[n].offsetY,s=i.plotOptions[n].offsetX;if(!i.legend.show||i.legend.floating)return e.gridHeight=e.svgHeight-i.grid.padding.left+i.grid.padding.right,e.gridWidth=e.gridHeight,e.translateY=r,void(e.translateX=s+(e.svgWidth-e.gridWidth)/2);switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=s+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=s+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=s+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=s+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,n=a.globals.hasGroups?2:1,r=i.height+t.height+e.height,s=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*s+n*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeight<a.config.xaxis.labels.minHeight&&(this.xAxisHeight=a.config.xaxis.labels.minHeight),a.config.xaxis.floating&&(this.xAxisHeight=0);var c=0,h=0;a.config.yaxis.forEach((function(t){c+=t.labels.minWidth,h+=t.labels.maxWidth})),this.yAxisWidth<c&&(this.yAxisWidth=c),this.yAxisWidth>h&&(this.yAxisWidth=h)}}]),t}(),ht=function(){function t(e){o(this,t),this.w=e.w,this.lgCtx=e}return c(t,[{key:"getLegendStyles",value:function(){var t=document.createElement("style");t.setAttribute("type","text/css");var e=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return t.appendChild(e),t}},{key:"getLegendBBox",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){var t=this.w.globals;t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject");var e=t.dom.elLegendForeign;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.appendChild(this.getLegendStyles()),t.dom.Paper.node.insertBefore(e,t.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var n=null,r=null;a.globals.risingSeries=[],a.globals.axisCharts?(n=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(n.getAttribute("data:realIndex"),10)):(n=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(n.getAttribute("rel"),10)-1),e?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)})):this.hideSeries({seriesEl:n,realIndex:r})}else{var s=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new k(this.lgCtx.ctx).pathMouseDown(s.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(s.members[0].node,l)}s.fire("click")}}},{key:"hideSeries",value:function(t){var e=t.seriesEl,i=t.realIndex,a=this.w,n=v.clone(a.config.series);if(a.globals.axisCharts){var r=!1;if(a.config.yaxis[i]&&a.config.yaxis[i].show&&a.config.yaxis[i].showAlways&&(r=!0,a.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(a.globals.ancillaryCollapsedSeries.push({index:i,data:n[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),a.globals.ancillaryCollapsedSeriesIndices.push(i))),!r){a.globals.collapsedSeries.push({index:i,data:n[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),a.globals.collapsedSeriesIndices.push(i);var s=a.globals.risingSeries.indexOf(i);a.globals.risingSeries.splice(s,1)}}else a.globals.collapsedSeries.push({index:i,data:n[i]}),a.globals.collapsedSeriesIndices.push(i);for(var o=e.childNodes,l=0;l<o.length;l++)o[l].classList.contains("apexcharts-series-markers-wrap")&&(o[l].classList.contains("apexcharts-hide")?o[l].classList.remove("apexcharts-hide"):o[l].classList.add("apexcharts-hide"));a.globals.allSeriesCollapsed=a.globals.collapsedSeries.length===a.config.series.length,n=this._getSeriesBasedOnCollapsedState(n),this.lgCtx.ctx.updateHelpers._updateSeries(n,a.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(t,e,i){var a=this.w,n=v.clone(a.config.series);if(t.length>0){for(var r=0;r<t.length;r++)t[r].index===i&&(a.globals.axisCharts?(n[i].data=t[r].data.slice(),t.splice(r,1),e.splice(r,1),a.globals.risingSeries.push(i)):(n[i]=t[r].data,t.splice(r,1),e.splice(r,1),a.globals.risingSeries.push(i)));n=this._getSeriesBasedOnCollapsedState(n),this.lgCtx.ctx.updateHelpers._updateSeries(n,a.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(t){var e=this.w;return e.globals.axisCharts?t.forEach((function(i,a){e.globals.collapsedSeriesIndices.indexOf(a)>-1&&(t[a].data=[])})):t.forEach((function(i,a){e.globals.collapsedSeriesIndices.indexOf(a)>-1&&(t[a]=0)})),t}}]),t}(),dt=function(){function t(e,i){o(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new ht(this)}return c(t,[{key:"init",value:function(){var t=this.w,e=t.globals,i=t.config;if((i.legend.showForSingleSeries&&1===e.series.length||this.isBarsDistributed||e.series.length>1||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),v.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,n=e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),n=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var s=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var c=s(a[l],{seriesIndex:l,w:e}),h=!1,d=!1;if(e.globals.collapsedSeries.length>0)for(var u=0;u<e.globals.collapsedSeries.length;u++)e.globals.collapsedSeries[u].index===l&&(h=!0);if(e.globals.ancillaryCollapsedSeriesIndices.length>0)for(var p=0;p<e.globals.ancillaryCollapsedSeriesIndices.length;p++)e.globals.ancillaryCollapsedSeriesIndices[p]===l&&(d=!0);var f=document.createElement("span");f.classList.add("apexcharts-legend-marker");var g=e.config.legend.markers.offsetX,x=e.config.legend.markers.offsetY,m=e.config.legend.markers.height,b=e.config.legend.markers.width,y=e.config.legend.markers.strokeWidth,w=e.config.legend.markers.strokeColor,A=e.config.legend.markers.radius,C=f.style;C.background=n[l],C.color=n[l],C.setProperty("background",n[l],"important"),e.config.legend.markers.fillColors&&e.config.legend.markers.fillColors[l]&&(C.background=e.config.legend.markers.fillColors[l]),void 0!==e.globals.seriesColors[l]&&(C.background=e.globals.seriesColors[l],C.color=e.globals.seriesColors[l]),C.height=Array.isArray(m)?parseFloat(m[l])+"px":parseFloat(m)+"px",C.width=Array.isArray(b)?parseFloat(b[l])+"px":parseFloat(b)+"px",C.left=(Array.isArray(g)?parseFloat(g[l]):parseFloat(g))+"px",C.top=(Array.isArray(x)?parseFloat(x[l]):parseFloat(x))+"px",C.borderWidth=Array.isArray(y)?y[l]:y,C.borderColor=Array.isArray(w)?w[l]:w,C.borderRadius=Array.isArray(A)?parseFloat(A[l])+"px":parseFloat(A)+"px",e.config.legend.markers.customHTML&&(Array.isArray(e.config.legend.markers.customHTML)?e.config.legend.markers.customHTML[l]&&(f.innerHTML=e.config.legend.markers.customHTML[l]()):f.innerHTML=e.config.legend.markers.customHTML()),k.setAttrs(f,{rel:l+1,"data:collapsed":h||d}),(h||d)&&f.classList.add("apexcharts-inactive-legend");var P=document.createElement("div"),L=document.createElement("span");L.classList.add("apexcharts-legend-text"),L.innerHTML=Array.isArray(c)?c.join(" "):c;var T=e.config.legend.labels.useSeriesColors?e.globals.colors[l]:e.config.legend.labels.colors;T||(T=e.config.chart.foreColor),L.style.color=T,L.style.fontSize=parseFloat(e.config.legend.fontSize)+"px",L.style.fontWeight=e.config.legend.fontWeight,L.style.fontFamily=i||e.config.chart.fontFamily,k.setAttrs(L,{rel:l+1,i:l,"data:default-text":encodeURIComponent(c),"data:collapsed":h||d}),P.appendChild(f),P.appendChild(L);var D=new S(this.ctx);e.config.legend.showForZeroSeries||0===D.getSeriesTotalByIndex(l)&&D.seriesHaveSameValues(l)&&!D.isSeriesNull(l)&&-1===e.globals.collapsedSeriesIndices.indexOf(l)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&P.classList.add("apexcharts-hidden-zero-series"),e.config.legend.showForNullSeries||D.isSeriesNull(l)&&-1===e.globals.collapsedSeriesIndices.indexOf(l)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&P.classList.add("apexcharts-hidden-null-series"),e.globals.dom.elLegendWrap.appendChild(P),e.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(e.config.legend.horizontalAlign)),e.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+e.config.legend.position),P.classList.add("apexcharts-legend-series"),P.style.margin="".concat(e.config.legend.itemMargin.vertical,"px ").concat(e.config.legend.itemMargin.horizontal,"px"),e.globals.dom.elLegendWrap.style.width=e.config.legend.width?e.config.legend.width+"px":"",e.globals.dom.elLegendWrap.style.height=e.config.legend.height?e.config.legend.height+"px":"",k.setAttrs(P,{rel:l+1,seriesName:v.escapeString(a[l]),"data:collapsed":h||d}),(h||d)&&P.classList.add("apexcharts-inactive-legend"),e.config.legend.onItemClick.toggleDataSeries||P.classList.add("apexcharts-no-click")}e.globals.dom.elWrap.addEventListener("click",t.onLegendClick,!0),e.config.legend.onItemHover.highlightDataSeries&&0===e.config.legend.customLegendItems.length&&(e.globals.dom.elWrap.addEventListener("mousemove",t.onLegendHovered,!0),e.globals.dom.elWrap.addEventListener("mouseout",t.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(t,e){var i=this.w,a=i.globals.dom.baseEl.querySelector(".apexcharts-legend"),n=a.getBoundingClientRect(),r=0,s=0;if("bottom"===i.config.legend.position)s+=i.globals.svgHeight-n.height/2;else if("top"===i.config.legend.position){var o=new ct(this.ctx),l=o.dimHelpers.getTitleSubtitleCoords("title").height,c=o.dimHelpers.getTitleSubtitleCoords("subtitle").height;s=s+(l>0?l-10:0)+(c>0?c-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,s=s+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=s+"px","bottom"===i.config.legend.position?(a.style.top="auto",a.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var e=this.legendHelpers.getLegendBBox(),i=new ct(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),n=i.dimHelpers.getTitleSubtitleCoords("subtitle"),r=0;"bottom"===t.config.legend.position?r=-e.clwh/1.8:"top"===t.config.legend.position&&(r=a.height+n.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,r)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendBBox(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),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");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new $(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new $(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ut=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=i.globals.minX,this.maxX=i.globals.maxX}return c(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var n=0;n<this.t.customIcons.length;n++)this.elCustomIcons.push(i());var r=[],s=function(i,a,n){var s=i.toLowerCase();t.t[s]&&e.config.chart.zoom.enabled&&r.push({el:a,icon:"string"==typeof t.t[s]?t.t[s]:n,title:t.localeValues[i],class:"apexcharts-".concat(s,"-icon")})};s("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n'),s("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>\n <path d="M0 0h24v24H0V0z" fill="none"/>\n <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>\n</svg>':'<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>\n</svg>',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <defs>\n <path d="M0 0h24v24H0z" id="a"/>\n </defs>\n <clipPath id="b">\n <use overflow="visible" xlink:href="#a"/>\n </clipPath>\n <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>\n</svg>',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),s("reset",this.elZoomReset,'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n</svg>'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l<this.elCustomIcons.length;l++)r.push({el:this.elCustomIcons[l],icon:this.t.customIcons[l].icon,title:this.t.customIcons[l].title,index:this.t.customIcons[l].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[l].class});r.forEach((function(t,e){t.index&&v.moveIndexInArray(r,e,t.index)}));for(var c=0;c<r.length;c++)k.setAttrs(r[c].el,{class:r[c].class,title:r[c].title}),r[c].el.innerHTML=r[c].icon,a.appendChild(r[c].el);this._createHamburgerMenu(a),e.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):e.globals.panEnabled?this.elPan.classList.add(this.selectedClass):e.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(t){this.elMenuItems=[],t.appendChild(this.elMenu),k.setAttrs(this.elMenu,{class:"apexcharts-menu"});var e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];this.w.globals.allSeriesHasEqualX||e.splice(2,1);for(var i=0;i<e.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=e[i].title,k.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(e[i].name),title:e[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var t=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach((function(e){e.classList.contains("exportSVG")?e.addEventListener("click",t.handleDownload.bind(t,"svg")):e.classList.contains("exportPNG")?e.addEventListener("click",t.handleDownload.bind(t,"png")):e.classList.contains("exportCSV")&&e.addEventListener("click",t.handleDownload.bind(t,"csv"))}));for(var e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener("click",this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(t){this.ctx.getSyncedCharts().forEach((function(e){e.ctx.toolbar.toggleOtherControls();var i="selection"===t?e.ctx.toolbar.elSelection:e.ctx.toolbar.elZoom,a="selection"===t?"selectionEnabled":"zoomEnabled";e.w.globals[a]=!e.w.globals[a],i.classList.contains(e.ctx.toolbar.selectedClass)?i.classList.remove(e.ctx.toolbar.selectedClass):i.classList.add(e.ctx.toolbar.selectedClass)}))}},{key:"getToolbarIconsReference",value:function(){var t=this.w;this.elZoom||(this.elZoom=t.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(t){this.toggleOtherControls(),"pan"===t?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var e="pan"===t?this.elPan:this.elZoom,i="pan"===t?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach((function(t){t.ctx.toolbar.toggleOtherControls(),t.w.globals.panEnabled=!t.w.globals.panEnabled,t.ctx.toolbar.elPan.classList.contains(t.ctx.toolbar.selectedClass)?t.ctx.toolbar.elPan.classList.remove(t.ctx.toolbar.selectedClass):t.ctx.toolbar.elPan.classList.add(t.ctx.toolbar.selectedClass)}))}},{key:"toggleOtherControls",value:function(){var t=this,e=this.w;e.globals.panEnabled=!1,e.globals.zoomEnabled=!1,e.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach((function(e){e&&e.classList.remove(t.selectedClass)}))}},{key:"handleZoomIn",value:function(){var t=this.w;t.globals.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY);var e=(this.minX+this.maxX)/2,i=(this.minX+e)/2,a=(this.maxX+e)/2,n=this._getNewMinXMaxX(i,a);t.globals.disableZoomIn||this.zoomUpdateOptions(n.minX,n.maxX)}},{key:"handleZoomOut",value:function(){var t=this.w;if(t.globals.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY),!("datetime"===t.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)){var e=(this.minX+this.maxX)/2,i=this.minX-(e-this.minX),a=this.maxX-(e-this.maxX),n=this._getNewMinXMaxX(i,a);t.globals.disableZoomOut||this.zoomUpdateOptions(n.minX,n.maxX)}}},{key:"_getNewMinXMaxX",value:function(t,e){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(t):t,maxX:i?Math.floor(e):e}}},{key:"zoomUpdateOptions",value:function(t,e){var i=this.w;if(void 0!==t||void 0!==e){if(!(i.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=i.globals.dataPoints),e-t<2))){var a={min:t,max:e},n=this.getBeforeZoomRange(a);n&&(a=n.xaxis);var r={xaxis:a},s=v.clone(i.globals.initialConfig.yaxis);i.config.chart.zoom.autoScaleYaxis&&(s=new U(this.ctx).autoScaleY(this.ctx,s,{xaxis:a})),i.config.chart.group||(r.yaxis=s),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(r,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(a,s)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(t,e){"function"==typeof this.ev.zoomed&&this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e})}},{key:"getBeforeZoomRange",value:function(t,e){var i=null;return"function"==typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),i}},{key:"toggleMenu",value:function(){var t=this;window.setTimeout((function(){t.elMenu.classList.contains("apexcharts-menu-open")?t.elMenu.classList.remove("apexcharts-menu-open"):t.elMenu.classList.add("apexcharts-menu-open")}),0)}},{key:"handleDownload",value:function(t){var e=this.w,i=new V(this.ctx);switch(t){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(t){this.ctx.getSyncedCharts().forEach((function(t){var e=t.w;if(e.globals.lastXAxis.min=void 0,e.globals.lastXAxis.max=void 0,t.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof e.config.chart.events.beforeResetZoom){var i=e.config.chart.events.beforeResetZoom(t,e);i&&t.updateHelpers.revertDefaultAxisMinMax(i)}"function"==typeof e.config.chart.events.zoomed&&t.ctx.toolbar.zoomCallback({min:e.config.xaxis.min,max:e.config.xaxis.max}),e.globals.zoomed=!1;var a=t.ctx.series.emptyCollapsedSeries(v.clone(e.globals.initialSeries));t.updateHelpers._updateSeries(a,e.config.chart.animations.dynamicAnimation.enabled)}))}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),t}(),pt=function(t){d(i,ut);var e=g(i);function i(t){var a;return o(this,i),(a=e.call(this,t)).ctx=t,a.w=t.w,a.dragged=!1,a.graphics=new k(a.ctx),a.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],a.clientX=0,a.clientY=0,a.startX=0,a.endX=0,a.dragX=0,a.startY=0,a.endY=0,a.dragY=0,a.moveDirection="none",a}return c(i,[{key:"init",value:function(t){var e=this,i=t.xyRatios,a=this.w,n=this;this.xyRatios=i,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=a.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),a.globals.dom.elGraphical.add(this.zoomRect),a.globals.dom.elGraphical.add(this.selectionRect),"x"===a.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:a.globals.gridWidth,maxY:a.globals.gridHeight}).on("dragmove",this.selectionDragging.bind(this,"dragging")):"y"===a.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:a.globals.gridWidth}).on("dragmove",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=a.globals.dom.baseEl.querySelector("".concat(a.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach((function(t){e.hoverArea.addEventListener(t,n.svgMouseEvents.bind(n,i),{capture:!1,passive:!0})}))}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(t,e){var i=this.w,a=this,n=this.ctx.toolbar,r=i.globals.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,s=i.config.chart.toolbar.autoSelected;if(e.shiftKey?(this.shiftWasPressed=!0,n.enableZoomPanFromToolbar("pan"===s?"zoom":"pan")):this.shiftWasPressed&&(n.enableZoomPanFromToolbar(s),this.shiftWasPressed=!1),e.target){var o,l=e.target.classList;if(e.target.parentNode&&null!==e.target.parentNode&&(o=e.target.parentNode.classList),!(l.contains("apexcharts-selection-rect")||l.contains("apexcharts-legend-marker")||l.contains("apexcharts-legend-text")||o&&o.contains("apexcharts-toolbar"))){if(a.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,a.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which){var c=a.gridRect.getBoundingClientRect();a.startX=a.clientX-c.left,a.startY=a.clientY-c.top,a.dragged=!1,a.w.globals.mousedown=!0}if(("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(a.dragged=!0,i.globals.panEnabled?(i.globals.selection=null,a.w.globals.mousedown&&a.panDragging({context:a,zoomtype:r,xyRatios:t})):(a.w.globals.mousedown&&i.globals.zoomEnabled||a.w.globals.mousedown&&i.globals.selectionEnabled)&&(a.selection=a.selectionDrawing({context:a,zoomtype:r}))),"mouseup"===e.type||"touchend"===e.type||"mouseleave"===e.type){var h=a.gridRect.getBoundingClientRect();a.w.globals.mousedown&&(a.endX=a.clientX-h.left,a.endY=a.clientY-h.top,a.dragX=Math.abs(a.endX-a.startX),a.dragY=Math.abs(a.endY-a.startY),(i.globals.zoomEnabled||i.globals.selectionEnabled)&&a.selectionDrawn({context:a,zoomtype:r}),i.globals.panEnabled&&i.config.xaxis.convertedCatToNumeric&&a.delayedPanScrolled()),i.globals.zoomEnabled&&a.hideSelectionRect(this.selectionRect),a.dragged=!1,a.w.globals.mousedown=!1}this.makeSelectionRectDraggable()}}}},{key:"makeSelectionRectDraggable",value:function(){var t=this.w;if(this.selectionRect){var e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).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,n=t.height,r=t.translateX,s=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,c=this.w,h=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==c.globals.selection){var u={transform:"translate("+s+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),h.attr({x:e,y:i,width:a,height:n,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),k.setAttrs(h.node,u)),c.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:n>0?n:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),k.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e,i=t.context,a=t.zoomtype,n=this.w,r=i,s=this.gridRect.getBoundingClientRect(),o=r.startX-1,l=r.startY,c=!1,h=!1,d=r.clientX-s.left-o,u=r.clientY-s.top-l;return Math.abs(d+o)>n.globals.gridWidth?d=n.globals.gridWidth-o:r.clientX-s.left<0&&(d=o),o>r.clientX-s.left&&(c=!0,d=Math.abs(d)),l>r.clientY-s.top&&(h=!0,u=Math.abs(u)),e="x"===a?{x:c?o-d:o,y:0,width:d,height:n.globals.gridHeight}:"y"===a?{x:0,y:h?l-u:l,width:n.globals.gridWidth,height:u}:{x:c?o-d:o,y:h?l-u:l,width:d,height:u},r.drawSelectionRect(e),r.selectionDragging("resizing"),e}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w,n=this.xyRatios,r=this.selectionRect,s=0;"resizing"===t&&(s=30);var o=function(t){return parseFloat(r.node.getAttribute(t))},l={x:o("x"),y:o("y"),width:o("width"),height:o("height")};a.globals.selection=l,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t=i.gridRect.getBoundingClientRect(),e=r.node.getBoundingClientRect(),s={xaxis:{min:a.globals.xAxisScale.niceMin+(e.left-t.left)*n.xRatio,max:a.globals.xAxisScale.niceMin+(e.right-t.left)*n.xRatio},yaxis:{min:a.globals.yAxisScale[0].niceMin+(t.bottom-e.bottom)*n.yRatio[0],max:a.globals.yAxisScale[0].niceMax-(e.top-t.top)*n.yRatio[0]}};a.config.chart.events.selection(i.ctx,s),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,s)}),s))}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,n=e,r=this.xyRatios,s=this.ctx.toolbar;if(n.startX>n.endX){var o=n.startX;n.startX=n.endX,n.endX=o}if(n.startY>n.endY){var l=n.startY;n.startY=n.endY,n.endY=l}var c=void 0,h=void 0;a.globals.isRangeBar?(c=a.globals.yAxisScale[0].niceMin+n.startX*r.invertedYRatio,h=a.globals.yAxisScale[0].niceMin+n.endX*r.invertedYRatio):(c=a.globals.xAxisScale.niceMin+n.startX*r.xRatio,h=a.globals.xAxisScale.niceMin+n.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[e]*n.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[e]*n.endY)})),n.dragged&&(n.dragX>10||n.dragY>10)&&c!==h)if(a.globals.zoomEnabled){var p=v.clone(a.globals.initialConfig.yaxis),f=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),h=Math.floor(h),c<1&&(c=1,h=a.globals.dataPoints),h-c<2&&(h=c+1)),"xy"!==i&&"x"!==i||(f={min:c,max:h}),"xy"!==i&&"y"!==i||p.forEach((function(t,e){p[e].min=u[e],p[e].max=d[e]})),a.config.chart.zoom.autoScaleYaxis){var g=new U(n.ctx);p=g.autoScaleY(n.ctx,p,{xaxis:f})}if(s){var x=s.getBeforeZoomRange(f,p);x&&(f=x.xaxis?x.xaxis:f,p=x.yaxis?x.yaxis:p)}var m={xaxis:f};a.config.chart.group||(m.yaxis=p),n.ctx.updateHelpers._updateOptions(m,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&s.zoomCallback(f,p)}else if(a.globals.selectionEnabled){var b,y=null;b={min:c,max:h},"xy"!==i&&"y"!==i||(y=v.clone(a.config.yaxis)).forEach((function(t,e){y[e].min=u[e],y[e].max=d[e]})),a.globals.selection=n.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(n.ctx,{xaxis:b,yaxis:y})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;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?this.moveDirection="left":Math.abs(n)>Math.abs(r)&&n<0?this.moveDirection="right":Math.abs(r)>Math.abs(n)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(n)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var s=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(s,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,n=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,s=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,s=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=s+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=s-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(t<i.globals.initialMinX||e>i.globals.initialMaxX)&&(t=s,e=o);var l={min:t,max:e};i.config.chart.zoom.autoScaleYaxis&&(n=new U(this.ctx).autoScaleY(this.ctx,n,{xaxis:l}));var c={xaxis:{min:t,max:e}};i.config.chart.group||(c.yaxis=n),this.updateScrolledChart(c,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),i}(),ft=function(){function t(e){o(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return c(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,n=t.clientY,r=this.w,s=i.getBoundingClientRect(),o=s.width,l=s.height,c=o/(r.globals.dataPoints-1),h=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(c=o/r.globals.dataPoints);var u=a-s.left-r.globals.barPadForNumericAxis,p=n-s.top;u<0||p<0||u>o||p>l?(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 f=Math.round(u/c),g=Math.floor(p/h);d&&!r.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(u/c),f-=1);var x=null,m=null,b=[],y=[];if(r.globals.seriesXvalues.forEach((function(t){b.push([t[0]+1e-6].concat(t))})),r.globals.seriesYvalues.forEach((function(t){y.push([t[0]+1e-6].concat(t))})),b=b.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=y.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),S=p*(w.height/l);x=(m=this.closestInMultiArray(k,S,b,y)).index,f=m.j,null!==x&&(b=r.globals.seriesXvalues[x],f=(m=this.closestInArray(k,b)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!f||f<1)&&(f=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=g:r.globals.capturedDataPointIndex=f,{capturedSeries:x,j:r.globals.isBarHorizontal?g:f,hoverX:u,hoverY:p}}},{key:"closestInMultiArray",value:function(t,e,i,a){var n=this.w,r=0,s=null,o=-1;n.globals.series.length>1?r=this.getFirstActiveXArray(i):s=0;var l=i[r][0],c=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<c&&(c=a,o=i)}))})),-1!==o){var h=a[r][o],d=Math.abs(e-h);s=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<d&&(d=a,s=i)}))}return{index:s,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),n=0;n<a.length;n++)if(-1!==a[n]&&-1===e.globals.collapsedSeriesIndices.indexOf(n)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(n)){i=a[n];break}return i}},{key:"closestInArray",value:function(t,e){for(var i=e[0],a=null,n=Math.abs(t-i),r=0;r<e.length;r++){var s=Math.abs(t-e[r]);s<n&&(n=s,a=r)}return{index:a}}},{key:"isXoverlap",value:function(t){var e=[],i=this.w.globals.seriesX.filter((function(t){return void 0!==t[0]}));if(i.length>0)for(var a=0;a<i.length-1;a++)void 0!==i[a][t]&&void 0!==i[a+1][t]&&i[a][t]!==i[a+1][t]&&e.push("unEqual");return 0===e.length}},{key:"isInitialSeriesSameLen",value:function(){for(var t=!0,e=this.w.globals.initialSeries,i=0;i<e.length-1;i++)if(e[i].data.length!==e[i+1].data.length){t=!1;break}return t}},{key:"getBarsHeight",value:function(t){return x(t).reduce((function(t,e){return t+e.getBBox().height}),0)}},{key:"getElMarkers",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(" .apexcharts-series-markers")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=x(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return a<i?1:a>i?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,n=0;n<a.length;n++)"enable"===t?(a[n].classList.add("apexcharts-active"),a[n].style.display=e.config.tooltip.items.display):(a[n].classList.remove("apexcharts-active"),a[n].style.display="none")}}]),t}(),gt=function(){function t(e){o(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new ft(e)}return c(t,[{key:"drawSeriesTexts",value:function(t){var e=t.shared,i=void 0===e||e,a=t.ttItems,n=t.i,r=void 0===n?0:n,s=t.j,o=void 0===s?null:s,l=t.y1,c=t.y2,h=t.e,d=this.w;void 0!==d.config.tooltip.custom?this.handleCustomTooltip({i:r,j:o,y1:l,y2:c,w:d}):this.toggleActiveInactiveSeries(i);var u=this.getValuesToPrint({i:r,j:o});this.printLabels({i:r,j:o,values:u,ttItems:a,shared:i,e:h});var p=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=p.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=p.getBoundingClientRect().height}},{key:"printLabels",value:function(t){var e,i=this,a=t.i,n=t.j,s=t.values,o=t.ttItems,l=t.shared,c=t.e,h=this.w,d=[],u=function(t){return h.globals.seriesGoals[t]&&h.globals.seriesGoals[t][n]&&Array.isArray(h.globals.seriesGoals[t][n])},p=s.xVal,f=s.zVal,g=s.xAxisTTVal,x="",m=h.globals.colors[a];null!==n&&h.config.plotOptions.bar.distributed&&(m=h.globals.colors[n]);for(var b=function(t,s){var b=i.getFormatters(a);x=i.getSeriesName({fn:b.yLbTitleFormatter,index:a,seriesIndex:a,j:n}),"treemap"===h.config.chart.type&&(x=b.yLbTitleFormatter(String(h.config.series[a].data[n].x),{series:h.globals.series,seriesIndex:a,dataPointIndex:n,w:h}));var v=h.config.tooltip.inverseOrder?s:t;if(h.globals.axisCharts){var y=function(t){return b.yLbFormatter(h.globals.series[t][n],{series:h.globals.series,seriesIndex:t,dataPointIndex:n,w:h})};if(l)b=i.getFormatters(v),x=i.getSeriesName({fn:b.yLbTitleFormatter,index:v,seriesIndex:a,j:n}),m=h.globals.colors[v],e=y(v),u(v)&&(d=h.globals.seriesGoals[v][n].map((function(t){return{attrs:t,val:b.yLbFormatter(t.value,{seriesIndex:v,dataPointIndex:n,w:h})}})));else{var w,k=null==c||null===(w=c.target)||void 0===w?void 0:w.getAttribute("fill");k&&(m=-1!==k.indexOf("url")?document.querySelector(k.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke"):k),e=y(a),u(a)&&Array.isArray(h.globals.seriesGoals[a][n])&&(d=h.globals.seriesGoals[a][n].map((function(t){return{attrs:t,val:b.yLbFormatter(t.value,{seriesIndex:a,dataPointIndex:n,w:h})}})))}}null===n&&(e=b.yLbFormatter(h.globals.series[a],r(r({},h),{},{seriesIndex:a,dataPointIndex:a}))),i.DOMHandling({i:a,t:v,j:n,ttItems:o,values:{val:e,goalVals:d,xVal:p,xAxisTTVal:g,zVal:f},seriesName:x,shared:l,pColor:m})},v=0,y=h.globals.series.length-1;v<h.globals.series.length;v++,y--)b(v,y)}},{key:"getFormatters",value:function(t){var e,i=this.w,a=i.globals.yLabelFormatters[t];return void 0!==i.globals.ttVal?Array.isArray(i.globals.ttVal)?(a=i.globals.ttVal[t]&&i.globals.ttVal[t].formatter,e=i.globals.ttVal[t]&&i.globals.ttVal[t].title&&i.globals.ttVal[t].title.formatter):(a=i.globals.ttVal.formatter,"function"==typeof i.globals.ttVal.title.formatter&&(e=i.globals.ttVal.title.formatter)):e=i.config.tooltip.y.title.formatter,"function"!=typeof a&&(a=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(t){return t}),"function"!=typeof e&&(e=function(t){return t}),{yLbFormatter:a,yLbTitleFormatter:e}}},{key:"getSeriesName",value:function(t){var e=t.fn,i=t.index,a=t.seriesIndex,n=t.j,r=this.w;return e(String(r.globals.seriesNames[i]),{series:r.globals.series,seriesIndex:a,dataPointIndex:n,w:r})}},{key:"DOMHandling",value:function(t){t.i;var e=t.t,i=t.j,a=t.ttItems,n=t.values,r=t.seriesName,s=t.shared,o=t.pColor,l=this.w,c=this.ttCtx,h=n.val,d=n.goalVals,u=n.xVal,p=n.xAxisTTVal,f=n.zVal,g=null;g=a[e].children,l.config.tooltip.fillSeriesColor&&(a[e].style.backgroundColor=o,g[0].style.display="none"),c.showTooltipTitle&&(null===c.tooltipTitle&&(c.tooltipTitle=l.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle.innerHTML=u),c.isXAxisTooltipEnabled&&(c.xaxisTooltipText.innerHTML=""!==p?p:u);var x=a[e].querySelector(".apexcharts-tooltip-text-y-label");x&&(x.innerHTML=r||"");var m=a[e].querySelector(".apexcharts-tooltip-text-y-value");m&&(m.innerHTML=void 0!==h?h:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(o=l.config.tooltip.marker.fillColors[e]),g[0].style.backgroundColor=o),l.config.tooltip.marker.show||(g[0].style.display="none");var b=a[e].querySelector(".apexcharts-tooltip-text-goals-label"),v=a[e].querySelector(".apexcharts-tooltip-text-goals-value");if(d.length&&l.globals.seriesGoals[e]){var y=function(){var t="<div >",e="<div>";d.forEach((function(i,a){t+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(i.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(i.attrs.name,"</div>"),e+="<div>".concat(i.val,"</div>")})),b.innerHTML=t+"</div>",v.innerHTML=e+"</div>"};s?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(b.innerHTML="",v.innerHTML=""):y()}else b.innerHTML="",v.innerHTML="";null!==f&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==f?f:""),s&&g[0]&&(null==h||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(t){var e=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=e.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=e.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,n=this.ctx.series.filteredSeriesX(),r="",s="",o=null,l=null,c={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},h=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=n[e][i],0===n[e].length&&(r=n[this.tooltipUtil.getFirstActiveXArray(n)][i])):r=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;return r=a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?new W(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new E(this.ctx).formatDate,w:this.w}):a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,c):a.globals.xLabelFormatter(d,c),void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,c)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=h(a.globals.seriesZ[e][i],a)),s="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,c):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(s)?s.join(" "):s,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,n=t.y2,r=t.w,s=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),s.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:n,w:r})}}]),t}(),xt=function(){function t(e){o(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return c(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,n=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,s=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/s*e),null===n||a.globals.isBarHorizontal||(n.setAttribute("x",r),n.setAttribute("x1",r),n.setAttribute("x2",r),n.setAttribute("y2",a.globals.gridHeight),n.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&k.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&k.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a,n=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;t-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.globals.translateX,a=new k(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=a.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=n+"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"),10),n=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,s=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(s-=26),n-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=n+"px",i.yaxisTTEls[t].style.left=s+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,n=this.ttCtx,r=n.getElTooltip(),s=n.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,c=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-s.ttWidth-o-10),l>a.globals.gridWidth-s.ttWidth-10&&(l=a.globals.gridWidth-s.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var h=n.getElGrid(),d=h.getBoundingClientRect();c=n.e.clientY+a.globals.translateY-d.top-s.ttHeight/2}else a.globals.isBarHorizontal||(s.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-s.ttHeight+a.globals.translateY),c<0&&(c=0));isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var n=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r<n.length;r++)parseInt(n[r].getAttribute("rel"),10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,n[r]));else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}},{key:"moveDynamicPointOnHover",value:function(t,e){var i,a,n=this.w,r=this.ttCtx,s=n.globals.pointsArray,o=r.tooltipUtil.getHoverMarkerSize(e),l=n.config.series[e].type;if(!l||"column"!==l&&"candlestick"!==l&&"boxPlot"!==l){i=s[e][t][0],a=s[e][t][1]?s[e][t][1]:0;var c=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers circle"));c&&a<n.globals.gridHeight&&a>0&&(c.setAttribute("r",o),c.setAttribute("cx",i),c.setAttribute("cy",a)),this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,a,o)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,n=0,r=0,s=a.globals.pointsArray;e=new $(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var o=i.tooltipUtil.getHoverMarkerSize(e);s[e]&&(n=s[e][t][0],r=s[e][t][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c<a.globals.series.length;c++){var h=s[c];if(a.globals.comboCharts&&void 0===h&&l.splice(c,0,null),h&&h.length){var d=s[c][t][1],u=void 0;if(l[c].setAttribute("cx",n),"rangeArea"===a.config.chart.type&&!a.globals.comboCharts){var p=t+a.globals.series[c].length;u=s[c][p][1],d-=Math.abs(d-u)/2}null!==d&&!isNaN(d)&&d<a.globals.gridHeight+o&&d+o>0?(l[c]&&l[c].setAttribute("r",o),l[c]&&l[c].setAttribute("cy",d)):l[c]&&l[c].setAttribute("r",0)}}if(this.moveXCrosshairs(n),!i.fixedTooltip){var f=r||a.globals.gridHeight;this.moveTooltip(n,f,o)}}},{key:"moveStickyTooltipOverBars",value:function(t){var e=this.w,i=this.ttCtx,a=e.globals.columnSeries?e.globals.columnSeries.length:e.globals.series.length,n=a>=2&&a%2==0?Math.floor(a/2):Math.floor(a/2)+1;e.globals.isBarHorizontal&&(n=new $(this.ctx).getActiveConfigSeriesIndex("desc")+1);var r=e.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(n,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(t,"']")),s=r?parseFloat(r.getAttribute("cx")):0,o=r?parseFloat(r.getAttribute("cy")):0,l=r?parseFloat(r.getAttribute("barWidth")):0,c=r?parseFloat(r.getAttribute("barHeight")):0,h=i.getElGrid().getBoundingClientRect(),d=r.classList.contains("apexcharts-candlestick-area")||r.classList.contains("apexcharts-boxPlot-area");if(e.globals.isXNumeric?(r&&!d&&(s-=a%2!=0?l/2:0),r&&d&&e.globals.comboCharts&&(s-=l/2)):e.globals.isBarHorizontal||(s=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(s)&&(s=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),e.globals.isBarHorizontal?(o>e.globals.gridHeight/2&&(o-=i.tooltipRect.ttHeight),(o=o+e.config.grid.padding.top+c/3)+c>e.globals.gridHeight&&(o=e.globals.gridHeight-c)):e.config.tooltip.followCursor?o=i.e.clientY-h.top-i.tooltipRect.ttHeight/2:o+i.tooltipRect.ttHeight+15>e.globals.gridHeight&&(o=e.globals.gridHeight),o<-10&&(o=-10),e.globals.isBarHorizontal||this.moveXCrosshairs(s),!i.fixedTooltip){var u=o||e.globals.gridHeight;this.moveTooltip(s,u)}}}]),t}(),mt=function(){function t(e){o(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new xt(e)}return c(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new k(this.ctx),i=new X(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=x(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var n=0;n<a.length;n++){var r=a[n].querySelector(".apexcharts-series-markers-wrap");if(null!==r){var s=void 0,o="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));"line"!==t.config.chart.type&&"area"!==t.config.chart.type||t.globals.comboCharts||t.config.tooltip.intersect||(o+=" no-pointer-events");var l=i.getMarkerConfig({cssClass:o,seriesIndex:Number(r.getAttribute("data:realIndex"))});(s=e.drawMarker(0,0,l)).node.setAttribute("default-marker-size",0);var c=document.createElementNS(t.globals.SVGNS,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(s.node),r.appendChild(c)}}}},{key:"enlargeCurrentPoint",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w;"bubble"!==n.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),s=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,s=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===n.config.chart.type){var o=this.ttCtx.getElGrid(),l=o.getBoundingClientRect();r=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(r,s,n.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,n=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),s=e.config.markers.hover.size,o=0;o<r.length;o++){var l=r[o].getAttribute("rel"),c=r[o].getAttribute("index");if(void 0===s&&(s=e.globals.markers.size[c]+e.config.markers.hover.sizeOffset),n===parseInt(l,10)){i.newPointSize(n,r[o]);var h=r[o].getAttribute("cx"),d=r[o].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(h),a.fixedTooltip||i.tooltipPosition.moveTooltip(h,d,s)}else i.oldPointSize(r[o])}}},{key:"newPointSize",value:function(t,e){var i=this.w,a=i.config.markers.hover.size,n=0===t?e.parentNode.firstChild:e.parentNode.lastChild;if("0"!==n.getAttribute("default-marker-size")){var r=parseInt(n.getAttribute("index"),10);void 0===a&&(a=i.globals.markers.size[r]+i.config.markers.hover.sizeOffset),a<0&&(a=0),n.setAttribute("r",a)}}},{key:"oldPointSize",value:function(t){var e=parseFloat(t.getAttribute("default-marker-size"));t.setAttribute("r",e)}},{key:"resetPointsSize",value:function(){for(var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),e=0;e<t.length;e++){var i=parseFloat(t[e].getAttribute("default-marker-size"));v.isNumber(i)&&i>=0?t[e].setAttribute("r",i):t[e].setAttribute("r",0)}}}]),t}(),bt=function(){function t(e){o(this,t),this.w=e.w,this.ttCtx=e}return c(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,n=t.y,r=t.type,s=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),c=this.getAttr(e,"j"),h=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),p=this.getAttr(e,"height");if(s.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:c,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=c,a=h+s.tooltipRect.ttWidth/2+u,n=d+s.tooltipRect.ttHeight/2-p/2,s.tooltipPosition.moveXCrosshairs(h+u/2),a>o.globals.gridWidth/2&&(a=h-s.tooltipRect.ttWidth/2+u),s.w.config.tooltip.followCursor){var f=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-f.left-(a>o.globals.gridWidth/2?s.tooltipRect.ttWidth:0),n=o.globals.clientY-f.top-(n>o.globals.gridHeight/2?s.tooltipRect.ttHeight:0)}}return{x:a,y:n}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,n=t.opt,r=t.x,s=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(n.paths.getAttribute("cx"),10),h=parseInt(n.paths.getAttribute("cy"),10),d=parseFloat(n.paths.getAttribute("val"));if(i=parseInt(n.paths.getAttribute("rel"),10),e=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(n.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=c,s=h+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var p=l.getElGrid().getBoundingClientRect();s=l.e.clientY+o.globals.translateY-p.top}d<0&&(s=h),l.marker.enlargeCurrentPoint(i,n.paths,r,s)}return{x:r,y:s}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,n=t.opt,r=this.w,s=this.ttCtx,o=s.getElTooltip(),l=0,c=0,h=0,d=this.getBarTooltipXY({e:a,opt:n});e=d.i;var u=d.barHeight,p=d.j;r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=p,r.globals.isBarHorizontal&&s.tooltipUtil.hasBars()||!r.config.tooltip.shared?(c=d.x,h=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=c):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(h)?h=r.globals.svgHeight-s.tooltipRect.ttHeight:h<0&&(h=0);var f=parseInt(n.paths.parentNode.getAttribute("data:realIndex"),10),g=r.globals.isMultipleYAxis?r.config.yaxis[f]&&r.config.yaxis[f].reversed:r.config.yaxis[0].reversed;if(c+s.tooltipRect.ttWidth>r.globals.gridWidth&&!g?c-=s.tooltipRect.ttWidth:c<0&&(c=0),s.w.config.tooltip.followCursor){var x=s.getElGrid().getBoundingClientRect();h=s.e.clientY-x.top}null===s.tooltip&&(s.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?s.tooltipPosition.moveXCrosshairs(l+i/2):s.tooltipPosition.moveXCrosshairs(l)),!s.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&s.tooltipUtil.hasBars())&&(g&&(c-=s.tooltipRect.ttWidth)<0&&(c=0),!g||r.globals.isBarHorizontal&&s.tooltipUtil.hasBars()||(h=h+u-2*(r.globals.series[e][p]<0?u:0)),s.tooltipRect.ttHeight+h>r.globals.gridHeight?h=r.globals.gridHeight-s.tooltipRect.ttHeight+r.globals.translateY:(h=h+r.globals.translateY-s.tooltipRect.ttHeight/2)<0&&(h=0),o.style.left=c+r.globals.translateX+"px",o.style.top=h+"px")}},{key:"getBarTooltipXY",value:function(t){var e=t.e,i=t.opt,a=this.w,n=null,r=this.ttCtx,s=0,o=0,l=0,c=0,h=0,d=e.target.classList;if(d.contains("apexcharts-bar-area")||d.contains("apexcharts-candlestick-area")||d.contains("apexcharts-boxPlot-area")||d.contains("apexcharts-rangebar-area")){var u=e.target,p=u.getBoundingClientRect(),f=i.elGrid.getBoundingClientRect(),g=p.height;h=p.height;var x=p.width,m=parseInt(u.getAttribute("cx"),10),b=parseInt(u.getAttribute("cy"),10);c=parseFloat(u.getAttribute("barWidth"));var v="touchmove"===e.type?e.touches[0].clientX:e.clientX;n=parseInt(u.getAttribute("j"),10),s=parseInt(u.parentNode.getAttribute("rel"),10)-1;var y=u.getAttribute("data-range-y1"),w=u.getAttribute("data-range-y2");a.globals.comboCharts&&(s=parseInt(u.parentNode.getAttribute("data:realIndex"),10)),r.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:s,j:n,y1:y?parseInt(y,10):null,y2:w?parseInt(w,10):null,shared:!r.showOnIntersect&&a.config.tooltip.shared,e:e}),a.config.tooltip.followCursor?a.globals.isBarHorizontal?(o=v-f.left+15,l=b-r.dataPointsDividedHeight+g/2-r.tooltipRect.ttHeight/2):(o=a.globals.isXNumeric?m-x/2:m-r.dataPointsDividedWidth+x/2,l=e.clientY-f.top-r.tooltipRect.ttHeight/2-15):a.globals.isBarHorizontal?((o=m)<r.xyRatios.baseLineInvertedY&&(o=m-r.tooltipRect.ttWidth),l=b-r.dataPointsDividedHeight+g/2-r.tooltipRect.ttHeight/2):(o=a.globals.isXNumeric?m-x/2:m-r.dataPointsDividedWidth+x/2,l=b)}return{x:o,y:l,barHeight:h,barWidth:c,i:s,j:n}}}]),t}(),vt=function(){function t(e){o(this,t),this.w=e.w,this.ttCtx=e}return c(t,[{key:"drawXaxisTooltip",value:function(){var t=this.w,e=this.ttCtx,i="bottom"===t.config.xaxis.position;e.xaxisOffY=i?t.globals.gridHeight+1:-t.globals.xAxisHeight-t.config.xaxis.axisTicks.height+3;var a=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",n=t.globals.dom.elWrap;e.isXAxisTooltipEnabled&&null===t.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=document.createElement("div"),e.xaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),n.appendChild(e.xaxisTooltip),e.xaxisTooltipText=document.createElement("div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var t=this.w,e=this.ttCtx,i=function(i){var a=t.config.yaxis[i].opposite||t.config.yaxis[i].crosshairs.opposite;e.yaxisOffX=a?t.globals.gridWidth+1:1;var n="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,a?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left");t.globals.yAxisSameScaleIndices.map((function(e,a){e.map((function(e,a){a===i&&(n+=t.config.yaxis[a].show?" ":" apexcharts-yaxistooltip-hidden")}))}));var r=t.globals.dom.elWrap;null===t.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))&&(e.yaxisTooltip=document.createElement("div"),e.yaxisTooltip.setAttribute("class",n+" apexcharts-theme-"+t.config.tooltip.theme),r.appendChild(e.yaxisTooltip),0===i&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[i]=document.createElement("div"),e.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[i]))},a=0;a<t.config.yaxis.length;a++)i(a)}},{key:"setXCrosshairWidth",value:function(){var t=this.w,e=this.ttCtx,i=e.getElXCrosshairs();if(e.xcrosshairsWidth=parseInt(t.config.xaxis.crosshairs.width,10),t.globals.comboCharts){var a=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==a&&"barWidth"===t.config.xaxis.crosshairs.width){var n=parseFloat(a.getAttribute("barWidth"));e.xcrosshairsWidth=n}else if("tickWidth"===t.config.xaxis.crosshairs.width){var r=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/r}}else if("tickWidth"===t.config.xaxis.crosshairs.width){var s=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/s}else if("barWidth"===t.config.xaxis.crosshairs.width){var o=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==o){var l=parseFloat(o.getAttribute("barWidth"));e.xcrosshairsWidth=l}else e.xcrosshairsWidth=1}t.globals.isBarHorizontal&&(e.xcrosshairsWidth=0),null!==i&&e.xcrosshairsWidth>0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,n=this.w,r=n.globals.yLabelFormatters[t];if(a.yaxisTooltips[t]){var s=a.getElGrid().getBoundingClientRect(),o=(e-s.top)*i.yRatio[t],l=n.globals.maxYArr[t]-n.globals.minYArr[t],c=n.globals.minYArr[t]+(l-o);a.tooltipPosition.moveYCrosshairs(e-s.top),a.yaxisTooltipText[t].innerHTML=r(c),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),yt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.tConfig=i.config.tooltip,this.tooltipUtil=new ft(this),this.tooltipLabels=new gt(this),this.tooltipPosition=new xt(this),this.marker=new mt(this),this.intersect=new bt(this),this.axesTooltip=new vt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!i.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return c(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new G(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var n=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(n=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(n),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],n=this.getElTooltip(),r=function(r){var s=document.createElement("div");s.classList.add("apexcharts-tooltip-series-group"),s.style.order=i.config.tooltip.inverseOrder?t-r:r+1,e.tConfig.shared&&e.tConfig.enabledOnSeries&&Array.isArray(e.tConfig.enabledOnSeries)&&e.tConfig.enabledOnSeries.indexOf(r)<0&&s.classList.add("apexcharts-tooltip-series-group-hidden");var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],s.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),s.appendChild(l),n.appendChild(s),a.push(s)},s=0;s<t;s++)r(s);return a}},{key:"addSVGEvents",value:function(){var t=this.w,e=t.config.chart.type,i=this.getElTooltip(),a=!("bar"!==e&&"candlestick"!==e&&"boxPlot"!==e&&"rangeBar"!==e),n="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,r=t.globals.dom.Paper.node,s=this.getElGrid();s&&(this.seriesBound=s.getBoundingClientRect());var o,l=[],c=[],h={hoverArea:r,elGrid:s,tooltipEl:i,tooltipY:l,tooltipX:c,ttItems:this.ttItems};if(t.globals.axisCharts&&(n?o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):a?o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"!==e&&"treemap"!==e||(o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),o&&o.length))for(var d=0;d<o.length;d++)l.push(o[d].getAttribute("cy")),c.push(o[d].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||a&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],h);else if(a&&!t.globals.comboCharts||n&&this.showOnIntersect)this.addDatapointEventsListeners(h);else if(!t.globals.axisCharts||"heatmap"===e||"treemap"===e){var u=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(u,h)}if(this.showOnIntersect){var p=t.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");p.length>0&&this.addPathsEventListeners(p,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,n=i.height+10,r=this.tConfig.fixed.offsetX,s=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(s=s+t.globals.svgHeight-n-10),e.style.left=r+"px",e.style.top=s+"px",{x:r,y:s,ttWidth:a,ttHeight:n}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var n={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})}))},n=0;n<t.length;n++)a(n)}},{key:"onSeriesHover",value:function(t,e){var i=this,a=Date.now()-this.lastHoverTime;a>=100?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),100-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],n=this.w;n.config.chart.group&&(a=this.ctx.getGroupedCharts()),n.globals.axisCharts&&(n.globals.minX===-1/0&&n.globals.maxX===1/0||0===n.globals.dataPoints)||(a.length?a.forEach((function(a){var n=i.getElTooltip(a),r={paths:t.paths,tooltipEl:n,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,n=t.e,r=e.w,s=this.getElTooltip();s&&(i.tooltipRect={x:0,y:0,ttWidth:s.getBoundingClientRect().width,ttHeight:s.getBoundingClientRect().height},i.e=n,!i.tooltipUtil.hasBars()||r.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new $(e).toggleSeriesOnHover(n,n.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:n,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:n,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,n=t.opt,r=this.w,s=n.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,l<s.top||l>s.top+s.height)this.handleMouseOut(n);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var c=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(n)}var h=this.getElTooltip(),d=this.getElXCrosshairs(),u=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),u&&!this.showOnIntersect)this.handleStickyTooltip(a,o,l,n);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:n,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,h.style.left=e+"px",h.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:n}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:n,x:e,y:i});if(this.yaxisTooltips.length)for(var g=0;g<r.config.yaxis.length;g++)this.axesTooltip.drawYaxisTooltipText(g,l,this.xyRatios);n.tooltipEl.classList.add("apexcharts-active")}else"mouseout"!==a.type&&"touchend"!==a.type||this.handleMouseOut(n)}}},{key:"nonAxisChartsTooltips",value:function(t){var e=t.e,i=t.opt,a=t.tooltipRect,n=this.w,r=i.paths.getAttribute("rel"),s=this.getElTooltip(),o=n.globals.dom.elWrap.getBoundingClientRect();if("mousemove"===e.type||"touchmove"===e.type){s.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(r,10)-1,shared:!1});var l=n.globals.clientX-o.left-a.ttWidth/2,c=n.globals.clientY-o.top-a.ttHeight-10;if(s.style.left=l+"px",s.style.top=c+"px",n.config.legend.tooltipHoverFormatter){var h=r-1,d=(0,n.config.legend.tooltipHoverFormatter)(this.legendLabels[h].getAttribute("data:default-text"),{seriesIndex:h,dataPointIndex:h,w:n});this.legendLabels[h].innerHTML=d}}else"mouseout"!==e.type&&"touchend"!==e.type||(s.classList.remove("apexcharts-active"),n.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)})))}},{key:"handleStickyTooltip",value:function(t,e,i,a){var n=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:a.hoverArea,elGrid:a.elGrid,clientX:e,clientY:i}),s=r.j,o=r.capturedSeries,l=a.elGrid.getBoundingClientRect();r.hoverX<0||r.hoverX>l.width?this.handleMouseOut(a):null!==o?this.handleStickyCapturedSeries(t,o,a,s):(this.tooltipUtil.isXoverlap(s)||n.globals.isBarHorizontal)&&this.create(t,this,0,s,a.ttItems)}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var n=this.w;this.tConfig.shared||null!==n.globals.series[e][a]?void 0!==n.globals.series[e][a]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1):this.tooltipUtil.isXoverlap(a)&&this.create(t,this,0,a,i.ttItems):this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new k(this.ctx),i=t.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a<i.length;a++)e.pathMouseLeave(i[a])}},{key:"handleMouseOut",value:function(t){var e=this.w,i=this.getElXCrosshairs();if(t.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),"bubble"!==e.config.chart.type&&this.marker.resetPointsSize(),null!==i&&i.classList.remove("apexcharts-active"),null!==this.ycrosshairs&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var a=0;a<this.yaxisTTEls.length;a++)this.yaxisTTEls[a].classList.remove("apexcharts-active")}e.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}))}},{key:"markerClick",value:function(t,e,i){var a=this.w;"function"==typeof a.config.chart.events.markerClick&&a.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:a}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:a}])}},{key:"create",value:function(t,e,i,a,n){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=this.w,o=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===r&&(r=this.tConfig.shared);var l=this.tooltipUtil.hasMarkers(),c=this.tooltipUtil.getElBars();if(s.config.legend.tooltipHoverFormatter){var h=s.config.legend.tooltipHoverFormatter,d=Array.from(this.legendLabels);d.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var u=0;u<d.length;u++){var p=d[u],f=parseInt(p.getAttribute("i"),10),g=decodeURIComponent(p.getAttribute("data:default-text")),x=h(g,{seriesIndex:r?f:i,dataPointIndex:a,w:s});if(r)p.innerHTML=s.globals.collapsedSeriesIndices.indexOf(f)<0?x:g;else if(p.innerHTML=f===i?x:g,i===f)break}}if(r){if(o.tooltipLabels.drawSeriesTexts({ttItems:n,i:i,j:a,shared:!this.showOnIntersect&&this.tConfig.shared}),l&&(s.globals.markers.largestSize>0?o.marker.enlargePoints(a):o.tooltipPosition.moveDynamicPointsOnHover(a)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(c),this.barSeriesHeight>0)){var m=new k(this.ctx),b=s.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a);for(var v=0;v<b.length;v++)m.pathMouseEnter(b[v])}}else o.tooltipLabels.drawSeriesTexts({shared:!1,ttItems:n,i:i,j:a}),this.tooltipUtil.hasBars()&&o.tooltipPosition.moveStickyTooltipOverBars(a),l&&o.tooltipPosition.moveMarkers(i,a)}}]),t}(),wt=function(){function t(e){o(this,t),this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}return c(t,[{key:"handleBarDataLabels",value:function(t){var e=t.x,i=t.y,a=t.y1,n=t.y2,r=t.i,s=t.j,o=t.realIndex,l=t.series,c=t.barHeight,h=t.barWidth,d=t.barYPosition,u=t.visibleSeries,p=t.renderedPath,f=this.w,g=new k(this.barCtx.ctx),x=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[o]:this.barCtx.strokeWidth,m=e+parseFloat(h*u),b=i+parseFloat(c*u);f.globals.isXNumeric&&!f.globals.isBarHorizontal&&(m=e+parseFloat(h*(u+1)),b=i+parseFloat(c*(u+1))-x);var v,y,w=null,S=e,A=i,C=f.config.dataLabels,P=this.barCtx.barOptions.dataLabels,L=this.barCtx.barOptions.dataLabels.total;void 0!==d&&this.barCtx.isRangeBar&&(b=d,A=d);var T=C.offsetX,D=C.offsetY,M={width:0,height:0};if(f.config.dataLabels.enabled){var E=this.barCtx.series[r][s];M=g.getTextRects(f.globals.yLabelFormatters[0](E),parseFloat(C.style.fontSize))}var I={x:e,y:i,i:r,j:s,realIndex:o,renderedPath:p,bcx:m,bcy:b,barHeight:c,barWidth:h,textRects:M,strokeWidth:x,dataLabelsX:S,dataLabelsY:A,dataLabelsConfig:C,barDataLabelsConfig:P,barTotalDataLabelsConfig:L,offX:T,offY:D};return y=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(I):this.calculateColumnsDataLabelsPosition(I),p.attr({cy:y.bcy,cx:y.bcx,j:s,val:l[r][s],barHeight:c,barWidth:h}),v=this.drawCalculatedDataLabels({x:y.dataLabelsX,y:y.dataLabelsY,val:this.barCtx.isRangeBar?[a,n]:l[r][s],i:o,j:s,barWidth:h,barHeight:c,textRects:M,dataLabelsConfig:C}),f.config.chart.stacked&&L.enabled&&(w=this.drawTotalDataLabels({x:y.totalDataLabelsX,y:y.totalDataLabelsY,realIndex:o,textAnchor:y.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:o,j:s}),dataLabelsConfig:C,barTotalDataLabelsConfig:L})),{dataLabels:v,totalDataLabels:w}}},{key:"getStackedTotalDataLabel",value:function(t){var e=t.realIndex,i=t.j,a=this.w,n=this.barCtx.stackedSeriesTotals[i];return this.totalFormatter&&(n=this.totalFormatter(n,r(r({},a),{},{seriesIndex:e,dataPointIndex:i,w:a}))),n}},{key:"calculateColumnsDataLabelsPosition",value:function(t){var e,i,a,n=this.w,r=t.i,s=t.j,o=t.realIndex,l=t.y,c=t.bcx,h=t.barWidth,d=t.barHeight,u=t.textRects,p=t.dataLabelsY,f=t.dataLabelsConfig,g=t.barDataLabelsConfig,x=t.barTotalDataLabelsConfig,m=t.strokeWidth,b=t.offX,v=t.offY;d=Math.abs(d);var y="vertical"===n.config.plotOptions.bar.dataLabels.orientation;c-=m/2;var w=n.globals.gridWidth/n.globals.dataPoints;e=n.globals.isXNumeric?c-h/2+b:c-w+h/2+b,y&&(e=e+u.height/2-m/2-2);var S=this.barCtx.series[r][s]<0,A=l;switch(this.barCtx.isReversed&&(A=l-d+(S?2*d:0),l-=d),g.position){case"center":p=y?S?A+d/2+v:A+d/2-v:S?A-d/2+u.height/2+v:A+d/2+u.height/2-v;break;case"bottom":p=y?S?A+d+v:A+d-v:S?A-d+u.height+m+v:A+d-u.height/2+m-v;break;case"top":p=y?S?A+v:A-v:S?A-u.height/2-v:A+u.height+v}if(this.barCtx.lastActiveBarSerieIndex===o&&x.enabled){var C=new k(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:s}),f.fontSize);i=S?A-C.height/2-v-x.offsetY+18:A+C.height+v+x.offsetY-18,a=e+x.offsetX}return n.config.chart.stacked||(p<0?p=0+m:p+u.height/3>n.globals.gridHeight&&(p=n.globals.gridHeight-m)),{bcx:c,bcy:l,dataLabelsX:e,dataLabelsY:p,totalDataLabelsX:a,totalDataLabelsY:i,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,n=t.j,r=t.realIndex,s=t.bcy,o=t.barHeight,l=t.barWidth,c=t.textRects,h=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,p=t.barDataLabelsConfig,f=t.barTotalDataLabelsConfig,g=t.offX,x=t.offY,m=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var b,v,y=s-(this.barCtx.isRangeBar?0:m)+o/2+c.height/2+x-3,w="start",S=this.barCtx.series[a][n]<0,A=i;switch(this.barCtx.isReversed&&(A=i+l-(S?2*l:0),i=e.globals.gridWidth-l),p.position){case"center":h=S?A+l/2-g:Math.max(c.width/2,A-l/2)+g;break;case"bottom":h=S?A+l-d-Math.round(c.width/2)-g:A-l+d+Math.round(c.width/2)+g;break;case"top":h=S?A-d+Math.round(c.width/2)-g:A-d-Math.round(c.width/2)+g}if(this.barCtx.lastActiveBarSerieIndex===r&&f.enabled){var C=new k(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:n}),u.fontSize);S?(b=A-d+Math.round(C.width/2)-g-f.offsetX-15,w="end"):b=A-d-Math.round(C.width/2)+g+f.offsetX+15,v=y+f.offsetY}return e.config.chart.stacked||(h<0?h=h+c.width+d:h+c.width/2>e.globals.gridWidth&&(h=e.globals.gridWidth-c.width-d)),{bcx:i,bcy:s,dataLabelsX:h,dataLabelsY:y,totalDataLabelsX:b,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,n=t.i,s=t.j,o=t.textRects,l=t.barHeight,c=t.barWidth,h=t.dataLabelsConfig,d=this.w,u="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(u="rotate(-90, ".concat(e,", ").concat(i,")"));var p=new H(this.barCtx.ctx),f=new k(this.barCtx.ctx),g=h.formatter,x=null,m=d.globals.collapsedSeriesIndices.indexOf(n)>-1;if(h.enabled&&!m){x=f.group({class:"apexcharts-data-labels",transform:u});var b="";void 0!==a&&(b=g(a,r(r({},d),{},{seriesIndex:n,dataPointIndex:s,w:d})));var v=d.globals.series[n][s]<0,y=d.config.plotOptions.bar.dataLabels.position;"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<f.getTextRects(b,parseFloat(h.style.fontSize)).width&&(b=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?o.width/1.6>Math.abs(c)&&(b=""):o.height/1.6>Math.abs(l)&&(b=""));var w=r({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),p.plotDataLabelsText({x:e,y:i,text:b,i:n,j:s,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e,i=t.x,a=t.y,n=t.val,r=t.realIndex,s=t.textAnchor,o=t.barTotalDataLabelsConfig,l=new k(this.barCtx.ctx);return o.enabled&&void 0!==i&&void 0!==a&&this.barCtx.lastActiveBarSerieIndex===r&&(e=l.drawText({x:i,y:a,foreColor:o.style.color,text:n,textAnchor:s,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight})),e}}]),t}(),kt=function(){function t(e){o(this,t),this.w=e.w,this.barCtx=e}return c(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i<t.length;i++)if(t[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;a<t[i].length;a++)e.globals.seriesX[i][a]>e.globals.minX&&e.globals.seriesX[i][a]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],this.barCtx.radiusOnSeriesNumber=t.length-1,e.globals.comboCharts||this.checkZeroSeries({series:t})}},{key:"initialPositions",value:function(){var t,e,i,a,n,r,s,o,l=this.w,c=l.globals.dataPoints;this.barCtx.isRangeBar&&(c=l.globals.labels.length);var h=this.barCtx.seriesLen;if(l.config.plotOptions.bar.rangeBarGroupRows&&(h=1),this.barCtx.isHorizontal)n=(i=l.globals.gridHeight/c)/h,l.globals.isXNumeric&&(n=(i=l.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),n=n*parseInt(this.barCtx.barOptions.barHeight,10)/100,o=this.barCtx.baseLineInvertedY+l.globals.padHorizontal+(this.barCtx.isReversed?l.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),e=(i-n*this.barCtx.seriesLen)/2;else{if(a=l.globals.gridWidth/this.barCtx.visibleItems,l.config.xaxis.convertedCatToNumeric&&(a=l.globals.gridWidth/l.globals.dataPoints),r=a/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100,l.globals.isXNumeric){var d=this.barCtx.xRatio;l.config.xaxis.convertedCatToNumeric&&(d=this.barCtx.initialXRatio),l.globals.minXDiff&&.5!==l.globals.minXDiff&&l.globals.minXDiff/d>0&&(a=l.globals.minXDiff/d),(r=a/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}s=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return{x:t,y:e,yDivision:i,xDivision:a,barHeight:n,barWidth:r,zeroH:s,zeroW:o}}},{key:"getPathFillColor",value:function(t,e,i,a){var n,r,s,o,l=this.w,c=new Y(this.barCtx.ctx),h=null,d=this.barCtx.barOptions.distributed?i:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(h=a.color)})),l.config.series[e].data[i]&&l.config.series[e].data[i].fillColor&&(h=l.config.series[e].data[i].fillColor),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:h,value:t[e][i],fillConfig:null===(n=l.config.series[e].data[i])||void 0===n?void 0:n.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(s=r.fill)&&void 0!==s&&s.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,n=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,n.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"shouldApplyRadius",value:function(t){var e=this.w,i=!1;return e.config.plotOptions.bar.borderRadius>0&&(e.config.chart.stacked&&"last"===e.config.plotOptions.bar.borderRadiusWhenStacked?this.barCtx.lastActiveBarSerieIndex===t&&(i=!0):i=!0),i}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,n=t.x2,r=t.y1,s=t.y2,o=t.elSeries,l=this.w,c=new k(this.barCtx.ctx),h=new $(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=c.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==n?n:l.globals.gridWidth,void 0!==s?s:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,n=t.y1,r=t.y2,s=t.strokeWidth,o=t.realIndex,l=t.i,c=t.j,h=t.w,d=new k(this.barCtx.ctx);(s=Array.isArray(s)?s[o]:s)||(s=0);var u=i,p=a;null!==(e=h.config.series[o].data[c])&&void 0!==e&&e.columnWidthOffset&&(p=a-h.config.series[o].data[c].columnWidthOffset/2,u=i+h.config.series[o].data[c].columnWidthOffset);var f=p,g=p+u;n+=.001,r+=.001;var x=d.move(f,n),m=d.move(f,n),b=d.line(g-s,n);return h.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(o,c,!1)),x=x+d.line(f,r)+d.line(g-s,r)+d.line(g-s,n)+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),m=m+d.line(f,n)+b+b+b+b+b+d.line(f,n)+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(o)&&(x=d.roundPathCorners(x,h.config.plotOptions.bar.borderRadius)),h.config.chart.stacked&&(this.barCtx.yArrj.push(r),this.barCtx.yArrjF.push(Math.abs(n-r)),this.barCtx.yArrjVal.push(this.barCtx.series[l][c])),{pathTo:x,pathFrom:m}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,n=t.x1,r=t.x2,s=t.strokeWidth,o=t.realIndex,l=t.i,c=t.j,h=t.w,d=new k(this.barCtx.ctx);(s=Array.isArray(s)?s[o]:s)||(s=0);var u=i,p=a;null!==(e=h.config.series[o].data[c])&&void 0!==e&&e.barHeightOffset&&(u=i-h.config.series[o].data[c].barHeightOffset/2,p=a+h.config.series[o].data[c].barHeightOffset);var f=u,g=u+p;n+=.001,r+=.001;var x=d.move(n,f),m=d.move(n,f);h.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(o,c,!1));var b=d.line(n,g-s);return x=x+d.line(r,f)+d.line(r,g-s)+b+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),m=m+d.line(n,f)+b+b+b+b+b+d.line(n,f)+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(o)&&(x=d.roundPathCorners(x,h.config.plotOptions.bar.borderRadius)),h.config.chart.stacked&&(this.barCtx.xArrj.push(r),this.barCtx.xArrjF.push(Math.abs(n-r)),this.barCtx.xArrjVal.push(this.barCtx.series[l][c])),{pathTo:x,pathFrom:m}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a<e.length;a++){for(var n=0,r=0;r<e[i.globals.maxValsInArrayIndex].length;r++)n+=e[a][r];0===n&&this.barCtx.zeroSerieses.push(a)}for(var s=e.length-1;s>=0;s--)this.barCtx.zeroSerieses.indexOf(s)>-1&&s===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var o=e.length-1;o>=0;o--)i.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=i?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}},{key:"getYForValue",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=i?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,n){var r=this,s=this.w,o=[];return s.globals.seriesGoals[a]&&s.globals.seriesGoals[a][n]&&Array.isArray(s.globals.seriesGoals[a][n])&&s.globals.seriesGoals[a][n].forEach((function(a){var n;o.push((h(n={},t,"x"===t?r.getXForValue(a.value,e,!1):r.getYForValue(a.value,i,!1)),h(n,"attrs",a),n))})),o}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,n=t.goalY,r=t.barWidth,s=t.barHeight,o=new k(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"}),c=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:s/2,a=i+e+s/2;c=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)})):Array.isArray(n)&&n.forEach((function(t){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;c=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)})),l}}]),t}(),St=function(){function t(e,i){o(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.barOptions=a.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=a.config.stroke.width,this.isNullValue=!1,this.isRangeBar=a.globals.seriesRange.length&&this.isHorizontal,this.xyRatios=i,null!==this.xyRatios&&(this.xRatio=i.xRatio,this.initialXRatio=i.initialXRatio,this.yRatio=i.yRatio,this.invertedXRatio=i.invertedXRatio,this.invertedYRatio=i.invertedYRatio,this.baseLineY=i.baseLineY,this.baseLineInvertedY=i.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0;var n=new $(this.ctx);this.lastActiveBarSerieIndex=n.getActiveConfigSeriesIndex("desc",["bar","column"]);var r=n.getBarSeriesIndices(),s=new S(this.ctx);this.stackedSeriesTotals=s.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===r.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new kt(this)}return c(t,[{key:"draw",value:function(t,e){var i=this.w,a=new k(this.ctx),n=new S(this.ctx,i);t=n.getLogSeries(t),this.series=t,this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var s=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var o=0,l=0;o<t.length;o++,l++){var c,h,d,u,p=void 0,f=void 0,g=[],x=[],m=i.globals.comboCharts?e[o]:o,b=a.group({class:"apexcharts-series",rel:o+1,seriesName:v.escapeString(i.globals.seriesNames[m]),"data:realIndex":m});this.ctx.series.addCollapsedClassToSeries(b,m),t[o].length>0&&(this.visibleI=this.visibleI+1);var y=0,w=0;this.yRatio.length>1&&(this.yaxisIndex=m),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var A=this.barHelpers.initialPositions();f=A.y,y=A.barHeight,h=A.yDivision,u=A.zeroW,p=A.x,w=A.barWidth,c=A.xDivision,d=A.zeroH,this.horizontal||x.push(p+w/2);for(var C=a.group({class:"apexcharts-datalabels","data:realIndex":m}),P=a.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),L=0;L<i.globals.dataPoints;L++){var T=this.barHelpers.getStrokeWidth(o,L,m),D=null,M={indexes:{i:o,j:L,realIndex:m,bc:l},x:p,y:f,strokeWidth:T,elSeries:b};this.isHorizontal?(D=this.drawBarPaths(r(r({},M),{},{barHeight:y,zeroW:u,yDivision:h})),w=this.series[o][L]/this.invertedYRatio):(D=this.drawColumnPaths(r(r({},M),{},{xDivision:c,barWidth:w,zeroH:d})),y=this.series[o][L]/this.yRatio[this.yaxisIndex]);var E=this.barHelpers.drawGoalLine({barXPosition:D.barXPosition,barYPosition:D.barYPosition,goalX:D.goalX,goalY:D.goalY,barHeight:y,barWidth:w});E&&P.add(E),f=D.y,p=D.x,L>0&&x.push(p+w/2),g.push(f);var I=this.barHelpers.getPathFillColor(t,o,L,m);this.renderSeries({realIndex:m,pathFill:I,j:L,i:o,pathFrom:D.pathFrom,pathTo:D.pathTo,strokeWidth:T,elSeries:b,x:p,y:f,series:t,barHeight:y,barWidth:w,elDataLabelsWrap:C,elGoalsMarkers:P,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[m]=x,i.globals.seriesYvalues[m]=g,s.add(b)}return s}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,n=t.j,r=t.i,s=t.pathFrom,o=t.pathTo,l=t.strokeWidth,c=t.elSeries,h=t.x,d=t.y,u=t.y1,p=t.y2,f=t.series,g=t.barHeight,x=t.barWidth,m=t.barYPosition,b=t.elDataLabelsWrap,v=t.elGoalsMarkers,y=t.visibleSeries,S=t.type,A=this.w,C=new k(this.ctx);a||(a=this.barOptions.distributed?A.globals.stroke.colors[n]:A.globals.stroke.colors[e]),A.config.series[r].data[n]&&A.config.series[r].data[n].strokeColor&&(a=A.config.series[r].data[n].strokeColor),this.isNullValue&&(i="none");var P=n/A.config.chart.animations.animateGradually.delay*(A.config.chart.animations.speed/A.globals.dataPoints)/2.4,L=C.renderPaths({i:r,j:n,realIndex:e,pathFrom:s,pathTo:o,stroke:a,strokeWidth:l,strokeLineCap:A.config.stroke.lineCap,fill:i,animationDelay:P,initialSpeed:A.config.chart.animations.speed,dataChangeSpeed:A.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(S,"-area")});L.attr("clip-path","url(#gridRectMask".concat(A.globals.cuid,")"));var T=A.config.forecastDataPoints;T.count>0&&n>=A.globals.dataPoints-T.count&&(L.node.setAttribute("stroke-dasharray",T.dashArray),L.node.setAttribute("stroke-width",T.strokeWidth),L.node.setAttribute("fill-opacity",T.fillOpacity)),void 0!==u&&void 0!==p&&(L.attr("data-range-y1",u),L.attr("data-range-y2",p)),new w(this.ctx).setSelectionFilter(L,e,n),c.add(L);var D=new wt(this).handleBarDataLabels({x:h,y:d,y1:u,y2:p,i:r,j:n,series:f,realIndex:e,barHeight:g,barWidth:x,barYPosition:m,renderedPath:L,visibleSeries:y});return null!==D.dataLabels&&b.add(D.dataLabels),D.totalDataLabels&&b.add(D.totalDataLabels),c.add(b),v&&c.add(v),c}},{key:"drawBarPaths",value:function(t){var e=t.indexes,i=t.barHeight,a=t.strokeWidth,n=t.zeroW,r=t.x,s=t.y,o=t.yDivision,l=t.elSeries,c=this.w,h=e.i,d=e.j;c.globals.isXNumeric&&(s=(c.globals.seriesX[h][d]-c.globals.minX)/this.invertedXRatio-i);var u=s+i*this.visibleI;r=this.barHelpers.getXForValue(this.series[h][d],n);var p=this.barHelpers.getBarpaths({barYPosition:u,barHeight:i,x1:n,x2:r,strokeWidth:a,series:this.series,realIndex:e.realIndex,i:h,j:d,w:c});return c.globals.isXNumeric||(s+=o),this.barHelpers.barBackground({j:d,i:h,y1:u-i*this.visibleI,y2:i*this.seriesLen,elSeries:l}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:r,y:s,goalX:this.barHelpers.getGoalValues("x",n,null,h,d),barYPosition:u}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,n=t.xDivision,r=t.barWidth,s=t.zeroH,o=t.strokeWidth,l=t.elSeries,c=this.w,h=e.realIndex,d=e.i,u=e.j,p=e.bc;if(c.globals.isXNumeric){var f=h;c.globals.seriesX[h].length||(f=c.globals.maxValsInArrayIndex),i=(c.globals.seriesX[f][u]-c.globals.minX)/this.xRatio-r*this.seriesLen/2}var g=i+r*this.visibleI;a=this.barHelpers.getYForValue(this.series[d][u],s);var x=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:r,y1:s,y2:a,strokeWidth:o,series:this.series,realIndex:e.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(i+=n),this.barHelpers.barBackground({bc:p,j:u,i:d,x1:g-o/2-r*this.visibleI,x2:r*this.seriesLen+o/2,elSeries:l}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:i,y:a,goalY:this.barHelpers.getGoalValues("y",null,s,d,u),barXPosition:g}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,n=0;n<a.globals.previousPaths.length;n++){var r=a.globals.previousPaths[n];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[n].paths[e]&&(i=a.globals.previousPaths[n].paths[e].d)}return i}}]),t}(),At=function(t){d(i,St);var e=g(i);function i(){return o(this,i),e.apply(this,arguments)}return c(i,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new k(this.ctx),this.bar=new St(this.ctx,this.xyRatios);var n=new S(this.ctx,a);t=n.getLogSeries(t),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.seriesPercent.slice()),this.series=t,this.totalItems=0,this.prevY=[],this.prevX=[],this.prevYF=[],this.prevXF=[],this.prevYVal=[],this.prevXVal=[],this.xArrj=[],this.xArrjF=[],this.xArrjVal=[],this.yArrj=[],this.yArrjF=[],this.yArrjVal=[];for(var s=0;s<t.length;s++)t[s].length>0&&(this.totalItems+=t[s].length);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),l=0,c=0,h=function(n,s){var h=void 0,d=void 0,u=void 0,p=void 0,f=[],g=[],x=a.globals.comboCharts?e[n]:n;i.yRatio.length>1&&(i.yaxisIndex=x),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var m=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[x]),rel:n+1,"data:realIndex":x});i.ctx.series.addCollapsedClassToSeries(m,x);var b=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":x}),y=i.graphics.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),w=0,k=0,S=i.initialPositions(l,c,h,d,u,p);c=S.y,w=S.barHeight,d=S.yDivision,p=S.zeroW,l=S.x,k=S.barWidth,h=S.xDivision,u=S.zeroH,i.yArrj=[],i.yArrjF=[],i.yArrjVal=[],i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],1===i.prevY.length&&i.prevY[0].every((function(t){return isNaN(t)}))&&(i.prevY[0]=i.prevY[0].map((function(t){return u})),i.prevYF[0]=i.prevYF[0].map((function(t){return 0})));for(var A=0;A<a.globals.dataPoints;A++){var C=i.barHelpers.getStrokeWidth(n,A,x),P={indexes:{i:n,j:A,realIndex:x,bc:s},strokeWidth:C,x:l,y:c,elSeries:m},L=null;i.isHorizontal?(L=i.drawStackedBarPaths(r(r({},P),{},{zeroW:p,barHeight:w,yDivision:d})),k=i.series[n][A]/i.invertedYRatio):(L=i.drawStackedColumnPaths(r(r({},P),{},{xDivision:h,barWidth:k,zeroH:u})),w=i.series[n][A]/i.yRatio[i.yaxisIndex]);var T=i.barHelpers.drawGoalLine({barXPosition:L.barXPosition,barYPosition:L.barYPosition,goalX:L.goalX,goalY:L.goalY,barHeight:w,barWidth:k});T&&y.add(T),c=L.y,l=L.x,f.push(l),g.push(c);var D=i.barHelpers.getPathFillColor(t,n,A,x);m=i.renderSeries({realIndex:x,pathFill:D,j:A,i:n,pathFrom:L.pathFrom,pathTo:L.pathTo,strokeWidth:C,elSeries:m,x:l,y:c,series:t,barHeight:w,barWidth:k,elDataLabelsWrap:b,elGoalsMarkers:y,type:"bar",visibleSeries:0})}a.globals.seriesXvalues[x]=f,a.globals.seriesYvalues[x]=g,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),o.add(m)},d=0,u=0;d<t.length;d++,u++)h(d,u);return o}},{key:"initialPositions",value:function(t,e,i,a,n,r){var s,o,l=this.w;return this.isHorizontal?(s=(s=a=l.globals.gridHeight/l.globals.dataPoints)*parseInt(l.config.plotOptions.bar.barHeight,10)/100,r=this.baseLineInvertedY+l.globals.padHorizontal+(this.isReversed?l.globals.gridWidth:0)-(this.isReversed?2*this.baseLineInvertedY:0),e=(a-s)/2):(o=i=l.globals.gridWidth/l.globals.dataPoints,o=l.globals.isXNumeric&&l.globals.dataPoints>1?(i=l.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:o*parseInt(l.config.plotOptions.bar.columnWidth,10)/100,n=l.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?l.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),t=l.globals.padHorizontal+(i-o)/2),{x:t,y:e,yDivision:a,xDivision:i,barHeight:s,barWidth:o,zeroH:n,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,n=t.strokeWidth,r=t.zeroW,s=t.x,o=t.y,l=t.yDivision,c=t.elSeries,h=this.w,d=o,u=i.i,p=i.j,f=0,g=0;g<this.prevXF.length;g++)f+=this.prevXF[g][p];if(u>0){var x=r;this.prevXVal[u-1][p]<0?x=this.series[u][p]>=0?this.prevX[u-1][p]+f-2*(this.isReversed?f:0):this.prevX[u-1][p]:this.prevXVal[u-1][p]>=0&&(x=this.series[u][p]>=0?this.prevX[u-1][p]:this.prevX[u-1][p]-f+2*(this.isReversed?f:0)),e=x}else e=r;s=null===this.series[u][p]?e:e+this.series[u][p]/this.invertedYRatio-2*(this.isReversed?this.series[u][p]/this.invertedYRatio:0);var m=this.barHelpers.getBarpaths({barYPosition:d,barHeight:a,x1:e,x2:s,strokeWidth:n,series:this.series,realIndex:i.realIndex,i:u,j:p,w:h});return this.barHelpers.barBackground({j:p,i:u,y1:d,y2:a,elSeries:c}),o+=l,{pathTo:m.pathTo,pathFrom:m.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,u,p),barYPosition:d,x:s,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,n=t.xDivision,r=t.barWidth,s=t.zeroH;t.strokeWidth;var o=t.elSeries,l=this.w,c=e.i,h=e.j,d=e.bc;if(l.globals.isXNumeric){var u=l.globals.seriesX[c][h];u||(u=0),i=(u-l.globals.minX)/this.xRatio-r/2}for(var p,f=i,g=0,x=0;x<this.prevYF.length;x++)g+=isNaN(this.prevYF[x][h])?0:this.prevYF[x][h];if(c>0&&!l.globals.isXNumeric||c>0&&l.globals.isXNumeric&&l.globals.seriesX[c-1][h]===l.globals.seriesX[c][h]){var m,b,v=Math.min(this.yRatio.length+1,c+1);if(void 0!==this.prevY[c-1])for(var y=1;y<v;y++)if(!isNaN(this.prevY[c-y][h])){b=this.prevY[c-y][h];break}for(var w=1;w<v;w++){if(this.prevYVal[c-w][h]<0){m=this.series[c][h]>=0?b-g+2*(this.isReversed?g:0):b;break}if(this.prevYVal[c-w][h]>=0){m=this.series[c][h]>=0?b:b+g-2*(this.isReversed?g:0);break}}void 0===m&&(m=l.globals.gridHeight),p=this.prevYF[0].every((function(t){return 0===t}))&&this.prevYF.slice(1,c).every((function(t){return t.every((function(t){return isNaN(t)}))}))?s:m}else p=s;a=p-this.series[c][h]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[c][h]/this.yRatio[this.yaxisIndex]:0);var k=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:r,y1:p,y2:a,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:e.realIndex,i:c,j:h,w:l});return this.barHelpers.barBackground({bc:d,j:h,i:c,x1:f,x2:r,elSeries:o}),i+=n,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,s,c,h),barXPosition:f,x:l.globals.isXNumeric?i-n:i,y:a}}}]),i}(),Ct=function(t){d(i,St);var e=g(i);function i(){return o(this,i),e.apply(this,arguments)}return c(i,[{key:"draw",value:function(t,e){var i=this,a=this.w,n=new k(this.ctx),s=new Y(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal;var o=new S(this.ctx,a);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var l=n.group({class:"apexcharts-".concat(a.config.chart.type,"-series apexcharts-plot-series")}),c=function(o){i.isBoxPlot="boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[o].type;var c,h,d,u,p,f,g=void 0,x=void 0,m=[],b=[],y=a.globals.comboCharts?e[o]:o,w=n.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[y]),rel:o+1,"data:realIndex":y});i.ctx.series.addCollapsedClassToSeries(w,y),t[o].length>0&&(i.visibleI=i.visibleI+1),i.yRatio.length>1&&(i.yaxisIndex=y);var k=i.barHelpers.initialPositions();x=k.y,p=k.barHeight,h=k.yDivision,u=k.zeroW,g=k.x,f=k.barWidth,c=k.xDivision,d=k.zeroH,b.push(g+f/2);for(var S=n.group({class:"apexcharts-datalabels","data:realIndex":y}),A=function(e){var n=i.barHelpers.getStrokeWidth(o,e,y),l=null,v={indexes:{i:o,j:e,realIndex:y},x:g,y:x,strokeWidth:n,elSeries:w};l=i.isHorizontal?i.drawHorizontalBoxPaths(r(r({},v),{},{yDivision:h,barHeight:p,zeroW:u})):i.drawVerticalBoxPaths(r(r({},v),{},{xDivision:c,barWidth:f,zeroH:d})),x=l.y,g=l.x,e>0&&b.push(g+f/2),m.push(x),l.pathTo.forEach((function(r,c){var h=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?l.color[c]:a.globals.stroke.colors[o],d=s.fillPath({seriesNumber:y,dataPointIndex:e,color:l.color[c],value:t[o][e]});i.renderSeries({realIndex:y,pathFill:d,lineFill:h,j:e,i:o,pathFrom:l.pathFrom,pathTo:r,strokeWidth:n,elSeries:w,x:g,y:x,series:t,barHeight:p,barWidth:f,elDataLabelsWrap:S,visibleSeries:i.visibleI,type:a.config.chart.type})}))},C=0;C<a.globals.dataPoints;C++)A(C);a.globals.seriesXvalues[y]=b,a.globals.seriesYvalues[y]=m,l.add(w)},h=0;h<t.length;h++)c(h);return l}},{key:"drawVerticalBoxPaths",value:function(t){var e=t.indexes,i=t.x;t.y;var a=t.xDivision,n=t.barWidth,r=t.zeroH,s=t.strokeWidth,o=this.w,l=new k(this.ctx),c=e.i,h=e.j,d=!0,u=o.config.plotOptions.candlestick.colors.upward,p=o.config.plotOptions.candlestick.colors.downward,f="";this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var g=this.yRatio[this.yaxisIndex],x=e.realIndex,m=this.getOHLCValue(x,h),b=r,v=r;m.o>m.c&&(d=!1);var y=Math.min(m.o,m.c),w=Math.max(m.o,m.c),S=m.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[x][h]-o.globals.minX)/this.xRatio-n/2);var A=i+n*this.visibleI;void 0===this.series[c][h]||null===this.series[c][h]?(y=r,w=r):(y=r-y/g,w=r-w/g,b=r-m.h/g,v=r-m.l/g,S=r-m.m/g);var C=l.move(A,r),P=l.move(A+n/2,y);return o.globals.previousPaths.length>0&&(P=this.getPreviousPath(x,h,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+n/2,y)+l.line(A+n/2,b)+l.line(A+n/4,b)+l.line(A+n-n/4,b)+l.line(A+n/2,b)+l.line(A+n/2,y)+l.line(A+n,y)+l.line(A+n,S)+l.line(A,S)+l.line(A,y+s/2),l.move(A,S)+l.line(A+n,S)+l.line(A+n,w)+l.line(A+n/2,w)+l.line(A+n/2,v)+l.line(A+n-n/4,v)+l.line(A+n/4,v)+l.line(A+n/2,v)+l.line(A+n/2,w)+l.line(A,w)+l.line(A,S)+"z"]:[l.move(A,w)+l.line(A+n/2,w)+l.line(A+n/2,b)+l.line(A+n/2,w)+l.line(A+n,w)+l.line(A+n,y)+l.line(A+n/2,y)+l.line(A+n/2,v)+l.line(A+n/2,y)+l.line(A,y)+l.line(A,w-s/2)],P+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:P,x:i,y:w,barXPosition:A,color:this.isBoxPlot?f:d?[u]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,n=t.barHeight,r=t.zeroW,s=t.strokeWidth,o=this.w,l=new k(this.ctx),c=e.i,h=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,p=e.realIndex,f=this.getOHLCValue(p,h),g=r,x=r,m=Math.min(f.o,f.c),b=Math.max(f.o,f.c),v=f.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[p][h]-o.globals.minX)/this.invertedXRatio-n/2);var y=i+n*this.visibleI;void 0===this.series[c][h]||null===this.series[c][h]?(m=r,b=r):(m=r+m/u,b=r+b/u,g=r+f.h/u,x=r+f.l/u,v=r+f.m/u);var w=l.move(r,y),S=l.move(m,y+n/2);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(p,h,!0)),w=[l.move(m,y)+l.line(m,y+n/2)+l.line(g,y+n/2)+l.line(g,y+n/2-n/4)+l.line(g,y+n/2+n/4)+l.line(g,y+n/2)+l.line(m,y+n/2)+l.line(m,y+n)+l.line(v,y+n)+l.line(v,y)+l.line(m+s/2,y),l.move(v,y)+l.line(v,y+n)+l.line(b,y+n)+l.line(b,y+n/2)+l.line(x,y+n/2)+l.line(x,y+n-n/4)+l.line(x,y+n/4)+l.line(x,y+n/2)+l.line(b,y+n/2)+l.line(b,y)+l.line(v,y)+"z"],S+=l.move(m,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:S,x:b,y:i,barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),i}(),Pt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var n=this.w,r=1,s=n.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);n.globals.hasNegs||a?r=n.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*s):(1-o.percent/100)*(1.25*s):o.percent<=0?1-(1+o.percent/100)*s:(1-o.percent/100)*s:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*s)));var l=o.color,c=new v;return n.config.plotOptions[t].enableShades&&(l="dark"===this.w.config.theme.mode?v.hexToRgba(c.shadeColor(-1*r,o.color),n.config.fill.opacity):v.hexToRgba(c.shadeColor(r,o.color),n.config.fill.opacity)),{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,n=a.globals.series[e][i],r=a.config.plotOptions[t],s=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(s=i);var o=a.globals.colors[s],l=null,c=Math.min.apply(Math,x(a.globals.series[e])),h=Math.max.apply(Math,x(a.globals.series[e]));r.distributed||"heatmap"!==t||(c=a.globals.minY,h=a.globals.maxY),void 0!==r.colorScale.min&&(c=r.colorScale.min<a.globals.minY?r.colorScale.min:a.globals.minY,h=r.colorScale.max>a.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(h)+Math.abs(c),u=100*n/(0===d?d-1e-6:d);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(n>=t.from&&n<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,c=t.from,h=t.to;var i=Math.abs(h)+Math.abs(c);u=100*n/(0===i?i-1e-6:i)}})),{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,n=t.i,r=t.j,s=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,c=new k(this.ctx),h=new H(this.ctx),d=null;if(l.enabled){d=c.group({class:"apexcharts-data-labels"});var u=l.offsetX,p=l.offsetY,f=i+u,g=a+parseFloat(l.style.fontSize)/3+p;h.plotDataLabelsText({x:f,y:g,text:e,i:n,j:r,color:s.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new k(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Lt=function(){function t(e,i){o(this,t),this.ctx=e,this.w=e.w,this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Pt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return c(t,[{key:"draw",value:function(t){var e=this.w,i=new k(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var n=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,s=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var c=o?0:l.length-1;o?c<l.length:c>=0;o?c++:c--){var h=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(h,c),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new w(this.ctx).dropShadow(h,d,c)}for(var u=0,p=e.config.plotOptions.heatmap.shadeIntensity,f=0;f<l[c].length;f++){var g=this.helpers.getShadeColor(e.config.chart.type,c,f,this.negRange),x=g.color,m=g.colorProps;"image"===e.config.fill.type&&(x=new Y(this.ctx).fillPath({seriesNumber:c,dataPointIndex:f,opacity:e.globals.hasNegs?m.percent<0?1-(1+m.percent/100):p+m.percent/100:m.percent/100,patternID:v.randomId(),width:e.config.fill.image.width?e.config.fill.image.width:n,height:e.config.fill.image.height?e.config.fill.image.height:r}));var b=this.rectRadius,y=i.drawRect(u,s,n,r,b);if(y.attr({cx:u,cy:s}),y.node.classList.add("apexcharts-heatmap-rect"),h.add(y),y.attr({fill:x,i:c,index:c,j:f,val:l[c][f],"stroke-width":this.strokeWidth,stroke:e.config.plotOptions.heatmap.useFillColorAsStroke?x:e.globals.stroke.colors[0],color:x}),this.helpers.addListeners(y),e.config.chart.animations.enabled&&!e.globals.dataChanged){var S=1;e.globals.resized||(S=e.config.chart.animations.speed),this.animateHeatMap(y,u,s,n,r,S)}if(e.globals.dataChanged){var A=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){A=this.dynamicAnim.speed;var C=e.globals.previousPaths[c]&&e.globals.previousPaths[c][f]&&e.globals.previousPaths[c][f].color;C||(C="rgba(255, 255, 255, 0)"),this.animateHeatColor(y,v.isColorHex(C)?C:v.rgb2hex(C),v.isColorHex(x)?x:v.rgb2hex(x),A)}}var P=(0,e.config.dataLabels.formatter)(e.globals.series[c][f],{value:e.globals.series[c][f],seriesIndex:c,dataPointIndex:f,w:e}),L=this.helpers.calculateDataLabels({text:P,x:u+n/2,y:s+r/2,i:c,j:f,colorProps:m,series:l});null!==L&&h.add(L),u+=n}s+=r,a.add(h)}var T=e.globals.yAxisScale[0].result.slice();e.config.yaxis[0].reversed?T.unshift(""):T.push(""),e.globals.yAxisScale[0].result=T;var D=e.globals.gridHeight/e.globals.series.length;return e.config.yaxis[0].labels.offsetY=-D/2,a}},{key:"animateHeatMap",value:function(t,e,i,a,n,r){var s=new y(this.ctx);s.animateRect(t,{x:e+a/2,y:i+n/2,width:0,height:0},{x:e,y:i,width:a,height:n},r,(function(){s.animationCompleted(t)}))}},{key:"animateHeatColor",value:function(t,e,i,a){t.attr({fill:e}).animate(a).attr({fill:i})}}]),t}(),Tt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"drawYAxisTexts",value:function(t,e,i,a){var n=this.w,r=n.config.yaxis[0],s=n.globals.yLabelFormatters[0];return new k(this.ctx).drawText({x:t+r.labels.offsetX,y:e+r.labels.offsetY,text:s(a,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[i]:r.labels.style.colors})}}]),t}(),Dt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==i.globals.stroke.colors?i.globals.stroke.colors:i.globals.colors,this.defaultSize=Math.min(i.globals.gridWidth,i.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=i.globals.gridWidth/2,"radialBar"===i.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(i.config.plotOptions.pie.endAngle-i.config.plotOptions.pie.startAngle),this.initialAngle=i.config.plotOptions.pie.startAngle%this.fullAngle,i.globals.radialSize=this.defaultSize/2.05-i.config.stroke.width-(i.config.chart.sparkline.enabled?0:i.config.chart.dropShadow.blur),this.donutSize=i.globals.radialSize*parseInt(i.config.plotOptions.pie.donut.size,10)/100,this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return c(t,[{key:"draw",value:function(t){var e=this,i=this.w,a=new k(this.ctx);if(this.ret=a.group({class:"apexcharts-pie"}),i.globals.noData)return this.ret;for(var n=0,r=0;r<t.length;r++)n+=v.negToZero(t[r]);var s=[],o=a.group();0===n&&(n=1e-5),t.forEach((function(t){e.maxY=Math.max(e.maxY,t)})),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),"back"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret);for(var l=0;l<t.length;l++){var c=this.fullAngle*v.negToZero(t[l])/n;s.push(c),"polarArea"===this.chartType?(s[l]=this.fullAngle/t.length,this.sliceSizes.push(i.globals.radialSize*t[l]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var h,d=0,u=0;u<i.globals.previousPaths.length;u++)d+=v.negToZero(i.globals.previousPaths[u]);for(var p=0;p<i.globals.previousPaths.length;p++)h=this.fullAngle*v.negToZero(i.globals.previousPaths[p])/d,this.prevSectorAngleArr.push(h)}this.donutSize<0&&(this.donutSize=0);var f=i.config.plotOptions.pie.customScale,g=i.globals.gridWidth/2,x=i.globals.gridHeight/2,m=g-i.globals.gridWidth/2*f,b=x-i.globals.gridHeight/2*f;if("donut"===this.chartType){var y=a.drawCircle(this.donutSize);y.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),o.add(y)}var w=this.drawArcs(s,t);if(this.sliceLabels.forEach((function(t){w.add(t)})),o.attr({transform:"translate(".concat(m,", ").concat(b,") scale(").concat(f,")")}),o.add(w),this.ret.add(o),this.donutDataLabels.show){var S=this.renderInnerDataLabels(this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show,translateX:m,translateY:b});this.ret.add(S)}return"front"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret),this.ret}},{key:"drawArcs",value:function(t,e){var i=this.w,a=new w(this.ctx),n=new k(this.ctx),r=new Y(this.ctx),s=n.group({class:"apexcharts-slices"}),o=this.initialAngle,l=this.initialAngle,c=this.initialAngle,h=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var d=0;d<t.length;d++){var u=n.group({class:"apexcharts-series apexcharts-pie-series",seriesName:v.escapeString(i.globals.seriesNames[d]),rel:d+1,"data:realIndex":d});s.add(u),l=h,c=(o=c)+t[d],h=l+this.prevSectorAngleArr[d];var p=c<o?this.fullAngle+c-o:c-o,f=r.fillPath({seriesNumber:d,size:this.sliceSizes[d],value:e[d]}),g=this.getChangedPath(l,h),x=n.drawPath({d:g,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[d]:this.lineColorArr,strokeWidth:0,fill:f,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(d)});if(x.attr({index:0,j:d}),a.setSelectionFilter(x,0,d),i.config.chart.dropShadow.enabled){var m=i.config.chart.dropShadow;a.dropShadow(x,m,d)}this.addListeners(x,this.donutDataLabels),k.setAttrs(x.node,{"data:angle":p,"data:startAngle":o,"data:strokeWidth":this.strokeWidth,"data:value":e[d]});var b={x:0,y:0};"pie"===this.chartType||"polarArea"===this.chartType?b=v.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(o+p/2)%this.fullAngle):"donut"===this.chartType&&(b=v.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(o+p/2)%this.fullAngle)),u.add(x);var y=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):(0==(y=p/this.fullAngle*i.config.chart.animations.speed)&&(y=1),this.animDur=y+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(x,{size:this.sliceSizes[d],endAngle:c,startAngle:o,prevStartAngle:l,prevEndAngle:h,animateStartingPos:!0,i:d,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(x,{size:this.sliceSizes[d],endAngle:c,startAngle:o,i:d,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:y}),i.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&x.click(this.pieClicked.bind(this,d)),void 0!==i.globals.selectedDataPoints[0]&&i.globals.selectedDataPoints[0].indexOf(d)>-1&&this.pieClicked(d),i.config.dataLabels.enabled){var S=b.x,A=b.y,C=100*p/this.fullAngle+"%";if(0!==p&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[d]){var P=i.config.dataLabels.formatter;void 0!==P&&(C=P(i.globals.seriesPercent[d][0],{seriesIndex:d,w:i}));var L=i.globals.dataLabels.style.colors[d],T=n.group({class:"apexcharts-datalabels"}),D=n.drawText({x:S,y:A,text:C,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:L});if(T.add(D),i.config.dataLabels.dropShadow.enabled){var M=i.config.dataLabels.dropShadow;a.dropShadow(D,M)}D.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&!1===i.globals.resized&&(D.node.classList.add("apexcharts-pie-label-delay"),D.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(T)}}}return s}},{key:"addListeners",value:function(t,e){var i=new k(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}},{key:"animatePaths",value:function(t,e){var i=this.w,a=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,n=a,r=e.startAngle,s=e.startAngle;void 0!==e.prevStartAngle&&void 0!==e.prevEndAngle&&(r=e.prevEndAngle,n=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===i.config.series.length-1&&(a+s>this.fullAngle?e.endAngle=e.endAngle-(a+s):a+s<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(a+s)))),a===this.fullAngle&&(a=this.fullAngle-.01),this.animateArc(t,r,s,a,n,e)}},{key:"animateArc",value:function(t,e,i,a,n,r){var s,o=this,l=this.w,c=new y(this.ctx),h=r.size;(isNaN(e)||isNaN(n))&&(e=i,n=a,r.dur=0);var d=a,u=i,p=e<i?this.fullAngle+e-i:e-i;l.globals.dataChanged&&r.shouldSetPrevPaths&&r.prevEndAngle&&(s=o.getPiePath({me:o,startAngle:r.prevStartAngle,angle:r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle,size:h}),t.attr({d:s})),0!==r.dur?t.animate(r.dur,l.globals.easing,r.animBeginArr[r.i]).afterAll((function(){"pie"!==o.chartType&&"donut"!==o.chartType&&"polarArea"!==o.chartType||this.animate(l.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),r.i===l.config.series.length-1&&c.animationCompleted(t)})).during((function(l){d=p+(a-p)*l,r.animateStartingPos&&(d=n+(a-n)*l,u=e-n+(i-(e-n))*l),s=o.getPiePath({me:o,startAngle:u,angle:d,size:h}),t.node.setAttribute("data:pathOrig",s),t.attr({d:s})})):(s=o.getPiePath({me:o,startAngle:u,angle:a,size:h}),r.isTrack||(l.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",s),t.attr({d:s,"stroke-width":o.strokeWidth}))}},{key:"pieClicked",value:function(t){var e,i=this.w,a=this,n=a.sliceSizes[t]+(i.config.plotOptions.pie.expandOnClick?4:0),r=i.globals.dom.Paper.select(".apexcharts-".concat(a.chartType.toLowerCase(),"-slice-").concat(t)).members[0];if("true"!==r.attr("data:pieClicked")){var s=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(s,(function(t){t.setAttribute("data:pieClicked","false");var e=t.getAttribute("data:pathOrig");t.setAttribute("d",e)})),r.attr("data:pieClicked","true");var o=parseInt(r.attr("data:startAngle"),10),l=parseInt(r.attr("data:angle"),10);e=a.getPiePath({me:a,startAngle:o,angle:l,size:n}),360!==l&&r.plot(e)}else{r.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(r.node,this.donutDataLabels);var c=r.attr("data:pathOrig");r.attr({d:c})}}},{key:"getChangedPath",value:function(t,e){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:t,angle:e-t,size:this.size})),i}},{key:"getPiePath",value:function(t){var e=t.me,i=t.startAngle,a=t.angle,n=t.size,r=i,s=Math.PI*(r-90)/180,o=a+i;Math.ceil(o)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(o=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(o)>this.fullAngle&&(o-=this.fullAngle);var l=Math.PI*(o-90)/180,c=e.centerX+n*Math.cos(s),h=e.centerY+n*Math.sin(s),d=e.centerX+n*Math.cos(l),u=e.centerY+n*Math.sin(l),p=v.polarToCartesian(e.centerX,e.centerY,e.donutSize,o),f=v.polarToCartesian(e.centerX,e.centerY,e.donutSize,r),g=a>180?1:0,x=["M",c,h,"A",n,n,0,g,1,d,u];return"donut"===e.chartType?[].concat(x,["L",p.x,p.y,"A",e.donutSize,e.donutSize,0,g,0,f.x,f.y,"L",c,h,"z"]).join(" "):"pie"===e.chartType||"polarArea"===e.chartType?[].concat(x,["L",e.centerX,e.centerY,"L",c,h]).join(" "):[].concat(x).join(" ")}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new U(this.ctx),a=new k(this.ctx),n=new Tt(this.ctx),r=a.group(),s=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),e.config.yaxis[0].tickAmount,0,!0),l=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;for(var h=e.globals.radialSize,d=h/(c-1),u=0;u<c-1;u++){var p=a.drawCircle(h);if(p.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.rings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){var f=n.drawYAxisTexts(this.centerX,this.centerY-h+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,u,l[u]);s.add(f)}r.add(p),h-=d}this.drawSpokes(t),t.add(r),t.add(s)}},{key:"renderInnerDataLabels",value:function(t,e){var i=this.w,a=new k(this.ctx),n=a.group({class:"apexcharts-datalabels-group",transform:"translate(".concat(e.translateX?e.translateX:0,", ").concat(e.translateY?e.translateY:0,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),r=t.total.show;n.node.style.opacity=e.opacity;var s,o,l=e.centerX,c=e.centerY;s=void 0===t.name.color?i.globals.colors[0]:t.name.color;var h=t.name.fontSize,d=t.name.fontFamily,u=t.name.fontWeight;o=void 0===t.value.color?i.config.chart.foreColor:t.value.color;var p=t.value.formatter,f="",g="";if(r?(s=t.total.color,h=t.total.fontSize,d=t.total.fontFamily,u=t.total.fontWeight,g=t.total.label,f=t.total.formatter(i)):1===i.globals.series.length&&(f=p(i.globals.series[0],i),g=i.globals.seriesNames[0]),g&&(g=t.name.formatter(g,t.total.show,i)),t.name.show){var x=a.drawText({x:l,y:c+parseFloat(t.name.offsetY),text:g,textAnchor:"middle",foreColor:s,fontSize:h,fontWeight:u,fontFamily:d});x.node.classList.add("apexcharts-datalabel-label"),n.add(x)}if(t.value.show){var m=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,b=a.drawText({x:l,y:c+m,text:f,textAnchor:"middle",foreColor:o,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});b.node.classList.add("apexcharts-datalabel-value"),n.add(b)}return n}},{key:"printInnerLabels",value:function(t,e,i,a){var n,r=this.w;a?n=void 0===t.name.color?r.globals.colors[parseInt(a.parentNode.getAttribute("rel"),10)-1]:t.name.color:r.globals.series.length>1&&t.total.show&&(n=t.total.color);var s=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=t.name.formatter(e,l,r),null!==s&&(s.textContent=e),null!==o&&(o.textContent=i),null!==s&&(s.style.fill=n)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),n=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,n,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new k(this.ctx),n=i.config.plotOptions.polarArea.spokes;if(0!==n.strokeWidth){for(var r=[],s=360/i.globals.series.length,o=0;o<i.globals.series.length;o++)r.push(v.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+s*o));r.forEach((function(i,r){var s=a.drawLine(i.x,i.y,e.centerX,e.centerY,Array.isArray(n.connectorColors)?n.connectorColors[r]:n.connectorColors);t.add(s)}))}}},{key:"revertDataLabelsInner",value:function(t,e,i){var a=this,n=this.w,r=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group"),s=!1,o=n.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area"),l=function(t){var i=t.makeSliceOut,n=t.printLabel;Array.prototype.forEach.call(o,(function(t){"true"===t.getAttribute("data:pieClicked")&&(i&&(s=!0),n&&a.printDataLabelsInner(t,e))}))};if(l({makeSliceOut:!0,printLabel:!1}),e.total.show&&n.globals.series.length>1)s&&!e.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(e,e.total.label,e.total.formatter(n));else if(l({makeSliceOut:!1,printLabel:!0}),!s)if(n.globals.selectedDataPoints.length&&n.globals.series.length>1)if(n.globals.selectedDataPoints[0].length>0){var c=n.globals.selectedDataPoints[0],h=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(h,e)}else r&&n.globals.selectedDataPoints.length&&0===n.globals.selectedDataPoints[0].length&&(r.style.opacity=0);else r&&n.globals.series.length>1&&(r.style.opacity=0)}}]),t}(),Mt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var i=this.w;this.graphics=new k(this.ctx),this.lineColorArr=void 0!==i.globals.stroke.colors?i.globals.stroke.colors:i.globals.colors,this.defaultSize=i.globals.svgHeight<i.globals.svgWidth?i.globals.gridHeight+1.5*i.globals.goldenPadding:i.globals.gridWidth,this.isLog=i.config.yaxis[0].logarithmic,this.coreUtils=new S(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(i.globals.maxY,0):i.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.w.globals.minY,0):i.globals.minY,this.polygons=i.config.plotOptions.radar.polygons,this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-i.config.chart.dropShadow.blur,i.config.xaxis.labels.show&&(this.size=this.size-i.globals.xAxisLabelsWidth/1.75),void 0!==i.config.plotOptions.radar.size&&(this.size=i.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return c(t,[{key:"draw",value:function(t){var e=this,i=this.w,a=new Y(this.ctx),n=[],s=new H(this.ctx);t.length&&(this.dataPointsLen=t[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var o=i.globals.gridWidth/2,l=i.globals.gridHeight/2,c=o+i.config.plotOptions.radar.offsetX,h=l+i.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(c||0,", ").concat(h||0,")")}),u=[],p=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((function(t,o){var l=t.length===i.globals.dataPoints,c=e.graphics.group().attr({class:"apexcharts-series","data:longestSeries":l,seriesName:v.escapeString(i.globals.seriesNames[o]),rel:o+1,"data:realIndex":o});e.dataRadiusOfPercent[o]=[],e.dataRadius[o]=[],e.angleArr[o]=[],t.forEach((function(t,i){var a=Math.abs(e.maxValue-e.minValue);t+=Math.abs(e.minValue),e.isLog&&(t=e.coreUtils.getLogVal(t,0)),e.dataRadiusOfPercent[o][i]=t/a,e.dataRadius[o][i]=e.dataRadiusOfPercent[o][i]*e.size,e.angleArr[o][i]=i*e.disAngle})),u=e.getDataPointsPos(e.dataRadius[o],e.angleArr[o]);var h=e.createPaths(u,{x:0,y:0});p=e.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=e.graphics.group({class:"apexcharts-datalabels","data:realIndex":o}),i.globals.delayedElements.push({el:p.node,index:o});var d={i:o,realIndex:o,animationDelay:o,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[o],strokeLineCap:i.config.stroke.lineCap},g=null;i.globals.previousPaths.length>0&&(g=e.getPreviousPath(o));for(var x=0;x<h.linePathsTo.length;x++){var m=e.graphics.renderPaths(r(r({},d),{},{pathFrom:null===g?h.linePathsFrom[x]:g,pathTo:h.linePathsTo[x],strokeWidth:Array.isArray(e.strokeWidth)?e.strokeWidth[o]:e.strokeWidth,fill:"none",drawShadow:!1}));c.add(m);var b=a.fillPath({seriesNumber:o}),y=e.graphics.renderPaths(r(r({},d),{},{pathFrom:null===g?h.areaPathsFrom[x]:g,pathTo:h.areaPathsTo[x],strokeWidth:0,fill:b,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var k=new w(e.ctx),S=i.config.chart.dropShadow;k.dropShadow(y,Object.assign({},S,{noUserSpaceOnUse:!0}),o)}c.add(y)}t.forEach((function(t,a){var n=new X(e.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:a}),l=e.graphics.drawMarker(u[a].x,u[a].y,n);l.attr("rel",a),l.attr("j",a),l.attr("index",o),l.node.setAttribute("default-marker-size",n.pSize);var h=e.graphics.group({class:"apexcharts-series-markers"});h&&h.add(l),p.add(h),c.add(p);var d=i.config.dataLabels;if(d.enabled){var g=d.formatter(i.globals.series[o][a],{seriesIndex:o,dataPointIndex:a,w:i});s.plotDataLabelsText({x:u[a].x,y:u[a].y,text:g,textAnchor:"middle",i:o,j:o,parent:f,offsetCorrection:!1,dataLabelsConfig:r({},d)})}c.add(f)})),n.push(c)})),this.drawPolygons({parent:d}),i.config.xaxis.labels.show){var g=this.drawXAxisTexts();d.add(g)}return n.forEach((function(t){d.add(t)})),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(t){for(var e=this,i=this.w,a=t.parent,n=new Tt(this.ctx),r=i.globals.yAxisScale[0].result.reverse(),s=r.length,o=[],l=this.size/(s-1),c=0;c<s;c++)o[c]=l*c;o.reverse();var h=[],d=[];o.forEach((function(t,i){var a=v.getPolygonPos(t,e.dataPointsLen),n="";a.forEach((function(t,a){if(0===i){var r=e.graphics.drawLine(t.x,t.y,0,0,Array.isArray(e.polygons.connectorColors)?e.polygons.connectorColors[a]:e.polygons.connectorColors);d.push(r)}0===a&&e.yaxisLabelsTextsPos.push({x:t.x,y:t.y}),n+=t.x+","+t.y+" "})),h.push(n)})),h.forEach((function(t,n){var r=e.polygons.strokeColors,s=e.polygons.strokeWidth,o=e.graphics.drawPolygon(t,Array.isArray(r)?r[n]:r,Array.isArray(s)?s[n]:s,i.globals.radarPolygons.fill.colors[n]);a.add(o)})),d.forEach((function(t){a.add(t)})),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((function(t,i){var a=n.drawYAxisTexts(t.x,t.y,i,r[i]);e.yaxisLabels.add(a)}))}},{key:"drawXAxisTexts",value:function(){var t=this,e=this.w,i=e.config.xaxis.labels,a=this.graphics.group({class:"apexcharts-xaxis"}),n=v.getPolygonPos(this.size,this.dataPointsLen);return e.globals.labels.forEach((function(s,o){var l=e.config.xaxis.labels.formatter,c=new H(t.ctx);if(n[o]){var h=t.getTextPos(n[o],t.size),d=l(s,{seriesIndex:-1,dataPointIndex:o,w:e});c.plotDataLabelsText({x:h.newX,y:h.newY,text:d,textAnchor:h.textAnchor,i:o,j:o,parent:a,color:Array.isArray(i.style.colors)&&i.style.colors[o]?i.style.colors[o]:"#a8a8a8",dataLabelsConfig:r({textAnchor:h.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1})}})),a}},{key:"createPaths",value:function(t,e){var i=this,a=[],n=[],r=[],s=[];if(t.length){n=[this.graphics.move(e.x,e.y)],s=[this.graphics.move(e.x,e.y)];var o=this.graphics.move(t[0].x,t[0].y),l=this.graphics.move(t[0].x,t[0].y);t.forEach((function(e,a){o+=i.graphics.line(e.x,e.y),l+=i.graphics.line(e.x,e.y),a===t.length-1&&(o+="Z",l+="Z")})),a.push(o),r.push(l)}return{linePathsFrom:n,linePathsTo:a,areaPathsFrom:s,areaPathsTo:r}}},{key:"getTextPos",value:function(t,e){var i="middle",a=t.x,n=t.y;return Math.abs(t.x)>=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?n-=10:t.y>0&&(n+=10)),{textAnchor:i,newX:a,newY:n}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a<e.globals.previousPaths.length;a++){var n=e.globals.previousPaths[a];n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],n=0;n<i;n++){var r={};r.x=t[n]*Math.sin(e[n]),r.y=-t[n]*Math.cos(e[n]),a.push(r)}return a}}]),t}(),Et=function(t){d(i,Dt);var e=g(i);function i(t){var a;o(this,i),(a=e.call(this,t)).ctx=t,a.w=t.w,a.animBeginArr=[0],a.animDur=0;var n=a.w;return a.startAngle=n.config.plotOptions.radialBar.startAngle,a.endAngle=n.config.plotOptions.radialBar.endAngle,a.totalAngle=Math.abs(n.config.plotOptions.radialBar.endAngle-n.config.plotOptions.radialBar.startAngle),a.trackStartAngle=n.config.plotOptions.radialBar.track.startAngle,a.trackEndAngle=n.config.plotOptions.radialBar.track.endAngle,a.donutDataLabels=a.w.config.plotOptions.radialBar.dataLabels,a.radialDataLabels=a.donutDataLabels,a.trackStartAngle||(a.trackStartAngle=a.startAngle),a.trackEndAngle||(a.trackEndAngle=a.endAngle),360===a.endAngle&&(a.endAngle=359.99),a.margin=parseInt(n.config.plotOptions.radialBar.track.margin,10),a}return c(i,[{key:"draw",value:function(t){var e=this.w,i=new k(this.ctx),a=i.group({class:"apexcharts-radialbar"});if(e.globals.noData)return a;var n=i.group(),r=this.defaultSize/2,s=e.globals.gridWidth/2,o=this.defaultSize/2.05;e.config.chart.sparkline.enabled||(o=o-e.config.stroke.width-e.config.chart.dropShadow.blur);var l=e.globals.fill.colors;if(e.config.plotOptions.radialBar.track.show){var c=this.drawTracks({size:o,centerX:s,centerY:r,colorArr:l,series:t});n.add(c)}var h=this.drawArcs({size:o,centerX:s,centerY:r,colorArr:l,series:t}),d=360;e.config.plotOptions.radialBar.startAngle<0&&(d=this.totalAngle);var u=(360-d)/360;if(e.globals.radialSize=o-o*u,this.radialDataLabels.value.show){var p=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);e.globals.radialSize+=p*u}return n.add(h.g),"front"===e.config.plotOptions.radialBar.hollow.position&&(h.g.add(h.elHollow),h.dataLabels&&h.g.add(h.dataLabels)),a.add(n),a}},{key:"drawTracks",value:function(t){var e=this.w,i=new k(this.ctx),a=i.group({class:"apexcharts-tracks"}),n=new w(this.ctx),r=new Y(this.ctx),s=this.getStrokeWidth(t);t.size=t.size-s/2;for(var o=0;o<t.series.length;o++){var l=i.group({class:"apexcharts-radialbar-track apexcharts-track"});a.add(l),l.attr({rel:o+1}),t.size=t.size-s-this.margin;var c=e.config.plotOptions.radialBar.track,h=r.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(c.background)?c.background[o]:c.background,solid:!0}),d=this.trackStartAngle,u=this.trackEndAngle;Math.abs(u)+Math.abs(d)>=360&&(u=360-Math.abs(this.startAngle)-.1);var p=i.drawPath({d:"",stroke:h,strokeWidth:s*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var f=c.dropShadow;n.dropShadow(p,f)}l.add(p),p.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(p,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:e.globals.easing})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new k(this.ctx),a=new Y(this.ctx),n=new w(this.ctx),r=i.group(),s=this.getStrokeWidth(t);t.size=t.size-s/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-s*t.series.length-this.margin*t.series.length-s*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var h=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(h,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var p=null;this.radialDataLabels.show&&(p=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})),"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(h),p&&r.add(p));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var g=f?t.series.length-1:0;f?g>=0:g<t.series.length;f?g--:g++){var x=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:v.escapeString(e.globals.seriesNames[g])});r.add(x),x.attr({rel:g+1,"data:realIndex":g}),this.ctx.series.addCollapsedClassToSeries(x,g),t.size=t.size-s-this.margin;var m=a.fillPath({seriesNumber:g,size:t.size,value:t.series[g]}),b=this.startAngle,y=void 0,S=v.negToZero(t.series[g]>100?100:t.series[g])/100,A=Math.round(this.totalAngle*S)+this.startAngle,C=void 0;e.globals.dataChanged&&(y=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[g])/100)+y),Math.abs(A)+Math.abs(b)>=360&&(A-=.01),Math.abs(C)+Math.abs(y)>=360&&(C-=.01);var P=A-b,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[g]:e.config.stroke.dashArray,T=i.drawPath({d:"",stroke:m,strokeWidth:s,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+g,strokeDashArray:L});if(k.setAttrs(T.node,{"data:angle":P,"data:value":t.series[g]}),e.config.chart.dropShadow.enabled){var D=e.config.chart.dropShadow;n.dropShadow(T,D,g)}n.setSelectionFilter(T,0,g),this.addListeners(T,this.radialDataLabels),x.add(T),T.attr({index:0,j:g});var M=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(M=e.config.chart.animations.speed),e.globals.dataChanged&&(M=e.config.chart.animations.dynamicAnimation.speed),this.animDur=M/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(T,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:b,prevEndAngle:C,prevStartAngle:y,size:t.size,i:g,totalItems:2,animBeginArr:this.animBeginArr,dur:M,shouldSetPrevPaths:!0,easing:e.globals.easing})}return{g:r,elHollow:h,dataLabels:p}}},{key:"drawHollow",value:function(t){var e=new k(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 n=this.w,r=new Y(this.ctx),s=v.randomId(),o=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(n.globals.cuid).concat(s)}),a="url(#pattern".concat(n.globals.cuid).concat(s,")");else{var l=n.config.plotOptions.radialBar.hollow.imageWidth,c=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var h=n.globals.dom.Paper.image(o).loaded((function(e){this.move(t.centerX-e.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(h)}else{var d=n.globals.dom.Paper.image(o).loaded((function(e){this.move(t.centerX-l/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}}]),i}(),It=function(t){d(i,St);var e=g(i);function i(){return o(this,i),e.apply(this,arguments)}return c(i,[{key:"draw",value:function(t,e){var i=this.w,a=new k(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var n=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),s=0;s<t.length;s++){var o,l,c,h=void 0,d=void 0,u=void 0,p=i.globals.comboCharts?e[s]:s,f=a.group({class:"apexcharts-series",seriesName:v.escapeString(i.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});this.ctx.series.addCollapsedClassToSeries(f,p),t[s].length>0&&(this.visibleI=this.visibleI+1);var g=0,x=0;this.yRatio.length>1&&(this.yaxisIndex=p);var m=this.barHelpers.initialPositions();d=m.y,c=m.zeroW,h=m.x,x=m.barWidth,o=m.xDivision,l=m.zeroH;for(var b=a.group({class:"apexcharts-datalabels","data:realIndex":p}),y=a.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),w=0;w<i.globals.dataPoints;w++){var S=this.barHelpers.getStrokeWidth(s,w,p),A=this.seriesRangeStart[s][w],C=this.seriesRangeEnd[s][w],P=null,L=null,T={x:h,y:d,strokeWidth:S,elSeries:f};if(u=m.yDivision,g=m.barHeight,this.isHorizontal){L=d+g*this.visibleI;var D=this.seriesLen;i.config.plotOptions.bar.rangeBarGroupRows&&(D=1);var M=(u-g*D)/2;if(void 0===i.config.series[s].data[w])break;if(i.config.series[s].data[w].x){var E=this.detectOverlappingBars({i:s,j:w,barYPosition:L,srty:M,barHeight:g,yDivision:u,initPositions:m});g=E.barHeight,L=E.barYPosition}x=(P=this.drawRangeBarPaths(r({indexes:{i:s,j:w,realIndex:p},barHeight:g,barYPosition:L,zeroW:c,yDivision:u,y1:A,y2:C},T))).barWidth}else g=(P=this.drawRangeColumnPaths(r({indexes:{i:s,j:w,realIndex:p},zeroH:l,barWidth:x,xDivision:o},T))).barHeight;var I=this.barHelpers.drawGoalLine({barXPosition:P.barXPosition,barYPosition:L,goalX:P.goalX,goalY:P.goalY,barHeight:g,barWidth:x});I&&y.add(I),d=P.y,h=P.x;var O=this.barHelpers.getPathFillColor(t,s,w,p),R=i.globals.stroke.colors[p];this.renderSeries({realIndex:p,pathFill:O,lineFill:R,j:w,i:s,x:h,y:d,y1:A,y2:C,pathFrom:P.pathFrom,pathTo:P.pathTo,strokeWidth:S,elSeries:f,series:t,barHeight:g,barYPosition:L,barWidth:x,elDataLabelsWrap:b,elGoalsMarkers:y,visibleSeries:this.visibleI,type:"rangebar"})}n.add(f)}return n}},{key:"detectOverlappingBars",value:function(t){var e=t.i,i=t.j,a=t.barYPosition,n=t.srty,r=t.barHeight,s=t.yDivision,o=t.initPositions,l=this.w,c=[],h=l.config.series[e].data[i].rangeName,d=l.config.series[e].data[i].x,u=l.globals.labels.indexOf(d),p=l.globals.seriesRange[e].findIndex((function(t){return t.x===d&&t.overlaps.length>0}));return a=l.config.plotOptions.bar.rangeBarGroupRows?n+s*u:n+r*this.visibleI+s*u,p>-1&&!l.config.plotOptions.bar.rangeBarOverlap&&(c=l.globals.seriesRange[e][p].overlaps).indexOf(h)>-1&&(a=(r=o.barHeight/c.length)*this.visibleI+s*(100-parseInt(this.barOptions.barHeight,10))/100/2+r*(this.visibleI+c.indexOf(h))+s*u),{barYPosition:a,barHeight:r}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x;t.strokeWidth;var a=t.xDivision,n=t.barWidth,r=t.zeroH,s=this.w,o=e.i,l=e.j,c=this.yRatio[this.yaxisIndex],h=e.realIndex,d=this.getRangeValue(h,l),u=Math.min(d.start,d.end),p=Math.max(d.start,d.end);s.globals.isXNumeric&&(i=(s.globals.seriesX[o][l]-s.globals.minX)/this.xRatio-n/2);var f=i+n*this.visibleI;void 0===this.series[o][l]||null===this.series[o][l]?u=r:(u=r-u/c,p=r-p/c);var g=Math.abs(p-u),x=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:n,y1:u,y2:p,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:e.realIndex,i:h,j:l,w:s});return s.globals.isXNumeric||(i+=a),{pathTo:x.pathTo,pathFrom:x.pathFrom,barHeight:g,x:i,y:p,goalY:this.barHelpers.getGoalValues("y",null,r,o,l),barXPosition:f}}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,n=t.y2,r=t.yDivision,s=t.barHeight,o=t.barYPosition,l=t.zeroW,c=this.w,h=l+a/this.invertedYRatio,d=l+n/this.invertedYRatio,u=Math.abs(d-h),p=this.barHelpers.getBarpaths({barYPosition:o,barHeight:s,x1:h,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:e.realIndex,realIndex:e.realIndex,j:e.j,w:c});return c.globals.isXNumeric||(i+=r),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:u,x:d,goalX:this.barHelpers.getGoalValues("x",l,null,e.realIndex,e.j),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),i}(),Ot=function(){function t(e){o(this,t),this.w=e.w,this.lineCtx=e}return c(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new S(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,n=t.y,r=t.i,s=t.j,o=t.prevY,l=this.w,c=[],h=[];if(0===s){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(d),h.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),c.push(a+l.config.markers.offsetX),h.push(v.isNumber(e[r][s+1])?n+l.config.markers.offsetY:null)}else c.push(a+l.config.markers.offsetX),h.push(v.isNumber(e[r][s+1])?n+l.config.markers.offsetY:null);return{x:c,y:h}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,n=this.w,r=0;r<n.globals.previousPaths.length;r++){var s=n.globals.previousPaths[r];("line"===s.type||"area"===s.type)&&s.paths.length>0&&parseInt(s.realIndex,10)===parseInt(a,10)&&("line"===s.type?(this.lineCtx.appendPathFrom=!1,e=n.globals.previousPaths[r].paths[0].d):"area"===s.type&&(this.lineCtx.appendPathFrom=!1,i=n.globals.previousPaths[r].paths[0].d,n.config.stroke.show&&n.globals.previousPaths[r].paths[1]&&(e=n.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i=t.i,a=t.series,n=t.prevY,r=t.lineYPosition,s=this.w;if(void 0!==(null===(e=a[i])||void 0===e?void 0:e[0]))n=(r=s.config.chart.stacked&&i>0?this.lineCtx.prevSeriesY[i-1][0]:this.lineCtx.zeroY)-a[i][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?a[i][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(s.config.chart.stacked&&i>0&&void 0===a[i][0])for(var o=i-1;o>=0;o--)if(null!==a[o][0]&&void 0!==a[o][0]){n=r=this.lineCtx.prevSeriesY[o][0];break}return{prevY:n,lineYPosition:r}}}]),t}(),Rt=function(){function t(e,i,a){o(this,t),this.ctx=e,this.w=e.w,this.xyRatios=i,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||a,this.scatter=new _(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Ot(this),this.markers=new X(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return c(t,[{key:"draw",value:function(t,e,i,a){var n=this.w,s=new k(this.ctx),o=n.globals.comboCharts?e:n.config.chart.type,l=s.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),c=new S(this.ctx,n);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=c.getLogSeries(t),this.yRatio=c.getLogYRatios(this.yRatio);for(var h=[],d=0;d<t.length;d++){t=this.lineHelpers.sameValueSeriesFix(d,t);var u=n.globals.comboCharts?i[d]:d;this._initSerieVariables(t,d,u);var p=[],f=[],g=n.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,u),n.globals.isXNumeric&&n.globals.seriesX.length>0&&(g=(n.globals.seriesX[u][0]-n.globals.minX)/this.xRatio),f.push(g);var x,m=g,b=void 0,v=m,y=this.zeroY,w=this.zeroY;y=this.lineHelpers.determineFirstPrevY({i:d,series:t,prevY:y,lineYPosition:0}).prevY,p.push(y),x=y,"rangeArea"===o&&(b=w=this.lineHelpers.determineFirstPrevY({i:d,series:a,prevY:w,lineYPosition:0}).prevY);var A={type:o,series:t,realIndex:u,i:d,x:g,y:1,pX:m,pY:x,pathsFrom:this._calculatePathsFrom({type:o,series:t,i:d,realIndex:u,prevX:v,prevY:y,prevY2:w}),linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:f,yArrj:p,seriesRangeEnd:a},C=this._iterateOverDataPoints(r(r({},A),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){var P=this._calculatePathsFrom({series:a,i:d,realIndex:u,prevX:v,prevY:w}),L=this._iterateOverDataPoints(r(r({},A),{},{series:a,pY:b,pathsFrom:P,iterations:a[d].length-1,isRangeStart:!1}));C.linePaths[0]=L.linePath+C.linePath,C.pathFromLine=L.pathFromLine+C.pathFromLine}this._handlePaths({type:o,realIndex:u,i:d,paths:C}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),h.push(this.elSeries)}if(n.config.chart.stacked)for(var T=h.length;T>0;T--)l.add(h[T-1]);else for(var D=0;D<h.length;D++)l.add(h[D]);return l}},{key:"_initSerieVariables",value:function(t,e,i){var a=this.w,n=new k(this.ctx);this.xDivision=a.globals.gridWidth/(a.globals.dataPoints-("on"===a.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(a.config.stroke.width)?a.config.stroke.width[i]:a.config.stroke.width,this.yRatio.length>1&&(this.yaxisIndex=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=n.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":i});var r=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":r,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,n,r=t.type,s=t.series,o=t.i,l=t.realIndex,c=t.prevX,h=t.prevY,d=t.prevY2,u=this.w,p=new k(this.ctx);if(null===s[o][0]){for(var f=0;f<s[o].length;f++)if(null!==s[o][f]){c=this.xDivision*f,h=this.zeroY-s[o][f]/this.yRatio[this.yaxisIndex],e=p.move(c,h),i=p.move(c,this.areaBottomY);break}}else e=p.move(c,h),"rangeArea"===r&&(e=p.move(c,d)+p.line(c,h)),i=p.move(c,this.areaBottomY)+p.line(c,h);if(a=p.move(-1,this.zeroY)+p.line(-1,this.zeroY),n=p.move(-1,this.zeroY)+p.line(-1,this.zeroY),u.globals.previousPaths.length>0){var g=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:n,realIndex:l});a=g.pathFromLine,n=g.pathFromArea}return{prevX:c,prevY:h,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:n}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,n=t.paths,s=this.w,o=new k(this.ctx),l=new Y(this.ctx);this.prevSeriesY.push(n.yArrj),s.globals.seriesXvalues[i]=n.xArrj,s.globals.seriesYvalues[i]=n.yArrj;var c=s.config.forecastDataPoints;if(c.count>0&&"rangeArea"!==e){var h=s.globals.seriesXvalues[i][s.globals.seriesXvalues[i].length-c.count-1],d=o.drawRect(h,0,s.globals.gridWidth,s.globals.gridHeight,0);s.globals.dom.elForecastMask.appendChild(d.node);var u=o.drawRect(0,0,h,s.globals.gridHeight,0);s.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||s.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var p={i:a,realIndex:i,animationDelay:a,initialSpeed:s.config.chart.animations.speed,dataChangeSpeed:s.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var f=l.fillPath({seriesNumber:i}),g=0;g<n.areaPaths.length;g++){var x=o.renderPaths(r(r({},p),{},{pathFrom:n.pathFromArea,pathTo:n.areaPaths[g],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:f}));this.elSeries.add(x)}if(s.config.stroke.show&&!this.pointsChart){var m=null;if("line"===e)m=l.fillPath({seriesNumber:i,i:a});else if("solid"===s.config.stroke.fill.type)m=s.globals.stroke.colors[i];else{var b=s.config.fill;s.config.fill=s.config.stroke.fill,m=l.fillPath({seriesNumber:i,i:a}),s.config.fill=b}for(var v=0;v<n.linePaths.length;v++){var y=m;"rangeArea"===e&&(y=l.fillPath({seriesNumber:i}));var w=r(r({},p),{},{pathFrom:n.pathFromLine,pathTo:n.linePaths[v],stroke:m,strokeWidth:this.strokeWidth,strokeLineCap:s.config.stroke.lineCap,fill:"rangeArea"===e?y:"none"}),S=o.renderPaths(w);if(this.elSeries.add(S),S.attr("fill-rule","evenodd"),c.count>0&&"rangeArea"!==e){var A=o.renderPaths(w);A.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&A.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(s.globals.cuid,")")),S.attr("clip-path","url(#nonForecastMask".concat(s.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e=t.type,i=t.series,a=t.iterations,n=t.realIndex,r=t.i,s=t.x,o=t.y,l=t.pX,c=t.pY,h=t.pathsFrom,d=t.linePaths,u=t.areaPaths,p=t.seriesIndex,f=t.lineYPosition,g=t.xArrj,x=t.yArrj,m=t.isRangeStart,b=t.seriesRangeEnd,y=this.w,w=new k(this.ctx),S=this.yRatio,A=h.prevY,C=h.linePath,P=h.areaPath,L=h.pathFromLine,T=h.pathFromArea,D=v.isNumber(y.globals.minYArr[n])?y.globals.minYArr[n]:y.globals.minY;a||(a=y.globals.dataPoints>1?y.globals.dataPoints-1:y.globals.dataPoints);for(var M=o,E=0;E<a;E++){var I=void 0===i[r][E+1]||null===i[r][E+1];if(y.globals.isXNumeric){var O=y.globals.seriesX[n][E+1];void 0===y.globals.seriesX[n][E+1]&&(O=y.globals.seriesX[n][a-1]),s=(O-y.globals.minX)/this.xRatio}else s+=this.xDivision;f=y.config.chart.stacked&&r>0&&y.globals.collapsedSeries.length<y.config.series.length-1?this.prevSeriesY[function(t){for(var e=t,i=0;i<y.globals.series.length;i++)if(y.globals.collapsedSeriesIndices.indexOf(t)>-1){e--;break}return e>=0?e:0}(r-1)][E+1]:this.zeroY,I?o=f-D/S[this.yaxisIndex]+2*(this.isReversed?D/S[this.yaxisIndex]:0):(o=f-i[r][E+1]/S[this.yaxisIndex]+2*(this.isReversed?i[r][E+1]/S[this.yaxisIndex]:0),"rangeArea"===e&&(M=f-b[r][E+1]/S[this.yaxisIndex]+2*(this.isReversed?b[r][E+1]/S[this.yaxisIndex]:0))),g.push(s),x.push(o);var R=this.lineHelpers.calculatePoints({series:i,x:s,y:o,realIndex:n,i:r,j:E,prevY:A}),N=this._createPaths({type:e,series:i,i:r,realIndex:n,j:E,x:s,y:o,y2:M,pX:l,pY:c,linePath:C,areaPath:P,linePaths:d,areaPaths:u,seriesIndex:p,isRangeStart:m});u=N.areaPaths,d=N.linePaths,l=N.pX,c=N.pY,P=N.areaPath,C=N.linePath,this.appendPathFrom&&(L+=w.line(s,this.zeroY),T+=w.line(s,this.zeroY)),this.handleNullDataPoints(i,R,r,E,n),this._handleMarkersAndLabels({type:e,pointsPos:R,i:r,j:E,realIndex:n,isRangeStart:m})}return{yArrj:x,xArrj:g,pathFromArea:T,areaPaths:u,pathFromLine:L,linePaths:d,linePath:C,areaPath:P}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,n=t.i,r=t.j,s=t.realIndex,o=this.w,l=new H(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:s,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(i,s,r+1);null!==c&&this.elPointsMain.add(c)}var h=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:s,j:r+1});null!==h&&this.elDataLabelsWrap.add(h)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i,n=t.realIndex,r=t.j,s=t.x,o=t.y,l=t.y2,c=t.pX,h=t.pY,d=t.linePath,u=t.areaPath,p=t.linePaths,f=t.areaPaths,g=t.seriesIndex,x=t.isRangeStart,m=this.w,b=new k(this.ctx),v=m.config.stroke.curve,y=this.areaBottomY;if(Array.isArray(m.config.stroke.curve)&&(v=Array.isArray(g)?m.config.stroke.curve[g[a]]:m.config.stroke.curve[a]),"smooth"===v){var w=.35*(s-c);m.globals.hasNullValues?(null!==i[a][r]&&(null!==i[a][r+1]?(d=b.move(c,h)+b.curve(c+w,h,s-w,o,s+1,o),u=b.move(c+1,h)+b.curve(c+w,h,s-w,o,s+1,o)+b.line(s,y)+b.line(c,y)+"z"):(d=b.move(c,h),u=b.move(c,h)+"z")),p.push(d),f.push(u)):(d+=b.curve(c+w,h,s-w,o,s,o),u+=b.curve(c+w,h,s-w,o,s,o)),c=s,h=o,r===i[a].length-2&&(u=u+b.curve(c,h,s,o,s,y)+b.move(s,o)+"z","rangeArea"===e&&x?d=d+b.curve(c,h,s,o,s,l)+b.move(s,l)+"z":m.globals.hasNullValues||(p.push(d),f.push(u)))}else{if(null===i[a][r+1]){d+=b.move(s,o);var S=m.globals.isXNumeric?(m.globals.seriesX[n][r]-m.globals.minX)/this.xRatio:s-this.xDivision;u=u+b.line(S,y)+b.move(s,o)+"z"}null===i[a][r]&&(d+=b.move(s,o),u+=b.move(s,y)),"stepline"===v?(d=d+b.line(s,null,"H")+b.line(null,o,"V"),u=u+b.line(s,null,"H")+b.line(null,o,"V")):"straight"===v&&(d+=b.line(s,o),u+=b.line(s,o)),r===i[a].length-2&&(u=u+b.line(s,y)+b.move(s,o)+"z","rangeArea"===e&&x?d=d+b.line(s,l)+b.move(s,l)+"z":(p.push(d),f.push(u)))}return{linePaths:p,areaPaths:f,pX:c,pY:h,linePath:d,areaPath:u}}},{key:"handleNullDataPoints",value:function(t,e,i,a,n){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var s=this.markers.plotChartMarkers(e,n,a+1,this.strokeWidth-r.config.markers.strokeWidth/2,!0);null!==s&&this.elPointsMain.add(s)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,n){this.xoffset=e,this.yoffset=i,this.height=n,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,n=this.yoffset,s=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e<t.length;e++)i.push([a,n,a+s,n+t[e]/s]),n+=t[e]/s;else for(e=0;e<t.length;e++)i.push([a,n,a+t[e]/o,n+o]),a+=t[e]/o;return i},this.cutArea=function(e){var i;if(this.width>=this.height){var a=e/this.height,n=this.width-a;i=new t(this.xoffset+a,this.yoffset,n,this.height)}else{var r=e/this.width,s=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,s)}return i}}function e(e,a,n,s,o){s=void 0===s?0:s,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],n=e/r(t);for(i=0;i<t.length;i++)a[i]=t[i]*n;return a}(e,a*n),[],new t(s,o,a,n),[]);return function(t){var e,i,a=[];for(e=0;e<t.length;e++)for(i=0;i<t[e].length;i++)a.push(t[e][i]);return a}(l)}function i(t,e,n,s){var o,l,c;if(0!==t.length)return o=n.shortestEdge(),function(t,e,i){var n;return 0===t.length||((n=t.slice()).push(e),a(t,i)>=a(n,i))}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,n,s)):(c=n.cutArea(r(e),s),s.push(n.getCoordinates(e)),i(t,[],c,s)),s;s.push(n.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),n=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(n,2),Math.pow(n,2)/(Math.pow(e,2)*i))}function n(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e];return i}function s(t){var e,i=0;if(n(t[0]))for(e=0;e<t.length;e++)i+=s(t[e]);else i=r(t);return i}return function t(i,a,r,o,l){o=void 0===o?0:o,l=void 0===l?0:l;var c,h,d=[],u=[];if(n(i[0])){for(h=0;h<i.length;h++)d[h]=s(i[h]);for(c=e(d,a,r,o,l),h=0;h<i.length;h++)u.push(t(i[h],c[h][2]-c[h][0],c[h][3]-c[h][1],c[h][0],c[h][1]))}else u=e(i,a,r,o,l);return u}}();var Nt,zt,Ft=function(){function t(e,i){o(this,t),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Pt(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return c(t,[{key:"draw",value:function(t){var e=this,i=this.w,a=new k(this.ctx),n=new Y(this.ctx),r=a.group({class:"apexcharts-treemap"});if(i.globals.noData)return r;var s=[];return t.forEach((function(t){var e=t.map((function(t){return Math.abs(t)}));s.push(e)})),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach((function(t,i){t.data.forEach((function(t){Array.isArray(e.labels[i])||(e.labels[i]=[]),e.labels[i].push(t.x)}))})),window.TreemapSquared.generate(s,i.globals.gridWidth,i.globals.gridHeight).forEach((function(s,o){var l=a.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:v.escapeString(i.globals.seriesNames[o]),rel:o+1,"data:realIndex":o});if(i.config.chart.dropShadow.enabled){var c=i.config.chart.dropShadow;new w(e.ctx).dropShadow(r,c,o)}var h=a.group({class:"apexcharts-data-labels"});s.forEach((function(r,s){var c=r[0],h=r[1],d=r[2],u=r[3],p=a.drawRect(c,h,d-c,u-h,0,"#fff",1,e.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?g:i.globals.stroke.colors[o]);p.attr({cx:c,cy:h,index:o,i:o,j:s,width:d-c,height:u-h});var f=e.helpers.getShadeColor(i.config.chart.type,o,s,e.negRange),g=f.color;void 0!==i.config.series[o].data[s]&&i.config.series[o].data[s].fillColor&&(g=i.config.series[o].data[s].fillColor);var x=n.fillPath({color:g,seriesNumber:o,dataPointIndex:s});p.node.classList.add("apexcharts-treemap-rect"),p.attr({fill:x}),e.helpers.addListeners(p);var m={x:c+(d-c)/2,y:h+(u-h)/2,width:0,height:0},b={x:c,y:h,width:d-c,height:u-h};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var v=1;i.globals.resized||(v=i.config.chart.animations.speed),e.animateTreemap(p,m,b,v)}if(i.globals.dataChanged){var y=1;e.dynamicAnim.enabled&&i.globals.shouldAnimate&&(y=e.dynamicAnim.speed,i.globals.previousPaths[o]&&i.globals.previousPaths[o][s]&&i.globals.previousPaths[o][s].rect&&(m=i.globals.previousPaths[o][s].rect),e.animateTreemap(p,m,b,y))}var w=e.getFontSize(r),k=i.config.dataLabels.formatter(e.labels[o][s],{value:i.globals.series[o][s],seriesIndex:o,dataPointIndex:s,w:i}),S=e.helpers.calculateDataLabels({text:k,x:(c+d)/2,y:(h+u)/2+e.strokeWidth/2+w/3,i:o,j:s,colorProps:f,fontSize:w,series:t});i.config.dataLabels.enabled&&S&&e.rotateToFitLabel(S,w,k,c,h,d,u),l.add(p),null!==S&&l.add(S)})),l.add(h),r.add(l)})),r}},{key:"getFontSize",value:function(t){var e,i,a=this.w,n=function t(e){var i,a=0;if(Array.isArray(e[0]))for(i=0;i<e.length;i++)a+=t(e[i]);else for(i=0;i<e.length;i++)a+=e[i].length;return a}(this.labels)/function t(e){var i,a=0;if(Array.isArray(e[0]))for(i=0;i<e.length;i++)a+=t(e[i]);else for(i=0;i<e.length;i++)a+=1;return a}(this.labels);return e=(t[2]-t[0])*(t[3]-t[1]),i=Math.pow(e,.5),Math.min(i/n,parseInt(a.config.dataLabels.style.fontSize,10))}},{key:"rotateToFitLabel",value:function(t,e,i,a,n,r,s){var o=new k(this.ctx),l=o.getTextRects(i,e);if(l.width+this.w.config.stroke.width+5>r-a&&l.width<=s-n){var c=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,")"))}}},{key:"animateTreemap",value:function(t,e,i,a){var n=new y(this.ctx);n.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){n.animationCompleted(t)}))}}]),t}(),Yt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return c(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var n=new E(this.ctx),s=(e-t)/864e5;this.determineInterval(s),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,s<.00011574074074074075?a.globals.disableZoomIn=!0:s>5e4&&(a.globals.disableZoomOut=!0);var o=n.getTimeUnitsfromTimestamp(t,e,this.utc),l=a.globals.gridWidth/s,c=l/24,h=c/60,d=h/60,u=Math.floor(24*s),p=Math.floor(1440*s),f=Math.floor(86400*s),g=Math.floor(s),x=Math.floor(s/30),m=Math.floor(s/365),b={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},v={firstVal:b,currentMillisecond:b.minMillisecond,currentSecond:b.minSecond,currentMinute:b.minMinute,currentHour:b.minHour,currentMonthDate:b.minDate,currentDate:b.minDate,currentMonth:b.minMonth,currentYear:b.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:h,secondsWidthOnXAxis:d,numberOfSeconds:f,numberOfMinutes:p,numberOfHours:u,numberOfDays:g,numberOfMonths:x,numberOfYears:m};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=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?r(r({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?r(r({},e),{},{value:t.value}):"minute"===t.unit?r(r({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?r(r({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,n=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(n=a.config.xaxis.tickAmount),y.length>n&&(e=Math.floor(y.length/n));var s=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(s=!0);break;case"half_year":e=7,"year"===t.unit&&(s=!0);break;case"months":e=1,"year"===t.unit&&(s=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(s=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(s=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(s=!0);break;case"days":e=1,"month"===t.unit&&(s=!0);break;case"hours":"day"===t.unit&&(s=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||s)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),n=this.removeOverlappingTS(a);i.globals.timescaleLabels=n.slice(),new ct(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,n=t.daysWidthOnXAxis,r=t.numberOfYears,s=e.minYear,o=0,l=new E(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var h=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-h+1)*n,s=e.minYear+1,this.timeScaleArray.push({position:o,value:s,unit:c,year:s,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:s,unit:c,year:a,month:v.monthMod(i+1)});for(var d=s,u=o,p=0;p<r;p++)d++,u=l.determineDaysOfYear(d-1)*n+u,this.timeScaleArray.push({position:u,value:d,unit:c,year:d,month:1})}},{key:"generateMonthScale",value:function(t){var e=t.firstVal,i=t.currentMonthDate,a=t.currentMonth,n=t.currentYear,r=t.daysWidthOnXAxis,s=t.numberOfMonths,o=a,l=0,c=new E(this.ctx),h="month",d=0;if(e.minDate>1){l=(c.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=n+d,p=v.monthMod(o),f=o;0===o&&(h="year",f=u,p=1,u+=d+=1),this.timeScaleArray.push({position:l,value:f,unit:h,year:u,month:p})}else this.timeScaleArray.push({position:l,value:o,unit:h,year:n,month:v.monthMod(a)});for(var g=o+1,x=l,m=0,b=1;m<s;m++,b++){0===(g=v.monthMod(g))?(h="year",d+=1):h="month";var y=this._getYear(n,g,d);x=c.determineDaysOfMonths(g,y)*r+x;var w=0===g?y:g;this.timeScaleArray.push({position:x,value:w,unit:h,year:y,month:0===g?1:g}),g++}}},{key:"generateDayScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,n=t.hoursWidthOnXAxis,r=t.numberOfDays,s=new E(this.ctx),o="day",l=e.minDate+1,c=l,h=function(t,e,i){return t>s.determineDaysOfMonths(e+1,i)?(c=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*n,u=l,p=h(c,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",c=e.minDate,r++):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,p=h(c=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,p,0),month:v.monthMod(p),day:c});for(var f=d,g=0;g<r;g++){o="day",p=h(c+=1,p,this._getYear(a,p,0));var x=this._getYear(a,p,0);f=24*n+f;var m=1===c?v.monthMod(p):c;this.timeScaleArray.push({position:f,value:m,unit:o,year:x,month:v.monthMod(p),day:m})}}},{key:"generateHourScale",value:function(t){var e=t.firstVal,i=t.currentDate,a=t.currentMonth,n=t.currentYear,r=t.minutesWidthOnXAxis,s=t.numberOfHours,o=new E(this.ctx),l="hour",c=function(t,e){return t>o.determineDaysOfMonths(e+1,n)&&(g=1,e+=1),{month:e,date:g}},h=function(t,e){return t>o.determineDaysOfMonths(e+1,n)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,p=e.minHour+1,f=p+1;60===d&&(u=0,f=(p=e.minHour)+1);var g=i,x=h(g,a);this.timeScaleArray.push({position:u,value:p,unit:l,day:g,hour:f,year:n,month:v.monthMod(x)});for(var m=u,b=0;b<s;b++){l="hour",f>=24&&(f=0,l="day",x=c(g+=1,x).month,x=h(g,x));var y=this._getYear(n,x,0);m=0===f&&0===b?d*r:60*r+m;var w=0===f?g:f;this.timeScaleArray.push({position:m,value:w,unit:l,hour:f,day:g,year:y,month:v.monthMod(x)}),f++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,n=t.currentHour,r=t.currentDate,s=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,h=t.numberOfMinutes,d=a+1,u=r,p=s,f=o,g=n,x=(60-i-e/1e3)*c,m=0;m<h;m++)d>=60&&(d=0,24===(g+=1)&&(g=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:g,minute:d,day:u,year:this._getYear(f,p,0),month:v.monthMod(p)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,n=t.currentHour,r=t.currentDate,s=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,h=i+1,d=a,u=r,p=s,f=o,g=n,x=(1e3-e)/1e3*l,m=0;m<c;m++)h>=60&&(h=0,++d>=60&&(d=0,24==++g&&(g=0))),this.timeScaleArray.push({position:x,value:h,unit:"second",hour:g,minute:d,second:h,day:u,year:this._getYear(f,p,0),month:v.monthMod(p)}),x+=l,h++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),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),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),n=new E(e.ctx),r=e.createRawDateString(t,a),s=n.getDate(n.parseDate(r));if(e.utc||(s=n.getDate(n.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=n.formatDate(s,o)}else a=n.formatDate(s,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new k(this.ctx),n=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(n=!0,e=a.getTextRects(t[0].value).width);var r=0,s=t.map((function(s,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=n?e:a.getTextRects(t[r].value).width,c=t[r].position;return s.position>c+l+10?(r=o,s):null}return s}));return s.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),Xt=function(){function t(e,i){o(this,t),this.ctx=i,this.w=i.w,this.el=e}return c(t,[{key:"setupElements",value:function(){var t=this.w.globals,e=this.w.config,i=e.chart.type;t.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,t.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,t.isBarHorizontal=("bar"===e.chart.type||"rangeBar"===e.chart.type||"boxPlot"===e.chart.type)&&e.plotOptions.bar.horizontal,t.chartClass=".apexcharts"+t.chartID,t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),k.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(".concat(e.chart.offsetX,", ").concat(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.elAnnotations=t.dom.Paper.group().attr({class:"apexcharts-annotations"}),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,n=i.globals,r={series:[],i:[]},s={series:[],i:[]},o={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},h={series:[],i:[]},d={series:[],i:[]},u={series:[],i:[]},p={series:[],seriesRangeEnd:[],i:[]};n.series.map((function(e,f){var g=0;void 0!==t[f].type?("column"===t[f].type||"bar"===t[f].type?(n.series.length>1&&a.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),c.series.push(e),c.i.push(f),g++,i.globals.columnSeries=c.series):"area"===t[f].type?(s.series.push(e),s.i.push(f),g++):"line"===t[f].type?(r.series.push(e),r.i.push(f),g++):"scatter"===t[f].type?(o.series.push(e),o.i.push(f)):"bubble"===t[f].type?(l.series.push(e),l.i.push(f),g++):"candlestick"===t[f].type?(h.series.push(e),h.i.push(f),g++):"boxPlot"===t[f].type?(d.series.push(e),d.i.push(f),g++):"rangeBar"===t[f].type?(u.series.push(e),u.i.push(f),g++):"rangeArea"===t[f].type?(p.series.push(n.seriesRangeStart[f]),p.seriesRangeEnd.push(n.seriesRangeEnd[f]),p.i.push(f),g++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),g>1&&(n.comboCharts=!0)):(r.series.push(e),r.i.push(f))}));var f=new Rt(this.ctx,e),g=new Ct(this.ctx,e);this.ctx.pie=new Dt(this.ctx);var x=new Et(this.ctx);this.ctx.rangeBar=new It(this.ctx,e);var m=new Mt(this.ctx),b=[];if(n.comboCharts){if(s.series.length>0&&b.push(f.draw(s.series,"area",s.i)),c.series.length>0)if(i.config.chart.stacked){var v=new At(this.ctx,e);b.push(v.draw(c.series,c.i))}else this.ctx.bar=new St(this.ctx,e),b.push(this.ctx.bar.draw(c.series,c.i));if(p.series.length>0&&b.push(f.draw(p.series,"rangeArea",p.i,p.seriesRangeEnd)),r.series.length>0&&b.push(f.draw(r.series,"line",r.i)),h.series.length>0&&b.push(g.draw(h.series,h.i)),d.series.length>0&&b.push(g.draw(d.series,d.i)),u.series.length>0&&b.push(this.ctx.rangeBar.draw(u.series,u.i)),o.series.length>0){var y=new Rt(this.ctx,e,!0);b.push(y.draw(o.series,"scatter",o.i))}if(l.series.length>0){var w=new Rt(this.ctx,e,!0);b.push(w.draw(l.series,"bubble",l.i))}}else switch(a.chart.type){case"line":b=f.draw(n.series,"line");break;case"area":b=f.draw(n.series,"area");break;case"bar":a.chart.stacked?b=new At(this.ctx,e).draw(n.series):(this.ctx.bar=new St(this.ctx,e),b=this.ctx.bar.draw(n.series));break;case"candlestick":case"boxPlot":b=new Ct(this.ctx,e).draw(n.series);break;case"rangeBar":b=this.ctx.rangeBar.draw(n.series);break;case"rangeArea":b=f.draw(n.seriesRangeStart,"rangeArea",void 0,n.seriesRangeEnd);break;case"heatmap":b=new Lt(this.ctx,e).draw(n.series);break;case"treemap":b=new Ft(this.ctx,e).draw(n.series);break;case"pie":case"donut":case"polarArea":b=this.ctx.pie.draw(n.series);break;case"radialBar":b=x.draw(n.series);break;case"radar":b=m.draw(n.series);break;default:b=f.draw(n.series)}return b}},{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=v.getDimensions(this.el),a=e.chart.width.toString().split(/[0-9]+/g).pop();"%"===a?v.isNumber(i[0])&&(0===i[0].width&&(i=v.getDimensions(this.el.parentNode)),t.svgWidth=i[0]*parseInt(e.chart.width,10)/100):"px"!==a&&""!==a||(t.svgWidth=parseInt(e.chart.width,10));var n=e.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===n){var r=v.getDimensions(this.el.parentNode);t.svgHeight=r[1]*parseInt(e.chart.height,10)/100}else t.svgHeight=parseInt(e.chart.height,10);else t.axisCharts?t.svgHeight=t.svgWidth/1.61:t.svgHeight=t.svgWidth/1.2;if(t.svgWidth<0&&(t.svgWidth=0),t.svgHeight<0&&(t.svgHeight=0),k.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),"%"!==n){var s=e.chart.sparkline.enabled?0:t.axisCharts?e.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight=t.svgHeight+s+"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+")"};k.setAttrs(t.dom.elGraphical.node,i)}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||!t.config.legend.show||t.config.legend.floating||(i=new dt(this.ctx).legendHelpers.getLegendBBox().clwh+10);var n=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(n&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var s=v.getBoundingClientRect(n);r=s.bottom;var o=s.bottom-s.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=r+e.translateY+i+a;e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).indexOf("%")>0||(e.dom.elWrap.style.height=l+"px",k.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px")}},{key:"coreCalculations",value:function(){new q(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(t){return[]}))},i=new z,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var t=null,e=this.w;if(e.globals.axisCharts){if("back"===e.config.xaxis.crosshairs.position&&new et(this.ctx).drawXCrosshairs(),"back"===e.config.yaxis[0].crosshairs.position&&new et(this.ctx).drawYCrosshairs(),"datetime"===e.config.xaxis.type&&void 0===e.config.xaxis.labels.formatter){this.ctx.timeScale=new Yt(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}t=new S(this.ctx).getCalculatedRatios()}return t}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=e.config.chart.brush.targets||[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,a){i.forEach((function(t){var i=ApexCharts.getChartByID(t),n=v.clone(e.config.yaxis);if(e.config.chart.brush.autoScaleYaxis&&1===i.w.globals.series.length){var s=new U(i);n=s.autoScaleY(i,n,a)}var o=i.w.config.yaxis.reduce((function(t,e,a){return[].concat(x(t),[r(r({},i.w.config.yaxis[a]),{},{min:n[0].min,max:n[0].max})])}),[]);i.ctx.updateHelpers._updateOptions({xaxis:{min:a.xaxis.min,max:a.xaxis.max},yaxis:o},!1,!1,!1,!1)}))}}}}]),t}(),_t=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(o){var l=[e.ctx];n&&(l=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(l=[e.ctx],e.ctx.w.globals.isExecCalled=!1),l.forEach((function(n,c){var h=n.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&n.series.getPreviousPaths()),t&&"object"===s(t)&&(n.config=new N(t),t=S.extendArrayProps(n.config,t,h),n.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var d=0;d<h.globals.collapsedSeriesIndices.length;d++){var u=h.config.series[h.globals.collapsedSeriesIndices[d]];h.globals.collapsedSeries[d].data=h.globals.axisCharts?u.data.slice():u}for(var p=0;p<h.globals.ancillaryCollapsedSeriesIndices.length;p++){var f=h.config.series[h.globals.ancillaryCollapsedSeriesIndices[p]];h.globals.ancillaryCollapsedSeries[p].data=h.globals.axisCharts?f.data.slice():f}n.series.emptyCollapsedSeries(h.config.series)}return n.update(t).then((function(){c===l.length-1&&o(n)}))}))}))}},{key:"_updateSeries",value:function(t,e){var i=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(n){var r,s=i.w;return s.globals.shouldAnimate=e,s.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),s.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),s.config.series=r):s.config.series=t.slice(),a&&(s.globals.initialConfig.series=v.clone(s.config.series),s.globals.initialSeries=v.clone(s.config.series)),i.ctx.update().then((function(){n(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return r(r({},i.config.series[e]),{},{name:t.name?t.name:a&&a.name,color:t.color?t.color:a&&a.color,type:t.type?t.type:a&&a.type,data:t.data?t.data:a&&a.data})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,n=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(n," path[j='").concat(e,"'], ").concat(n," circle[j='").concat(e,"'], ").concat(n," rect[j='").concat(e,"']")).members[0]:void 0===e&&(a=i.globals.dom.Paper.select("".concat(n," path[j='").concat(t,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new k(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new R(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,n=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(n=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max,i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==n[a]?function(t){void 0!==n[t]&&(i.config.yaxis[t].min=n[t].min,i.config.yaxis[t].max=n[t].max)}(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();Nt="undefined"!=typeof window?window:void 0,zt=function(t,e){var i=(void 0!==this?this:t).SVG=function(t){if(i.supported)return t=new i.Doc(t),i.parser.draw||i.prepare(),t};if(i.ns="http://www.w3.org/2000/svg",i.xmlns="http://www.w3.org/2000/xmlns/",i.xlink="http://www.w3.org/1999/xlink",i.svgjs="http://svgjs.dev",i.supported=!0,!i.supported)return!1;i.did=1e3,i.eid=function(t){return"Svgjs"+d(t)+i.did++},i.create=function(t){var i=e.createElementNS(this.ns,t);return i.setAttribute("id",this.eid(t)),i},i.extend=function(){var t,e;e=(t=[].slice.call(arguments)).pop();for(var a=t.length-1;a>=0;a--)if(t[a])for(var n in e)t[a].prototype[n]=e[n];i.Set&&i.Set.inherit&&i.Set.inherit()},i.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,i.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&i.extend(e,t.extend),t.construct&&i.extend(t.parent||i.Container,t.construct),e},i.adopt=function(e){return e?e.instance?e.instance:((a="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new i.Nested:new i.Doc:"linearGradient"==e.nodeName?new i.Gradient("linear"):"radialGradient"==e.nodeName?new i.Gradient("radial"):i[d(e.nodeName)]?new(i[d(e.nodeName)]):new i.Element(e)).type=e.nodeName,a.node=e,e.instance=a,a instanceof i.Doc&&a.namespace().defs(),a.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),a):null;var a},i.prepare=function(){var t=e.getElementsByTagName("body")[0],a=(t?new i.Doc(t):i.adopt(e.documentElement).nested()).size(2,0);i.parser={body:t||e.documentElement,draw:a.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:a.polyline().node,path:a.path().node,native:i.create("svg")}},i.parser={native:i.create("svg")},e.addEventListener("DOMContentLoaded",(function(){i.parser.draw||i.prepare()}),!1),i.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},i.utils={map:function(t,e){for(var i=t.length,a=[],n=0;n<i;n++)a.push(e(t[n]));return a},filter:function(t,e){for(var i=t.length,a=[],n=0;n<i;n++)e(t[n])&&a.push(t[n]);return a},filterSVGElements:function(e){return this.filter(e,(function(e){return e instanceof t.SVGElement}))}},i.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},i.Color=function(t){var e,a;this.r=0,this.g=0,this.b=0,t&&("string"==typeof t?i.regex.isRgb.test(t)?(e=i.regex.rgb.exec(t.replace(i.regex.whitespace,"")),this.r=parseInt(e[1]),this.g=parseInt(e[2]),this.b=parseInt(e[3])):i.regex.isHex.test(t)&&(e=i.regex.hex.exec(4==(a=t).length?["#",a.substring(1,2),a.substring(1,2),a.substring(2,3),a.substring(2,3),a.substring(3,4),a.substring(3,4)].join(""):a),this.r=parseInt(e[1],16),this.g=parseInt(e[2],16),this.b=parseInt(e[3],16)):"object"===s(t)&&(this.r=t.r,this.g=t.g,this.b=t.b))},i.extend(i.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+u(this.r)+u(this.g)+u(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11},morph:function(t){return this.destination=new i.Color(t),this},at:function(t){return this.destination?(t=t<0?0:t>1?1:t,new i.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}}),i.Color.test=function(t){return t+="",i.regex.isHex.test(t)||i.regex.isRgb.test(t)},i.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},i.Color.isColor=function(t){return i.Color.isRgb(t)||i.Color.test(t)},i.Array=function(t,e){0==(t=(t||[]).valueOf()).length&&e&&(t=e.valueOf()),this.value=this.parse(t)},i.extend(i.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(t){return t=t.valueOf(),Array.isArray(t)?t:this.split(t)}}),i.PointArray=function(t,e){i.Array.call(this,t,e||[[0,0]])},i.PointArray.prototype=new i.Array,i.PointArray.prototype.constructor=i.PointArray;for(var a={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]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]}},n="mlhvqtcsaz".split(""),r=0,o=n.length;r<o;++r)a[n[r]]=function(t){return function(e,i,n){if("H"==t)e[0]=e[0]+i.x;else if("V"==t)e[0]=e[0]+i.y;else if("A"==t)e[5]=e[5]+i.x,e[6]=e[6]+i.y;else for(var r=0,s=e.length;r<s;++r)e[r]=e[r]+(r%2?i.y:i.x);if(a&&"function"==typeof a[t])return a[t](e,i,n)}}(n[r].toUpperCase());i.PathArray=function(t,e){i.Array.call(this,t,e||[["M",0,0]])},i.PathArray.prototype=new i.Array,i.PathArray.prototype.constructor=i.PathArray,i.extend(i.PathArray,{toString:function(){return function(t){for(var e=0,i=t.length,a="";e<i;e++)a+=t[e][0],null!=t[e][1]&&(a+=t[e][1],null!=t[e][2]&&(a+=" ",a+=t[e][2],null!=t[e][3]&&(a+=" ",a+=t[e][3],a+=" ",a+=t[e][4],null!=t[e][5]&&(a+=" ",a+=t[e][5],a+=" ",a+=t[e][6],null!=t[e][7]&&(a+=" ",a+=t[e][7])))));return a+" "}(this.value)},move:function(t,e){var i=this.bbox();return i.x,i.y,this},at:function(t){if(!this.destination)return this;for(var e=this.value,a=this.destination.value,n=[],r=new i.PathArray,s=0,o=e.length;s<o;s++){n[s]=[e[s][0]];for(var l=1,c=e[s].length;l<c;l++)n[s][l]=e[s][l]+(a[s][l]-e[s][l])*t;"A"===n[s][0]&&(n[s][4]=+(0!=n[s][4]),n[s][5]=+(0!=n[s][5]))}return r.value=n,r},parse:function(t){if(t instanceof i.PathArray)return t.valueOf();var e,n={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};t="string"==typeof t?t.replace(i.regex.numbersWithDots,c).replace(i.regex.pathLetters," $& ").replace(i.regex.hyphen,"$1 -").trim().split(i.regex.delimiter):t.reduce((function(t,e){return[].concat.call(t,e)}),[]);var r=[],s=new i.Point,o=new i.Point,l=0,h=t.length;do{i.regex.isPathLetter.test(t[l])?(e=t[l],++l):"M"==e?e="L":"m"==e&&(e="l"),r.push(a[e].call(null,t.slice(l,l+=n[e.toUpperCase()]).map(parseFloat),s,o))}while(h>l);return r},bbox:function(){return i.parser.draw||i.prepare(),i.parser.path.setAttribute("d",this.toString()),i.parser.path.getBBox()}}),i.Number=i.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(i.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof i.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 i.Number(t),new i.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new i.Number(t),new i.Number(this-t,this.unit||t.unit)},times:function(t){return t=new i.Number(t),new i.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new i.Number(t),new i.Number(this/t,this.unit||t.unit)},to:function(t){var e=new i.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new i.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new i.Number(this.destination).minus(this).times(t).plus(this):this}}}),i.Element=i.invent({create:function(t){this._stroke=i.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 a=p(this,t,e);return this.width(new i.Number(a.width)).height(new i.Number(a.height))},clone:function(t){this.writeDataToDom();var e=x(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)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(i.regex.delimiter)},hasClass:function(t){return-1!=this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!=t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)},reference:function(t){return i.get(this.attr(t))},parent:function(e){var a=this;if(!a.node.parentNode)return null;if(a=i.adopt(a.node.parentNode),!e)return a;for(;a&&a.node instanceof t.SVGElement;){if("string"==typeof e?a.matches(e):a instanceof e)return a;if(!a.node.parentNode||"#document"==a.node.parentNode.nodeName)return null;a=i.adopt(a.node.parentNode)}},doc:function(){return this instanceof i.Doc?this:this.parent(i.Doc)},parents:function(t){var e=[],i=this;do{if(!(i=i.parent(t))||!i.node)break;e.push(i)}while(i.parent);return e},matches:function(t){return function(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)}(this.node,t)},native:function(){return this.node},svg:function(t){var a=e.createElement("svg");if(!(t&&this instanceof i.Parent))return a.appendChild(t=e.createElement("svg")),this.writeDataToDom(),t.appendChild(this.node.cloneNode(!0)),a.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");a.innerHTML="<svg>"+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var n=0,r=a.firstChild.childNodes.length;n<r;n++)this.node.appendChild(a.firstChild.firstChild);return this},writeDataToDom:function(){return(this.each||this.lines)&&(this.each?this:this.lines()).each((function(){this.writeDataToDom()})),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this},setData:function(t){return this.dom=t,this},is:function(t){return function(t,e){return t instanceof e}(this,t)}}}),i.easing={"-":function(t){return t},"<>":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)}},i.morph=function(t){return function(e,a){return new i.MorphObj(e,a).at(t)}},i.Situation=i.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new i.Number(t.duration).valueOf(),this.delay=new i.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={}}}),i.FX=i.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,a){"object"===s(t)&&(e=t.ease,a=t.delay,t=t.duration);var n=new i.Situation({duration:t||1e3,delay:a||0,ease:i.easing[e||"-"]||e});return this.queue(n),this},target:function(t){return t&&t instanceof i.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 i.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 i.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var t,e=this.situation;if(e.init)return this;for(var a in e.animations){t=this.target()[a](),Array.isArray(t)||(t=[t]),Array.isArray(e.animations[a])||(e.animations[a]=[e.animations[a]]);for(var n=t.length;n--;)e.animations[a][n]instanceof i.Number&&(t[n]=new i.Number(t[n])),e.animations[a][n]=t[n].morph(e.animations[a][n])}for(var a in e.attrs)e.attrs[a]=new i.MorphObj(this.target().attr(a),e.attrs[a]);for(var a in e.styles)e.styles[a]=new i.MorphObj(this.target().style(a),e.styles[a]);return e.initialTransformation=this.target().matrixify(),e.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()},after:function(t){var e=this.last();return this.target().on("finished.fx",(function i(a){a.detail.situation==e&&(t.call(this,e),this.off("finished.fx",i))})),this._callStart()},during:function(t){var e=this.last(),a=function(a){a.detail.situation==e&&t.call(this,a.detail.pos,i.morph(a.detail.pos),a.detail.eased,e)};return this.target().off("during.fx",a).on("during.fx",a),this.after((function(){this.off("during.fx",a)})),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()},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){var e,i,a;t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(e=Math.max(this.absPos,0),i=Math.floor(e),!0===this.situation.loops||i<this.situation.loops?(this.pos=e-i,a=this.situation.loop,this.situation.loop=i):(this.absPos=this.situation.loops,this.pos=1,a=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=Boolean((this.situation.loop-a)%2))):(this.absPos=Math.min(this.absPos,1),this.pos=this.absPos),this.pos<0&&(this.pos=0),this.situation.reversed&&(this.pos=1-this.pos);var n=this.situation.ease(this.pos);for(var r in this.situation.once)r>this.lastPos&&r<=n&&(this.situation.once[r].call(this.target(),this.pos,n),delete this.situation.once[r]);return this.active&&this.target().fire("during",{pos:this.pos,eased:n,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=n,this):this},eachAt:function(){var t,e=this,a=this.target(),n=this.situation;for(var r in n.animations)t=[].concat(n.animations[r]).map((function(t){return"string"!=typeof t&&t.at?t.at(n.ease(e.pos),e.pos):t})),a[r].apply(a,t);for(var r in n.attrs)t=[r].concat(n.attrs[r]).map((function(t){return"string"!=typeof t&&t.at?t.at(n.ease(e.pos),e.pos):t})),a.attr.apply(a,t);for(var r in n.styles)t=[r].concat(n.styles[r]).map((function(t){return"string"!=typeof t&&t.at?t.at(n.ease(e.pos),e.pos):t})),a.style.apply(a,t);if(n.transforms.length){t=n.initialTransformation,r=0;for(var s=n.transforms.length;r<s;r++){var o=n.transforms[r];o instanceof i.Matrix?t=o.relative?t.multiply((new i.Matrix).morph(o).at(n.ease(this.pos))):t.morph(o).at(n.ease(this.pos)):(o.relative||o.undo(t.extract()),t=t.multiply(o.at(n.ease(this.pos))))}a.matrix(t)}return this},once:function(t,e,i){var a=this.last();return i||(t=a.ease(t)),a.once[t]=e,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:i.Element,construct:{animate:function(t,e,a){return(this.fx||(this.fx=new i.FX(this))).animate(t,e,a)},delay:function(t){return(this.fx||(this.fx=new i.FX(this))).delay(t)},stop:function(t,e){return this.fx&&this.fx.stop(t,e),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),i.MorphObj=i.invent({create:function(t,e){return i.Color.isColor(e)?new i.Color(t).morph(e):i.regex.delimiter.test(t)?i.regex.pathLetters.test(t)?new i.PathArray(t).morph(e):new i.Array(t).morph(e):i.regex.numberAndUnit.test(e)?new i.Number(t).morph(e):(this.value=t,void(this.destination=e))},extend:{at:function(t,e){return e<1?this.value:this.destination},valueOf:function(){return this.value}}}),i.extend(i.FX,{attr:function(t,e,i){if("object"===s(t))for(var a in t)this.attr(a,t[a]);else this.add(t,e,"attrs");return this},plot:function(t,e,i,a){return 4==arguments.length?this.plot([t,e,i,a]):this.add("plot",new(this.target().morphArray)(t))}}),i.Box=i.invent({create:function(t,e,a,n){if(!("object"!==s(t)||t instanceof i.Element))return i.Box.call(this,null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height);4==arguments.length&&(this.x=t,this.y=e,this.width=a,this.height=n),m(this)}}),i.BBox=i.invent({create:function(t){if(i.Box.apply(this,[].slice.call(arguments)),t instanceof i.Element){var a;try{if(!e.documentElement.contains){for(var n=t.node;n.parentNode;)n=n.parentNode;if(n!=e)throw new Error("Element not in the dom")}a=t.node.getBBox()}catch(e){if(t instanceof i.Shape){i.parser.draw||i.prepare();var r=t.clone(i.parser.draw.instance).show();r&&r.node&&"function"==typeof r.node.getBBox&&(a=r.node.getBBox()),r&&"function"==typeof r.remove&&r.remove()}else a={x:t.node.clientLeft,y:t.node.clientTop,width:t.node.clientWidth,height:t.node.clientHeight}}i.Box.call(this,a)}},inherit:i.Box,parent:i.Element,construct:{bbox:function(){return new i.BBox(this)}}}),i.BBox.prototype.constructor=i.BBox,i.Matrix=i.invent({create:function(t){var e=g([1,0,0,1,0,0]);t=null===t?e:t instanceof i.Element?t.matrixify():"string"==typeof t?g(t.split(i.regex.delimiter).map(parseFloat)):6==arguments.length?g([].slice.call(arguments)):Array.isArray(t)?g(t):t&&"object"===s(t)?t:e;for(var a=v.length-1;a>=0;--a)this[v[a]]=null!=t[v[a]]?t[v[a]]:e[v[a]]},extend:{extract:function(){var t=f(this,0,1);f(this,1,0);var e=180/Math.PI*Math.atan2(t.y,t.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(e*Math.PI/180)+this.f*Math.sin(e*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(e*Math.PI/180)+this.e*Math.sin(-e*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new i.Matrix(this)}},clone:function(){return new i.Matrix(this)},morph:function(t){return this.destination=new i.Matrix(t),this},multiply:function(t){return new i.Matrix(this.native().multiply(function(t){return t instanceof i.Matrix||(t=new i.Matrix(t)),t}(t).native()))},inverse:function(){return new i.Matrix(this.native().inverse())},translate:function(t,e){return new i.Matrix(this.native().translate(t||0,e||0))},native:function(){for(var t=i.parser.native.createSVGMatrix(),e=v.length-1;e>=0;e--)t[v[e]]=this[v[e]];return t},toString:function(){return"matrix("+b(this.a)+","+b(this.b)+","+b(this.c)+","+b(this.d)+","+b(this.e)+","+b(this.f)+")"}},parent:i.Element,construct:{ctm:function(){return new i.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof i.Nested){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new i.Matrix(e)}return new i.Matrix(this.node.getScreenCTM())}}}),i.Point=i.invent({create:function(t,e){var i;i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===s(t)?{x:t.x,y:t.y}:null!=t?{x:t,y:null!=e?e:t}:{x:0,y:0},this.x=i.x,this.y=i.y},extend:{clone:function(){return new i.Point(this)},morph:function(t,e){return this.destination=new i.Point(t,e),this}}}),i.extend(i.Element,{point:function(t,e){return new i.Point(t,e).transform(this.screenCTM().inverse())}}),i.extend(i.Element,{attr:function(t,e,a){if(null==t){for(t={},a=(e=this.node.attributes).length-1;a>=0;a--)t[e[a].nodeName]=i.regex.isNumber.test(e[a].nodeValue)?parseFloat(e[a].nodeValue):e[a].nodeValue;return t}if("object"===s(t))for(var n in t)this.attr(n,t[n]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?i.defaults.attrs[t]:i.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||(i.regex.isImage.test(e)&&(e=this.doc().defs().image(e,0,0)),e instanceof i.Image&&(e=this.doc().defs().pattern(0,0,(function(){this.add(e)})))),"number"==typeof e?e=new i.Number(e):i.Color.isColor(e)?e=new i.Color(e):Array.isArray(e)&&(e=new i.Array(e)),"leading"==t?this.leading&&this.leading(e):"string"==typeof a?this.node.setAttributeNS(a,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!=t&&"x"!=t||this.rebuild(t,e)}return this}}),i.extend(i.Element,{transform:function(t,e){var a;return"object"!==s(t)?(a=new i.Matrix(this).extract(),"string"==typeof t?a[t]:a):(a=new i.Matrix(this),e=!!e||!!t.relative,null!=t.a&&(a=e?a.multiply(new i.Matrix(t)):new i.Matrix(t)),this.attr("transform",a))}}),i.extend(i.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(i.regex.transforms).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(i.regex.delimiter).map((function(t){return parseFloat(t)}))]})).reduce((function(t,e){return"matrix"==e[0]?t.multiply(g(e[1])):t[e[0]].apply(t,e[1])}),new i.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())}}),i.Transformation=i.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<a;++i)this[this.arguments[i]]=t[i];else if(t&&"object"===s(t))for(i=0,a=this.arguments.length;i<a;++i)this[this.arguments[i]]=t[this.arguments[i]];this.inversed=!1,!0===e&&(this.inversed=!0)}}),i.Translate=i.invent({parent:i.Matrix,inherit:i.Transformation,create:function(t,e){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),i.extend(i.Element,{style:function(t,e){if(0==arguments.length)return this.node.style.cssText||"";if(arguments.length<2)if("object"===s(t))for(var a in t)this.style(a,t[a]);else{if(!i.regex.isCss.test(t))return this.node.style[h(t)];for(t=t.split(/\s*;\s*/).filter((function(t){return!!t})).map((function(t){return t.split(/\s*:\s*/)}));e=t.pop();)this.style(e[0],e[1])}else this.node.style[h(t)]=null===e||i.regex.isBlank.test(e)?"":e;return this}}),i.Parent=i.invent({create:function(t){this.constructor.call(this,t)},inherit:i.Element,extend:{children:function(){return i.utils.map(i.utils.filterSVGElements(this.node.childNodes),(function(t){return i.adopt(t)}))},add:function(t,e){return null==e?this.node.appendChild(t.node):t.node!=this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this},put:function(t,e){return this.add(t,e),t},has:function(t){return this.index(t)>=0},index:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)},get:function(t){return i.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){for(var a=this.children(),n=0,r=a.length;n<r;n++)a[n]instanceof i.Element&&t.apply(a[n],[n,a]),e&&a[n]instanceof i.Container&&a[n].each(t,e);return this},removeElement:function(t){return this.node.removeChild(t.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this},defs:function(){return this.doc().defs()}}}),i.extend(i.Parent,{ungroup:function(t,e){return 0===e||this instanceof i.Defs||this.node==i.parser.draw||(t=t||(this instanceof i.Doc?this:this.parent(i.Parent)),e=e||1/0,this.each((function(){return this instanceof i.Defs?this:this instanceof i.Parent?this.ungroup(t,e-1):this.toParent(t)})),this.node.firstChild||this.remove()),this},flatten:function(t,e){return this.ungroup(t,e)}}),i.Container=i.invent({create:function(t){this.constructor.call(this,t)},inherit:i.Parent}),i.ViewBox=i.invent({parent:i.Container,construct:{}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach((function(t){i.Element.prototype[t]=function(e){return i.on(this.node,t,e),this}})),i.listeners=[],i.handlerMap=[],i.listenerId=0,i.on=function(t,e,a,n,r){var s=a.bind(n||t.instance||t),o=(i.handlerMap.indexOf(t)+1||i.handlerMap.push(t))-1,l=e.split(".")[0],c=e.split(".")[1]||"*";i.listeners[o]=i.listeners[o]||{},i.listeners[o][l]=i.listeners[o][l]||{},i.listeners[o][l][c]=i.listeners[o][l][c]||{},a._svgjsListenerId||(a._svgjsListenerId=++i.listenerId),i.listeners[o][l][c][a._svgjsListenerId]=s,t.addEventListener(l,s,r||{passive:!0})},i.off=function(t,e,a){var n=i.handlerMap.indexOf(t),r=e&&e.split(".")[0],s=e&&e.split(".")[1],o="";if(-1!=n)if(a){if("function"==typeof a&&(a=a._svgjsListenerId),!a)return;i.listeners[n][r]&&i.listeners[n][r][s||"*"]&&(t.removeEventListener(r,i.listeners[n][r][s||"*"][a],!1),delete i.listeners[n][r][s||"*"][a])}else if(s&&r){if(i.listeners[n][r]&&i.listeners[n][r][s]){for(var l in i.listeners[n][r][s])i.off(t,[r,s].join("."),l);delete i.listeners[n][r][s]}}else if(s)for(var c in i.listeners[n])for(var o in i.listeners[n][c])s===o&&i.off(t,[c,s].join("."));else if(r){if(i.listeners[n][r]){for(var o in i.listeners[n][r])i.off(t,[r,o].join("."));delete i.listeners[n][r]}}else{for(var c in i.listeners[n])i.off(t,c);delete i.listeners[n],delete i.handlerMap[n]}},i.extend(i.Element,{on:function(t,e,a,n){return i.on(this.node,t,e,a,n),this},off:function(t,e){return i.off(this.node,t,e),this},fire:function(e,a){return e instanceof t.Event?this.node.dispatchEvent(e):this.node.dispatchEvent(e=new i.CustomEvent(e,{detail:a,cancelable:!0})),this._event=e,this},event:function(){return this._event}}),i.Defs=i.invent({create:"defs",inherit:i.Container}),i.G=i.invent({create:"g",inherit:i.Container,extend:{x:function(t){return null==t?this.transform("x"):this.transform({x:t-this.x()},!0)}},construct:{group:function(){return this.put(new i.G)}}}),i.Doc=i.invent({create:function(t){t&&("svg"==(t="string"==typeof t?e.getElementById(t):t).nodeName?this.constructor.call(this,t):(this.constructor.call(this,i.create("svg")),t.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:i.Container,extend:{namespace:function(){return this.attr({xmlns:i.ns,version:"1.1"}).attr("xmlns:xlink",i.xlink,i.xmlns).attr("xmlns:svgjs",i.svgjs,i.xmlns)},defs:function(){var t;return this._defs||((t=this.node.getElementsByTagName("defs")[0])?this._defs=i.adopt(t):this._defs=new i.Defs,this.node.appendChild(this._defs.node)),this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},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,i.parser.draw&&!i.parser.draw.parentNode&&this.node.appendChild(i.parser.draw),this},clone:function(t){this.writeDataToDom();var e=this.node,i=x(e.cloneNode(!0));return t?(t.node||t).appendChild(i.node):e.parentNode.insertBefore(i.node,e.nextSibling),i}}}),i.extend(i.Element,{}),i.Gradient=i.invent({create:function(t){this.constructor.call(this,i.create(t+"Gradient")),this.type=t},inherit:i.Container,extend:{at:function(t,e,a){return this.put(new i.Stop).update(t,e,a)},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,a){return"transform"==t&&(t="gradientTransform"),i.Container.prototype.attr.call(this,t,e,a)}},construct:{gradient:function(t,e){return this.defs().gradient(t,e)}}}),i.extend(i.Gradient,i.FX,{from:function(t,e){return"radial"==(this._target||this).type?this.attr({fx:new i.Number(t),fy:new i.Number(e)}):this.attr({x1:new i.Number(t),y1:new i.Number(e)})},to:function(t,e){return"radial"==(this._target||this).type?this.attr({cx:new i.Number(t),cy:new i.Number(e)}):this.attr({x2:new i.Number(t),y2:new i.Number(e)})}}),i.extend(i.Defs,{gradient:function(t,e){return this.put(new i.Gradient(t)).update(e)}}),i.Stop=i.invent({create:"stop",inherit:i.Element,extend:{update:function(t){return("number"==typeof t||t instanceof i.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 i.Number(t.offset)),this}}}),i.Pattern=i.invent({create:"pattern",inherit:i.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,a){return"transform"==t&&(t="patternTransform"),i.Container.prototype.attr.call(this,t,e,a)}},construct:{pattern:function(t,e,i){return this.defs().pattern(t,e,i)}}}),i.extend(i.Defs,{pattern:function(t,e,a){return this.put(new i.Pattern).update(a).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}}),i.Shape=i.invent({create:function(t){this.constructor.call(this,t)},inherit:i.Element}),i.Symbol=i.invent({create:"symbol",inherit:i.Container,construct:{symbol:function(){return this.put(new i.Symbol)}}}),i.Use=i.invent({create:"use",inherit:i.Shape,extend:{element:function(t,e){return this.attr("href",(e||"")+"#"+t,i.xlink)}},construct:{use:function(t,e){return this.put(new i.Use).element(t,e)}}}),i.Rect=i.invent({create:"rect",inherit:i.Shape,construct:{rect:function(t,e){return this.put(new i.Rect).size(t,e)}}}),i.Circle=i.invent({create:"circle",inherit:i.Shape,construct:{circle:function(t){return this.put(new i.Circle).rx(new i.Number(t).divide(2)).move(0,0)}}}),i.extend(i.Circle,i.FX,{rx:function(t){return this.attr("r",t)},ry:function(t){return this.rx(t)}}),i.Ellipse=i.invent({create:"ellipse",inherit:i.Shape,construct:{ellipse:function(t,e){return this.put(new i.Ellipse).size(t,e).move(0,0)}}}),i.extend(i.Ellipse,i.Rect,i.FX,{rx:function(t){return this.attr("rx",t)},ry:function(t){return this.attr("ry",t)}}),i.extend(i.Circle,i.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 i.Number(t).divide(2))},height:function(t){return null==t?2*this.ry():this.ry(new i.Number(t).divide(2))},size:function(t,e){var a=p(this,t,e);return this.rx(new i.Number(a.width).divide(2)).ry(new i.Number(a.height).divide(2))}}),i.Line=i.invent({create:"line",inherit:i.Shape,extend:{array:function(){return new i.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(t,e,a,n){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:a,y2:n}:new i.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=p(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}},construct:{line:function(t,e,a,n){return i.Line.prototype.plot.apply(this.put(new i.Line),null!=t?[t,e,a,n]:[0,0,0,0])}}}),i.Polyline=i.invent({create:"polyline",inherit:i.Shape,construct:{polyline:function(t){return this.put(new i.Polyline).plot(t||new i.PointArray)}}}),i.Polygon=i.invent({create:"polygon",inherit:i.Shape,construct:{polygon:function(t){return this.put(new i.Polygon).plot(t||new i.PointArray)}}}),i.extend(i.Polyline,i.Polygon,{array:function(){return this._array||(this._array=new i.PointArray(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new i.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=p(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}}),i.extend(i.Line,i.Polyline,i.Polygon,{morphArray:i.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)}}),i.Path=i.invent({create:"path",inherit:i.Shape,extend:{morphArray:i.PathArray,array:function(){return this._array||(this._array=new i.PathArray(this.attr("d")))},plot:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new i.PathArray(t))},clear:function(){return delete this._array,this}},construct:{path:function(t){return this.put(new i.Path).plot(t||new i.PathArray)}}}),i.Image=i.invent({create:"image",inherit:i.Shape,extend:{load:function(e){if(!e)return this;var a=this,n=new t.Image;return i.on(n,"load",(function(){i.off(n);var t=a.parent(i.Pattern);null!==t&&(0==a.width()&&0==a.height()&&a.size(n.width,n.height),t&&0==t.width()&&0==t.height()&&t.size(a.width(),a.height()),"function"==typeof a._loaded&&a._loaded.call(a,{width:n.width,height:n.height,ratio:n.width/n.height,url:e}))})),i.on(n,"error",(function(t){i.off(n),"function"==typeof a._error&&a._error.call(a,t)})),this.attr("href",n.src=this.src=e,i.xlink)},loaded:function(t){return this._loaded=t,this},error:function(t){return this._error=t,this}},construct:{image:function(t,e,a){return this.put(new i.Image).load(t).size(e||0,a||e||0)}}}),i.Text=i.invent({create:function(){this.constructor.call(this,i.create("text")),this.dom.leading=new i.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",i.defaults.attrs["font-family"])},inherit:i.Shape,extend:{x:function(t){return null==t?this.attr("x"):this.attr("x",t)},text:function(t){if(void 0===t){t="";for(var e=this.node.childNodes,a=0,n=e.length;a<n;++a)0!=a&&3!=e[a].nodeType&&1==i.adopt(e[a]).dom.newLined&&(t+="\n"),t+=e[a].textContent;return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else{a=0;for(var r=(t=t.split("\n")).length;a<r;a++)this.tspan(t[a]).newLine()}return this.build(!1).rebuild()},size:function(t){return this.attr("font-size",t).rebuild()},leading:function(t){return null==t?this.dom.leading:(this.dom.leading=new i.Number(t),this.rebuild())},lines:function(){var t=(this.textPath&&this.textPath()||this).node,e=i.utils.map(i.utils.filterSVGElements(t.childNodes),(function(t){return i.adopt(t)}));return new i.Set(e)},rebuild:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,a=0,n=this.dom.leading*new i.Number(this.attr("font-size"));this.lines().each((function(){this.dom.newLined&&(e.textPath()||this.attr("x",e.attr("x")),"\n"==this.text()?a+=n:(this.attr("dy",n+a),a=0))})),this.fire("rebuild")}return this},build:function(t){return this._build=!!t,this},setData:function(t){return this.dom=t,this.dom.leading=new i.Number(t.leading||1.3),this}},construct:{text:function(t){return this.put(new i.Text).text(t)},plain:function(t){return this.put(new i.Text).plain(t)}}}),i.Tspan=i.invent({create:"tspan",inherit:i.Shape,extend:{text:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)},dx:function(t){return this.attr("dx",t)},dy:function(t){return this.attr("dy",t)},newLine:function(){var t=this.parent(i.Text);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}}),i.extend(i.Text,i.Tspan,{plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(e.createTextNode(t)),this},tspan:function(t){var e=(this.textPath&&this.textPath()||this).node,a=new i.Tspan;return!1===this._build&&this.clear(),e.appendChild(a.node),a.text(t)},clear:function(){for(var t=(this.textPath&&this.textPath()||this).node;t.hasChildNodes();)t.removeChild(t.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),i.TextPath=i.invent({create:"textPath",inherit:i.Parent,parent:i.Text,construct:{morphArray:i.PathArray,array:function(){var t=this.track();return t?t.array():null},plot:function(t){var e=this.track(),i=null;return e&&(i=e.plot(t)),null==t?i:this},track:function(){var t=this.textPath();if(t)return t.reference("href")},textPath:function(){if(this.node.firstChild&&"textPath"==this.node.firstChild.nodeName)return i.adopt(this.node.firstChild)}}}),i.Nested=i.invent({create:function(){this.constructor.call(this,i.create("svg")),this.style("overflow","visible")},inherit:i.Container,construct:{nested:function(){return this.put(new i.Nested)}}});var l={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"==e?t:t+"-"+e}};function c(t,e,a,n){return a+n.replace(i.regex.dots," .")}function h(t){return t.toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}function d(t){return t.charAt(0).toUpperCase()+t.slice(1)}function u(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function p(t,e,i){if(null==e||null==i){var a=t.bbox();null==e?e=a.width/a.height*i:null==i&&(i=a.height/a.width*e)}return{width:e,height:i}}function f(t,e,i){return{x:e*t.a+i*t.c+0,y:e*t.b+i*t.d+0}}function g(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}function x(e){for(var a=e.childNodes.length-1;a>=0;a--)e.childNodes[a]instanceof t.SVGElement&&x(e.childNodes[a]);return i.adopt(e).id(i.eid(e.nodeName))}function m(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 b(t){return Math.abs(t)>1e-37?t:0}["fill","stroke"].forEach((function(t){var e={};e[t]=function(e){if(void 0===e)return this;if("string"==typeof e||i.Color.isRgb(e)||e&&"function"==typeof e.fill)this.attr(t,e);else for(var a=l[t].length-1;a>=0;a--)null!=e[l[t][a]]&&this.attr(l.prefix(t,l[t][a]),e[l[t][a]]);return this},i.extend(i.Element,i.FX,e)})),i.extend(i.Element,i.FX,{translate:function(t,e){return this.transform({x:t,y:e})},matrix:function(t){return this.attr("transform",new i.Matrix(6==arguments.length?[].slice.call(arguments):t))},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new i.Number(t).plus(this instanceof i.FX?0:this.x()),!0)},dy:function(t){return this.y(new i.Number(t).plus(this instanceof i.FX?0:this.y()),!0)}}),i.extend(i.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(t){return this.node.getPointAtLength(t)}}),i.Set=i.invent({create:function(t){Array.isArray(t)?this.members=t:this.clear()},extend:{add:function(){for(var t=[].slice.call(arguments),e=0,i=t.length;e<i;e++)this.members.push(t[e]);return this},remove:function(t){var e=this.index(t);return e>-1&&this.members.splice(e,1),this},each:function(t){for(var e=0,i=this.members.length;e<i;e++)t.apply(this.members[e],[e,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(t){return this.index(t)>=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}},construct:{set:function(t){return new i.Set(t)}}}),i.FX.Set=i.invent({create:function(t){this.set=t}}),i.Set.inherit=function(){var t=[];for(var e in i.Shape.prototype)"function"==typeof i.Shape.prototype[e]&&"function"!=typeof i.Set.prototype[e]&&t.push(e);for(var e in t.forEach((function(t){i.Set.prototype[t]=function(){for(var e=0,a=this.members.length;e<a;e++)this.members[e]&&"function"==typeof this.members[e][t]&&this.members[e][t].apply(this.members[e],arguments);return"animate"==t?this.fx||(this.fx=new i.FX.Set(this)):this}})),t=[],i.FX.prototype)"function"==typeof i.FX.prototype[e]&&"function"!=typeof i.FX.Set.prototype[e]&&t.push(e);t.forEach((function(t){i.FX.Set.prototype[t]=function(){for(var e=0,i=this.set.members.length;e<i;e++)this.set.members[e].fx[t].apply(this.set.members[e].fx,arguments);return this}}))},i.extend(i.Element,{}),i.extend(i.Element,{remember:function(t,e){if("object"===s(arguments[0]))for(var i in t)this.remember(i,t[i]);else{if(1==arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory||(this._memory={})}}),i.get=function(t){var a=e.getElementById(function(t){var e=(t||"").toString().match(i.regex.reference);if(e)return e[1]}(t)||t);return i.adopt(a)},i.select=function(t,a){return new i.Set(i.utils.map((a||e).querySelectorAll(t),(function(t){return i.adopt(t)})))},i.extend(i.Parent,{select:function(t){return i.select(t,this.node)}});var v="abcdef".split("");if("function"!=typeof t.CustomEvent){var y=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};y.prototype=t.Event.prototype,i.CustomEvent=y}else i.CustomEvent=t.CustomEvent;return i},void 0!==(a=function(){return zt(Nt,Nt.document)}.call(e,i,e,t))&&(t.exports=a),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(t,e){return this.add(t,e),!t.attr("in")&&this.autoSetIn&&t.attr("in",this.source),t.attr("result")||t.attr("result",t),t},blend:function(t,e,i){return this.put(new SVG.BlendEffect(t,e,i))},colorMatrix:function(t,e){return this.put(new SVG.ColorMatrixEffect(t,e))},convolveMatrix:function(t){return this.put(new SVG.ConvolveMatrixEffect(t))},componentTransfer:function(t){return this.put(new SVG.ComponentTransferEffect(t))},composite:function(t,e,i){return this.put(new SVG.CompositeEffect(t,e,i))},flood:function(t,e){return this.put(new SVG.FloodEffect(t,e))},offset:function(t,e){return this.put(new SVG.OffsetEffect(t,e))},image:function(t){return this.put(new SVG.ImageEffect(t))},merge:function(){var t=[void 0];for(var e in arguments)t.push(arguments[e]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,t)))},gaussianBlur:function(t,e){return this.put(new SVG.GaussianBlurEffect(t,e))},morphology:function(t,e){return this.put(new SVG.MorphologyEffect(t,e))},diffuseLighting:function(t,e,i){return this.put(new SVG.DiffuseLightingEffect(t,e,i))},displacementMap:function(t,e,i,a,n){return this.put(new SVG.DisplacementMapEffect(t,e,i,a,n))},specularLighting:function(t,e,i,a){return this.put(new SVG.SpecularLightingEffect(t,e,i,a))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(t,e,i,a,n){return this.put(new SVG.TurbulenceEffect(t,e,i,a,n))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(t){var e=this.put(new SVG.Filter);return"function"==typeof t&&t.call(e,e),e}}),SVG.extend(SVG.Container,{filter:function(t){return this.defs().filter(t)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(t){return this.filterer=t instanceof SVG.Element?t:this.doc().filter(t),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(t){return this.filterer&&!0===t&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}});var t={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},diffuseLighting:function(t,e,i){return this.parent()&&this.parent().diffuseLighting(t,e,i).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},specularLighting:function(t,e,i,a){return this.parent()&&this.parent().specularLighting(t,e,i,a).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,n){return this.parent()&&this.parent().turbulence(t,e,i,a,n).in(this)}};SVG.extend(SVG.Effect,t),SVG.extend(SVG.ParentEffect,t),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){this.attr("in",t)}}});var e={blend:function(t,e,i){this.attr({in:t,in2:e,mode:i||"normal"})},colorMatrix:function(t,e){"matrix"==t&&(e=n(e)),this.attr({type:t,values:void 0===e?null:e})},convolveMatrix:function(t){t=n(t),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},composite:function(t,e,i){this.attr({in:t,in2:e,operator:i})},flood:function(t,e){this.attr("flood-color",t),null!=e&&this.attr("flood-opacity",e)},offset:function(t,e){this.attr({dx:t,dy:e})},image:function(t){this.attr("href",t,SVG.xlink)},displacementMap:function(t,e,i,a,n){this.attr({in:t,in2:e,scale:i,xChannelSelector:a,yChannelSelector:n})},gaussianBlur:function(t,e){null!=t||null!=e?this.attr("stdDeviation",r(Array.prototype.slice.call(arguments))):this.attr("stdDeviation","0 0")},morphology:function(t,e){this.attr({operator:t,radius:e})},tile:function(){},turbulence:function(t,e,i,a,n){this.attr({numOctaves:e,seed:i,stitchTiles:a,baseFrequency:t,type:n})}},i={merge:function(){var t;if(arguments[0]instanceof SVG.Set){var e=this;arguments[0].each((function(t){this instanceof SVG.MergeNode?e.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&e.put(new SVG.MergeNode(this))}))}else{t=Array.isArray(arguments[0])?arguments[0]:arguments;for(var i=0;i<t.length;i++)t[i]instanceof SVG.MergeNode?this.put(t[i]):this.put(new SVG.MergeNode(t[i]))}},componentTransfer:function(t){if(this.rgb=new SVG.Set,["r","g","b","a"].forEach(function(t){this[t]=new(SVG["Func"+t.toUpperCase()])("identity"),this.rgb.add(this[t]),this.node.appendChild(this[t].node)}.bind(this)),t)for(var e in t.rgb&&(["r","g","b"].forEach(function(e){this[e].attr(t.rgb)}.bind(this)),delete t.rgb),t)this[e].attr(t[e])},diffuseLighting:function(t,e,i){this.attr({surfaceScale:t,diffuseConstant:e,kernelUnitLength:i})},specularLighting:function(t,e,i,a){this.attr({surfaceScale:t,diffuseConstant:e,specularExponent:i,kernelUnitLength:a})}},a={distantLight:function(t,e){this.attr({azimuth:t,elevation:e})},pointLight:function(t,e,i){this.attr({x:t,y:e,z:i})},spotLight:function(t,e,i,a,n,r){this.attr({x:t,y:e,z:i,pointsAtX:a,pointsAtY:n,pointsAtZ:r})},mergeNode:function(t){this.attr("in",t)}};function n(t){return Array.isArray(t)&&(t=new SVG.Array(t)),t.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function r(t){if(!Array.isArray(t))return t;for(var e=0,i=t.length,a=[];e<i;e++)a.push(t[e]);return a.join(" ")}function s(){var t=function(){};for(var e in"function"==typeof arguments[arguments.length-1]&&(t=arguments[arguments.length-1],Array.prototype.splice.call(arguments,arguments.length-1,1)),arguments)for(var i in arguments[e])t(arguments[e][i],i,arguments[e])}["r","g","b","a"].forEach((function(t){a["Func"+t.toUpperCase()]=function(t){switch(this.attr("type",t),t){case"table":this.attr("tableValues",arguments[1]);break;case"linear":this.attr("slope",arguments[1]),this.attr("intercept",arguments[2]);break;case"gamma":this.attr("amplitude",arguments[1]),this.attr("exponent",arguments[2]),this.attr("offset",arguments[2])}}})),s(e,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.Effect,extend:{}})})),s(i,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.ParentEffect,extend:{}})})),s(a,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments)},inherit:SVG.ChildEffect,extend:{}})})),SVG.extend(SVG.MergeEffect,{in:function(t){return t instanceof SVG.MergeNode?this.add(t,0):this.add(new SVG.MergeNode(t),0),this}}),SVG.extend(SVG.CompositeEffect,SVG.BlendEffect,SVG.DisplacementMapEffect,{in2:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in2")+'"]').get(0)||this.attr("in2"):this.attr("in2",t)}}),SVG.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]}}.call(void 0),function(){function t(t,n,r,s,o,l,c){for(var h=t.slice(n,r||c),d=s.slice(o,l||c),u=0,p={pos:[0,0],start:[0,0]},f={pos:[0,0],start:[0,0]};h[u]=e.call(p,h[u]),d[u]=e.call(f,d[u]),h[u][0]!=d[u][0]||"M"==h[u][0]||"A"==h[u][0]&&(h[u][4]!=d[u][4]||h[u][5]!=d[u][5])?(Array.prototype.splice.apply(h,[u,1].concat(a.call(p,h[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(f,d[u])))):(h[u]=i.call(p,h[u]),d[u]=i.call(f,d[u])),++u!=h.length||u!=d.length;)u==h.length&&h.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]),u==d.length&&d.push(["C",f.pos[0],f.pos[1],f.pos[0],f.pos[1],f.pos[0],f.pos[1]]);return{start:h,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,n,r,s,o,l,c,h,d,u,p,f,g,x,m,b,v,y,w,k,S,A,C,P,L,T=Math.abs(e[1]),D=Math.abs(e[2]),M=e[3]%360,E=e[4],I=e[5],O=e[6],R=e[7],N=new SVG.Point(t),z=new SVG.Point(O,R),F=[];if(0===T||0===D||N.x===z.x&&N.y===z.y)return[["C",N.x,N.y,z.x,z.y,z.x,z.y]];for((a=(i=new SVG.Point((N.x-z.x)/2,(N.y-z.y)/2).transform((new SVG.Matrix).rotate(M))).x*i.x/(T*T)+i.y*i.y/(D*D))>1&&(T*=a=Math.sqrt(a),D*=a),n=(new SVG.Matrix).rotate(M).scale(1/T,1/D).rotate(-M),N=N.transform(n),o=(r=[(z=z.transform(n)).x-N.x,z.y-N.y])[0]*r[0]+r[1]*r[1],s=Math.sqrt(o),r[0]/=s,r[1]/=s,l=o<4?Math.sqrt(1-o/4):0,E===I&&(l*=-1),c=new SVG.Point((z.x+N.x)/2+l*-r[1],(z.y+N.y)/2+l*r[0]),h=new SVG.Point(N.x-c.x,N.y-c.y),d=new SVG.Point(z.x-c.x,z.y-c.y),u=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(u*=-1),p=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(p*=-1),I&&u>p&&(p+=2*Math.PI),!I&&u<p&&(p-=2*Math.PI),m=[],b=u,f=(p-u)/(g=Math.ceil(2*Math.abs(u-p)/Math.PI)),x=4*Math.tan(f/4)/3,k=0;k<=g;k++)y=Math.cos(b),v=Math.sin(b),w=new SVG.Point(c.x+y,c.y+v),m[k]=[new SVG.Point(w.x+x*v,w.y-x*y),w,new SVG.Point(w.x-x*v,w.y+x*y)],b+=f;for(m[0][0]=m[0][1].clone(),m[m.length-1][2]=m[m.length-1][1].clone(),n=(new SVG.Matrix).rotate(M).scale(T,D).rotate(-M),k=0,S=m.length;k<S;k++)m[k][0]=m[k][0].transform(n),m[k][1]=m[k][1].transform(n),m[k][2]=m[k][2].transform(n);for(k=1,S=m.length;k<S;k++)A=(w=m[k-1][2]).x,C=w.y,P=(w=m[k][0]).x,L=w.y,O=(w=m[k][1]).x,R=w.y,F.push(["C",A,C,P,L,O,R]);return F}(this.pos,t),t=e[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],e}function n(t,e){if(!1===e)return!1;for(var i=e,a=t.length;i<a;++i)if("M"==t[i][0])return i;return!1}SVG.extend(SVG.PathArray,{morph:function(e){for(var i=this.value,a=this.parse(e),r=0,s=0,o=!1,l=!1;!1!==r||!1!==s;){var c;o=n(i,!1!==r&&r+1),l=n(a,!1!==s&&s+1),!1===r&&(r=0==(c=new SVG.PathArray(h.start).bbox()).height||0==c.width?i.push(i[0])-1:i.push(["M",c.x+c.width/2,c.y+c.height/2])-1),!1===s&&(s=0==(c=new SVG.PathArray(h.dest).bbox()).height||0==c.width?a.push(a[0])-1:a.push(["M",c.x+c.width/2,c.y+c.height/2])-1);var h=t(i,r,o,a,s,l);i=i.slice(0,r).concat(h.start,!1===o?[]:i.slice(o)),a=a.slice(0,s).concat(h.dest,!1===l?[]:a.slice(l)),r=!1!==o&&r+h.start.length,s=!1!==l&&s+h.dest.length}return this.value=i,this.destination=new SVG.PathArray,this.destination.value=a,this}})}(),function(){function t(t){t.remember("_draggable",this),this.el=t}t.prototype.init=function(t,e){var i=this;this.constraint=t,this.value=e,this.el.on("mousedown.drag",(function(t){i.start(t)})),this.el.on("touchstart.drag",(function(t){i.start(t)}))},t.prototype.transformPoint=function(t,e){var i=(t=t||window.event).changedTouches&&t.changedTouches[0]||t;return this.p.x=i.clientX-(e||0),this.p.y=i.clientY,this.p.matrixTransform(this.m)},t.prototype.getBBox=function(){var t=this.el.bbox();return this.el instanceof SVG.Nested&&(t=this.el.rbox()),(this.el instanceof SVG.G||this.el instanceof SVG.Use||this.el instanceof SVG.Nested)&&(t.x=this.el.x(),t.y=this.el.y()),t},t.prototype.start=function(t){if("click"!=t.type&&"mousedown"!=t.type&&"mousemove"!=t.type||1==(t.which||t.buttons)){var e=this;if(this.el.fire("beforedrag",{event:t,handler:this}),!this.el.event().defaultPrevented){t.preventDefault(),t.stopPropagation(),this.parent=this.parent||this.el.parent(SVG.Nested)||this.el.parent(SVG.Doc),this.p=this.parent.node.createSVGPoint(),this.m=this.el.node.getScreenCTM().inverse();var i,a=this.getBBox();if(this.el instanceof SVG.Text)switch(i=this.el.node.getComputedTextLength(),this.el.attr("text-anchor")){case"middle":i/=2;break;case"start":i=0}this.startPoints={point:this.transformPoint(t,i),box:a,transform:this.el.transform()},SVG.on(window,"mousemove.drag",(function(t){e.drag(t)})),SVG.on(window,"touchmove.drag",(function(t){e.drag(t)})),SVG.on(window,"mouseup.drag",(function(t){e.end(t)})),SVG.on(window,"touchend.drag",(function(t){e.end(t)})),this.el.fire("dragstart",{event:t,p:this.startPoints.point,m:this.m,handler:this})}}},t.prototype.drag=function(t){var e=this.getBBox(),i=this.transformPoint(t),a=this.startPoints.box.x+i.x-this.startPoints.point.x,n=this.startPoints.box.y+i.y-this.startPoints.point.y,r=this.constraint,s=i.x-this.startPoints.point.x,o=i.y-this.startPoints.point.y;if(this.el.fire("dragmove",{event:t,p:i,m:this.m,handler:this}),this.el.event().defaultPrevented)return i;if("function"==typeof r){var l=r.call(this.el,a,n,this.m);"boolean"==typeof l&&(l={x:l,y:l}),!0===l.x?this.el.x(a):!1!==l.x&&this.el.x(l.x),!0===l.y?this.el.y(n):!1!==l.y&&this.el.y(l.y)}else"object"==typeof r&&(null!=r.minX&&a<r.minX?s=(a=r.minX)-this.startPoints.box.x:null!=r.maxX&&a>r.maxX-e.width&&(s=(a=r.maxX-e.width)-this.startPoints.box.x),null!=r.minY&&n<r.minY?o=(n=r.minY)-this.startPoints.box.y:null!=r.maxY&&n>r.maxY-e.height&&(o=(n=r.maxY-e.height)-this.startPoints.box.y),null!=r.snapToGrid&&(a-=a%r.snapToGrid,n-=n%r.snapToGrid,s-=s%r.snapToGrid,o-=o%r.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:s,y:o},!0):this.el.move(a,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"!=typeof e||(i=e,e=!0);var a=this.remember("_draggable")||new t(this);return(e=void 0===e||e)?a.init(i||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function t(t){this.el=t,t.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,e,i){var a="string"!=typeof t?t:e[t];return i?a/2:a},this.pointCoords=function(t,e){var i=this.pointsList[t];return{x:this.pointCoord(i[0],e,"t"===t||"b"===t),y:this.pointCoord(i[1],e,"r"===t||"l"===t)}}}t.prototype.init=function(t,e){var i=this.el.bbox();this.options={};var a=this.el.selectize.defaults.points;for(var n in this.el.selectize.defaults)this.options[n]=this.el.selectize.defaults[n],void 0!==e[n]&&(this.options[n]=e[n]);var r=["points","pointsExclude"];for(var n in r){var s=this.options[r[n]];"string"==typeof s?s=s.length>0?s.split(/\s*,\s*/i):[]:"boolean"==typeof s&&"points"===r[n]&&(s=s?a:[]),this.options[r[n]]=s}this.options.points=[a,this.options.points].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)>-1}))})),this.options.points=[this.options.points,this.options.pointsExclude].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)<0}))})),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.pointSelection.set=this.parent.set(),this.drawPoints()),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.drawPoints=function(){for(var t=this,e=this.getPointArray(),i=0,a=e.length;i<a;++i){var n=function(e){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var a=i.pageX||i.touches[0].pageX,n=i.pageY||i.touches[0].pageY;t.el.fire("point",{x:a,y:n,i:e,event:i})}}(i),r=this.drawPoint(e[i][0],e[i][1]).addClass(this.options.classPoints).addClass(this.options.classPoints+"_point").on("touchstart",n).on("mousedown",n);this.pointSelection.set.add(r)}},t.prototype.drawPoint=function(t,e){var i=this.options.pointType;switch(i){case"circle":return this.drawCircle(t,e);case"rect":return this.drawRect(t,e);default:if("function"==typeof i)return i.call(this,t,e);throw new Error("Unknown "+i+" point type!")}},t.prototype.drawCircle=function(t,e){return this.nested.circle(this.options.pointSize).center(t,e)},t.prototype.drawRect=function(t,e){return this.nested.rect(this.options.pointSize,this.options.pointSize).center(t,e)},t.prototype.updatePointSelection=function(){var t=this.getPointArray();this.pointSelection.set.each((function(e){this.cx()===t[e][0]&&this.cy()===t[e][1]||this.center(t[e][0],t[e][1])}))},t.prototype.updateRectSelection=function(){var t=this,e=this.el.bbox();if(this.rectSelection.set.get(0).attr({width:e.width,height:e.height}),this.options.points.length&&this.options.points.map((function(i,a){var n=t.pointCoords(i,e);t.rectSelection.set.get(a+1).center(n.x,n.y)})),this.options.rotationPoint){var i=this.rectSelection.set.length();this.rectSelection.set.get(i-1).center(e.width/2,20)}},t.prototype.selectRect=function(t){var e=this,i=this.el.bbox();function a(t){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var a=i.pageX||i.touches[0].pageX,n=i.pageY||i.touches[0].pageY;e.el.fire(t,{x:a,y:n,event:i})}}if(this.rectSelection.isSelected=t,this.rectSelection.set=this.rectSelection.set||this.parent.set(),this.rectSelection.set.get(0)||this.rectSelection.set.add(this.nested.rect(i.width,i.height).addClass(this.options.classRect)),this.options.points.length&&this.rectSelection.set.length()<2&&(this.options.points.map((function(t,n){var r=e.pointCoords(t,i),s=e.drawPoint(r.x,r.y).attr("class",e.options.classPoints+"_"+t).on("mousedown",a(t)).on("touchstart",a(t));e.rectSelection.set.add(s)})),this.rectSelection.set.each((function(){this.addClass(e.options.classPoints)}))),this.options.rotationPoint&&(this.options.points&&!this.rectSelection.set.get(9)||!this.options.points&&!this.rectSelection.set.get(1))){var n=function(t){(t=t||window.event).preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation();var i=t.pageX||t.touches[0].pageX,a=t.pageY||t.touches[0].pageY;e.el.fire("rot",{x:i,y:a,event:t})},r=this.drawPoint(i.width/2,20).attr("class",this.options.classPoints+"_rot").on("touchstart",n).on("mousedown",n);this.rectSelection.set.add(r)}},t.prototype.handler=function(){var t=this.el.bbox();this.nested.matrix(new SVG.Matrix(this.el).translate(t.x,t.y)),this.rectSelection.isSelected&&this.updateRectSelection(),this.pointSelection.isSelected&&this.updatePointSelection()},t.prototype.observe=function(){var t=this;if(MutationObserver)if(this.rectSelection.isSelected||this.pointSelection.isSelected)this.observerInst=this.observerInst||new MutationObserver((function(){t.handler()})),this.observerInst.observe(this.el.node,{attributes:!0});else try{this.observerInst.disconnect(),delete this.observerInst}catch(t){}else this.el.off("DOMAttrModified.select"),(this.rectSelection.isSelected||this.pointSelection.isSelected)&&this.el.on("DOMAttrModified.select",(function(){t.handler()}))},t.prototype.cleanup=function(){!this.rectSelection.isSelected&&this.rectSelection.set&&(this.rectSelection.set.each((function(){this.remove()})),this.rectSelection.set.clear(),delete this.rectSelection.set),!this.pointSelection.isSelected&&this.pointSelection.set&&(this.pointSelection.set.each((function(){this.remove()})),this.pointSelection.set.clear(),delete this.pointSelection.set),this.pointSelection.isSelected||this.rectSelection.isSelected||(this.nested.remove(),delete this.nested)},SVG.extend(SVG.Element,{selectize:function(e,i){return"object"==typeof e&&(i=e,e=!0),(this.remember("_selectHandler")||new t(this)).init(void 0===e||e,i||{}),this}}),SVG.Element.prototype.selectize.defaults={points:["lt","rt","rb","lb","t","r","b","l"],pointsExclude:[],classRect:"svg_select_boundingRect",classPoints:"svg_select_points",pointSize:7,rotationPoint:!0,deepSelect:!1,pointType:"circle"}}(),function(){(function(){function t(t){t.remember("_resizeHandler",this),this.el=t,this.parameters={},this.lastUpdateCall=null,this.p=t.doc().node.createSVGPoint()}t.prototype.transformPoint=function(t,e,i){return this.p.x=t-(this.offset.x-window.pageXOffset),this.p.y=e-(this.offset.y-window.pageYOffset),this.p.matrixTransform(i||this.m)},t.prototype._extractPosition=function(t){return{x:null!=t.clientX?t.clientX:t.touches[0].clientX,y:null!=t.clientY?t.clientY:t.touches[0].clientY}},t.prototype.init=function(t){var e=this;if(this.stop(),"stop"!==t){for(var i in this.options={},this.el.resize.defaults)this.options[i]=this.el.resize.defaults[i],void 0!==t[i]&&(this.options[i]=t[i]);this.el.on("lt.resize",(function(t){e.resize(t||window.event)})),this.el.on("rt.resize",(function(t){e.resize(t||window.event)})),this.el.on("rb.resize",(function(t){e.resize(t||window.event)})),this.el.on("lb.resize",(function(t){e.resize(t||window.event)})),this.el.on("t.resize",(function(t){e.resize(t||window.event)})),this.el.on("r.resize",(function(t){e.resize(t||window.event)})),this.el.on("b.resize",(function(t){e.resize(t||window.event)})),this.el.on("l.resize",(function(t){e.resize(t||window.event)})),this.el.on("rot.resize",(function(t){e.resize(t||window.event)})),this.el.on("point.resize",(function(t){e.resize(t||window.event)})),this.update()}},t.prototype.stop=function(){return this.el.off("lt.resize"),this.el.off("rt.resize"),this.el.off("rb.resize"),this.el.off("lb.resize"),this.el.off("t.resize"),this.el.off("r.resize"),this.el.off("b.resize"),this.el.off("l.resize"),this.el.off("rot.resize"),this.el.off("point.resize"),this},t.prototype.resize=function(t){var e=this;this.m=this.el.node.getScreenCTM().inverse(),this.offset={x:window.pageXOffset,y:window.pageYOffset};var i=this._extractPosition(t.detail.event);if(this.parameters={type:this.el.type,p:this.transformPoint(i.x,i.y),x:t.detail.x,y:t.detail.y,box:this.el.bbox(),rotation:this.el.transform().rotation},"text"===this.el.type&&(this.parameters.fontSize=this.el.attr()["font-size"]),void 0!==t.detail.i){var a=this.el.array().valueOf();this.parameters.i=t.detail.i,this.parameters.pointCoords=[a[t.detail.i][0],a[t.detail.i][1]]}switch(t.type){case"lt":this.calc=function(t,e){var i=this.snapToGrid(t,e);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+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,!0),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,!0),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=t+this.parameters.p.x,a=e+this.parameters.p.y,n=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),r=Math.atan2(a-this.parameters.box.y-this.parameters.box.height/2,i-this.parameters.box.x-this.parameters.box.width/2),s=this.parameters.rotation+180*(r-n)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(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){var e=this._extractPosition(t),i=this.transformPoint(e.x,e.y),a=i.x-this.parameters.p.x,n=i.y-this.parameters.p.y;this.lastUpdateCall=[a,n],this.calc(a,n),this.el.fire("resizing",{dx:a,dy:n,event:t})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},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 n;return void 0!==a?n=[(i+t)%this.options.snapToGrid,(a+e)%this.options.snapToGrid]:(i=null==i?3:i,n=[(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<0&&(n[0]-=this.options.snapToGrid),e<0&&(n[1]-=this.options.snapToGrid),t-=Math.abs(n[0])<this.options.snapToGrid/2?n[0]:n[0]-(t<0?-this.options.snapToGrid:this.options.snapToGrid),e-=Math.abs(n[1])<this.options.snapToGrid/2?n[1]:n[1]-(e<0?-this.options.snapToGrid:this.options.snapToGrid),this.constraintToBox(t,e,i,a)},t.prototype.constraintToBox=function(t,e,i,a){var n,r,s=this.options.constraint||{};return void 0!==a?(n=i,r=a):(n=this.parameters.box.x+(1&i?0:this.parameters.box.width),r=this.parameters.box.y+(2&i?0:this.parameters.box.height)),void 0!==s.minX&&n+t<s.minX&&(t=s.minX-n),void 0!==s.maxX&&n+t>s.maxX&&(t=s.maxX-n),void 0!==s.minY&&r+e<s.minY&&(e=s.minY-r),void 0!==s.maxY&&r+e>s.maxY&&(e=s.maxY-r),[t,e]},t.prototype.checkAspectRatio=function(t,e){if(!this.options.saveAspectRatio)return t;var i=t.slice(),a=this.parameters.box.width/this.parameters.box.height,n=this.parameters.box.width+t[0],r=this.parameters.box.height-t[1],s=n/r;return s<a?(i[1]=n/a-this.parameters.box.height,e&&(i[1]=-i[1])):s>a&&(i[0]=this.parameters.box.width-r*a,e&&(i[0]=-i[0])),i},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)}(),void 0===window.Apex&&(window.Apex={});var Ht=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new y(this.ctx),this.ctx.axes=new tt(this.ctx),this.ctx.core=new Xt(this.ctx.el,this.ctx),this.ctx.config=new N({}),this.ctx.data=new B(this.ctx),this.ctx.grid=new Z(this.ctx),this.ctx.graphics=new k(this.ctx),this.ctx.coreUtils=new S(this.ctx),this.ctx.crosshairs=new et(this.ctx),this.ctx.events=new Q(this.ctx),this.ctx.exports=new V(this.ctx),this.ctx.localization=new K(this.ctx),this.ctx.options=new D,this.ctx.responsive=new it(this.ctx),this.ctx.series=new $(this.ctx),this.ctx.theme=new at(this.ctx),this.ctx.formatters=new W(this.ctx),this.ctx.titleSubtitle=new nt(this.ctx),this.ctx.legend=new dt(this.ctx),this.ctx.toolbar=new ut(this.ctx),this.ctx.tooltip=new yt(this.ctx),this.ctx.dimensions=new ct(this.ctx),this.ctx.updateHelpers=new _t(this.ctx),this.ctx.zoomPanSelection=new pt(this.ctx),this.ctx.w.globals.tooltip=new yt(this.ctx)}}]),t}(),$t=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"clear",value:function(t){var e=t.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:e})}},{key:"killSVG",value:function(t){t.each((function(t,e){this.removeClass("*"),this.off(),this.stop()}),!0),t.ungroup(),t.clear()}},{key:"clearDomElements",value:function(t){var e=this,i=t.isUpdating,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!i&&(a.parentNode.parentNode.style.minHeight="unset");var n=this.w.globals.dom.baseEl;n&&this.ctx.eventList.forEach((function(t){n.removeEventListener(t,e.ctx.events.documentEvent)}));var r=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(r.Paper),r.Paper.remove(),r.elWrap=null,r.elGraphical=null,r.elAnnotations=null,r.elLegendWrap=null,r.baseEl=null,r.elGridRect=null,r.elGridRectMask=null,r.elGridRectMarkerMask=null,r.elForecastMask=null,r.elNonForecastMask=null,r.elDefs=null}}]),t}(),Bt=new WeakMap,Wt=function(){function t(e,i){o(this,t),this.opts=i,this.ctx=this,this.w=new F(i).init(),this.el=e,this.w.globals.cuid=v.randomId(),this.w.globals.chartID=this.w.config.chart.id?v.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Ht(this).initModules(),this.create=v.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return c(t,[{key:"render",value:function(){var t=this;return new Promise((function(e,i){if(null!==t.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),t.w.config.chart.id&&Apex._chartInstances.push({id:t.w.globals.chartID,group:t.w.config.chart.group,chart:t}),t.setLocale(t.w.config.chart.defaultLocale);var a=t.w.config.chart.events.beforeMount;if("function"==typeof a&&a(t,t.w),t.events.fireEvent("beforeMount",[t,t.w]),window.addEventListener("resize",t.windowResizeHandler),function(t,e){var i=!1;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var a=t.getBoundingClientRect();"none"!==t.style.display&&0!==a.width||(i=!0)}var n=new ResizeObserver((function(a){i&&e.call(t,a),i=!0}));t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach((function(t){return n.observe(t)})):n.observe(t),Bt.set(e,n)}(t.el.parentNode,t.parentResizeHandler),!t.css){var n=t.el.getRootNode&&t.el.getRootNode(),r=v.is("ShadowRoot",n),s=t.el.ownerDocument,o=s.getElementById("apexcharts-css");!r&&o||(t.css=document.createElement("style"),t.css.id="apexcharts-css",t.css.textContent='@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n 0%,to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0,0,0,.5);\n box-shadow: 0 0 1px rgba(255,255,255,.5);\n -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\n.legend-mouseover-inactive {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255,255,255,.96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30,30,30,.8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0,0,0,.7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,.apexcharts-tooltip-text-y-value,.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,.apexcharts-tooltip-text-goals-value:empty,.apexcharts-tooltip-text-y-label:empty,.apexcharts-tooltip-text-y-value:empty,.apexcharts-tooltip-text-z-value:empty,.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0!important\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0,0,0,.7);\n border: 1px solid rgba(0,0,0,.5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0,0,0,.7);\n border: 1px solid rgba(0,0,0,.5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_boundingRect,.svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_boundingRect,.apexcharts-selection-rect+g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_points_l,.apexcharts-selection-rect+g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,.apexcharts-pan-icon,.apexcharts-reset-icon,.apexcharts-selection-icon,.apexcharts-toolbar-custom-icon,.apexcharts-zoom-icon,.apexcharts-zoomin-icon,.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,.apexcharts-reset-icon svg,.apexcharts-zoom-icon svg,.apexcharts-zoomin-icon svg,.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,.apexcharts-theme-dark .apexcharts-pan-icon svg,.apexcharts-theme-dark .apexcharts-reset-icon svg,.apexcharts-theme-dark .apexcharts-selection-icon svg,.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,.apexcharts-theme-dark .apexcharts-zoom-icon svg,.apexcharts-theme-dark .apexcharts-zoomin-icon svg,.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,.apexcharts-theme-light .apexcharts-reset-icon:hover svg,.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,.apexcharts-reset-icon,.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0,0,0,.7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,.apexcharts-datalabel.apexcharts-element-hidden,.apexcharts-hide .apexcharts-series-points {\n opacity: 0\n}\n\n.apexcharts-datalabel,.apexcharts-datalabel-label,.apexcharts-datalabel-value,.apexcharts-datalabels,.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-annotation-rect,.apexcharts-area-series .apexcharts-area,.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-gridline,.apexcharts-line,.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-point-annotation-label,.apexcharts-radar-series path,.apexcharts-radar-series polygon,.apexcharts-toolbar svg,.apexcharts-tooltip .apexcharts-marker,.apexcharts-xaxis-annotation-label,.apexcharts-yaxis-annotation-label,.apexcharts-zoom-rect {\n pointer-events: none\n}\n\n.apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,.resize-triggers,.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n',r?n.prepend(t.css):s.head.appendChild(t.css))}var l=t.create(t.w.config.series,{});if(!l)return e(t);t.mount(l).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(l)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this.w;new Ht(this).initModules();var a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,this.responsive.checkResponsiveConfig(e),i.config.xaxis.convertedCatToNumeric&&new R(i.config).convertCatToNumericXaxis(i.config,this.ctx),null===this.el)return a.animationEnded=!0,null;if(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===a.svgWidth)return a.animationEnded=!0,null;var n=S.checkComboSeries(t);a.comboCharts=n.comboCharts,a.comboBarCount=n.comboBarCount;var r=t.every((function(t){return t.data&&0===t.data.length}));(0===t.length||r)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(t),this.theme.init(),new X(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),a.noData&&a.collapsedSeries.length!==a.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new S(this).getLargestMarkerSize(),this.dimensions.plotCoords();var s=this.core.xySettings();this.grid.createGridMask();var o=this.core.plotChartType(t,s),l=new H(this);l.bringForward(),i.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition();var c={plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}};return{elGraph:o,xyRatios:s,elInner:i.globals.dom.elGraphical,dimensions:c}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(n,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Z(i);var s=i.grid.drawGrid();"treemap"!==a.config.chart.type&&i.axes.drawAxis(a.config.chart.type,s),i.annotations=new M(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position&&s&&a.globals.dom.elGraphical.add(s.el);var o=new G(t.ctx,s),l=new J(t.ctx,s);if(null!==s&&(o.xAxisLabelCorrections(s.xAxisTickWidth),l.setYAxisTextAlignments(),a.config.yaxis.map((function(t,e){-1===a.globals.ignoreYAxisIndexes.indexOf(e)&&l.yAxisTitleRotate(e,t.opposite)}))),"back"===a.config.annotations.position&&(a.globals.dom.Paper.add(a.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),Array.isArray(e.elGraph))for(var c=0;c<e.elGraph.length;c++)a.globals.dom.elGraphical.add(e.elGraph[c]);else a.globals.dom.elGraphical.add(e.elGraph);if("front"===a.config.grid.position&&s&&a.globals.dom.elGraphical.add(s.el),s&&s.elGridBorders&&s.elGridBorders.node&&a.globals.dom.elGraphical.add(s.elGridBorders),"front"===a.config.xaxis.crosshairs.position&&i.crosshairs.drawXCrosshairs(),"front"===a.config.yaxis[0].crosshairs.position&&i.crosshairs.drawYCrosshairs(),"front"===a.config.annotations.position&&(a.globals.dom.Paper.add(a.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),!a.globals.noData){if(a.config.tooltip.enabled&&!a.globals.noData&&i.w.globals.tooltip.drawTooltip(e.xyRatios),a.globals.axisCharts&&(a.globals.isXNumeric||a.config.xaxis.convertedCatToNumeric||a.globals.isRangeBar))(a.config.chart.zoom.enabled||a.config.chart.selection&&a.config.chart.selection.enabled||a.config.chart.pan&&a.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:e.xyRatios});else{var h=a.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach((function(t){h[t]=!1}))}a.config.chart.toolbar.show&&!a.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}a.globals.memory.methodsToExec.length>0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),n(i)}))}},{key:"destroy",value:function(){var t,e;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,t=this.parentResizeHandler,(e=Bt.get(t))&&(e.disconnect(),Bt.delete(t));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach((function(t,e){t.id===v.escapeString(i)&&Apex._chartInstances.splice(e,1)})),new $t(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=this.w;return s.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),s.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,n,r)}},{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.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",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=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{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(),n=0;n<a.length;n++)if(null!==t[n]&&void 0!==t[n])for(var r=0;r<t[n].data.length;r++)a[n].data.push(t[n].data[r]);return i.w.config.series=a,e&&(i.w.globals.initialSeries=v.clone(i.w.config.series)),this.update()}},{key:"update",value:function(t){var e=this;return new Promise((function(i,a){new $t(e.ctx).clear({isUpdating:!0});var n=e.create(e.w.config.series,t);if(!n)return i(e);e.mount(n).then((function(){"function"==typeof e.w.config.chart.events.updated&&e.w.config.chart.events.updated(e,e.w),e.events.fireEvent("updated",[e,e.w]),e.w.globals.isDirty=!0,i(e)})).catch((function(t){a(t)}))}))}},{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:t}))}},{key:"toggleSeries",value:function(t){return this.series.toggleSeries(t)}},{key:"highlightSeriesOnLegendHover",value:function(t,e){return this.series.toggleSeriesOnHover(t,e)}},{key:"showSeries",value:function(t){this.series.showSeries(t)}},{key:"hideSeries",value:function(t){this.series.hideSeries(t)}},{key:"resetSeries",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",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.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:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{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,e=new q(this.ctx);return e.getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=new q(this.ctx);return e.getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new V(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new V(this.ctx);return e.exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var 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.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t),i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i<e.length;i++)new t(e[i],JSON.parse(e[i].getAttribute("data-options"))).render()}},{key:"exec",value:function(t,e){var i=this.getChartByID(t);if(i){i.w.globals.isExecCalled=!0;var a=null;if(-1!==i.publicMethods.indexOf(e)){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];a=i[e].apply(i,r)}return a}}},{key:"merge",value:function(t,e){return v.extend(t,e)}}]),t}();t.exports=Wt},1368:function(t,e,i){"use strict";i.d(e,{H:function(){return N},b:function(){return Et},c:function(){return H},g:function(){return _},h:function(){return O},r:function(){return Yt}});var a=i(5671),n=i(3144),r=i(7326),s=i(136),o=i(2963),l=i(1120),c=i(2407),h=i(5861),d=i(3324),u=i(2982),p=i(1002),f=i(1284),g=i.n(f);function x(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,a=(0,l.Z)(t);if(e){var n=(0,l.Z)(this).constructor;i=Reflect.construct(a,arguments,n)}else i=a.apply(this,arguments);return(0,o.Z)(this,i)}}function m(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return b(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var a=0,n=function(){};return{s:n,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){o=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(o)throw r}}}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var v,y,w,k=!1,S=!1,A=!1,C=!1,P=!1,L="{visibility:hidden}.hydrated{visibility:inherit}",T="slot-fb{display:contents}slot-fb[hidden]{display:none}",D="http://www.w3.org/1999/xlink",M={},E=function(t){return"object"===(t=(0,p.Z)(t))||"function"===t};function I(t){var e,i,a;return null!==(a=null===(i=null===(e=t.head)||void 0===e?void 0:e.querySelector('meta[name="csp-nonce"]'))||void 0===i?void 0:i.getAttribute("content"))&&void 0!==a?a:void 0}var O=function(t,e){for(var i=null,a=null,n=null,r=!1,s=!1,o=[],l=function e(a){for(var n=0;n<a.length;n++)i=a[n],Array.isArray(i)?e(i):null!=i&&"boolean"!=typeof i&&((r="function"!=typeof t&&!E(i))&&(i=String(i)),r&&s?o[o.length-1].$text$+=i:o.push(r?R(null,i):i),s=r)},c=arguments.length,h=new Array(c>2?c-2:0),d=2;d<c;d++)h[d-2]=arguments[d];if(l(h),e){e.key&&(a=e.key),e.name&&(n=e.name);var u=e.className||e.class;u&&(e.class="object"!==(0,p.Z)(u)?u:Object.keys(u).filter((function(t){return u[t]})).join(" "))}if("function"==typeof t)return t(null===e?{}:e,o,F);var f=R(t,null);return f.$attrs$=e,o.length>0&&(f.$children$=o),f.$key$=a,f.$name$=n,f},R=function(t,e){return{$flags$:0,$tag$:t,$text$:e,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null}},N={},z=function(t){return t&&t.$tag$===N},F={forEach:function(t,e){return t.map(Y).forEach(e)},map:function(t,e){return t.map(Y).map(e).map(X)}},Y=function(t){return{vattrs:t.$attrs$,vchildren:t.$children$,vkey:t.$key$,vname:t.$name$,vtag:t.$tag$,vtext:t.$text$}},X=function(t){if("function"==typeof t.vtag){var e=Object.assign({},t.vattrs);return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),O.apply(void 0,[t.vtag,e].concat((0,u.Z)(t.vchildren||[])))}var i=R(t.vtag,t.vtext);return i.$attrs$=t.vattrs,i.$children$=t.vchildren,i.$key$=t.vkey,i.$name$=t.vname,i},_=function(t){return Ft(t).$hostElement$},H=function(t,e,i){var a=_(t);return{emit:function(t){return $(a,e,{bubbles:!!(4&i),composed:!!(2&i),cancelable:!!(1&i),detail:t})}}},$=function(t,e,i){var a=Gt.ce(e,i);return t.dispatchEvent(a),a},B=new WeakMap,W=function(t,e,i){var a=Wt.get(t);Ut&&i?"string"==typeof(a=a||new CSSStyleSheet)?a=e:a.replaceSync(e):a=e,Wt.set(t,a)},j=function(t){var e=t.$cmpMeta$,i=t.$hostElement$,a=e.$flags$,n=(e.$tagName$,function(){}),r=function(t,e,i){var a,n=V(e),r=Wt.get(n);if(t=11===t.nodeType?t:Vt,r)if("string"==typeof r){t=t.head||t;var s,o=B.get(t);if(o||B.set(t,o=new Set),!o.has(n)){(s=Vt.createElement("style")).innerHTML=r;var l=null!==(a=Gt.$nonce$)&&void 0!==a?a:I(Vt);null!=l&&s.setAttribute("nonce",l),t.insertBefore(s,t.querySelector("link")),4&e.$flags$&&(s.innerHTML+=T),o&&o.add(n)}}else t.adoptedStyleSheets.includes(r)||(t.adoptedStyleSheets=[].concat((0,u.Z)(t.adoptedStyleSheets),[r]));return n}(i.shadowRoot?i.shadowRoot:i.getRootNode(),e);10&a&&(i["s-sc"]=r,i.classList.add(r+"-h")),n()},V=function(t,e){return"sc-"+t.$tagName$},G=function(t,e,i,a,n,r){if(i!==a){var s=_t(t,e),o=e.toLowerCase();if("class"===e){var l=t.classList,c=U(i),h=U(a);l.remove.apply(l,(0,u.Z)(c.filter((function(t){return t&&!h.includes(t)})))),l.add.apply(l,(0,u.Z)(h.filter((function(t){return t&&!c.includes(t)}))))}else if("style"===e){for(var d in i)a&&null!=a[d]||(d.includes("-")?t.style.removeProperty(d):t.style[d]="");for(var p in a)i&&a[p]===i[p]||(p.includes("-")?t.style.setProperty(p,a[p]):t.style[p]=a[p])}else if("key"===e);else if("ref"===e)a&&a(t);else if(s||"o"!==e[0]||"n"!==e[1]){var f=E(a);if((s||f&&null!==a)&&!n)try{if(t.tagName.includes("-"))t[e]=a;else{var g=null==a?"":a;"list"===e?s=!1:null!=i&&t[e]==g||(t[e]=g)}}catch(t){}var x=!1;o!==(o=o.replace(/^xlink\:?/,""))&&(e=o,x=!0),null==a||!1===a?!1===a&&""!==t.getAttribute(e)||(x?t.removeAttributeNS(D,e):t.removeAttribute(e)):(!s||4&r||n)&&!f&&(a=!0===a?"":a,x?t.setAttributeNS(D,e,a):t.setAttribute(e,a))}else if(e="-"===e[2]?e.slice(3):_t(jt,o)?o.slice(2):o[2]+e.slice(3),i||a){var m=e.endsWith(q);e=e.replace(J,""),i&&Gt.rel(t,e,i,m),a&&Gt.ael(t,e,a,m)}}},Z=/\s/,U=function(t){return t?t.split(Z):[]},q="Capture",J=new RegExp(q+"$"),Q=function(t,e,i,a){var n,r=11===e.$elm$.nodeType&&e.$elm$.host?e.$elm$.host:e.$elm$,s=t&&t.$attrs$||M,o=e.$attrs$||M,l=m(K(Object.keys(s)));try{for(l.s();!(n=l.n()).done;)(a=n.value)in o||G(r,a,s[a],void 0,i,e.$flags$)}catch(t){l.e(t)}finally{l.f()}var c,h=m(K(Object.keys(o)));try{for(h.s();!(c=h.n()).done;)a=c.value,G(r,a,s[a],o[a],i,e.$flags$)}catch(t){h.e(t)}finally{h.f()}};function K(t){return t.includes("ref")?[].concat((0,u.Z)(t.filter((function(t){return"ref"!==t}))),["ref"]):t}var tt=function t(e,i,a,n){var r,s,o,l,c=i.$children$[a],h=0;if(k||(A=!0,"slot"===c.$tag$&&(v&&n.classList.add(v+"-s"),c.$flags$|=c.$children$?2:1)),null!==c.$text$)s=c.$elm$=Vt.createTextNode(c.$text$);else if(1&c.$flags$)s=c.$elm$=Vt.createTextNode("");else{if(C||(C="svg"===c.$tag$),s=c.$elm$=Vt.createElementNS(C?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&c.$flags$?"slot-fb":c.$tag$),C&&"foreignObject"===c.$tag$&&(C=!1),Q(null,c,C),null!=v&&s["s-si"]!==v&&s.classList.add(s["s-si"]=v),c.$children$)for(h=0;h<c.$children$.length;++h)(o=t(e,c,h,s))&&s.appendChild(o);"svg"===c.$tag$?C=!1:"foreignObject"===s.tagName&&(C=!0)}return s["s-hn"]=w,3&c.$flags$&&(s["s-sr"]=!0,s["s-cr"]=y,s["s-sn"]=c.$name$||"",s["s-rf"]=null===(r=c.$attrs$)||void 0===r?void 0:r.ref,(l=e&&e.$children$&&e.$children$[a])&&l.$tag$===c.$tag$&&e.$elm$&&et(e.$elm$,!1)),s},et=function t(e,i){Gt.$flags$|=1;var a=Array.from(e.childNodes);e["s-sr"];for(var n=a.length-1;n>=0;n--){var r=a[n];r["s-hn"]!==w&&r["s-ol"]&&(ot(r).insertBefore(r,st(r)),r["s-ol"].remove(),r["s-ol"]=void 0,r["s-sh"]=void 0,A=!0),i&&t(r,i)}Gt.$flags$&=-2},it=function(t,e,i,a,n,r){var s,o=t["s-cr"]&&t["s-cr"].parentNode||t;for(o.shadowRoot&&o.tagName===w&&(o=o.shadowRoot);n<=r;++n)a[n]&&(s=tt(null,i,n,t))&&(a[n].$elm$=s,o.insertBefore(s,st(e)))},at=function(t,e,i){for(var a=e;a<=i;++a){var n=t[a];if(n){var r=n.$elm$;pt(n),r&&(S=!0,r["s-ol"]?r["s-ol"].remove():et(r,!0),r.remove())}}},nt=function(t,e,i,a){for(var n,r,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=0,l=0,c=0,h=0,d=e.length-1,u=e[0],p=e[d],f=a.length-1,g=a[0],x=a[f];o<=d&&l<=f;)if(null==u)u=e[++o];else if(null==p)p=e[--d];else if(null==g)g=a[++l];else if(null==x)x=a[--f];else if(rt(u,g,s))lt(u,g,s),u=e[++o],g=a[++l];else if(rt(p,x,s))lt(p,x,s),p=e[--d],x=a[--f];else if(rt(u,x,s))"slot"!==u.$tag$&&"slot"!==x.$tag$||et(u.$elm$.parentNode,!1),lt(u,x,s),t.insertBefore(u.$elm$,p.$elm$.nextSibling),u=e[++o],x=a[--f];else if(rt(p,g,s))"slot"!==u.$tag$&&"slot"!==x.$tag$||et(p.$elm$.parentNode,!1),lt(p,g,s),t.insertBefore(p.$elm$,u.$elm$),p=e[--d],g=a[++l];else{for(c=-1,h=o;h<=d;++h)if(e[h]&&null!==e[h].$key$&&e[h].$key$===g.$key$){c=h;break}c>=0?((r=e[c]).$tag$!==g.$tag$?n=tt(e&&e[l],i,c,t):(lt(r,g,s),e[c]=void 0,n=r.$elm$),g=a[++l]):(n=tt(e&&e[l],i,l,t),g=a[++l]),n&&ot(u.$elm$).insertBefore(n,st(u.$elm$))}o>d?it(t,null==a[f+1]?null:a[f+1].$elm$,i,a,l,f):l>f&&at(e,o,d)},rt=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.$tag$===e.$tag$&&("slot"===t.$tag$?t.$name$===e.$name$:!!i||t.$key$===e.$key$)},st=function(t){return t&&t["s-ol"]||t},ot=function(t){return(t["s-ol"]?t["s-ol"]:t).parentNode},lt=function(t,e){var i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.$elm$=t.$elm$,r=t.$children$,s=e.$children$,o=e.$tag$,l=e.$text$;null===l?(C="svg"===o||"foreignObject"!==o&&C,("slot"!==o||k)&&Q(t,e,C),null!==r&&null!==s?nt(n,r,e,s,a):null!==s?(null!==t.$text$&&(n.textContent=""),it(n,null,e,s,0,s.length-1)):null!==r&&at(r,0,r.length-1),C&&"svg"===o&&(C=!1)):(i=n["s-cr"])?i.parentNode.textContent=l:t.$text$!==l&&(n.data=l)},ct=function t(e){var i,a=e.childNodes,n=m(a);try{for(n.s();!(i=n.n()).done;){var r=i.value;if(1===r.nodeType){if(r["s-sr"]){var s=r["s-sn"];r.hidden=!1;var o,l=m(a);try{for(l.s();!(o=l.n()).done;){var c=o.value;if(c!==r)if(c["s-hn"]!==r["s-hn"]||""!==s){if(1===c.nodeType&&(s===c.getAttribute("slot")||s===c["s-sn"])){r.hidden=!0;break}}else if(1===c.nodeType||3===c.nodeType&&""!==c.textContent.trim()){r.hidden=!0;break}}}catch(t){l.e(t)}finally{l.f()}}t(r)}}}catch(t){n.e(t)}finally{n.f()}},ht=[],dt=function t(e){var i,a,n,r,s=m(e.childNodes);try{for(s.s();!(r=s.n()).done;){var o=r.value;if(o["s-sr"]&&(i=o["s-cr"])&&i.parentNode){a=i.parentNode.childNodes;var l=o["s-sn"],c=function(){if(!(i=a[n])["s-cn"]&&!i["s-nr"]&&i["s-hn"]!==o["s-hn"])if(ut(i,l)){var t=ht.find((function(t){return t.$nodeToRelocate$===i}));S=!0,i["s-sn"]=i["s-sn"]||l,t?(t.$nodeToRelocate$["s-sh"]=o["s-hn"],t.$slotRefNode$=o):(i["s-sh"]=o["s-hn"],ht.push({$slotRefNode$:o,$nodeToRelocate$:i})),i["s-sr"]&&ht.map((function(e){ut(e.$nodeToRelocate$,i["s-sn"])&&(t=ht.find((function(t){return t.$nodeToRelocate$===i})))&&!e.$slotRefNode$&&(e.$slotRefNode$=t.$slotRefNode$)}))}else ht.some((function(t){return t.$nodeToRelocate$===i}))||ht.push({$nodeToRelocate$:i})};for(n=a.length-1;n>=0;n--)c()}1===o.nodeType&&t(o)}}catch(t){s.e(t)}finally{s.f()}},ut=function(t,e){return 1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e},pt=function t(e){e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(t)},ft=function(t,e){e&&!t.$onRenderResolve$&&e["s-p"]&&e["s-p"].push(new Promise((function(e){return t.$onRenderResolve$=e})))},gt=function(t,e){if(t.$flags$|=16,!(4&t.$flags$))return ft(t,t.$ancestorComponent$),ie((function(){return xt(t,e)}));t.$flags$|=512},xt=function(t,e){var i,a=(t.$cmpMeta$.$tagName$,function(){}),n=t.$lazyInstance$;return e&&(t.$flags$|=256,t.$queuedListeners$&&(t.$queuedListeners$.map((function(t){var e=(0,d.Z)(t,2),i=e[0],a=e[1];return St(n,i,a)})),t.$queuedListeners$=void 0),i=St(n,"componentWillLoad")),a(),mt(i,(function(){return vt(t,n,e)}))},mt=function(t,e){return bt(t)?t.then(e):e()},bt=function(t){return t instanceof Promise||t&&t.then&&"function"==typeof t.then},vt=function(){var t=(0,h.Z)(g().mark((function t(e,i,a){var n,r,s,o,l;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.$hostElement$,e.$cmpMeta$.$tagName$,function(){},s=r["s-rc"],a&&j(e),e.$cmpMeta$.$tagName$,function(){},yt(e,i,r,a),s&&(s.map((function(t){return t()})),r["s-rc"]=void 0),o=null!==(n=r["s-p"])&&void 0!==n?n:[],l=function(){return wt(e)},0===o.length?l():(Promise.all(o).then(l),e.$flags$|=4,o.length=0);case 12:case"end":return t.stop()}}),t)})));return function(_x,e,i){return t.apply(this,arguments)}}(),yt=function(t,e,i,a){try{e=e.render(),t.$flags$&=-17,t.$flags$|=2,function(t,e){var i,a,n,r,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t.$hostElement$,l=t.$cmpMeta$,c=t.$vnode$||R(null,null),h=z(e)?e:O(null,null,e);if(w=o.tagName,l.$attrsToReflect$&&(h.$attrs$=h.$attrs$||{},l.$attrsToReflect$.map((function(t){var e=(0,d.Z)(t,2),i=e[0],a=e[1];return h.$attrs$[a]=o[i]}))),s&&h.$attrs$)for(var u=0,p=Object.keys(h.$attrs$);u<p.length;u++){var f=p[u];o.hasAttribute(f)&&!["key","ref","style","class"].includes(f)&&(h.$attrs$[f]=o[f])}if(h.$tag$=null,h.$flags$|=4,t.$vnode$=h,h.$elm$=c.$elm$=o.shadowRoot||o,v=o["s-sc"],k=0!=(1&l.$flags$),y=o["s-cr"],S=!1,lt(c,h,s),Gt.$flags$|=1,A){dt(h.$elm$);for(var g=0,x=ht;g<x.length;g++){var m=x[g].$nodeToRelocate$;if(!m["s-ol"]){var b=Vt.createTextNode("");b["s-nr"]=m,m.parentNode.insertBefore(m["s-ol"]=b,m)}}for(var C=0,P=ht;C<P.length;C++){var L=P[C],T=L.$nodeToRelocate$,D=L.$slotRefNode$;if(D){for(var M=D.parentNode,E=D.nextSibling,I=null===(i=T["s-ol"])||void 0===i?void 0:i.previousSibling;I;){var N=null!==(a=I["s-nr"])&&void 0!==a?a:null;if(N&&N["s-sn"]===T["s-sn"]&&M===N.parentNode){for(N=N.nextSibling;N===T||(null==N?void 0:N["s-sr"]);)N=null==N?void 0:N.nextSibling;if(!N||!N["s-nr"]){E=N;break}}I=I.previousSibling}(!E&&M!==T.parentNode||T.nextSibling!==E)&&T!==E&&(!T["s-hn"]&&T["s-ol"]&&(T["s-hn"]=T["s-ol"].parentNode.nodeName),M.insertBefore(T,E),1===T.nodeType&&(T.hidden=null!==(n=T["s-ih"])&&void 0!==n&&n)),T&&"function"==typeof D["s-rf"]&&D["s-rf"](T)}else 1===T.nodeType&&(s&&(T["s-ih"]=null!==(r=T.hidden)&&void 0!==r&&r),T.hidden=!0)}}S&&ct(h.$elm$),Gt.$flags$&=-2,ht.length=0,y=void 0}(t,e,a)}catch(e){Ht(e,t.$hostElement$)}return null},wt=function(t){t.$cmpMeta$.$tagName$;var e=t.$hostElement$,i=t.$lazyInstance$,a=t.$ancestorComponent$;St(i,"componentDidRender"),64&t.$flags$||(t.$flags$|=64,At(e),St(i,"componentDidLoad"),t.$onReadyResolve$(e),a||kt()),t.$onInstanceResolve$(e),t.$onRenderResolve$&&(t.$onRenderResolve$(),t.$onRenderResolve$=void 0),512&t.$flags$&&ee((function(){return gt(t,!1)})),t.$flags$&=-517},kt=function(t){At(Vt.documentElement),ee((function(){return $(jt,"appload",{detail:{namespace:"web-components"}})}))},St=function(t,e,i){if(t&&t[e])try{return t[e](i)}catch(t){Ht(t)}},At=function(t){return t.classList.add("hydrated")},Ct=function(t,e,i){var a,n=t.prototype;if(e.$members$){t.watchers&&(e.$watchers$=t.watchers);var r=Object.entries(e.$members$);if(r.map((function(t){var a=(0,d.Z)(t,2),r=a[0],s=(0,d.Z)(a[1],1)[0];31&s||2&i&&32&s?Object.defineProperty(n,r,{get:function(){return t=r,Ft(this).$instanceValues$.get(t);var t},set:function(t){!function(t,e,i,a){var n,r,s=Ft(t),o=s.$hostElement$,l=s.$instanceValues$.get(e),c=s.$flags$,h=s.$lazyInstance$;n=i,r=a.$members$[e][0],i=null==n||E(n)?n:4&r?"false"!==n&&(""===n||!!n):2&r?parseFloat(n):1&r?String(n):n;var d=Number.isNaN(l)&&Number.isNaN(i);if((!(8&c)||void 0===l)&&i!==l&&!d&&(s.$instanceValues$.set(e,i),h)){if(a.$watchers$&&128&c){var u=a.$watchers$[e];u&&u.map((function(t){try{h[t](i,l,e)}catch(t){Ht(t,o)}}))}2==(18&c)&>(s,!1)}}(this,r,t,e)},configurable:!0,enumerable:!0}):1&i&&64&s&&Object.defineProperty(n,r,{value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var a,n=Ft(this);return null===(a=null==n?void 0:n.$onInstancePromise$)||void 0===a?void 0:a.then((function(){var t,i;return null===(i=n.$lazyInstance$)||void 0===i?void 0:(t=i)[r].apply(t,e)}))}})})),1&i){var s=new Map;n.attributeChangedCallback=function(t,i,a){var r=this;Gt.jmp((function(){var o,l=s.get(t);if(r.hasOwnProperty(l))a=r[l],delete r[l];else{if(n.hasOwnProperty(l)&&"number"==typeof r[l]&&r[l]==a)return;if(null==l){var c=Ft(r),h=null==c?void 0:c.$flags$;if(h&&!(8&h)&&128&h&&a!==i){var d=c.$lazyInstance$,u=null===(o=e.$watchers$)||void 0===o?void 0:o[t];null==u||u.forEach((function(e){null!=d[e]&&d[e].call(d,a,i,t)}))}return}}r[l]=(null!==a||"boolean"!=typeof r[l])&&a}))},t.observedAttributes=Array.from(new Set([].concat((0,u.Z)(Object.keys(null!==(a=e.$watchers$)&&void 0!==a?a:{})),(0,u.Z)(r.filter((function(t){var e=(0,d.Z)(t,2);return e[0],15&e[1][0]})).map((function(t){var i,a=(0,d.Z)(t,2),n=a[0],r=a[1],o=r[1]||n;return s.set(o,n),512&r[0]&&(null===(i=e.$attrsToReflect$)||void 0===i||i.push([n,o])),o}))))))}}return t},Pt=function(){var t=(0,h.Z)(g().mark((function t(e,i,a,n){var r,s,o,l,c,h;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!=(32&i.$flags$)){t.next=23;break}if(i.$flags$|=32,!a.$lazyBundleId$){t.next=20;break}if(!(r=Bt(a)).then){t.next=11;break}return s=function(){},t.next=9,r;case 9:r=t.sent,s();case 11:r.isProxied||(a.$watchers$=r.watchers,Ct(r,a,2),r.isProxied=!0),a.$tagName$,function(){},i.$flags$|=8;try{new r(i)}catch(t){Ht(t)}i.$flags$&=-9,i.$flags$|=128,t.next=22;break;case 20:r=e.constructor,customElements.whenDefined(a.$tagName$).then((function(){return i.$flags$|=128}));case 22:r.style&&(o=r.style,l=V(a),Wt.has(l)||(a.$tagName$,function(){},W(l,o,!!(1&a.$flags$))));case 23:c=i.$ancestorComponent$,h=function(){return gt(i,!0)},c&&c["s-rc"]?c["s-rc"].push(h):h();case 26:case"end":return t.stop()}}),t)})));return function(e,i,a,n){return t.apply(this,arguments)}}(),Lt=function(t){if(0==(1&Gt.$flags$)){var e=Ft(t),i=e.$cmpMeta$,a=(i.$tagName$,function(){});if(1&e.$flags$)It(t,e,i.$listeners$),(null==e?void 0:e.$lazyInstance$)||(null==e?void 0:e.$onReadyPromise$)&&e.$onReadyPromise$.then((function(){}));else{e.$flags$|=1,12&i.$flags$&&Tt(t);for(var n=t;n=n.parentNode||n.host;)if(n["s-p"]){ft(e,e.$ancestorComponent$=n);break}i.$members$&&Object.entries(i.$members$).map((function(e){var i=(0,d.Z)(e,2),a=i[0];if(31&(0,d.Z)(i[1],1)[0]&&t.hasOwnProperty(a)){var n=t[a];delete t[a],t[a]=n}})),Pt(t,e,i)}a()}},Tt=function(t){var e=t["s-cr"]=Vt.createComment("");e["s-cn"]=!0,t.insertBefore(e,t.firstChild)},Dt=function(t){St(t,"disconnectedCallback")},Mt=function(){var t=(0,h.Z)(g().mark((function t(e){var i;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:0==(1&Gt.$flags$)&&((i=Ft(e)).$rmListeners$&&(i.$rmListeners$.map((function(t){return t()})),i.$rmListeners$=void 0),(null==i?void 0:i.$lazyInstance$)?Dt(i.$lazyInstance$):(null==i?void 0:i.$onReadyPromise$)&&i.$onReadyPromise$.then((function(){return Dt(i.$lazyInstance$)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Et=function(t){var e,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=function(){},h=[],d=o.exclude||[],u=jt.customElements,p=Vt.head,f=p.querySelector("meta[charset]"),g=Vt.createElement("style"),m=[],b=!0;Object.assign(Gt,o),Gt.$resourcesUrl$=new URL(o.resourcesUrl||"./",Vt.baseURI).href;var v=!1;if(t.map((function(t){t[1].map((function(e){var o,l={$flags$:e[0],$tagName$:e[1],$members$:e[2],$listeners$:e[3]};4&l.$flags$&&(v=!0),l.$members$=e[2],l.$listeners$=e[3],l.$attrsToReflect$=[],l.$watchers$=null!==(o=e[4])&&void 0!==o?o:{};var p=l.$tagName$,f=function(t){(0,s.Z)(o,t);var e=x(o);function o(t){var i;return(0,a.Z)(this,o),i=e.call(this,t),t=(0,r.Z)(i),Xt(t,l),1&l.$flags$&&t.attachShadow({mode:"open"}),i}return(0,n.Z)(o,[{key:"connectedCallback",value:function(){var t=this;i&&(clearTimeout(i),i=null),b?m.push(this):Gt.jmp((function(){return Lt(t)}))}},{key:"disconnectedCallback",value:function(){var t=this;Gt.jmp((function(){return Mt(t)}))}},{key:"componentOnReady",value:function(){return Ft(this).$onReadyPromise$}}]),o}((0,c.Z)(HTMLElement));l.$lazyBundleId$=t[0],d.includes(p)||u.get(p)||(h.push(p),u.define(p,Ct(f,l,1)))}))})),h.length>0&&(v&&(g.textContent+=T),g.textContent+=h+L,g.innerHTML.length)){g.setAttribute("data-styles","");var y=null!==(e=Gt.$nonce$)&&void 0!==e?e:I(Vt);null!=y&&g.setAttribute("nonce",y),p.insertBefore(g,f?f.nextSibling:p.firstChild)}b=!1,m.length?m.map((function(t){return t.connectedCallback()})):Gt.jmp((function(){return i=setTimeout(kt,30)})),l()},It=function(t,e,i,a){i&&i.map((function(i){var a=(0,d.Z)(i,3),n=a[0],r=a[1],s=a[2],o=Rt(t,n),l=Ot(e,s),c=Nt(n);Gt.ael(o,r,l,c),(e.$rmListeners$=e.$rmListeners$||[]).push((function(){return Gt.rel(o,r,l,c)}))}))},Ot=function(t,e){return function(i){try{256&t.$flags$?t.$lazyInstance$[e](i):(t.$queuedListeners$=t.$queuedListeners$||[]).push([e,i])}catch(t){Ht(t)}}},Rt=function(t,e){return 8&e?jt:t},Nt=function(t){return Zt?{passive:0!=(1&t),capture:0!=(2&t)}:0!=(2&t)},zt=new WeakMap,Ft=function(t){return zt.get(t)},Yt=function(t,e){return zt.set(e.$lazyInstance$=t,e)},Xt=function(t,e){var i={$flags$:0,$hostElement$:t,$cmpMeta$:e,$instanceValues$:new Map};return i.$onInstancePromise$=new Promise((function(t){return i.$onInstanceResolve$=t})),i.$onReadyPromise$=new Promise((function(t){return i.$onReadyResolve$=t})),t["s-p"]=[],t["s-rc"]=[],It(t,i,e.$listeners$),zt.set(t,i)},_t=function(t,e){return e in t},Ht=function(t,e){return(0,console.error)(t,e)},$t=new Map,Bt=function(t,e,a){var n=t.$tagName$.replace(/-/g,"_"),r=t.$lazyBundleId$,s=$t.get(r);return s?s[n]:i(7202)("./".concat(r,".entry.js")).then((function(t){return $t.set(r,t),t[n]}),Ht)},Wt=new Map,jt="undefined"!=typeof window?window:{},Vt=jt.document||{head:{}},Gt={$flags$:0,$resourcesUrl$:"",jmp:function(t){return t()},raf:function(t){return requestAnimationFrame(t)},ael:function(t,e,i,a){return t.addEventListener(e,i,a)},rel:function(t,e,i,a){return t.removeEventListener(e,i,a)},ce:function(t,e){return new CustomEvent(t,e)}},Zt=function(){var t=!1;try{Vt.addEventListener("e",null,Object.defineProperty({},"passive",{get:function(){t=!0}}))}catch(t){}return t}(),Ut=function(){try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1}(),qt=[],Jt=[],Qt=function(t,e){return function(i){t.push(i),P||(P=!0,e&&4&Gt.$flags$?ee(te):Gt.raf(te))}},Kt=function(t){for(var e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){Ht(t)}t.length=0},te=function t(){Kt(qt),Kt(Jt),(P=qt.length>0)&&Gt.raf(t)},ee=function(t){return Promise.resolve(undefined).then(t)},ie=Qt(Jt,!0)},4184:function(t,e){var i;!function(){"use strict";var a={}.hasOwnProperty;function n(){for(var t=[],e=0;e<arguments.length;e++){var i=arguments[e];if(i){var r=typeof i;if("string"===r||"number"===r)t.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&t.push(s)}}else if("object"===r){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){t.push(i.toString());continue}for(var o in i)a.call(i,o)&&i[o]&&t.push(o)}}}return t.join(" ")}t.exports?(n.default=n,t.exports=n):void 0===(i=function(){return n}.apply(e,[]))||(t.exports=i)}()},8679:function(t,e,i){"use strict";var a=i(9864),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function l(t){return a.isMemo(t)?s:o[t.$$typeof]||n}o[a.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[a.Memo]=s;var c=Object.defineProperty,h=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;t.exports=function t(e,i,a){if("string"!=typeof i){if(f){var n=p(i);n&&n!==f&&t(e,n,a)}var s=h(i);d&&(s=s.concat(d(i)));for(var o=l(e),g=l(i),x=0;x<s.length;++x){var m=s[x];if(!(r[m]||a&&a[m]||g&&g[m]||o&&o[m])){var b=u(i,m);try{c(e,m,b)}catch(t){}}}}return e}},7466:function(t){window,t.exports=function(t){var e={};function i(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,a){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(a,n,function(e){return t[e]}.bind(null,n));return a},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=4)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(e,i,a){void 0===e&&(e=null),void 0===i&&(i=null),void 0===a&&(a="en-US"),this.dateInstance="object"==typeof i&&null!==i?i.parse(e instanceof t?e.clone().toJSDate():e):"string"==typeof i?t.parseDateTime(e,i,a):e?t.parseDateTime(e):t.parseDateTime(new Date),this.lang=a}return t.parseDateTime=function(e,i,a){if(void 0===i&&(i="YYYY-MM-DD"),void 0===a&&(a="en-US"),!e)return new Date(NaN);if(e instanceof Date)return new Date(e);if(e instanceof t)return e.clone().toJSDate();if(/^-?\d{10,}$/.test(e))return t.getDateZeroTime(new Date(Number(e)));if("string"==typeof e){for(var n=[],r=null;null!=(r=t.regex.exec(i));)"\\"!==r[1]&&n.push(r);if(n.length){var s={year:null,month:null,shortMonth:null,longMonth:null,day:null,value:""};n[0].index>0&&(s.value+=".*?");for(var o=0,l=Object.entries(n);o<l.length;o++){var c=l[o],h=c[0],d=c[1],u=Number(h),p=t.formatPatterns(d[0],a),f=p.group,g=p.pattern;s[f]=u+1,s.value+=g,s.value+=".*?"}var x=new RegExp("^"+s.value+"$");if(x.test(e)){var m=x.exec(e),b=Number(m[s.year]),v=null;s.month?v=Number(m[s.month])-1:s.shortMonth?v=t.shortMonths(a).indexOf(m[s.shortMonth]):s.longMonth&&(v=t.longMonths(a).indexOf(m[s.longMonth]));var y=Number(m[s.day])||1;return new Date(b,v,y,0,0,0,0)}}}return t.getDateZeroTime(new Date(e))},t.convertArray=function(e,i){return e.map((function(e){return e instanceof Array?e.map((function(e){return new t(e,i)})):new t(e,i)}))},t.getDateZeroTime=function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},t.shortMonths=function(e){return t.MONTH_JS.map((function(t){return new Date(2019,t).toLocaleString(e,{month:"short"})}))},t.longMonths=function(e){return t.MONTH_JS.map((function(t){return new Date(2019,t).toLocaleString(e,{month:"long"})}))},t.formatPatterns=function(e,i){switch(e){case"YY":case"YYYY":return{group:"year",pattern:"(\\d{"+e.length+"})"};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:"("+t.shortMonths(i).join("|")+")"};case"MMMM":return{group:"longMonth",pattern:"("+t.longMonths(i).join("|")+")"};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"}}},t.prototype.toJSDate=function(){return this.dateInstance},t.prototype.toLocaleString=function(t,e){return this.dateInstance.toLocaleString(t,e)},t.prototype.toDateString=function(){return this.dateInstance.toDateString()},t.prototype.getSeconds=function(){return this.dateInstance.getSeconds()},t.prototype.getDay=function(){return this.dateInstance.getDay()},t.prototype.getTime=function(){return this.dateInstance.getTime()},t.prototype.getDate=function(){return this.dateInstance.getDate()},t.prototype.getMonth=function(){return this.dateInstance.getMonth()},t.prototype.getFullYear=function(){return this.dateInstance.getFullYear()},t.prototype.setMonth=function(t){return this.dateInstance.setMonth(t)},t.prototype.setHours=function(t,e,i,a){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===a&&(a=0),this.dateInstance.setHours(t,e,i,a)},t.prototype.setSeconds=function(t){return this.dateInstance.setSeconds(t)},t.prototype.setDate=function(t){return this.dateInstance.setDate(t)},t.prototype.setFullYear=function(t){return this.dateInstance.setFullYear(t)},t.prototype.getWeek=function(t){var e=new Date(this.timestamp()),i=(this.getDay()+(7-t))%7;e.setDate(e.getDate()-i);var a=e.getTime();return e.setMonth(0,1),e.getDay()!==t&&e.setMonth(0,1+(4-e.getDay()+7)%7),1+Math.ceil((a-e.getTime())/6048e5)},t.prototype.clone=function(){return new t(this.toJSDate())},t.prototype.isBetween=function(t,e,i){switch(void 0===i&&(i="()"),i){default:case"()":return this.timestamp()>t.getTime()&&this.timestamp()<e.getTime();case"[)":return this.timestamp()>=t.getTime()&&this.timestamp()<e.getTime();case"(]":return this.timestamp()>t.getTime()&&this.timestamp()<=e.getTime();case"[]":return this.timestamp()>=t.getTime()&&this.timestamp()<=e.getTime()}},t.prototype.isBefore=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return t.getTime()>this.getTime();case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return t.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")},t.prototype.isSameOrBefore=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return t.getTime()>=this.getTime();case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")},t.prototype.isAfter=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()>t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(t.getFullYear(),t.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>t.getFullYear()}throw new Error("isAfter: Invalid unit!")},t.prototype.isSameOrAfter=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()>=t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")},t.prototype.isSame=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()===t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")},t.prototype.add=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":this.setSeconds(this.getSeconds()+t);break;case"day":case"days":this.setDate(this.getDate()+t);break;case"month":case"months":this.setMonth(this.getMonth()+t)}return this},t.prototype.subtract=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":this.setSeconds(this.getSeconds()-t);break;case"day":case"days":this.setDate(this.getDate()-t);break;case"month":case"months":this.setMonth(this.getMonth()-t)}return this},t.prototype.diff=function(t,e){switch(void 0===e&&(e="seconds"),e){default:case"second":case"seconds":return this.getTime()-t.getTime();case"day":case"days":return Math.round((this.timestamp()-t.getTime())/864e5);case"month":case"months":}},t.prototype.format=function(e,i){if(void 0===i&&(i="en-US"),"object"==typeof e)return e.output(this.clone().toJSDate());for(var a="",n=[],r=null;null!=(r=t.regex.exec(e));)"\\"!==r[1]&&n.push(r);if(n.length){n[0].index>0&&(a+=e.substring(0,n[0].index));for(var s=0,o=Object.entries(n);s<o.length;s++){var l=o[s],c=l[0],h=l[1],d=Number(c);a+=this.formatTokens(h[0],i),n[d+1]&&(a+=e.substring(h.index+h[0].length,n[d+1].index)),d===n.length-1&&(a+=e.substring(h.index+h[0].length))}}return a.replace(/\\/g,"")},t.prototype.timestamp=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()},t.prototype.formatTokens=function(e,i){switch(e){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return("0"+(this.getMonth()+1)).slice(-2);case"MMM":return t.shortMonths(i)[this.getMonth()];case"MMMM":return t.longMonths(i)[this.getMonth()];case"D":return String(this.getDate());case"DD":return("0"+this.getDate()).slice(-2);default:return""}},t.regex=/(\\)?(Y{2,4}|M{1,4}|D{1,2}|d{1,4})/g,t.MONTH_JS=[0,1,2,3,4,5,6,7,8,9,10,11],t}();e.DateTime=a},function(t,e,i){"use strict";var a,n=this&&this.__extends||(a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var a=Array(t),n=0;for(e=0;e<i;e++)for(var r=arguments[e],s=0,o=r.length;s<o;s++,n++)a[n]=r[s];return a};Object.defineProperty(e,"__esModule",{value:!0});var s=i(5),o=i(0),l=i(3),c=i(2),h=function(t){function e(e){var i=t.call(this,e)||this;return i.preventClick=!1,i.bindEvents(),i}return n(e,t),e.prototype.scrollToDate=function(t){if(this.options.scrollToDate){var e=this.options.startDate instanceof o.DateTime?this.options.startDate.clone():null,i=this.options.endDate instanceof o.DateTime?this.options.endDate.clone():null;!this.options.startDate||t&&t!==this.options.element?t&&this.options.endDate&&t===this.options.elementEnd&&(i.setDate(1),this.options.numberOfMonths>1&&i.isAfter(e)&&i.setMonth(i.getMonth()-(this.options.numberOfMonths-1)),this.calendars[0]=i.clone()):(e.setDate(1),this.calendars[0]=e.clone())}},e.prototype.bindEvents=function(){document.addEventListener("click",this.onClick.bind(this),!0),this.ui=document.createElement("div"),this.ui.className=l.litepicker,this.ui.style.display="none",this.ui.addEventListener("mouseenter",this.onMouseEnter.bind(this),!0),this.ui.addEventListener("mouseleave",this.onMouseLeave.bind(this),!1),this.options.autoRefresh?(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("keyup",this.onInput.bind(this),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("keyup",this.onInput.bind(this),!0)):(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("change",this.onInput.bind(this),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("change",this.onInput.bind(this),!0)),this.options.parentEl?this.options.parentEl instanceof HTMLElement?this.options.parentEl.appendChild(this.ui):document.querySelector(this.options.parentEl).appendChild(this.ui):this.options.inlineMode?this.options.element instanceof HTMLInputElement?this.options.element.parentNode.appendChild(this.ui):this.options.element.appendChild(this.ui):document.body.appendChild(this.ui),this.updateInput(),this.init(),"function"==typeof this.options.setup&&this.options.setup.call(this,this),this.render(),this.options.inlineMode&&this.show()},e.prototype.updateInput=function(){if(this.options.element instanceof HTMLInputElement){var t=this.options.startDate,e=this.options.endDate;if(this.options.singleMode&&t)this.options.element.value=t.format(this.options.format,this.options.lang);else if(!this.options.singleMode&&t&&e){var i=t.format(this.options.format,this.options.lang),a=e.format(this.options.format,this.options.lang);this.options.elementEnd instanceof HTMLInputElement?(this.options.element.value=i,this.options.elementEnd.value=a):this.options.element.value=""+i+this.options.delimiter+a}t||e||(this.options.element.value="",this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.value=""))}},e.prototype.isSamePicker=function(t){return t.closest("."+l.litepicker)===this.ui},e.prototype.shouldShown=function(t){return!t.disabled&&(t===this.options.element||this.options.elementEnd&&t===this.options.elementEnd)},e.prototype.shouldResetDatePicked=function(){return this.options.singleMode||2===this.datePicked.length},e.prototype.shouldSwapDatePicked=function(){return 2===this.datePicked.length&&this.datePicked[0].getTime()>this.datePicked[1].getTime()},e.prototype.shouldCheckLockDays=function(){return this.options.disallowLockDaysInRange&&2===this.datePicked.length},e.prototype.onClick=function(t){var e=t.target;if(t.target.shadowRoot&&(e=t.composedPath()[0]),e&&this.ui)if(this.shouldShown(e))this.show(e);else if(e.closest("."+l.litepicker)||!this.isShowning()){if(this.isSamePicker(e))if(this.emit("before:click",e),this.preventClick)this.preventClick=!1;else{if(e.classList.contains(l.dayItem)){if(t.preventDefault(),e.classList.contains(l.isLocked))return;if(this.shouldResetDatePicked()&&(this.datePicked.length=0),this.datePicked[this.datePicked.length]=new o.DateTime(e.dataset.time),this.shouldSwapDatePicked()){var i=this.datePicked[1].clone();this.datePicked[1]=this.datePicked[0].clone(),this.datePicked[0]=i.clone()}return this.shouldCheckLockDays()&&c.rangeIsLocked(this.datePicked,this.options)&&(this.emit("error:range",this.datePicked),this.datePicked.length=0),this.render(),this.emit.apply(this,r(["preselect"],r(this.datePicked).map((function(t){return t.clone()})))),void(this.options.autoApply&&(this.options.singleMode&&this.datePicked.length?(this.setDate(this.datePicked[0]),this.hide()):this.options.singleMode||2!==this.datePicked.length||(this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide())))}if(e.classList.contains(l.buttonPreviousMonth)){t.preventDefault();var a=0,n=this.options.switchingMonths||this.options.numberOfMonths;if(this.options.splitView){var s=e.closest("."+l.monthItem);a=c.findNestedMonthItem(s),n=1}return this.calendars[a].setMonth(this.calendars[a].getMonth()-n),this.gotoDate(this.calendars[a],a),void this.emit("change:month",this.calendars[a],a)}if(e.classList.contains(l.buttonNextMonth))return t.preventDefault(),a=0,n=this.options.switchingMonths||this.options.numberOfMonths,this.options.splitView&&(s=e.closest("."+l.monthItem),a=c.findNestedMonthItem(s),n=1),this.calendars[a].setMonth(this.calendars[a].getMonth()+n),this.gotoDate(this.calendars[a],a),void this.emit("change:month",this.calendars[a],a);e.classList.contains(l.buttonCancel)&&(t.preventDefault(),this.hide(),this.emit("button:cancel")),e.classList.contains(l.buttonApply)&&(t.preventDefault(),this.options.singleMode&&this.datePicked.length?this.setDate(this.datePicked[0]):this.options.singleMode||2!==this.datePicked.length||this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide(),this.emit("button:apply",this.options.startDate,this.options.endDate))}}else this.hide()},e.prototype.showTooltip=function(t,e){var i=this.ui.querySelector("."+l.containerTooltip);i.style.visibility="visible",i.innerHTML=e;var a=this.ui.getBoundingClientRect(),n=i.getBoundingClientRect(),r=t.getBoundingClientRect(),s=r.top,o=r.left;if(this.options.inlineMode&&this.options.parentEl){var c=this.ui.parentNode.getBoundingClientRect();s-=c.top,o-=c.left}else s-=a.top,o-=a.left;s-=n.height,o-=n.width/2,o+=r.width/2,i.style.top=s+"px",i.style.left=o+"px",this.emit("tooltip",i,t)},e.prototype.hideTooltip=function(){this.ui.querySelector("."+l.containerTooltip).style.visibility="hidden"},e.prototype.shouldAllowMouseEnter=function(t){return!this.options.singleMode&&!t.classList.contains(l.isLocked)},e.prototype.shouldAllowRepick=function(){return this.options.elementEnd&&this.options.allowRepick&&this.options.startDate&&this.options.endDate},e.prototype.isDayItem=function(t){return t.classList.contains(l.dayItem)},e.prototype.onMouseEnter=function(t){var e=this,i=t.target;if(this.isDayItem(i)&&this.shouldAllowMouseEnter(i)){if(this.shouldAllowRepick()&&(this.triggerElement===this.options.element?this.datePicked[0]=this.options.endDate.clone():this.triggerElement===this.options.elementEnd&&(this.datePicked[0]=this.options.startDate.clone())),1!==this.datePicked.length)return;var a=this.ui.querySelector("."+l.dayItem+'[data-time="'+this.datePicked[0].getTime()+'"]'),n=this.datePicked[0].clone(),r=new o.DateTime(i.dataset.time),s=!1;if(n.getTime()>r.getTime()){var c=n.clone();n=r.clone(),r=c.clone(),s=!0}if(Array.prototype.slice.call(this.ui.querySelectorAll("."+l.dayItem)).forEach((function(t){var i=new o.DateTime(t.dataset.time),a=e.renderDay(i);i.isBetween(n,r)&&a.classList.add(l.isInRange),t.className=a.className})),i.classList.add(l.isEndDate),s?(a&&a.classList.add(l.isFlipped),i.classList.add(l.isFlipped)):(a&&a.classList.remove(l.isFlipped),i.classList.remove(l.isFlipped)),this.options.showTooltip){var h=r.diff(n,"day")+1;if("function"==typeof this.options.tooltipNumber&&(h=this.options.tooltipNumber.call(this,h)),h>0){var d=this.pluralSelector(h),u=h+" "+(this.options.tooltipText[d]?this.options.tooltipText[d]:"["+d+"]");this.showTooltip(i,u);var p=window.navigator.userAgent,f=/(iphone|ipad)/i.test(p),g=/OS 1([0-2])/i.test(p);f&&g&&i.dispatchEvent(new Event("click"))}else this.hideTooltip()}}},e.prototype.onMouseLeave=function(t){t.target,this.options.allowRepick&&(!this.options.allowRepick||this.options.startDate||this.options.endDate)&&(this.datePicked.length=0,this.render())},e.prototype.onInput=function(t){var e=this.parseInput(),i=e[0],a=e[1],n=this.options.format;if(this.options.elementEnd?i instanceof o.DateTime&&a instanceof o.DateTime&&i.format(n)===this.options.element.value&&a.format(n)===this.options.elementEnd.value:this.options.singleMode?i instanceof o.DateTime&&i.format(n)===this.options.element.value:i instanceof o.DateTime&&a instanceof o.DateTime&&""+i.format(n)+this.options.delimiter+a.format(n)===this.options.element.value){if(a&&i.getTime()>a.getTime()){var r=i.clone();i=a.clone(),a=r.clone()}this.options.startDate=new o.DateTime(i,this.options.format,this.options.lang),a&&(this.options.endDate=new o.DateTime(a,this.options.format,this.options.lang)),this.updateInput(),this.render();var s=i.clone(),l=0;(this.options.elementEnd?i.format(n)===t.target.value:t.target.value.startsWith(i.format(n)))||(s=a.clone(),l=this.options.numberOfMonths-1),this.emit("selected",this.getStartDate(),this.getEndDate()),this.gotoDate(s,l)}},e}(s.Calendar);e.Litepicker=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findNestedMonthItem=function(t){for(var e=t.parentNode.childNodes,i=0;i<e.length;i+=1)if(e.item(i)===t)return i;return 0},e.dateIsLocked=function(t,e,i){var a=!1;return e.lockDays.length&&(a=e.lockDays.filter((function(i){return i instanceof Array?t.isBetween(i[0],i[1],e.lockDaysInclusivity):i.isSame(t,"day")})).length),a||"function"!=typeof e.lockDaysFilter||(a=e.lockDaysFilter.call(this,t.clone(),null,i)),a},e.rangeIsLocked=function(t,e){var i=!1;return e.lockDays.length&&(i=e.lockDays.filter((function(i){if(i instanceof Array){var a=t[0].toDateString()===i[0].toDateString()&&t[1].toDateString()===i[1].toDateString();return i[0].isBetween(t[0],t[1],e.lockDaysInclusivity)||i[1].isBetween(t[0],t[1],e.lockDaysInclusivity)||a}return i.isBetween(t[0],t[1],e.lockDaysInclusivity)})).length),i||"function"!=typeof e.lockDaysFilter||(i=e.lockDaysFilter.call(this,t[0].clone(),t[1].clone(),t)),i}},function(t,e,i){var a=i(8);"string"==typeof a&&(a=[[t.i,a,""]]);var n={insert:function(t){var e=document.querySelector("head"),i=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t)},singleton:!1};i(10)(a,n),a.locals&&(t.exports=a.locals)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i(1);e.Litepicker=a.Litepicker,i(11),window.Litepicker=a.Litepicker,e.default=a.Litepicker},function(t,e,i){"use strict";var a,n=this&&this.__extends||(a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var r=i(6),s=i(0),o=i(3),l=i(2),c=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.render=function(){var t=this;this.emit("before:render",this.ui);var e=document.createElement("div");e.className=o.containerMain;var i=document.createElement("div");i.className=o.containerMonths,o["columns"+this.options.numberOfColumns]&&(i.classList.remove(o.columns2,o.columns3,o.columns4),i.classList.add(o["columns"+this.options.numberOfColumns])),this.options.splitView&&i.classList.add(o.splitView),this.options.showWeekNumbers&&i.classList.add(o.showWeekNumbers);for(var a=this.calendars[0].clone(),n=a.getMonth(),r=a.getMonth()+this.options.numberOfMonths,s=0,l=n;l<r;l+=1){var c=a.clone();c.setDate(1),c.setHours(0,0,0,0),this.options.splitView?c=this.calendars[s].clone():c.setMonth(l),i.appendChild(this.renderMonth(c,s)),s+=1}if(this.ui.innerHTML="",e.appendChild(i),this.options.resetButton){var h=void 0;"function"==typeof this.options.resetButton?h=this.options.resetButton.call(this):((h=document.createElement("button")).type="button",h.className=o.resetButton,h.innerHTML=this.options.buttonText.reset),h.addEventListener("click",(function(e){e.preventDefault(),t.clearSelection()})),e.querySelector("."+o.monthItem+":last-child").querySelector("."+o.monthItemHeader).appendChild(h)}this.ui.appendChild(e),this.options.autoApply&&!this.options.footerHTML||this.ui.appendChild(this.renderFooter()),this.options.showTooltip&&this.ui.appendChild(this.renderTooltip()),this.ui.dataset.plugins=(this.options.plugins||[]).join("|"),this.emit("render",this.ui)},e.prototype.renderMonth=function(t,e){var i=this,a=t.clone(),n=32-new Date(a.getFullYear(),a.getMonth(),32).getDate(),r=document.createElement("div");r.className=o.monthItem;var c=document.createElement("div");c.className=o.monthItemHeader;var h=document.createElement("div");if(this.options.dropdowns.months){var d=document.createElement("select");d.className=o.monthItemName;for(var u=0;u<12;u+=1){var p=document.createElement("option"),f=new s.DateTime(new Date(t.getFullYear(),u,2,0,0,0)),g=new s.DateTime(new Date(t.getFullYear(),u,1,0,0,0));p.value=String(u),p.text=f.toLocaleString(this.options.lang,{month:"long"}),p.disabled=this.options.minDate&&g.isBefore(new s.DateTime(this.options.minDate),"month")||this.options.maxDate&&g.isAfter(new s.DateTime(this.options.maxDate),"month"),p.selected=g.getMonth()===t.getMonth(),d.appendChild(p)}d.addEventListener("change",(function(t){var e=t.target,a=0;if(i.options.splitView){var n=e.closest("."+o.monthItem);a=l.findNestedMonthItem(n)}i.calendars[a].setMonth(Number(e.value)),i.render(),i.emit("change:month",i.calendars[a],a,t)})),h.appendChild(d)}else(f=document.createElement("strong")).className=o.monthItemName,f.innerHTML=t.toLocaleString(this.options.lang,{month:"long"}),h.appendChild(f);if(this.options.dropdowns.years){var x=document.createElement("select");x.className=o.monthItemYear;var m=this.options.dropdowns.minYear,b=this.options.dropdowns.maxYear?this.options.dropdowns.maxYear:(new Date).getFullYear();for(t.getFullYear()>b&&((p=document.createElement("option")).value=String(t.getFullYear()),p.text=String(t.getFullYear()),p.selected=!0,p.disabled=!0,x.appendChild(p)),u=b;u>=m;u-=1){p=document.createElement("option");var v=new s.DateTime(new Date(u,0,1,0,0,0));p.value=String(u),p.text=String(u),p.disabled=this.options.minDate&&v.isBefore(new s.DateTime(this.options.minDate),"year")||this.options.maxDate&&v.isAfter(new s.DateTime(this.options.maxDate),"year"),p.selected=t.getFullYear()===u,x.appendChild(p)}if(t.getFullYear()<m&&((p=document.createElement("option")).value=String(t.getFullYear()),p.text=String(t.getFullYear()),p.selected=!0,p.disabled=!0,x.appendChild(p)),"asc"===this.options.dropdowns.years){var y=Array.prototype.slice.call(x.childNodes).reverse();x.innerHTML="",y.forEach((function(t){t.innerHTML=t.value,x.appendChild(t)}))}x.addEventListener("change",(function(t){var e=t.target,a=0;if(i.options.splitView){var n=e.closest("."+o.monthItem);a=l.findNestedMonthItem(n)}i.calendars[a].setFullYear(Number(e.value)),i.render(),i.emit("change:year",i.calendars[a],a,t)})),h.appendChild(x)}else{var w=document.createElement("span");w.className=o.monthItemYear,w.innerHTML=String(t.getFullYear()),h.appendChild(w)}var k=document.createElement("button");k.type="button",k.className=o.buttonPreviousMonth,k.innerHTML=this.options.buttonText.previousMonth;var S=document.createElement("button");S.type="button",S.className=o.buttonNextMonth,S.innerHTML=this.options.buttonText.nextMonth,c.appendChild(k),c.appendChild(h),c.appendChild(S),this.options.minDate&&a.isSameOrBefore(new s.DateTime(this.options.minDate),"month")&&r.classList.add(o.noPreviousMonth),this.options.maxDate&&a.isSameOrAfter(new s.DateTime(this.options.maxDate),"month")&&r.classList.add(o.noNextMonth);var A=document.createElement("div");A.className=o.monthItemWeekdaysRow,this.options.showWeekNumbers&&(A.innerHTML="<div>W</div>");for(var C=1;C<=7;C+=1){var P=3+this.options.firstDay+C,L=document.createElement("div");L.innerHTML=this.weekdayName(P),L.title=this.weekdayName(P,"long"),A.appendChild(L)}var T=document.createElement("div");T.className=o.containerDays;var D=this.calcSkipDays(a);this.options.showWeekNumbers&&D&&T.appendChild(this.renderWeekNumber(a));for(var M=0;M<D;M+=1){var E=document.createElement("div");T.appendChild(E)}for(M=1;M<=n;M+=1)a.setDate(M),this.options.showWeekNumbers&&a.getDay()===this.options.firstDay&&T.appendChild(this.renderWeekNumber(a)),T.appendChild(this.renderDay(a));return r.appendChild(c),r.appendChild(A),r.appendChild(T),this.emit("render:month",r,t),r},e.prototype.renderDay=function(t){t.setHours();var e=document.createElement("div");if(e.className=o.dayItem,e.innerHTML=String(t.getDate()),e.dataset.time=String(t.getTime()),t.toDateString()===(new Date).toDateString()&&e.classList.add(o.isToday),this.datePicked.length)this.datePicked[0].toDateString()===t.toDateString()&&(e.classList.add(o.isStartDate),this.options.singleMode&&e.classList.add(o.isEndDate)),2===this.datePicked.length&&this.datePicked[1].toDateString()===t.toDateString()&&e.classList.add(o.isEndDate),2===this.datePicked.length&&t.isBetween(this.datePicked[0],this.datePicked[1])&&e.classList.add(o.isInRange);else if(this.options.startDate){var i=this.options.startDate,a=this.options.endDate;i.toDateString()===t.toDateString()&&(e.classList.add(o.isStartDate),this.options.singleMode&&e.classList.add(o.isEndDate)),a&&a.toDateString()===t.toDateString()&&e.classList.add(o.isEndDate),i&&a&&t.isBetween(i,a)&&e.classList.add(o.isInRange)}if(this.options.minDate&&t.isBefore(new s.DateTime(this.options.minDate))&&e.classList.add(o.isLocked),this.options.maxDate&&t.isAfter(new s.DateTime(this.options.maxDate))&&e.classList.add(o.isLocked),this.options.minDays>1&&1===this.datePicked.length){var n=this.options.minDays-1,r=this.datePicked[0].clone().subtract(n,"day"),c=this.datePicked[0].clone().add(n,"day");t.isBetween(r,this.datePicked[0],"(]")&&e.classList.add(o.isLocked),t.isBetween(this.datePicked[0],c,"[)")&&e.classList.add(o.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){var h=this.options.maxDays;r=this.datePicked[0].clone().subtract(h,"day"),c=this.datePicked[0].clone().add(h,"day"),t.isSameOrBefore(r)&&e.classList.add(o.isLocked),t.isSameOrAfter(c)&&e.classList.add(o.isLocked)}return this.options.selectForward&&1===this.datePicked.length&&t.isBefore(this.datePicked[0])&&e.classList.add(o.isLocked),this.options.selectBackward&&1===this.datePicked.length&&t.isAfter(this.datePicked[0])&&e.classList.add(o.isLocked),l.dateIsLocked(t,this.options,this.datePicked)&&e.classList.add(o.isLocked),this.options.highlightedDays.length&&this.options.highlightedDays.filter((function(e){return e instanceof Array?t.isBetween(e[0],e[1],"[]"):e.isSame(t,"day")})).length&&e.classList.add(o.isHighlighted),e.tabIndex=e.classList.contains("is-locked")?-1:0,this.emit("render:day",e,t),e},e.prototype.renderFooter=function(){var t=document.createElement("div");if(t.className=o.containerFooter,this.options.footerHTML?t.innerHTML=this.options.footerHTML:t.innerHTML='\n <span class="'+o.previewDateRange+'"></span>\n <button type="button" class="'+o.buttonCancel+'">'+this.options.buttonText.cancel+'</button>\n <button type="button" class="'+o.buttonApply+'">'+this.options.buttonText.apply+"</button>\n ",this.options.singleMode){if(1===this.datePicked.length){var e=this.datePicked[0].format(this.options.format,this.options.lang);t.querySelector("."+o.previewDateRange).innerHTML=e}}else if(1===this.datePicked.length&&t.querySelector("."+o.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){e=this.datePicked[0].format(this.options.format,this.options.lang);var i=this.datePicked[1].format(this.options.format,this.options.lang);t.querySelector("."+o.previewDateRange).innerHTML=""+e+this.options.delimiter+i}return this.emit("render:footer",t),t},e.prototype.renderWeekNumber=function(t){var e=document.createElement("div"),i=t.getWeek(this.options.firstDay);return e.className=o.weekNumber,e.innerHTML=53===i&&0===t.getMonth()?"53 / 1":i,e},e.prototype.renderTooltip=function(){var t=document.createElement("div");return t.className=o.containerTooltip,t},e.prototype.weekdayName=function(t,e){return void 0===e&&(e="short"),new Date(1970,0,t,12,0,0,0).toLocaleString(this.options.lang,{weekday:e})},e.prototype.calcSkipDays=function(t){var e=t.getDay()-this.options.firstDay;return e<0&&(e+=7),e},e}(r.LPCore);e.Calendar=c},function(t,e,i){"use strict";var a,n=this&&this.__extends||(a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,i=1,a=arguments.length;i<a;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var s=i(7),o=i(0),l=i(1),c=function(t){function e(e){var i=t.call(this)||this;i.datePicked=[],i.calendars=[],i.options={element:null,elementEnd:null,parentEl:null,firstDay:1,format:"YYYY-MM-DD",lang:"en-US",delimiter:" - ",numberOfMonths:1,numberOfColumns:1,startDate:null,endDate:null,zIndex:9999,position:"auto",selectForward:!1,selectBackward:!1,splitView:!1,inlineMode:!1,singleMode:!0,autoApply:!0,allowRepick:!1,showWeekNumbers:!1,showTooltip:!0,scrollToDate:!0,mobileFriendly:!0,resetButton:!1,autoRefresh:!1,lockDaysFormat:"YYYY-MM-DD",lockDays:[],disallowLockDaysInRange:!1,lockDaysInclusivity:"[]",highlightedDaysFormat:"YYYY-MM-DD",highlightedDays:[],dropdowns:{minYear:1990,maxYear:null,months:!1,years:!1},buttonText:{apply:"Apply",cancel:"Cancel",previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',reset:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/>\n </svg>'},tooltipText:{one:"day",other:"days"}},i.options=r(r({},i.options),e.element.dataset),Object.keys(i.options).forEach((function(t){"true"!==i.options[t]&&"false"!==i.options[t]||(i.options[t]="true"===i.options[t])}));var a=r(r({},i.options.dropdowns),e.dropdowns),n=r(r({},i.options.buttonText),e.buttonText),s=r(r({},i.options.tooltipText),e.tooltipText);i.options=r(r({},i.options),e),i.options.dropdowns=r({},a),i.options.buttonText=r({},n),i.options.tooltipText=r({},s),i.options.elementEnd||(i.options.allowRepick=!1),i.options.lockDays.length&&(i.options.lockDays=o.DateTime.convertArray(i.options.lockDays,i.options.lockDaysFormat)),i.options.highlightedDays.length&&(i.options.highlightedDays=o.DateTime.convertArray(i.options.highlightedDays,i.options.highlightedDaysFormat));var l=i.parseInput(),c=l[0],h=l[1];i.options.startDate&&(i.options.singleMode||i.options.endDate)&&(c=new o.DateTime(i.options.startDate,i.options.format,i.options.lang)),c&&i.options.endDate&&(h=new o.DateTime(i.options.endDate,i.options.format,i.options.lang)),c instanceof o.DateTime&&!isNaN(c.getTime())&&(i.options.startDate=c),i.options.startDate&&h instanceof o.DateTime&&!isNaN(h.getTime())&&(i.options.endDate=h),!i.options.singleMode||i.options.startDate instanceof o.DateTime||(i.options.startDate=null),i.options.singleMode||i.options.startDate instanceof o.DateTime&&i.options.endDate instanceof o.DateTime||(i.options.startDate=null,i.options.endDate=null);for(var d=0;d<i.options.numberOfMonths;d+=1){var u=i.options.startDate instanceof o.DateTime?i.options.startDate.clone():new o.DateTime;if(!i.options.startDate&&(0===d||i.options.splitView)){var p=i.options.maxDate?new o.DateTime(i.options.maxDate):null,f=i.options.minDate?new o.DateTime(i.options.minDate):null,g=i.options.numberOfMonths-1;f&&p&&u.isAfter(p)?(u=f.clone()).setDate(1):!f&&p&&u.isAfter(p)&&((u=p.clone()).setDate(1),u.setMonth(u.getMonth()-g))}u.setDate(1),u.setMonth(u.getMonth()+d),i.calendars[d]=u}if(i.options.showTooltip)if(i.options.tooltipPluralSelector)i.pluralSelector=i.options.tooltipPluralSelector;else try{var x=new Intl.PluralRules(i.options.lang);i.pluralSelector=x.select.bind(x)}catch(t){i.pluralSelector=function(t){return 0===Math.abs(t)?"one":"other"}}return i}return n(e,t),e.add=function(t,e){l.Litepicker.prototype[t]=e},e.prototype.DateTime=function(t,e){return t?new o.DateTime(t,e):new o.DateTime},e.prototype.init=function(){var t=this;this.options.plugins&&this.options.plugins.length&&this.options.plugins.forEach((function(e){l.Litepicker.prototype.hasOwnProperty(e)?l.Litepicker.prototype[e].init.call(t,t):console.warn("Litepicker: plugin «"+e+"» not found.")}))},e.prototype.parseInput=function(){var t=this.options.delimiter,e=new RegExp(""+t),i=this.options.element instanceof HTMLInputElement?this.options.element.value.split(t):[];if(this.options.elementEnd){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length)return[new o.DateTime(this.options.element.value,this.options.format),new o.DateTime(this.options.elementEnd.value,this.options.format)]}else if(this.options.singleMode){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length)return[new o.DateTime(this.options.element.value,this.options.format)]}else if(this.options.element instanceof HTMLInputElement&&e.test(this.options.element.value)&&i.length&&i.length%2==0){var a=i.slice(0,i.length/2).join(t),n=i.slice(i.length/2).join(t);return[new o.DateTime(a,this.options.format),new o.DateTime(n,this.options.format)]}return[]},e.prototype.isShowning=function(){return this.ui&&"none"!==this.ui.style.display},e.prototype.findPosition=function(t){var e=t.getBoundingClientRect(),i=this.ui.getBoundingClientRect(),a=this.options.position.split(" "),n=window.scrollX||window.pageXOffset,r=window.scrollY||window.pageYOffset,s=0,o=0;if("auto"!==a[0]&&/top|bottom/.test(a[0]))s=e[a[0]]+r,"top"===a[0]&&(s-=i.height);else{s=e.bottom+r;var l=e.bottom+i.height>window.innerHeight,c=e.top+r-i.height>=i.height;l&&c&&(s=e.top+r-i.height)}if(/left|right/.test(a[0])||a[1]&&"auto"!==a[1]&&/left|right/.test(a[1]))o=/left|right/.test(a[0])?e[a[0]]+n:e[a[1]]+n,"right"!==a[0]&&"right"!==a[1]||(o-=i.width);else{o=e.left+n,l=e.left+i.width>window.innerWidth;var h=e.right+n-i.width>=0;l&&h&&(o=e.right+n-i.width)}return{left:o,top:s}},e}(s.EventEmitter);e.LPCore=c},function(t,e,i){"use strict";var a,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};a=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var l=10;function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function h(t,e,i,a){var n,r,s,o;if("function"!=typeof i)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i);if(void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),r=t._events),s=r[e]),void 0===s)s=r[e]=i,++t._eventsCount;else if("function"==typeof s?s=r[e]=a?[i,s]:[s,i]:a?s.unshift(i):s.push(i),(n=c(t))>0&&s.length>n&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,o=l,console&&console.warn&&console.warn(o)}return t}function d(){for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,r(this.listener,this.target,t))}function u(t,e,i){var a={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},n=d.bind(a);return n.listener=i,a.wrapFn=n,n}function p(t,e,i){var a=t._events;if(void 0===a)return[];var n=a[e];return void 0===n?[]:"function"==typeof n?i?[n.listener||n]:[n]:i?function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(n):g(n,n.length)}function f(t){var e=this._events;if(void 0!==e){var i=e[t];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function g(t,e){for(var i=new Array(e),a=0;a<e;++a)i[a]=t[a];return i}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");l=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);var a="error"===t,n=this._events;if(void 0!==n)a=a&&void 0===n.error;else if(!a)return!1;if(a){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=n[t];if(void 0===l)return!1;if("function"==typeof l)r(l,this,e);else{var c=l.length,h=g(l,c);for(i=0;i<c;++i)r(h[i],this,e)}return!0},o.prototype.addListener=function(t,e){return h(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return h(this,t,e,!0)},o.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.on(t,u(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.prependListener(t,u(this,t,e)),this},o.prototype.removeListener=function(t,e){var i,a,n,r,s;if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);if(void 0===(a=this._events))return this;if(void 0===(i=a[t]))return this;if(i===e||i.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(n=-1,r=i.length-1;r>=0;r--)if(i[r]===e||i[r].listener===e){s=i[r].listener,n=r;break}if(n<0)return this;0===n?i.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(i,n),1===i.length&&(a[t]=i[0]),void 0!==a.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,i,a;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[t]),this;if(0===arguments.length){var n,r=Object.keys(i);for(a=0;a<r.length;++a)"removeListener"!==(n=r[a])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(void 0!==e)for(a=e.length-1;a>=0;a--)this.removeListener(t,e[a]);return this},o.prototype.listeners=function(t){return p(this,t,!0)},o.prototype.rawListeners=function(t){return p(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]}},function(t,e,i){(e=i(9)(!1)).push([t.i,':root{--litepicker-container-months-color-bg: #fff;--litepicker-container-months-box-shadow-color: #ddd;--litepicker-footer-color-bg: #fafafa;--litepicker-footer-box-shadow-color: #ddd;--litepicker-tooltip-color-bg: #fff;--litepicker-month-header-color: #333;--litepicker-button-prev-month-color: #9e9e9e;--litepicker-button-next-month-color: #9e9e9e;--litepicker-button-prev-month-color-hover: #2196f3;--litepicker-button-next-month-color-hover: #2196f3;--litepicker-month-width: calc(var(--litepicker-day-width) * 7);--litepicker-month-weekday-color: #9e9e9e;--litepicker-month-week-number-color: #9e9e9e;--litepicker-day-width: 38px;--litepicker-day-color: #333;--litepicker-day-color-hover: #2196f3;--litepicker-is-today-color: #f44336;--litepicker-is-in-range-color: #bbdefb;--litepicker-is-locked-color: #9e9e9e;--litepicker-is-start-color: #fff;--litepicker-is-start-color-bg: #2196f3;--litepicker-is-end-color: #fff;--litepicker-is-end-color-bg: #2196f3;--litepicker-button-cancel-color: #fff;--litepicker-button-cancel-color-bg: #9e9e9e;--litepicker-button-apply-color: #fff;--litepicker-button-apply-color-bg: #2196f3;--litepicker-button-reset-color: #909090;--litepicker-button-reset-color-hover: #2196f3;--litepicker-highlighted-day-color: #333;--litepicker-highlighted-day-color-bg: #ffeb3b}.show-week-numbers{--litepicker-month-width: calc(var(--litepicker-day-width) * 8)}.litepicker{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:0.8em;display:none}.litepicker button{border:none;background:none}.litepicker .container__main{display:-webkit-box;display:-ms-flexbox;display:flex}.litepicker .container__months{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:var(--litepicker-container-months-color-bg);border-radius:5px;-webkit-box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);width:calc(var(--litepicker-month-width) + 10px);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months.columns-2{width:calc((var(--litepicker-month-width) * 2) + 20px)}.litepicker .container__months.columns-3{width:calc((var(--litepicker-month-width) * 3) + 30px)}.litepicker .container__months.columns-4{width:calc((var(--litepicker-month-width) * 4) + 40px)}.litepicker .container__months.split-view .month-item-header .button-previous-month,.litepicker .container__months.split-view .month-item-header .button-next-month{visibility:visible}.litepicker .container__months .month-item{padding:5px;width:var(--litepicker-month-width);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months .month-item-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:500;padding:10px 5px;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--litepicker-month-header-color)}.litepicker .container__months .month-item-header div{-webkit-box-flex:1;-ms-flex:1;flex:1}.litepicker .container__months .month-item-header div>.month-item-name{margin-right:5px}.litepicker .container__months .month-item-header div>.month-item-year{padding:0}.litepicker .container__months .month-item-header .reset-button{color:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button>svg{fill:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button *{pointer-events:none}.litepicker .container__months .month-item-header .reset-button:hover{color:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .reset-button:hover>svg{fill:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .button-previous-month,.litepicker .container__months .month-item-header .button-next-month{visibility:hidden;text-decoration:none;padding:3px 5px;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__months .month-item-header .button-previous-month *,.litepicker .container__months .month-item-header .button-next-month *{pointer-events:none}.litepicker .container__months .month-item-header .button-previous-month{color:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month>svg,.litepicker .container__months .month-item-header .button-previous-month>img{fill:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month:hover{color:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-previous-month:hover>svg{fill:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month{color:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month>svg,.litepicker .container__months .month-item-header .button-next-month>img{fill:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month:hover{color:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month:hover>svg{fill:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-weekdays-row{display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;color:var(--litepicker-month-weekday-color)}.litepicker .container__months .month-item-weekdays-row>div{padding:5px 0;font-size:85%;-webkit-box-flex:1;-ms-flex:1;flex:1;width:var(--litepicker-day-width);text-align:center}.litepicker .container__months .month-item:first-child .button-previous-month{visibility:visible}.litepicker .container__months .month-item:last-child .button-next-month{visibility:visible}.litepicker .container__months .month-item.no-previous-month .button-previous-month{visibility:hidden}.litepicker .container__months .month-item.no-next-month .button-next-month{visibility:hidden}.litepicker .container__days{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:center;-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__days>div,.litepicker .container__days>a{padding:5px 0;width:var(--litepicker-day-width)}.litepicker .container__days .day-item{color:var(--litepicker-day-color);text-align:center;text-decoration:none;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__days .day-item:hover{color:var(--litepicker-day-color-hover);-webkit-box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover);box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover)}.litepicker .container__days .day-item.is-today{color:var(--litepicker-is-today-color)}.litepicker .container__days .day-item.is-locked{color:var(--litepicker-is-locked-color)}.litepicker .container__days .day-item.is-locked:hover{color:var(--litepicker-is-locked-color);-webkit-box-shadow:none;box-shadow:none;cursor:default}.litepicker .container__days .day-item.is-in-range{background-color:var(--litepicker-is-in-range-color);border-radius:0}.litepicker .container__days .day-item.is-start-date{color:var(--litepicker-is-start-color);background-color:var(--litepicker-is-start-color-bg);border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-flipped{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date{color:var(--litepicker-is-end-color);background-color:var(--litepicker-is-end-color-bg);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date.is-flipped{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-end-date{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-highlighted{color:var(--litepicker-highlighted-day-color);background-color:var(--litepicker-highlighted-day-color-bg)}.litepicker .container__days .week-number{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--litepicker-month-week-number-color);font-size:85%}.litepicker .container__footer{text-align:right;padding:10px 5px;margin:0 5px;background-color:var(--litepicker-footer-color-bg);-webkit-box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.litepicker .container__footer .preview-date-range{margin-right:10px;font-size:90%}.litepicker .container__footer .button-cancel{background-color:var(--litepicker-button-cancel-color-bg);color:var(--litepicker-button-cancel-color);border:0;padding:3px 7px 4px;border-radius:3px}.litepicker .container__footer .button-cancel *{pointer-events:none}.litepicker .container__footer .button-apply{background-color:var(--litepicker-button-apply-color-bg);color:var(--litepicker-button-apply-color);border:0;padding:3px 7px 4px;border-radius:3px;margin-left:10px;margin-right:10px}.litepicker .container__footer .button-apply:disabled{opacity:0.7}.litepicker .container__footer .button-apply *{pointer-events:none}.litepicker .container__tooltip{position:absolute;margin-top:-4px;padding:4px 8px;border-radius:4px;background-color:var(--litepicker-tooltip-color-bg);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25);box-shadow:0 1px 3px rgba(0,0,0,0.25);white-space:nowrap;font-size:11px;pointer-events:none;visibility:hidden}.litepicker .container__tooltip:before{position:absolute;bottom:-5px;left:calc(50% - 5px);border-top:5px solid rgba(0,0,0,0.12);border-right:5px solid transparent;border-left:5px solid transparent;content:""}.litepicker .container__tooltip:after{position:absolute;bottom:-4px;left:calc(50% - 4px);border-top:4px solid var(--litepicker-tooltip-color-bg);border-right:4px solid transparent;border-left:4px solid transparent;content:""}\n',""]),e.locals={showWeekNumbers:"show-week-numbers",litepicker:"litepicker",containerMain:"container__main",containerMonths:"container__months",columns2:"columns-2",columns3:"columns-3",columns4:"columns-4",splitView:"split-view",monthItemHeader:"month-item-header",buttonPreviousMonth:"button-previous-month",buttonNextMonth:"button-next-month",monthItem:"month-item",monthItemName:"month-item-name",monthItemYear:"month-item-year",resetButton:"reset-button",monthItemWeekdaysRow:"month-item-weekdays-row",noPreviousMonth:"no-previous-month",noNextMonth:"no-next-month",containerDays:"container__days",dayItem:"day-item",isToday:"is-today",isLocked:"is-locked",isInRange:"is-in-range",isStartDate:"is-start-date",isFlipped:"is-flipped",isEndDate:"is-end-date",isHighlighted:"is-highlighted",weekNumber:"week-number",containerFooter:"container__footer",previewDateRange:"preview-date-range",buttonCancel:"button-cancel",buttonApply:"button-apply",containerTooltip:"container__tooltip"},t.exports=e},function(t,e,i){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i,a,n,r=t[1]||"",s=t[3];if(!s)return r;if(e&&"function"==typeof btoa){var o=(i=s,a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(n," */")),l=s.sources.map((function(t){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(t," */")}));return[r].concat(l).concat([o]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,a){"string"==typeof t&&(t=[[null,t,""]]);var n={};if(a)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(n[s]=!0)}for(var o=0;o<t.length;o++){var l=[].concat(t[o]);a&&n[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),e.push(l))}},e}},function(t,e,i){"use strict";var a,n={},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}();function s(t,e){for(var i=[],a={},n=0;n<t.length;n++){var r=t[n],s=e.base?r[0]+e.base:r[0],o={css:r[1],media:r[2],sourceMap:r[3]};a[s]?a[s].parts.push(o):i.push(a[s]={id:s,parts:[o]})}return i}function o(t,e){for(var i=0;i<t.length;i++){var a=t[i],r=n[a.id],s=0;if(r){for(r.refs++;s<r.parts.length;s++)r.parts[s](a.parts[s]);for(;s<a.parts.length;s++)r.parts.push(g(a.parts[s],e))}else{for(var o=[];s<a.parts.length;s++)o.push(g(a.parts[s],e));n[a.id]={id:a.id,refs:1,parts:o}}}}function l(t){var e=document.createElement("style");if(void 0===t.attributes.nonce){var a=i.nc;a&&(t.attributes.nonce=a)}if(Object.keys(t.attributes).forEach((function(i){e.setAttribute(i,t.attributes[i])})),"function"==typeof t.insert)t.insert(e);else{var n=r(t.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}return e}var c,h=(c=[],function(t,e){return c[t]=e,c.filter(Boolean).join("\n")});function d(t,e,i,a){var n=i?"":a.css;if(t.styleSheet)t.styleSheet.cssText=h(e,n);else{var r=document.createTextNode(n),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function u(t,e,i){var a=i.css,n=i.media,r=i.sourceMap;if(n&&t.setAttribute("media",n),r&&btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=a;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(a))}}var p=null,f=0;function g(t,e){var i,a,n;if(e.singleton){var r=f++;i=p||(p=l(e)),a=d.bind(null,i,r,!1),n=d.bind(null,i,r,!0)}else i=l(e),a=u.bind(null,i,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else n()}}t.exports=function(t,e){(e=e||{}).attributes="object"==typeof e.attributes?e.attributes:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===a&&(a=Boolean(window&&document&&document.all&&!window.atob)),a));var i=s(t,e);return o(i,e),function(t){for(var a=[],r=0;r<i.length;r++){var l=i[r],c=n[l.id];c&&(c.refs--,a.push(c))}t&&o(s(t,e),e);for(var h=0;h<a.length;h++){var d=a[h];if(0===d.refs){for(var u=0;u<d.parts.length;u++)d.parts[u]();delete n[d.id]}}}}},function(t,e,i){"use strict";var a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,i=1,a=arguments.length;i<a;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(1),s=i(2);r.Litepicker.prototype.show=function(t){void 0===t&&(t=null),this.emit("before:show",t);var e=t||this.options.element;if(this.triggerElement=e,!this.isShowning()){if(this.options.inlineMode)return this.ui.style.position="relative",this.ui.style.display="inline-block",this.ui.style.top=null,this.ui.style.left=null,this.ui.style.bottom=null,void(this.ui.style.right=null);this.scrollToDate(t),this.render(),this.ui.style.position="absolute",this.ui.style.display="block",this.ui.style.zIndex=this.options.zIndex;var i=this.findPosition(e);this.ui.style.top=i.top+"px",this.ui.style.left=i.left+"px",this.ui.style.right=null,this.ui.style.bottom=null,this.emit("show",t)}},r.Litepicker.prototype.hide=function(){this.isShowning()&&(this.datePicked.length=0,this.updateInput(),this.options.inlineMode?this.render():(this.ui.style.display="none",this.emit("hide")))},r.Litepicker.prototype.getDate=function(){return this.getStartDate()},r.Litepicker.prototype.getStartDate=function(){return this.options.startDate?this.options.startDate.clone():null},r.Litepicker.prototype.getEndDate=function(){return this.options.endDate?this.options.endDate.clone():null},r.Litepicker.prototype.setDate=function(t,e){void 0===e&&(e=!1);var i=new n.DateTime(t,this.options.format,this.options.lang);s.dateIsLocked(i,this.options,[i])&&!e?this.emit("error:date",i):(this.setStartDate(t),this.options.inlineMode&&this.render(),this.emit("selected",this.getDate()))},r.Litepicker.prototype.setStartDate=function(t){t&&(this.options.startDate=new n.DateTime(t,this.options.format,this.options.lang),this.updateInput())},r.Litepicker.prototype.setEndDate=function(t){t&&(this.options.endDate=new n.DateTime(t,this.options.format,this.options.lang),this.options.startDate.getTime()>this.options.endDate.getTime()&&(this.options.endDate=this.options.startDate.clone(),this.options.startDate=new n.DateTime(t,this.options.format,this.options.lang)),this.updateInput())},r.Litepicker.prototype.setDateRange=function(t,e,i){void 0===i&&(i=!1),this.triggerElement=void 0;var a=new n.DateTime(t,this.options.format,this.options.lang),r=new n.DateTime(e,this.options.format,this.options.lang);(this.options.disallowLockDaysInRange?s.rangeIsLocked([a,r],this.options):s.dateIsLocked(a,this.options,[a,r])||s.dateIsLocked(r,this.options,[a,r]))&&!i?this.emit("error:range",[a,r]):(this.setStartDate(a),this.setEndDate(r),this.options.inlineMode&&this.render(),this.updateInput(),this.emit("selected",this.getStartDate(),this.getEndDate()))},r.Litepicker.prototype.gotoDate=function(t,e){void 0===e&&(e=0);var i=new n.DateTime(t);i.setDate(1),this.calendars[e]=i.clone(),this.render()},r.Litepicker.prototype.setLockDays=function(t){this.options.lockDays=n.DateTime.convertArray(t,this.options.lockDaysFormat),this.render()},r.Litepicker.prototype.setHighlightedDays=function(t){this.options.highlightedDays=n.DateTime.convertArray(t,this.options.highlightedDaysFormat),this.render()},r.Litepicker.prototype.setOptions=function(t){delete t.element,delete t.elementEnd,delete t.parentEl,t.startDate&&(t.startDate=new n.DateTime(t.startDate,this.options.format,this.options.lang)),t.endDate&&(t.endDate=new n.DateTime(t.endDate,this.options.format,this.options.lang));var e=a(a({},this.options.dropdowns),t.dropdowns),i=a(a({},this.options.buttonText),t.buttonText),r=a(a({},this.options.tooltipText),t.tooltipText);this.options=a(a({},this.options),t),this.options.dropdowns=a({},e),this.options.buttonText=a({},i),this.options.tooltipText=a({},r),!this.options.singleMode||this.options.startDate instanceof n.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof n.DateTime&&this.options.endDate instanceof n.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var s=0;s<this.options.numberOfMonths;s+=1){var o=this.options.startDate?this.options.startDate.clone():new n.DateTime;o.setDate(1),o.setMonth(o.getMonth()+s),this.calendars[s]=o}this.options.lockDays.length&&(this.options.lockDays=n.DateTime.convertArray(this.options.lockDays,this.options.lockDaysFormat)),this.options.highlightedDays.length&&(this.options.highlightedDays=n.DateTime.convertArray(this.options.highlightedDays,this.options.highlightedDaysFormat)),this.render(),this.options.inlineMode&&this.show(),this.updateInput()},r.Litepicker.prototype.clearSelection=function(){this.options.startDate=null,this.options.endDate=null,this.datePicked.length=0,this.updateInput(),this.isShowning()&&this.render(),this.emit("clear:selection")},r.Litepicker.prototype.destroy=function(){this.ui&&this.ui.parentNode&&(this.ui.parentNode.removeChild(this.ui),this.ui=null),this.emit("destroy")}}])},6710:function(){!function(t){var e={};function i(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,a){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(a,n,function(e){return t[e]}.bind(null,n));return a},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=8)}([function(t,e,i){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i,a,n,r=t[1]||"",s=t[3];if(!s)return r;if(e&&"function"==typeof btoa){var o=(i=s,a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(n," */")),l=s.sources.map((function(t){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(t," */")}));return[r].concat(l).concat([o]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,a){"string"==typeof t&&(t=[[null,t,""]]);var n={};if(a)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(n[s]=!0)}for(var o=0;o<t.length;o++){var l=[].concat(t[o]);a&&n[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),e.push(l))}},e}},function(t,e,i){"use strict";var a,n={},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}();function s(t,e){for(var i=[],a={},n=0;n<t.length;n++){var r=t[n],s=e.base?r[0]+e.base:r[0],o={css:r[1],media:r[2],sourceMap:r[3]};a[s]?a[s].parts.push(o):i.push(a[s]={id:s,parts:[o]})}return i}function o(t,e){for(var i=0;i<t.length;i++){var a=t[i],r=n[a.id],s=0;if(r){for(r.refs++;s<r.parts.length;s++)r.parts[s](a.parts[s]);for(;s<a.parts.length;s++)r.parts.push(g(a.parts[s],e))}else{for(var o=[];s<a.parts.length;s++)o.push(g(a.parts[s],e));n[a.id]={id:a.id,refs:1,parts:o}}}}function l(t){var e=document.createElement("style");if(void 0===t.attributes.nonce){var a=i.nc;a&&(t.attributes.nonce=a)}if(Object.keys(t.attributes).forEach((function(i){e.setAttribute(i,t.attributes[i])})),"function"==typeof t.insert)t.insert(e);else{var n=r(t.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}return e}var c,h=(c=[],function(t,e){return c[t]=e,c.filter(Boolean).join("\n")});function d(t,e,i,a){var n=i?"":a.css;if(t.styleSheet)t.styleSheet.cssText=h(e,n);else{var r=document.createTextNode(n),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function u(t,e,i){var a=i.css,n=i.media,r=i.sourceMap;if(n&&t.setAttribute("media",n),r&&btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=a;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(a))}}var p=null,f=0;function g(t,e){var i,a,n;if(e.singleton){var r=f++;i=p||(p=l(e)),a=d.bind(null,i,r,!1),n=d.bind(null,i,r,!0)}else i=l(e),a=u.bind(null,i,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else n()}}t.exports=function(t,e){(e=e||{}).attributes="object"==typeof e.attributes?e.attributes:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===a&&(a=Boolean(window&&document&&document.all&&!window.atob)),a));var i=s(t,e);return o(i,e),function(t){for(var a=[],r=0;r<i.length;r++){var l=i[r],c=n[l.id];c&&(c.refs--,a.push(c))}t&&o(s(t,e),e);for(var h=0;h<a.length;h++){var d=a[h];if(0===d.refs){for(var u=0;u<d.parts.length;u++)d.parts[u]();delete n[d.id]}}}}},,,,,,,function(t,e,i){"use strict";function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function n(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.r(e),i(9),Litepicker.add("ranges",{init:function(t){var e={position:"left",customRanges:{},customRangesLabels:["Today","Yesterday","Last 7 Days","Last 30 Days","This Month","Last Month"],force:!1,autoApply:t.options.autoApply};t.options.ranges=n(n({},e),t.options.ranges),t.options.singleMode=!1;var i=t.options.ranges;if(!Object.keys(i.customRanges).length){var a,s=t.DateTime();i.customRanges=(r(a={},i.customRangesLabels[0],[s.clone(),s.clone()]),r(a,i.customRangesLabels[1],[s.clone().subtract(1,"day"),s.clone().subtract(1,"day")]),r(a,i.customRangesLabels[2],[s.clone().subtract(6,"day"),s]),r(a,i.customRangesLabels[3],[s.clone().subtract(29,"day"),s]),r(a,i.customRangesLabels[4],function(t){var e=t.clone();return e.setDate(1),[e,new Date(t.getFullYear(),t.getMonth()+1,0)]}(s)),r(a,i.customRangesLabels[5],function(t){var e=t.clone();return e.setDate(1),e.setMonth(t.getMonth()-1),[e,new Date(t.getFullYear(),t.getMonth(),0)]}(s)),a)}t.on("render",(function(e){var a=document.createElement("div");a.className="container__predefined-ranges",t.ui.dataset.rangesPosition=i.position,Object.keys(i.customRanges).forEach((function(n){var r=i.customRanges[n],s=document.createElement("button");s.innerText=n,s.tabIndex=e.dataset.plugins.indexOf("keyboardnav")>=0?1:-1,s.dataset.start=r[0].getTime(),s.dataset.end=r[1].getTime(),s.addEventListener("click",(function(e){var a=e.target;if(a){var n=t.DateTime(Number(a.dataset.start)),r=t.DateTime(Number(a.dataset.end));i.autoApply?(t.setDateRange(n,r,i.force),t.emit("ranges.selected",n,r),t.hide()):(t.datePicked=[n,r],t.emit("ranges.preselect",n,r)),!t.options.inlineMode&&i.autoApply||t.gotoDate(n)}})),a.appendChild(s)})),e.querySelector(".container__main").prepend(a)}))}})},function(t,e,i){var a=i(10);"string"==typeof a&&(a=[[t.i,a,""]]);var n={insert:function(t){var e=document.querySelector("head"),i=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t)},singleton:!1};i(1)(a,n),a.locals&&(t.exports=a.locals)},function(t,e,i){(e=i(0)(!1)).push([t.i,'.litepicker[data-plugins*="ranges"] > .container__main > .container__predefined-ranges {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: var(--litepicker-container-months-color-bg);\n box-shadow: -2px 0px 5px var(--litepicker-footer-box-shadow-color);\n border-radius: 3px;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="left"] > .container__main {\n /* */\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="right"] > .container__main{\n flex-direction: row-reverse;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="right"] > .container__main > .container__predefined-ranges {\n box-shadow: 2px 0px 2px var(--litepicker-footer-box-shadow-color);\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="top"] > .container__main {\n flex-direction: column;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="top"] > .container__main > .container__predefined-ranges {\n flex-direction: row;\n box-shadow: 2px 0px 2px var(--litepicker-footer-box-shadow-color);\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="bottom"] > .container__main {\n flex-direction: column-reverse;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="bottom"] > .container__main > .container__predefined-ranges {\n flex-direction: row;\n box-shadow: 2px 0px 2px var(--litepicker-footer-box-shadow-color);\n}\n.litepicker[data-plugins*="ranges"] > .container__main > .container__predefined-ranges button {\n padding: 5px;\n margin: 2px 0;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="left"] > .container__main > .container__predefined-ranges button,\n.litepicker[data-plugins*="ranges"][data-ranges-position="right"] > .container__main > .container__predefined-ranges button{\n width: 100%;\n text-align: left;\n}\n.litepicker[data-plugins*="ranges"] > .container__main > .container__predefined-ranges button:hover {\n cursor: default;\n opacity: .6;\n}',""]),t.exports=e}])},2703:function(t,e,i){"use strict";var a=i(414);function n(){}function r(){}r.resetWarningCache=n,t.exports=function(){function t(t,e,i,n,r,s){if(s!==a){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function e(){return t}t.isRequired=t;var i={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:r,resetWarningCache:n};return i.PropTypes=i,i}},5697:function(t,e,i){t.exports=i(2703)()},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7129:function(t,e){"use strict";var i=Object.prototype.hasOwnProperty;function a(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function n(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var a,r,s=[];for(r in"string"!=typeof e&&(e="?"),t)if(i.call(t,r)){if((a=t[r])||null!=a&&!isNaN(a)||(a=""),r=n(r),a=n(a),null===r||null===a)continue;s.push(r+"="+a)}return s.length?e+s.join("&"):""},e.parse=function(t){for(var e,i=/([^=?#&]+)=?([^&]*)/g,n={};e=i.exec(t);){var r=a(e[1]),s=a(e[2]);null===r||null===s||r in n||(n[r]=s)}return n}},7229:function(t,e,i){"use strict";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},n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},r=function(){function t(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,i,a){return i&&t(e.prototype,i),a&&t(e,a),e}}(),s=h(i(5927)),o=i(9196),l=h(o),c=h(i(5697));function h(t){return t&&t.__esModule?t:{default:t}}window.ApexCharts=s.default;var d=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return l.default.createRef?i.chartRef=l.default.createRef():i.setRef=function(t){return i.chartRef=t},i.chart=null,i}return function(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)}(t,o.Component),r(t,[{key:"render",value:function(){var t=this.props,e=(t.type,t.height,t.width,t.series,t.options,function(t,e){var i={};for(var a in t)0<=e.indexOf(a)||Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=t[a]);return i}(t,["type","height","width","series","options"]));return l.default.createElement("div",n({ref:l.default.createRef?this.chartRef:this.setRef},e))}},{key:"componentDidMount",value:function(){var t=l.default.createRef?this.chartRef.current:this.chartRef;this.chart=new s.default(t,this.getConfig()),this.chart.render()}},{key:"getConfig",value:function(){var t=this.props,e=t.type,i=t.height,a=t.width,n=t.series,r=t.options,s={chart:{type:e,height:i,width:a},series:n};return this.extend(r,s)}},{key:"isObject",value:function(t){return t&&"object"===(void 0===t?"undefined":a(t))&&!Array.isArray(t)&&null!=t}},{key:"extend",value:function(t,e){var i=this;"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var a=arguments[i];if(null!=a)for(var n in a)a.hasOwnProperty(n)&&(e[n]=a[n])}return e});var a=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach((function(n){i.isObject(e[n])&&n in t?a[n]=i.extend(t[n],e[n]):Object.assign(a,function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}({},n,e[n]))})),a}},{key:"componentDidUpdate",value:function(t){if(!this.chart)return null;var e=this.props,i=e.options,a=e.series,n=e.height,r=e.width,s=JSON.stringify(t.options),o=JSON.stringify(t.series),l=JSON.stringify(i),c=JSON.stringify(a);s===l&&o===c&&n===t.height&&r===t.width||(o===c?this.chart.updateOptions(this.getConfig()):s===l&&n===t.height&&r===t.width?this.chart.updateSeries(a):this.chart.updateOptions(this.getConfig()))}},{key:"componentWillUnmount",value:function(){this.chart&&"function"==typeof this.chart.destroy&&this.chart.destroy()}}]),t}();(e.Z=d).propTypes={type:c.default.string.isRequired,width:c.default.any,height:c.default.any,series:c.default.array.isRequired,options:c.default.object.isRequired},d.defaultProps={type:"line",width:"100%",height:"auto"}},9921:function(t,e){"use strict";var i="function"==typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,n=i?Symbol.for("react.portal"):60106,r=i?Symbol.for("react.fragment"):60107,s=i?Symbol.for("react.strict_mode"):60108,o=i?Symbol.for("react.profiler"):60114,l=i?Symbol.for("react.provider"):60109,c=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.async_mode"):60111,d=i?Symbol.for("react.concurrent_mode"):60111,u=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,f=i?Symbol.for("react.suspense_list"):60120,g=i?Symbol.for("react.memo"):60115,x=i?Symbol.for("react.lazy"):60116,m=i?Symbol.for("react.block"):60121,b=i?Symbol.for("react.fundamental"):60117,v=i?Symbol.for("react.responder"):60118,y=i?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case a:switch(t=t.type){case h:case d:case r:case o:case s:case p:return t;default:switch(t=t&&t.$$typeof){case c:case u:case x:case g:case l:return t;default:return e}}case n:return e}}}function k(t){return w(t)===d}e.AsyncMode=h,e.ConcurrentMode=d,e.ContextConsumer=c,e.ContextProvider=l,e.Element=a,e.ForwardRef=u,e.Fragment=r,e.Lazy=x,e.Memo=g,e.Portal=n,e.Profiler=o,e.StrictMode=s,e.Suspense=p,e.isAsyncMode=function(t){return k(t)||w(t)===h},e.isConcurrentMode=k,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===l},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===a},e.isForwardRef=function(t){return w(t)===u},e.isFragment=function(t){return w(t)===r},e.isLazy=function(t){return w(t)===x},e.isMemo=function(t){return w(t)===g},e.isPortal=function(t){return w(t)===n},e.isProfiler=function(t){return w(t)===o},e.isStrictMode=function(t){return w(t)===s},e.isSuspense=function(t){return w(t)===p},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===d||t===o||t===s||t===p||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===x||t.$$typeof===g||t.$$typeof===l||t.$$typeof===c||t.$$typeof===u||t.$$typeof===b||t.$$typeof===v||t.$$typeof===y||t.$$typeof===m)},e.typeOf=w},9864:function(t,e,i){"use strict";t.exports=i(9921)},7202:function(t,e,i){var a={"./presto-action-bar-ui_2.entry.js":[578,982],"./presto-action-bar_17.entry.js":[2626,982],"./presto-cta-overlay-ui.entry.js":[3285,982],"./presto-email-overlay-ui_2.entry.js":[1871,982],"./presto-player-button.entry.js":[5657,982],"./presto-player-skeleton.entry.js":[4992,982],"./presto-player_4.entry.js":[2361,982],"./presto-playlist.entry.js":[1928,982],"./presto-search-bar-ui.entry.js":[9458,982],"./presto-timestamp.entry.js":[4317,982],"./presto-video-curtain-ui.entry.js":[5704,982],"./presto-video.entry.js":[4178,982]};function n(t){if(!i.o(a,t))return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=a[t],n=e[0];return i.e(e[1]).then((function(){return i(n)}))}n.keys=function(){return Object.keys(a)},n.id=7202,t.exports=n},9196:function(t){"use strict";t.exports=window.React},1284:function(t){"use strict";t.exports=window.regeneratorRuntime},907:function(t,e,i){"use strict";function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}i.d(e,{Z:function(){return a}})},3878:function(t,e,i){"use strict";function a(t){if(Array.isArray(t))return t}i.d(e,{Z:function(){return a}})},7326:function(t,e,i){"use strict";function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}i.d(e,{Z:function(){return a}})},5861:function(t,e,i){"use strict";function a(t,e,i,a,n,r,s){try{var o=t[r](s),l=o.value}catch(t){return void i(t)}o.done?e(l):Promise.resolve(l).then(a,n)}function n(t){return function(){var e=this,i=arguments;return new Promise((function(n,r){var s=t.apply(e,i);function o(t){a(s,n,r,o,l,"next",t)}function l(t){a(s,n,r,o,l,"throw",t)}o(void 0)}))}}i.d(e,{Z:function(){return n}})},5671:function(t,e,i){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.d(e,{Z:function(){return a}})},3144:function(t,e,i){"use strict";i.d(e,{Z:function(){return r}});var a=i(7343);function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(0,a.Z)(n.key),n)}}function r(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}},4942:function(t,e,i){"use strict";i.d(e,{Z:function(){return n}});var a=i(7343);function n(t,e,i){return(e=(0,a.Z)(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}},1120:function(t,e,i){"use strict";function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}i.d(e,{Z:function(){return a}})},136:function(t,e,i){"use strict";i.d(e,{Z:function(){return n}});var a=i(9611);function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,a.Z)(t,e)}},1902:function(t,e,i){"use strict";function a(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,n,_x,r,s=[],_n=!0,o=!1;try{if(_x=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;_n=!1}else for(;!(_n=(a=_x.call(i)).done)&&(s.push(a.value),s.length!==e);_n=!0);}catch(t){o=!0,n=t}finally{try{if(!_n&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(o)throw n}}return s}}i.d(e,{Z:function(){return a}})},5267:function(t,e,i){"use strict";function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}i.d(e,{Z:function(){return a}})},2963:function(t,e,i){"use strict";i.d(e,{Z:function(){return r}});var a=i(1002),n=i(7326);function r(t,e){if(e&&("object"===(0,a.Z)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,n.Z)(t)}},9611:function(t,e,i){"use strict";function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}i.d(e,{Z:function(){return a}})},3324:function(t,e,i){"use strict";i.d(e,{Z:function(){return o}});var a=i(3878),n=i(1902),r=i(181),s=i(5267);function o(t,e){return(0,a.Z)(t)||(0,n.Z)(t,e)||(0,r.Z)(t,e)||(0,s.Z)()}},2982:function(t,e,i){"use strict";i.d(e,{Z:function(){return r}});var a=i(907),n=i(181);function r(t){return function(t){if(Array.isArray(t))return(0,a.Z)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||(0,n.Z)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},5512:function(t,e,i){"use strict";i.d(e,{Z:function(){return n}});var a=i(1002);function n(t,e){if("object"!==(0,a.Z)(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==(0,a.Z)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}},7343:function(t,e,i){"use strict";i.d(e,{Z:function(){return r}});var a=i(1002),n=i(5512);function r(t){var e=(0,n.Z)(t,"string");return"symbol"===(0,a.Z)(e)?e:String(e)}},1002:function(t,e,i){"use strict";function a(t){return 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},a(t)}i.d(e,{Z:function(){return a}})},181:function(t,e,i){"use strict";i.d(e,{Z:function(){return n}});var a=i(907);function n(t,e){if(t){if("string"==typeof t)return(0,a.Z)(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?(0,a.Z)(t,e):void 0}}},2407:function(t,e,i){"use strict";i.d(e,{Z:function(){return o}});var a=i(1120),n=i(9611);function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function s(t,e,i){return s=r()?Reflect.construct.bind():function(t,e,i){var a=[null];a.push.apply(a,e);var r=new(Function.bind.apply(t,a));return i&&(0,n.Z)(r,i.prototype),r},s.apply(null,arguments)}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return s(t,arguments,(0,a.Z)(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,n.Z)(r,t)},o(t)}}},a={};function n(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={exports:{}};return i[t](r,r.exports,n),r.exports}n.m=i,n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.f={},n.e=function(t){return Promise.all(Object.keys(n.f).reduce((function(e,i){return n.f[i](t,e),e}),[]))},n.u=function(t){return t+".js"},n.miniCssF=function(t){},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t={},e="@presto-player/presto-player:",n.l=function(i,a,r,s){if(t[i])t[i].push(a);else{var o,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),h=0;h<c.length;h++){var d=c[h];if(d.getAttribute("src")==i||d.getAttribute("data-webpack")==e+r){o=d;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,n.nc&&o.setAttribute("nonce",n.nc),o.setAttribute("data-webpack",e+r),o.src=i),t[i]=[a];var u=function(e,a){o.onerror=o.onload=null,clearTimeout(p);var n=t[i];if(delete t[i],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach((function(t){return t(a)})),e)return e(a)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),l&&document.head.appendChild(o)}},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.j=142,function(){var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");i.length&&(t=i[i.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t}(),function(){var t={142:0};n.f.j=function(e,i){var a=n.o(t,e)?t[e]:void 0;if(0!==a)if(a)i.push(a[2]);else{var r=new Promise((function(i,n){a=t[e]=[i,n]}));i.push(a[2]=r);var s=n.p+n.u(e),o=new Error;n.l(s,(function(i){if(n.o(t,e)&&(0!==(a=t[e])&&(t[e]=void 0),a)){var r=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;o.message="Loading chunk "+e+" failed.\n("+r+": "+s+")",o.name="ChunkLoadError",o.type=r,o.request=s,a[1](o)}}),"chunk-"+e,e)}};var e=function(e,i){var a,r,s=i[0],o=i[1],l=i[2],c=0;if(s.some((function(e){return 0!==t[e]}))){for(a in o)n.o(o,a)&&(n.m[a]=o[a]);l&&l(n)}for(e&&e(i);c<s.length;c++)r=s[c],n.o(t,r)&&t[r]&&t[r][0](),t[r]=0},i=self.webpackChunk_presto_player_presto_player=self.webpackChunk_presto_player_presto_player||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))}(),function(){"use strict";var t,e=window.wp.element,i=n(3324),a=n(5671),r=n(3144),s=n(7326),o=n(136),l=n(2963),c=n(1120),h=n(4942),d=n(7129);function u(t){return{path:t.pathname,hash:t.hash,query:d.parse(t.search)}}function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},p.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(t||(t={}));var f="beforeunload";function g(t){t.preventDefault(),t.returnValue=""}function x(){var t=[];return{get length(){return t.length},push:function(e){return t.push(e),function(){t=t.filter((function(t){return t!==e}))}},call:function(e){t.forEach((function(t){return t&&t(e)}))}}}var m=function(e){void 0===e&&(e={});var i=e.window,a=void 0===i?document.defaultView:i,n=a.history;function r(){var t=a.location,e=t.pathname,i=t.search,r=t.hash,s=n.state||{};return[s.idx,{pathname:e,search:i,hash:r,state:s.usr||null,key:s.key||"default"}]}var s=null;a.addEventListener("popstate",(function(){if(s)u.call(s),s=null;else{var e=t.Pop,i=r(),a=i[0],n=i[1];if(u.length){if(null!=a){var o=c-a;o&&(s={action:e,location:n,retry:function(){k(-1*o)}},k(o))}}else w(e)}}));var o=t.Pop,l=r(),c=l[0],h=l[1],d=x(),u=x();function m(t){return"string"==typeof t?t:(i=(e=t).pathname,a=void 0===i?"/":i,n=e.search,r=void 0===n?"":n,s=e.hash,o=void 0===s?"":s,r&&"?"!==r&&(a+="?"===r.charAt(0)?r:"?"+r),o&&"#"!==o&&(a+="#"===o.charAt(0)?o:"#"+o),a);var e,i,a,n,r,s,o}function b(t,e){return void 0===e&&(e=null),p({pathname:h.pathname,hash:"",search:""},"string"==typeof t?function(t){var e={};if(t){var i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}(t):t,{state:e,key:Math.random().toString(36).substr(2,8)})}function v(t,e){return[{usr:t.state,key:t.key,idx:e},m(t)]}function y(t,e,i){return!u.length||(u.call({action:t,location:e,retry:i}),!1)}function w(t){o=t;var e=r();c=e[0],h=e[1],d.call({action:o,location:h})}function k(t){n.go(t)}return null==c&&(c=0,n.replaceState(p({},n.state,{idx:c}),"")),{get action(){return o},get location(){return h},createHref:m,push:function e(i,r){var s=t.Push,o=b(i,r);if(y(s,o,(function(){e(i,r)}))){var l=v(o,c+1),h=l[0],d=l[1];try{n.pushState(h,"",d)}catch(t){a.location.assign(d)}w(s)}},replace:function e(i,a){var r=t.Replace,s=b(i,a);if(y(r,s,(function(){e(i,a)}))){var o=v(s,c),l=o[0],h=o[1];n.replaceState(l,"",h),w(r)}},go:k,back:function(){k(-1)},forward:function(){k(1)},listen:function(t){return d.push(t)},block:function(t){var e=u.push(t);return 1===u.length&&a.addEventListener(f,g),function(){e(),u.length||a.removeEventListener(f,g)}}}}(),b=wp.element.createContext({route:u(m.location)});function v(t,e){var i=[];return function(t,e,i){void 0===i&&(i={});var a=i.decode,n=void 0===a?function(t){return t}:a;return function(i){var a=t.exec(i);if(!a)return!1;for(var r=a[0],s=a.index,o=Object.create(null),l=function(t){if(void 0===a[t])return"continue";var i=e[t-1];"*"===i.modifier||"+"===i.modifier?o[i.name]=a[t].split(i.prefix+i.suffix).map((function(t){return n(t,i)})):o[i.name]=n(a[t],i)},c=1;c<a.length;c++)l(c);return{path:r,index:s,params:o}}}(S(t,i,e),i,e)}function y(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function w(t){return t&&t.sensitive?"":"i"}function k(t,e,i){return function(t,e,i){void 0===i&&(i={});for(var a=i.strict,n=void 0!==a&&a,r=i.start,s=void 0===r||r,o=i.end,l=void 0===o||o,c=i.encode,h=void 0===c?function(t){return t}:c,d=i.delimiter,u=void 0===d?"/#?":d,p=i.endsWith,f="[".concat(y(void 0===p?"":p),"]|$"),g="[".concat(y(u),"]"),x=s?"^":"",m=0,b=t;m<b.length;m++){var v=b[m];if("string"==typeof v)x+=y(h(v));else{var k=y(h(v.prefix)),S=y(h(v.suffix));if(v.pattern)if(e&&e.push(v),k||S)if("+"===v.modifier||"*"===v.modifier){var A="*"===v.modifier?"?":"";x+="(?:".concat(k,"((?:").concat(v.pattern,")(?:").concat(S).concat(k,"(?:").concat(v.pattern,"))*)").concat(S,")").concat(A)}else x+="(?:".concat(k,"(").concat(v.pattern,")").concat(S,")").concat(v.modifier);else"+"===v.modifier||"*"===v.modifier?x+="((?:".concat(v.pattern,")").concat(v.modifier,")"):x+="(".concat(v.pattern,")").concat(v.modifier);else x+="(?:".concat(k).concat(S,")").concat(v.modifier)}}if(l)n||(x+="".concat(g,"?")),x+=i.endsWith?"(?=".concat(f,")"):"$";else{var C=t[t.length-1],P="string"==typeof C?g.indexOf(C[C.length-1])>-1:void 0===C;n||(x+="(?:".concat(g,"(?=").concat(f,"))?")),P||(x+="(?=".concat(g,"|").concat(f,")"))}return new RegExp(x,w(i))}(function(t,e){void 0===e&&(e={});for(var i=function(t){for(var e=[],i=0;i<t.length;){var a=t[i];if("*"!==a&&"+"!==a&&"?"!==a)if("\\"!==a)if("{"!==a)if("}"!==a)if(":"!==a)if("("!==a)e.push({type:"CHAR",index:i,value:t[i++]});else{var n=1,r="";if("?"===t[o=i+1])throw new TypeError('Pattern cannot start with "?" at '.concat(o));for(;o<t.length;)if("\\"!==t[o]){if(")"===t[o]){if(0==--n){o++;break}}else if("("===t[o]&&(n++,"?"!==t[o+1]))throw new TypeError("Capturing groups are not allowed at ".concat(o));r+=t[o++]}else r+=t[o++]+t[o++];if(n)throw new TypeError("Unbalanced pattern at ".concat(i));if(!r)throw new TypeError("Missing pattern at ".concat(i));e.push({type:"PATTERN",index:i,value:r}),i=o}else{for(var s="",o=i+1;o<t.length;){var l=t.charCodeAt(o);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;s+=t[o++]}if(!s)throw new TypeError("Missing parameter name at ".concat(i));e.push({type:"NAME",index:i,value:s}),i=o}else e.push({type:"CLOSE",index:i,value:t[i++]});else e.push({type:"OPEN",index:i,value:t[i++]});else e.push({type:"ESCAPED_CHAR",index:i++,value:t[i++]});else e.push({type:"MODIFIER",index:i,value:t[i++]})}return e.push({type:"END",index:i,value:""}),e}(t),a=e.prefixes,n=void 0===a?"./":a,r="[^".concat(y(e.delimiter||"/#?"),"]+?"),s=[],o=0,l=0,c="",h=function(t){if(l<i.length&&i[l].type===t)return i[l++].value},d=function(t){var e=h(t);if(void 0!==e)return e;var a=i[l],n=a.type,r=a.index;throw new TypeError("Unexpected ".concat(n," at ").concat(r,", expected ").concat(t))},u=function(){for(var t,e="";t=h("CHAR")||h("ESCAPED_CHAR");)e+=t;return e};l<i.length;){var p=h("CHAR"),f=h("NAME"),g=h("PATTERN");if(f||g){var x=p||"";-1===n.indexOf(x)&&(c+=x,x=""),c&&(s.push(c),c=""),s.push({name:f||o++,prefix:x,suffix:"",pattern:g||r,modifier:h("MODIFIER")||""})}else{var m=p||h("ESCAPED_CHAR");if(m)c+=m;else if(c&&(s.push(c),c=""),h("OPEN")){x=u();var b=h("NAME")||"",v=h("PATTERN")||"",w=u();d("CLOSE"),s.push({name:b||(v?o++:""),pattern:b&&!v?r:v,prefix:x,suffix:w,modifier:h("MODIFIER")||""})}else d("END")}}return s}(t,i),e,i)}function S(t,e,i){return t instanceof RegExp?function(t,e){if(!e)return t;for(var i=/\((?:\?<(.*?)>)?(?!\?)/g,a=0,n=i.exec(t.source);n;)e.push({name:n[1]||a++,prefix:"",suffix:"",modifier:"",pattern:""}),n=i.exec(t.source);return t}(t,e):Array.isArray(t)?function(t,e,i){var a=t.map((function(t){return S(t,e,i).source}));return new RegExp("(?:".concat(a.join("|"),")"),w(i))}(t,e,i):k(t,e,i)}var A=n(9196),C=n.n(A),P=function(){function t(t){var e=this;this._insertTag=function(t){var i;i=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,i),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{i.insertRule(t,i.cssRules.length)}catch(t){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}(),L=Math.abs,T=String.fromCharCode,D=Object.assign;function M(t){return t.trim()}function E(t,e,i){return t.replace(e,i)}function I(t,e){return t.indexOf(e)}function O(t,e){return 0|t.charCodeAt(e)}function R(t,e,i){return t.slice(e,i)}function N(t){return t.length}function z(t){return t.length}function F(t,e){return e.push(t),t}var Y=1,X=1,_=0,H=0,$=0,B="";function W(t,e,i,a,n,r,s){return{value:t,root:e,parent:i,type:a,props:n,children:r,line:Y,column:X,length:s,return:""}}function j(t,e){return D(W("",null,null,"",null,null,0),t,{length:-t.length},e)}function V(){return $=H>0?O(B,--H):0,X--,10===$&&(X=1,Y--),$}function G(){return $=H<_?O(B,H++):0,X++,10===$&&(X=1,Y++),$}function Z(){return O(B,H)}function U(){return H}function q(t,e){return R(B,t,e)}function J(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Q(t){return Y=X=1,_=N(B=t),H=0,[]}function K(t){return B="",t}function tt(t){return M(q(H-1,at(91===t?t+2:40===t?t+1:t)))}function et(t){for(;($=Z())&&$<33;)G();return J(t)>2||J($)>3?"":" "}function it(t,e){for(;--e&&G()&&!($<48||$>102||$>57&&$<65||$>70&&$<97););return q(t,U()+(e<6&&32==Z()&&32==G()))}function at(t){for(;G();)switch($){case t:return H;case 34:case 39:34!==t&&39!==t&&at($);break;case 40:41===t&&at(t);break;case 92:G()}return H}function nt(t,e){for(;G()&&t+$!==57&&(t+$!==84||47!==Z()););return"/*"+q(e,H-1)+"*"+T(47===t?t:G())}function rt(t){for(;!J(Z());)G();return q(t,H)}var st="-ms-",ot="-moz-",lt="-webkit-",ct="comm",ht="rule",dt="decl",ut="@keyframes";function pt(t,e){for(var i="",a=z(t),n=0;n<a;n++)i+=e(t[n],n,t,e)||"";return i}function ft(t,e,i,a){switch(t.type){case"@import":case dt:return t.return=t.return||t.value;case ct:return"";case ut:return t.return=t.value+"{"+pt(t.children,a)+"}";case ht:t.value=t.props.join(",")}return N(i=pt(t.children,a))?t.return=t.value+"{"+i+"}":""}function gt(t){return K(xt("",null,null,null,[""],t=Q(t),0,[0],t))}function xt(t,e,i,a,n,r,s,o,l){for(var c=0,h=0,d=s,u=0,p=0,f=0,g=1,x=1,m=1,b=0,v="",y=n,w=r,k=a,S=v;x;)switch(f=b,b=G()){case 40:if(108!=f&&58==O(S,d-1)){-1!=I(S+=E(tt(b),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:S+=tt(b);break;case 9:case 10:case 13:case 32:S+=et(f);break;case 92:S+=it(U()-1,7);continue;case 47:switch(Z()){case 42:case 47:F(bt(nt(G(),U()),e,i),l);break;default:S+="/"}break;case 123*g:o[c++]=N(S)*m;case 125*g:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+h:p>0&&N(S)-d&&F(p>32?vt(S+";",a,i,d-1):vt(E(S," ","")+";",a,i,d-2),l);break;case 59:S+=";";default:if(F(k=mt(S,e,i,c,h,n,o,v,y=[],w=[],d),r),123===b)if(0===h)xt(S,e,k,k,y,r,d,o,w);else switch(99===u&&110===O(S,3)?100:u){case 100:case 109:case 115:xt(t,k,k,a&&F(mt(t,k,k,0,0,n,o,v,n,y=[],d),w),n,w,d,o,a?y:w);break;default:xt(S,k,k,k,[""],w,0,o,w)}}c=h=p=0,g=m=1,v=S="",d=s;break;case 58:d=1+N(S),p=f;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==V())continue;switch(S+=T(b),b*g){case 38:m=h>0?1:(S+="\f",-1);break;case 44:o[c++]=(N(S)-1)*m,m=1;break;case 64:45===Z()&&(S+=tt(G())),u=Z(),h=d=N(v=S+=rt(U())),b++;break;case 45:45===f&&2==N(S)&&(g=0)}}return r}function mt(t,e,i,a,n,r,s,o,l,c,h){for(var d=n-1,u=0===n?r:[""],p=z(u),f=0,g=0,x=0;f<a;++f)for(var m=0,b=R(t,d+1,d=L(g=s[f])),v=t;m<p;++m)(v=M(g>0?u[m]+" "+b:E(b,/&\f/g,u[m])))&&(l[x++]=v);return W(t,e,i,0===n?ht:o,l,c,h)}function bt(t,e,i){return W(t,e,i,ct,T($),R(t,2,-2),0)}function vt(t,e,i,a){return W(t,e,i,dt,R(t,0,a),R(t,a+1,-1),a)}var yt=function(t,e,i){for(var a=0,n=0;a=n,n=Z(),38===a&&12===n&&(e[i]=1),!J(n);)G();return q(t,H)},wt=new WeakMap,kt=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,i=t.parent,a=t.column===i.column&&t.line===i.line;"rule"!==i.type;)if(!(i=i.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||wt.get(i))&&!a){wt.set(t,!0);for(var n=[],r=function(t,e){return K(function(t,e){var i=-1,a=44;do{switch(J(a)){case 0:38===a&&12===Z()&&(e[i]=1),t[i]+=yt(H-1,e,i);break;case 2:t[i]+=tt(a);break;case 4:if(44===a){t[++i]=58===Z()?"&\f":"",e[i]=t[i].length;break}default:t[i]+=T(a)}}while(a=G());return t}(Q(t),e))}(e,n),s=i.props,o=0,l=0;o<r.length;o++)for(var c=0;c<s.length;c++,l++)t.props[l]=n[o]?r[o].replace(/&\f/g,s[c]):s[c]+" "+r[o]}}},St=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function At(t,e){switch(function(t,e){return 45^O(t,0)?(((e<<2^O(t,0))<<2^O(t,1))<<2^O(t,2))<<2^O(t,3):0}(t,e)){case 5103:return lt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return lt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return lt+t+ot+t+st+t+t;case 6828:case 4268:return lt+t+st+t+t;case 6165:return lt+t+st+"flex-"+t+t;case 5187:return lt+t+E(t,/(\w+).+(:[^]+)/,lt+"box-$1$2"+st+"flex-$1$2")+t;case 5443:return lt+t+st+"flex-item-"+E(t,/flex-|-self/,"")+t;case 4675:return lt+t+st+"flex-line-pack"+E(t,/align-content|flex-|-self/,"")+t;case 5548:return lt+t+st+E(t,"shrink","negative")+t;case 5292:return lt+t+st+E(t,"basis","preferred-size")+t;case 6060:return lt+"box-"+E(t,"-grow","")+lt+t+st+E(t,"grow","positive")+t;case 4554:return lt+E(t,/([^-])(transform)/g,"$1"+lt+"$2")+t;case 6187:return E(E(E(t,/(zoom-|grab)/,lt+"$1"),/(image-set)/,lt+"$1"),t,"")+t;case 5495:case 3959:return E(t,/(image-set\([^]*)/,lt+"$1$`$1");case 4968:return E(E(t,/(.+:)(flex-)?(.*)/,lt+"box-pack:$3"+st+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+lt+t+t;case 4095:case 3583:case 4068:case 2532:return E(t,/(.+)-inline(.+)/,lt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(N(t)-1-e>6)switch(O(t,e+1)){case 109:if(45!==O(t,e+4))break;case 102:return E(t,/(.+:)(.+)-([^]+)/,"$1"+lt+"$2-$3$1"+ot+(108==O(t,e+3)?"$3":"$2-$3"))+t;case 115:return~I(t,"stretch")?At(E(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==O(t,e+1))break;case 6444:switch(O(t,N(t)-3-(~I(t,"!important")&&10))){case 107:return E(t,":",":"+lt)+t;case 101:return E(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+lt+(45===O(t,14)?"inline-":"")+"box$3$1"+lt+"$2$3$1"+st+"$2box$3")+t}break;case 5936:switch(O(t,e+11)){case 114:return lt+t+st+E(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return lt+t+st+E(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return lt+t+st+E(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return lt+t+st+t+t}return t}var Ct=[function(t,e,i,a){if(t.length>-1&&!t.return)switch(t.type){case dt:t.return=At(t.value,t.length);break;case ut:return pt([j(t,{value:E(t.value,"@","@"+lt)})],a);case ht:if(t.length)return function(t,e){return t.map(e).join("")}(t.props,(function(e){switch(function(t,e){return(t=/(::plac\w+|:read-\w+)/.exec(t))?t[0]:t}(e)){case":read-only":case":read-write":return pt([j(t,{props:[E(e,/:(read-\w+)/,":-moz-$1")]})],a);case"::placeholder":return pt([j(t,{props:[E(e,/:(plac\w+)/,":"+lt+"input-$1")]}),j(t,{props:[E(e,/:(plac\w+)/,":-moz-$1")]}),j(t,{props:[E(e,/:(plac\w+)/,st+"input-$1")]})],a)}return""}))}}],Pt=function(t){var e=t.key;if("css"===e){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var a,n,r=t.stylisPlugins||Ct,s={},o=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),i=1;i<e.length;i++)s[e[i]]=!0;o.push(t)}));var l,c,h,d,u=[ft,(d=function(t){l.insert(t)},function(t){t.root||(t=t.return)&&d(t)})],p=(c=[kt,St].concat(r,u),h=z(c),function(t,e,i,a){for(var n="",r=0;r<h;r++)n+=c[r](t,e,i,a)||"";return n});n=function(t,e,i,a){l=i,pt(gt(t?t+"{"+e.styles+"}":e.styles),p),a&&(f.inserted[e.name]=!0)};var f={key:e,sheet:new P({key:e,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:n};return f.sheet.hydrate(o),f},Lt=function(t,e,i){var a=t.key+"-"+e.name;!1===i&&void 0===t.registered[a]&&(t.registered[a]=e.styles)},Tt=function(t){for(var e,i=0,a=0,n=t.length;n>=4;++a,n-=4)e=1540483477*(65535&(e=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+(59797*(e>>>16)<<16),i=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)},Dt={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Mt=/[A-Z]|^ms/g,Et=/_EMO_([^_]+?)_([^]*?)_EMO_/g,It=function(t){return 45===t.charCodeAt(1)},Ot=function(t){return null!=t&&"boolean"!=typeof t},Rt=function(t){var e=Object.create(null);return function(t){return void 0===e[t]&&(e[t]=It(i=t)?i:i.replace(Mt,"-$&").toLowerCase()),e[t];var i}}(),Nt=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(Et,(function(t,e,i){return Ft={name:e,styles:i,next:Ft},e}))}return 1===Dt[t]||It(t)||"number"!=typeof e||0===e?e:e+"px"};function zt(t,e,i){if(null==i)return"";if(void 0!==i.__emotion_styles)return i;switch(typeof i){case"boolean":return"";case"object":if(1===i.anim)return Ft={name:i.name,styles:i.styles,next:Ft},i.name;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Ft={name:a.name,styles:a.styles,next:Ft},a=a.next;return i.styles+";"}return function(t,e,i){var a="";if(Array.isArray(i))for(var n=0;n<i.length;n++)a+=zt(t,e,i[n])+";";else for(var r in i){var s=i[r];if("object"!=typeof s)null!=e&&void 0!==e[s]?a+=r+"{"+e[s]+"}":Ot(s)&&(a+=Rt(r)+":"+Nt(r,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=e&&void 0!==e[s[0]]){var o=zt(t,e,s);switch(r){case"animation":case"animationName":a+=Rt(r)+":"+o+";";break;default:a+=r+"{"+o+"}"}}else for(var l=0;l<s.length;l++)Ot(s[l])&&(a+=Rt(r)+":"+Nt(r,s[l])+";")}return a}(t,e,i);case"function":if(void 0!==t){var n=Ft,r=i(t);return Ft=n,zt(t,e,r)}}if(null==e)return i;var s=e[i];return void 0!==s?s:i}var Ft,Yt=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Xt=!!A.useInsertionEffect&&A.useInsertionEffect,_t=Xt||function(t){return t()},Ht=(Xt||A.useLayoutEffect,{}.hasOwnProperty),$t=(0,A.createContext)("undefined"!=typeof HTMLElement?Pt({key:"css"}):null);$t.Provider;var Bt=function(t){return(0,A.forwardRef)((function(e,i){var a=(0,A.useContext)($t);return t(e,a,i)}))},Wt=(0,A.createContext)({}),jt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Vt=function(t,e){var i={};for(var a in e)Ht.call(e,a)&&(i[a]=e[a]);return i[jt]=t,i},Gt=function(t){var e=t.cache,i=t.serialized,a=t.isStringTag;return Lt(e,i,a),_t((function(){return function(t,e,i){Lt(t,e,i);var a=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var n=e;do{t.insert(e===n?"."+a:"",n,t.sheet,!0),n=n.next}while(void 0!==n)}}(e,i,a)})),null},Zt=Bt((function(t,e,i){var a=t.css;"string"==typeof a&&void 0!==e.registered[a]&&(a=e.registered[a]);var n=t[jt],r=[a],s="";"string"==typeof t.className?s=function(t,e,i){var a="";return i.split(" ").forEach((function(i){void 0!==t[i]?e.push(t[i]+";"):a+=i+" "})),a}(e.registered,r,t.className):null!=t.className&&(s=t.className+" ");var o=function(t,e,i){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var a=!0,n="";Ft=void 0;var r=t[0];null==r||void 0===r.raw?(a=!1,n+=zt(i,e,r)):n+=r[0];for(var s=1;s<t.length;s++)n+=zt(i,e,t[s]),a&&(n+=r[s]);Yt.lastIndex=0;for(var o,l="";null!==(o=Yt.exec(n));)l+="-"+o[1];return{name:Tt(n)+l,styles:n,next:Ft}}(r,void 0,(0,A.useContext)(Wt));s+=e.key+"-"+o.name;var l={};for(var c in t)Ht.call(t,c)&&"css"!==c&&c!==jt&&(l[c]=t[c]);return l.ref=i,l.className=s,(0,A.createElement)(A.Fragment,null,(0,A.createElement)(Gt,{cache:e,serialized:o,isStringTag:"string"==typeof n}),(0,A.createElement)(n,l))}));n(8679);var Ut=function(t,e){var i=arguments;if(null==e||!Ht.call(e,"css"))return A.createElement.apply(void 0,i);var a=i.length,n=new Array(a);n[0]=Zt,n[1]=Vt(t,e);for(var r=2;r<a;r++)n[r]=i[r];return A.createElement.apply(null,n)},qt=wp.element.useContext,Jt="";function Qt(t){var e=t.path,i=t.onRoute,a=t.children,n=qt(b).route,r=v("".concat(e))("".concat(n.hash.substr(1)));return r?(i&&(Jt!==r.path&&i(),Jt=r.path),Ut("div",null,wp.element.cloneElement(a,{route:r}))):null}var Kt=n(4184),te=n.n(Kt);wp.element.useContext;var ee=function(t){(0,o.Z)(d,t);var e,i,n=(e=d,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,a=(0,c.Z)(e);if(i){var n=(0,c.Z)(this).constructor;t=Reflect.construct(a,arguments,n)}else t=a.apply(this,arguments);return(0,l.Z)(this,t)});function d(t){var e;(0,a.Z)(this,d),e=n.call(this,t),(0,h.Z)((0,s.Z)(e),"handleRouteChange",(function(t){var i=u(null==t?void 0:t.location);e.setState({route:i})})),e.routes=Object.keys(t.routes).map((function(e){return t.routes[e].path})),e.unlisten=m.listen(e.handleRouteChange);var i=u(m.location),r=m.location.search;return e.state={route:i,defaultRoute:null!=t&&t.defaultRoute?"".concat(r,"#").concat(null==t?void 0:t.defaultRoute):"".concat(r,"#/")},e}return(0,r.Z)(d,[{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"render",value:function(){var t=this.props,e=t.children,i=(t.NotFound,this.state),a=i.route,n=i.defaultRoute;if(!a.hash)return m.push(n),Ut("div",null);var r=!1;(this.routes||[]).forEach((function(t){var e=v(a.hash.substr(1))("".concat(a.hash.substr(1)));e&&(r={name:t,data:e})}));var s={route:a,matched:r},o=!r;return Ut(b.Provider,{value:s},o?Ut("div",null,"Not found"):e)}}]),d}(e.Component),ie=function(t){var e=t.width,i=t.height;return Ut("svg",{id:"e8f68bdd-4984-4f2e-95b7-7fc8ec281257","data-name":"Layer 1",width:e,height:i,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 918.14 765.54"},Ut("defs",null,Ut("linearGradient",{id:"27aa7b70-b106-4a00-be67-693c8380e41d",x1:"397.74",y1:"717.25",x2:"397.74",y2:"86.11",gradientUnits:"userSpaceOnUse"},Ut("stop",{offset:"0","stop-color":"gray","stop-opacity":"0.25"}),Ut("stop",{offset:"0.54","stop-color":"gray","stop-opacity":"0.12"}),Ut("stop",{offset:"1","stop-color":"gray","stop-opacity":"0.1"})),Ut("linearGradient",{id:"46a816da-c484-41ec-8a6f-fbf14454d910",x1:"288.88",y1:"378.44",x2:"288.88",y2:"209.65",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),Ut("linearGradient",{id:"32b634d8-28f1-48d9-a868-f602a2cad942",x1:"288.88",y1:"328.29",x2:"288.88",y2:"223.1",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),Ut("clipPath",{id:"7a4c6aff-0be0-461b-a111-b3ae1b8fbf73",transform:"translate(-140.93 -67.23)"},Ut("rect",{id:"8cc91f6d-19b0-43cc-9c18-2faa83ac34ba","data-name":"<Rectangle>",x:"354.51",y:"291.55",width:"150.6",height:"101.52",fill:"#fff"})),Ut("linearGradient",{id:"38f1cb81-8fac-4205-a0ff-a33ac00d354c",x1:"288.88",y1:"594.94",x2:"288.88",y2:"426.14",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),Ut("linearGradient",{id:"6fc01aaf-135e-403e-a209-43b2a4fe59f1",x1:"288.88",y1:"544.79",x2:"288.88",y2:"439.6",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),Ut("clipPath",{id:"79ce363a-d134-40e4-9f82-b96d04a36978",transform:"translate(-140.93 -67.23)"},Ut("rect",{id:"5b44e697-61fe-43bd-9a58-5f3e41301748","data-name":"<Rectangle>",x:"354.51",y:"508.05",width:"150.6",height:"101.52",fill:"#fff"})),Ut("linearGradient",{id:"54803c44-522d-4b9e-9a34-f1f7b43e8483",x1:"671.57",y1:"760.34",x2:"671.57",y2:"129.2",gradientTransform:"translate(1109.43 -194.1) rotate(90)",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),Ut("linearGradient",{id:"089a6a47-adaa-499b-aefb-cd6464b62fb8",x1:"670.96",y1:"553.63",x2:"670.96",y2:"387.28",gradientTransform:"translate(1129.51 -168.41) rotate(90)",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),Ut("linearGradient",{id:"fd8d88e0-7826-450d-9e0b-001d1be709c2",x1:"637.66",y1:"754.12",x2:"637.66",y2:"601.05",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),Ut("linearGradient",{id:"8d1793c5-b76e-44e2-a52e-569460402331",x1:"778.37",y1:"673.86",x2:"778.37",y2:"569.13",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),Ut("linearGradient",{id:"4745700d-8097-45ff-9f71-625443fc4ad8",x1:"778.37",y1:"774.41",x2:"778.37",y2:"713.66",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"})),Ut("title",null,"secure data"),Ut("g",{opacity:"0.5"},Ut("rect",{x:"162.9",y:"86.11",width:"469.69",height:"631.14",fill:"url(#27aa7b70-b106-4a00-be67-693c8380e41d)"})),Ut("rect",{x:"169.02",y:"94.67",width:"455.01",height:"609.12",fill:"#f2f2f2"}),Ut("rect",{x:"204.49",y:"120.36",width:"156.56",height:"4.89",fill:"#e0e0e0"}),Ut("rect",{x:"204.49",y:"142.37",width:"156.56",height:"4.89",fill:"#6c63ff",opacity:"0.7"}),Ut("rect",{x:"384.29",y:"120.36",width:"156.56",height:"4.89",fill:"#e0e0e0"}),Ut("rect",{x:"408.75",y:"259.8",width:"156.56",height:"4.89",fill:"#e0e0e0"}),Ut("rect",{x:"412.42",y:"273.25",width:"156.56",height:"4.89",fill:"#e0e0e0"}),Ut("rect",{x:"419.76",y:"286.7",width:"156.56",height:"4.89",fill:"#e0e0e0"}),Ut("rect",{x:"408.75",y:"476.29",width:"156.56",height:"4.89",fill:"#e0e0e0"}),Ut("rect",{x:"412.42",y:"489.75",width:"156.56",height:"4.89",fill:"#e0e0e0"}),Ut("rect",{x:"419.76",y:"503.2",width:"156.56",height:"4.89",fill:"#e0e0e0"}),Ut("g",{opacity:"0.5"},Ut("rect",{x:"205.71",y:"209.65",width:"166.35",height:"168.79",fill:"url(#46a816da-c484-41ec-8a6f-fbf14454d910)"})),Ut("rect",{x:"206.76",y:"213.32",width:"163.72",height:"161.45",fill:"#f5f5f5"}),Ut("g",{opacity:"0.5"},Ut("rect",{x:"212.53",y:"223.1",width:"152.7",height:"105.19",fill:"url(#32b634d8-28f1-48d9-a868-f602a2cad942)"})),Ut("rect",{id:"689f37f3-cc41-448d-b172-63ec123bc985","data-name":"<Rectangle>",x:"213.58",y:"224.32",width:"150.6",height:"101.52",fill:"#fff"}),Ut("g",{"clip-path":"url(#7a4c6aff-0be0-461b-a111-b3ae1b8fbf73)"},Ut("polygon",{points:"200.82 322.18 238.74 263.46 254.64 289.15 288.88 253.68 318.24 289.15 343.93 236.56 409.98 341.75 195.93 334.41 200.82 322.18",fill:"#6c63ff",opacity:"0.4"}),Ut("circle",{cx:"230.17",cy:"239",r:"11.01",fill:"#6c63ff",opacity:"0.4"})),Ut("g",{opacity:"0.5"},Ut("rect",{x:"205.71",y:"426.14",width:"166.35",height:"168.79",fill:"url(#38f1cb81-8fac-4205-a0ff-a33ac00d354c)"})),Ut("rect",{x:"206.76",y:"429.81",width:"163.72",height:"161.45",fill:"#f5f5f5"}),Ut("g",{opacity:"0.5"},Ut("rect",{x:"212.53",y:"439.6",width:"152.7",height:"105.19",fill:"url(#6fc01aaf-135e-403e-a209-43b2a4fe59f1)"})),Ut("rect",{id:"b429ac3a-f8a8-4171-bcce-5b6c002c0714","data-name":"<Rectangle>",x:"213.58",y:"440.82",width:"150.6",height:"101.52",fill:"#fff"}),Ut("g",{"clip-path":"url(#79ce363a-d134-40e4-9f82-b96d04a36978)"},Ut("polygon",{points:"200.82 538.67 238.74 479.96 254.64 505.65 288.88 470.18 318.24 505.65 343.93 453.05 409.98 558.24 195.93 550.9 200.82 538.67",fill:"#bdbdbd",opacity:"0.4"}),Ut("circle",{cx:"230.17",cy:"455.5",r:"11.01",fill:"#bdbdbd",opacity:"0.4"})),Ut("g",{opacity:"0.5"},Ut("rect",{x:"349.09",y:"242.63",width:"631.14",height:"469.69",transform:"translate(-74.16 969.06) rotate(-78.76)",fill:"url(#54803c44-522d-4b9e-9a34-f1f7b43e8483)"})),Ut("rect",{x:"359.37",y:"247.33",width:"609.12",height:"455.01",transform:"translate(-72.16 966.22) rotate(-78.76)",fill:"#fff"}),Ut("rect",{x:"523.5",y:"197.22",width:"322.91",height:"4.89",transform:"translate(-88.86 -196.94) rotate(11.24)",fill:"#e0e0e0"}),Ut("rect",{x:"433.36",y:"650.7",width:"322.91",height:"4.89",transform:"translate(-2.18 -170.66) rotate(11.24)",fill:"#e0e0e0"}),Ut("rect",{x:"428.58",y:"671.14",width:"249.52",height:"4.89",transform:"translate(1.01 -162.18) rotate(11.24)",fill:"#e0e0e0"}),Ut("rect",{x:"424.6",y:"683.47",width:"92.96",height:"4.89",transform:"translate(1.84 -145.91) rotate(11.24)",fill:"#6c63ff",opacity:"0.7"}),Ut("rect",{x:"519.57",y:"209.08",width:"161.45",height:"4.89",transform:"translate(-88.17 -180.2) rotate(11.24)",fill:"#6c63ff",opacity:"0.7"}),Ut("rect",{x:"512.84",y:"249.31",width:"291.11",height:"4.89",transform:"translate(-79.21 -190.76) rotate(11.24)",fill:"#e0e0e0"}),Ut("rect",{x:"509.47",y:"255.44",width:"70.94",height:"4.89",transform:"translate(-80.19 -168.52) rotate(11.24)",fill:"#3ad29f",opacity:"0.7"}),Ut("rect",{x:"501.56",y:"307.59",width:"322.91",height:"4.89",transform:"translate(-67.76 -190.54) rotate(11.24)",fill:"#e0e0e0"}),Ut("g",{opacity:"0.5"},Ut("rect",{x:"575.87",y:"357.6",width:"166.35",height:"289.88",transform:"translate(-103.27 983.74) rotate(-78.76)",fill:"url(#089a6a47-adaa-499b-aefb-cd6464b62fb8)"})),Ut("rect",{x:"516.06",y:"420.61",width:"286.22",height:"162.68",transform:"translate(-30.42 -186.11) rotate(11.24)",fill:"#fff"}),Ut("rect",{x:"496.08",y:"335.18",width:"322.91",height:"4.89",transform:"translate(-62.49 -188.94) rotate(11.24)",fill:"#e0e0e0"}),Ut("rect",{x:"547.86",y:"424.02",width:"35.47",height:"118.64",transform:"translate(-35.84 -168.22) rotate(11.24)",fill:"#6c63ff"}),Ut("rect",{x:"606.43",y:"475.19",width:"35.47",height:"79.5",transform:"translate(-28.56 -179.03) rotate(11.24)",fill:"#3ad29f"}),Ut("rect",{x:"665.23",y:"523.93",width:"35.47",height:"42.81",transform:"translate(-21.5 -189.92) rotate(11.24)",fill:"#f55f44"}),Ut("rect",{x:"731.91",y:"492.72",width:"35.47",height:"86.84",transform:"translate(-22.02 -203.09) rotate(11.24)",fill:"#fdd835"}),Ut("g",{opacity:"0.5"},Ut("rect",{x:"128.65",y:"645.09",width:"3.67",height:"20.79",fill:"#47e6b1"}),Ut("rect",{x:"269.58",y:"712.31",width:"3.67",height:"20.79",transform:"translate(853.2 384.07) rotate(90)",fill:"#47e6b1"})),Ut("path",{d:"M699.44,75.56a4.49,4.49,0,0,1-2.5-5.43,2.16,2.16,0,0,0,.1-.5h0a2.25,2.25,0,0,0-4-1.49h0a2.16,2.16,0,0,0-.25.44,4.49,4.49,0,0,1-5.43,2.5,2.16,2.16,0,0,0-.5-.1h0a2.25,2.25,0,0,0-1.49,4h0a2.16,2.16,0,0,0,.44.25,4.49,4.49,0,0,1,2.5,5.43,2.16,2.16,0,0,0-.1.5h0a2.25,2.25,0,0,0,4,1.49h0a2.16,2.16,0,0,0,.25-.44,4.49,4.49,0,0,1,5.43-2.5,2.16,2.16,0,0,0,.5.1h0a2.25,2.25,0,0,0,1.49-4h0A2.16,2.16,0,0,0,699.44,75.56Z",transform:"translate(-140.93 -67.23)",fill:"#4d8af0",opacity:"0.5"}),Ut("path",{d:"M286.33,179.4a4.49,4.49,0,0,1-2.5-5.43,2.16,2.16,0,0,0,.1-.5h0a2.25,2.25,0,0,0-4-1.49h0a2.16,2.16,0,0,0-.25.44,4.49,4.49,0,0,1-5.43,2.5,2.16,2.16,0,0,0-.5-.1h0a2.25,2.25,0,0,0-1.49,4h0a2.16,2.16,0,0,0,.44.25,4.49,4.49,0,0,1,2.5,5.43,2.16,2.16,0,0,0-.1.5h0a2.25,2.25,0,0,0,4,1.49h0a2.16,2.16,0,0,0,.25-.44,4.49,4.49,0,0,1,5.43-2.5,2.16,2.16,0,0,0,.5.1h0a2.25,2.25,0,0,0,1.49-4h0A2.16,2.16,0,0,0,286.33,179.4Z",transform:"translate(-140.93 -67.23)",fill:"#fdd835",opacity:"0.5"}),Ut("path",{d:"M253.63,484.46a4.49,4.49,0,0,1-2.5-5.43,2.16,2.16,0,0,0,.1-.5h0a2.25,2.25,0,0,0-4-1.49h0a2.16,2.16,0,0,0-.25.44,4.49,4.49,0,0,1-5.43,2.5,2.16,2.16,0,0,0-.5-.1h0a2.25,2.25,0,0,0-1.49,4h0a2.16,2.16,0,0,0,.44.25,4.49,4.49,0,0,1,2.5,5.43,2.16,2.16,0,0,0-.1.5h0a2.25,2.25,0,0,0,4,1.49h0a2.16,2.16,0,0,0,.25-.44,4.49,4.49,0,0,1,5.43-2.5,2.16,2.16,0,0,0,.5.1h0a2.25,2.25,0,0,0,1.49-4h0A2.16,2.16,0,0,0,253.63,484.46Z",transform:"translate(-140.93 -67.23)",fill:"#fdd835",opacity:"0.5"}),Ut("circle",{cx:"337.81",cy:"28.62",r:"7.34",fill:"#f55f44",opacity:"0.5"}),Ut("circle",{cx:"7.34",cy:"317.46",r:"7.34",fill:"#f55f44",opacity:"0.5"}),Ut("circle",{cx:"863.76",cy:"120.36",r:"7.34",fill:"#f55f44",opacity:"0.5"}),Ut("circle",{cx:"822.17",cy:"339.3",r:"7.34",fill:"#4d8af0",opacity:"0.5"}),Ut("circle",{cx:"37.68",cy:"145.22",r:"7.34",fill:"#47e6b1",opacity:"0.5"}),Ut("circle",{cx:"853.29",cy:"647.34",r:"7.34",fill:"#47e6b1",opacity:"0.5"}),Ut("circle",{cx:"910.8",cy:"430.97",r:"7.34",fill:"#47e6b1",opacity:"0.5"}),Ut("rect",{x:"544.42",y:"601.05",width:"186.48",height:"153.07",fill:"url(#fd8d88e0-7826-450d-9e0b-001d1be709c2)"}),Ut("path",{d:"M723.82,639a54.55,54.55,0,0,1,109.1,0v34.91h15.27V639a69.82,69.82,0,0,0-139.65,0v34.91h15.27Z",transform:"translate(-140.93 -67.23)",fill:"url(#8d1793c5-b76e-44e2-a52e-569460402331)"}),Ut("path",{d:"M726,638.25a52.37,52.37,0,1,1,104.74,0v33.52H845.4V638.25a67,67,0,0,0-134.06,0v33.52H726Z",transform:"translate(-140.93 -67.23)",fill:"#f5f5f5"}),Ut("rect",{x:"546.32",y:"602.45",width:"182.24",height:"148.73",fill:"#6c63ff"}),Ut("rect",{x:"546.32",y:"602.45",width:"182.24",height:"148.73",fill:"#f5f5f5"}),Ut("rect",{x:"546.32",y:"631.77",width:"182.24",height:"90.07",fill:"#6c63ff"}),Ut("path",{d:"M791.73,727a13.36,13.36,0,1,0-23.08,9.15v28.51a9.72,9.72,0,0,0,19.44,0V736.18A13.3,13.3,0,0,0,791.73,727Z",transform:"translate(-140.93 -67.23)",fill:"url(#4745700d-8097-45ff-9f71-625443fc4ad8)"}),Ut("path",{d:"M789.89,729.38a11.52,11.52,0,1,0-19.9,7.89v24.58a8.38,8.38,0,1,0,16.76,0V737.27A11.47,11.47,0,0,0,789.89,729.38Z",transform:"translate(-140.93 -67.23)",opacity:"0.2"}))},__=wp.i18n.__,ae=wp.components,ne=ae.Flex,re=ae.FlexItem,se=ae.FlexBlock,oe=function(){return Ut(ne,{style:{padding:"30px",background:"#fff"}},Ut(re,null,Ut(ie,{width:"250px"})),Ut(se,{style:{marginLeft:"20px"}},Ut("h1",null,__("Get detailed video insights.","presto-player")),Ut("p",null,__("Upgrade to Pro and get video insights like plays, watch-time, and drop off numbers.","presto-player")),Ut("a",{href:"https://prestoplayer.com",target:"_blank",className:"button button-primary"},__("Learn More","presto-player"))))};function le(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var ce=n(5861),he=n(1284),de=n.n(he);function ue(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function pe(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ue(Object(i),!0).forEach((function(e){(0,h.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ue(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}wp.i18n.__;var fe=wp.apiFetch,ge=wp.element.useState,xe=wp.compose.createHigherOrderComponent,me=function(){return xe((function(t){return function(e){var a=ge(!1),n=(0,i.Z)(a,2),r=n[0],s=n[1],o=ge(1),l=(0,i.Z)(o,2),c=l[0],h=l[1],d=ge(0),u=(0,i.Z)(d,2),f=u[0],g=u[1],x=ge(0),m=(0,i.Z)(x,2),b=m[0],v=m[1],y=ge([]),w=(0,i.Z)(y,2),k=w[0],S=w[1],A=ge(""),C=(0,i.Z)(A,2),P=C[0],L=C[1],T=function(){var t=(0,ce.Z)(de().mark((function t(e){var i,a,n,r;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.endpoint,a=e.params,n=void 0===a?{}:a,s(!0),t.prev=2,t.next=5,fe({path:wp.url.addQueryArgs(i,pe({page:c,per_page:5},n)),parse:!1}).then((function(t){var e=t.headers?parseInt(t.headers.get("X-WP-Total")):0,i=t.headers?parseInt(t.headers.get("X-WP-TotalPages")):0;return g(e),v(i),t.json()}));case 5:r=t.sent,S(r),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),console.error(t.t0),null!==t.t0&&void 0!==t.t0&&t.t0.message&&L(t.t0.message);case 13:return t.prev=13,s(!1),t.finish(13);case 16:case"end":return t.stop()}}),t,null,[[2,9,13,16]])})));return function(_x){return t.apply(this,arguments)}}();return Ut(t,p({loading:r,setLoading:s,fetchData:T,page:c,setPage:h,total:f,setTotal:g,totalPages:b,setTotalPages:v,data:k,setData:S,error:P,setError:L},e))}}),"withDataList")},be=wp.i18n,ve=be.__,ye=be.sprintf,we=function(t){var e=(new Date).getTimezoneOffset();return new Date(t.getTime()-60*e*1e3).toISOString().split("T")[0]+"T00:00:00.000Z"},ke=wp.components,Se=ke.Spinner,Ae=ke.Flex,Ce=ke.FlexItem,Pe=function(t){var e=t.height;return Ut(Ae,{style:{height:"".concat(void 0===e?100:e,"px")},align:"center",justify:"center"},Ut(Ce,null,Ut(Se,null)))},Le=wp.i18n.__,Te=wp.components,De=Te.Card,Me=Te.CardBody,Ee=Te.Flex,Ie=Te.FlexBlock,Oe=Te.Button,Re=Te.ButtonGroup,Ne=wp.element,ze=Ne.useState,Fe=Ne.useEffect,Ye=function(t){var e=t.page,a=t.setPage,n=t.perPage,r=t.total,s=t.totalPages,o=ze(!1),l=(0,i.Z)(o,2),c=l[0],h=l[1],d=ze(!1),u=(0,i.Z)(d,2),p=u[0],f=u[1],g=ze(0),x=(0,i.Z)(g,2),m=x[0],b=x[1],v=ze(0),y=(0,i.Z)(v,2),w=y[0],k=y[1];return Fe((function(){b(Math.min(n*e,r)),k(n*(e-1)+1)}),[n,e,r]),Fe((function(){h(e-1>0),f(s>=e+1)}),[e,s]),Ut(De,{size:"large",className:"presto-card pagination"},Ut(Me,{className:"presto-flow"},Ut(Ee,null,Ut(Ie,null,sprintf(Le("Showing %1s to %2s of %3s","presto-player"),w,m,r)),Ut(Ie,null,Ut(Ee,{justify:"flex-end"},Ut(Re,null,Ut(Oe,{isSecondary:!0,disabled:!c,onClick:function(){a(Math.max(e-1,0))}},Le("Previous","presto-player")),Ut(Oe,{isSecondary:!0,disabled:!p,onClick:function(){a(Math.min(s,e+1))}},Le("Next","presto-player"))))))))},Xe=wp.i18n.__,_e=wp.element,He=(_e.useRef,_e.useEffect,_e.useState,wp.components),$e=He.Card,Be=He.CardBody,We=(He.Flex,He.FlexBlock,He.Button,He.ButtonGroup,function(t){var e=t.columns,i=t.data,a=t.onRowClick,n=t.title;return i.length?Ut($e,{size:"large",className:"presto-card table-card"},Ut(Be,{className:"presto-flow"},Ut("div",{className:"presto-card__title"},n),Ut("table",{role:"table",className:te()("presto-table",{"is-clickable":a})},Ut("thead",{role:"rowgroup"},Ut("tr",{role:"row"},e&&e.map((function(t){return Ut("th",{key:t.key,role:"columnheader"},t.label)})))),Ut("tbody",{role:"rowgroup"},i.map((function(t,i){return Ut("tr",{role:"row",key:"row-".concat(i),onClick:function(){return a&&a(t)}},e.map((function(e,a){return Ut("td",{role:"cell","data-title":e.label,key:"row-".concat(i,"-").concat(a),"aria-label":e.label},e.render?e.render(t):Ut("div",null,e.value(t)))})))})))))):Ut($e,{size:"large",className:"presto-card table-card"},Ut(Be,{className:"presto-flow"},Ut("div",{className:"presto-card__title"},n),Ut("div",{style:{opacity:.65}},Xe("No data available.","presto-player"))))}),je=wp.i18n.__,Ve=wp.element,Ge=(Ve.useEffect,Ve.useState,wp.components),Ze=Ge.Card,Ue=Ge.CardBody,qe=function(t){var e=t.perPage,i=void 0===e?10:e,a=t.title,n=t.page,r=t.setPage,s=t.loading,o=t.total,l=t.totalPages,c=t.columns,h=t.data,d=t.onSelect;return s?Ut(Ze,null,Ut(Pe,null)):null!=h&&h.length?Ut("div",{className:"datatable"},Ut(We,{data:h,columns:c,perPage:i,onRowClick:d,title:a}),!!o&&Ut(Ye,{page:n,setPage:r,perPage:i,total:o,totalPages:l})):Ut(Ze,{size:"large",className:"presto-card"},Ut(Ue,{className:"presto-flow"},Ut("div",{className:"presto-card__title"},a),Ut("div",{style:{opacity:.65}},je("No data available.","presto-player"))))};function Je(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function Qe(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Je(Object(i),!0).forEach((function(e){(0,h.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Je(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Ke=wp.i18n.__,ti=wp.element.useEffect,ei=(0,wp.compose.compose)([me()])((function(t){var e=t.loading,i=t.page,a=t.setPage,n=t.total,r=t.totalPages,s=t.data,o=t.error,l=t.fetchData,c=t.startDate,h=t.endDate;ti((function(){l({endpoint:"/presto-player/v1/analytics/top-users",params:Qe(Qe({per_page:5},c?{start:we(c)}:{}),h?{end:we(h)}:{})})}),[i,c,h]);var d=[{key:"name",label:Ke("Name","presto-player"),value:function(t){var e;return null==t||null===(e=t.user)||void 0===e?void 0:e.name}},{key:"total_view",label:Ke("Total View","presto-player"),value:function(t){var e,i;return null==t||null===(e=t.stats)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.data}},{key:"avg_view_time",label:Ke("Avg View Time","presto-player"),render:function(t){var e,i;return Ut("div",{className:"presto-badge"},null==t||null===(e=t.stats)||void 0===e||null===(i=e[1])||void 0===i?void 0:i.data)}}];return o?{error:o}:Ut(qe,{title:Ke("Top Users","presto-player"),page:i,perPage:5,setPage:a,loading:e,total:n,totalPages:r,columns:d,data:s,onSelect:function(t){var e,i,a;return i=null==t||null===(e=t.user)||void 0===e?void 0:e.id,a=m.location.search,void m.push("".concat(a,"#/user/").concat(i))}})}));function ii(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function ai(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ii(Object(i),!0).forEach((function(e){(0,h.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ii(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ni=wp.i18n.__,ri=wp.element.useEffect,si=(0,wp.compose.compose)([me()])((function(t){var e=t.loading,i=t.page,a=t.setPage,n=t.total,r=t.totalPages,s=t.data,o=t.error,l=t.fetchData,c=t.startDate,h=t.endDate,d=t.userId;ri((function(){l({endpoint:"/presto-player/v1/analytics/top-videos",params:ai(ai(ai({per_page:10},c?{start:we(c)}:{}),h?{end:we(h)}:{}),d?{user_id:d}:{})})}),[i,c,h]);var u=[{key:"name",label:ni("Name","presto-player"),render:function(t){return Ut("h3",{style:{marginBottom:0,wordBreak:"break-all"}},t.video.title?t.video.title:ni("Untitled","presto-player"))}},{key:"total_view",label:ni("Total View","presto-player"),value:function(t){return t.stats[0].data}},{key:"avg_view_time",label:ni("Avg View Time","presto-player"),render:function(t){return Ut("div",{className:"presto-badge"},t.stats[1].data)}},{key:"view_more",label:"",render:function(t){return Ut("span",{style:{color:"var(--wp-admin-theme-color, #007cba)"}},ni("View Details","presto-player")," →")}}];return o?{error:o}:Ut(qe,{title:ni("Top Media","presto-player"),perPage:10,page:i,setPage:a,loading:e,total:n,totalPages:r,columns:u,data:s,onSelect:function(t){var e,i,a;i=null==t||null===(e=t.video)||void 0===e?void 0:e.id,a=m.location.search,m.push("".concat(a,"#/video/").concat(i))}})})),oi=wp.apiFetch;oi.use(oi.createNonceMiddleware(prestoPlayer.nonce)),oi.use(oi.createRootURLMiddleware(prestoPlayer.root+prestoPlayer.prestoVersionString));var li=oi,ci=n(7229);function hi(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function di(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?hi(Object(i),!0).forEach((function(e){(0,h.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):hi(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ui=wp.i18n,pi=ui.__,fi=ui.sprintf,gi=wp.components,xi=(gi.Card,gi.CardBody),mi=wp.element,bi=mi.useState,vi=mi.useEffect,yi=(mi.useRef,function(t){var e=bi(!0),a=(0,i.Z)(e,2),n=a[0],r=a[1],s=bi(0),o=(0,i.Z)(s,2),l=o[0],c=o[1],h=t.startDate,d=t.endDate,u=bi([{name:"Views",data:[]}]),p=(0,i.Z)(u,2),f=p[0],g=p[1],x={options:{chart:{toolbar:{show:!1}},yaxis:{min:0,labels:{formatter:function(t){return t<1?0:Math.abs(t)>999?Math.sign(t)*(Math.abs(t)/1e3).toFixed(1)+"k":Math.sign(t)*Math.abs(t).toFixed(0)}}},colors:["#7c3aed"],xaxis:{type:"datetime",min:new Date(h).setHours(0,0,0,0),max:new Date(d).setHours(23,59,59,999)},dataLabels:{enabled:!1},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.7,opacityTo:.9,stops:[0,90,100]}}}};vi((function(){m()}),[t]);var m=function(){r(!0),li({path:"/presto-player/v1/analytics/views?"+jQuery.param(di(di({},h?{start:we(h)}:{}),d?{end:we(d)}:{})),parse:!1}).then(function(){var t=(0,ce.Z)(de().mark((function t(e){var i,a;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c(e.headers&&e.headers.get("X-WP-Total")),t.next=3,e.json();case 3:i=t.sent,a=[],i.length&&i.forEach((function(t){a.push({x:t.date_time,y:t.total})})),g([{name:"Views",data:a}]);case 7:case"end":return t.stop()}}),t)})));return function(_x){return t.apply(this,arguments)}}()).catch((function(t){console.error(t)})).finally((function(){r(!1)}))};return n?Ut(xi,null,Ut(Pe,null)):Ut(xi,{className:"presto-flow"},Ut("div",{className:"presto-card__title"},fi(pi("%d Unique Views","presto-player"),l)),Ut(ci.Z,{options:x.options,series:f,type:"area",height:280}))}),wi=wp.i18n,ki=wi.__,Si=wi.sprintf,Ai=wp.components,Ci=(Ai.Card,Ai.CardBody),Pi=wp.element,Li=Pi.useState,Ti=Pi.useEffect,Di=(Pi.useRef,function(t){var e=Li(!0),a=(0,i.Z)(e,2),n=a[0],r=a[1],s=Li(0),o=(0,i.Z)(s,2),l=o[0],c=o[1],h=t.startDate,d=t.endDate,u=Li([{name:"Views",data:[]}]),p=(0,i.Z)(u,2),f=p[0],g=p[1],x={options:{chart:{toolbar:{show:!1}},yaxis:{labels:{formatter:function(t){return Math.abs(t)>999?Math.sign(t)*(Math.abs(t)/1e3).toFixed(1)+"k min":(Math.sign(t)*Math.abs(t)).toFixed(1)+"min"}}},colors:["#7c3aed"],xaxis:{type:"datetime",min:new Date(h).setHours(0,0,0,0),max:new Date(d).setHours(23,59,59,999)},dataLabels:{enabled:!1},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.7,opacityTo:.9,stops:[0,90,100]}}}};Ti((function(){k()}),[t]);var m,b,v,y,w,k=function(){r(!0),li({path:"/presto-player/v1/analytics/watch-time?"+jQuery.param({start:we(h),end:we(d)}),parse:!1}).then(function(){var t=(0,ce.Z)(de().mark((function t(e){var i,a,n,r;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.json();case 2:i=t.sent,a=i.data,n=i.average,c(parseFloat(n)),r=[],a.length&&a.forEach((function(t){r.push({x:t.date_time,y:(t.total/60).toFixed(2)})})),g([{name:"Watch Time",data:r}]);case 9:case"end":return t.stop()}}),t)})));return function(_x){return t.apply(this,arguments)}}()).catch((function(t){console.error(t)})).finally((function(){r(!1)}))};return n?Ut(Ci,null,Ut(Pe,null)):Ut(Ci,{className:"presto-flow"},Ut("div",{className:"presto-card__title"},Si(ki("%s average watch time","presto-player"),(m=l,b=Math.floor(m/60/60),v=Math.floor(m/60)-60*b,y=m%60,w="",b&&(w+=ye(ve("%d hours","presto-player"),b)+", "),v&&(w+=ye(ve("%d minutes","presto-player"),v)+" "),(b||v)&&y&&(w+=ve("and","presto-player")+" "),w+ye(ve("%d seconds","presto-player"),y)))),Ut(ci.Z,{options:x.options,series:f,type:"area",height:280}))}),Mi=wp.i18n.__,Ei=wp.components,Ii=Ei.Panel,Oi=Ei.TabPanel,Ri=function(t){var e=t.startDate,i=t.endDate;return Ut(Ii,null,Ut(Oi,{className:"presto-module-tabs",onSelect:function(){},tabs:[{name:"views",title:Mi("Views","presto-player")},{name:"watch",title:Mi("Watch Time","presto-player")}]},(function(t){switch(t.name){case"views":return Ut(yi,{startDate:e,endDate:i});case"watch":return Ut(Di,{startDate:e,endDate:i});default:return Ut(React.Fragment,null,"Not Found")}})))},Ni=n(7466),zi=n.n(Ni),Fi=(n(6710),wp.i18n.__),Yi=wp.element,Xi=Yi.useRef,_i=Yi.useEffect,Hi=Yi.useState,$i=function(t){var e=t.startDate,a=t.setStartDate,n=t.endDate,r=t.setEndDate,s=Xi(),o=Hi(25),l=(0,i.Z)(o,2),c=l[0],h=l[1];return _i((function(){new(zi())({element:null==s?void 0:s.current,singleMode:!1,format:"MMMM D YYYY",autoApply:!1,plugins:["ranges"],maxDate:new Date,numberOfMonths:2,buttonText:{apply:Fi("Apply","presto-player"),cancel:Fi("Cancel","presto-player")},dropdowns:{minYear:1990,maxYear:null,months:!0,years:!0},setup:function(t){t.setDateRange(e,n),t.on("button:apply",(function(t,e){a(t.dateInstance),r(e.dateInstance),h(s.current.value.length)}))}})}),[s]),Ut("div",{className:"component-base-control"},Ut("div",{className:"components-base-control__field"},Ut("input",{className:"components-text-control__input presto-settings__date-select",ref:s,size:c})))},Bi=window.wp.apiFetch,Wi=n.n(Bi),ji=window.wp.components,Vi=(n(9611),function(){function t(t){this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}var e=t.prototype;return e.insert=function(t){if(this.ctr%(this.isSpeedy?65e3:1)==0){var e,i=function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e}(this);e=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(i,e),this.tags.push(i)}var a=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(a);try{var r=105===t.charCodeAt(1)&&64===t.charCodeAt(0);n.insertRule(t,r?0:n.cssRules.length)}catch(t){}}else a.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}()),Gi=function(t){function e(t,a,l,c,u){for(var p,f,g,x,y,k=0,S=0,A=0,C=0,P=0,I=0,R=g=p=0,z=0,F=0,Y=0,X=0,_=l.length,H=_-1,$="",B="",W="",j="";z<_;){if(f=l.charCodeAt(z),z===H&&0!==S+C+A+k&&(0!==S&&(f=47===S?10:47),C=A=k=0,_++,H++),0===S+C+A+k){if(z===H&&(0<F&&($=$.replace(d,"")),0<$.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:$+=l.charAt(z)}f=59}switch(f){case 123:for(p=($=$.trim()).charCodeAt(0),g=1,X=++z;z<_;){switch(f=l.charCodeAt(z)){case 123:g++;break;case 125:g--;break;case 47:switch(f=l.charCodeAt(z+1)){case 42:case 47:t:{for(R=z+1;R<H;++R)switch(l.charCodeAt(R)){case 47:if(42===f&&42===l.charCodeAt(R-1)&&z+2!==R){z=R+1;break t}break;case 10:if(47===f){z=R+1;break t}}z=R}}break;case 91:f++;case 40:f++;case 34:case 39:for(;z++<H&&l.charCodeAt(z)!==f;);}if(0===g)break;z++}if(g=l.substring(X,z),0===p&&(p=($=$.replace(h,"").trim()).charCodeAt(0)),64===p){switch(0<F&&($=$.replace(d,"")),f=$.charCodeAt(1)){case 100:case 109:case 115:case 45:F=a;break;default:F=E}if(X=(g=e(a,F,g,f,u+1)).length,0<O&&(y=o(3,g,F=i(E,$,Y),a,T,L,X,f,u,c),$=F.join(""),void 0!==y&&0===(X=(g=y.trim()).length)&&(f=0,g="")),0<X)switch(f){case 115:$=$.replace(w,s);case 100:case 109:case 45:g=$+"{"+g+"}";break;case 107:g=($=$.replace(m,"$1 $2"))+"{"+g+"}",g=1===M||2===M&&r("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=$+g,112===c&&(B+=g,g="")}else g=""}else g=e(a,i(a,$,Y),g,c,u+1);W+=g,g=Y=F=R=p=0,$="",f=l.charCodeAt(++z);break;case 125:case 59:if(1<(X=($=(0<F?$.replace(d,""):$).trim()).length))switch(0===R&&(p=$.charCodeAt(0),45===p||96<p&&123>p)&&(X=($=$.replace(" ",":")).length),0<O&&void 0!==(y=o(1,$,a,t,T,L,B.length,c,u,c))&&0===(X=($=y.trim()).length)&&($="\0\0"),p=$.charCodeAt(0),f=$.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){j+=$+l.charAt(z);break}default:58!==$.charCodeAt(X-1)&&(B+=n($,p,f,$.charCodeAt(2)))}Y=F=R=p=0,$="",f=l.charCodeAt(++z)}}switch(f){case 13:case 10:47===S?S=0:0===1+p&&107!==c&&0<$.length&&(F=1,$+="\0"),0<O*N&&o(0,$,a,t,T,L,B.length,c,u,c),L=1,T++;break;case 59:case 125:if(0===S+C+A+k){L++;break}default:switch(L++,x=l.charAt(z),f){case 9:case 32:if(0===C+k+S)switch(P){case 44:case 58:case 9:case 32:x="";break;default:32!==f&&(x=" ")}break;case 0:x="\\0";break;case 12:x="\\f";break;case 11:x="\\v";break;case 38:0===C+S+k&&(F=Y=1,x="\f"+x);break;case 108:if(0===C+S+k+D&&0<R)switch(z-R){case 2:112===P&&58===l.charCodeAt(z-3)&&(D=P);case 8:111===I&&(D=I)}break;case 58:0===C+S+k&&(R=z);break;case 44:0===S+A+C+k&&(F=1,x+="\r");break;case 34:case 39:0===S&&(C=C===f?0:0===C?f:C);break;case 91:0===C+S+A&&k++;break;case 93:0===C+S+A&&k--;break;case 41:0===C+S+k&&A--;break;case 40:0===C+S+k&&(0===p&&(2*P+3*I==533||(p=1)),A++);break;case 64:0===S+A+C+k+R+g&&(g=1);break;case 42:case 47:if(!(0<C+k+A))switch(S){case 0:switch(2*f+3*l.charCodeAt(z+1)){case 235:S=47;break;case 220:X=z,S=42}break;case 42:47===f&&42===P&&X+2!==z&&(33===l.charCodeAt(X+2)&&(B+=l.substring(X,z+1)),x="",S=0)}}0===S&&($+=x)}I=P,P=f,z++}if(0<(X=B.length)){if(F=a,0<O&&void 0!==(y=o(2,B,F,t,T,L,X,c,u,c))&&0===(B=y).length)return j+B+W;if(B=F.join(",")+"{"+B+"}",0!=M*D){switch(2!==M||r(B,2)||(D=0),D){case 111:B=B.replace(v,":-moz-$1")+B;break;case 112:B=B.replace(b,"::-webkit-input-$1")+B.replace(b,"::-moz-$1")+B.replace(b,":-ms-input-$1")+B}D=0}}return j+B+W}function i(t,e,i){var n=e.trim().split(g);e=n;var r=n.length,s=t.length;switch(s){case 0:case 1:var o=0;for(t=0===s?"":t[0]+" ";o<r;++o)e[o]=a(t,e[o],i).trim();break;default:var l=o=0;for(e=[];o<r;++o)for(var c=0;c<s;++c)e[l++]=a(t[c]+" ",n[o],i).trim()}return e}function a(t,e,i){var a=e.charCodeAt(0);switch(33>a&&(a=(e=e.trim()).charCodeAt(0)),a){case 38:return e.replace(x,"$1"+t.trim());case 58:return t.trim()+e.replace(x,"$1"+t.trim());default:if(0<1*i&&0<e.indexOf("\f"))return e.replace(x,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+e}function n(t,e,i,a){var s=t+";",o=2*e+3*i+4*a;if(944===o){t=s.indexOf(":",9)+1;var l=s.substring(t,s.length-1).trim();return l=s.substring(0,t).trim()+l+";",1===M||2===M&&r(l,1)?"-webkit-"+l+l:l}if(0===M||2===M&&!r(s,1))return s;switch(o){case 1015:return 97===s.charCodeAt(10)?"-webkit-"+s+s:s;case 951:return 116===s.charCodeAt(3)?"-webkit-"+s+s:s;case 963:return 110===s.charCodeAt(5)?"-webkit-"+s+s:s;case 1009:if(100!==s.charCodeAt(4))break;case 969:case 942:return"-webkit-"+s+s;case 978:return"-webkit-"+s+"-moz-"+s+s;case 1019:case 983:return"-webkit-"+s+"-moz-"+s+"-ms-"+s+s;case 883:if(45===s.charCodeAt(8))return"-webkit-"+s+s;if(0<s.indexOf("image-set(",11))return s.replace(P,"$1-webkit-$2")+s;break;case 932:if(45===s.charCodeAt(4))switch(s.charCodeAt(5)){case 103:return"-webkit-box-"+s.replace("-grow","")+"-webkit-"+s+"-ms-"+s.replace("grow","positive")+s;case 115:return"-webkit-"+s+"-ms-"+s.replace("shrink","negative")+s;case 98:return"-webkit-"+s+"-ms-"+s.replace("basis","preferred-size")+s}return"-webkit-"+s+"-ms-"+s+s;case 964:return"-webkit-"+s+"-ms-flex-"+s+s;case 1023:if(99!==s.charCodeAt(8))break;return"-webkit-box-pack"+(l=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+l+s;case 1005:return p.test(s)?s.replace(u,":-webkit-")+s.replace(u,":-moz-")+s:s;case 1e3:switch(e=(l=s.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(e)){case 226:l=s.replace(y,"tb");break;case 232:l=s.replace(y,"tb-rl");break;case 220:l=s.replace(y,"lr");break;default:return s}return"-webkit-"+s+"-ms-"+l+s;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(e=(s=t).length-10,o=(l=(33===s.charCodeAt(e)?s.substring(0,e):s).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:s=s.replace(l,"-webkit-"+l)+";"+s;break;case 207:case 102:s=s.replace(l,"-webkit-"+(102<o?"inline-":"")+"box")+";"+s.replace(l,"-webkit-"+l)+";"+s.replace(l,"-ms-"+l+"box")+";"+s}return s+";";case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:return l=s.replace("-items",""),"-webkit-"+s+"-webkit-box-"+l+"-ms-flex-"+l+s;case 115:return"-webkit-"+s+"-ms-flex-item-"+s.replace(S,"")+s;default:return"-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","").replace(S,"")+s}break;case 973:case 989:if(45!==s.charCodeAt(3)||122===s.charCodeAt(4))break;case 931:case 953:if(!0===C.test(t))return 115===(l=t.substring(t.indexOf(":")+1)).charCodeAt(0)?n(t.replace("stretch","fill-available"),e,i,a).replace(":fill-available",":stretch"):s.replace(l,"-webkit-"+l)+s.replace(l,"-moz-"+l.replace("fill-",""))+s;break;case 962:if(s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===i+a&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10))return s.substring(0,s.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+s}return s}function r(t,e){var i=t.indexOf(1===e?":":"{"),a=t.substring(0,3!==e?i:10);return i=t.substring(i+1,t.length-1),R(2!==e?a:a.replace(A,"$1"),i,e)}function s(t,e){var i=n(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return i!==e+";"?i.replace(k," or ($1)").substring(4):"("+e+")"}function o(t,e,i,a,n,r,s,o,l,h){for(var d,u=0,p=e;u<O;++u)switch(d=I[u].call(c,t,p,i,a,n,r,s,o,l,h)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==e)return p}function l(t){return void 0!==(t=t.prefix)&&(R=null,t?"function"!=typeof t?M=1:(M=2,R=t):M=0),l}function c(t,i){var a=t;if(33>a.charCodeAt(0)&&(a=a.trim()),a=[a],0<O){var n=o(-1,i,a,a,T,L,0,0,0,0);void 0!==n&&"string"==typeof n&&(i=n)}var r=e(E,a,i,0,0);return 0<O&&void 0!==(n=o(-2,r,a,a,T,L,r.length,0,0,0))&&(r=n),D=0,L=T=1,r}var h=/^\0+/g,d=/[\0\r\f]/g,u=/: */g,p=/zoo|gra/,f=/([,: ])(transform)/g,g=/,\r+?/g,x=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,v=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,k=/([\s\S]*?);/g,S=/-self|flex-/g,A=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,P=/([^-])(image-set\()/,L=1,T=1,D=0,M=1,E=[],I=[],O=0,R=null,N=0;return c.use=function t(e){switch(e){case void 0:case null:O=I.length=0;break;default:if("function"==typeof e)I[O++]=e;else if("object"==typeof e)for(var i=0,a=e.length;i<a;++i)t(e[i]);else N=0|!!e}return t},c.set=l,void 0!==t&&l(t),c},Zi="/*|*/",Ui=Zi+"}";function qi(t){t&&Ji.current.insert(t+"}")}var Ji={current:null},Qi=function(t,e,i,a,n,r,s,o,l,c){switch(t){case 1:switch(e.charCodeAt(0)){case 64:return Ji.current.insert(e+";"),"";case 108:if(98===e.charCodeAt(2))return""}break;case 2:if(0===o)return e+Zi;break;case 3:switch(o){case 102:case 112:return Ji.current.insert(i[0]+e),"";default:return e+(0===c?Zi:"")}case-2:e.split(Ui).forEach(qi)}};function Ki(t,e,i){var a="";return i.split(" ").forEach((function(i){void 0!==t[i]?e.push(t[i]):a+=i+" "})),a}var ta,ea=function(t,e,i){var a=t.key+"-"+e.name;if(!1===i&&void 0===t.registered[a]&&(t.registered[a]=e.styles),void 0===t.inserted[e.name]){var n=e;do{t.insert("."+a,n,t.sheet,!0),n=n.next}while(void 0!==n)}},ia=function(t){for(var e,i=0,a=0,n=t.length;n>=4;++a,n-=4)e=1540483477*(65535&(e=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+(59797*(e>>>16)<<16),i=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)},aa={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},na=/[A-Z]|^ms/g,ra=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sa=function(t){return 45===t.charCodeAt(1)},oa=function(t){return null!=t&&"boolean"!=typeof t},la=(ta={},function(t){return void 0===ta[t]&&(ta[t]=sa(e=t)?e:e.replace(na,"-$&").toLowerCase()),ta[t];var e}),ca=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(ra,(function(t,e,i){return da={name:e,styles:i,next:da},e}))}return 1===aa[t]||sa(t)||"number"!=typeof e||0===e?e:e+"px"};function ha(t,e,i,a){if(null==i)return"";if(void 0!==i.__emotion_styles)return i;switch(typeof i){case"boolean":return"";case"object":if(1===i.anim)return da={name:i.name,styles:i.styles,next:da},i.name;if(void 0!==i.styles){var n=i.next;if(void 0!==n)for(;void 0!==n;)da={name:n.name,styles:n.styles,next:da},n=n.next;return i.styles+";"}return function(t,e,i){var a="";if(Array.isArray(i))for(var n=0;n<i.length;n++)a+=ha(t,e,i[n],!1);else for(var r in i){var s=i[r];if("object"!=typeof s)null!=e&&void 0!==e[s]?a+=r+"{"+e[s]+"}":oa(s)&&(a+=la(r)+":"+ca(r,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=e&&void 0!==e[s[0]]){var o=ha(t,e,s,!1);switch(r){case"animation":case"animationName":a+=la(r)+":"+o+";";break;default:a+=r+"{"+o+"}"}}else for(var l=0;l<s.length;l++)oa(s[l])&&(a+=la(r)+":"+ca(r,s[l])+";")}return a}(t,e,i);case"function":if(void 0!==t){var r=da,s=i(t);return da=r,ha(t,e,s,a)}}if(null==e)return i;var o=e[i];return void 0===o||a?i:o}var da,ua=/label:\s*([^\s;\n{]+)\s*;/g,pa=function(t,e,i){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var a=!0,n="";da=void 0;var r=t[0];null==r||void 0===r.raw?(a=!1,n+=ha(i,e,r,!1)):n+=r[0];for(var s=1;s<t.length;s++)n+=ha(i,e,t[s],46===n.charCodeAt(n.length-1)),a&&(n+=r[s]);ua.lastIndex=0;for(var o,l="";null!==(o=ua.exec(n));)l+="-"+o[1];return{name:ia(n)+l,styles:n,next:da}},fa=Object.prototype.hasOwnProperty,ga=(0,A.createContext)("undefined"!=typeof HTMLElement?function(t){void 0===t&&(t={});var e,i=t.key||"css";void 0!==t.prefix&&(e={prefix:t.prefix});var a,n=new Gi(e),r={};a=t.container||document.head;var s,o=document.querySelectorAll("style[data-emotion-"+i+"]");Array.prototype.forEach.call(o,(function(t){t.getAttribute("data-emotion-"+i).split(" ").forEach((function(t){r[t]=!0})),t.parentNode!==a&&a.appendChild(t)})),n.use(t.stylisPlugins)(Qi),s=function(t,e,i,a){var r=e.name;Ji.current=i,n(t,e.styles),a&&(l.inserted[r]=!0)};var l={key:i,sheet:new Vi({key:i,container:a,nonce:t.nonce,speedy:t.speedy}),nonce:t.nonce,inserted:r,registered:{},insert:s};return l}():null),xa=(0,A.createContext)({}),ma=(ga.Provider,function(t){var e=function(e,i){return(0,A.createElement)(ga.Consumer,null,(function(a){return t(e,a,i)}))};return(0,A.forwardRef)(e)}),ba="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",va=function(t,e){var i={};for(var a in e)fa.call(e,a)&&(i[a]=e[a]);return i[ba]=t,i},ya=function(){return null},wa=function(t,e,i,a){var n=null===i?e.css:e.css(i);"string"==typeof n&&void 0!==t.registered[n]&&(n=t.registered[n]);var r=e[ba],s=[n],o="";"string"==typeof e.className?o=Ki(t.registered,s,e.className):null!=e.className&&(o=e.className+" ");var l=pa(s);ea(t,l,"string"==typeof r),o+=t.key+"-"+l.name;var c={};for(var h in e)fa.call(e,h)&&"css"!==h&&h!==ba&&(c[h]=e[h]);c.ref=a,c.className=o;var d=(0,A.createElement)(r,c),u=(0,A.createElement)(ya,null);return(0,A.createElement)(A.Fragment,null,u,d)},ka=ma((function(t,e,i){return"function"==typeof t.css?(0,A.createElement)(xa.Consumer,null,(function(a){return wa(e,t,a,i)})):wa(e,t,null,i)})),Sa=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return pa(e)},Aa=function(t,e){var i=arguments;if(null==e||!fa.call(e,"css"))return A.createElement.apply(void 0,i);var a=i.length,n=new Array(a);n[0]=ka,n[1]=va(t,e);for(var r=2;r<a;r++)n[r]=i[r];return A.createElement.apply(null,n)},Ca=(A.Component,function t(e){for(var i=e.length,a=0,n="";a<i;a++){var r=e[a];if(null!=r){var s=void 0;switch(typeof r){case"boolean":break;case"object":if(Array.isArray(r))s=t(r);else for(var o in s="",r)r[o]&&o&&(s&&(s+=" "),s+=o);break;default:s=r}s&&(n&&(n+=" "),n+=s)}}return n});function Pa(t,e,i){var a=[],n=Ki(t,a,i);return a.length<2?i:n+e(a)}var La,Ta=function(){return null},Da=(ma((function(t,e){return(0,A.createElement)(xa.Consumer,null,(function(i){var a=function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];var n=pa(i,e.registered);return ea(e,n,!1),e.key+"-"+n.name},n={css:a,cx:function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return Pa(e.registered,a,Ca(i))},theme:i},r=t.children(n),s=(0,A.createElement)(Ta,null);return(0,A.createElement)(A.Fragment,null,s,r)}))})),wp.i18n.__),Ma=wp.components,Ea=Ma.Flex,Ia=Ma.FlexBlock,Oa=Ma.FlexItem,Ra=wp.element,Na=Ra.useState,za=Ra.useEffect;function Fa(t){var e=t.startDate,a=t.endDate,n=t.setStartDate,r=t.setEndDate,s=Na(!1),o=(0,i.Z)(s,2),l=o[0],c=o[1];return za((function(){Wi()({path:"/wp/v2/settings"}).then((function(t){var e;!1===(null==t||null===(e=t.presto_player_analytics)||void 0===e?void 0:e.enable)&&c(!0)}))}),[]),Aa(React.Fragment,null,l?Aa(Ya,null):"",Aa(Ea,null,Aa(Ia,null,Aa("h1",null,Da("Analytics","presto-player"))),Aa(Oa,null,Aa($i,{startDate:e,setStartDate:n,endDate:a,setEndDate:r}))),Aa("div",{className:"presto-flow"},Aa("div",{className:"presto-dashboard"},Aa("div",{className:"presto-dashboard__row"},Aa("div",{className:"presto-dashboard__item is-large"},Aa(Ri,{startDate:e,endDate:a})),Aa("div",{className:"presto-dashboard__item"},Aa(ei,{startDate:e,endDate:a}))),Aa("div",{className:"presto-dashboard__row"},Aa("div",{className:"presto-dashboard__item is-large"},Aa(si,{startDate:e,endDate:a}))))))}var Ya=function(){return Aa(ji.Notice,{css:Sa(La||(La=le(["\n margin: 0 0 1em 0 !important;\n "]))),status:"warning",isDismissible:!1},Aa("p",null,Da("Analytics are currently disabled. To collect analytics, turn them on in your settings page.","presto-player")))},Xa=wp.components,_a=Xa.Card,Ha=Xa.CardBody,$a=function(t){var e=t.loading,i=t.title,a=t.value,n=t.label;return e?Ut(_a,null,Ut(Ha,null,Ut(Pe,null))):Ut(_a,{className:"presto-player__stat-card"},Ut(Ha,null,Ut("div",{className:"presto-subtitle"},i),Ut("h1",null,a),Ut("div",null,n)))};function Ba(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function Wa(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ba(Object(i),!0).forEach((function(e){(0,h.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ba(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ja,Va,Ga,Za=wp.apiFetch,Ua=wp.element.useState,qa=wp.compose.createHigherOrderComponent,Ja=function(){return qa((function(t){return function(e){var a=Ua(!1),n=(0,i.Z)(a,2),r=n[0],s=n[1],o=Ua([]),l=(0,i.Z)(o,2),c=l[0],h=l[1],d=Ua(""),u=(0,i.Z)(d,2),f=u[0],g=u[1],x=function(){var t=(0,ce.Z)(de().mark((function t(e){var i,a,n,r;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.endpoint,a=e.params,n=void 0===a?{}:a,s(!0),t.prev=2,t.next=5,Za({path:wp.url.addQueryArgs(i,Wa({},n))});case 5:r=t.sent,h(r),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),console.error(t.t0),null!==t.t0&&void 0!==t.t0&&t.t0.message&&g(t.t0.message);case 13:return t.prev=13,s(!1),t.finish(13);case 16:case"end":return t.stop()}}),t,null,[[2,9,13,16]])})));return function(_x){return t.apply(this,arguments)}}();return Ut(t,p({loading:r,setLoading:s,fetchData:x,stat:c,setStat:h,error:f,setError:g},e))}}),"withStat")},Qa=wp.i18n.__,Ka=wp.compose.compose,tn=wp.element.useEffect,en=Ka([Ja()])((function(t){var e=t.userId,i=t.startDate,a=t.endDate,n=t.stat,r=t.fetchData,s=t.loading;return tn((function(){r({endpoint:"/presto-player/v1/analytics/user/".concat(e,"/total-views"),params:{start:we(i),end:we(a)}})}),[i,a]),Ut($a,{loading:s,value:parseInt(null==n?void 0:n.view),title:Qa("Total Views","presto-player")})})),an=wp.i18n.__,nn=wp.compose.compose,rn=wp.element.useEffect,sn=nn([Ja()])((function(t){var e=t.userId,i=t.startDate,a=t.endDate,n=t.stat,r=t.fetchData,s=t.loading;return rn((function(){r({endpoint:"/presto-player/v1/analytics/user/".concat(e,"/average-watchtime"),params:{start:we(i),end:we(a)}})}),[i,a]),Ut($a,{loading:s,value:parseFloat(null==n?void 0:n.view).toFixed(2),title:an("Average Watch Time","presto-player"),label:an("seconds","presto-player")})})),on=wp.i18n.__,ln=wp.compose.compose,cn=wp.element.useEffect,hn=ln([Ja()])((function(t){var e=t.userId,i=t.startDate,a=t.endDate,n=t.stat,r=t.fetchData,s=t.loading;return cn((function(){r({endpoint:"/presto-player/v1/analytics/user/".concat(e,"/total-watchtime"),params:{start:we(i),end:we(a)}})}),[i,a]),Ut($a,{loading:s,value:parseFloat(null==n?void 0:n.view).toFixed(2),title:on("Total Watch Time","presto-player"),label:on("seconds","presto-player")})})),dn=wp.i18n.__,un=wp.components,pn=un.Flex,fn=un.FlexBlock,gn=un.FlexItem,xn=un.Spinner,mn=un.Button,bn=wp.element,vn=bn.useEffect,yn=bn.useState,wn=wp.apiFetch,kn=function(t){var e,a,n,r,s=t.route,o=t.startDate,l=t.endDate,c=t.setStartDate,h=t.setEndDate,d=yn(!0),u=(0,i.Z)(d,2),p=u[0],f=u[1],g=yn({}),x=(0,i.Z)(g,2),b=x[0],v=x[1],y=yn(""),w=(0,i.Z)(y,2),k=w[0],S=w[1],A=function(){var t=(0,ce.Z)(de().mark((function t(){var e,i;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f(!0),t.prev=1,t.next=4,wn({url:"/wp-json/wp/v2/users/".concat(null==s||null===(e=s.params)||void 0===e?void 0:e.id,"?context=edit")});case 4:i=t.sent,v(i),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),"rest_no_route"===t.t0.code&&S("User Not Found");case 11:return t.prev=11,f(!1),t.finish(11);case 14:case"end":return t.stop()}}),t,null,[[1,8,11,14]])})));return function(){return t.apply(this,arguments)}}();return vn((function(){A()}),[]),k?Aa("div",{className:"presto-flow"},Aa(pn,null,Aa(fn,null,Aa("h2",null,k)))):Aa("div",{className:"presto-flow"},Aa(pn,null,Aa(fn,null,Aa(mn,{isSecondary:!0,onClick:function(){var t=m.location.search;m.push("".concat(t,"#/"))}},"← ",dn("Back to Dashboard","presto-player")))),Aa(pn,{wrap:!0},Aa(fn,null,p?Aa(xn,null):Aa("div",{css:Sa(ja||(ja=le(["\n display: flex;\n align-items: center;\n\n .presto__edit-user-button {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease;\n }\n\n &:hover {\n .presto__edit-user-button {\n opacity: 1;\n visibility: visible;\n }\n }\n "])))},Aa("div",null,Aa("h1",{className:"presto-dashboard__title"},null==b?void 0:b.name),Aa("p",{css:Sa(Va||(Va=le(["\n margin-top: -10px;\n opacity: 0.65;\n "])))},null==b?void 0:b.email)),!!b.id&&Aa("div",{className:"presto__edit-user-button",css:Sa(Ga||(Ga=le(["\n margin: 0 20px;\n "])))},Aa(mn,{href:"/wp-admin/user-edit.php?user_id=".concat(null==b?void 0:b.id),isSecondary:!0,isSmall:!0},dn("View Profile","presto-player")," →")))),Aa(gn,null,Aa($i,{startDate:o,setStartDate:c,endDate:l,setEndDate:h}))),Aa("div",{className:"presto-dashboard presto-flow"},Aa("div",{className:"presto-dashboard__row"},Aa("div",{className:"presto-dashboard__item"},Aa(en,{userId:null==s||null===(e=s.params)||void 0===e?void 0:e.id,startDate:o,endDate:l})),Aa("div",{className:"presto-dashboard__item"},Aa(sn,{userId:null==s||null===(a=s.params)||void 0===a?void 0:a.id,startDate:o,endDate:l})),Aa("div",{className:"presto-dashboard__item"},Aa(hn,{userId:null==s||null===(n=s.params)||void 0===n?void 0:n.id,startDate:o,endDate:l}))),Aa("div",{className:"presto-dashboard__row"},Aa("div",{className:"presto-dashboard__item is-large"},Aa(si,{startDate:o,endDate:l,userId:null==s||null===(r=s.params)||void 0===r?void 0:r.id})))))},Sn=wp.i18n.__,An=wp.compose.compose,Cn=wp.element.useEffect,Pn=An([Ja()])((function(t){var e=t.video_id,i=t.startDate,a=t.endDate,n=t.stat,r=t.fetchData,s=t.loading;return Cn((function(){r({endpoint:"/presto-player/v1/analytics/video/".concat(e,"/average-watchtime"),params:{start:we(i),end:we(a)}})}),[i,a]),Ut($a,{loading:s,value:parseInt(n),title:Sn("Average Watch Time","presto-player"),label:Sn("seconds","presto-player")})})),Ln=wp.i18n,Tn=Ln.__,Dn=(Ln.sprintf,wp.components),Mn=Dn.Card,En=Dn.CardBody,In=wp.element,On=In.useState,Rn=In.useEffect,Nn=(In.useRef,function(t){var e=t.video_id,a=t.startDate,n=t.endDate,r=On(!0),s=(0,i.Z)(r,2),o=s[0],l=s[1],c=On([{name:"Views",data:[]}]),h=(0,i.Z)(c,2),d=h[0],u=h[1];Rn((function(){l(!0),li({path:wp.url.addQueryArgs("/presto-player/v1/analytics/video/".concat(e,"/timeline"),{start:we(a),end:we(n)})}).then((function(t){var e=[];t.length&&t.forEach((function(t){e.push({x:t.watch_time,y:t.total})})),u([{name:"Viewers",data:e}])})).catch((function(t){console.error(t)})).finally((function(){l(!1)}))}),[a,n]);var p={options:{chart:{toolbar:{show:!1}},tickAmount:1,yaxis:{labels:{formatter:function(t){return parseInt(t)}}},xaxis:{labels:{formatter:function(t){return e=t,e=1e3*parseInt(e||0),new Date(e).toISOString().substr(11,8);var e}}},colors:["#7c3aed"],dataLabels:{enabled:!1},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.7,opacityTo:.9,stops:[0,90,100]}}}};return Ut(Mn,null,o?Ut(En,null,Ut(Pe,null)):Ut(En,null,Ut("div",{className:"presto-card__title"},Tn("Audience Retention","presto-player")),Ut(ci.Z,{options:p.options,series:d,type:"area",height:280})))}),zn=wp.i18n.__,Fn=wp.compose.compose,Yn=wp.element.useEffect,Xn=Fn([Ja()])((function(t){var e=t.video_id,i=t.startDate,a=t.endDate,n=t.stat,r=t.fetchData,s=t.loading;return Yn((function(){r({endpoint:"/presto-player/v1/analytics/video/".concat(e,"/views"),params:{start:we(i),end:we(a)}})}),[i,a]),Ut($a,{loading:s,value:parseInt(n),title:zn("Unique Views","presto-player")})})),Hn=n(2982),$n=n(1002),Bn=function(t){return t.replace(/([A-Z])/g,(function(t){return"-".concat(t[0].toLowerCase())}))},Wn=function(t,e,i){var a=e.className||e.class,n=i.className||i.class,r=Gn(t),s=Gn(a?a.split(" "):[]),o=Gn(n?n.split(" "):[]),l=[];return r.forEach((function(t){s.has(t)?(l.push(t),s.delete(t)):o.has(t)||l.push(t)})),s.forEach((function(t){return l.push(t)})),l.join(" ")},jn=function(t){if("undefined"==typeof document)return!0;var e="on"+function(t){return"doubleclick"===t?"dblclick":t}(t),i=e in document;if(!i){var a=document.createElement("div");a.setAttribute(e,"return;"),i="function"==typeof a[e]}return i},Vn=function(t,e,i){var a=t.__events||(t.__events={}),n=a[e];n&&t.removeEventListener(e,n),t.addEventListener(e,a[e]=function(t){i&&i.call(this,t)})},Gn=function(t){var e=new Map;return t.forEach((function(t){return e.set(t,t)})),e},Zn=function(t,e){"function"==typeof t?t(e):null!=t&&(t.current=e)},Un=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){e.forEach((function(e){Zn(e,t)}))}};var qn=function(t,e,i,n){void 0!==n&&n();var s=t.toLowerCase().split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(""),h=function(e){(0,o.Z)(u,e);var n,h,d=(n=u,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=(0,c.Z)(n);if(h){var i=(0,c.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,l.Z)(this,t)});function u(t){var e;return(0,a.Z)(this,u),(e=d.call(this,t)).setComponentElRef=function(t){e.componentEl=t},e}return(0,r.Z)(u,[{key:"componentDidMount",value:function(){this.componentDidUpdate(this.props)}},{key:"componentDidUpdate",value:function(t){!function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t instanceof Element){var a=Wn(t.classList,e,i);""!==a&&(t.className=a),Object.keys(e).forEach((function(i){if("children"!==i&&"style"!==i&&"ref"!==i&&"class"!==i&&"className"!==i&&"forwardedRef"!==i)if(0===i.indexOf("on")&&i[2]===i[2].toUpperCase()){var a=i.substring(2),n=a[0].toLowerCase()+a.substring(1);jn(n)||Vn(t,n,e[i])}else t[i]=e[i],"string"===(0,$n.Z)(e[i])&&t.setAttribute(Bn(i),e[i])}))}}(this.componentEl,this.props,t)}},{key:"render",value:function(){var e=this.props,a=e.children,n=e.forwardedRef,r=e.style,s=(e.className,e.ref,function(t,e){var i={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(i[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(t);n<a.length;n++)e.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(t,a[n])&&(i[a[n]]=t[a[n]])}return i}(e,["children","forwardedRef","style","className","ref"])),o=Object.keys(s).reduce((function(t,e){var i=s[e];if(0===e.indexOf("on")&&e[2]===e[2].toUpperCase()){var a=e.substring(2).toLowerCase();"undefined"!=typeof document&&jn(a)&&(t[e]=i)}else{var n=(0,$n.Z)(i);"string"!==n&&"boolean"!==n&&"number"!==n||(t[Bn(e)]=i)}return t}),{});i&&(o=i(this.props,o));var l=Object.assign(Object.assign({},o),{ref:Un(n,this.setComponentElRef),style:r});return(0,A.createElement)(t,l,a)}}],[{key:"displayName",get:function(){return s}}]),u}(C().Component);return e&&(h.contextType=e),function(t,e){var i=function(e,i){return C().createElement(t,Object.assign({},e,{forwardedRef:i}))};return i.displayName=e,C().forwardRef(i)}(h,s)},Jn=n(1368),Qn=function(){var t=(0,ce.Z)(de().mark((function t(e,i){return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!=typeof window){t.next=2;break}return t.abrupt("return",void 0);case 2:return void(t.next=4);case 4:return t.abrupt("return",(0,Jn.b)([["presto-playlist",[[1,"presto-playlist",{items:[16],heading:[1],listTextSingular:[1,"list-text-singular"],listTextPlural:[1,"list-text-plural"],transitionDuration:[2,"transition-duration"],currentPlaylistItem:[32],currentPlyr:[32],playing:[32]},[[0,"rewatch","rewatch"],[0,"next","next"]],{currentPlyr:["handleCurrentPlay"]}]]],["presto-player-skeleton",[[1,"presto-player-skeleton",{effect:[1]}]]],["presto-timestamp",[[4,"presto-timestamp",{time:[1]}]]],["presto-video-curtain-ui",[[1,"presto-video-curtain-ui",{actionUrl:[1,"action-url"]}]]],["presto-search-bar-ui",[[1,"presto-search-bar-ui",{value:[1025],placeholder:[1],hasNavigation:[4,"has-navigation"],focused:[32],placeholderWidth:[32]},null,{placeholder:["handlePlaceholderSize"],value:["handleValueChange"],focused:["watchPropHandler"]}]]],["presto-player-button",[[1,"presto-player-button",{type:[513],size:[513],full:[516],disabled:[516],submit:[516],name:[1],value:[1],href:[1],target:[513],download:[1],hasFocus:[32],hasLabel:[32],hasPrefix:[32],hasSuffix:[32]}]]],["presto-cta-overlay-ui",[[1,"presto-cta-overlay-ui",{headline:[1],defaultHeadline:[1,"default-headline"],bottomText:[1,"bottom-text"],showButton:[4,"show-button"],buttonText:[1,"button-text"],buttonType:[1,"button-type"],buttonLink:[16],allowRewatch:[4,"allow-rewatch"],allowSkip:[4,"allow-skip"],direction:[1],i18n:[16],provider:[1],type:[1],isAudioProvider:[32]}]]],["presto-video",[[0,"presto-video",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],tracks:[16],playsinline:[4],provider:[1],videoAttributes:[16]}]]],["presto-action-bar-ui_2",[[1,"presto-action-bar-ui",{open:[4]}],[0,"presto-youtube-subscribe-button",{channel:[1],layout:[1],showCount:[4,"show-count"]}]]],["presto-email-overlay-ui_2",[[1,"presto-email-overlay-ui",{headline:[1],bottomText:[1,"bottom-text"],buttonText:[1,"button-text"],allowSkip:[4,"allow-skip"],borderRadius:[2,"border-radius"],isLoading:[4,"is-loading"],errorMessage:[1,"error-message"],direction:[1],i18n:[16],provider:[1],type:[1],email:[32],isAudioProvider:[32]}],[1,"presto-player-spinner"]]],["presto-action-bar_17",[[1,"presto-action-bar",{player:[8],config:[16],direction:[1],youtube:[16],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-cta-overlay",{player:[8],direction:[1],preset:[16],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-email-overlay",{player:[8],direction:[1],preset:[16],videoId:[2,"video-id"],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-bunny",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1025],player:[8],tracks:[16],playsinline:[4],provider:[1],thumbnail:[1],previewUrl:[1,"preview-url"],videoAttributes:[16]}],[1,"presto-dynamic-overlays",{overlays:[16],player:[8],preset:[16],enabled:[4],currentTime:[32],destroy:[32]}],[0,"presto-search-bar",{value:[1],player:[8],markers:[32],currentMarkerLocation:[32]}],[0,"presto-youtube",{src:[1],poster:[1025],lazyLoad:[1028,"lazy-load"],player:[8],getRef:[1040],reloadPlayer:[32],isWebView:[32]},null,{player:["handlePlayerChange"]}],[0,"presto-audio",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],preset:[16],tracks:[16],provider:[1],mediaTitle:[1,"media-title"],audioAttributes:[16],width:[32]}],[4,"presto-business-skin"],[4,"presto-modern-skin"],[0,"presto-muted-overlay",{mutedPreview:[4,"muted-preview"],mutedOverlay:[16],preset:[16]}],[4,"presto-stacked-skin"],[0,"presto-vimeo",{src:[1],poster:[1],player:[8],getRef:[1040]}],[1,"presto-action-bar-controller",{ended:[4],config:[16],currentTime:[514,"current-time"],duration:[514],direction:[1],youtube:[16],show:[32],youtubeRenderKey:[32],percentagePassed:[32]},null,{duration:["handleDuration","handlePercentagePassed"],ended:["handleEnded"],currentTime:["handlePercentagePassed","handleTime"],config:["handleButtonCountChange"],show:["handleCtaStateChange"]}],[0,"presto-cta-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],cta:[16],i18n:[16],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],skipped:[32],percentagePassed:[32]},null,{ended:["handleEnded"],duration:["handleDuration","handlePercentagePassed"],currentTime:["handlePercentagePassed","handleEnabled","handleTime"],show:["handleCtaStateChange"]}],[0,"presto-email-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],emailCollection:[16],i18n:[16],videoId:[2,"video-id"],presetId:[2,"preset-id"],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],percentagePassed:[32]},null,{duration:["handleDuration"],currentTime:["handleTimeCheck","handleShowChange"],show:["handleEmailStateChange"]}],[1,"presto-dynamic-overlay-ui",{href:[1],target:[1],position:[1]}]]],["presto-player_4",[[1,"presto-player",{video_id:[2],iconUrl:[1,"icon-url"],src:[1],bunny:[16],branding:[16],config:[16],preset:[16],chapters:[16],overlays:[16],blockAttributes:[16],tracks:[16],analytics:[4],automations:[4],provider:[513],provider_video_id:[1],actionBar:[16],youtube:[16],type:[1],autoplay:[1540],preload:[1],poster:[1],playsinline:[4],isAdmin:[4,"is-admin"],direction:[1],css:[1],currentTime:[2,"current-time"],mediaTitle:[1,"media-title"],classes:[1],videoAttributes:[16],audioAttributes:[16],search:[16],markers:[8],player:[32],playerEl:[32],shouldLazyLoad:[32],mutedPreview:[32],duration:[32],isSticky:[32],videoHeight:[32],playClass:[32],previouslyPlaying:[32],ctaActive:[32],emailActive:[32],actionBarActive:[32],ready:[32],play:[64],goToAndPlay:[64],restart:[64],pause:[64],stop:[64],fullscreenToggle:[64],on:[64],once:[64],off:[64]},[[8,"currentMediaPlayer","handleScroll"],[0,"restartVideo","handleRestartVideo"],[0,"playVideo","handlePlayVideo"],[0,"pauseVideo","handlePauseVideo"],[8,"visibilitychange","playVideoOnlyInViewport"],[0,"ctaStateChange","handleCtaStateChange"],[0,"emailStateChange","handleEmailStateChange"],[0,"actionBarStateChange","handleActionBarStateChange"]],{currentTime:["handleCurrentTimeChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],player:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"],overlays:["renderDynamicOverlays"],preset:["renderDynamicOverlays"]}],[1,"presto-playlist-item",{active:[4],playing:[4]}],[1,"presto-playlist-overlay",{nextItemTitle:[1,"next-item-title"],nextItemString:[1,"next-item-string"],transitionDuration:[2,"transition-duration"],isLastItem:[4,"is-last-item"],show:[4],animating:[32]},null,{show:["handleShow"],animating:["handleAnimatingChange"]}],[1,"presto-playlist-ui"]]]],i));case 5:case"end":return t.stop()}}),t)})));return function(_x,e){return t.apply(this,arguments)}}();!function(){if("undefined"!=typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var t=HTMLElement;window.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}(),Qn();var Kn=qn("presto-player"),tr=qn("presto-search-bar-ui"),er=wp.element;function ir(t){if(t){if(t.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return"youtube";if(t.match(/(https?:\/\/)?(www\.)?(player\.)?vimeo\.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/))return"vimeo";if(t.indexOf("https://vz-")>-1&&t.indexOf("b-cdn.net")>-1)return"bunny";if(t.indexOf(".mp3")>-1)return"audio"}return"self-hosted"}er.useRef,er.useEffect;var ar=window.wp.data,nr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=t.replace("#","");3===i.length&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);var a=parseInt(i.substring(0,2),16),n=parseInt(i.substring(2,4),16),r=parseInt(i.substring(4,6),16);return e>1&&e<=100&&(e/=100),"rgba("+a+","+n+","+r+","+e+")"};function rr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function sr(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?rr(Object(i),!0).forEach((function(e){(0,h.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):rr(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var or=function(t){var i,a,n,r,s,o=t.src,l=t.classes,c=t.preset,h=t.branding,d=t.attributes,u=t.adminPreview,p=t.currentTime,f=t.preload,g=void 0===f?"metadata":f,x=t.overlays,m=t.type,b=(0,e.useRef)(),v=d.previewThumbnail,y=d.preview,w=d.chapters,k=d.poster,S=d.mutedOverlay,A=d.mutedPreview,C=d.title,P=(0,ar.useSelect)((function(t){var e,i;return{youtube:null===(e=t("presto-player/player"))||void 0===e?void 0:e.youtube(),playerCSS:null===(i=t("presto-player/player"))||void 0===i?void 0:i.playerCSS()}})),L=P.youtube,T=P.playerCSS;return(0,e.useEffect)((function(){b.current.src=o,b.current["data-css"]=T,b.current.classes=l,b.current.currentTime=p,b.current.overlays=x,b.current.isAdmin=!0,b.current.preload=g,b.current.preset=c,b.current.bunny={thumbnail:v,preview:y},b.current.youtube={channelId:null==L?void 0:L.channel_id},b.current.tracks=(0,Hn.Z)(null!=c&&c.captions?[{kind:"captions",label:"English",srclang:"en",src:"/path/to/captions.en.vtt",default:!0}]:[]),b.current.branding=h,b.current.chapters=w,b.current.blockAttributes=d,b.current.poster=k,b.current.provider="audio"===m?"audio":ir(o),b.current.mediaTitle=C}),[o,l,c,h,d,u,p,g,x,m]),Ut("div",{className:"wp-block-video presto-block-video",style:"audio"===m?sr(sr(sr({"--presto-player-border-radius":"".concat(null==c?void 0:c.border_radius,"px")},null!=c&&c.background_color?{"--plyr-audio-controls-background":c.background_color}:{"--plyr-audio-controls-background":null==h?void 0:h.color}),null!=c&&c.control_color?{"--plyr-audio-control-color":c.control_color,"--plyr-range-thumb-background":c.control_color,"--plyr-range-fill-background":c.control_color,"--plyr-audio-progress-buffered-background":nr(c.control_color||(null==h?void 0:h.color)||"#00b3ff",.5)}:{"--plyr-audio-control-color":"#ffffff","--plyr-range-thumb-background":"#ffffff","--plyr-range-fill-background":"#ffffff"}),{},{"--plyr-range-thumb-shadow":"0px"}):sr(sr(sr({"--presto-player-border-radius":"".concat(null==c?void 0:c.border_radius,"px")},null!=c&&c.caption_background?{"--plyr-captions-background":c.caption_background}:{}),null!=h&&h.color?{"--plyr-color-main":"var(--presto-player-highlight-color, ".concat(h.color,")")}:{}),{},{"--presto-player-email-border-radius":"".concat((null==c||null===(i=c.email_collection)||void 0===i?void 0:i.border_radius)||0,"px"),"--presto-player-logo-width":"".concat((null==h?void 0:h.logo_width)||75,"px")})},Ut(Kn,{ref:b},Ut("div",{slot:"player-end"},!(null===(a=c.search)||void 0===a||!a.enabled)&&Ut(tr,{style:{position:"absolute",top:"15px",right:"23px",zIndex:1},placeholder:null===(n=c.search)||void 0===n?void 0:n.placeholder}),(null==A?void 0:A.enabled)&&(null==S?void 0:S.enabled)&&Ut("div",{className:"presto-player__overlay is-image",style:{position:"absolute",width:"".concat((null==S?void 0:S.width)||100,"%"),left:"".concat(100*((null==S||null===(r=S.focalPoint)||void 0===r?void 0:r.x)||.5),"%"),top:"".concat(100*((null==S||null===(s=S.focalPoint)||void 0===s?void 0:s.y)||.5),"%")}},Ut("img",{src:null==S?void 0:S.src,style:{transform:"translateX(-50%) translateY(-50%)"}})),u)))};function lr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function cr(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?lr(Object(i),!0).forEach((function(e){(0,h.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):lr(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var hr=wp.i18n.__,dr=wp.components,ur=dr.Flex,pr=dr.FlexBlock,fr=dr.FlexItem,gr=dr.Spinner,xr=dr.Button,mr=dr.TextControl,br=wp.element,vr=br.useEffect,yr=br.useState,wr=wp.apiFetch,kr=function(t){var e,a,n,r=t.route,s=t.startDate,o=t.endDate,l=t.setStartDate,c=t.setEndDate,h=yr(!0),d=(0,i.Z)(h,2),u=d[0],p=d[1],f=yr({}),g=(0,i.Z)(f,2),x=g[0],b=g[1],v=yr(""),y=(0,i.Z)(v,2),w=y[0],k=y[1],S=yr(null),A=(0,i.Z)(S,2),C=A[0],P=A[1],L=yr(!1),T=(0,i.Z)(L,2),D=T[0],M=T[1],E=function(){var t=(0,ce.Z)(de().mark((function t(){var e,i,a,n;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p(!0),t.prev=1,t.next=4,wr({url:"".concat(null===(e=prestoPlayer)||void 0===e?void 0:e.root).concat(null===(i=prestoPlayer)||void 0===i?void 0:i.prestoVersionString,"videos/").concat(null==r||null===(a=r.params)||void 0===a?void 0:a.id)});case 4:n=t.sent,b(n),P(null==n?void 0:n.title),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),"rest_no_route"===t.t0.code&&k("Video Not Found");case 12:return t.prev=12,p(!1),t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[1,9,12,15]])})));return function(){return t.apply(this,arguments)}}(),I=function(){var t=(0,ce.Z)(de().mark((function t(){var e,i;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("New Video title ".concat(C)),p(!0),t.prev=2,e=cr(cr({},x),{title:C}),t.next=6,wp.apiFetch({method:"POST",url:wp.url.addQueryArgs("".concat(prestoPlayer.root).concat(prestoPlayer.prestoVersionString,"videos/").concat(x.id),{_method:"PUT"}),data:e});case 6:if(i=t.sent){t.next=9;break}throw genericError;case 9:M(!1),b(i),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(2),k(null!==t.t0&&void 0!==t.t0&&t.t0.message?t.t0.message:genericError);case 16:return t.prev=16,p(!1),t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[2,13,16,19]])})));return function(){return t.apply(this,arguments)}}();return vr((function(){E()}),[]),w?Ut("div",{className:"presto-flow"},Ut(ur,null,Ut(pr,null,Ut("h2",null,w)))):Ut("div",{className:"presto-flow"},Ut(ur,null,Ut(pr,null,Ut(xr,{isSecondary:!0,onClick:function(){var t=m.location.search;m.push("".concat(t,"#/"))}},"← ",hr("Back to Dashboard","presto-player")))),Ut(ur,{wrap:!0},Ut(pr,null,u?Ut(gr,null):D?Ut("div",{className:"presto-inline-edit presto-inline-edit--editing"},Ut(mr,{className:"presto-inline-edit__input",type:"text",value:C,onChange:function(t){return P(t)}}),Ut(xr,{className:"presto-inline-edit__button",isPrimary:!0,onClick:I}," ","Save"," "),Ut(xr,{className:"presto-inline-edit__button",isSecondary:!0,onClick:function(){P(null==x?void 0:x.title),M(!1)}}," ","Cancel"," ")):Ut("div",{className:"presto-inline-edit"},Ut("h1",{className:"presto-dashboard__title presto-inline-edit__text"},null==x?void 0:x.title),Ut("button",{className:"presto-inline-edit__edit",onClick:function(){return M(!0)}},Ut("span",{className:"dashicon dashicons dashicons-edit"})))),Ut(fr,null,Ut($i,{startDate:s,setStartDate:l,endDate:o,setEndDate:c}))),Ut("div",{className:"presto-dashboard presto-flow"},Ut("div",{className:"presto-dashboard__row"},Ut("div",{className:"presto-dashboard__item is-large"},Ut(Xn,{video_id:null==r||null===(e=r.params)||void 0===e?void 0:e.id,startDate:s,endDate:o})),Ut("div",{className:"presto-dashboard__item"},!!Object.keys(x||{}).length&&Ut(or,{src:null==x?void 0:x.src,attributes:{title:x.title},type:ir(x.src),preset:{"play-large":!0,play:!0,progress:!0,rewind:!0,"fast-forward":!0,"current-time":!0,background_color:"#8421cb",volume:!0,mute:!0,i18n:window.prestoPlayer.i18n}})),Ut("div",{className:"presto-dashboard__item"},Ut(Pn,{video_id:null==r||null===(a=r.params)||void 0===a?void 0:a.id,startDate:s,endDate:o}))),Ut("div",{className:"presto-dashboard__row"},Ut("div",{className:"presto-dashboard__item is-large"},Ut(Nn,{video_id:null==r||null===(n=r.params)||void 0===n?void 0:n.id,startDate:s,endDate:o})))))},Sr={dashboard:{path:"/"},video:{path:"/video/:id"},user:{path:"/user/:id"}},Ar=wp.element.useState;(0,wp.element.render)(Ut((function(){var t,e=function(){window.scrollTo(0,0)},a=Ar(new Date(Date.now()-6048e5)),n=(0,i.Z)(a,2),r=n[0],s=n[1],o=Ar(new Date),l=(0,i.Z)(o,2),c=l[0],h=l[1];return null!==(t=prestoPlayer)&&void 0!==t&&t.isPremium?Ut("div",{className:"presto-dashboard__content"},Ut(ee,{routes:Sr},Ut(Qt,{path:Sr.dashboard.path,onRoute:e},Ut(Fa,{startDate:r,endDate:c,setStartDate:s,setEndDate:h})),Ut(Qt,{path:Sr.video.path,onRoute:e},Ut(kr,{startDate:r,endDate:c,setStartDate:s,setEndDate:h})),Ut(Qt,{path:Sr.user.path,onRoute:e},Ut(kn,{startDate:r,endDate:c,setStartDate:s,setEndDate:h})))):Ut("div",{className:"presto-dashboard__content"},Ut(oe,null))}),null),document.getElementById("presto-analytics-page"))}()}();