/*
 Highstock JS v6.2.0 (2018-10-17)

 (c) 2009-2016 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(Q,K){"object"===typeof module&&module.exports?module.exports=Q.document?K(Q):K:"function"===typeof define&&define.amd?define(function(){return K(Q)}):Q.Highcharts=K(Q)})("undefined"!==typeof window?window:this,function(Q){var K=function(){var a="undefined"===typeof Q?window:Q,C=a.document,D=a.navigator&&a.navigator.userAgent||"",F=C&&C.createElementNS&&!!C.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,u=/(edge|msie|trident)/i.test(D)&&!a.opera,m=-1!==D.indexOf("Firefox"),
e=-1!==D.indexOf("Chrome"),x=m&&4>parseInt(D.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock",version:"6.2.0",deg2rad:2*Math.PI/360,doc:C,hasBidiBug:x,hasTouch:C&&void 0!==C.documentElement.ontouchstart,isMS:u,isWebKit:-1!==D.indexOf("AppleWebKit"),isFirefox:m,isChrome:e,isSafari:!e&&-1!==D.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(D),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:F,win:a,marginNames:["plotTop",
"marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){a.timers=[];var C=a.charts,D=a.doc,F=a.win;a.error=function(u,m){u=a.isNumber(u)?"Highcharts error #"+u+": www.highcharts.com/errors/"+u:u;if(m)throw Error(u);F.console&&console.log(u)};a.Fx=function(a,m,e){this.options=m;this.elem=a;this.prop=e};a.Fx.prototype={dSetter:function(){var a=this.paths[0],m=this.paths[1],e=[],x=this.now,y=a.length,v;if(1===x)e=this.toD;else if(y===m.length&&1>x)for(;y--;)v=parseFloat(a[y]),
e[y]=isNaN(v)?m[y]:x*parseFloat(m[y]-v)+v;else e=m;this.elem.attr("d",e,null,!0)},update:function(){var a=this.elem,m=this.prop,e=this.now,x=this.options.step;if(this[m+"Setter"])this[m+"Setter"]();else a.attr?a.element&&a.attr(m,e,null,!0):a.style[m]=e+this.unit;x&&x.call(a,e,this)},run:function(u,m,e){var x=this,y=x.options,v=function(a){return v.stopped?!1:x.step(a)},w=F.requestAnimationFrame||function(a){setTimeout(a,13)},r=function(){for(var c=0;c<a.timers.length;c++)a.timers[c]()||a.timers.splice(c--,
1);a.timers.length&&w(r)};u!==m||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=u,this.end=m,this.unit=e,this.now=this.start,this.pos=0,v.elem=this.elem,v.prop=this.prop,v()&&1===a.timers.push(v)&&w(r)):(delete y.curAnim[this.prop],y.complete&&0===a.keys(y.curAnim).length&&y.complete.call(this.elem))},step:function(u){var m=+new Date,e,x=this.options,y=this.elem,v=x.complete,w=x.duration,r=x.curAnim;y.attr&&!y.element?u=!1:u||m>=w+this.startTime?(this.now=this.end,this.pos=
1,this.update(),e=r[this.prop]=!0,a.objectEach(r,function(a){!0!==a&&(e=!1)}),e&&v&&v.call(y),u=!1):(this.pos=x.easing((m-this.startTime)/w),this.now=this.start+(this.end-this.start)*this.pos,this.update(),u=!0);return u},initPath:function(u,m,e){function x(b){var a,d;for(n=b.length;n--;)a="M"===b[n]||"L"===b[n],d=/[a-zA-Z]/.test(b[n+3]),a&&d&&b.splice(n+1,0,b[n+1],b[n+2],b[n+1],b[n+2])}function y(b,a){for(;b.length<q;){b[0]=a[q-b.length];var g=b.slice(0,h);[].splice.apply(b,[0,0].concat(g));d&&(g=
b.slice(b.length-h),[].splice.apply(b,[b.length,0].concat(g)),n--)}b[0]="M"}function v(a,g){for(var c=(q-a.length)/h;0<c&&c--;)b=a.slice().splice(a.length/E-h,h*E),b[0]=g[q-h-c*h],k&&(b[h-6]=b[h-2],b[h-5]=b[h-1]),[].splice.apply(a,[a.length/E,0].concat(b)),d&&c--}m=m||"";var w,r=u.startX,c=u.endX,k=-1<m.indexOf("C"),h=k?7:3,q,b,n;m=m.split(" ");e=e.slice();var d=u.isArea,E=d?2:1,g;k&&(x(m),x(e));if(r&&c){for(n=0;n<r.length;n++)if(r[n]===c[0]){w=n;break}else if(r[0]===c[c.length-r.length+n]){w=n;g=
!0;break}void 0===w&&(m=[])}m.length&&a.isNumber(w)&&(q=e.length+w*E*h,g?(y(m,e),v(e,m)):(y(e,m),v(m,e)));return[m,e]},fillSetter:function(){a.Fx.prototype.strokeSetter.apply(this,arguments)},strokeSetter:function(){this.elem.attr(this.prop,a.color(this.start).tweenTo(a.color(this.end),this.pos),null,!0)}};a.merge=function(){var u,m=arguments,e,x={},y=function(e,w){"object"!==typeof e&&(e={});a.objectEach(w,function(r,c){!a.isObject(r,!0)||a.isClass(r)||a.isDOMElement(r)?e[c]=w[c]:e[c]=y(e[c]||{},
r)});return e};!0===m[0]&&(x=m[1],m=Array.prototype.slice.call(m,2));e=m.length;for(u=0;u<e;u++)x=y(x,m[u]);return x};a.pInt=function(a,m){return parseInt(a,m||10)};a.isString=function(a){return"string"===typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a};a.isObject=function(u,m){return!!u&&"object"===typeof u&&(!m||!a.isArray(u))};a.isDOMElement=function(u){return a.isObject(u)&&"number"===typeof u.nodeType};a.isClass=function(u){var m=
u&&u.constructor;return!(!a.isObject(u,!0)||a.isDOMElement(u)||!m||!m.name||"Object"===m.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a};a.erase=function(a,m){for(var e=a.length;e--;)if(a[e]===m){a.splice(e,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(u,m,e){var x;a.isString(m)?a.defined(e)?u.setAttribute(m,e):u&&u.getAttribute&&((x=u.getAttribute(m))||"class"!==m||(x=u.getAttribute(m+"Name"))):a.defined(m)&&a.isObject(m)&&
a.objectEach(m,function(a,e){u.setAttribute(e,a)});return x};a.splat=function(u){return a.isArray(u)?u:[u]};a.syncTimeout=function(a,m,e){if(m)return setTimeout(a,m,e);a.call(0,e)};a.clearTimeout=function(u){a.defined(u)&&clearTimeout(u)};a.extend=function(a,m){var e;a||(a={});for(e in m)a[e]=m[e];return a};a.pick=function(){var a=arguments,m,e,x=a.length;for(m=0;m<x;m++)if(e=a[m],void 0!==e&&null!==e)return e};a.css=function(u,m){a.isMS&&!a.svg&&m&&void 0!==m.opacity&&(m.filter="alpha(opacity\x3d"+
100*m.opacity+")");a.extend(u.style,m)};a.createElement=function(u,m,e,x,y){u=D.createElement(u);var v=a.css;m&&a.extend(u,m);y&&v(u,{padding:0,border:"none",margin:0});e&&v(u,e);x&&x.appendChild(u);return u};a.extendClass=function(u,m){var e=function(){};e.prototype=new u;a.extend(e.prototype,m);return e};a.pad=function(a,m,e){return Array((m||2)+1-String(a).replace("-","").length).join(e||0)+a};a.relativeLength=function(a,m,e){return/%$/.test(a)?m*parseFloat(a)/100+(e||0):parseFloat(a)};a.wrap=
function(a,m,e){var x=a[m];a[m]=function(){var a=Array.prototype.slice.call(arguments),v=arguments,w=this;w.proceed=function(){x.apply(w,arguments.length?arguments:v)};a.unshift(x);a=e.apply(this,a);w.proceed=null;return a}};a.datePropsToTimestamps=function(u){a.objectEach(u,function(m,e){a.isObject(m)&&"function"===typeof m.getTime?u[e]=m.getTime():(a.isObject(m)||a.isArray(m))&&a.datePropsToTimestamps(m)})};a.formatSingle=function(u,m,e){var x=/\.([0-9])/,y=a.defaultOptions.lang;/f$/.test(u)?(e=
(e=u.match(x))?e[1]:-1,null!==m&&(m=a.numberFormat(m,e,y.decimalPoint,-1<u.indexOf(",")?y.thousandsSep:""))):m=(e||a.time).dateFormat(u,m);return m};a.format=function(u,m,e){for(var x="{",y=!1,v,w,r,c,k=[],h;u;){x=u.indexOf(x);if(-1===x)break;v=u.slice(0,x);if(y){v=v.split(":");w=v.shift().split(".");c=w.length;h=m;for(r=0;r<c;r++)h&&(h=h[w[r]]);v.length&&(h=a.formatSingle(v.join(":"),h,e));k.push(h)}else k.push(v);u=u.slice(x+1);x=(y=!y)?"}":"{"}k.push(u);return k.join("")};a.getMagnitude=function(a){return Math.pow(10,
Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(u,m,e,x,y){var v,w=u;e=a.pick(e,1);v=u/e;m||(m=y?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===x&&(1===e?m=a.grep(m,function(a){return 0===a%1}):.1>=e&&(m=[1/e])));for(x=0;x<m.length&&!(w=m[x],y&&w*e>=u||!y&&v<=(m[x]+(m[x+1]||m[x]))/2);x++);return w=a.correctFloat(w*e,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,m){var e=a.length,x,y;for(y=0;y<e;y++)a[y].safeI=y;a.sort(function(a,e){x=m(a,e);return 0===x?
a.safeI-e.safeI:x});for(y=0;y<e;y++)delete a[y].safeI};a.arrayMin=function(a){for(var m=a.length,e=a[0];m--;)a[m]<e&&(e=a[m]);return e};a.arrayMax=function(a){for(var m=a.length,e=a[0];m--;)a[m]>e&&(e=a[m]);return e};a.destroyObjectProperties=function(u,m){a.objectEach(u,function(a,x){a&&a!==m&&a.destroy&&a.destroy();delete u[x]})};a.discardElement=function(u){var m=a.garbageBin;m||(m=a.createElement("div"));u&&m.appendChild(u);m.innerHTML=""};a.correctFloat=function(a,m){return parseFloat(a.toPrecision(m||
14))};a.setAnimation=function(u,m){m.renderer.globalAnimation=a.pick(u,m.options.chart.animation,!0)};a.animObject=function(u){return a.isObject(u)?a.merge(u):{duration:u?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(u,m,e,x){u=+u||0;m=+m;var y=a.defaultOptions.lang,v=(u.toString().split(".")[1]||"").split("e")[0].length,w,r,c=u.toString().split("e");-1===m?m=Math.min(v,20):a.isNumber(m)?m&&c[1]&&0>c[1]&&
(w=m+ +c[1],0<=w?(c[0]=(+c[0]).toExponential(w).split("e")[0],m=w):(c[0]=c[0].split(".")[0]||0,u=20>m?(c[0]*Math.pow(10,c[1])).toFixed(m):0,c[1]=0)):m=2;r=(Math.abs(c[1]?c[0]:u)+Math.pow(10,-Math.max(m,v)-1)).toFixed(m);v=String(a.pInt(r));w=3<v.length?v.length%3:0;e=a.pick(e,y.decimalPoint);x=a.pick(x,y.thousandsSep);u=(0>u?"-":"")+(w?v.substr(0,w)+x:"");u+=v.substr(w).replace(/(\d{3})(?=\d)/g,"$1"+x);m&&(u+=e+r.slice(-m));c[1]&&0!==+u&&(u+="e"+c[1]);return u};Math.easeInOutSine=function(a){return-.5*
(Math.cos(Math.PI*a)-1)};a.getStyle=function(u,m,e){if("width"===m)return Math.max(0,Math.min(u.offsetWidth,u.scrollWidth)-a.getStyle(u,"padding-left")-a.getStyle(u,"padding-right"));if("height"===m)return Math.max(0,Math.min(u.offsetHeight,u.scrollHeight)-a.getStyle(u,"padding-top")-a.getStyle(u,"padding-bottom"));F.getComputedStyle||a.error(27,!0);if(u=F.getComputedStyle(u,void 0))u=u.getPropertyValue(m),a.pick(e,"opacity"!==m)&&(u=a.pInt(u));return u};a.inArray=function(u,m,e){return(a.indexOfPolyfill||
Array.prototype.indexOf).call(m,u,e)};a.grep=function(u,m){return(a.filterPolyfill||Array.prototype.filter).call(u,m)};a.find=Array.prototype.find?function(a,m){return a.find(m)}:function(a,m){var e,x=a.length;for(e=0;e<x;e++)if(m(a[e],e))return a[e]};a.some=function(u,m,e){return(a.somePolyfill||Array.prototype.some).call(u,m,e)};a.map=function(a,m){for(var e=[],x=0,y=a.length;x<y;x++)e[x]=m.call(a[x],a[x],x,a);return e};a.keys=function(u){return(a.keysPolyfill||Object.keys).call(void 0,u)};a.reduce=
function(u,m,e){return(a.reducePolyfill||Array.prototype.reduce).apply(u,2<arguments.length?[m,e]:[m])};a.offset=function(a){var m=D.documentElement;a=a.parentElement||a.parentNode?a.getBoundingClientRect():{top:0,left:0};return{top:a.top+(F.pageYOffset||m.scrollTop)-(m.clientTop||0),left:a.left+(F.pageXOffset||m.scrollLeft)-(m.clientLeft||0)}};a.stop=function(u,m){for(var e=a.timers.length;e--;)a.timers[e].elem!==u||m&&m!==a.timers[e].prop||(a.timers[e].stopped=!0)};a.each=function(u,m,e){return(a.forEachPolyfill||
Array.prototype.forEach).call(u,m,e)};a.objectEach=function(a,m,e){for(var x in a)a.hasOwnProperty(x)&&m.call(e||a[x],a[x],x,a)};a.addEvent=function(u,m,e,x){var y,v=u.addEventListener||a.addEventListenerPolyfill;y="function"===typeof u&&u.prototype?u.prototype.protoEvents=u.prototype.protoEvents||{}:u.hcEvents=u.hcEvents||{};a.Point&&u instanceof a.Point&&u.series&&u.series.chart&&(u.series.chart.runTrackerClick=!0);v&&v.call(u,m,e,!1);y[m]||(y[m]=[]);y[m].push(e);x&&a.isNumber(x.order)&&(e.order=
x.order,y[m].sort(function(a,r){return a.order-r.order}));return function(){a.removeEvent(u,m,e)}};a.removeEvent=function(u,m,e){function x(r,c){var k=u.removeEventListener||a.removeEventListenerPolyfill;k&&k.call(u,r,c,!1)}function y(r){var c,k;u.nodeName&&(m?(c={},c[m]=!0):c=r,a.objectEach(c,function(a,c){if(r[c])for(k=r[c].length;k--;)x(c,r[c][k])}))}var v,w;a.each(["protoEvents","hcEvents"],function(r){var c=u[r];c&&(m?(v=c[m]||[],e?(w=a.inArray(e,v),-1<w&&(v.splice(w,1),c[m]=v),x(m,e)):(y(c),
c[m]=[])):(y(c),u[r]={}))})};a.fireEvent=function(u,m,e,x){var y,v,w,r,c;e=e||{};D.createEvent&&(u.dispatchEvent||u.fireEvent)?(y=D.createEvent("Events"),y.initEvent(m,!0,!0),a.extend(y,e),u.dispatchEvent?u.dispatchEvent(y):u.fireEvent(m,y)):a.each(["protoEvents","hcEvents"],function(k){if(u[k])for(v=u[k][m]||[],w=v.length,e.target||a.extend(e,{preventDefault:function(){e.defaultPrevented=!0},target:u,type:m}),r=0;r<w;r++)(c=v[r])&&!1===c.call(u,e)&&e.preventDefault()});x&&!e.defaultPrevented&&x.call(u,
e)};a.animate=function(u,m,e){var x,y="",v,w,r;a.isObject(e)||(r=arguments,e={duration:r[2],easing:r[3],complete:r[4]});a.isNumber(e.duration)||(e.duration=400);e.easing="function"===typeof e.easing?e.easing:Math[e.easing]||Math.easeInOutSine;e.curAnim=a.merge(m);a.objectEach(m,function(c,k){a.stop(u,k);w=new a.Fx(u,e,k);v=null;"d"===k?(w.paths=w.initPath(u,u.d,m.d),w.toD=m.d,x=0,v=1):u.attr?x=u.attr(k):(x=parseFloat(a.getStyle(u,k))||0,"opacity"!==k&&(y="px"));v||(v=c);v&&v.match&&v.match("px")&&
(v=v.replace(/px/g,""));w.run(x,v,y)})};a.seriesType=function(u,m,e,x,y){var v=a.getOptions(),w=a.seriesTypes;v.plotOptions[u]=a.merge(v.plotOptions[m],e);w[u]=a.extendClass(w[m]||function(){},x);w[u].prototype.type=u;y&&(w[u].prototype.pointClass=a.extendClass(a.Point,y));return w[u]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),m=0;return function(){return"highcharts-"+a+"-"+m++}}();F.jQuery&&(F.jQuery.fn.highcharts=function(){var u=[].slice.call(arguments);if(this[0])return u[0]?
(new (a[a.isString(u[0])?u.shift():"Chart"])(this[0],u[0],u[1]),this):C[a.attr(this[0],"data-highcharts-chart")]})})(K);(function(a){var C=a.each,D=a.isNumber,F=a.map,u=a.merge,m=a.pInt;a.Color=function(e){if(!(this instanceof a.Color))return new a.Color(e);this.init(e)};a.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(a){return[m(a[1]),m(a[2]),m(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,
parse:function(a){return[m(a[1]),m(a[2]),m(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(e){var m,y,v,w;if((this.input=e=this.names[e&&e.toLowerCase?e.toLowerCase():""]||e)&&e.stops)this.stops=F(e.stops,function(r){return new a.Color(r[1])});else if(e&&e.charAt&&"#"===e.charAt()&&(m=e.length,e=parseInt(e.substr(1),16),7===m?y=[(e&16711680)>>16,(e&65280)>>8,e&255,1]:4===m&&(y=[(e&3840)>>4|(e&3840)>>8,(e&240)>>4|e&240,(e&15)<<4|e&15,1])),!y)for(v=this.parsers.length;v--&&!y;)w=this.parsers[v],
(m=w.regex.exec(e))&&(y=w.parse(m));this.rgba=y||[]},get:function(a){var e=this.input,y=this.rgba,v;this.stops?(v=u(e),v.stops=[].concat(v.stops),C(this.stops,function(e,r){v.stops[r]=[v.stops[r][0],e.get(a)]})):v=y&&D(y[0])?"rgb"===a||!a&&1===y[3]?"rgb("+y[0]+","+y[1]+","+y[2]+")":"a"===a?y[3]:"rgba("+y.join(",")+")":e;return v},brighten:function(a){var e,y=this.rgba;if(this.stops)C(this.stops,function(e){e.brighten(a)});else if(D(a)&&0!==a)for(e=0;3>e;e++)y[e]+=m(255*a),0>y[e]&&(y[e]=0),255<y[e]&&
(y[e]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,m){var e=this.rgba,v=a.rgba;v.length&&e&&e.length?(a=1!==v[3]||1!==e[3],m=(a?"rgba(":"rgb(")+Math.round(v[0]+(e[0]-v[0])*(1-m))+","+Math.round(v[1]+(e[1]-v[1])*(1-m))+","+Math.round(v[2]+(e[2]-v[2])*(1-m))+(a?","+(v[3]+(e[3]-v[3])*(1-m)):"")+")"):m=a.input||"none";return m}};a.color=function(e){return new a.Color(e)}})(K);(function(a){var C,D,F=a.addEvent,u=a.animate,m=a.attr,e=a.charts,x=a.color,y=a.css,
v=a.createElement,w=a.defined,r=a.deg2rad,c=a.destroyObjectProperties,k=a.doc,h=a.each,q=a.extend,b=a.erase,n=a.grep,d=a.hasTouch,E=a.inArray,g=a.isArray,G=a.isFirefox,I=a.isMS,A=a.isObject,t=a.isString,z=a.isWebKit,J=a.merge,l=a.noop,H=a.objectEach,f=a.pick,B=a.pInt,L=a.removeEvent,p=a.splat,N=a.stop,W=a.svg,R=a.SVG_NS,P=a.symbolSizes,O=a.win;C=a.SVGElement=function(){return this};q(C.prototype,{opacity:1,SVG_NS:R,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),
init:function(a,b){this.element="span"===b?v(b):k.createElementNS(this.SVG_NS,b);this.renderer=a},animate:function(b,p,B){p=a.animObject(f(p,this.renderer.globalAnimation,!0));0!==p.duration?(B&&(p.complete=B),u(this,b,p)):(this.attr(b,null,B),p.step&&p.step.call(this));return this},complexColor:function(b,f,p){var B=this.renderer,l,d,t,M,c,z,n,q,L,k,E,N=[],A;a.fireEvent(this.renderer,"complexColor",{args:arguments},function(){b.radialGradient?d="radialGradient":b.linearGradient&&(d="linearGradient");
d&&(t=b[d],c=B.gradients,n=b.stops,k=p.radialReference,g(t)&&(b[d]=t={x1:t[0],y1:t[1],x2:t[2],y2:t[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===d&&k&&!w(t.gradientUnits)&&(M=t,t=J(t,B.getRadialAttr(k,M),{gradientUnits:"userSpaceOnUse"})),H(t,function(a,b){"id"!==b&&N.push(b,a)}),H(n,function(a){N.push(a)}),N=N.join(","),c[N]?E=c[N].attr("id"):(t.id=E=a.uniqueKey(),c[N]=z=B.createElement(d).attr(t).add(B.defs),z.radAttr=M,z.stops=[],h(n,function(b){0===b[1].indexOf("rgba")?(l=a.color(b[1]),
q=l.get("rgb"),L=l.get("a")):(q=b[1],L=1);b=B.createElement("stop").attr({offset:b[0],"stop-color":q,"stop-opacity":L}).add(z);z.stops.push(b)})),A="url("+B.url+"#"+E+")",p.setAttribute(f,A),p.gradient=N,b.toString=function(){return A})})},applyTextOutline:function(f){var p=this.element,B,l,t,d,g;-1!==f.indexOf("contrast")&&(f=f.replace(/contrast/g,this.renderer.getContrast(p.style.fill)));f=f.split(" ");l=f[f.length-1];if((t=f[0])&&"none"!==t&&a.svg){this.fakeTS=!0;f=[].slice.call(p.getElementsByTagName("tspan"));
this.ySetter=this.xSetter;t=t.replace(/(^[\d\.]+)(.*?)$/g,function(a,b,f){return 2*b+f});for(g=f.length;g--;)B=f[g],"highcharts-text-outline"===B.getAttribute("class")&&b(f,p.removeChild(B));d=p.firstChild;h(f,function(a,b){0===b&&(a.setAttribute("x",p.getAttribute("x")),b=p.getAttribute("y"),a.setAttribute("y",b||0),null===b&&p.setAttribute("y",0));a=a.cloneNode(1);m(a,{"class":"highcharts-text-outline",fill:l,stroke:l,"stroke-width":t,"stroke-linejoin":"round"});p.insertBefore(a,d)})}},attr:function(a,
b,f,p){var B,l=this.element,t,d=this,g,z;"string"===typeof a&&void 0!==b&&(B=a,a={},a[B]=b);"string"===typeof a?d=(this[a+"Getter"]||this._defaultGetter).call(this,a,l):(H(a,function(b,f){g=!1;p||N(this,f);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(f)&&(t||(this.symbolAttr(a),t=!0),g=!0);!this.rotation||"x"!==f&&"y"!==f||(this.doTransform=!0);g||(z=this[f+"Setter"]||this._defaultSetter,z.call(this,b,f,l))},this),this.afterSetters());f&&f.call(this);return d},afterSetters:function(){this.doTransform&&
(this.updateTransform(),this.doTransform=!1)},addClass:function(a,b){var f=this.attr("class")||"";-1===f.indexOf(a)&&(b||(a=(f+(f?" ":"")+a).replace("  "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==E(a,(this.attr("class")||"").split(" "))},removeClass:function(a){return this.attr("class",(this.attr("class")||"").replace(a,""))},symbolAttr:function(a){var b=this;h("x y r start end width height innerR anchorX anchorY".split(" "),function(p){b[p]=f(a[p],b[p])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,
b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,b){var f;b=b||a.strokeWidth||0;f=Math.round(b)%2/2;a.x=Math.floor(a.x||this.x||0)+f;a.y=Math.floor(a.y||this.y||0)+f;a.width=Math.floor((a.width||this.width||0)-2*f);a.height=Math.floor((a.height||this.height||0)-2*f);w(a.strokeWidth)&&(a.strokeWidth=b);return a},css:function(a){var b=this.styles,f={},p=this.element,l,t="",d,g=!b,z=["textOutline","textOverflow",
"width"];a&&a.color&&(a.fill=a.color);b&&H(a,function(a,p){a!==b[p]&&(f[p]=a,g=!0)});g&&(b&&(a=q(b,f)),a&&(null===a.width||"auto"===a.width?delete this.textWidth:"text"===p.nodeName.toLowerCase()&&a.width&&(l=this.textWidth=B(a.width))),this.styles=a,l&&!W&&this.renderer.forExport&&delete a.width,p.namespaceURI===this.SVG_NS?(d=function(a,b){return"-"+b.toLowerCase()},H(a,function(a,b){-1===E(b,z)&&(t+=b.replace(/([A-Z])/g,d)+":"+a+";")}),t&&m(p,"style",t)):y(p,a),this.added&&("text"===this.element.nodeName&&
this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},getStyle:function(a){return O.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){var a=this.getStyle("stroke-width"),b;a.indexOf("px")===a.length-2?a=B(a):(b=k.createElementNS(R,"rect"),m(b,{width:a,"stroke-width":0}),this.element.parentNode.appendChild(b),a=b.getBBox().width,b.parentNode.removeChild(b));return a},on:function(a,b){var f=this,p=f.element;d&&"click"===
a?(p.ontouchstart=function(a){f.touchEventFired=Date.now();a.preventDefault();b.call(p,a)},p.onclick=function(a){(-1===O.navigator.userAgent.indexOf("Android")||1100<Date.now()-(f.touchEventFired||0))&&b.call(p,a)}):p["on"+a]=b;return this},setRadialReference:function(a){var b=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;b&&b.radAttr&&b.animate(this.renderer.getRadialAttr(a,b.radAttr));return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},
invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,p=this.scaleX,B=this.scaleY,l=this.inverted,t=this.rotation,d=this.matrix,g=this.element;l&&(a+=this.width,b+=this.height);a=["translate("+a+","+b+")"];w(d)&&a.push("matrix("+d.join(",")+")");l?a.push("rotate(90) scale(-1,1)"):t&&a.push("rotate("+t+" "+f(this.rotationOriginX,g.getAttribute("x"),0)+" "+f(this.rotationOriginY,g.getAttribute("y")||0)+")");(w(p)||
w(B))&&a.push("scale("+f(p,1)+" "+f(B,1)+")");a.length&&g.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,p,B){var l,d,g,z,c={};d=this.renderer;g=d.alignedObjects;var n,q;if(a){if(this.alignOptions=a,this.alignByTranslate=p,!B||t(B))this.alignTo=l=B||"renderer",b(g,this),g.push(this),B=null}else a=this.alignOptions,p=this.alignByTranslate,l=this.alignTo;B=f(B,d[l],d);l=a.align;d=a.verticalAlign;g=(B.x||0)+(a.x||
0);z=(B.y||0)+(a.y||0);"right"===l?n=1:"center"===l&&(n=2);n&&(g+=(B.width-(a.width||0))/n);c[p?"translateX":"x"]=Math.round(g);"bottom"===d?q=1:"middle"===d&&(q=2);q&&(z+=(B.height-(a.height||0))/q);c[p?"translateY":"y"]=Math.round(z);this[this.placed?"animate":"attr"](c);this.placed=!0;this.alignAttr=c;return this},getBBox:function(a,b){var p,B=this.renderer,l,d=this.element,t=this.styles,g,z=this.textStr,c,n=B.cache,H=B.cacheKeys,L=d.namespaceURI===this.SVG_NS,J;b=f(b,this.rotation);l=b*r;g=d&&
C.prototype.getStyle.call(d,"font-size");w(z)&&(J=z.toString(),-1===J.indexOf("\x3c")&&(J=J.replace(/[0-9]/g,"0")),J+=["",b||0,g,this.textWidth,t&&t.textOverflow].join());J&&!a&&(p=n[J]);if(!p){if(L||B.forExport){try{(c=this.fakeTS&&function(a){h(d.querySelectorAll(".highcharts-text-outline"),function(b){b.style.display=a})})&&c("none"),p=d.getBBox?q({},d.getBBox()):{width:d.offsetWidth,height:d.offsetHeight},c&&c("")}catch(ea){}if(!p||0>p.width)p={width:0,height:0}}else p=this.htmlGetBBox();B.isSVG&&
(a=p.width,B=p.height,L&&(p.height=B={"11px,17":14,"13px,20":16}[t&&t.fontSize+","+Math.round(B)]||B),b&&(p.width=Math.abs(B*Math.sin(l))+Math.abs(a*Math.cos(l)),p.height=Math.abs(B*Math.cos(l))+Math.abs(a*Math.sin(l))));if(J&&0<p.height){for(;250<H.length;)delete n[H.shift()];n[J]||H.push(J);n[J]=p}}return p},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||
150,complete:function(){b.attr({y:-9999})}})},add:function(a){var b=this.renderer,f=this.element,p;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&b.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)p=this.zIndexSetter();p||(a?a.element:b.box).appendChild(f);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,f=a.element||{},p=a.renderer.isSVG&&"SPAN"===f.nodeName&&a.parentGroup,
B=f.ownerSVGElement,l=a.clipPath;f.onclick=f.onmouseout=f.onmouseover=f.onmousemove=f.point=null;N(a);l&&B&&(h(B.querySelectorAll("[clip-path],[CLIP-PATH]"),function(a){var b=a.getAttribute("clip-path"),f=l.element.id;(-1<b.indexOf("(#"+f+")")||-1<b.indexOf('("#'+f+'")'))&&a.removeAttribute("clip-path")}),a.clipPath=l.destroy());if(a.stops){for(B=0;B<a.stops.length;B++)a.stops[B]=a.stops[B].destroy();a.stops=null}for(a.safeRemoveChild(f);p&&p.div&&0===p.div.childNodes.length;)f=p.parentGroup,a.safeRemoveChild(p.div),
delete p.div,p=f;a.alignTo&&b(a.renderer.alignedObjects,a);H(a,function(b,f){delete a[f]});return null},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=f(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,b,f){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[b]!==a&&(f.setAttribute(b,a),
this[b]=a)},alignSetter:function(a){this.alignValue=a;this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,b,f){this[b]=a;f.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=k.createElementNS(this.SVG_NS,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(k.createTextNode(String(f(a),"").replace(/<[^>]*>/g,"").replace(/&lt;/g,"\x3c").replace(/&gt;/g,
"\x3e")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,b,f){"string"===typeof a?f.setAttribute(b,a):a&&this.complexColor(a,b,f)},visibilitySetter:function(a,b,f){"inherit"===a?f.removeAttribute(b):this[b]!==a&&f.setAttribute(b,a);this[b]=a},zIndexSetter:function(a,b){var f=this.renderer,p=this.parentGroup,l=(p||f).element||f.box,d,t=this.element,g,z,f=l===f.box;d=this.added;var c;w(a)?(t.setAttribute("data-z-index",
a),a=+a,this[b]===a&&(d=!1)):w(this[b])&&t.removeAttribute("data-z-index");this[b]=a;if(d){(a=this.zIndex)&&p&&(p.handleZ=!0);b=l.childNodes;for(c=b.length-1;0<=c&&!g;c--)if(p=b[c],d=p.getAttribute("data-z-index"),z=!w(d),p!==t)if(0>a&&z&&!f&&!c)l.insertBefore(t,b[c]),g=!0;else if(B(d)<=a||z&&(!w(a)||0<=a))l.insertBefore(t,b[c+1]||null),g=!0;g||(l.insertBefore(t,b[f?3:0]||null),g=!0)}return g},_defaultSetter:function(a,b,f){f.setAttribute(b,a)}});C.prototype.yGetter=C.prototype.xGetter;C.prototype.translateXSetter=
C.prototype.translateYSetter=C.prototype.rotationSetter=C.prototype.verticalAlignSetter=C.prototype.rotationOriginXSetter=C.prototype.rotationOriginYSetter=C.prototype.scaleXSetter=C.prototype.scaleYSetter=C.prototype.matrixSetter=function(a,b){this[b]=a;this.doTransform=!0};D=a.SVGRenderer=function(){this.init.apply(this,arguments)};q(D.prototype,{Element:C,SVG_NS:R,init:function(a,b,f,p,B,l){var d;p=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});d=p.element;a.appendChild(d);
m(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&m(d,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=d;this.boxWrapper=p;this.alignedObjects=[];this.url=(G||z)&&k.getElementsByTagName("base").length?O.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(k.createTextNode("Created with Highstock 6.2.0"));this.defs=this.createElement("defs").add();this.allowHTML=l;this.forExport=B;this.gradients={};
this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(b,f,!1);var t;G&&a.getBoundingClientRect&&(b=function(){y(a,{left:0,top:0});t=a.getBoundingClientRect();y(a,{left:Math.ceil(t.left)-t.left+"px",top:Math.ceil(t.top)-t.top+"px"})},b(),this.unSubPixelFix=F(O,"resize",b))},definition:function(a){function b(a,B){var l;h(p(a),function(a){var p=f.createElement(a.tagName),d={};H(a,function(a,b){"tagName"!==b&&"children"!==b&&"textContent"!==b&&(d[b]=a)});p.attr(d);p.add(B||f.defs);a.textContent&&
p.element.appendChild(k.createTextNode(a.textContent));b(a.children||[],p);l=p});return l}var f=this;return b(a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();c(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a);return b},draw:l,getRadialAttr:function(a,
b){return{cx:a[0]-a[2]/2+b.cx*a[2],cy:a[1]-a[2]/2+b.cy*a[2],r:b.r*a[2]}},truncate:function(a,b,f,p,B,l,d){var t=this,g=a.rotation,c,z=p?1:0,n=(f||p).length,q=n,H=[],h=function(a){b.firstChild&&b.removeChild(b.firstChild);a&&b.appendChild(k.createTextNode(a))},J=function(l,g){g=g||l;if(void 0===H[g])if(b.getSubStringLength)try{H[g]=B+b.getSubStringLength(0,p?g+1:g)}catch(fa){}else t.getSpanWidth&&(h(d(f||p,l)),H[g]=B+t.getSpanWidth(a,b));return H[g]},L,E;a.rotation=0;L=J(b.textContent.length);if(E=
B+L>l){for(;z<=n;)q=Math.ceil((z+n)/2),p&&(c=d(p,q)),L=J(q,c&&c.length-1),z===n?z=n+1:L>l?n=q-1:z=q;0===n?h(""):f&&n===f.length-1||h(c||d(f||p,q))}p&&p.splice(0,q);a.actualWidth=L;a.rotation=g;return E},escapes:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;","'":"\x26#39;",'"':"\x26quot;"},buildText:function(a){var b=a.element,p=this,l=p.forExport,d=f(a.textStr,"").toString(),t=-1!==d.indexOf("\x3c"),g=b.childNodes,c,z=m(b,"x"),q=a.styles,J=a.textWidth,L=q&&q.lineHeight,N=q&&q.textOutline,A=
q&&"ellipsis"===q.textOverflow,I=q&&"nowrap"===q.whiteSpace,r=q&&q.fontSize,G,e,w=g.length,q=J&&!a.added&&this.box,v=function(a){return L?B(L):p.fontMetrics(void 0,a.getAttribute("style")?a:b).h},M=function(a,b){H(p.escapes,function(f,p){b&&-1!==E(f,b)||(a=a.toString().replace(new RegExp(f,"g"),p))});return a},x=function(a,b){var f;f=a.indexOf("\x3c");a=a.substring(f,a.indexOf("\x3e")-f);f=a.indexOf(b+"\x3d");if(-1!==f&&(f=f+b.length+1,b=a.charAt(f),'"'===b||"'"===b))return a=a.substring(f+1),a.substring(0,
a.indexOf(b))};G=[d,A,I,L,N,r,J].join();if(G!==a.textCache){for(a.textCache=G;w--;)b.removeChild(g[w]);t||N||A||J||-1!==d.indexOf(" ")?(q&&q.appendChild(b),d=t?d.replace(/<(b|strong)>/g,'\x3cspan class\x3d"highcharts-strong"\x3e').replace(/<(i|em)>/g,'\x3cspan class\x3d"highcharts-emphasized"\x3e').replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g):[d],d=n(d,function(a){return""!==a}),h(d,function(f,B){var d,t=0,g=0;f=f.replace(/^\s+|\s+$/g,"").replace(/<span/g,
"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");d=f.split("|||");h(d,function(f){if(""!==f||1===d.length){var n={},q=k.createElementNS(p.SVG_NS,"tspan"),H,L;(H=x(f,"class"))&&m(q,"class",H);if(H=x(f,"style"))H=H.replace(/(;| |^)color([ :])/,"$1fill$2"),m(q,"style",H);(L=x(f,"href"))&&!l&&(m(q,"onclick",'location.href\x3d"'+L+'"'),m(q,"class","highcharts-anchor"));f=M(f.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==f){q.appendChild(k.createTextNode(f));t?n.dx=0:B&&null!==z&&(n.x=z);m(q,
n);b.appendChild(q);!t&&e&&(!W&&l&&y(q,{display:"block"}),m(q,"dy",v(q)));if(J){var h=f.replace(/([^\^])-/g,"$1- ").split(" "),n=!I&&(1<d.length||B||1<h.length);L=0;var E=v(q);if(A)c=p.truncate(a,q,f,void 0,0,Math.max(0,J-parseInt(r||12,10)),function(a,b){return a.substring(0,b)+"\u2026"});else if(n)for(;h.length;)h.length&&!I&&0<L&&(q=k.createElementNS(R,"tspan"),m(q,{dy:E,x:z}),H&&m(q,"style",H),q.appendChild(k.createTextNode(h.join(" ").replace(/- /g,"-"))),b.appendChild(q)),p.truncate(a,q,null,
h,0===L?g:0,J,function(a,b){return h.slice(0,b).join(" ").replace(/- /g,"-")}),g=a.actualWidth,L++}t++}}});e=e||b.childNodes.length}),A&&c&&a.attr("title",M(a.textStr,["\x26lt;","\x26gt;"])),q&&q.removeChild(b),N&&a.applyTextOutline&&a.applyTextOutline(N)):b.appendChild(k.createTextNode(M(d)))}},getContrast:function(a){a=x(a).rgba;a[0]*=1;a[1]*=1.2;a[2]*=.5;return 459<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,b,f,p,B,l,d,t,g){var z=this.label(a,b,f,g,null,null,null,null,"button"),c=0;
z.attr(J({padding:8,r:2},B));F(z.element,I?"mouseover":"mouseenter",function(){3!==c&&z.setState(1)});F(z.element,I?"mouseout":"mouseleave",function(){3!==c&&z.setState(c)});z.setState=function(a){1!==a&&(z.state=c=a);z.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0])};return z.on("click",function(a){3!==c&&p.call(z,a)})},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-b%2/2);a[2]===a[5]&&
(a[2]=a[5]=Math.round(a[2])+b%2/2);return a},path:function(a){var b={};g(a)?b.d=a:A(a)&&q(b,a);return this.createElement("path").attr(b)},circle:function(a,b,f){a=A(a)?a:{x:a,y:b,r:f};b=this.createElement("circle");b.xSetter=b.ySetter=function(a,b,f){f.setAttribute("c"+b,a)};return b.attr(a)},arc:function(a,b,f,p,B,l){A(a)?(p=a,b=p.y,f=p.r,a=p.x):p={innerR:p,start:B,end:l};a=this.symbol("arc",a,b,f,f,p);a.r=f;return a},rect:function(a,b,f,p,B,l){B=A(a)?a.r:B;l=this.createElement("rect");a=A(a)?a:
void 0===a?{}:{x:a,y:b,width:Math.max(f,0),height:Math.max(p,0)};B&&(a.r=B);l.rSetter=function(a,b,f){m(f,{rx:a,ry:a})};return l.attr(a)},setSize:function(a,b,p){var B=this.alignedObjects,l=B.length;this.width=a;this.height=b;for(this.boxWrapper.animate({width:a,height:b},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:f(p,!0)?void 0:0});l--;)B[l].align()},g:function(a){var b=this.createElement("g");return a?b.attr({"class":"highcharts-"+a}):b},image:function(a,
b,f,p,B,l){var d={preserveAspectRatio:"none"},t,g=function(a,b){a.setAttributeNS?a.setAttributeNS("http://www.w3.org/1999/xlink","href",b):a.setAttribute("hc-svg-href",b)},z=function(b){g(t.element,a);l.call(t,b)};1<arguments.length&&q(d,{x:b,y:f,width:p,height:B});t=this.createElement("image").attr(d);l?(g(t.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw\x3d\x3d"),d=new O.Image,F(d,"load",z),d.src=a,d.complete&&z({})):g(t.element,a);return t},symbol:function(a,
b,p,B,l,d){var t=this,g,z=/^url\((.*?)\)$/,c=z.test(a),n=!c&&(this.symbols[a]?a:"circle"),H=n&&this.symbols[n],L=w(b)&&H&&H.call(this.symbols,Math.round(b),Math.round(p),B,l,d),J,E;H?(g=this.path(L),q(g,{symbolName:n,x:b,y:p,width:B,height:l}),d&&q(g,d)):c&&(J=a.match(z)[1],g=this.image(J),g.imgwidth=f(P[J]&&P[J].width,d&&d.width),g.imgheight=f(P[J]&&P[J].height,d&&d.height),E=function(){g.attr({width:g.width,height:g.height})},h(["width","height"],function(a){g[a+"Setter"]=function(a,b){var f={},
p=this["img"+b],B="width"===b?"translateX":"translateY";this[b]=a;w(p)&&(this.element&&this.element.setAttribute(b,p),this.alignByTranslate||(f[B]=((this[b]||0)-p)/2,this.attr(f)))}}),w(b)&&g.attr({x:b,y:p}),g.isImg=!0,w(g.imgwidth)&&w(g.imgheight)?E():(g.attr({width:0,height:0}),v("img",{onload:function(){var a=e[t.chartIndex];0===this.width&&(y(this,{position:"absolute",top:"-999em"}),k.body.appendChild(this));P[J]={width:this.width,height:this.height};g.imgwidth=this.width;g.imgheight=this.height;
g.element&&E();this.parentNode&&this.parentNode.removeChild(this);t.imgCount--;if(!t.imgCount&&a&&a.onload)a.onload()},src:J}),this.imgCount++));return g},symbols:{circle:function(a,b,f,p){return this.arc(a+f/2,b+p/2,f/2,p/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,b,f,p){return["M",a,b,"L",a+f,b,a+f,b+p,a,b+p,"Z"]},triangle:function(a,b,f,p){return["M",a+f/2,b,"L",a+f,b+p,a,b+p,"Z"]},"triangle-down":function(a,b,f,p){return["M",a,b,"L",a+f,b,a+f/2,b+p,"Z"]},diamond:function(a,b,f,p){return["M",
a+f/2,b,"L",a+f,b+p/2,a+f/2,b+p,a,b+p/2,"Z"]},arc:function(a,b,p,B,l){var d=l.start,t=l.r||p,g=l.r||B||p,z=l.end-.001;p=l.innerR;B=f(l.open,.001>Math.abs(l.end-l.start-2*Math.PI));var c=Math.cos(d),q=Math.sin(d),n=Math.cos(z),z=Math.sin(z);l=.001>l.end-d-Math.PI?0:1;t=["M",a+t*c,b+g*q,"A",t,g,0,l,1,a+t*n,b+g*z];w(p)&&t.push(B?"M":"L",a+p*n,b+p*z,"A",p,p,0,l,0,a+p*c,b+p*q);t.push(B?"":"Z");return t},callout:function(a,b,f,p,B){var l=Math.min(B&&B.r||0,f,p),d=l+6,t=B&&B.anchorX;B=B&&B.anchorY;var g;
g=["M",a+l,b,"L",a+f-l,b,"C",a+f,b,a+f,b,a+f,b+l,"L",a+f,b+p-l,"C",a+f,b+p,a+f,b+p,a+f-l,b+p,"L",a+l,b+p,"C",a,b+p,a,b+p,a,b+p-l,"L",a,b+l,"C",a,b,a,b,a+l,b];t&&t>f?B>b+d&&B<b+p-d?g.splice(13,3,"L",a+f,B-6,a+f+6,B,a+f,B+6,a+f,b+p-l):g.splice(13,3,"L",a+f,p/2,t,B,a+f,p/2,a+f,b+p-l):t&&0>t?B>b+d&&B<b+p-d?g.splice(33,3,"L",a,B+6,a-6,B,a,B-6,a,b+l):g.splice(33,3,"L",a,p/2,t,B,a,p/2,a,b+l):B&&B>p&&t>a+d&&t<a+f-d?g.splice(23,3,"L",t+6,b+p,t,b+p+6,t-6,b+p,a+l,b+p):B&&0>B&&t>a+d&&t<a+f-d&&g.splice(3,3,"L",
t-6,b,t,b-6,t+6,b,f-l,b);return g}},clipRect:function(b,f,p,B){var l=a.uniqueKey(),d=this.createElement("clipPath").attr({id:l}).add(this.defs);b=this.rect(b,f,p,B,0).add(d);b.id=l;b.clipPath=d;b.count=0;return b},text:function(a,b,f,p){var B={};if(p&&(this.allowHTML||!this.forExport))return this.html(a,b,f);B.x=Math.round(b||0);f&&(B.y=Math.round(f));w(a)&&(B.text=a);a=this.createElement("text").attr(B);p||(a.xSetter=function(a,b,f){var p=f.getElementsByTagName("tspan"),B,l=f.getAttribute(b),d;for(d=
0;d<p.length;d++)B=p[d],B.getAttribute(b)===l&&B.setAttribute(b,a);f.setAttribute(b,a)});return a},fontMetrics:function(a,b){a=b&&C.prototype.getStyle.call(b,"font-size");a=/px/.test(a)?B(a):/em/.test(a)?parseFloat(a)*(b?this.fontMetrics(null,b.parentNode).f:16):12;b=24>a?a+3:Math.round(1.2*a);return{h:b,b:Math.round(.8*b),f:a}},rotCorr:function(a,b,f){var p=a;b&&f&&(p=Math.max(p*Math.cos(b*r),4));return{x:-a/3*Math.sin(b*r),y:p}},label:function(b,f,p,B,l,d,t,g,z){var c=this,n=c.g("button"!==z&&"label"),
H=n.text=c.text("",0,0,t).attr({zIndex:1}),E,k,N=0,A=3,I=0,r,G,e,W,R,m={},v,y=/^url\((.*?)\)$/.test(B),x=y,u,P,O,M;z&&n.addClass("highcharts-"+z);x=!0;u=function(){return E.strokeWidth()%2/2};P=function(){var a=H.element.style,b={};k=(void 0===r||void 0===G||R)&&w(H.textStr)&&H.getBBox();n.width=(r||k.width||0)+2*A+I;n.height=(G||k.height||0)+2*A;v=A+c.fontMetrics(a&&a.fontSize,H).b;x&&(E||(n.box=E=c.symbols[B]||y?c.symbol(B):c.rect(),E.addClass(("button"===z?"":"highcharts-label-box")+(z?" highcharts-"+
z+"-box":"")),E.add(n),a=u(),b.x=a,b.y=(g?-v:0)+a),b.width=Math.round(n.width),b.height=Math.round(n.height),E.attr(q(b,m)),m={})};O=function(){var a=I+A,b;b=g?0:v;w(r)&&k&&("center"===R||"right"===R)&&(a+={center:.5,right:1}[R]*(r-k.width));if(a!==H.x||b!==H.y)H.attr("x",a),H.hasBoxWidthChanged&&(k=H.getBBox(!0),P()),void 0!==b&&H.attr("y",b);H.x=a;H.y=b};M=function(a,b){E?E.attr(a,b):m[a]=b};n.onAdd=function(){H.add(n);n.attr({text:b||0===b?b:"",x:f,y:p});E&&w(l)&&n.attr({anchorX:l,anchorY:d})};
n.widthSetter=function(b){r=a.isNumber(b)?b:null};n.heightSetter=function(a){G=a};n["text-alignSetter"]=function(a){R=a};n.paddingSetter=function(a){w(a)&&a!==A&&(A=n.padding=a,O())};n.paddingLeftSetter=function(a){w(a)&&a!==I&&(I=a,O())};n.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==N&&(N=a,k&&n.attr({x:e}))};n.textSetter=function(a){void 0!==a&&H.textSetter(a);P();O()};n["stroke-widthSetter"]=function(a,b){a&&(x=!0);this["stroke-width"]=a;M(b,a)};n.rSetter=function(a,b){M(b,a)};
n.anchorXSetter=function(a,b){l=n.anchorX=a;M(b,Math.round(a)-u()-e)};n.anchorYSetter=function(a,b){d=n.anchorY=a;M(b,a-W)};n.xSetter=function(a){n.x=a;N&&(a-=N*((r||k.width)+2*A),n["forceAnimate:x"]=!0);e=Math.round(a);n.attr("translateX",e)};n.ySetter=function(a){W=n.y=Math.round(a);n.attr("translateY",W)};var D=n.css;return q(n,{css:function(a){if(a){var b={};a=J(a);h(n.textProps,function(f){void 0!==a[f]&&(b[f]=a[f],delete a[f])});H.css(b);"width"in b&&P()}return D.call(n,a)},getBBox:function(){return{width:k.width+
2*A,height:k.height+2*A,x:k.x-A,y:k.y-A}},destroy:function(){L(n.element,"mouseenter");L(n.element,"mouseleave");H&&(H=H.destroy());E&&(E=E.destroy());C.prototype.destroy.call(n);n=c=P=O=M=null}})}});a.Renderer=D})(K);(function(a){var C=a.attr,D=a.createElement,F=a.css,u=a.defined,m=a.each,e=a.extend,x=a.isFirefox,y=a.isMS,v=a.isWebKit,w=a.pick,r=a.pInt,c=a.SVGRenderer,k=a.win,h=a.wrap;e(a.SVGElement.prototype,{htmlCss:function(a){var b="SPAN"===this.element.tagName&&a&&"width"in a,n=w(b&&a.width,
void 0);b&&(delete a.width,this.textWidth=n,this.htmlUpdateTransform());a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=e(this.styles,a);F(this.element,a);return this},htmlGetBBox:function(){var a=this.element;return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,n=this.x||0,d=this.y||0,c=this.textAlign||"left",g={left:0,center:.5,right:1}[c],h=this.styles,
k=h&&h.whiteSpace;F(b,{marginLeft:this.translateX||0,marginTop:this.translateY||0});this.inverted&&m(b.childNodes,function(d){a.invertChild(d,b)});if("SPAN"===b.tagName){var h=this.rotation,A=this.textWidth&&r(this.textWidth),t=[h,c,b.innerHTML,this.textWidth,this.textAlign].join(),z;(z=A!==this.oldTextWidth)&&!(z=A>this.oldTextWidth)&&((z=this.textPxLength)||(F(b,{width:"",whiteSpace:k||"nowrap"}),z=b.offsetWidth),z=z>A);z&&/[ \-]/.test(b.textContent||b.innerText)?(F(b,{width:A+"px",display:"block",
whiteSpace:k||"normal"}),this.oldTextWidth=A,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1;t!==this.cTT&&(k=a.fontMetrics(b.style.fontSize).b,!u(h)||h===(this.oldRotation||0)&&c===this.oldAlign||this.setSpanRotation(h,g,k),this.getSpanCorrection(!u(h)&&this.textPxLength||b.offsetWidth,k,g,h,c));F(b,{left:n+(this.xCorr||0)+"px",top:d+(this.yCorr||0)+"px"});this.cTT=t;this.oldRotation=h;this.oldAlign=c}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,n){var d={},c=this.renderer.getTransformKey();
d[c]=d.transform="rotate("+a+"deg)";d[c+(x?"Origin":"-origin")]=d.transformOrigin=100*b+"% "+n+"px";F(this.element,d)},getSpanCorrection:function(a,b,c){this.xCorr=-a*c;this.yCorr=-b}});e(c.prototype,{getTransformKey:function(){return y&&!/Edge/.test(k.navigator.userAgent)?"-ms-transform":v?"-webkit-transform":x?"MozTransform":k.opera?"-o-transform":""},html:function(a,b,c){var d=this.createElement("span"),n=d.element,g=d.renderer,q=g.isSVG,k=function(a,b){m(["opacity","visibility"],function(d){h(a,
d+"Setter",function(a,l,d,f){a.call(this,l,d,f);b[d]=l})});a.addedSetters=!0};d.textSetter=function(a){a!==n.innerHTML&&delete this.bBox;this.textStr=a;n.innerHTML=w(a,"");d.doTransform=!0};q&&k(d,d.element.style);d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,b){"align"===b&&(b="textAlign");d[b]=a;d.doTransform=!0};d.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};d.attr({text:a,x:Math.round(b),y:Math.round(c)}).css({position:"absolute"});
n.style.whiteSpace="nowrap";d.css=d.htmlCss;q&&(d.add=function(a){var b,c=g.box.parentNode,q=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)q.push(a),a=a.parentGroup;m(q.reverse(),function(a){function l(b,p){a[p]=b;"translateX"===p?f.left=b+"px":f.top=b+"px";a.doTransform=!0}var f,B=C(a.element,"class");B&&(B={className:B});b=a.div=a.div||D("div",B,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},
b||c);f=b.style;e(a,{classSetter:function(a){return function(b){this.element.setAttribute("class",b);a.className=b}}(b),on:function(){q[0].div&&d.on.apply({element:q[0].div},arguments);return a},translateXSetter:l,translateYSetter:l});a.addedSetters||k(a,f)})}}else b=c;b.appendChild(n);d.added=!0;d.alignOnAdd&&d.htmlUpdateTransform();return d});return d}})})(K);(function(a){var C=a.defined,D=a.each,F=a.extend,u=a.merge,m=a.pick,e=a.timeUnits,x=a.win;a.Time=function(a){this.update(a,!1)};a.Time.prototype=
{defaultOptions:{},update:function(a){var e=m(a&&a.useUTC,!0),w=this;this.options=a=u(!0,this.options||{},a);this.Date=a.Date||x.Date;this.timezoneOffset=(this.useUTC=e)&&a.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(e&&!a.getTimezoneOffset&&!a.timezone))||this.timezoneOffset?(this.get=function(a,c){var k=c.getTime(),h=k-w.getTimezoneOffset(c);c.setTime(h);a=c["getUTC"+a]();c.setTime(k);return a},this.set=function(a,c,k){var h;if("Milliseconds"===a||
"Seconds"===a||"Minutes"===a&&0===c.getTimezoneOffset()%60)c["set"+a](k);else h=w.getTimezoneOffset(c),h=c.getTime()-h,c.setTime(h),c["setUTC"+a](k),a=w.getTimezoneOffset(c),h=c.getTime()+a,c.setTime(h)}):e?(this.get=function(a,c){return c["getUTC"+a]()},this.set=function(a,c,k){return c["setUTC"+a](k)}):(this.get=function(a,c){return c["get"+a]()},this.set=function(a,c,k){return c["set"+a](k)})},makeTime:function(e,v,w,r,c,k){var h,q,b;this.useUTC?(h=this.Date.UTC.apply(0,arguments),q=this.getTimezoneOffset(h),
h+=q,b=this.getTimezoneOffset(h),q!==b?h+=b-q:q-36E5!==this.getTimezoneOffset(h-36E5)||a.isSafari||(h-=36E5)):h=(new this.Date(e,v,m(w,1),m(r,0),m(c,0),m(k,0))).getTime();return h},timezoneOffsetFunction:function(){var e=this,m=this.options,w=x.moment;if(!this.useUTC)return function(a){return 6E4*(new Date(a)).getTimezoneOffset()};if(m.timezone){if(w)return function(a){return 6E4*-w.tz(a,m.timezone).utcOffset()};a.error(25)}return this.useUTC&&m.getTimezoneOffset?function(a){return 6E4*m.getTimezoneOffset(a)}:
function(){return 6E4*(e.timezoneOffset||0)}},dateFormat:function(e,m,w){if(!a.defined(m)||isNaN(m))return a.defaultOptions.lang.invalidDate||"";e=a.pick(e,"%Y-%m-%d %H:%M:%S");var r=this,c=new this.Date(m),k=this.get("Hours",c),h=this.get("Day",c),q=this.get("Date",c),b=this.get("Month",c),n=this.get("FullYear",c),d=a.defaultOptions.lang,E=d.weekdays,g=d.shortWeekdays,G=a.pad,c=a.extend({a:g?g[h]:E[h].substr(0,3),A:E[h],d:G(q),e:G(q,2," "),w:h,b:d.shortMonths[b],B:d.months[b],m:G(b+1),o:b+1,y:n.toString().substr(2,
2),Y:n,H:G(k),k:k,I:G(k%12||12),l:k%12||12,M:G(r.get("Minutes",c)),p:12>k?"AM":"PM",P:12>k?"am":"pm",S:G(c.getSeconds()),L:G(Math.floor(m%1E3),3)},a.dateFormats);a.objectEach(c,function(a,b){for(;-1!==e.indexOf("%"+b);)e=e.replace("%"+b,"function"===typeof a?a.call(r,m):a)});return w?e.substr(0,1).toUpperCase()+e.substr(1):e},resolveDTLFormat:function(e){return a.isObject(e,!0)?e:(e=a.splat(e),{main:e[0],from:e[1],to:e[2]})},getTimeTicks:function(a,v,w,r){var c=this,k=[],h,q={},b;h=new c.Date(v);
var n=a.unitRange,d=a.count||1,E;r=m(r,1);if(C(v)){c.set("Milliseconds",h,n>=e.second?0:d*Math.floor(c.get("Milliseconds",h)/d));n>=e.second&&c.set("Seconds",h,n>=e.minute?0:d*Math.floor(c.get("Seconds",h)/d));n>=e.minute&&c.set("Minutes",h,n>=e.hour?0:d*Math.floor(c.get("Minutes",h)/d));n>=e.hour&&c.set("Hours",h,n>=e.day?0:d*Math.floor(c.get("Hours",h)/d));n>=e.day&&c.set("Date",h,n>=e.month?1:d*Math.floor(c.get("Date",h)/d));n>=e.month&&(c.set("Month",h,n>=e.year?0:d*Math.floor(c.get("Month",h)/
d)),b=c.get("FullYear",h));n>=e.year&&c.set("FullYear",h,b-b%d);n===e.week&&(b=c.get("Day",h),c.set("Date",h,c.get("Date",h)-b+r+(b<r?-7:0)));b=c.get("FullYear",h);r=c.get("Month",h);var g=c.get("Date",h),G=c.get("Hours",h);v=h.getTime();c.variableTimezone&&(E=w-v>4*e.month||c.getTimezoneOffset(v)!==c.getTimezoneOffset(w));v=h.getTime();for(h=1;v<w;)k.push(v),v=n===e.year?c.makeTime(b+h*d,0):n===e.month?c.makeTime(b,r+h*d):!E||n!==e.day&&n!==e.week?E&&n===e.hour&&1<d?c.makeTime(b,r,g,G+h*d):v+n*d:
c.makeTime(b,r,g+h*d*(n===e.day?1:7)),h++;k.push(v);n<=e.hour&&1E4>k.length&&D(k,function(a){0===a%18E5&&"000000000"===c.dateFormat("%H%M%S%L",a)&&(q[a]="day")})}k.info=F(a,{higherRanks:q,totalRange:n*d});return k}}})(K);(function(a){var C=a.merge;a.defaultOptions={symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:a.Time.prototype.defaultOptions,chart:{borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null},title:{text:"Chart title",align:"center",margin:15,
widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{}},loading:{},tooltip:{enabled:!0,animation:a.svg,borderRadius:3,
dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,headerFormat:'\x3cspan class\x3d"highcharts-header"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cspan class\x3d"highcharts-strong"\x3e{point.y}\x3c/span\x3e\x3cbr/\x3e'},
credits:{enabled:!0,href:"https://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},text:"Highcharts.com"}};a.setOptions=function(D){a.defaultOptions=C(!0,a.defaultOptions,D);a.time.update(C(a.defaultOptions.global,a.defaultOptions.time),!1);return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;a.time=new a.Time(C(a.defaultOptions.global,a.defaultOptions.time));a.dateFormat=function(D,C,u){return a.time.dateFormat(D,
C,u)}})(K);(function(a){var C=a.correctFloat,D=a.defined,F=a.destroyObjectProperties,u=a.fireEvent,m=a.isNumber,e=a.pick,x=a.deg2rad;a.Tick=function(a,e,w,r,c){this.axis=a;this.pos=e;this.type=w||"";this.isNewLabel=this.isNew=!0;this.parameters=c||{};this.tickmarkOffset=this.parameters.tickmarkOffset;this.options=this.parameters.options;w||r||this.addLabel()};a.Tick.prototype={addLabel:function(){var m=this,v=m.axis,w=v.options,r=v.chart,c=v.categories,k=v.names,h=m.pos,q=e(m.options&&m.options.labels,
w.labels),b=v.tickPositions,n=h===b[0],d=h===b[b.length-1],c=this.parameters.category||(c?e(c[h],k[h],h):h),E=m.label,b=b.info,g,G,I,A;v.isDatetimeAxis&&b&&(G=r.time.resolveDTLFormat(w.dateTimeLabelFormats[!w.grid&&b.higherRanks[h]||b.unitName]),g=G.main);m.isFirst=n;m.isLast=d;m.formatCtx={axis:v,chart:r,isFirst:n,isLast:d,dateTimeLabelFormat:g,tickPositionInfo:b,value:v.isLog?C(v.lin2log(c)):c,pos:h};w=v.labelFormatter.call(m.formatCtx,this.formatCtx);if(A=G&&G.list)m.shortenLabel=function(){for(I=
0;I<A.length;I++)if(E.attr({text:v.labelFormatter.call(a.extend(m.formatCtx,{dateTimeLabelFormat:A[I]}))}),E.getBBox().width<v.getSlotWidth(m)-2*e(q.padding,5))return;E.attr({text:""})};if(D(E))E&&E.textStr!==w&&(!E.textWidth||q.style&&q.style.width||E.styles.width||E.css({width:null}),E.attr({text:w}));else{if(m.label=E=D(w)&&q.enabled?r.renderer.text(w,0,0,q.useHTML).add(v.labelGroup):null)E.textPxLength=E.getBBox().width;m.rotation=0}},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?
"height":"width"]:0},handleOverflow:function(a){var m=this.axis,w=m.options.labels,r=a.x,c=m.chart.chartWidth,k=m.chart.spacing,h=e(m.labelLeft,Math.min(m.pos,k[3])),k=e(m.labelRight,Math.max(m.isRadial?0:m.pos+m.len,c-k[1])),q=this.label,b=this.rotation,n={left:0,center:.5,right:1}[m.labelAlign||q.attr("align")],d=q.getBBox().width,E=m.getSlotWidth(this),g=E,G=1,I,A={};if(b||"justify"!==e(w.overflow,"justify"))0>b&&r-n*d<h?I=Math.round(r/Math.cos(b*x)-h):0<b&&r+n*d>k&&(I=Math.round((c-r)/Math.cos(b*
x)));else if(c=r+(1-n)*d,r-n*d<h?g=a.x+g*(1-n)-h:c>k&&(g=k-a.x+g*n,G=-1),g=Math.min(E,g),g<E&&"center"===m.labelAlign&&(a.x+=G*(E-g-n*(E-Math.min(d,g)))),d>g||m.autoRotation&&(q.styles||{}).width)I=g;I&&(this.shortenLabel?this.shortenLabel():(A.width=I,(w.style||{}).textOverflow||(A.textOverflow="ellipsis"),q.css(A)))},getPosition:function(e,m,w,r){var c=this.axis,k=c.chart,h=r&&k.oldChartHeight||k.chartHeight;e={x:e?a.correctFloat(c.translate(m+w,null,null,r)+c.transB):c.left+c.offset+(c.opposite?
(r&&k.oldChartWidth||k.chartWidth)-c.right-c.left:0),y:e?h-c.bottom+c.offset-(c.opposite?c.height:0):a.correctFloat(h-c.translate(m+w,null,null,r)-c.transB)};u(this,"afterGetPosition",{pos:e});return e},getLabelPosition:function(a,e,m,r,c,k,h,q){var b=this.axis,n=b.transA,d=b.reversed,E=b.staggerLines,g=b.tickRotCorr||{x:0,y:0},G=c.y,I=r||b.reserveSpaceDefault?0:-b.labelOffset*("center"===b.labelAlign?.5:1),A={};D(G)||(G=0===b.side?m.rotation?-8:-m.getBBox().height:2===b.side?g.y+8:Math.cos(m.rotation*
x)*(g.y-m.getBBox(!1,0).height/2));a=a+c.x+I+g.x-(k&&r?k*n*(d?-1:1):0);e=e+G-(k&&!r?k*n*(d?1:-1):0);E&&(m=h/(q||1)%E,b.opposite&&(m=E-m-1),e+=b.labelOffset/E*m);A.x=a;A.y=Math.round(e);u(this,"afterGetLabelPosition",{pos:A});return A},getMarkPath:function(a,e,m,r,c,k){return k.crispLine(["M",a,e,"L",a+(c?0:-m),e+(c?m:0)],r)},renderGridLine:function(a,m,w){var r=this.axis,c=this.gridLine,k={},h=this.pos,q=this.type,b=e(this.tickmarkOffset,r.tickmarkOffset),n=r.chart.renderer;c||(q||(k.zIndex=1),a&&
(m=0),this.gridLine=c=n.path().attr(k).addClass("highcharts-"+(q?q+"-":"")+"grid-line").add(r.gridGroup));if(c&&(w=r.getPlotLinePath(h+b,c.strokeWidth()*w,a,"pass")))c[a||this.isNew?"attr":"animate"]({d:w,opacity:m})},renderMark:function(a,e,m){var r=this.axis,c=r.chart.renderer,k=this.type,h=r.tickSize(k?k+"Tick":"tick"),q=this.mark,b=!q,n=a.x;a=a.y;h&&(r.opposite&&(h[0]=-h[0]),b&&(this.mark=q=c.path().addClass("highcharts-"+(k?k+"-":"")+"tick").add(r.axisGroup)),q[b?"attr":"animate"]({d:this.getMarkPath(n,
a,h[0],q.strokeWidth()*m,r.horiz,c),opacity:e}))},renderLabel:function(a,x,w,r){var c=this.axis,k=c.horiz,h=c.options,q=this.label,b=h.labels,n=b.step,c=e(this.tickmarkOffset,c.tickmarkOffset),d=!0,E=a.x;a=a.y;q&&m(E)&&(q.xy=a=this.getLabelPosition(E,a,q,k,b,c,r,n),this.isFirst&&!this.isLast&&!e(h.showFirstLabel,1)||this.isLast&&!this.isFirst&&!e(h.showLastLabel,1)?d=!1:!k||b.step||b.rotation||x||0===w||this.handleOverflow(a),n&&r%n&&(d=!1),d&&m(a.y)?(a.opacity=w,q[this.isNewLabel?"attr":"animate"](a),
this.isNewLabel=!1):(q.attr("y",-9999),this.isNewLabel=!0))},render:function(m,x,w){var r=this.axis,c=r.horiz,k=this.pos,h=e(this.tickmarkOffset,r.tickmarkOffset),k=this.getPosition(c,k,h,x),h=k.x,q=k.y,r=c&&h===r.pos+r.len||!c&&q===r.pos?-1:1;w=e(w,1);this.isActive=!0;this.renderGridLine(x,w,r);this.renderMark(k,w,r);this.renderLabel(k,x,w,m);this.isNew=!1;a.fireEvent(this,"afterRender")},destroy:function(){F(this,this.axis)}}})(K);var Z=function(a){var C=a.addEvent,D=a.animObject,F=a.arrayMax,u=
a.arrayMin,m=a.correctFloat,e=a.defaultOptions,x=a.defined,y=a.deg2rad,v=a.destroyObjectProperties,w=a.each,r=a.extend,c=a.fireEvent,k=a.format,h=a.getMagnitude,q=a.grep,b=a.inArray,n=a.isArray,d=a.isNumber,E=a.isString,g=a.merge,G=a.normalizeTickInterval,I=a.objectEach,A=a.pick,t=a.removeEvent,z=a.splat,J=a.syncTimeout,l=a.Tick,H=function(){this.init.apply(this,arguments)};a.extend(H.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",
range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle"},type:"linear"},defaultYAxisOptions:{endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,
showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return a.numberFormat(this.total,-1)}}},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,B){var f=B.isX,p=this;p.chart=
a;p.horiz=a.inverted&&!p.isZAxis?!f:f;p.isXAxis=f;p.coll=p.coll||(f?"xAxis":"yAxis");c(this,"init",{userOptions:B});p.opposite=B.opposite;p.side=B.side||(p.horiz?p.opposite?0:2:p.opposite?1:3);p.setOptions(B);var d=this.options,l=d.type;p.labelFormatter=d.labels.formatter||p.defaultLabelFormatter;p.userOptions=B;p.minPixelPadding=0;p.reversed=d.reversed;p.visible=!1!==d.visible;p.zoomEnabled=!1!==d.zoomEnabled;p.hasNames="category"===l||!0===d.categories;p.categories=d.categories||p.hasNames;p.names||
(p.names=[],p.names.keys={});p.plotLinesAndBandsGroups={};p.isLog="logarithmic"===l;p.isDatetimeAxis="datetime"===l;p.positiveValuesOnly=p.isLog&&!p.allowNegativeLog;p.isLinked=x(d.linkedTo);p.ticks={};p.labelEdge=[];p.minorTicks={};p.plotLinesAndBands=[];p.alternateBands={};p.len=0;p.minRange=p.userMinRange=d.minRange||d.maxZoom;p.range=d.range;p.offset=d.offset||0;p.stacks={};p.oldStacks={};p.stacksTouched=0;p.max=null;p.min=null;p.crosshair=A(d.crosshair,z(a.options.tooltip.crosshairs)[f?0:1],
!1);B=p.options.events;-1===b(p,a.axes)&&(f?a.axes.splice(a.xAxis.length,0,p):a.axes.push(p),a[p.coll].push(p));p.series=p.series||[];a.inverted&&!p.isZAxis&&f&&void 0===p.reversed&&(p.reversed=!0);I(B,function(a,b){C(p,b,a)});p.lin2log=d.linearToLogConverter||p.lin2log;p.isLog&&(p.val2lin=p.log2lin,p.lin2val=p.lin2log);c(this,"afterInit")},setOptions:function(a){this.options=g(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,
this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],g(e[this.coll],a));c(this,"afterSetOptions",{userOptions:a})},defaultLabelFormatter:function(){var b=this.axis,B=this.value,d=b.chart.time,p=b.categories,l=this.dateTimeLabelFormat,t=e.lang,g=t.numericSymbols,t=t.numericSymbolMagnitude||1E3,c=g&&g.length,n,z=b.options.labels.format,b=b.isLog?Math.abs(B):b.tickInterval;if(z)n=k(z,this,d);else if(p)n=B;else if(l)n=d.dateFormat(l,B);else if(c&&1E3<=b)for(;c--&&void 0===n;)d=Math.pow(t,
c+1),b>=d&&0===10*B%d&&null!==g[c]&&0!==B&&(n=a.numberFormat(B/d,-1)+g[c]);void 0===n&&(n=1E4<=Math.abs(B)?a.numberFormat(B,-1):a.numberFormat(B,-1,void 0,""));return n},getSeriesExtremes:function(){var a=this,b=a.chart;c(this,"getSeriesExtremes",null,function(){a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();w(a.series,function(f){if(f.visible||!b.options.chart.ignoreHiddenSeries){var p=f.options,B=p.threshold,l;a.hasVisibleSeries=
!0;a.positiveValuesOnly&&0>=B&&(B=null);if(a.isXAxis)p=f.xData,p.length&&(f=u(p),l=F(p),d(f)||f instanceof Date||(p=q(p,d),f=u(p),l=F(p)),p.length&&(a.dataMin=Math.min(A(a.dataMin,p[0],f),f),a.dataMax=Math.max(A(a.dataMax,p[0],l),l)));else if(f.getExtremes(),l=f.dataMax,f=f.dataMin,x(f)&&x(l)&&(a.dataMin=Math.min(A(a.dataMin,f),f),a.dataMax=Math.max(A(a.dataMax,l),l)),x(B)&&(a.threshold=B),!p.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})});c(this,"afterGetSeriesExtremes")},translate:function(a,
b,l,p,t,g){var f=this.linkedParent||this,B=1,c=0,n=p?f.oldTransA:f.transA;p=p?f.oldMin:f.min;var z=f.minPixelPadding;t=(f.isOrdinal||f.isBroken||f.isLog&&t)&&f.lin2val;n||(n=f.transA);l&&(B*=-1,c=f.len);f.reversed&&(B*=-1,c-=B*(f.sector||f.len));b?(a=(a*B+c-z)/n+p,t&&(a=f.lin2val(a))):(t&&(a=f.val2lin(a)),a=d(p)?B*(a-p)*n+c+B*z+(d(g)?n*g:0):void 0);return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),
!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,l,p,t){var f=this.chart,B=this.left,g=this.top,c,n,z=l&&f.oldChartHeight||f.chartHeight,q=l&&f.oldChartWidth||f.chartWidth,H;c=this.transB;var h=function(a,b,f){if("pass"!==p&&a<b||a>f)p?a=Math.min(Math.max(b,a),f):H=!0;return a};t=A(t,this.translate(a,null,null,l));t=Math.min(Math.max(-1E5,t),1E5);a=l=Math.round(t+c);c=n=Math.round(z-t-c);d(t)?this.horiz?(c=g,n=z-this.bottom,a=l=h(a,B,B+this.width)):(a=B,l=q-this.right,c=n=h(c,g,g+this.height)):
(H=!0,p=!1);return H&&!p?null:f.renderer.crispLine(["M",a,c,"L",l,n],b||1)},getLinearTickPositions:function(a,b,l){var f,B=m(Math.floor(b/a)*a);l=m(Math.ceil(l/a)*a);var d=[],t;m(B+a)===B&&(t=20);if(this.single)return[b];for(b=B;b<=l;){d.push(b);b=m(b+a,t);if(b===f)break;f=b}return d},getMinorTickInterval:function(){var a=this.options;return!0===a.minorTicks?A(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval},getMinorTickPositions:function(){var a=this,b=a.options,l=a.tickPositions,
p=a.minorTickInterval,d=[],t=a.pointRangePadding||0,g=a.min-t,t=a.max+t,c=t-g;if(c&&c/p<a.len/3)if(a.isLog)w(this.paddedTicks,function(b,f,B){f&&d.push.apply(d,a.getLogTickPositions(p,B[f-1],B[f],!0))});else if(a.isDatetimeAxis&&"auto"===this.getMinorTickInterval())d=d.concat(a.getTimeTicks(a.normalizeTimeTickInterval(p),g,t,b.startOfWeek));else for(b=g+(l[0]-g)%p;b<=t&&b!==d[0];b+=p)d.push(b);0!==d.length&&a.trimTicks(d);return d},adjustForMinRange:function(){var a=this.options,b=this.min,d=this.max,
p,l,t,g,c,n,z,q;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(x(a.min)||x(a.max)?this.minRange=null:(w(this.series,function(a){n=a.xData;for(g=z=a.xIncrement?1:n.length-1;0<g;g--)if(c=n[g]-n[g-1],void 0===t||c<t)t=c}),this.minRange=Math.min(5*t,this.dataMax-this.dataMin)));d-b<this.minRange&&(l=this.dataMax-this.dataMin>=this.minRange,q=this.minRange,p=(q-d+b)/2,p=[b-p,A(a.min,b-p)],l&&(p[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),b=F(p),d=[b+q,A(a.max,b+q)],l&&(d[2]=this.isLog?
this.log2lin(this.dataMax):this.dataMax),d=u(d),d-b<q&&(p[0]=d-q,p[1]=A(a.min,d-q),b=F(p)));this.min=b;this.max=d},getClosest:function(){var a;this.categories?a=1:w(this.series,function(b){var f=b.closestPointRange,p=b.visible||!b.chart.options.chart.ignoreHiddenSeries;!b.noSharedTooltip&&x(f)&&p&&(a=x(a)?Math.min(a,f):f)});return a},nameToX:function(a){var f=n(this.categories),d=f?this.categories:this.names,p=a.options.x,l;a.series.requireSorting=!1;x(p)||(p=!1===this.options.uniqueNames?a.series.autoIncrement():
f?b(a.name,d):A(d.keys[a.name],-1));-1===p?f||(l=d.length):l=p;void 0!==l&&(this.names[l]=a.name,this.names.keys[a.name]=l);return l},updateNames:function(){var b=this,d=this.names;0<d.length&&(w(a.keys(d.keys),function(a){delete d.keys[a]}),d.length=0,this.minRange=this.userMinRange,w(this.series||[],function(a){a.xIncrement=null;if(!a.points||a.isDirtyData)a.processData(),a.generatePoints();w(a.points,function(f,d){var p;f.options&&(p=b.nameToX(f),void 0!==p&&p!==f.x&&(f.x=p,a.xData[d]=p))})}))},
setAxisTranslation:function(a){var b=this,f=b.max-b.min,p=b.axisPointRange||0,d,l=0,t=0,g=b.linkedParent,n=!!b.categories,z=b.transA,q=b.isXAxis;if(q||n||p)d=b.getClosest(),g?(l=g.minPointOffset,t=g.pointRangePadding):w(b.series,function(a){var f=n?1:q?A(a.options.pointRange,d,0):b.axisPointRange||0;a=a.options.pointPlacement;p=Math.max(p,f);b.single||(l=Math.max(l,E(a)?0:f/2),t=Math.max(t,"on"===a?0:f))}),g=b.ordinalSlope&&d?b.ordinalSlope/d:1,b.minPointOffset=l*=g,b.pointRangePadding=t*=g,b.pointRange=
Math.min(p,f),q&&(b.closestPointRange=d);a&&(b.oldTransA=z);b.translationSlope=b.transA=z=b.staticScale||b.len/(f+t||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=z*l;c(this,"afterSetAxisTranslation")},minFromRange:function(){return this.max-this.range},setTickInterval:function(b){var f=this,l=f.chart,p=f.options,t=f.isLog,g=f.isDatetimeAxis,n=f.isXAxis,z=f.isLinked,q=p.maxPadding,H=p.minPadding,J=p.tickInterval,k=p.tickPixelInterval,E=f.categories,e=d(f.threshold)?f.threshold:null,I=f.softThreshold,
r,v,u,y;g||E||z||this.getTickAmount();u=A(f.userMin,p.min);y=A(f.userMax,p.max);z?(f.linkedParent=l[f.coll][p.linkedTo],l=f.linkedParent.getExtremes(),f.min=A(l.min,l.dataMin),f.max=A(l.max,l.dataMax),p.type!==f.linkedParent.options.type&&a.error(11,1)):(!I&&x(e)&&(f.dataMin>=e?(r=e,H=0):f.dataMax<=e&&(v=e,q=0)),f.min=A(u,r,f.dataMin),f.max=A(y,v,f.dataMax));t&&(f.positiveValuesOnly&&!b&&0>=Math.min(f.min,A(f.dataMin,f.min))&&a.error(10,1),f.min=m(f.log2lin(f.min),15),f.max=m(f.log2lin(f.max),15));
f.range&&x(f.max)&&(f.userMin=f.min=u=Math.max(f.dataMin,f.minFromRange()),f.userMax=y=f.max,f.range=null);c(f,"foundExtremes");f.beforePadding&&f.beforePadding();f.adjustForMinRange();!(E||f.axisPointRange||f.usePercentage||z)&&x(f.min)&&x(f.max)&&(l=f.max-f.min)&&(!x(u)&&H&&(f.min-=l*H),!x(y)&&q&&(f.max+=l*q));d(p.softMin)&&!d(f.userMin)&&(f.min=Math.min(f.min,p.softMin));d(p.softMax)&&!d(f.userMax)&&(f.max=Math.max(f.max,p.softMax));d(p.floor)&&(f.min=Math.max(f.min,p.floor));d(p.ceiling)&&(f.max=
Math.min(f.max,p.ceiling));I&&x(f.dataMin)&&(e=e||0,!x(u)&&f.min<e&&f.dataMin>=e?f.min=e:!x(y)&&f.max>e&&f.dataMax<=e&&(f.max=e));f.tickInterval=f.min===f.max||void 0===f.min||void 0===f.max?1:z&&!J&&k===f.linkedParent.options.tickPixelInterval?J=f.linkedParent.tickInterval:A(J,this.tickAmount?(f.max-f.min)/Math.max(this.tickAmount-1,1):void 0,E?1:(f.max-f.min)*k/Math.max(f.len,k));n&&!b&&w(f.series,function(a){a.processData(f.min!==f.oldMin||f.max!==f.oldMax)});f.setAxisTranslation(!0);f.beforeSetTickPositions&&
f.beforeSetTickPositions();f.postProcessTickInterval&&(f.tickInterval=f.postProcessTickInterval(f.tickInterval));f.pointRange&&!J&&(f.tickInterval=Math.max(f.pointRange,f.tickInterval));b=A(p.minTickInterval,f.isDatetimeAxis&&f.closestPointRange);!J&&f.tickInterval<b&&(f.tickInterval=b);g||t||J||(f.tickInterval=G(f.tickInterval,null,h(f.tickInterval),A(p.allowDecimals,!(.5<f.tickInterval&&5>f.tickInterval&&1E3<f.max&&9999>f.max)),!!this.tickAmount));this.tickAmount||(f.tickInterval=f.unsquish());
this.setTickPositions()},setTickPositions:function(){var b=this.options,d,l=b.tickPositions;d=this.getMinorTickInterval();var p=b.tickPositioner,t=b.startOnTick,g=b.endOnTick;this.tickmarkOffset=this.categories&&"between"===b.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===d&&this.tickInterval?this.tickInterval/5:d;this.single=this.min===this.max&&x(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==b.allowDecimals);this.tickPositions=d=l&&l.slice();
!d&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(d=[this.min,this.max],a.error(19)):d=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,b.units),this.min,this.max,b.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),d.length>this.len&&(d=[d[0],d.pop()],d[0]===d[1]&&(d.length=
1)),this.tickPositions=d,p&&(p=p.apply(this,[this.min,this.max])))&&(this.tickPositions=d=p);this.paddedTicks=d.slice(0);this.trimTicks(d,t,g);this.isLinked||(this.single&&2>d.length&&(this.min-=.5,this.max+=.5),l||p||this.adjustTickAmount());c(this,"afterSetTickPositions")},trimTicks:function(a,b,d){var f=a[0],l=a[a.length-1],t=this.minPointOffset||0;if(!this.isLinked){if(b&&-Infinity!==f)this.min=f;else for(;this.min-t>a[0];)a.shift();if(d)this.max=l;else for(;this.max+t<a[a.length-1];)a.pop();
0===a.length&&x(f)&&!this.options.tickPositions&&a.push((l+f)/2)}},alignToOthers:function(){var a={},b,d=this.options;!1===this.chart.options.chart.alignTicks||!1===d.alignTicks||!1===d.startOnTick||!1===d.endOnTick||this.isLog||w(this.chart[this.coll],function(f){var p=f.options,p=[f.horiz?p.left:p.top,p.width,p.height,p.pane].join();f.series.length&&(a[p]?b=!0:a[p]=1)});return b},getTickAmount:function(){var a=this.options,b=a.tickAmount,d=a.tickPixelInterval;!x(a.tickInterval)&&this.len<d&&!this.isRadial&&
!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&(b=Math.ceil(this.len/d)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,d=this.tickAmount,p=this.finalTickAmt,l=b&&b.length,t=A(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(l<d){for(;b.length<d;)b.length%2||this.min===t?b.push(m(b[b.length-1]+a)):b.unshift(m(b[0]-a));this.transA*=(l-1)/(d-1);this.min=b[0];this.max=b[b.length-1]}else l>
d&&(this.tickInterval*=2,this.setTickPositions());if(x(p)){for(a=d=b.length;a--;)(3===p&&1===a%2||2>=p&&0<a&&a<d-1)&&b.splice(a,1);this.finalTickAmt=void 0}}},setScale:function(){var a,b;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();b=this.len!==this.oldAxisLength;w(this.series,function(b){if(b.isDirtyData||b.isDirty||b.xAxis.isDirty)a=!0});b||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?
(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=b||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks();c(this,"afterSetScale")},setExtremes:function(a,b,d,p,l){var f=this,t=f.chart;d=A(d,!0);w(f.series,function(a){delete a.kdTree});l=r(l,{min:a,max:b});c(f,"setExtremes",l,function(){f.userMin=a;f.userMax=b;f.eventArgs=l;d&&
t.redraw(p)})},zoom:function(a,b){var f=this.dataMin,p=this.dataMax,d=this.options,l=Math.min(f,A(d.min,f)),d=Math.max(p,A(d.max,p));if(a!==this.min||b!==this.max)this.allowZoomOutside||(x(f)&&(a<l&&(a=l),a>d&&(a=d)),x(p)&&(b<l&&(b=l),b>d&&(b=d))),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var b=this.chart,d=this.options,l=d.offsets||[0,0,0,0],p=this.horiz,t=this.width=Math.round(a.relativeLength(A(d.width,b.plotWidth-l[3]+
l[1]),b.plotWidth)),g=this.height=Math.round(a.relativeLength(A(d.height,b.plotHeight-l[0]+l[2]),b.plotHeight)),c=this.top=Math.round(a.relativeLength(A(d.top,b.plotTop+l[0]),b.plotHeight,b.plotTop)),d=this.left=Math.round(a.relativeLength(A(d.left,b.plotLeft+l[3]),b.plotWidth,b.plotLeft));this.bottom=b.chartHeight-g-c;this.right=b.chartWidth-t-d;this.len=Math.max(p?t:g,0);this.pos=p?d:c},getExtremes:function(){var a=this.isLog;return{min:a?m(this.lin2log(this.min)):this.min,max:a?m(this.lin2log(this.max)):
this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,f=b?this.lin2log(this.min):this.min,b=b?this.lin2log(this.max):this.max;null===a||-Infinity===a?a=f:Infinity===a?a=b:f>a?a=f:b<a&&(a=b);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a=(A(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var b=this.options,f=b[a+"Length"],p=A(b[a+"Width"],"tick"===
a&&this.isXAxis?1:0);if(p&&f)return"inside"===b[a+"Position"]&&(f=-f),[f,p]},labelMetrics:function(){var a=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,d=this.tickInterval,p=d,l=this.len/(((this.categories?1:0)+this.max-this.min)/d),t,g=a.rotation,c=this.labelMetrics(),n,z=Number.MAX_VALUE,q,H=function(a){a/=
l||1;a=1<a?Math.ceil(a):1;return m(a*d)};b?(q=!a.staggerLines&&!a.step&&(x(g)?[g]:l<A(a.autoRotationLimit,80)&&a.autoRotation))&&w(q,function(a){var b;if(a===g||a&&-90<=a&&90>=a)n=H(Math.abs(c.h/Math.sin(y*a))),b=n+Math.abs(a/360),b<z&&(z=b,t=a,p=n)}):a.step||(p=H(c.h));this.autoRotation=q;this.labelRotation=A(t,g);return p},getSlotWidth:function(a){var b=this.chart,f=this.horiz,p=this.options.labels,d=Math.max(this.tickPositions.length-(this.categories?0:1),1),l=b.margin[3];return a&&a.slotWidth||
f&&2>(p.step||0)&&!p.rotation&&(this.staggerLines||1)*this.len/d||!f&&(p.style&&parseInt(p.style.width,10)||l&&l-b.spacing[3]||.33*b.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,d=this.tickPositions,p=this.ticks,l=this.options.labels,t=l&&l.style||{},g=this.horiz,c=this.getSlotWidth(),n=Math.max(1,Math.round(c-2*(l.padding||5))),z={},q=this.labelMetrics(),H=l.style&&l.style.textOverflow,h,J,k=0,e;E(l.rotation)||(z.rotation=l.rotation||0);w(d,function(a){(a=p[a])&&a.label&&
a.label.textPxLength>k&&(k=a.label.textPxLength)});this.maxLabelLength=k;if(this.autoRotation)k>n&&k>q.h?z.rotation=this.labelRotation:this.labelRotation=0;else if(c&&(h=n,!H))for(J="clip",n=d.length;!g&&n--;)if(e=d[n],e=p[e].label)e.styles&&"ellipsis"===e.styles.textOverflow?e.css({textOverflow:"clip"}):e.textPxLength>c&&e.css({width:c+"px"}),e.getBBox().height>this.len/d.length-(q.h-q.f)&&(e.specificTextOverflow="ellipsis");z.rotation&&(h=k>.5*a.chartHeight?.33*a.chartHeight:k,H||(J="ellipsis"));
if(this.labelAlign=l.align||this.autoLabelAlign(this.labelRotation))z.align=this.labelAlign;w(d,function(a){var b=(a=p[a])&&a.label,f=t.width,d={};b&&(b.attr(z),a.shortenLabel?a.shortenLabel():h&&!f&&"nowrap"!==t.whiteSpace&&(h<b.textPxLength||"SPAN"===b.element.tagName)?(d.width=h,H||(d.textOverflow=b.specificTextOverflow||J),b.css(d)):b.styles&&b.styles.width&&!d.width&&!f&&b.css({width:null}),delete b.specificTextOverflow,a.rotation=z.rotation)},this);this.tickRotCorr=b.rotCorr(q.b,this.labelRotation||
0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||x(this.min)&&x(this.max)&&this.tickPositions&&0<this.tickPositions.length},addTitle:function(a){var b=this.chart.renderer,f=this.horiz,p=this.opposite,d=this.options.title,l;this.axisTitle||((l=d.textAlign)||(l=(f?{low:"left",middle:"center",high:"right"}:{low:p?"right":"left",middle:"center",high:p?"left":"right"})[d.align]),this.axisTitle=b.text(d.text,0,0,d.useHTML).attr({zIndex:7,rotation:d.rotation||0,align:l}).addClass("highcharts-axis-title").add(this.axisGroup),
this.axisTitle.isNew=!0);this.axisTitle.css({width:this.len});this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var b=this.ticks;b[a]?b[a].addLabel():b[a]=new l(this,a)},getOffset:function(){var a=this,b=a.chart,d=b.renderer,p=a.options,l=a.tickPositions,t=a.ticks,g=a.horiz,n=a.side,z=b.inverted&&!a.isZAxis?[1,0,3,2][n]:n,q,H,h=0,J,k=0,E=p.title,e=p.labels,G=0,r=b.axisOffset,b=b.clipOffset,m=[-1,1,1,-1][n],v=p.className,u=a.axisParent;q=a.hasData();a.showAxis=H=q||A(p.showEmpty,!0);a.staggerLines=
a.horiz&&e.staggerLines;a.axisGroup||(a.gridGroup=d.g("grid").attr({zIndex:p.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(v||"")).add(u),a.axisGroup=d.g("axis").attr({zIndex:p.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(v||"")).add(u),a.labelGroup=d.g("axis-labels").attr({zIndex:e.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(v||"")).add(u));q||a.isLinked?(w(l,function(b,f){a.generateTick(b,f)}),a.renderUnsquish(),a.reserveSpaceDefault=
0===n||2===n||{1:"left",3:"right"}[n]===a.labelAlign,A(e.reserveSpace,"center"===a.labelAlign?!0:null,a.reserveSpaceDefault)&&w(l,function(a){G=Math.max(t[a].getLabelSize(),G)}),a.staggerLines&&(G*=a.staggerLines),a.labelOffset=G*(a.opposite?-1:1)):I(t,function(a,b){a.destroy();delete t[b]});E&&E.text&&!1!==E.enabled&&(a.addTitle(H),H&&!1!==E.reserveSpace&&(a.titleOffset=h=a.axisTitle.getBBox()[g?"height":"width"],J=E.offset,k=x(J)?0:A(E.margin,g?5:10)));a.renderLine();a.offset=m*A(p.offset,r[n]);
a.tickRotCorr=a.tickRotCorr||{x:0,y:0};d=0===n?-a.labelMetrics().h:2===n?a.tickRotCorr.y:0;k=Math.abs(G)+k;G&&(k=k-d+m*(g?A(e.y,a.tickRotCorr.y+8*m):e.x));a.axisTitleMargin=A(J,k);a.getMaxLabelDimensions&&(a.maxLabelDimensions=a.getMaxLabelDimensions(t,l));g=this.tickSize("tick");r[n]=Math.max(r[n],a.axisTitleMargin+h+m*a.offset,k,q&&l.length&&g?g[0]+m*a.offset:0);p=p.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);b[z]=Math.max(b[z],p);c(this,"afterGetOffset")},getLinePath:function(a){var b=this.chart,
f=this.opposite,p=this.offset,d=this.horiz,l=this.left+(f?this.width:0)+p,p=b.chartHeight-this.bottom-(f?this.height:0)+p;f&&(a*=-1);return b.renderer.crispLine(["M",d?this.left:l,d?p:this.top,"L",d?b.chartWidth-this.right:l,d?p:b.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup))},getTitlePosition:function(){var a=this.horiz,b=this.left,d=this.top,p=this.len,l=this.options.title,t=a?b:d,
g=this.opposite,n=this.offset,c=l.x||0,z=l.y||0,q=this.axisTitle,H=this.chart.renderer.fontMetrics(l.style&&l.style.fontSize,q),q=Math.max(q.getBBox(null,0).height-H.h-1,0),p={low:t+(a?0:p),middle:t+p/2,high:t+(a?p:0)}[l.align],b=(a?d+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+[-q,q,H.f,-q][this.side];return{x:a?p+c:b+(g?this.width:0)+n+c,y:a?b+z-(g?this.height:0)+n:p+z}},renderMinorTick:function(a){var b=this.chart.hasRendered&&d(this.oldMin),f=this.minorTicks;f[a]||(f[a]=new l(this,a,
"minor"));b&&f[a].isNew&&f[a].render(null,!0);f[a].render(null,!1,1)},renderTick:function(a,b){var f=this.isLinked,p=this.ticks,t=this.chart.hasRendered&&d(this.oldMin);if(!f||a>=this.min&&a<=this.max)p[a]||(p[a]=new l(this,a)),t&&p[a].isNew&&p[a].render(b,!0,-1),p[a].render(b)},render:function(){var b=this,t=b.chart,g=b.options,p=b.isLog,n=b.isLinked,z=b.tickPositions,q=b.axisTitle,H=b.ticks,h=b.minorTicks,k=b.alternateBands,E=g.stackLabels,e=g.alternateGridColor,A=b.tickmarkOffset,G=b.axisLine,
r=b.showAxis,m=D(t.renderer.globalAnimation),x,v;b.labelEdge.length=0;b.overlap=!1;w([H,h,k],function(a){I(a,function(a){a.isActive=!1})});if(b.hasData()||n)b.minorTickInterval&&!b.categories&&w(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),z.length&&(w(z,function(a,p){b.renderTick(a,p)}),A&&(0===b.min||b.single)&&(H[-1]||(H[-1]=new l(b,-1,null,!0)),H[-1].render(-1))),e&&w(z,function(d,f){v=void 0!==z[f+1]?z[f+1]+A:b.max-A;0===f%2&&d<b.max&&v<=b.max+(t.polar?-A:A)&&(k[d]||(k[d]=new a.PlotLineOrBand(b)),
x=d+A,k[d].options={from:p?b.lin2log(x):x,to:p?b.lin2log(v):v,color:e},k[d].render(),k[d].isActive=!0)}),b._addedPlotLB||(w((g.plotLines||[]).concat(g.plotBands||[]),function(a){b.addPlotBandOrLine(a)}),b._addedPlotLB=!0);w([H,h,k],function(a){var b,p=[],d=m.duration;I(a,function(a,b){a.isActive||(a.render(b,!1,0),a.isActive=!1,p.push(b))});J(function(){for(b=p.length;b--;)a[p[b]]&&!a[p[b]].isActive&&(a[p[b]].destroy(),delete a[p[b]])},a!==k&&t.hasRendered&&d?d:0)});G&&(G[G.isPlaced?"animate":"attr"]({d:this.getLinePath(G.strokeWidth())}),
G.isPlaced=!0,G[r?"show":"hide"](!0));q&&r&&(g=b.getTitlePosition(),d(g.y)?(q[q.isNew?"attr":"animate"](g),q.isNew=!1):(q.attr("y",-9999),q.isNew=!0));E&&E.enabled&&b.renderStackTotals();b.isDirty=!1;c(this,"afterRender")},redraw:function(){this.visible&&(this.render(),w(this.plotLinesAndBands,function(a){a.render()}));w(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var d=this,f=d.stacks,p=d.plotLinesAndBands,l;c(this,
"destroy",{keepEvents:a});a||t(d);I(f,function(a,b){v(a);f[b]=null});w([d.ticks,d.minorTicks,d.alternateBands],function(a){v(a)});if(p)for(a=p.length;a--;)p[a].destroy();w("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" "),function(a){d[a]&&(d[a]=d[a].destroy())});for(l in d.plotLinesAndBandsGroups)d.plotLinesAndBandsGroups[l]=d.plotLinesAndBandsGroups[l].destroy();I(d,function(a,p){-1===b(p,d.keepProps)&&delete d[p]})},drawCrosshair:function(a,b){var d,
p=this.crosshair,f=A(p.snap,!0),l,t=this.cross;c(this,"drawCrosshair",{e:a,point:b});a||(a=this.cross&&this.cross.e);if(this.crosshair&&!1!==(x(b)||!f)){f?x(b)&&(l=A(b.crosshairPos,this.isXAxis?b.plotX:this.len-b.plotY)):l=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos);x(l)&&(d=this.getPlotLinePath(b&&(this.isXAxis?b.x:A(b.stackY,b.y)),null,null,null,l)||null);if(!x(d)){this.hideCrosshair();return}f=this.categories&&!this.isRadial;t||(this.cross=t=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+
(f?"category ":"thin ")+p.className).attr({zIndex:A(p.zIndex,2)}).add());t.show().attr({d:d});f&&!p.width&&t.attr({"stroke-width":this.transA});this.cross.e=a}else this.hideCrosshair();c(this,"afterDrawCrosshair",{e:a,point:b})},hideCrosshair:function(){this.cross&&this.cross.hide()}});return a.Axis=H}(K);(function(a){var C=a.Axis,D=a.getMagnitude,F=a.normalizeTickInterval,u=a.timeUnits;C.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)};C.prototype.normalizeTimeTickInterval=
function(a,e){var m=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];e=m[m.length-1];var y=u[e[0]],v=e[1],w;for(w=0;w<m.length&&!(e=m[w],y=u[e[0]],v=e[1],m[w+1]&&a<=(y*v[v.length-1]+u[m[w+1][0]])/2);w++);y===u.year&&a<5*y&&(v=[1,2,5]);a=F(a/y,v,"year"===e[0]?Math.max(D(a/y),1):1);return{unitRange:y,count:a,unitName:e[0]}}})(K);(function(a){var C=a.Axis,
D=a.getMagnitude,F=a.map,u=a.normalizeTickInterval,m=a.pick;C.prototype.getLogTickPositions=function(a,x,y,v){var e=this.options,r=this.len,c=[];v||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),c=this.getLinearTickPositions(a,x,y);else if(.08<=a)for(var r=Math.floor(x),k,h,q,b,n,e=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];r<y+1&&!n;r++)for(h=e.length,k=0;k<h&&!n;k++)q=this.log2lin(this.lin2log(r)*e[k]),q>x&&(!v||b<=y)&&void 0!==b&&c.push(b),b>y&&(n=!0),b=q;else x=this.lin2log(x),
y=this.lin2log(y),a=v?this.getMinorTickInterval():e.tickInterval,a=m("auto"===a?null:a,this._minorAutoInterval,e.tickPixelInterval/(v?5:1)*(y-x)/((v?r/this.tickPositions.length:r)||1)),a=u(a,null,D(a)),c=F(this.getLinearTickPositions(a,x,y),this.log2lin),v||(this._minorAutoInterval=a/5);v||(this.tickInterval=a);return c};C.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};C.prototype.lin2log=function(a){return Math.pow(10,a)}})(K);(function(a,C){var D=a.arrayMax,F=a.arrayMin,u=a.defined,
m=a.destroyObjectProperties,e=a.each,x=a.erase,y=a.merge,v=a.pick;a.PlotLineOrBand=function(a,e){this.axis=a;e&&(this.options=e,this.id=e.id)};a.PlotLineOrBand.prototype={render:function(){a.fireEvent(this,"render");var e=this,r=e.axis,c=r.horiz,k=e.options,h=k.label,q=e.label,b=k.to,n=k.from,d=k.value,E=u(n)&&u(b),g=u(d),G=e.svgElem,I=!G,A=[],t=v(k.zIndex,0),z=k.events,A={"class":"highcharts-plot-"+(E?"band ":"line ")+(k.className||"")},J={},l=r.chart.renderer,H=E?"bands":"lines",f;r.isLog&&(n=r.log2lin(n),
b=r.log2lin(b),d=r.log2lin(d));J.zIndex=t;H+="-"+t;(f=r.plotLinesAndBandsGroups[H])||(r.plotLinesAndBandsGroups[H]=f=l.g("plot-"+H).attr(J).add());I&&(e.svgElem=G=l.path().attr(A).add(f));if(g)A=r.getPlotLinePath(d,G.strokeWidth());else if(E)A=r.getPlotBandPath(n,b,k);else return;I&&A&&A.length?(G.attr({d:A}),z&&a.objectEach(z,function(a,b){G.on(b,function(a){z[b].apply(e,[a])})})):G&&(A?(G.show(),G.animate({d:A})):(G.hide(),q&&(e.label=q=q.destroy())));h&&u(h.text)&&A&&A.length&&0<r.width&&0<r.height&&
!A.isFlat?(h=y({align:c&&E&&"center",x:c?!E&&4:10,verticalAlign:!c&&E&&"middle",y:c?E?16:10:E?6:-4,rotation:c&&!E&&90},h),this.renderLabel(h,A,E,t)):q&&q.hide();return e},renderLabel:function(a,e,c,k){var h=this.label,q=this.axis.chart.renderer;h||(h={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(c?"band":"line")+"-label "+(a.className||"")},h.zIndex=k,this.label=h=q.text(a.text,0,0,a.useHTML).attr(h).add());k=e.xBounds||[e[1],e[4],c?e[6]:e[1]];e=e.yBounds||[e[2],e[5],
c?e[7]:e[2]];c=F(k);q=F(e);h.align(a,!1,{x:c,y:q,width:D(k)-c,height:D(e)-q});h.show()},destroy:function(){x(this.axis.plotLinesAndBands,this);delete this.axis;m(this)}};a.extend(C.prototype,{getPlotBandPath:function(a,e){var c=this.getPlotLinePath(e,null,null,!0),k=this.getPlotLinePath(a,null,null,!0),h=[],q=this.horiz,b=1,n;a=a<this.min&&e<this.min||a>this.max&&e>this.max;if(k&&c)for(a&&(n=k.toString()===c.toString(),b=0),a=0;a<k.length;a+=6)q&&c[a+1]===k[a+1]?(c[a+1]+=b,c[a+4]+=b):q||c[a+2]!==
k[a+2]||(c[a+2]+=b,c[a+5]+=b),h.push("M",k[a+1],k[a+2],"L",k[a+4],k[a+5],c[a+4],c[a+5],c[a+1],c[a+2],"z"),h.isFlat=n;return h},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(e,r){var c=(new a.PlotLineOrBand(this,e)).render(),k=this.userOptions;c&&(r&&(k[r]=k[r]||[],k[r].push(e)),this.plotLinesAndBands.push(c));return c},removePlotBandOrLine:function(a){for(var r=this.plotLinesAndBands,
c=this.options,k=this.userOptions,h=r.length;h--;)r[h].id===a&&r[h].destroy();e([c.plotLines||[],k.plotLines||[],c.plotBands||[],k.plotBands||[]],function(c){for(h=c.length;h--;)c[h].id===a&&x(c,c[h])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(K,Z);(function(a){var C=a.doc,D=a.each,F=a.extend,u=a.format,m=a.isNumber,e=a.map,x=a.merge,y=a.pick,v=a.splat,w=a.syncTimeout,r=a.timeUnits;a.Tooltip=function(){this.init.apply(this,
arguments)};a.Tooltip.prototype={init:function(a,k){this.chart=a;this.options=k;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=k.split&&!a.inverted;this.shared=k.shared||this.split;this.outside=k.outside&&!this.split},cleanSplit:function(a){D(this.chart.series,function(c){var h=c&&c.tt;h&&(!h.isActive||a?c.tt=h.destroy():h.isActive=!1)})},applyFilter:function(){var a=this.chart;a.renderer.definition({tagName:"filter",id:"drop-shadow-"+a.index,opacity:.5,children:[{tagName:"feGaussianBlur",
in:"SourceAlpha",stdDeviation:1},{tagName:"feOffset",dx:1,dy:1},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",type:"linear",slope:.3}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",in:"SourceGraphic"}]}]});a.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+a.index+"{filter:url(#drop-shadow-"+a.index+")}"})},getLabel:function(){var c=this.chart.renderer,k=this.options,h;this.label||(this.outside&&(this.container=h=a.doc.createElement("div"),
h.className="highcharts-tooltip-container",a.css(h,{position:"absolute",top:"1px",pointerEvents:k.style&&k.style.pointerEvents}),a.doc.body.appendChild(h),this.renderer=c=new a.Renderer(h,0,0)),this.label=this.split?c.g("tooltip"):c.label("",0,0,k.shape||"callout",null,null,k.useHTML,null,"tooltip").attr({padding:k.padding,r:k.borderRadius}),this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index),this.outside&&(this.label.attr({x:this.distance,y:this.distance}),this.label.xSetter=
function(a){h.style.left=a+"px"},this.label.ySetter=function(a){h.style.top=a+"px"}),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();x(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,x(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());this.renderer&&(this.renderer=this.renderer.destroy(),a.discardElement(this.container));a.clearTimeout(this.hideTimer);
a.clearTimeout(this.tooltipTimeout)},move:function(c,k,h,q){var b=this,n=b.now,d=!1!==b.options.animation&&!b.isHidden&&(1<Math.abs(c-n.x)||1<Math.abs(k-n.y)),e=b.followPointer||1<b.len;F(n,{x:d?(2*n.x+c)/3:c,y:d?(n.y+k)/2:k,anchorX:e?void 0:d?(2*n.anchorX+h)/3:h,anchorY:e?void 0:d?(n.anchorY+q)/2:q});b.getLabel().attr(n);d&&(a.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){b&&b.move(c,k,h,q)},32))},hide:function(c){var k=this;a.clearTimeout(this.hideTimer);c=y(c,this.options.hideDelay,
500);this.isHidden||(this.hideTimer=w(function(){k.getLabel()[c?"fadeOut":"hide"]();k.isHidden=!0},c))},getAnchor:function(a,k){var c=this.chart,q=c.pointer,b=c.inverted,n=c.plotTop,d=c.plotLeft,E=0,g=0,G,I;a=v(a);this.followPointer&&k?(void 0===k.chartX&&(k=q.normalize(k)),a=[k.chartX-c.plotLeft,k.chartY-n]):a[0].tooltipPos?a=a[0].tooltipPos:(D(a,function(a){G=a.series.yAxis;I=a.series.xAxis;E+=a.plotX+(!b&&I?I.left-d:0);g+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!b&&G?G.top-n:0)}),E/=a.length,
g/=a.length,a=[b?c.plotWidth-g:E,this.shared&&!b&&1<a.length&&k?k.chartY-n:b?c.plotHeight-E:g]);return e(a,Math.round)},getPosition:function(a,k,h){var c=this.chart,b=this.distance,n={},d=c.inverted&&h.h||0,e,g=this.outside,G=g?C.documentElement.clientWidth-2*b:c.chartWidth,I=g?Math.max(C.body.scrollHeight,C.documentElement.scrollHeight,C.body.offsetHeight,C.documentElement.offsetHeight,C.documentElement.clientHeight):c.chartHeight,A=c.pointer.chartPosition,t=["y",I,k,(g?A.top-b:0)+h.plotY+c.plotTop,
g?0:c.plotTop,g?I:c.plotTop+c.plotHeight],z=["x",G,a,(g?A.left-b:0)+h.plotX+c.plotLeft,g?0:c.plotLeft,g?G:c.plotLeft+c.plotWidth],J=!this.followPointer&&y(h.ttBelow,!c.inverted===!!h.negative),l=function(a,p,f,l,t,g){var c=f<l-b,z=l+b+f<p,H=l-b-f;l+=b;if(J&&z)n[a]=l;else if(!J&&c)n[a]=H;else if(c)n[a]=Math.min(g-f,0>H-d?H:H-d);else if(z)n[a]=Math.max(t,l+d+f>p?l:l+d);else return!1},H=function(a,d,f,l){var p;l<b||l>d-b?p=!1:n[a]=l<f/2?1:l>d-f/2?d-f-2:l-f/2;return p},f=function(a){var b=t;t=z;z=b;e=
a},B=function(){!1!==l.apply(0,t)?!1!==H.apply(0,z)||e||(f(!0),B()):e?n.x=n.y=0:(f(!0),B())};(c.inverted||1<this.len)&&f();B();return n},defaultFormatter:function(a){var c=this.points||v(this),h;h=[a.tooltipFooterHeaderFormatter(c[0])];h=h.concat(a.bodyFormatter(c));h.push(a.tooltipFooterHeaderFormatter(c[0],!0));return h},refresh:function(c,k){var h,q=this.options,b=c,n,d={},e=[];h=q.formatter||this.defaultFormatter;var d=this.shared,g;q.enabled&&(a.clearTimeout(this.hideTimer),this.followPointer=
v(b)[0].series.tooltipOptions.followPointer,n=this.getAnchor(b,k),k=n[0],q=n[1],!d||b.series&&b.series.noSharedTooltip?d=b.getLabelConfig():(D(b,function(a){a.setState("hover");e.push(a.getLabelConfig())}),d={x:b[0].category,y:b[0].y},d.points=e,b=b[0]),this.len=e.length,d=h.call(d,this),g=b.series,this.distance=y(g.tooltipOptions.distance,16),!1===d?this.hide():(h=this.getLabel(),this.isHidden&&h.attr({opacity:1}).show(),this.split?this.renderSplit(d,v(c)):(h.css({width:this.chart.spacingBox.width}),
h.attr({text:d&&d.join?d.join(""):d}),h.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+y(b.colorIndex,g.colorIndex)),this.updatePosition({plotX:k,plotY:q,negative:b.negative,ttBelow:b.ttBelow,h:n[2]||0})),this.isHidden=!1))},renderSplit:function(c,k){var h=this,q=[],b=this.chart,n=b.renderer,d=!0,e=this.options,g=0,G,I=this.getLabel(),A=b.plotTop;a.isString(c)&&(c=[!1,c]);D(c.slice(0,k.length+1),function(a,c){if(!1!==a){c=k[c-1]||{isHeader:!0,plotX:k[0].plotX};var t=c.series||
h,l=t.tt,z="highcharts-color-"+y(c.colorIndex,(c.series||{}).colorIndex,"none");l||(t.tt=l=n.label(null,null,null,"callout",null,null,e.useHTML).addClass("highcharts-tooltip-box "+z+(c.isHeader?" highcharts-tooltip-header":"")).attr({padding:e.padding,r:e.borderRadius}).add(I));l.isActive=!0;l.attr({text:a});a=l.getBBox();z=a.width+l.strokeWidth();c.isHeader?(g=a.height,b.xAxis[0].opposite&&(G=!0,A-=g),z=Math.max(0,Math.min(c.plotX+b.plotLeft-z/2,b.chartWidth+(b.scrollablePixels?b.scrollablePixels-
b.marginRight:0)-z))):z=c.plotX+b.plotLeft-y(e.distance,16)-z;0>z&&(d=!1);a=(c.series&&c.series.yAxis&&c.series.yAxis.pos)+(c.plotY||0);a-=A;c.isHeader&&(a=G?-g:b.plotHeight+g);q.push({target:a,rank:c.isHeader?1:0,size:t.tt.getBBox().height+1,point:c,x:z,tt:l})}});this.cleanSplit();a.distribute(q,b.plotHeight+g);D(q,function(a){var t=a.point,g=t.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:d||t.isHeader?a.x:t.plotX+b.plotLeft+y(e.distance,16),y:a.pos+A,anchorX:t.isHeader?t.plotX+
b.plotLeft:t.plotX+g.xAxis.pos,anchorY:t.isHeader?b.plotTop+b.plotHeight/2:t.plotY+g.yAxis.pos})})},updatePosition:function(a){var c=this.chart,h=this.getLabel(),q=(this.options.positioner||this.getPosition).call(this,h.width,h.height,a),b=a.plotX+c.plotLeft;a=a.plotY+c.plotTop;var n;this.outside&&(n=(this.options.borderWidth||0)+2*this.distance,this.renderer.setSize(h.width+n,h.height+n,!1),b+=c.pointer.chartPosition.left-q.x,a+=c.pointer.chartPosition.top-q.y);this.move(Math.round(q.x),Math.round(q.y||
0),b,a)},getDateFormat:function(a,e,h,q){var b=this.chart.time,c=b.dateFormat("%m-%d %H:%M:%S.%L",e),d,k,g={millisecond:15,second:12,minute:9,hour:6,day:3},G="millisecond";for(k in r){if(a===r.week&&+b.dateFormat("%w",e)===h&&"00:00:00.000"===c.substr(6)){k="week";break}if(r[k]>a){k=G;break}if(g[k]&&c.substr(g[k])!=="01-01 00:00:00.000".substr(g[k]))break;"week"!==k&&(G=k)}k&&(d=b.resolveDTLFormat(q[k]).main);return d},getXDateFormat:function(a,k,h){k=k.dateTimeLabelFormats;var c=h&&h.closestPointRange;
return(c?this.getDateFormat(c,a.x,h.options.startOfWeek,k):k.day)||k.year},tooltipFooterHeaderFormatter:function(a,k){k=k?"footer":"header";var c=a.series,q=c.tooltipOptions,b=q.xDateFormat,n=c.xAxis,d=n&&"datetime"===n.options.type&&m(a.key),e=q[k+"Format"];d&&!b&&(b=this.getXDateFormat(a,q,n));d&&b&&D(a.point&&a.point.tooltipDateKeys||["key"],function(a){e=e.replace("{point."+a+"}","{point."+a+":"+b+"}")});return u(e,{point:a,series:c},this.chart.time)},bodyFormatter:function(a){return e(a,function(a){var c=
a.series.tooltipOptions;return(c[(a.point.formatPrefix||"point")+"Formatter"]||a.point.tooltipFormatter).call(a.point,c[(a.point.formatPrefix||"point")+"Format"])})}}})(K);(function(a){var C=a.addEvent,D=a.attr,F=a.charts,u=a.css,m=a.defined,e=a.each,x=a.extend,y=a.find,v=a.fireEvent,w=a.isNumber,r=a.isObject,c=a.offset,k=a.pick,h=a.splat,q=a.Tooltip;a.Pointer=function(a,c){this.init(a,c)};a.Pointer.prototype={init:function(a,c){this.options=c;this.chart=a;this.runChartClick=c.chart.events&&!!c.chart.events.click;
this.pinchDown=[];this.lastValidTouch={};q&&(a.tooltip=new q(a,c.tooltip),this.followTouchMove=k(c.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,d=b.options.chart,c=d.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(c=k(d.pinchType,c));this.zoomX=a=/x/.test(c);this.zoomY=c=/y/.test(c);this.zoomHor=a&&!b||c&&b;this.zoomVert=c&&!b||a&&b;this.hasZoom=a||c},normalize:function(a,n){var b;b=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;n||
(this.chartPosition=n=c(this.chart.container));return x(a,{chartX:Math.round(b.pageX-n.left),chartY:Math.round(b.pageY-n.top)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};e(this.chart.axes,function(d){b[d.isXAxis?"xAxis":"yAxis"].push({axis:d,value:d.toValue(a[d.horiz?"chartX":"chartY"])})});return b},findNearestKDPoint:function(a,c,d){var b;e(a,function(a){var g=!(a.noSharedTooltip&&c)&&0>a.options.findNearestPointBy.indexOf("y");a=a.searchPoint(d,g);if((g=r(a,!0))&&!(g=!r(b,!0)))var g=
b.distX-a.distX,n=b.dist-a.dist,q=(a.series.group&&a.series.group.zIndex)-(b.series.group&&b.series.group.zIndex),g=0<(0!==g&&c?g:0!==n?n:0!==q?q:b.series.index>a.series.index?-1:1);g&&(b=a)});return b},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,c){var b=a.series,n=b.xAxis,b=b.yAxis,g=k(a.clientX,a.plotX),q=a.shapeArgs;if(n&&b)return c?{chartX:n.len+n.pos-g,chartY:b.len+b.pos-a.plotY}:{chartX:g+n.pos,chartY:a.plotY+
b.pos};if(q&&q.x&&q.y)return{chartX:q.x,chartY:q.y}},getHoverData:function(b,c,d,q,g,h,I){var n,t=[],z=I&&I.isBoosting;q=!(!q||!b);I=c&&!c.stickyTracking?[c]:a.grep(d,function(a){return a.visible&&!(!g&&a.directTouch)&&k(a.options.enableMouseTracking,!0)&&a.stickyTracking});c=(n=q?b:this.findNearestKDPoint(I,g,h))&&n.series;n&&(g&&!c.noSharedTooltip?(I=a.grep(d,function(a){return a.visible&&!(!g&&a.directTouch)&&k(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),e(I,function(a){var b=y(a.points,
function(a){return a.x===n.x&&!a.isNull});r(b)&&(z&&(b=a.getPoint(b)),t.push(b))})):t.push(n));return{hoverPoint:n,hoverSeries:c,hoverPoints:t}},runPointActions:function(b,c){var d=this.chart,n=d.tooltip&&d.tooltip.options.enabled?d.tooltip:void 0,g=n?n.shared:!1,q=c||d.hoverPoint,h=q&&q.series||d.hoverSeries,h=this.getHoverData(q,h,d.series,"touchmove"!==b.type&&(!!c||h&&h.directTouch&&this.isDirectTouch),g,b,{isBoosting:d.isBoosting}),A,q=h.hoverPoint;A=h.hoverPoints;c=(h=h.hoverSeries)&&h.tooltipOptions.followPointer;
g=g&&h&&!h.noSharedTooltip;if(q&&(q!==d.hoverPoint||n&&n.isHidden)){e(d.hoverPoints||[],function(b){-1===a.inArray(b,A)&&b.setState()});e(A||[],function(a){a.setState("hover")});if(d.hoverSeries!==h)h.onMouseOver();d.hoverPoint&&d.hoverPoint.firePointEvent("mouseOut");if(!q.series)return;q.firePointEvent("mouseOver");d.hoverPoints=A;d.hoverPoint=q;n&&n.refresh(g?A:q,b)}else c&&n&&!n.isHidden&&(q=n.getAnchor([{}],b),n.updatePosition({plotX:q[0],plotY:q[1]}));this.unDocMouseMove||(this.unDocMouseMove=
C(d.container.ownerDocument,"mousemove",function(b){var d=F[a.hoverChartIndex];if(d)d.pointer.onDocumentMouseMove(b)}));e(d.axes,function(d){var t=k(d.crosshair.snap,!0),g=t?a.find(A,function(a){return a.series[d.coll]===d}):void 0;g||!t?d.drawCrosshair(b,g):d.hideCrosshair()})},reset:function(a,c){var b=this.chart,n=b.hoverSeries,g=b.hoverPoint,q=b.hoverPoints,k=b.tooltip,A=k&&k.shared?q:g;a&&A&&e(h(A),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)k&&A&&(k.refresh(A),k.shared&&
q?e(q,function(a){a.setState(a.state,!0);a.series.isCartesian&&(a.series.xAxis.crosshair&&a.series.xAxis.drawCrosshair(null,a),a.series.yAxis.crosshair&&a.series.yAxis.drawCrosshair(null,a))}):g&&(g.setState(g.state,!0),e(b.axes,function(a){a.crosshair&&a.drawCrosshair(null,g)})));else{if(g)g.onMouseOut();q&&e(q,function(a){a.setState()});if(n)n.onMouseOut();k&&k.hide(c);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());e(b.axes,function(a){a.hideCrosshair()});this.hoverX=b.hoverPoints=
b.hoverPoint=null}},scaleGroups:function(a,c){var b=this.chart,n;e(b.series,function(d){n=a||d.getPlotBox();d.xAxis&&d.xAxis.zoomEnabled&&d.group&&(d.group.attr(n),d.markerGroup&&(d.markerGroup.attr(n),d.markerGroup.clip(c?b.clipRect:null)),d.dataLabelsGroup&&d.dataLabelsGroup.attr(n))});b.clipRect.attr(c||b.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,
d=b.options.chart,c=a.chartX,g=a.chartY,q=this.zoomHor,h=this.zoomVert,k=b.plotLeft,t=b.plotTop,z=b.plotWidth,e=b.plotHeight,l,H=this.selectionMarker,f=this.mouseDownX,B=this.mouseDownY,r=d.panKey&&a[d.panKey+"Key"];H&&H.touch||(c<k?c=k:c>k+z&&(c=k+z),g<t?g=t:g>t+e&&(g=t+e),this.hasDragged=Math.sqrt(Math.pow(f-c,2)+Math.pow(B-g,2)),10<this.hasDragged&&(l=b.isInsidePlot(f-k,B-t),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&l&&!r&&!H&&(this.selectionMarker=H=b.renderer.rect(k,t,q?1:z,h?1:e,0).attr({"class":"highcharts-selection-marker",
zIndex:7}).add()),H&&q&&(c-=f,H.attr({width:Math.abs(c),x:(0<c?0:c)+f})),H&&h&&(c=g-B,H.attr({height:Math.abs(c),y:(0<c?0:c)+B})),l&&!H&&d.panning&&b.pan(a,d.panning)))},drop:function(a){var b=this,d=this.chart,c=this.hasPinched;if(this.selectionMarker){var g={originalEvent:a,xAxis:[],yAxis:[]},q=this.selectionMarker,h=q.attr?q.attr("x"):q.x,k=q.attr?q.attr("y"):q.y,t=q.attr?q.attr("width"):q.width,z=q.attr?q.attr("height"):q.height,J;if(this.hasDragged||c)e(d.axes,function(d){if(d.zoomEnabled&&m(d.min)&&
(c||b[{xAxis:"zoomX",yAxis:"zoomY"}[d.coll]])){var l=d.horiz,f="touchend"===a.type?d.minPixelPadding:0,n=d.toValue((l?h:k)+f),l=d.toValue((l?h+t:k+z)-f);g[d.coll].push({axis:d,min:Math.min(n,l),max:Math.max(n,l)});J=!0}}),J&&v(d,"selection",g,function(a){d.zoom(x(a,c?{animation:!1}:null))});w(d.index)&&(this.selectionMarker=this.selectionMarker.destroy());c&&this.scaleGroups()}d&&w(d.index)&&(u(d.container,{cursor:d._cursor}),d.cancelClick=10<this.hasDragged,d.mouseIsDown=this.hasDragged=this.hasPinched=
!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a);2!==a.button&&(this.zoomOption(a),a.preventDefault&&a.preventDefault(),this.dragStart(a))},onDocumentMouseUp:function(b){F[a.hoverChartIndex]&&F[a.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(a){var b=this.chart,d=this.chartPosition;a=this.normalize(a,d);!d||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var c=
F[a.hoverChartIndex];c&&(b.relatedTarget||b.toElement)&&(c.pointer.reset(),c.pointer.chartPosition=null)},onContainerMouseMove:function(b){var c=this.chart;m(a.hoverChartIndex)&&F[a.hoverChartIndex]&&F[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex=c.index);b=this.normalize(b);b.returnValue=!1;"mousedown"===c.mouseIsDown&&this.drag(b);!this.inClass(b.target,"highcharts-tracker")&&!c.isInsidePlot(b.chartX-c.plotLeft,b.chartY-c.plotTop)||c.openMenu||this.runPointActions(b)},inClass:function(a,c){for(var b;a;){if(b=
D(a,"class")){if(-1!==b.indexOf(c))return!0;if(-1!==b.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;this.isDirectTouch=!1;if(!(!b||!a||b.stickyTracking||this.inClass(a,"highcharts-tooltip")||this.inClass(a,"highcharts-series-"+b.index)&&this.inClass(a,"highcharts-tracker")))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,d=b.hoverPoint,c=b.plotLeft,g=b.plotTop;a=this.normalize(a);b.cancelClick||
(d&&this.inClass(a.target,"highcharts-tracker")?(v(d.series,"click",x(a,{point:d})),b.hoverPoint&&d.firePointEvent("click",a)):(x(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-c,a.chartY-g)&&v(b,"click",a)))},setDOMEvents:function(){var b=this,c=b.chart.container,d=c.ownerDocument;c.onmousedown=function(a){b.onContainerMouseDown(a)};c.onmousemove=function(a){b.onContainerMouseMove(a)};c.onclick=function(a){b.onContainerClick(a)};this.unbindContainerMouseLeave=C(c,"mouseleave",b.onContainerMouseLeave);
a.unbindDocumentMouseUp||(a.unbindDocumentMouseUp=C(d,"mouseup",b.onDocumentMouseUp));a.hasTouch&&(c.ontouchstart=function(a){b.onContainerTouchStart(a)},c.ontouchmove=function(a){b.onContainerTouchMove(a)},a.unbindDocumentTouchEnd||(a.unbindDocumentTouchEnd=C(d,"touchend",b.onDocumentTouchEnd)))},destroy:function(){var b=this;b.unDocMouseMove&&b.unDocMouseMove();this.unbindContainerMouseLeave();a.chartCount||(a.unbindDocumentMouseUp&&(a.unbindDocumentMouseUp=a.unbindDocumentMouseUp()),a.unbindDocumentTouchEnd&&
(a.unbindDocumentTouchEnd=a.unbindDocumentTouchEnd()));clearInterval(b.tooltipTimeout);a.objectEach(b,function(a,d){b[d]=null})}}})(K);(function(a){var C=a.charts,D=a.each,F=a.extend,u=a.map,m=a.noop,e=a.pick;F(a.Pointer.prototype,{pinchTranslate:function(a,e,m,w,r,c){this.zoomHor&&this.pinchTranslateDirection(!0,a,e,m,w,r,c);this.zoomVert&&this.pinchTranslateDirection(!1,a,e,m,w,r,c)},pinchTranslateDirection:function(a,e,m,w,r,c,k,h){var q=this.chart,b=a?"x":"y",n=a?"X":"Y",d="chart"+n,E=a?"width":
"height",g=q["plot"+(a?"Left":"Top")],G,I,A=h||1,t=q.inverted,z=q.bounds[a?"h":"v"],J=1===e.length,l=e[0][d],H=m[0][d],f=!J&&e[1][d],B=!J&&m[1][d],L;m=function(){!J&&20<Math.abs(l-f)&&(A=h||Math.abs(H-B)/Math.abs(l-f));I=(g-H)/A+l;G=q["plot"+(a?"Width":"Height")]/A};m();e=I;e<z.min?(e=z.min,L=!0):e+G>z.max&&(e=z.max-G,L=!0);L?(H-=.8*(H-k[b][0]),J||(B-=.8*(B-k[b][1])),m()):k[b]=[H,B];t||(c[b]=I-g,c[E]=G);c=t?1/A:A;r[E]=G;r[b]=e;w[t?a?"scaleY":"scaleX":"scale"+n]=A;w["translate"+n]=c*g+(H-c*l)},pinch:function(a){var x=
this,v=x.chart,w=x.pinchDown,r=a.touches,c=r.length,k=x.lastValidTouch,h=x.hasZoom,q=x.selectionMarker,b={},n=1===c&&(x.inClass(a.target,"highcharts-tracker")&&v.runTrackerClick||x.runChartClick),d={};1<c&&(x.initiated=!0);h&&x.initiated&&!n&&a.preventDefault();u(r,function(a){return x.normalize(a)});"touchstart"===a.type?(D(r,function(a,b){w[b]={chartX:a.chartX,chartY:a.chartY}}),k.x=[w[0].chartX,w[1]&&w[1].chartX],k.y=[w[0].chartY,w[1]&&w[1].chartY],D(v.axes,function(a){if(a.zoomEnabled){var b=
v.bounds[a.horiz?"h":"v"],d=a.minPixelPadding,c=a.toPixels(e(a.options.min,a.dataMin)),q=a.toPixels(e(a.options.max,a.dataMax)),t=Math.max(c,q);b.min=Math.min(a.pos,Math.min(c,q)-d);b.max=Math.max(a.pos+a.len,t+d)}}),x.res=!0):x.followTouchMove&&1===c?this.runPointActions(x.normalize(a)):w.length&&(q||(x.selectionMarker=q=F({destroy:m,touch:!0},v.plotBox)),x.pinchTranslate(w,r,b,q,d,k),x.hasPinched=h,x.scaleGroups(b,d),x.res&&(x.res=!1,this.reset(!1,0)))},touch:function(m,u){var x=this.chart,w,r;
if(x.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});a.hoverChartIndex=x.index;1===m.touches.length?(m=this.normalize(m),(r=x.isInsidePlot(m.chartX-x.plotLeft,m.chartY-x.plotTop))&&!x.openMenu?(u&&this.runPointActions(m),"touchmove"===m.type&&(u=this.pinchDown,w=u[0]?4<=Math.sqrt(Math.pow(u[0].chartX-m.chartX,2)+Math.pow(u[0].chartY-m.chartY,2)):!1),e(w,!0)&&this.pinch(m)):u&&this.reset()):2===m.touches.length&&this.pinch(m)},onContainerTouchStart:function(a){this.zoomOption(a);
this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(e){C[a.hoverChartIndex]&&C[a.hoverChartIndex].pointer.drop(e)}})})(K);(function(a){var C=a.addEvent,D=a.charts,F=a.css,u=a.doc,m=a.extend,e=a.noop,x=a.Pointer,y=a.removeEvent,v=a.win,w=a.wrap;if(!a.hasTouch&&(v.PointerEvent||v.MSPointerEvent)){var r={},c=!!v.PointerEvent,k=function(){var c=[];c.item=function(a){return this[a]};a.objectEach(r,function(a){c.push({pageX:a.pageX,pageY:a.pageY,target:a.target})});
return c},h=function(c,b,n,d){"touch"!==c.pointerType&&c.pointerType!==c.MSPOINTER_TYPE_TOUCH||!D[a.hoverChartIndex]||(d(c),d=D[a.hoverChartIndex].pointer,d[b]({type:n,target:c.currentTarget,preventDefault:e,touches:k()}))};m(x.prototype,{onContainerPointerDown:function(a){h(a,"onContainerTouchStart","touchstart",function(a){r[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){h(a,"onContainerTouchMove","touchmove",function(a){r[a.pointerId]={pageX:a.pageX,
pageY:a.pageY};r[a.pointerId].target||(r[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){h(a,"onDocumentTouchEnd","touchend",function(a){delete r[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,c?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,c?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(u,c?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});w(x.prototype,"init",function(a,b,c){a.call(this,b,c);this.hasZoom&&
F(b.container,{"-ms-touch-action":"none","touch-action":"none"})});w(x.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(C)});w(x.prototype,"destroy",function(a){this.batchMSEvents(y);a.call(this)})}})(K);(function(a){var C=a.addEvent,D=a.css,F=a.discardElement,u=a.defined,m=a.each,e=a.fireEvent,x=a.isFirefox,y=a.marginNames,v=a.merge,w=a.pick,r=a.setAnimation,c=a.stableSort,k=a.win,h=a.wrap;a.Legend=function(a,b){this.init(a,b)};a.Legend.prototype=
{init:function(a,b){this.chart=a;this.setOptions(b);b.enabled&&(this.render(),C(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=C(this.chart,"render",function(){this.legend.proximatePositions();this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},setOptions:function(a){var b=w(a.padding,8);this.options=a;this.itemMarginTop=a.itemMarginTop||0;this.padding=b;this.initialItemY=b-5;this.symbolWidth=w(a.symbolWidth,16);this.pages=
[];this.proximate="proximate"===a.layout&&!this.chart.inverted},update:function(a,b){var c=this.chart;this.setOptions(v(!0,this.options,a));this.destroy();c.isDirtyLegend=c.isDirtyBox=!0;w(b,!0)&&c.redraw();e(this,"afterUpdate")},colorizeItem:function(a,b){a.legendGroup[b?"removeClass":"addClass"]("highcharts-legend-item-hidden");e(this,"afterColorizeItem",{item:a,visible:b})},positionItems:function(){m(this.allItems,this.positionItem,this);this.chart.isResizing||this.positionCheckboxes()},positionItem:function(a){var b=
this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,q=d[0],d=d[1],g=a.checkbox;if((a=a.legendGroup)&&a.element)a[u(a.translateY)?"animate":"attr"]({translateX:b?q:this.legendWidth-q-2*c-4,translateY:d});g&&(g.x=q,g.y=d)},destroyItem:function(a){var b=a.checkbox;m(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&F(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}m(this.getAllItems(),function(b){m(["legendItem",
"legendGroup"],a,b)});m("clipRect up down pager nav box title group".split(" "),a,this);this.display=null},positionCheckboxes:function(){var a=this.group&&this.group.alignAttr,b,c=this.clipHeight||this.legendHeight,d=this.titleHeight;a&&(b=a.translateY,m(this.allItems,function(n){var g=n.checkbox,q;g&&(q=b+d+g.y+(this.scrollOffset||0)+3,D(g,{left:a.translateX+n.checkboxOffset+g.x-20+"px",top:q+"px",display:this.proximate||q>b-6&&q<b+c-6?"":"none"}))},this))},renderTitle:function(){var a=this.options,
b=this.padding,c=a.title,d=0;c.text&&(this.title||(this.title=this.chart.renderer.label(c.text,b-3,b-4,null,null,null,a.useHTML,null,"legend-title").attr({zIndex:1}).add(this.group)),a=this.title.getBBox(),d=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:d}));this.titleHeight=d},setText:function(c){var b=this.options;c.legendItem.attr({text:b.labelFormat?a.format(b.labelFormat,c,this.chart.time):b.labelFormatter.call(c)})},renderItem:function(a){var b=this.chart,c=b.renderer,
d=this.options,h=this.symbolWidth,g=d.symbolPadding,e="horizontal"===d.layout?w(d.itemDistance,20):0,k=!d.rtl,q=a.legendItem,t=!a.series,z=!t&&a.series.drawLegendSymbol?a.series:a,J=z.options,J=this.createCheckboxForItem&&J&&J.showCheckbox,e=h+g+e+(J?20:0),l=d.useHTML,H=a.options.className;q||(a.legendGroup=c.g("legend-item").addClass("highcharts-"+z.type+"-series highcharts-color-"+a.colorIndex+(H?" "+H:"")+(t?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=
q=c.text("",k?h+g:-g,this.baseline||0,l).attr({align:k?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=c.fontMetrics(12,q),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,q.attr("y",this.baseline)),this.symbolHeight=d.symbolHeight||this.fontMetrics.f,z.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,q,l),J&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);q.css({width:(d.itemWidth||d.width||b.spacingBox.width)-e});this.setText(a);
b=q.getBBox();a.itemWidth=a.checkboxOffset=d.itemWidth||a.legendItemWidth||b.width+e;this.maxItemWidth=Math.max(this.maxItemWidth,a.itemWidth);this.totalItemWidth+=a.itemWidth;this.itemHeight=a.itemHeight=Math.round(a.legendItemHeight||b.height||this.symbolHeight)},layoutItem:function(a){var b=this.options,c=this.padding,d="horizontal"===b.layout,h=a.itemHeight,g=b.itemMarginBottom||0,e=this.itemMarginTop,k=d?w(b.itemDistance,20):0,q=b.width,t=q||this.chart.spacingBox.width-2*c-b.x,b=b.alignColumns&&
this.totalItemWidth>t?this.maxItemWidth:a.itemWidth;d&&this.itemX-c+b>t&&(this.itemX=c,this.itemY+=e+this.lastLineHeight+g,this.lastLineHeight=0);this.lastItemY=e+this.itemY+g;this.lastLineHeight=Math.max(h,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];d?this.itemX+=b:(this.itemY+=e+h+g,this.lastLineHeight=h);this.offsetWidth=q||Math.max((d?this.itemX-c-(a.checkbox?0:k):b)+c,this.offsetWidth)},getAllItems:function(){var a=[];m(this.chart.series,function(b){var c=b&&b.options;b&&w(c.showInLegend,
u(c.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))});e(this,"afterGetAllItems",{allItems:a});return a},getAlignment:function(){var a=this.options;return this.proximate?a.align.charAt(0)+"tv":a.floating?"":a.align.charAt(0)+a.verticalAlign.charAt(0)+a.layout.charAt(0)},adjustMargins:function(a,b){var c=this.chart,d=this.options,h=this.getAlignment();h&&m([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(g,n){g.test(h)&&!u(a[n])&&(c[y[n]]=
Math.max(c[y[n]],c.legend[(n+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][n]*d[n%2?"x":"y"]+w(d.margin,12)+b[n]+(0===n&&void 0!==c.options.title.margin?c.titleOffset+c.options.title.margin:0)))})},proximatePositions:function(){var c=this.chart,b=[],n="left"===this.options.align;m(this.allItems,function(d){var h,g;h=n;d.xAxis&&d.points&&(d.xAxis.options.reversed&&(h=!h),h=a.find(h?d.points:d.points.slice(0).reverse(),function(b){return a.isNumber(b.plotY)}),g=d.legendGroup.getBBox().height,b.push({target:d.visible?
(h?h.plotY:d.xAxis.height)-.3*g:c.plotHeight,size:g,item:d}))},this);a.distribute(b,c.plotHeight);m(b,function(a){a.item._legendItemPos[1]=c.plotTop-c.spacing[0]+a.pos})},render:function(){var a=this.chart,b=a.renderer,h=this.group,d,e,g,k=this.box,r=this.options,A=this.padding;this.itemX=A;this.itemY=this.initialItemY;this.lastItemY=this.offsetWidth=0;h||(this.group=h=b.g("legend").attr({zIndex:7}).add(),this.contentGroup=b.g().attr({zIndex:1}).add(h),this.scrollGroup=b.g().add(this.contentGroup));
this.renderTitle();d=this.getAllItems();c(d,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});r.reversed&&d.reverse();this.allItems=d;this.display=e=!!d.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;m(d,this.renderItem,this);m(d,this.layoutItem,this);d=(r.width||this.offsetWidth)+A;g=this.lastItemY+this.lastLineHeight+this.titleHeight;g=this.handleOverflow(g);g+=A;k||(this.box=k=b.rect().addClass("highcharts-legend-box").attr({r:r.borderRadius}).add(h),
k.isNew=!0);0<d&&0<g&&(k[k.isNew?"attr":"animate"](k.crisp.call({},{x:0,y:0,width:d,height:g},k.strokeWidth())),k.isNew=!1);k[e?"show":"hide"]();"none"===h.getStyle("display")&&(d=g=0);this.legendWidth=d;this.legendHeight=g;e&&(b=a.spacingBox,/(lth|ct|rth)/.test(this.getAlignment())&&(b=v(b,{y:b.y+a.titleOffset+a.options.title.margin})),h.align(v(r,{width:d,height:g,verticalAlign:this.proximate?"top":r.verticalAlign}),!0,b));this.proximate||this.positionItems()},handleOverflow:function(a){var b=this,
c=this.chart,d=c.renderer,h=this.options,g=h.y,e=this.padding,c=c.spacingBox.height+("top"===h.verticalAlign?-g:g)-e,g=h.maxHeight,k,q=this.clipRect,t=h.navigation,z=w(t.animation,!0),J=t.arrowSize||12,l=this.nav,H=this.pages,f,B=this.allItems,r=function(a){"number"===typeof a?q.attr({height:a}):q&&(b.clipRect=q.destroy(),b.contentGroup.clip());b.contentGroup.div&&(b.contentGroup.div.style.clip=a?"rect("+e+"px,9999px,"+(e+a)+"px,0)":"auto")};"horizontal"!==h.layout||"middle"===h.verticalAlign||h.floating||
(c/=2);g&&(c=Math.min(c,g));H.length=0;a>c&&!1!==t.enabled?(this.clipHeight=k=Math.max(c-20-this.titleHeight-e,0),this.currentPage=w(this.currentPage,1),this.fullHeight=a,m(B,function(a,b){var d=a._legendItemPos[1],p=Math.round(a.legendItem.getBBox().height),l=H.length;if(!l||d-H[l-1]>k&&(f||d)!==H[l-1])H.push(f||d),l++;a.pageIx=l-1;f&&(B[b-1].pageIx=l-1);b===B.length-1&&d+p-H[l-1]>k&&(H.push(d),a.pageIx=l);d!==f&&(f=d)}),q||(q=b.clipRect=d.clipRect(0,e,9999,0),b.contentGroup.clip(q)),r(k),l||(this.nav=
l=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,J,J).on("click",function(){b.scroll(-1,z)}).add(l),this.pager=d.text("",15,10).addClass("highcharts-legend-navigation").add(l),this.down=d.symbol("triangle-down",0,0,J,J).on("click",function(){b.scroll(1,z)}).add(l)),b.scroll(0),a=c):l&&(r(),this.nav=l.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,b){var c=this.pages,d=c.length;a=this.currentPage+a;var h=this.clipHeight,g=this.pager,
e=this.padding;a>d&&(a=d);0<a&&(void 0!==b&&r(b,this.chart),this.nav.attr({translateX:e,translateY:h+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),g.attr({text:a+"/"+d}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===d?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),this.scrollOffset=-c[a-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),
this.currentPage=a,this.positionCheckboxes())}};a.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.symbolHeight,d=a.options.squareSymbol;b.legendSymbol=this.chart.renderer.rect(d?(a.symbolWidth-c)/2:0,a.baseline-c+1,d?c:a.symbolWidth,c,w(a.options.symbolRadius,c/2)).addClass("highcharts-point").attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var b=this.options.marker,c,d=a.symbolWidth,h=a.symbolHeight;c=h/2;var g=this.chart.renderer,e=this.legendGroup;a=a.baseline-Math.round(.3*
a.fontMetrics.b);this.legendLine=g.path(["M",0,a,"L",d,a]).addClass("highcharts-graph").attr({}).add(e);b&&!1!==b.enabled&&d&&(c=Math.min(w(b.radius,c),c),0===this.symbol.indexOf("url")&&(b=v(b,{width:h,height:h}),c=0),this.legendSymbol=b=g.symbol(this.symbol,d/2-c,a-c,2*c,2*c,b).addClass("highcharts-point").add(e),b.isMarker=!0)}};(/Trident\/7\.0/.test(k.navigator.userAgent)||x)&&h(a.Legend.prototype,"positionItem",function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d();setTimeout(d)})})(K);
(function(a){var C=a.addEvent,D=a.animObject,F=a.attr,u=a.doc,m=a.Axis,e=a.createElement,x=a.defaultOptions,y=a.discardElement,v=a.charts,w=a.defined,r=a.each,c=a.extend,k=a.find,h=a.fireEvent,q=a.grep,b=a.isNumber,n=a.isObject,d=a.isString,E=a.Legend,g=a.marginNames,G=a.merge,I=a.objectEach,A=a.Pointer,t=a.pick,z=a.pInt,J=a.removeEvent,l=a.seriesTypes,H=a.splat,f=a.syncTimeout,B=a.win,L=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,b,d){return new L(a,b,d)};c(L.prototype,
{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(d(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(b,d){var f,p,l=b.series,c=b.plotOptions||{};h(this,"init",{args:arguments},function(){b.series=null;f=G(x,b);for(p in f.plotOptions)f.plotOptions[p].tooltip=c[p]&&G(c[p].tooltip)||void 0;f.tooltip.userOptions=b.chart&&b.chart.forExport&&b.tooltip.userOptions||b.tooltip;f.series=b.series=l;this.userOptions=b;var t=f.chart,g=t.events;this.margin=[];this.spacing=
[];this.bounds={h:{},v:{}};this.labelCollectors=[];this.callback=d;this.isResizing=0;this.options=f;this.axes=[];this.series=[];this.time=b.time&&a.keys(b.time).length?new a.Time(b.time):a.time;this.hasCartesianSeries=t.showAxes;var z=this;z.index=v.length;v.push(z);a.chartCount++;g&&I(g,function(a,b){C(z,b,a)});z.xAxis=[];z.yAxis=[];z.pointCount=z.colorCounter=z.symbolCounter=0;h(z,"afterInit");z.firstRender()})},initSeries:function(b){var d=this.options.chart;(d=l[b.type||d.type||d.defaultSeriesType])||
a.error(17,!0);d=new d;d.init(this,b);return d},orderSeries:function(a){var b=this.series;for(a=a||0;a<b.length;a++)b[a]&&(b[a].index=a,b[a].name=b[a].getName())},isInsidePlot:function(a,b,d){var f=d?b:a;a=d?a:b;return 0<=f&&f<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(b){h(this,"beforeRedraw");var d=this.axes,f=this.series,l=this.pointer,p=this.legend,t=this.userOptions.legend,g=this.isDirtyLegend,z,e,k=this.hasCartesianSeries,H=this.isDirtyBox,n,J=this.renderer,q=J.isHidden(),B=
[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(b,this);q&&this.temporaryDisplay();this.layOutTitles();for(b=f.length;b--;)if(n=f[b],n.options.stacking&&(z=!0,n.isDirty)){e=!0;break}if(e)for(b=f.length;b--;)n=f[b],n.options.stacking&&(n.isDirty=!0);r(f,function(a){a.isDirty&&("point"===a.options.legendType?(a.updateTotals&&a.updateTotals(),g=!0):t&&(t.labelFormatter||t.labelFormat)&&(g=!0));a.isDirtyData&&h(a,"updatedData")});g&&p&&p.options.enabled&&(p.render(),this.isDirtyLegend=!1);
z&&this.getStacks();k&&r(d,function(a){a.updateNames();a.updateYNames&&a.updateYNames();a.setScale()});this.getMargins();k&&(r(d,function(a){a.isDirty&&(H=!0)}),r(d,function(a){var b=a.min+","+a.max;a.extKey!==b&&(a.extKey=b,B.push(function(){h(a,"afterSetExtremes",c(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(H||z)&&a.redraw()}));H&&this.drawChartBox();h(this,"predraw");r(f,function(a){(H||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});l&&l.reset(!0);J.draw();h(this,"redraw");h(this,
"render");q&&this.temporaryDisplay(!0);r(B,function(a){a.call()})},get:function(a){function b(b){return b.id===a||b.options&&b.options.id===a}var d,f=this.series,l;d=k(this.axes,b)||k(this.series,b);for(l=0;!d&&l<f.length;l++)d=k(f[l].points||[],b);return d},getAxes:function(){var a=this,b=this.options,d=b.xAxis=H(b.xAxis||{}),b=b.yAxis=H(b.yAxis||{});h(this,"getAxes");r(d,function(a,b){a.index=b;a.isX=!0});r(b,function(a,b){a.index=b});d=d.concat(b);r(d,function(b){new m(a,b)});h(this,"afterGetAxes")},
getSelectedPoints:function(){var a=[];r(this.series,function(b){a=a.concat(q(b.data||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return q(this.series,function(a){return a.selected})},setTitle:function(a,b,d){var f=this,l=f.options,p;p=l.title=G(l.title,a);l=l.subtitle=G(l.subtitle,b);r([["title",a,p],["subtitle",b,l]],function(a,b){var d=a[0],l=f[d],p=a[1];a=a[2];l&&p&&(f[d]=l=l.destroy());a&&!l&&(f[d]=f.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+
d,zIndex:a.zIndex||4}).add(),f[d].update=function(a){f.setTitle(!b&&a,b&&a)})});f.layOutTitles(d)},layOutTitles:function(a){var b=0,d,f=this.renderer,l=this.spacingBox;r(["title","subtitle"],function(a){var d=this[a],p=this.options[a];a="title"===a?-3:p.verticalAlign?0:b+2;var t;d&&(t=f.fontMetrics(t,d).b,d.css({width:(p.width||l.width+p.widthAdjust)+"px"}).align(c({y:a+t},p),!1,"spacingBox"),p.floating||p.verticalAlign||(b=Math.ceil(b+d.getBBox(p.useHTML).height)))},this);d=this.titleOffset!==b;
this.titleOffset=b;!this.isDirtyBox&&d&&(this.isDirtyBox=this.isDirtyLegend=d,this.hasRendered&&t(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var b=this.options.chart,d=b.width,b=b.height,f=this.renderTo;w(d)||(this.containerWidth=a.getStyle(f,"width"));w(b)||(this.containerHeight=a.getStyle(f,"height"));this.chartWidth=Math.max(0,d||this.containerWidth||600);this.chartHeight=Math.max(0,a.relativeLength(b,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},temporaryDisplay:function(b){var d=
this.renderTo;if(b)for(;d&&d.style;)d.hcOrigStyle&&(a.css(d,d.hcOrigStyle),delete d.hcOrigStyle),d.hcOrigDetached&&(u.body.removeChild(d),d.hcOrigDetached=!1),d=d.parentNode;else for(;d&&d.style;){u.body.contains(d)||d.parentNode||(d.hcOrigDetached=!0,u.body.appendChild(d));if("none"===a.getStyle(d,"display",!1)||d.hcOricDetached)d.hcOrigStyle={display:d.style.display,height:d.style.height,overflow:d.style.overflow},b={display:"block",overflow:"hidden"},d!==this.renderTo&&(b.height=0),a.css(d,b),
d.offsetWidth||d.style.setProperty("display","block","important");d=d.parentNode;if(d===u.body)break}},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var f,l=this.options,c=l.chart,t,g;f=this.renderTo;var k=a.uniqueKey(),H;f||(this.renderTo=f=c.renderTo);d(f)&&(this.renderTo=f=u.getElementById(f));f||a.error(13,!0);t=z(F(f,"data-highcharts-chart"));b(t)&&v[t]&&v[t].hasRendered&&v[t].destroy();F(f,"data-highcharts-chart",this.index);f.innerHTML=
"";c.skipClone||f.offsetWidth||this.temporaryDisplay();this.getChartSize();t=this.chartWidth;g=this.chartHeight;this.container=f=e("div",{id:k},void 0,f);this._cursor=f.style.cursor;this.renderer=new (a[c.renderer]||a.Renderer)(f,t,g,null,c.forExport,l.exporting&&l.exporting.allowHTML);this.setClassName(c.className);for(H in l.defs)this.renderer.definition(l.defs[H]);this.renderer.chartIndex=this.index;h(this,"afterGetContainer")},getMargins:function(a){var b=this.spacing,d=this.margin,f=this.titleOffset;
this.resetMargins();f&&!w(d[0])&&(this.plotTop=Math.max(this.plotTop,f+this.options.title.margin+b[0]));this.legend&&this.legend.display&&this.legend.adjustMargins(d,b);h(this,"getMargins");a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],d=a.margin;a.hasCartesianSeries&&r(a.axes,function(a){a.visible&&a.getOffset()});r(g,function(f,l){w(d[l])||(a[f]+=b[l])});a.setChartSize()},reflow:function(b){var d=this,l=d.options.chart,c=d.renderTo,p=w(l.width)&&w(l.height),
t=l.width||a.getStyle(c,"width"),l=l.height||a.getStyle(c,"height"),c=b?b.target:B;if(!p&&!d.isPrinting&&t&&l&&(c===B||c===u)){if(t!==d.containerWidth||l!==d.containerHeight)a.clearTimeout(d.reflowTimeout),d.reflowTimeout=f(function(){d.container&&d.setSize(void 0,void 0,!1)},b?100:0);d.containerWidth=t;d.containerHeight=l}},setReflow:function(a){var b=this;!1===a||this.unbindReflow?!1===a&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=C(B,"resize",function(a){b.reflow(a)}),
C(this,"destroy",this.unbindReflow))},setSize:function(b,d,l){var c=this,p=c.renderer;c.isResizing+=1;a.setAnimation(l,c);c.oldChartHeight=c.chartHeight;c.oldChartWidth=c.chartWidth;void 0!==b&&(c.options.chart.width=b);void 0!==d&&(c.options.chart.height=d);c.getChartSize();c.setChartSize(!0);p.setSize(c.chartWidth,c.chartHeight,l);r(c.axes,function(a){a.isDirty=!0;a.setScale()});c.isDirtyLegend=!0;c.isDirtyBox=!0;c.layOutTitles();c.getMargins();c.redraw(l);c.oldChartHeight=null;h(c,"resize");f(function(){c&&
h(c,"endResize",null,function(){--c.isResizing})},D(void 0).duration)},setChartSize:function(a){var b=this.inverted,d=this.renderer,f=this.chartWidth,l=this.chartHeight,c=this.options.chart,p=this.spacing,t=this.clipOffset,g,z,e,k;this.plotLeft=g=Math.round(this.plotLeft);this.plotTop=z=Math.round(this.plotTop);this.plotWidth=e=Math.max(0,Math.round(f-g-this.marginRight));this.plotHeight=k=Math.max(0,Math.round(l-z-this.marginBottom));this.plotSizeX=b?k:e;this.plotSizeY=b?e:k;this.plotBorderWidth=
c.plotBorderWidth||0;this.spacingBox=d.spacingBox={x:p[3],y:p[0],width:f-p[3]-p[1],height:l-p[0]-p[2]};this.plotBox=d.plotBox={x:g,y:z,width:e,height:k};f=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(Math.max(f,t[3])/2);d=Math.ceil(Math.max(f,t[0])/2);this.clipBox={x:b,y:d,width:Math.floor(this.plotSizeX-Math.max(f,t[1])/2-b),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(f,t[2])/2-d))};a||r(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()});h(this,"afterSetChartSize",{skipAxes:a})},
resetMargins:function(){var a=this,b=a.options.chart;r(["margin","spacing"],function(d){var f=b[d],l=n(f)?f:[f,f,f,f];r(["Top","Right","Bottom","Left"],function(f,c){a[d][c]=t(b[d+f],l[c])})});r(g,function(b,d){a[b]=t(a.margin[d],a.spacing[d])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,d=this.chartWidth,f=this.chartHeight,l=this.chartBackground,c=this.plotBackground,t=this.plotBorder,g,z,e=this.plotLeft,k=this.plotTop,H=this.plotWidth,
n=this.plotHeight,J=this.plotBox,q=this.clipRect,B=this.clipBox,r="animate";l||(this.chartBackground=l=b.rect().addClass("highcharts-background").add(),r="attr");g=z=l.strokeWidth();l[r]({x:z/2,y:z/2,width:d-z-g%2,height:f-z-g%2,r:a.borderRadius});r="animate";c||(r="attr",this.plotBackground=c=b.rect().addClass("highcharts-plot-background").add());c[r](J);q?q.animate({width:B.width,height:B.height}):this.clipRect=b.clipRect(B);r="animate";t||(r="attr",this.plotBorder=t=b.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());
t[r](t.crisp({x:e,y:k,width:H,height:n},-t.strokeWidth()));this.isDirtyBox=!1;h(this,"afterDrawChartBox")},propFromSeries:function(){var a=this,b=a.options.chart,d,f=a.options.series,c,t;r(["inverted","angular","polar"],function(p){d=l[b.type||b.defaultSeriesType];t=b[p]||d&&d.prototype[p];for(c=f&&f.length;!t&&c--;)(d=l[f[c].type])&&d.prototype[p]&&(t=!0);a[p]=t})},linkSeries:function(){var a=this,b=a.series;r(b,function(a){a.linkedSeries.length=0});r(b,function(b){var f=b.options.linkedTo;d(f)&&
(f=":previous"===f?a.series[b.index-1]:a.get(f))&&f.linkedParent!==b&&(f.linkedSeries.push(b),b.linkedParent=f,b.visible=t(b.options.visible,f.options.visible,b.visible))});h(this,"afterLinkSeries")},renderSeries:function(){r(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&r(b.items,function(d){var f=c(b.style,d.style),l=z(f.left)+a.plotLeft,p=z(f.top)+a.plotTop+12;delete f.left;delete f.top;a.renderer.text(d.html,l,p).attr({zIndex:2}).css(f).add()})},
render:function(){var a=this.axes,b=this.renderer,d=this.options,f,l,c;this.setTitle();this.legend=new E(this,d.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();d=this.plotWidth;f=this.plotHeight=Math.max(this.plotHeight-21,0);r(a,function(a){a.setScale()});this.getAxisMargins();l=1.1<d/this.plotWidth;c=1.05<f/this.plotHeight;if(l||c)r(a,function(a){(a.horiz&&l||!a.horiz&&c)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&r(a,
function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=b.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0},addCredits:function(a){var b=this;a=G(!0,this.options.credits,a);a.enabled&&!this.credits&&(this.credits=this.renderer.text(a.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){a.href&&(B.location.href=a.href)}).attr({align:a.position.align,
zIndex:8}).add().align(a.position),this.credits.update=function(a){b.credits=b.credits.destroy();b.addCredits(a)})},destroy:function(){var b=this,d=b.axes,f=b.series,l=b.container,c,t=l&&l.parentNode;h(b,"destroy");b.renderer.forExport?a.erase(v,b):v[b.index]=void 0;a.chartCount--;b.renderTo.removeAttribute("data-highcharts-chart");J(b);for(c=d.length;c--;)d[c]=d[c].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(c=f.length;c--;)f[c]=f[c].destroy();r("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),
function(a){var d=b[a];d&&d.destroy&&(b[a]=d.destroy())});l&&(l.innerHTML="",J(l),t&&y(l));I(b,function(a,d){delete b[d]})},firstRender:function(){var a=this,b=a.options;if(!a.isReadyToRender||a.isReadyToRender()){a.getContainer();a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();r(b.series||[],function(b){a.initSeries(b)});a.linkSeries();h(a,"beforeRender");A&&(a.pointer=new A(a,b));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){r([this.callback].concat(this.callbacks),
function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);h(this,"load");h(this,"render");w(this.index)&&this.setReflow(this.options.chart.reflow);this.onload=null}})})(K);(function(a){var C=a.addEvent,D=a.Chart,F=a.each;C(D,"afterSetChartSize",function(u){var m=this.options.chart.scrollablePlotArea;(m=m&&m.minWidth)&&!this.renderer.forExport&&(this.scrollablePixels=m=Math.max(0,m-this.chartWidth))&&(this.plotWidth+=m,this.clipBox.width+=m,u.skipAxes||F(this.axes,function(e){1===e.side?e.getPlotLinePath=
function(){var m=this.right,u;this.right=m-e.chart.scrollablePixels;u=a.Axis.prototype.getPlotLinePath.apply(this,arguments);this.right=m;return u}:(e.setAxisSize(),e.setAxisTranslation())}))});C(D,"render",function(){this.scrollablePixels?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()});D.prototype.setUpScrolling=function(){this.scrollingContainer=a.createElement("div",{className:"highcharts-scrolling"},{overflowX:"auto",WebkitOverflowScrolling:"touch"},
this.renderTo);this.innerContainer=a.createElement("div",{className:"highcharts-inner-container"},null,this.scrollingContainer);this.innerContainer.appendChild(this.container);this.setUpScrolling=null};D.prototype.applyFixed=function(){var u=this.container,m,e,x=!this.fixedDiv;x&&(this.fixedDiv=a.createElement("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:2},null,!0),this.renderTo.insertBefore(this.fixedDiv,this.renderTo.firstChild),this.fixedRenderer=
m=new a.Renderer(this.fixedDiv,0,0),this.scrollableMask=m.path().attr({fill:a.color(this.options.chart.backgroundColor||"#fff").setOpacity(.85).get(),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),a.each([this.inverted?".highcharts-xaxis":".highcharts-yaxis",this.inverted?".highcharts-xaxis-labels":".highcharts-yaxis-labels",".highcharts-contextbutton",".highcharts-credits",".highcharts-legend",".highcharts-subtitle",".highcharts-title",".highcharts-legend-checkbox"],function(e){a.each(u.querySelectorAll(e),
function(a){(a.namespaceURI===m.SVG_NS?m.box:m.box.parentNode).appendChild(a);a.style.pointerEvents="auto"})}));this.fixedRenderer.setSize(this.chartWidth,this.chartHeight);e=this.chartWidth+this.scrollablePixels;a.stop(this.container);this.container.style.width=e+"px";this.renderer.boxWrapper.attr({width:e,height:this.chartHeight,viewBox:[0,0,e,this.chartHeight].join(" ")});this.chartBackground.attr({width:e});x&&(e=this.options.chart.scrollablePlotArea,e.scrollPositionX&&(this.scrollingContainer.scrollLeft=
this.scrollablePixels*e.scrollPositionX));x=this.axisOffset;e=this.plotTop-x[0]-1;var x=this.plotTop+this.plotHeight+x[2],y=this.plotLeft+this.plotWidth-this.scrollablePixels;this.scrollableMask.attr({d:this.scrollablePixels?["M",0,e,"L",this.plotLeft-1,e,"L",this.plotLeft-1,x,"L",0,x,"Z","M",y,e,"L",this.chartWidth,e,"L",this.chartWidth,x,"L",y,x,"Z"]:["M",0,0]})}})(K);(function(a){var C,D=a.each,F=a.extend,u=a.erase,m=a.fireEvent,e=a.format,x=a.isArray,y=a.isNumber,v=a.pick,w=a.uniqueKey,r=a.defined,
c=a.removeEvent;a.Point=C=function(){};a.Point.prototype={init:function(a,c,e){var b=a.chart.options.chart.colorCount;this.series=a;this.applyOptions(c,e);this.id=r(this.id)?this.id:w();a.options.colorByPoint?(c=a.colorCounter,a.colorCounter++,a.colorCounter===b&&(a.colorCounter=0)):c=a.colorIndex;this.colorIndex=v(this.colorIndex,c);a.chart.pointCount++;m(this,"afterInit");return this},applyOptions:function(a,c){var e=this.series,b=e.options.pointValKey||e.pointValKey;a=C.prototype.optionsToObject.call(this,
a);F(this,a);this.options=this.options?F(this.options,a):a;a.group&&delete this.group;a.dataLabels&&delete this.dataLabels;b&&(this.y=this[b]);this.isNull=v(this.isValid&&!this.isValid(),null===this.x||!y(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===c&&e.xAxis&&e.xAxis.hasNames&&(this.x=e.xAxis.nameToX(this));void 0===this.x&&e&&(this.x=void 0===c?e.autoIncrement(this):c);return this},setNestedProperty:function(c,e,q){q=q.split(".");a.reduce(q,function(b,c,d,h){b[c]=h.length-
1===d?e:a.isObject(b[c],!0)?b[c]:{};return b[c]},c);return c},optionsToObject:function(c){var e={},k=this.series,b=k.options.keys,n=b||k.pointArrayMap||["y"],d=n.length,r=0,g=0;if(y(c)||null===c)e[n[0]]=c;else if(x(c))for(!b&&c.length>d&&(k=typeof c[0],"string"===k?e.name=c[0]:"number"===k&&(e.x=c[0]),r++);g<d;)b&&void 0===c[r]||(0<n[g].indexOf(".")?a.Point.prototype.setNestedProperty(e,c[r],n[g]):e[n[g]]=c[r]),r++,g++;else"object"===typeof c&&(e=c,c.dataLabels&&(k._hasPointLabels=!0),c.marker&&(k._hasPointMarkers=
!0));return e},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var a=this.series,c=a.zones,a=a.zoneAxis||"y",e=0,b;for(b=c[e];this[a]>=
b.value;)b=c[++e];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=b&&b.color&&!this.options.color?b.color:this.nonZonedColor;return b},destroy:function(){var a=this.series.chart,e=a.hoverPoints,q;a.pointCount--;e&&(this.setState(),u(e,this),e.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel||this.dataLabels)c(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(q in this)this[q]=null},destroyElements:function(){for(var a=
["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],c,e=6;e--;)c=a[e],this[c]&&(this[c]=this[c].destroy());this.dataLabels&&(D(this.dataLabels,function(a){a.element&&a.destroy()}),delete this.dataLabels);this.connectors&&(D(this.connectors,function(a){a.element&&a.destroy()}),delete this.connectors)},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,
total:this.total||this.stackTotal}},tooltipFormatter:function(a){var c=this.series,k=c.tooltipOptions,b=v(k.valueDecimals,""),n=k.valuePrefix||"",d=k.valueSuffix||"";D(c.pointArrayMap||["y"],function(c){c="{point."+c;if(n||d)a=a.replace(RegExp(c+"}","g"),n+c+"}"+d);a=a.replace(RegExp(c+"}","g"),c+":,."+b+"f}")});return e(a,{point:this,series:this.series},c.chart.time)},firePointEvent:function(a,c,e){var b=this,h=this.series.options;(h.point.events[a]||b.options&&b.options.events&&b.options.events[a])&&
this.importEvents();"click"===a&&h.allowPointSelect&&(e=function(a){b.select&&b.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});m(this,a,c,e)},visible:!0}})(K);(function(a){var C=a.addEvent,D=a.animObject,F=a.arrayMax,u=a.arrayMin,m=a.correctFloat,e=a.defaultOptions,x=a.defined,y=a.each,v=a.erase,w=a.extend,r=a.fireEvent,c=a.grep,k=a.isArray,h=a.isNumber,q=a.isString,b=a.merge,n=a.objectEach,d=a.pick,E=a.removeEvent,g=a.splat,G=a.SVGElement,I=a.syncTimeout,A=a.win;a.Series=a.seriesType("line",null,
{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10}},
select:{}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var c=this,l,t=a.series,f;c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();w(c,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});l=b.events;n(l,function(a,b){C(c,b,a)});if(l&&l.click||b.point&&b.point.events&&
b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();y(c.parallelArrays,function(a){c[a+"Data"]=[]});c.setData(b.data,!1);c.isCartesian&&(a.hasCartesianSeries=!0);t.length&&(f=t[t.length-1]);c._i=d(f&&f._i,-1)+1;a.orderSeries(this.insert(t));r(this,"afterInit")},insert:function(a){var b=this.options.index,c;if(h(b)){for(c=a.length;c--;)if(b>=d(a[c].options.index,a[c]._i)){a.splice(c+1,0,this);break}-1===c&&a.unshift(this);c+=1}else a.push(this);return d(c,a.length-
1)},bindAxes:function(){var b=this,d=b.options,c=b.chart,l;y(b.axisTypes||[],function(t){y(c[t],function(a){l=a.options;if(d[t]===l.index||void 0!==d[t]&&d[t]===l.id||void 0===d[t]&&0===l.index)b.insert(a.series),b[t]=a,a.isDirty=!0});b[t]||b.optionalAxis===t||a.error(18,!0)})},updateParallelArrays:function(a,b){var d=a.series,c=arguments,t=h(b)?function(c){var f="y"===c&&d.toYData?d.toYData(a):a[c];d[c+"Data"][b]=f}:function(a){Array.prototype[b].apply(d[a+"Data"],Array.prototype.slice.call(c,2))};
y(d.parallelArrays,t)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,l=a.pointIntervalUnit,g=this.chart.time,b=d(b,a.pointStart,0);this.pointInterval=c=d(this.pointInterval,a.pointInterval,1);l&&(a=new g.Date(b),"day"===l?g.set("Date",a,g.get("Date",a)+c):"month"===l?g.set("Month",a,g.get("Month",a)+c):"year"===l&&g.set("FullYear",a,g.get("FullYear",a)+c),c=a.getTime()-b);this.xIncrement=b+c;return b},setOptions:function(a){var c=this.chart,g=c.options,l=g.plotOptions,t=(c.userOptions||
{}).plotOptions||{},f=l[this.type];this.userOptions=a;c=b(f,l.series,a);this.tooltipOptions=b(e.tooltip,e.plotOptions.series&&e.plotOptions.series.tooltip,e.plotOptions[this.type].tooltip,g.tooltip.userOptions,l.series&&l.series.tooltip,l[this.type].tooltip,a.tooltip);this.stickyTracking=d(a.stickyTracking,t[this.type]&&t[this.type].stickyTracking,t.series&&t.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:c.stickyTracking);null===f.marker&&delete c.marker;this.zoneAxis=
c.zoneAxis;a=this.zones=(c.zones||[]).slice();!c.negativeColor&&!c.negativeFillColor||c.zones||a.push({value:c[this.zoneAxis+"Threshold"]||c.threshold||0,className:"highcharts-negative"});a.length&&x(a[a.length-1].value)&&a.push({});r(this,"afterSetOptions",{options:c});return c},getName:function(){return this.name||"Series "+(this.index+1)},getCyclic:function(a,b,c){var l,g=this.chart,f=this.userOptions,t=a+"Index",e=a+"Counter",p=c?c.length:d(g.options.chart[a+"Count"],g[a+"Count"]);b||(l=d(f[t],
f["_"+t]),x(l)||(g.series.length||(g[e]=0),f["_"+t]=l=g[e]%p,g[e]+=1),c&&(b=c[l]));void 0!==l&&(this[t]=l);this[a]=b},getColor:function(){this.getCyclic("color")},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,updateData:function(b){var d=this.options,c=this.points,l=[],g,f,t,e=this.requireSorting;y(b,function(b){var f;f=a.defined(b)&&this.pointClass.prototype.optionsToObject.call({series:this},
b).x;h(f)&&(f=a.inArray(f,this.xData,t),-1===f||c[f].touched?l.push(b):b!==d.data[f]?(c[f].update(b,!1,null,!1),c[f].touched=!0,e&&(t=f+1)):c[f]&&(c[f].touched=!0),g=!0)},this);if(g)for(b=c.length;b--;)f=c[b],f.touched||f.remove(!1),f.touched=!1;else if(b.length===c.length)y(b,function(a,b){c[b].update&&a!==d.data[b]&&c[b].update(a,!1,null,!1)});else return!1;y(l,function(a){this.addPoint(a,!1)},this);return!0},setData:function(b,c,g,l){var t=this,f=t.points,e=f&&f.length||0,z,p=t.options,n=t.chart,
r=null,m=t.xAxis,A=p.turboThreshold,J=this.xData,I=this.yData,G=(z=t.pointArrayMap)&&z.length,E;b=b||[];z=b.length;c=d(c,!0);!1!==l&&z&&e&&!t.cropped&&!t.hasGroupedData&&t.visible&&!t.isSeriesBoosting&&(E=this.updateData(b));if(!E){t.xIncrement=null;t.colorCounter=0;y(this.parallelArrays,function(a){t[a+"Data"].length=0});if(A&&z>A){for(g=0;null===r&&g<z;)r=b[g],g++;if(h(r))for(g=0;g<z;g++)J[g]=this.autoIncrement(),I[g]=b[g];else if(k(r))if(G)for(g=0;g<z;g++)r=b[g],J[g]=r[0],I[g]=r.slice(1,G+1);else for(g=
0;g<z;g++)r=b[g],J[g]=r[0],I[g]=r[1];else a.error(12)}else for(g=0;g<z;g++)void 0!==b[g]&&(r={series:t},t.pointClass.prototype.applyOptions.apply(r,[b[g]]),t.updateParallelArrays(r,g));I&&q(I[0])&&a.error(14,!0);t.data=[];t.options.data=t.userOptions.data=b;for(g=e;g--;)f[g]&&f[g].destroy&&f[g].destroy();m&&(m.minRange=m.userMinRange);t.isDirty=n.isDirtyBox=!0;t.isDirtyData=!!f;g=!1}"point"===p.legendType&&(this.processData(),this.generatePoints());c&&n.redraw(g)},processData:function(b){var d=this.xData,
c=this.yData,l=d.length,g;g=0;var f,t,e=this.xAxis,p,h=this.options;p=h.cropThreshold;var n=this.getExtremesFromAll||h.getExtremesFromAll,k=this.isCartesian,h=e&&e.val2lin,q=e&&e.isLog,r=this.requireSorting,m,A;if(k&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!b)return!1;e&&(b=e.getExtremes(),m=b.min,A=b.max);k&&this.sorted&&!n&&(!p||l>p||this.forceCrop)&&(d[l-1]<m||d[0]>A?(d=[],c=[]):this.yData&&(d[0]<m||d[l-1]>A)&&(g=this.cropData(this.xData,this.yData,m,A),d=g.xData,c=g.yData,g=g.start,f=
!0));for(p=d.length||1;--p;)l=q?h(d[p])-h(d[p-1]):d[p]-d[p-1],0<l&&(void 0===t||l<t)?t=l:0>l&&r&&(a.error(15),r=!1);this.cropped=f;this.cropStart=g;this.processedXData=d;this.processedYData=c;this.closestPointRange=t},cropData:function(a,b,c,l,g){var f=a.length,t=0,e=f,p;g=d(g,this.cropShoulder,1);for(p=0;p<f;p++)if(a[p]>=c){t=Math.max(0,p-g);break}for(c=p;c<f;c++)if(a[c]>l){e=c+g;break}return{xData:a.slice(t,e),yData:b.slice(t,e),start:t,end:e}},generatePoints:function(){var a=this.options,b=a.data,
d=this.data,c,e=this.processedXData,f=this.processedYData,h=this.pointClass,n=e.length,p=this.cropStart||0,k,q=this.hasGroupedData,a=a.keys,r,m=[],A;d||q||(d=[],d.length=b.length,d=this.data=d);a&&q&&(this.options.keys=!1);for(A=0;A<n;A++)k=p+A,q?(r=(new h).init(this,[e[A]].concat(g(f[A]))),r.dataGroup=this.groupMap[A],r.dataGroup.options&&(r.options=r.dataGroup.options,w(r,r.dataGroup.options))):(r=d[k])||void 0===b[k]||(d[k]=r=(new h).init(this,b[k],e[A])),r&&(r.index=k,m[A]=r);this.options.keys=
a;if(d&&(n!==(c=d.length)||q))for(A=0;A<c;A++)A!==p||q||(A+=n),d[A]&&(d[A].destroyElements(),d[A].plotX=void 0);this.data=d;this.points=m},getExtremes:function(a){var b=this.yAxis,d=this.processedXData,c,g=[],f=0;c=this.xAxis.getExtremes();var t=c.min,e=c.max,p,n,r=this.requireSorting?1:0,q,A;a=a||this.stackedYData||this.processedYData||[];c=a.length;for(A=0;A<c;A++)if(n=d[A],q=a[A],p=(h(q,!0)||k(q))&&(!b.positiveValuesOnly||q.length||0<q),n=this.getExtremesFromAll||this.options.getExtremesFromAll||
this.cropped||(d[A+r]||n)>=t&&(d[A-r]||n)<=e,p&&n)if(p=q.length)for(;p--;)"number"===typeof q[p]&&(g[f++]=q[p]);else g[f++]=q;this.dataMin=u(g);this.dataMax=F(g)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,c=this.xAxis,l=c.categories,g=this.yAxis,f=this.points,e=f.length,n=!!this.modifyValue,p=a.pointPlacement,k="between"===p||h(p),q=a.threshold,A=a.startFromThreshold?q:0,I,G,E,w,u=Number.MAX_VALUE;"between"===p&&(p=.5);h(p)&&
(p*=d(a.pointRange||c.pointRange));for(a=0;a<e;a++){var v=f[a],y=v.x,D=v.y;G=v.low;var C=b&&g.stacks[(this.negStacks&&D<(A?0:q)?"-":"")+this.stackKey],F;g.positiveValuesOnly&&null!==D&&0>=D&&(v.isNull=!0);v.plotX=I=m(Math.min(Math.max(-1E5,c.translate(y,0,0,0,1,p,"flags"===this.type)),1E5));b&&this.visible&&!v.isNull&&C&&C[y]&&(w=this.getStackIndicator(w,y,this.index),F=C[y],D=F.points[w.key],G=D[0],D=D[1],G===A&&w.key===C[y].base&&(G=d(h(q)&&q,g.min)),g.positiveValuesOnly&&0>=G&&(G=null),v.total=
v.stackTotal=F.total,v.percentage=F.total&&v.y/F.total*100,v.stackY=D,F.setOffset(this.pointXOffset||0,this.barW||0));v.yBottom=x(G)?Math.min(Math.max(-1E5,g.translate(G,0,1,0,1)),1E5):null;n&&(D=this.modifyValue(D,v));v.plotY=G="number"===typeof D&&Infinity!==D?Math.min(Math.max(-1E5,g.translate(D,0,1,0,1)),1E5):void 0;v.isInside=void 0!==G&&0<=G&&G<=g.len&&0<=I&&I<=c.len;v.clientX=k?m(c.translate(y,0,0,0,1,p)):I;v.negative=v.y<(q||0);v.category=l&&void 0!==l[v.x]?l[v.x]:v.x;v.isNull||(void 0!==
E&&(u=Math.min(u,Math.abs(I-E))),E=I);v.zone=this.zones.length&&v.getZone()}this.closestPointRangePx=u;r(this,"afterTranslate")},getValidPoints:function(a,b){var d=this.chart;return c(a||this.points||[],function(a){return b&&!d.isInsidePlot(a.plotX,a.plotY,d.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,d=this.options,c=b.renderer,g=b.inverted,f=this.clipBox,t=f||b.clipBox,e=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,t.height,d.xAxis,d.yAxis].join(),p=b[e],h=b[e+
"m"];p||(a&&(t.width=0,g&&(t.x=b.plotSizeX),b[e+"m"]=h=c.clipRect(g?b.plotSizeX+99:-99,g?-b.plotLeft:-b.plotTop,99,g?b.chartWidth:b.chartHeight)),b[e]=p=c.clipRect(t),p.count={length:0});a&&!p.count[this.index]&&(p.count[this.index]=!0,p.count.length+=1);!1!==d.clip&&(this.group.clip(a||f?p:b.clipRect),this.markerGroup.clip(h),this.sharedClipKey=e);a||(p.count[this.index]&&(delete p.count[this.index],--p.count.length),0===p.count.length&&e&&b[e]&&(f||(b[e]=b[e].destroy()),b[e+"m"]&&(b[e+"m"]=b[e+
"m"].destroy())))},animate:function(a){var b=this.chart,d=D(this.options.animation),c;a?this.setClip(d):(c=this.sharedClipKey,(a=b[c])&&a.animate({width:b.plotSizeX,x:0},d),b[c+"m"]&&b[c+"m"].animate({width:b.plotSizeX+99,x:0},d),this.animate=null)},afterAnimate:function(){this.setClip();r(this,"afterAnimate");this.finishedAnimating=!0},drawPoints:function(){var a=this.points,b=this.chart,c,l,g,f,e=this.options.marker,h,p,n,k=this[this.specialGroup]||this.markerGroup,q,r=d(e.enabled,this.xAxis.isRadial?
!0:null,this.closestPointRangePx>=e.enabledThreshold*e.radius);if(!1!==e.enabled||this._hasPointMarkers)for(c=0;c<a.length;c++)l=a[c],f=l.graphic,h=l.marker||{},p=!!l.marker,g=r&&void 0===h.enabled||h.enabled,n=l.isInside,g&&!l.isNull?(g=d(h.symbol,this.symbol),q=this.markerAttribs(l,l.selected&&"select"),f?f[n?"show":"hide"](!0).animate(q):n&&(0<q.width||l.hasImage)&&(l.graphic=f=b.renderer.symbol(g,q.x,q.y,q.width,q.height,p?h:e).add(k)),f&&f.addClass(l.getClassName(),!0)):f&&(l.graphic=f.destroy())},
markerAttribs:function(a,b){var c=this.options.marker,l=a.marker||{},g=l.symbol||c.symbol,f=d(l.radius,c.radius);b&&(c=c.states[b],b=l.states&&l.states[b],f=d(b&&b.radius,c&&c.radius,f+(c&&c.radiusPlus||0)));a.hasImage=g&&0===g.indexOf("url");a.hasImage&&(f=0);a={x:Math.floor(a.plotX)-f,y:a.plotY-f};f&&(a.width=a.height=2*f);return a},destroy:function(){var b=this,d=b.chart,c=/AppleWebKit\/533/.test(A.navigator.userAgent),l,g,f=b.data||[],e,h;r(b,"destroy");E(b);y(b.axisTypes||[],function(a){(h=b[a])&&
h.series&&(v(h.series,b),h.isDirty=h.forceRedraw=!0)});b.legendItem&&b.chart.legend.destroyItem(b);for(g=f.length;g--;)(e=f[g])&&e.destroy&&e.destroy();b.points=null;a.clearTimeout(b.animationTimeout);n(b,function(a,b){a instanceof G&&!a.survive&&(l=c&&"group"===b?"hide":"destroy",a[l]())});d.hoverSeries===b&&(d.hoverSeries=null);v(d.series,b);d.orderSeries();n(b,function(a,d){delete b[d]})},getGraphPath:function(a,b,d){var c=this,g=c.options,f=g.step,t,e=[],p=[],h;a=a||c.points;(t=a.reversed)&&a.reverse();
(f={right:1,center:2}[f]||f&&3)&&t&&(f=4-f);!g.connectNulls||b||d||(a=this.getValidPoints(a));y(a,function(l,t){var n=l.plotX,k=l.plotY,z=a[t-1];(l.leftCliff||z&&z.rightCliff)&&!d&&(h=!0);l.isNull&&!x(b)&&0<t?h=!g.connectNulls:l.isNull&&!b?h=!0:(0===t||h?t=["M",l.plotX,l.plotY]:c.getPointSpline?t=c.getPointSpline(a,l,t):f?(t=1===f?["L",z.plotX,k]:2===f?["L",(z.plotX+n)/2,z.plotY,"L",(z.plotX+n)/2,k]:["L",n,z.plotY],t.push("L",n,k)):t=["L",n,k],p.push(l.x),f&&(p.push(l.x),2===f&&p.push(l.x)),e.push.apply(e,
t),h=!1)});e.xMap=p;return c.graphPath=e},drawGraph:function(){var a=this,b=(this.gappedPath||this.getGraphPath).call(this),d=[["graph","highcharts-graph"]],d=a.getZonesGraphs(d);y(d,function(d,c){c=d[0];var f=a[c];f?(f.endX=a.preventGraphAnimation?null:b.xMap,f.animate({d:b})):b.length&&(a[c]=a.chart.renderer.path(b).addClass(d[1]).attr({zIndex:1}).add(a.group));f&&(f.startX=b.xMap,f.isArea=b.isArea)})},getZonesGraphs:function(a){y(this.zones,function(b,d){a.push(["zone-graph-"+d,"highcharts-graph highcharts-zone-graph-"+
d+" "+(b.className||"")])},this);return a},applyZones:function(){var a=this,b=this.chart,c=b.renderer,l=this.zones,g,f,e=this.clips||[],h,p=this.graph,n=this.area,k=Math.max(b.chartWidth,b.chartHeight),q=this[(this.zoneAxis||"y")+"Axis"],r,A,m=b.inverted,I,G,E,v,w=!1;l.length&&(p||n)&&q&&void 0!==q.min&&(A=q.reversed,I=q.horiz,p&&!this.showLine&&p.hide(),n&&n.hide(),r=q.getExtremes(),y(l,function(l,t){g=A?I?b.plotWidth:0:I?0:q.toPixels(r.min);g=Math.min(Math.max(d(f,g),0),k);f=Math.min(Math.max(Math.round(q.toPixels(d(l.value,
r.max),!0)),0),k);w&&(g=f=q.toPixels(r.max));G=Math.abs(g-f);E=Math.min(g,f);v=Math.max(g,f);q.isXAxis?(h={x:m?v:E,y:0,width:G,height:k},I||(h.x=b.plotHeight-h.x)):(h={x:0,y:m?v:E,width:k,height:G},I&&(h.y=b.plotWidth-h.y));e[t]?e[t].animate(h):(e[t]=c.clipRect(h),p&&a["zone-graph-"+t].clip(e[t]),n&&a["zone-area-"+t].clip(e[t]));w=l.value>r.max;a.resetZones&&0===f&&(f=void 0)}),this.clips=e)},invertGroups:function(a){function b(){y(["group","markerGroup"],function(b){d[b]&&(c.renderer.isVML&&d[b].attr({width:d.yAxis.len,
height:d.xAxis.len}),d[b].width=d.yAxis.len,d[b].height=d.xAxis.len,d[b].invert(a))})}var d=this,c=d.chart,g;d.xAxis&&(g=C(c,"resize",b),C(d,"destroy",g),b(a),d.invertGroups=b)},plotGroup:function(a,b,d,c,g){var f=this[a],l=!f;l&&(this[a]=f=this.chart.renderer.g().attr({zIndex:c||.1}).add(g));f.addClass("highcharts-"+b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(x(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(f.hasClass("highcharts-tracker")?
" highcharts-tracker":""),!0);f.attr({visibility:d})[l?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart,b=this.xAxis,d=this.yAxis;a.inverted&&(b=d,d=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:d?d.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,d,c=a.options,g=!!a.animate&&b.renderer.isSVG&&D(c.animation).duration,f=a.visible?"inherit":"hidden",e=c.zIndex,h=a.hasRendered,p=b.seriesGroup,n=b.inverted;d=a.plotGroup("group",
"series",f,e,p);a.markerGroup=a.plotGroup("markerGroup","markers",f,e,p);g&&a.animate(!0);d.inverted=a.isCartesian?n:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(n);!1===c.clip||a.sharedClipKey||h||d.clip(b.clipRect);g&&a.animate();h||(a.animationTimeout=I(function(){a.afterAnimate()},g));a.isDirty=!1;a.hasRendered=!0;r(a,"afterRender")},redraw:function(){var a=
this.chart,b=this.isDirty||this.isDirtyData,c=this.group,l=this.xAxis,g=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:d(l&&l.left,a.plotLeft),translateY:d(g&&g.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var d=this.xAxis,c=this.yAxis,g=this.chart.inverted;return this.searchKDTree({clientX:g?d.len-a.chartY+d.pos:a.chartX-d.pos,plotY:g?c.len-a.chartX+c.pos:a.chartY-
c.pos},b)},buildKDTree:function(){function a(d,c,f){var l,g;if(g=d&&d.length)return l=b.kdAxisArray[c%f],d.sort(function(a,b){return a[l]-b[l]}),g=Math.floor(g/2),{point:d[g],left:a(d.slice(0,g),c+1,f),right:a(d.slice(g+1),c+1,f)}}this.buildingKdTree=!0;var b=this,d=-1<b.options.findNearestPointBy.indexOf("y")?2:1;delete b.kdTree;I(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),d,d);b.buildingKdTree=!1},b.options.kdNow?0:1)},searchKDTree:function(a,b){function d(a,b,l,t){var p=b.point,
h=c.kdAxisArray[l%t],n,k,q=p;k=x(a[g])&&x(p[g])?Math.pow(a[g]-p[g],2):null;n=x(a[f])&&x(p[f])?Math.pow(a[f]-p[f],2):null;n=(k||0)+(n||0);p.dist=x(n)?Math.sqrt(n):Number.MAX_VALUE;p.distX=x(k)?Math.sqrt(k):Number.MAX_VALUE;h=a[h]-p[h];n=0>h?"left":"right";k=0>h?"right":"left";b[n]&&(n=d(a,b[n],l+1,t),q=n[e]<q[e]?n:p);b[k]&&Math.sqrt(h*h)<q[e]&&(a=d(a,b[k],l+1,t),q=a[e]<q[e]?a:q);return q}var c=this,g=this.kdAxisArray[0],f=this.kdAxisArray[1],e=b?"distX":"dist";b=-1<c.options.findNearestPointBy.indexOf("y")?
2:1;this.kdTree||this.buildingKdTree||this.buildKDTree();if(this.kdTree)return d(a,this.kdTree,b,b)}})})(K);(function(a){var C=a.Axis,D=a.Chart,F=a.correctFloat,u=a.defined,m=a.destroyObjectProperties,e=a.each,x=a.format,y=a.objectEach,v=a.pick,w=a.Series;a.StackItem=function(a,c,e,h,q){var b=a.chart.inverted;this.axis=a;this.isNegative=e;this.options=c;this.x=h;this.total=null;this.points={};this.stack=q;this.rightCliff=this.leftCliff=0;this.alignOptions={align:c.align||(b?e?"left":"right":"center"),
verticalAlign:c.verticalAlign||(b?"middle":e?"bottom":"top"),y:v(c.y,b?4:e?14:-6),x:v(c.x,b?e?-6:6:0)};this.textAlign=c.textAlign||(b?e?"right":"left":"center")};a.StackItem.prototype={destroy:function(){m(this,this.axis)},render:function(a){var c=this.axis.chart,e=this.options,h=e.format,h=h?x(h,this,c.time):e.formatter.call(this);this.label?this.label.attr({text:h,visibility:"hidden"}):this.label=c.renderer.text(h,null,null,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,
visibility:"hidden"}).add(a);this.label.labelrank=c.plotHeight},setOffset:function(a,c){var e=this.axis,h=e.chart,q=e.translate(e.usePercentage?100:this.total,0,0,0,1),b=e.translate(0),b=u(q)&&Math.abs(q-b);a=h.xAxis[0].translate(this.x)+a;e=u(q)&&this.getStackBox(h,this,a,q,c,b,e);(c=this.label)&&e&&(c.align(this.alignOptions,null,e),e=c.alignAttr,c[!1===this.options.crop||h.isInsidePlot(e.x,e.y)?"show":"hide"](!0))},getStackBox:function(a,c,e,h,q,b,n){var d=c.axis.reversed,k=a.inverted;a=n.height+
n.pos-(k?a.plotLeft:a.plotTop);c=c.isNegative&&!d||!c.isNegative&&d;return{x:k?c?h:h-b:e,y:k?a-e-q:c?a-h-b:a-h,width:k?b:q,height:k?q:b}}};D.prototype.getStacks=function(){var a=this;e(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});e(a.series,function(c){!c.options.stacking||!0!==c.visible&&!1!==a.options.chart.ignoreHiddenSeries||(c.stackKey=c.type+v(c.options.stack,""))})};C.prototype.buildStacks=function(){var a=this.series,c=v(this.options.reversedStacks,!0),e=a.length,
h;if(!this.isXAxis){this.usePercentage=!1;for(h=e;h--;)a[c?h:e-h-1].setStackedPoints();for(h=0;h<e;h++)a[h].modifyStacks()}};C.prototype.renderStackTotals=function(){var a=this.chart,c=a.renderer,e=this.stacks,h=this.stackTotalGroup;h||(this.stackTotalGroup=h=c.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());h.translate(a.plotLeft,a.plotTop);y(e,function(a){y(a,function(a){a.render(h)})})};C.prototype.resetStacks=function(){var a=this,c=a.stacks;a.isXAxis||y(c,function(c){y(c,function(e,
k){e.touched<a.stacksTouched?(e.destroy(),delete c[k]):(e.total=null,e.cumulative=null)})})};C.prototype.cleanStacks=function(){var a;this.isXAxis||(this.oldStacks&&(a=this.stacks=this.oldStacks),y(a,function(a){y(a,function(a){a.cumulative=a.total})}))};w.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var e=this.processedXData,c=this.processedYData,k=[],h=c.length,q=this.options,b=q.threshold,n=v(q.startFromThreshold&&
b,0),d=q.stack,q=q.stacking,m=this.stackKey,g="-"+m,G=this.negStacks,I=this.yAxis,A=I.stacks,t=I.oldStacks,z,J,l,H,f,B,w;I.stacksTouched+=1;for(f=0;f<h;f++)B=e[f],w=c[f],z=this.getStackIndicator(z,B,this.index),H=z.key,l=(J=G&&w<(n?0:b))?g:m,A[l]||(A[l]={}),A[l][B]||(t[l]&&t[l][B]?(A[l][B]=t[l][B],A[l][B].total=null):A[l][B]=new a.StackItem(I,I.options.stackLabels,J,B,d)),l=A[l][B],null!==w?(l.points[H]=l.points[this.index]=[v(l.cumulative,n)],u(l.cumulative)||(l.base=H),l.touched=I.stacksTouched,
0<z.index&&!1===this.singleStacks&&(l.points[H][0]=l.points[this.index+","+B+",0"][0])):l.points[H]=l.points[this.index]=null,"percent"===q?(J=J?m:g,G&&A[J]&&A[J][B]?(J=A[J][B],l.total=J.total=Math.max(J.total,l.total)+Math.abs(w)||0):l.total=F(l.total+(Math.abs(w)||0))):l.total=F(l.total+(w||0)),l.cumulative=v(l.cumulative,n)+(w||0),null!==w&&(l.points[H].push(l.cumulative),k[f]=l.cumulative);"percent"===q&&(I.usePercentage=!0);this.stackedYData=k;I.oldStacks={}}};w.prototype.modifyStacks=function(){var a=
this,c=a.stackKey,k=a.yAxis.stacks,h=a.processedXData,q,b=a.options.stacking;a[b+"Stacker"]&&e([c,"-"+c],function(c){for(var d=h.length,e,g;d--;)if(e=h[d],q=a.getStackIndicator(q,e,a.index,c),g=(e=k[c]&&k[c][e])&&e.points[q.key])a[b+"Stacker"](g,e,d)})};w.prototype.percentStacker=function(a,c,e){c=c.total?100/c.total:0;a[0]=F(a[0]*c);a[1]=F(a[1]*c);this.stackedYData[e]=a[1]};w.prototype.getStackIndicator=function(a,c,e,h){!u(a)||a.x!==c||h&&a.key!==h?a={x:c,index:0,key:h}:a.index++;a.key=[e,c,a.index].join();
return a}})(K);(function(a){var C=a.addEvent,D=a.Axis,F=a.createElement,u=a.css,m=a.defined,e=a.each,x=a.erase,y=a.extend,v=a.fireEvent,w=a.inArray,r=a.isNumber,c=a.isObject,k=a.isArray,h=a.merge,q=a.objectEach,b=a.pick,n=a.Point,d=a.Series,E=a.seriesTypes,g=a.setAnimation,G=a.splat;y(a.Chart.prototype,{addSeries:function(a,d,c){var g,e=this;a&&(d=b(d,!0),v(e,"addSeries",{options:a},function(){g=e.initSeries(a);e.isDirtyLegend=!0;e.linkSeries();v(e,"afterAddSeries");d&&e.redraw(c)}));return g},addAxis:function(a,
d,c,g){var e=d?"xAxis":"yAxis",l=this.options;a=h(a,{index:this[e].length,isX:d});d=new D(this,a);l[e]=G(l[e]||{});l[e].push(a);b(c,!0)&&this.redraw(g);return d},showLoading:function(a){var b=this,d=b.options,c=b.loadingDiv,g=function(){c&&u(c,{left:b.plotLeft+"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};c||(b.loadingDiv=c=F("div",{className:"highcharts-loading highcharts-loading-hidden"},null,b.container),b.loadingSpan=F("span",{className:"highcharts-loading-inner"},
null,c),C(b,"redraw",g));c.className="highcharts-loading";b.loadingSpan.innerHTML=a||d.lang.loading;b.loadingShown=!0;g()},hideLoading:function(){var a=this.loadingDiv;a&&(a.className="highcharts-loading highcharts-loading-hidden");this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" "),update:function(a,d,c,g){var t=this,l={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},n=a.chart,f,k,z=[];v(t,"update",{options:a});if(n){h(!0,t.options.chart,n);"className"in n&&t.setClassName(n.className);"reflow"in n&&t.setReflow(n.reflow);if("inverted"in n||"polar"in n||"type"in n)t.propFromSeries(),f=!0;"alignTicks"in n&&(f=!0);q(n,function(a,b){-1!==
w("chart."+b,t.propsRequireUpdateSeries)&&(k=!0);-1!==w(b,t.propsRequireDirtyBox)&&(t.isDirtyBox=!0)})}a.plotOptions&&h(!0,this.options.plotOptions,a.plotOptions);q(a,function(a,b){if(t[b]&&"function"===typeof t[b].update)t[b].update(a,!1);else if("function"===typeof t[l[b]])t[l[b]](a);"chart"!==b&&-1!==w(b,t.propsRequireUpdateSeries)&&(k=!0)});e("xAxis yAxis zAxis series colorAxis pane".split(" "),function(b){var d;a[b]&&("series"===b&&(d=[],e(t[b],function(a,b){a.options.isInternal||d.push(b)})),
e(G(a[b]),function(a,f){(f=m(a.id)&&t.get(a.id)||t[b][d?d[f]:f])&&f.coll===b&&(f.update(a,!1),c&&(f.touched=!0));if(!f&&c)if("series"===b)t.addSeries(a,!1).touched=!0;else if("xAxis"===b||"yAxis"===b)t.addAxis(a,"xAxis"===b,!1).touched=!0}),c&&e(t[b],function(a){a.touched||a.options.isInternal?delete a.touched:z.push(a)}))});e(z,function(a){a.remove&&a.remove(!1)});f&&e(t.axes,function(a){a.update({},!1)});k&&e(t.series,function(a){a.update({},!1)});a.loading&&h(!0,t.options.loading,a.loading);f=
n&&n.width;n=n&&n.height;r(f)&&f!==t.chartWidth||r(n)&&n!==t.chartHeight?t.setSize(f,n,g):b(d,!0)&&t.redraw(g);v(t,"afterUpdate",{options:a})},setSubtitle:function(a){this.setTitle(void 0,a)}});y(n.prototype,{update:function(a,d,g,e){function t(){l.applyOptions(a);null===l.y&&f&&(l.graphic=f.destroy());c(a,!0)&&(f&&f.element&&a&&a.marker&&void 0!==a.marker.symbol&&(l.graphic=f.destroy()),a&&a.dataLabels&&l.dataLabel&&(l.dataLabel=l.dataLabel.destroy()),l.connector&&(l.connector=l.connector.destroy()));
n=l.index;h.updateParallelArrays(l,n);p.data[n]=c(p.data[n],!0)||c(a,!0)?l.options:b(a,p.data[n]);h.isDirty=h.isDirtyData=!0;!h.fixedBox&&h.hasCartesianSeries&&(k.isDirtyBox=!0);"point"===p.legendType&&(k.isDirtyLegend=!0);d&&k.redraw(g)}var l=this,h=l.series,f=l.graphic,n,k=h.chart,p=h.options;d=b(d,!0);!1===e?t():l.firePointEvent("update",{options:a},t)},remove:function(a,b){this.series.removePoint(w(this,this.series.data),a,b)}});y(d.prototype,{addPoint:function(a,d,c,g){var e=this.options,l=this.data,
t=this.chart,f=this.xAxis,f=f&&f.hasNames&&f.names,h=e.data,n,p,k=this.xData,q,z;d=b(d,!0);n={series:this};this.pointClass.prototype.applyOptions.apply(n,[a]);z=n.x;q=k.length;if(this.requireSorting&&z<k[q-1])for(p=!0;q&&k[q-1]>z;)q--;this.updateParallelArrays(n,"splice",q,0,0);this.updateParallelArrays(n,q);f&&n.name&&(f[z]=n.name);h.splice(q,0,a);p&&(this.data.splice(q,0,null),this.processData());"point"===e.legendType&&this.generatePoints();c&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(n,
"shift"),h.shift()));this.isDirtyData=this.isDirty=!0;d&&t.redraw(g)},removePoint:function(a,d,c){var e=this,t=e.data,l=t[a],h=e.points,f=e.chart,n=function(){h&&h.length===t.length&&h.splice(a,1);t.splice(a,1);e.options.data.splice(a,1);e.updateParallelArrays(l||{series:e},"splice",a,1);l&&l.destroy();e.isDirty=!0;e.isDirtyData=!0;d&&f.redraw()};g(c,f);d=b(d,!0);l?l.firePointEvent("remove",null,n):n()},remove:function(a,d,c){function g(){e.destroy();e.remove=null;l.isDirtyLegend=l.isDirtyBox=!0;
l.linkSeries();b(a,!0)&&l.redraw(d)}var e=this,l=e.chart;!1!==c?v(e,"remove",null,g):g()},update:function(d,c){var g=this,n=g.chart,k=g.userOptions,l=g.oldType||g.type,q=d.type||k.type||n.options.chart.type,f=E[l].prototype,m,r=["group","markerGroup","dataLabelsGroup"],p=["navigatorSeries","baseSeries"],A=g.finishedAnimating&&{animation:!1},G=["data","name","turboThreshold"],I=a.keys(d),x=0<I.length;e(I,function(a){-1===w(a,G)&&(x=!1)});if(x)d.data&&this.setData(d.data,!1),d.name&&this.setName(d.name,
!1);else{p=r.concat(p);e(p,function(a){p[a]=g[a];delete g[a]});d=h(k,A,{index:g.index,pointStart:b(k.pointStart,g.xData[0])},{data:g.options.data},d);g.remove(!1,null,!1);for(m in f)g[m]=void 0;E[q||l]?y(g,E[q||l].prototype):a.error(17,!0);e(p,function(a){g[a]=p[a]});g.init(n,d);d.zIndex!==k.zIndex&&e(r,function(a){g[a]&&g[a].attr({zIndex:d.zIndex})});g.oldType=l;n.linkSeries()}v(this,"afterUpdate");b(c,!0)&&n.redraw(x?void 0:!1)},setName:function(a){this.name=this.options.name=this.userOptions.name=
a;this.chart.isDirtyLegend=!0}});y(D.prototype,{update:function(a,d){var c=this.chart,g=a&&a.events||{};a=h(this.userOptions,a);c.options[this.coll].indexOf&&(c.options[this.coll][c.options[this.coll].indexOf(this.userOptions)]=a);q(c.options[this.coll].events,function(a,b){"undefined"===typeof g[b]&&(g[b]=void 0)});this.destroy(!0);this.init(c,y(a,{events:g}));c.isDirtyBox=!0;b(d,!0)&&c.redraw()},remove:function(a){for(var d=this.chart,c=this.coll,g=this.series,h=g.length;h--;)g[h]&&g[h].remove(!1);
x(d.axes,this);x(d[c],this);k(d.options[c])?d.options[c].splice(this.options.index,1):delete d.options[c];e(d[c],function(a,b){a.options.index=a.userOptions.index=b});this.destroy();d.isDirtyBox=!0;b(a,!0)&&d.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(K);(function(a){var C=a.each,D=a.map,F=a.pick,u=a.Series,m=a.seriesType;m("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(e){var m=[],
u=[],v=this.xAxis,w=this.yAxis,r=w.stacks[this.stackKey],c={},k=this.index,h=w.series,q=h.length,b,n=F(w.options.reversedStacks,!0)?1:-1,d;e=e||this.points;if(this.options.stacking){for(d=0;d<e.length;d++)e[d].leftNull=e[d].rightNull=null,c[e[d].x]=e[d];a.objectEach(r,function(a,b){null!==a.total&&u.push(b)});u.sort(function(a,b){return a-b});b=D(h,function(){return this.visible});C(u,function(a,g){var e=0,h,A;if(c[a]&&!c[a].isNull)m.push(c[a]),C([-1,1],function(e){var t=1===e?"rightNull":"leftNull",
m=0,l=r[u[g+e]];if(l)for(d=k;0<=d&&d<q;)h=l.points[d],h||(d===k?c[a][t]=!0:b[d]&&(A=r[a].points[d])&&(m-=A[1]-A[0])),d+=n;c[a][1===e?"rightCliff":"leftCliff"]=m});else{for(d=k;0<=d&&d<q;){if(h=r[a].points[d]){e=h[1];break}d+=n}e=w.translate(e,0,1,0,1);m.push({isNull:!0,plotX:v.translate(a,0,0,0,1),x:a,plotY:e,yBottom:e})}})}return m},getGraphPath:function(a){var e=u.prototype.getGraphPath,m=this.options,v=m.stacking,w=this.yAxis,r,c,k=[],h=[],q=this.index,b,n=w.stacks[this.stackKey],d=m.threshold,
E=w.getThreshold(m.threshold),g,m=m.connectNulls||"percent"===v,G=function(c,g,e){var t=a[c];c=v&&n[t.x].points[q];var m=t[e+"Null"]||0;e=t[e+"Cliff"]||0;var l,r,t=!0;e||m?(l=(m?c[0]:c[1])+e,r=c[0]+e,t=!!m):!v&&a[g]&&a[g].isNull&&(l=r=d);void 0!==l&&(h.push({plotX:b,plotY:null===l?E:w.getThreshold(l),isNull:t,isCliff:!0}),k.push({plotX:b,plotY:null===r?E:w.getThreshold(r),doCurve:!1}))};a=a||this.points;v&&(a=this.getStackPoints(a));for(r=0;r<a.length;r++)if(c=a[r].isNull,b=F(a[r].rectPlotX,a[r].plotX),
g=F(a[r].yBottom,E),!c||m)m||G(r,r-1,"left"),c&&!v&&m||(h.push(a[r]),k.push({x:r,plotX:b,plotY:g})),m||G(r,r+1,"right");r=e.call(this,h,!0,!0);k.reversed=!0;c=e.call(this,k,!0,!0);c.length&&(c[0]="L");c=r.concat(c);e=e.call(this,h,!1,m);c.xMap=r.xMap;this.areaPath=c;return e},drawGraph:function(){this.areaPath=[];u.prototype.drawGraph.apply(this);var a=this,m=this.areaPath,y=this.options,v=[["area","highcharts-area"]];C(this.zones,function(a,e){v.push(["zone-area-"+e,"highcharts-area highcharts-zone-area-"+
e+" "+a.className])});C(v,function(e){var r=e[0],c=a[r];c?(c.endX=a.preventGraphAnimation?null:m.xMap,c.animate({d:m})):(c=a[r]=a.chart.renderer.path(m).addClass(e[1]).attr({zIndex:0}).add(a.group),c.isArea=!0);c.startX=m.xMap;c.shiftUnit=y.step?2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);(function(a){var C=a.pick;a=a.seriesType;a("spline","line",{},{getPointSpline:function(a,F,u){var m=F.plotX,e=F.plotY,x=a[u-1];u=a[u+1];var y,v,w,r;if(x&&!x.isNull&&!1!==x.doCurve&&!F.isCliff&&
u&&!u.isNull&&!1!==u.doCurve&&!F.isCliff){a=x.plotY;w=u.plotX;u=u.plotY;var c=0;y=(1.5*m+x.plotX)/2.5;v=(1.5*e+a)/2.5;w=(1.5*m+w)/2.5;r=(1.5*e+u)/2.5;w!==y&&(c=(r-v)*(w-m)/(w-y)+e-r);v+=c;r+=c;v>a&&v>e?(v=Math.max(a,e),r=2*e-v):v<a&&v<e&&(v=Math.min(a,e),r=2*e-v);r>u&&r>e?(r=Math.max(u,e),v=2*e-r):r<u&&r<e&&(r=Math.min(u,e),v=2*e-r);F.rightContX=w;F.rightContY=r}F=["C",C(x.rightContX,x.plotX),C(x.rightContY,x.plotY),C(y,m),C(v,e),m,e];x.rightContX=x.rightContY=null;return F}})})(K);(function(a){var C=
a.seriesTypes.area.prototype,D=a.seriesType;D("areaspline","spline",a.defaultPlotOptions.area,{getStackPoints:C.getStackPoints,getGraphPath:C.getGraphPath,drawGraph:C.drawGraph,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);(function(a){var C=a.animObject,D=a.each,F=a.extend,u=a.defined,m=a.isNumber,e=a.merge,x=a.pick,y=a.Series,v=a.seriesType,w=a.svg;v("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,
states:{hover:{halo:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){y.prototype.init.apply(this,arguments);var a=this,c=a.chart;c.hasRendered&&D(c.series,function(c){c.type===a.type&&(c.isDirty=!0)})},getColumnMetrics:function(){var a=this,c=a.options,e=a.xAxis,h=a.yAxis,q=e.options.reversedStacks,q=
e.reversed&&!q||!e.reversed&&q,b,n={},d=0;!1===c.grouping?d=1:D(a.chart.series,function(c){var g=c.options,e=c.yAxis,k;c.type!==a.type||!c.visible&&a.chart.options.chart.ignoreHiddenSeries||h.len!==e.len||h.pos!==e.pos||(g.stacking?(b=c.stackKey,void 0===n[b]&&(n[b]=d++),k=n[b]):!1!==g.grouping&&(k=d++),c.columnIndex=k)});var m=Math.min(Math.abs(e.transA)*(e.ordinalSlope||c.pointRange||e.closestPointRange||e.tickInterval||1),e.len),g=m*c.groupPadding,G=(m-2*g)/(d||1),c=Math.min(c.maxPointWidth||e.len,
x(c.pointWidth,G*(1-2*c.pointPadding)));a.columnMetrics={width:c,offset:(G-c)/2+(g+((a.columnIndex||0)+(q?1:0))*G-m/2)*(q?-1:1)};return a.columnMetrics},crispCol:function(a,c,e,h){var k=this.chart,b=this.borderWidth,n=-(b%2?.5:0),b=b%2?.5:1;k.inverted&&k.renderer.isVML&&(b+=1);this.options.crisp&&(e=Math.round(a+e)+n,a=Math.round(a)+n,e-=a);h=Math.round(c+h)+b;n=.5>=Math.abs(c)&&.5<h;c=Math.round(c)+b;h-=c;n&&h&&(--c,h+=1);return{x:a,y:c,width:e,height:h}},translate:function(){var a=this,c=a.chart,
e=a.options,h=a.dense=2>a.closestPointRange*a.xAxis.transA,h=a.borderWidth=x(e.borderWidth,h?0:1),q=a.yAxis,b=e.threshold,n=a.translatedThreshold=q.getThreshold(b),d=x(e.minPointLength,5),m=a.getColumnMetrics(),g=m.width,G=a.barW=Math.max(g,1+2*h),I=a.pointXOffset=m.offset;c.inverted&&(n-=.5);e.pointPadding&&(G=Math.ceil(G));y.prototype.translate.apply(a);D(a.points,function(e){var h=x(e.yBottom,n),k=999+Math.abs(h),m=g,k=Math.min(Math.max(-k,e.plotY),q.len+k),l=e.plotX+I,r=G,f=Math.min(k,h),A,v=
Math.max(k,h)-f;d&&Math.abs(v)<d&&(v=d,A=!q.reversed&&!e.negative||q.reversed&&e.negative,e.y===b&&a.dataMax<=b&&q.min<b&&(A=!A),f=Math.abs(f-n)>d?h-d:n-(A?d:0));u(e.options.pointWidth)&&(m=r=Math.ceil(e.options.pointWidth),l-=Math.round((m-g)/2));e.barX=l;e.pointWidth=m;e.tooltipPos=c.inverted?[q.len+q.pos-c.plotLeft-k,a.xAxis.len-l-r/2,v]:[l+r/2,k+q.pos-c.plotTop,v];e.shapeType="rect";e.shapeArgs=a.crispCol.apply(a,e.isNull?[l,n,r,0]:[l,f,r,v])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,
drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},drawPoints:function(){var a=this,c=this.chart,k=a.options,h=c.renderer,q=k.animationLimit||250,b;D(a.points,function(n){var d=n.graphic,r=d&&c.pointCount<q?"animate":"attr";if(m(n.plotY)&&null!==n.y){b=n.shapeArgs;if(d)d[r](e(b));else n.graphic=d=h[n.shapeType](b).add(n.group||a.group);k.borderRadius&&d.attr({r:k.borderRadius});d.addClass(n.getClassName(),!0)}else d&&(n.graphic=d.destroy())})},animate:function(a){var c=
this,e=this.yAxis,h=c.options,q=this.chart.inverted,b={},n=q?"translateX":"translateY",d;w&&(a?(b.scaleY=.001,a=Math.min(e.pos+e.len,Math.max(e.pos,e.toPixels(h.threshold))),q?b.translateX=a-e.len:b.translateY=a,c.group.attr(b)):(d=c.group.attr(n),c.group.animate({scaleY:1},F(C(c.options.animation),{step:function(a,g){b[n]=d+g.pos*(e.pos-d);c.group.attr(b)}})),c.animate=null))},remove:function(){var a=this,c=a.chart;c.hasRendered&&D(c.series,function(c){c.type===a.type&&(c.isDirty=!0)});y.prototype.remove.apply(a,
arguments)}})})(K);(function(a){a=a.seriesType;a("bar","column",null,{inverted:!0})})(K);(function(a){var C=a.Series;a=a.seriesType;a("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e \x3cspan class\x3d"highcharts-header"\x3e {series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e"}},{sorted:!1,
requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&C.prototype.drawGraph.call(this)}})})(K);(function(a){var C=a.deg2rad,D=a.isNumber,F=a.pick,u=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,e=this.chart,x=2*(a.slicedOffset||0),y=e.plotWidth-2*x,e=e.plotHeight-2*x,v=a.center,v=[F(v[0],"50%"),F(v[1],"50%"),a.size||"100%",a.innerSize||0],w=Math.min(y,e),r,c;
for(r=0;4>r;++r)c=v[r],a=2>r||2===r&&/%$/.test(c),v[r]=u(c,[y,e,w,v[2]][r])+(a?x:0);v[3]>v[2]&&(v[3]=v[2]);return v},getStartAndEndRadians:function(a,e){a=D(a)?a:0;e=D(e)&&e>a&&360>e-a?e:a+360;return{start:C*(a+-90),end:C*(e+-90)}}}})(K);(function(a){var C=a.addEvent,D=a.CenteredSeriesMixin,F=a.defined,u=a.each,m=a.extend,e=D.getStartAndEndRadians,x=a.inArray,y=a.noop,v=a.pick,w=a.Point,r=a.Series,c=a.seriesType,k=a.setAnimation;c("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,
distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var c=this,b=c.points,e=c.startAngleRad;a||(u(b,function(a){var b=
a.graphic,d=a.shapeArgs;b&&(b.attr({r:a.startR||c.center[3]/2,start:e,end:e}),b.animate({r:d.r,start:d.start,end:d.end},c.options.animation))}),c.animate=null)},updateTotals:function(){var a,c=0,b=this.points,e=b.length,d,k=this.options.ignoreHiddenPoint;for(a=0;a<e;a++)d=b[a],c+=k&&!d.visible?0:d.isNull?0:d.y;this.total=c;for(a=0;a<e;a++)d=b[a],d.percentage=0<c&&(d.visible||!k)?d.y/c*100:0,d.total=c},generatePoints:function(){r.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();
var c=0,b=this.options,n=b.slicedOffset,d=n+(b.borderWidth||0),h,g,k,m=e(b.startAngle,b.endAngle),A=this.startAngleRad=m.start,m=(this.endAngleRad=m.end)-A,t=this.points,z,r=b.dataLabels.distance,b=b.ignoreHiddenPoint,l,H=t.length,f;a||(this.center=a=this.getCenter());this.getX=function(b,d,c){k=Math.asin(Math.min((b-a[1])/(a[2]/2+c.labelDistance),1));return a[0]+(d?-1:1)*Math.cos(k)*(a[2]/2+c.labelDistance)};for(l=0;l<H;l++){f=t[l];f.labelDistance=v(f.options.dataLabels&&f.options.dataLabels.distance,
r);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,f.labelDistance);h=A+c*m;if(!b||f.visible)c+=f.percentage/100;g=A+c*m;f.shapeType="arc";f.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1E3*h)/1E3,end:Math.round(1E3*g)/1E3};k=(g+h)/2;k>1.5*Math.PI?k-=2*Math.PI:k<-Math.PI/2&&(k+=2*Math.PI);f.slicedTranslation={translateX:Math.round(Math.cos(k)*n),translateY:Math.round(Math.sin(k)*n)};g=Math.cos(k)*a[2]/2;z=Math.sin(k)*a[2]/2;f.tooltipPos=[a[0]+.7*g,a[1]+.7*z];f.half=k<-Math.PI/
2||k>Math.PI/2?1:0;f.angle=k;h=Math.min(d,f.labelDistance/5);f.labelPos=[a[0]+g+Math.cos(k)*f.labelDistance,a[1]+z+Math.sin(k)*f.labelDistance,a[0]+g+Math.cos(k)*h,a[1]+z+Math.sin(k)*h,a[0]+g,a[1]+z,0>f.labelDistance?"center":f.half?"right":"left",k]}},drawGraph:null,drawPoints:function(){var a=this,c=a.chart.renderer,b,e,d;u(a.points,function(h){e=h.graphic;h.isNull?e&&(h.graphic=e.destroy()):(d=h.shapeArgs,b=h.getTranslate(),e?e.setRadialReference(a.center).animate(m(d,b)):h.graphic=e=c[h.shapeType](d).setRadialReference(a.center).attr(b).add(a.group),
e.attr({visibility:h.visible?"inherit":"hidden"}),e.addClass(h.getClassName()))})},searchPoint:y,sortByAngle:function(a,c){a.sort(function(a,e){return void 0!==a.angle&&(e.angle-a.angle)*c})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:D.getCenter,getSymbol:y},{init:function(){w.prototype.init.apply(this,arguments);var a=this,c;a.name=v(a.name,"Slice");c=function(b){a.slice("select"===b.type)};C(a,"select",c);C(a,"unselect",c);return a},isValid:function(){return a.isNumber(this.y,
!0)&&0<=this.y},setVisible:function(a,c){var b=this,e=b.series,d=e.chart,h=e.options.ignoreHiddenPoint;c=v(c,h);a!==b.visible&&(b.visible=b.options.visible=a=void 0===a?!b.visible:a,e.options.data[x(b,e.data)]=b.options,u(["graphic","dataLabel","connector","shadowGroup"],function(d){if(b[d])b[d][a?"show":"hide"](!0)}),b.legendItem&&d.legend.colorizeItem(b,a),a||"hover"!==b.state||b.setState(""),h&&(e.isDirty=!0),c&&d.redraw())},slice:function(a,c,b){var e=this.series;k(b,e.chart);v(c,!0);this.sliced=
this.options.sliced=F(a)?a:!this.sliced;e.options.data[x(this,e.data)]=this.options;this.graphic.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var c=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.x,c.y,c.r+a,c.r+a,{innerR:this.shapeArgs.r-1,start:c.start,end:c.end})}})})(K);(function(a){var C=a.addEvent,D=a.arrayMax,F=a.defined,u=a.each,m=a.extend,e=a.format,
x=a.map,y=a.merge,v=a.noop,w=a.pick,r=a.relativeLength,c=a.Series,k=a.seriesTypes,h=a.some,q=a.stableSort,b=a.isArray,n=a.splat;a.distribute=function(b,c,g){function d(a,b){return a.target-b.target}var e,n=!0,t=b,k=[],m;m=0;var l=t.reducedLen||c;for(e=b.length;e--;)m+=b[e].size;if(m>l){q(b,function(a,b){return(b.rank||0)-(a.rank||0)});for(m=e=0;m<=l;)m+=b[e].size,e++;k=b.splice(e-1,b.length)}q(b,d);for(b=x(b,function(a){return{size:a.size,targets:[a.target],align:w(a.align,.5)}});n;){for(e=b.length;e--;)n=
b[e],m=(Math.min.apply(0,n.targets)+Math.max.apply(0,n.targets))/2,n.pos=Math.min(Math.max(0,m-n.size*n.align),c-n.size);e=b.length;for(n=!1;e--;)0<e&&b[e-1].pos+b[e-1].size>b[e].pos&&(b[e-1].size+=b[e].size,b[e-1].targets=b[e-1].targets.concat(b[e].targets),b[e-1].align=.5,b[e-1].pos+b[e-1].size>c&&(b[e-1].pos=c-b[e-1].size),b.splice(e,1),n=!0)}t.push.apply(t,k);e=0;h(b,function(b){var d=0;if(h(b.targets,function(){t[e].pos=b.pos+d;if(Math.abs(t[e].pos-t[e].target)>g)return u(t.slice(0,e+1),function(a){delete a.pos}),
t.reducedLen=(t.reducedLen||c)-.1*c,t.reducedLen>.1*c&&a.distribute(t,c,g),!0;d+=t[e].size;e++}))return!0});q(t,d)};c.prototype.drawDataLabels=function(){function c(a,b){var c=b.filter;return c?(b=c.operator,a=a[c.property],c=c.value,"\x3e"===b&&a>c||"\x3c"===b&&a<c||"\x3e\x3d"===b&&a>=c||"\x3c\x3d"===b&&a<=c||"\x3d\x3d"===b&&a==c||"\x3d\x3d\x3d"===b&&a===c?!0:!1):!0}function h(a,c){var d=[],f;if(b(a)&&!b(c))d=x(a,function(a){return y(a,c)});else if(b(c)&&!b(a))d=x(c,function(b){return y(a,b)});else if(b(a)||
b(c))for(f=Math.max(a.length,c.length);f--;)d[f]=y(a[f],c[f]);else d=y(a,c);return d}var g=this,k=g.chart,m=g.options,q=m.dataLabels,t=g.points,z,r=g.hasRendered||0,l,H=w(q.defer,!!m.animation),f=k.renderer,q=h(h(k.options.plotOptions&&k.options.plotOptions.series&&k.options.plotOptions.series.dataLabels,k.options.plotOptions&&k.options.plotOptions[g.type]&&k.options.plotOptions[g.type].dataLabels),q);if(b(q)||q.enabled||g._hasPointLabels)l=g.plotGroup("dataLabelsGroup","data-labels",H&&!r?"hidden":
"visible",q.zIndex||6),H&&(l.attr({opacity:+r}),r||C(g,"afterAnimate",function(){g.visible&&l.show(!0);l[m.animation?"animate":"attr"]({opacity:1},{duration:200})})),u(t,function(b){z=n(h(q,b.dlOptions||b.options&&b.options.dataLabels));u(z,function(d,p){var t=d.enabled&&!b.isNull&&c(b,d),n,h,m,q=b.dataLabels?b.dataLabels[p]:b.dataLabel,z=b.connectors?b.connectors[p]:b.connector,r=!q;t&&(n=b.getLabelConfig(),h=d[b.formatPrefix+"Format"]||d.format,n=F(h)?e(h,n,k.time):(d[b.formatPrefix+"Formatter"]||
d.formatter).call(n,d),h=d.rotation,m={r:d.borderRadius||0,rotation:h,padding:d.padding,zIndex:1},a.objectEach(m,function(a,b){void 0===a&&delete m[b]}));!q||t&&F(n)?t&&F(n)&&(q?m.text=n:(b.dataLabels=b.dataLabels||[],q=b.dataLabels[p]=h?f.text(n,0,-9999).addClass("highcharts-data-label"):f.label(n,0,-9999,d.shape,null,null,d.useHTML,null,"data-label"),p||(b.dataLabel=q),q.addClass(" highcharts-data-label-color-"+b.colorIndex+" "+(d.className||"")+(d.useHTML?" highcharts-tracker":""))),q.options=
d,q.attr(m),q.added||q.add(l),g.alignDataLabel(b,q,d,null,r)):(b.dataLabel=b.dataLabel.destroy(),b.dataLabels&&(1===b.dataLabels.length?delete b.dataLabels:delete b.dataLabels[p]),p||delete b.dataLabel,z&&(b.connector=b.connector.destroy(),b.connectors&&(1===b.connectors.length?delete b.connectors:delete b.connectors[p])))})});a.fireEvent(this,"afterDrawDataLabels")};c.prototype.alignDataLabel=function(a,b,c,e,n){var d=this.chart,g=d.inverted,h=w(a.dlBox&&a.dlBox.centerX,a.plotX,-9999),k=w(a.plotY,
-9999),l=b.getBBox(),q,f=c.rotation,r=c.align,G=this.visible&&(a.series.forceDL||d.isInsidePlot(h,Math.round(k),g)||e&&d.isInsidePlot(h,g?e.x+1:e.y+e.height-1,g)),p="justify"===w(c.overflow,"justify");if(G&&(q=d.renderer.fontMetrics(void 0,b).b,e=m({x:g?this.yAxis.len-k:h,y:Math.round(g?this.xAxis.len-h:k),width:0,height:0},e),m(c,{width:l.width,height:l.height}),f?(p=!1,h=d.renderer.rotCorr(q,f),h={x:e.x+c.x+e.width/2+h.x,y:e.y+c.y+{top:0,middle:.5,bottom:1}[c.verticalAlign]*e.height},b[n?"attr":
"animate"](h).attr({align:r}),k=(f+720)%360,k=180<k&&360>k,"left"===r?h.y-=k?l.height:0:"center"===r?(h.x-=l.width/2,h.y-=l.height/2):"right"===r&&(h.x-=l.width,h.y-=k?0:l.height),b.placed=!0,b.alignAttr=h):(b.align(c,null,e),h=b.alignAttr),p&&0<=e.height?a.isLabelJustified=this.justifyDataLabel(b,c,h,l,e,n):w(c.crop,!0)&&(G=d.isInsidePlot(h.x,h.y)&&d.isInsidePlot(h.x+l.width,h.y+l.height)),c.shape&&!f))b[n?"attr":"animate"]({anchorX:g?d.plotWidth-a.plotY:a.plotX,anchorY:g?d.plotHeight-a.plotX:a.plotY});
G||(b.attr({y:-9999}),b.placed=!1)};c.prototype.justifyDataLabel=function(a,b,c,e,h,n){var d=this.chart,g=b.align,k=b.verticalAlign,l,q,f=a.box?0:a.padding||0;l=c.x+f;0>l&&("right"===g?b.align="left":b.x=-l,q=!0);l=c.x+e.width-f;l>d.plotWidth&&("left"===g?b.align="right":b.x=d.plotWidth-l,q=!0);l=c.y+f;0>l&&("bottom"===k?b.verticalAlign="top":b.y=-l,q=!0);l=c.y+e.height-f;l>d.plotHeight&&("top"===k?b.verticalAlign="bottom":b.y=d.plotHeight-l,q=!0);q&&(a.placed=!n,a.align(b,null,h));return q};k.pie&&
(k.pie.prototype.drawDataLabels=function(){var b=this,e=b.data,g,h=b.chart,n=b.options.dataLabels,k=w(n.connectorPadding,10),t=w(n.connectorWidth,1),q=h.plotWidth,m=h.plotHeight,l=Math.round(h.chartWidth/3),r,f=b.center,B=f[2]/2,v=f[1],p,x,y,C,P=[[],[]],O,M,aa,K,S=[0,0,0,0];b.visible&&(n.enabled||b._hasPointLabels)&&(u(e,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),c.prototype.drawDataLabels.apply(b),
u(e,function(a){a.dataLabel&&(a.visible?(P[a.half].push(a),a.dataLabel._pos=null,a.dataLabel.getBBox().width>l&&(a.dataLabel.css({width:.7*l}),a.dataLabel.shortened=!0)):(a.dataLabel=a.dataLabel.destroy(),a.dataLabels&&1===a.dataLabels.length&&delete a.dataLabels))}),u(P,function(c,d){var e,l,t=c.length,r=[],z;if(t)for(b.sortByAngle(c,d-.5),0<b.maxLabelDistance&&(e=Math.max(0,v-B-b.maxLabelDistance),l=Math.min(v+B+b.maxLabelDistance,h.plotHeight),u(c,function(a){0<a.labelDistance&&a.dataLabel&&(a.top=
Math.max(0,v-B-a.labelDistance),a.bottom=Math.min(v+B+a.labelDistance,h.plotHeight),z=a.dataLabel.getBBox().height||21,a.distributeBox={target:a.labelPos[1]-a.top+z/2,size:z,rank:a.y},r.push(a.distributeBox))}),e=l+z-e,a.distribute(r,e,e/5)),K=0;K<t;K++)g=c[K],y=g.labelPos,p=g.dataLabel,aa=!1===g.visible?"hidden":"inherit",M=e=y[1],r&&F(g.distributeBox)&&(void 0===g.distributeBox.pos?aa="hidden":(C=g.distributeBox.size,M=g.top+g.distributeBox.pos)),delete g.positionIndex,O=n.justify?f[0]+(d?-1:1)*
(B+g.labelDistance):b.getX(M<g.top+2||M>g.bottom-2?e:M,d,g),p._attr={visibility:aa,align:y[6]},p._pos={x:O+n.x+({left:k,right:-k}[y[6]]||0),y:M+n.y-10},y.x=O,y.y=M,w(n.crop,!0)&&(x=p.getBBox().width,e=null,O-x<k&&1===d?(e=Math.round(x-O+k),S[3]=Math.max(e,S[3])):O+x>q-k&&0===d&&(e=Math.round(O+x-q+k),S[1]=Math.max(e,S[1])),0>M-C/2?S[0]=Math.max(Math.round(-M+C/2),S[0]):M+C/2>m&&(S[2]=Math.max(Math.round(M+C/2-m),S[2])),p.sideOverflow=e)}),0===D(S)||this.verifyDataLabelOverflow(S))&&(this.placeDataLabels(),
t&&u(this.points,function(a){var c;r=a.connector;if((p=a.dataLabel)&&p._pos&&a.visible&&0<a.labelDistance){aa=p._attr.visibility;if(c=!r)a.connector=r=h.renderer.path().addClass("highcharts-data-label-connector  highcharts-color-"+a.colorIndex+(a.className?" "+a.className:"")).add(b.dataLabelsGroup);r[c?"attr":"animate"]({d:b.connectorPath(a.labelPos)});r.attr("visibility",aa)}else r&&(a.connector=r.destroy())}))},k.pie.prototype.connectorPath=function(a){var b=a.x,c=a.y;return w(this.options.dataLabels.softConnector,
!0)?["M",b+("left"===a[6]?5:-5),c,"C",b,c,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],"L",a[4],a[5]]:["M",b+("left"===a[6]?5:-5),c,"L",a[2],a[3],"L",a[4],a[5]]},k.pie.prototype.placeDataLabels=function(){u(this.points,function(a){var b=a.dataLabel;b&&a.visible&&((a=b._pos)?(b.sideOverflow&&(b._attr.width=b.getBBox().width-b.sideOverflow,b.css({width:b._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),b.shortened=!0),b.attr(b._attr),b[b.moved?"animate":"attr"](a),b.moved=
!0):b&&b.attr({y:-9999}))},this)},k.pie.prototype.alignDataLabel=v,k.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,d=c.center,e=c.minSize||80,h,n=null!==c.size;n||(null!==d[0]?h=Math.max(b[2]-Math.max(a[1],a[3]),e):(h=Math.max(b[2]-a[1]-a[3],e),b[0]+=(a[3]-a[1])/2),null!==d[1]?h=Math.max(Math.min(h,b[2]-Math.max(a[0],a[2])),e):(h=Math.max(Math.min(h,b[2]-a[0]-a[2]),e),b[1]+=(a[0]-a[2])/2),h<b[2]?(b[2]=h,b[3]=Math.min(r(c.innerSize||0,h),h),this.translate(b),this.drawDataLabels&&
this.drawDataLabels()):n=!0);return n});k.column&&(k.column.prototype.alignDataLabel=function(a,b,e,h,n){var d=this.chart.inverted,g=a.series,k=a.dlBox||a.shapeArgs,q=w(a.below,a.plotY>w(this.translatedThreshold,g.yAxis.len)),l=w(e.inside,!!this.options.stacking);k&&(h=y(k),0>h.y&&(h.height+=h.y,h.y=0),k=h.y+h.height-g.yAxis.len,0<k&&(h.height-=k),d&&(h={x:g.yAxis.len-h.y-h.height,y:g.xAxis.len-h.x-h.width,width:h.height,height:h.width}),l||(d?(h.x+=q?0:h.width,h.width=0):(h.y+=q?h.height:0,h.height=
0)));e.align=w(e.align,!d||l?"center":q?"right":"left");e.verticalAlign=w(e.verticalAlign,d||l?"middle":q?"top":"bottom");c.prototype.alignDataLabel.call(this,a,b,e,h,n);a.isLabelJustified&&a.contrastColor&&b.css({color:a.contrastColor})})})(K);(function(a){var C=a.Chart,D=a.each,F=a.isArray,u=a.objectEach,m=a.pick;a=a.addEvent;a(C,"render",function(){var a=[];D(this.labelCollectors||[],function(e){a=a.concat(e())});D(this.yAxis||[],function(e){e.options.stackLabels&&!e.options.stackLabels.allowOverlap&&
u(e.stacks,function(e){u(e,function(e){a.push(e.label)})})});D(this.series||[],function(e){var u=e.options.dataLabels;e.visible&&(!1!==u.enabled||e._hasPointLabels)&&D(e.points,function(e){if(e.visible){var v=F(e.dataLabels)?e.dataLabels:e.dataLabel?[e.dataLabel]:[];D(v,function(r){var c=r.options;r.labelrank=m(c.labelrank,e.labelrank,e.shapeArgs&&e.shapeArgs.height);c.allowOverlap||a.push(r)})}})});this.hideOverlappingLabels(a)});C.prototype.hideOverlappingLabels=function(a){var e=a.length,m=this.renderer,
v,w,r,c,k,h,q=function(a,c,d,e,g,h,k,q){return!(g>a+d||g+k<a||h>c+e||h+q<c)};r=function(a){var b,c,e,g=a.box?0:a.padding||0;e=0;if(a&&(!a.alignAttr||a.placed))return b=a.alignAttr||{x:a.attr("x"),y:a.attr("y")},c=a.parentGroup,a.width||(e=a.getBBox(),a.width=e.width,a.height=e.height,e=m.fontMetrics(null,a.element).h),{x:b.x+(c.translateX||0)+g,y:b.y+(c.translateY||0)+g-e,width:a.width-2*g,height:a.height-2*g}};for(w=0;w<e;w++)if(v=a[w])v.oldOpacity=v.opacity,v.newOpacity=1,v.absoluteBox=r(v);a.sort(function(a,
c){return(c.labelrank||0)-(a.labelrank||0)});for(w=0;w<e;w++)for(h=(r=a[w])&&r.absoluteBox,v=w+1;v<e;++v)if(k=(c=a[v])&&c.absoluteBox,h&&k&&r!==c&&0!==r.newOpacity&&0!==c.newOpacity&&(k=q(h.x,h.y,h.width,h.height,k.x,k.y,k.width,k.height)))(r.labelrank<c.labelrank?r:c).newOpacity=0;D(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==c&&(a.alignAttr&&a.placed?(c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)):a.attr({opacity:c})),a.isOld=
!0)})}})(K);(function(a){var C=a.addEvent,D=a.Chart,F=a.createElement,u=a.css,m=a.defaultOptions,e=a.defaultPlotOptions,x=a.each,y=a.extend,v=a.fireEvent,w=a.hasTouch,r=a.inArray,c=a.isObject,k=a.Legend,h=a.merge,q=a.pick,b=a.Point,n=a.Series,d=a.seriesTypes,E;E=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart.pointer,c=function(a){var c=b.getPointFromEvent(a);void 0!==c&&(b.isDirectTouch=!0,c.onMouseOver(a))};x(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&
(a.dataLabel.div?a.dataLabel.div.point=a:a.dataLabel.element.point=a)});a._hasTracking||(x(a.trackerGroups,function(d){if(a[d]&&(a[d].addClass("highcharts-tracker").on("mouseover",c).on("mouseout",function(a){b.onTrackerMouseOut(a)}),w))a[d].on("touchstart",c)}),a._hasTracking=!0);v(this,"afterDrawTracker")},drawTrackerGraph:function(){var a=this,b=a.options.trackByArea,c=[].concat(b?a.areaPath:a.graphPath),d=c.length,e=a.chart,h=e.pointer,n=e.renderer,l=e.options.tooltip.snap,k=a.tracker,f,q=function(){if(e.hoverSeries!==
a)a.onMouseOver()};if(d&&!b)for(f=d+1;f--;)"M"===c[f]&&c.splice(f+1,0,c[f+1]-l,c[f+2],"L"),(f&&"M"===c[f]||f===d)&&c.splice(f,0,"L",c[f-2]+l,c[f-1]);k?k.attr({d:c}):a.graph&&(a.tracker=n.path(c).attr({visibility:a.visible?"visible":"hidden",zIndex:2}).addClass(b?"highcharts-tracker-area":"highcharts-tracker-line").add(a.group),x([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",q).on("mouseout",function(a){h.onTrackerMouseOut(a)});if(w)a.on("touchstart",q)}));v(this,
"afterDrawTracker")}};d.column&&(d.column.prototype.drawTracker=E.drawTrackerPoint);d.pie&&(d.pie.prototype.drawTracker=E.drawTrackerPoint);d.scatter&&(d.scatter.prototype.drawTracker=E.drawTrackerPoint);y(k.prototype,{setItemEvents:function(a,c,d){var e=this.chart.renderer.boxWrapper,g="highcharts-legend-"+(a instanceof b?"point":"series")+"-active";(d?c:a.legendGroup).on("mouseover",function(){a.setState("hover");e.addClass(g)}).on("mouseout",function(){e.removeClass(g);a.setState()}).on("click",
function(b){var c=function(){a.setVisible&&a.setVisible()};e.removeClass(g);b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):v(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=F("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);C(a.checkbox,"click",function(b){v(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});
y(D.prototype,{showResetZoom:function(){function a(){b.zoomOut()}var b=this,c=m.lang,d=b.options.chart.resetZoomButton,e=d.theme,h=e.states,n="chart"===d.relativeTo?null:"plotBox";v(this,"beforeShowResetZoom",null,function(){b.resetZoomButton=b.renderer.button(c.resetZoom,null,null,a,e,h&&h.hover).attr({align:d.position.align,title:c.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(d.position,!1,n)})},zoomOut:function(){v(this,"selection",{resetSelection:!0},this.zoom)},zoom:function(a){var b,
d=this.pointer,e=!1,g;!a||a.resetSelection?(x(this.axes,function(a){b=a.zoom()}),d.initiated=!1):x(a.xAxis.concat(a.yAxis),function(a){var c=a.axis;d[c.isXAxis?"zoomX":"zoomY"]&&(b=c.zoom(a.min,a.max),c.displayBtn&&(e=!0))});g=this.resetZoomButton;e&&!g?this.showResetZoom():!e&&c(g)&&(this.resetZoomButton=g.destroy());b&&this.redraw(q(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,e;d&&x(d,function(a){a.setState()});x("xy"===b?[1,0]:
[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,l=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",g=c[d],f=(b.pointRange||0)/2,h=b.reversed&&!c.inverted||!b.reversed&&c.inverted?-1:1,n=b.getExtremes(),p=b.toValue(g-l,!0)+f*h,h=b.toValue(g+b.len-l,!0)-f*h,k=h<p,g=k?h:p,p=k?p:h,h=Math.min(n.dataMin,f?n.min:b.toValue(b.toPixels(n.min)-b.minPixelPadding)),f=Math.max(n.dataMax,f?n.max:b.toValue(b.toPixels(n.max)+b.minPixelPadding)),k=h-g;0<k&&(p+=k,g=h);k=p-f;0<k&&(p=f,g-=k);b.series.length&&
g!==n.min&&p!==n.max&&(b.setExtremes(g,p,!1,!1,{trigger:"pan"}),e=!0);c[d]=l});e&&c.redraw(!1);u(c.container,{cursor:"move"})}});y(b.prototype,{select:function(a,b){var c=this,d=c.series,e=d.chart;a=q(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a;d.options.data[r(c,d.data)]=c.options;c.setState(a&&"select");b||x(e.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=a.options.selected=!1,d.options.data[r(a,d.data)]=a.options,
a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a){var b=this.series.chart,c=b.pointer;a=a?c.normalize(a):c.getChartCoordinatesFromPoint(this,b.inverted);c.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart;this.firePointEvent("mouseOut");x(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var b=this,c=h(b.series.options.point,b.options).events;b.events=c;a.objectEach(c,function(a,
c){C(b,c,a)});this.hasImportedEvents=!0}},setState:function(a,b){var c=Math.floor(this.plotX),d=this.plotY,g=this.series,h=g.options.states[a||"normal"]||{},n=e[g.type].marker&&g.options.marker,l=n&&!1===n.enabled,k=n&&n.states&&n.states[a||"normal"]||{},f=!1===k.enabled,m=g.stateMarkerGraphic,r=this.marker||{},p=g.chart,w=g.halo,u,x=n&&g.markerAttribs;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===h.enabled||a&&(f||l&&!1===k.enabled)||a&&r.states&&r.states[a]&&!1===r.states[a].enabled)){x&&
(u=g.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+this.state),a&&this.graphic.addClass("highcharts-point-"+a),u&&this.graphic.animate(u,q(p.options.chart.animation,k.animation,n.animation)),m&&m.hide();else{if(a&&k)if(n=r.symbol||g.symbol,m&&m.currentSymbol!==n&&(m=m.destroy()),m)m[b?"animate":"attr"]({x:u.x,y:u.y});else n&&(g.stateMarkerGraphic=m=p.renderer.symbol(n,u.x,u.y,u.width,u.height).add(g.markerGroup),m.currentSymbol=n);m&&(m[a&&p.isInsidePlot(c,
d,p.inverted)?"show":"hide"](),m.element.point=this)}(c=h.halo)&&c.size?(w||(g.halo=w=p.renderer.path().add((this.graphic||m).parentGroup)),w.show()[b?"animate":"attr"]({d:this.haloPath(c.size)}),w.attr({"class":"highcharts-halo highcharts-color-"+q(this.colorIndex,g.colorIndex)+(this.className?" "+this.className:""),zIndex:-1}),w.point=this):w&&w.point&&w.point.haloPath&&w.animate({d:w.point.haloPath(0)},null,w.hide);this.state=a;v(this,"afterSetState")}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-
a,this.plotY-a,2*a,2*a)}});y(n.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&v(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&v(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this;
a=a||"";b.state!==a&&(x([b.group,b.markerGroup,b.dataLabelsGroup],function(c){c&&(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a)},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,g,h=d.options.chart.ignoreHiddenSeries,l=c.visible;g=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!l:a)?"show":"hide";x(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][g]()});if(d.hoverSeries===c||(d.hoverPoint&&
d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&x(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});x(c.linkedSeries,function(b){b.setVisible(a,!1)});h&&(d.isDirtyBox=!0);v(c,g);!1!==b&&d.redraw()},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=void 0===a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);v(this,a?"select":"unselect")},drawTracker:E.drawTrackerGraph})})(K);
(function(a){var C=a.Chart,D=a.each,F=a.inArray,u=a.isArray,m=a.isObject,e=a.pick,x=a.splat;C.prototype.setResponsive=function(e){var m=this.options.responsive,w=[],r=this.currentResponsive;m&&m.rules&&D(m.rules,function(c){void 0===c._id&&(c._id=a.uniqueKey());this.matchResponsiveRule(c,w,e)},this);var c=a.merge.apply(0,a.map(w,function(c){return a.find(m.rules,function(a){return a._id===c}).chartOptions})),w=w.toString()||void 0;w!==(r&&r.ruleIds)&&(r&&this.update(r.undoOptions,e),w?(this.currentResponsive=
{ruleIds:w,mergedOptions:c,undoOptions:this.currentOptions(c)},this.update(c,e)):this.currentResponsive=void 0)};C.prototype.matchResponsiveRule=function(a,m){var w=a.condition;(w.callback||function(){return this.chartWidth<=e(w.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=e(w.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=e(w.minWidth,0)&&this.chartHeight>=e(w.minHeight,0)}).call(this)&&m.push(a._id)};C.prototype.currentOptions=function(e){function v(e,c,k,h){var q;a.objectEach(e,function(a,e){if(!h&&
-1<F(e,["series","xAxis","yAxis"]))for(a=x(a),k[e]=[],q=0;q<a.length;q++)c[e][q]&&(k[e][q]={},v(a[q],c[e][q],k[e][q],h+1));else m(a)?(k[e]=u(a)?[]:{},v(a,c[e]||{},k[e],h+1)):k[e]=c[e]||null})}var w={};v(e,this.options,w,0);return w}})(K);(function(a){var C=a.addEvent,D=a.Axis,F=a.Chart,u=a.css,m=a.defined,e=a.each,x=a.extend,y=a.noop,v=a.pick,w=a.timeUnits,r=a.wrap;r(a.Series.prototype,"init",function(a){var c;a.apply(this,Array.prototype.slice.call(arguments,1));(c=this.xAxis)&&c.options.ordinal&&
C(this,"updatedData",function(){delete c.ordinalIndex})});r(D.prototype,"getTimeTicks",function(a,e,h,q,b,n,d,r){var c=0,k,v,u={},t,z,x,l=[],H=-Number.MAX_VALUE,f=this.options.tickPixelInterval,B=this.chart.time;if(!this.options.ordinal&&!this.options.breaks||!n||3>n.length||void 0===h)return a.call(this,e,h,q,b);z=n.length;for(k=0;k<z;k++){x=k&&n[k-1]>q;n[k]<h&&(c=k);if(k===z-1||n[k+1]-n[k]>5*d||x){if(n[k]>H){for(v=a.call(this,e,n[c],n[k],b);v.length&&v[0]<=H;)v.shift();v.length&&(H=v[v.length-1]);
l=l.concat(v)}c=k+1}if(x)break}a=v.info;if(r&&a.unitRange<=w.hour){k=l.length-1;for(c=1;c<k;c++)B.dateFormat("%d",l[c])!==B.dateFormat("%d",l[c-1])&&(u[l[c]]="day",t=!0);t&&(u[l[0]]="day");a.higherRanks=u}l.info=a;if(r&&m(f)){r=B=l.length;k=[];var y;for(t=[];r--;)c=this.translate(l[r]),y&&(t[r]=y-c),k[r]=y=c;t.sort();t=t[Math.floor(t.length/2)];t<.6*f&&(t=null);r=l[B-1]>q?B-1:B;for(y=void 0;r--;)c=k[r],q=Math.abs(y-c),y&&q<.8*f&&(null===t||q<.8*t)?(u[l[r]]&&!u[l[r+1]]?(q=r+1,y=c):q=r,l.splice(q,1)):
y=c}return l});x(D.prototype,{beforeSetTickPositions:function(){var a,k=[],h,q=!1,b,n=this.getExtremes(),d=n.min,r=n.max,g,u=this.isXAxis&&!!this.options.breaks,n=this.options.ordinal,w=Number.MAX_VALUE,A=this.chart.options.chart.ignoreHiddenSeries;b="highcharts-navigator-xaxis"===this.options.className;var t;!this.options.overscroll||this.max!==this.dataMax||this.chart.mouseIsDown&&!b||this.eventArgs&&(!this.eventArgs||"navigator"===this.eventArgs.trigger)||(this.max+=this.options.overscroll,!b&&
m(this.userMin)&&(this.min+=this.options.overscroll));if(n||u){e(this.series,function(b,c){h=[];if(!(A&&!1===b.visible||!1===b.takeOrdinalPosition&&!u)&&(k=k.concat(b.processedXData),a=k.length,k.sort(function(a,b){return a-b}),w=Math.min(w,v(b.closestPointRange,w)),a)){for(c=0;c<a-1;)k[c]!==k[c+1]&&h.push(k[c+1]),c++;h[0]!==k[0]&&h.unshift(k[0]);k=h}b.isSeriesBoosting&&(t=!0)});t&&(k.length=0);a=k.length;if(2<a){b=k[1]-k[0];for(g=a-1;g--&&!q;)k[g+1]-k[g]!==b&&(q=!0);!this.options.keepOrdinalPadding&&
(k[0]-d>b||r-k[k.length-1]>b)&&(q=!0)}else this.options.overscroll&&(2===a?w=k[1]-k[0]:1===a?(w=this.options.overscroll,k=[k[0],k[0]+w]):w=this.overscrollPointsRange);q?(this.options.overscroll&&(this.overscrollPointsRange=w,k=k.concat(this.getOverscrollPositions())),this.ordinalPositions=k,b=this.ordinal2lin(Math.max(d,k[0]),!0),g=Math.max(this.ordinal2lin(Math.min(r,k[k.length-1]),!0),1),this.ordinalSlope=r=(r-d)/(g-b),this.ordinalOffset=d-b*r):(this.overscrollPointsRange=v(this.closestPointRange,
this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=n&&q;this.groupIntervalFactor=null},val2lin:function(a,e){var c=this.ordinalPositions;if(c){var k=c.length,b,n;for(b=k;b--;)if(c[b]===a){n=b;break}for(b=k-1;b--;)if(a>c[b]||0===b){a=(a-c[b])/(c[b+1]-c[b]);n=b+a;break}e=e?n:this.ordinalSlope*(n||0)+this.ordinalOffset}else e=a;return e},lin2val:function(a,e){var c=this.ordinalPositions;if(c){var k=this.ordinalSlope,b=this.ordinalOffset,n=c.length-
1,d;if(e)0>a?a=c[0]:a>n?a=c[n]:(n=Math.floor(a),d=a-n);else for(;n--;)if(e=k*n+b,a>=e){k=k*(n+1)+b;d=(a-e)/(k-e);break}return void 0!==d&&void 0!==c[n]?c[n]+(d?d*(c[n+1]-c[n]):0):a}return a},getExtendedPositions:function(){var a=this,k=a.chart,h=a.series[0].currentDataGrouping,m=a.ordinalIndex,b=h?h.count+h.unitName:"raw",n=a.options.overscroll,d=a.getExtremes(),r,g;m||(m=a.ordinalIndex={});m[b]||(r={series:[],chart:k,getExtremes:function(){return{min:d.dataMin,max:d.dataMax+n}},options:{ordinal:!0},
val2lin:D.prototype.val2lin,ordinal2lin:D.prototype.ordinal2lin},e(a.series,function(b){g={xAxis:r,xData:b.xData.slice(),chart:k,destroyGroupedData:y};g.xData=g.xData.concat(a.getOverscrollPositions());g.options={dataGrouping:h?{enabled:!0,forced:!0,approximation:"open",units:[[h.unitName,[h.count]]]}:{enabled:!1}};b.processData.apply(g);r.series.push(g)}),a.beforeSetTickPositions.apply(r),m[b]=r.ordinalPositions);return m[b]},getOverscrollPositions:function(){var c=this.options.overscroll,e=this.overscrollPointsRange,
h=[],m=this.dataMax;if(a.defined(e))for(h.push(m);m<=this.dataMax+c;)m+=e,h.push(m);return h},getGroupIntervalFactor:function(a,e,h){var c;h=h.processedXData;var b=h.length,n=[];c=this.groupIntervalFactor;if(!c){for(c=0;c<b-1;c++)n[c]=h[c+1]-h[c];n.sort(function(a,b){return a-b});n=n[Math.floor(b/2)];a=Math.max(a,h[0]);e=Math.min(e,h[b-1]);this.groupIntervalFactor=c=b*n/(e-a)}return c},postProcessTickInterval:function(a){var c=this.ordinalSlope;return c?this.options.breaks?this.closestPointRange||
a:a/(c/this.closestPointRange):a}});D.prototype.ordinal2lin=D.prototype.val2lin;r(F.prototype,"pan",function(a,k){var c=this.xAxis[0],m=c.options.overscroll,b=k.chartX,n=!1;if(c.options.ordinal&&c.series.length){var d=this.mouseDownX,r=c.getExtremes(),g=r.dataMax,w=r.min,v=r.max,A=this.hoverPoints,t=c.closestPointRange||c.overscrollPointsRange,d=(d-b)/(c.translationSlope*(c.ordinalSlope||t)),z={ordinalPositions:c.getExtendedPositions()},t=c.lin2val,x=c.val2lin,l;z.ordinalPositions?1<Math.abs(d)&&
(A&&e(A,function(a){a.setState()}),0>d?(A=z,l=c.ordinalPositions?c:z):(A=c.ordinalPositions?c:z,l=z),z=l.ordinalPositions,g>z[z.length-1]&&z.push(g),this.fixedRange=v-w,d=c.toFixedRange(null,null,t.apply(A,[x.apply(A,[w,!0])+d,!0]),t.apply(l,[x.apply(l,[v,!0])+d,!0])),d.min>=Math.min(r.dataMin,w)&&d.max<=Math.max(g,v)+m&&c.setExtremes(d.min,d.max,!0,!1,{trigger:"pan"}),this.mouseDownX=b,u(this.container,{cursor:"move"})):n=!0}else n=!0;n&&(m&&(c.max=c.dataMax+m),a.apply(this,Array.prototype.slice.call(arguments,
1)))})})(K);(function(a){function C(){return Array.prototype.slice.call(arguments,1)}function D(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,u(this.pointArrayMap,["y"]))}var F=a.addEvent,u=a.pick,m=a.wrap,e=a.each,x=a.extend,y=a.isArray,v=a.fireEvent,w=a.Axis,r=a.Series;x(w.prototype,{isInBreak:function(a,e){var c=a.repeat||Infinity,k=a.from,b=a.to-a.from;e=e>=k?(e-k)%c:c-(k-e)%c;return a.inclusive?e<=b:e<b&&0!==e},isInAnyBreak:function(a,e){var c=this.options.breaks,
k=c&&c.length,b,n,d;if(k){for(;k--;)this.isInBreak(c[k],a)&&(b=!0,n||(n=u(c[k].showPoints,this.isXAxis?!1:!0)));d=b&&e?b&&!n:b}return d}});F(w,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});F(w,"afterSetTickPositions",function(){if(this.isBroken){var a=this.tickPositions,e=this.tickPositions.info,h=[],m;for(m=0;m<a.length;m++)this.isInAnyBreak(a[m])||h.push(a[m]);this.tickPositions=h;this.tickPositions.info=e}});F(w,"afterSetOptions",function(){this.isBroken&&
(this.options.ordinal=!1)});w.prototype.setBreaks=function(a,k){function c(a){var c=a,d,e;for(e=0;e<b.breakArray.length;e++)if(d=b.breakArray[e],d.to<=a)c-=d.len;else if(d.from>=a)break;else if(b.isInBreak(d,a)){c-=a-d.from;break}return c}function m(a){var c,d;for(d=0;d<b.breakArray.length&&!(c=b.breakArray[d],c.from>=a);d++)c.to<a?a+=c.len:b.isInBreak(c,a)&&(a+=c.len);return a}var b=this,n=y(a)&&!!a.length;b.isDirty=b.isBroken!==n;b.isBroken=n;b.options.breaks=b.userOptions.breaks=a;b.forceRedraw=
!0;n||b.val2lin!==c||(delete b.val2lin,delete b.lin2val);n&&(b.userOptions.ordinal=!1,b.val2lin=c,b.lin2val=m,b.setExtremes=function(a,b,c,e,h){if(this.isBroken){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(b);)b-=this.closestPointRange}w.prototype.setExtremes.call(this,a,b,c,e,h)},b.setAxisTranslation=function(a){w.prototype.setAxisTranslation.call(this,a);this.unitLength=null;if(this.isBroken){a=b.options.breaks;var c=[],d=[],h=0,n,k,t=b.userMin||b.min,m=b.userMax||
b.max,q=u(b.pointRangePadding,0),l,r;e(a,function(a){k=a.repeat||Infinity;b.isInBreak(a,t)&&(t+=a.to%k-t%k);b.isInBreak(a,m)&&(m-=m%k-a.from%k)});e(a,function(a){l=a.from;for(k=a.repeat||Infinity;l-k>t;)l-=k;for(;l<t;)l+=k;for(r=l;r<m;r+=k)c.push({value:r,move:"in"}),c.push({value:r+(a.to-a.from),move:"out",size:a.breakSize})});c.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-b.value});n=0;l=t;e(c,function(a){n+="in"===a.move?1:-1;1===n&&"in"===a.move&&
(l=a.value);0===n&&(d.push({from:l,to:a.value,len:a.value-l-(a.size||0)}),h+=a.value-l-(a.size||0))});b.breakArray=d;b.unitLength=m-t-h+q;v(b,"afterBreaks");b.staticScale?b.transA=b.staticScale:b.unitLength&&(b.transA*=(m-b.min+q)/b.unitLength);q&&(b.minPixelPadding=b.transA*b.minPointOffset);b.min=t;b.max=m}});u(k,!0)&&this.chart.redraw()};m(r.prototype,"generatePoints",function(a){a.apply(this,C(arguments));var c=this.xAxis,e=this.yAxis,m=this.points,b,n=m.length,d=this.options.connectNulls,r;if(c&&
e&&(c.options.breaks||e.options.breaks))for(;n--;)b=m[n],r=null===b.y&&!1===d,r||!c.isInAnyBreak(b.x,!0)&&!e.isInAnyBreak(b.y,!0)||(m.splice(n,1),this.data[n]&&this.data[n].destroyElements())});a.Series.prototype.drawBreaks=function(a,k){var c=this,m=c.points,b,n,d,r;a&&e(k,function(g){b=a.breakArray||[];n=a.isXAxis?a.min:u(c.options.threshold,a.min);e(m,function(c){r=u(c["stack"+g.toUpperCase()],c[g]);e(b,function(b){d=!1;if(n<b.from&&r>b.to||n>b.from&&r<b.from)d="pointBreak";else if(n<b.from&&r>
b.from&&r<b.to||n>b.from&&r>b.to&&r<b.from)d="pointInBreak";d&&v(a,d,{point:c,brk:b})})})})};a.Series.prototype.gappedPath=function(){var c=this.currentDataGrouping,e=c&&c.totalRange,c=this.options.gapSize,h=this.points.slice(),m=h.length-1,b=this.yAxis;if(c&&0<m)for("value"!==this.options.gapUnit&&(c*=this.closestPointRange),e&&e>c&&(c=e);m--;)h[m+1].x-h[m].x>c&&(e=(h[m].x+h[m+1].x)/2,h.splice(m+1,0,{isNull:!0,x:e}),this.options.stacking&&(e=b.stacks[this.stackKey][e]=new a.StackItem(b,b.options.stackLabels,
!1,e,this.stack),e.total=0));return this.getGraphPath(h)};m(a.seriesTypes.column.prototype,"drawPoints",D);m(a.Series.prototype,"drawPoints",D)})(K);(function(a){var C=a.addEvent,D=a.arrayMax,F=a.arrayMin,u=a.Axis,m=a.defaultPlotOptions,e=a.defined,x=a.each,y=a.extend,v=a.format,w=a.isNumber,r=a.merge,c=a.pick,k=a.Point,h=a.Series,q=a.Tooltip,b=a.wrap,n=h.prototype,d=n.processData,E=n.generatePoints,g={approximation:"average",groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L",
"%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},G={line:{},spline:{},area:{},areaspline:{},column:{approximation:"sum",groupPixelWidth:10},arearange:{approximation:"range"},
areasplinerange:{approximation:"range"},columnrange:{approximation:"range",groupPixelWidth:10},candlestick:{approximation:"ohlc",groupPixelWidth:10},ohlc:{approximation:"ohlc",groupPixelWidth:5}},I=a.defaultDataGroupingUnits=[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]],A=a.approximations={sum:function(a){var b=a.length,c;if(!b&&a.hasNulls)c=null;else if(b)for(c=
0;b--;)c+=a[b];return c},average:function(a){var b=a.length;a=A.sum(a);w(a)&&b&&(a/=b);return a},averages:function(){var a=[];x(arguments,function(b){a.push(A.average(b))});return void 0===a[0]?void 0:a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?D(a):a.hasNulls?null:void 0},low:function(a){return a.length?F(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,b,c,d){a=A.open(a);b=A.high(b);
c=A.low(c);d=A.close(d);if(w(a)||w(b)||w(c)||w(d))return[a,b,c,d]},range:function(a,b){a=A.low(a);b=A.high(b);if(w(a)||w(b))return[a,b];if(null===a&&null===b)return null}};n.groupData=function(a,b,c,d){var l=this,f=l.data,h=l.options.data,n=[],p=[],k=[],m=a.length,t,q,v=!!b,z=[];d="function"===typeof d?d:A[d]||G[l.type]&&A[G[l.type].approximation]||A[g.approximation];var u=l.pointArrayMap,y=u&&u.length,J=["x"].concat(u||["y"]),I=0,E=0,D,C;y?x(u,function(){z.push([])}):z.push([]);D=y||1;for(C=0;C<=
m&&!(a[C]>=c[0]);C++);for(C;C<=m;C++){for(;void 0!==c[I+1]&&a[C]>=c[I+1]||C===m;){t=c[I];l.dataGroupInfo={start:E,length:z[0].length};q=d.apply(l,z);e(l.dataGroupInfo.options)||(l.dataGroupInfo.options=r(l.pointClass.prototype.optionsToObject.call({series:l},l.options.data[E])),x(J,function(a){delete l.dataGroupInfo.options[a]}));void 0!==q&&(n.push(t),p.push(q),k.push(l.dataGroupInfo));E=C;for(t=0;t<D;t++)z[t].length=0,z[t].hasNulls=!1;I+=1;if(C===m)break}if(C===m)break;if(u){t=l.cropStart+C;q=f&&
f[t]||l.pointClass.prototype.applyOptions.apply({series:l},[h[t]]);var F;for(t=0;t<y;t++)F=q[u[t]],w(F)?z[t].push(F):null===F&&(z[t].hasNulls=!0)}else t=v?b[C]:null,w(t)?z[0].push(t):null===t&&(z[0].hasNulls=!0)}return[n,p,k]};n.processData=function(){var a=this.chart,b=this.options.dataGrouping,g=!1!==this.allowDG&&b&&c(b.enabled,a.options.isStock),l=this.visible||!a.options.chart.ignoreHiddenSeries,h,f=this.currentDataGrouping,k;this.forceCrop=g;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==
d.apply(this,arguments)&&g){this.destroyGroupedData();var m,p=b.groupAll?this.xData:this.processedXData,q=b.groupAll?this.yData:this.processedYData,r=a.plotSizeX,a=this.xAxis,v=a.options.ordinal,w=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(w){this.isDirty=h=!0;this.points=null;g=a.getExtremes();k=g.min;g=g.max;v=v&&a.getGroupIntervalFactor(k,g,this)||1;w=w*(g-k)/r*v;r=a.getTimeTicks(a.normalizeTimeTickInterval(w,b.units||I),Math.min(k,p[0]),Math.max(g,p[p.length-1]),a.options.startOfWeek,
p,this.closestPointRange);q=n.groupData.apply(this,[p,q,r,b.approximation]);p=q[0];v=q[1];if(b.smoothed&&p.length){m=p.length-1;for(p[m]=Math.min(p[m],g);m--&&0<m;)p[m]+=w/2;p[0]=Math.max(p[0],k)}k=r.info;this.closestPointRange=r.info.totalRange;this.groupMap=q[2];if(e(p[0])&&p[0]<a.dataMin&&l){if(!e(a.options.min)&&a.min<=a.dataMin||a.min===a.dataMin)a.min=p[0];a.dataMin=p[0]}b.groupAll&&(b=this.cropData(p,v,a.min,a.max,1),p=b.xData,v=b.yData);this.processedXData=p;this.processedYData=v}else this.groupMap=
null;this.hasGroupedData=h;this.currentDataGrouping=k;this.preventGraphAnimation=(f&&f.totalRange)!==(k&&k.totalRange)}};n.destroyGroupedData=function(){var a=this.groupedData;x(a||[],function(b,c){b&&(a[c]=b.destroy?b.destroy():null)});this.groupedData=null};n.generatePoints=function(){E.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};C(k,"update",function(){if(this.dataGroup)return a.error(24),!1});b(q.prototype,"tooltipFooterHeaderFormatter",function(a,
b,c){var d=this.chart.time,e=b.series,f=e.tooltipOptions,g=e.options.dataGrouping,h=f.xDateFormat,p,n=e.xAxis;return n&&"datetime"===n.options.type&&g&&w(b.key)?(a=e.currentDataGrouping,g=g.dateTimeLabelFormats,a?(n=g[a.unitName],1===a.count?h=n[0]:(h=n[1],p=n[2])):!h&&g&&(h=this.getXDateFormat(b,f,n)),h=d.dateFormat(h,b.key),p&&(h+=d.dateFormat(p,b.key+a.totalRange-1)),v(f[(c?"footer":"header")+"Format"],{point:y(b.point,{key:h}),series:e},d)):a.call(this,b,c)});C(h,"destroy",n.destroyGroupedData);
C(h,"afterSetOptions",function(a){a=a.options;var b=this.type,c=this.chart.options.plotOptions,d=m[b].dataGrouping,e=this.useCommonDataGrouping&&g;if(G[b]||e)d||(d=r(g,G[b])),a.dataGrouping=r(e,d,c.series&&c.series.dataGrouping,c[b].dataGrouping,this.userOptions.dataGrouping);this.chart.options.isStock&&(this.requireSorting=!0)});C(u,"afterSetScale",function(){x(this.series,function(a){a.hasProcessed=!1})});u.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,d=0,e=!1,f;for(c=
b;c--;)(f=a[c].options.dataGrouping)&&(d=Math.max(d,f.groupPixelWidth));for(c=b;c--;)(f=a[c].options.dataGrouping)&&a[c].hasProcessed&&(b=(a[c].processedXData||a[c].data).length,a[c].groupPixelWidth||b>this.chart.plotSizeX/d||b&&f.forced)&&(e=!0);return e?d:0};u.prototype.setDataGrouping=function(a,b){var d;b=c(b,!0);a||(a={forced:!1,units:null});if(this instanceof u)for(d=this.series.length;d--;)this.series[d].update({dataGrouping:a},!1);else x(this.chart.options.series,function(b){b.dataGrouping=
a},!1);this.ordinalSlope=null;b&&this.chart.redraw()}})(K);(function(a){var C=a.each,D=a.Point,F=a.seriesType,u=a.seriesTypes;F("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e \x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eOpen: {point.open}\x3cbr/\x3eHigh: {point.high}\x3cbr/\x3eLow: {point.low}\x3cbr/\x3eClose: {point.close}\x3cbr/\x3e'},threshold:null,stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low",
"close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"close",translate:function(){var a=this,e=a.yAxis,x=!!a.modifyValue,y=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];u.column.prototype.translate.apply(a);C(a.points,function(m){C([m.open,m.high,m.low,m.close,m.low],function(w,r){null!==w&&(x&&(w=a.modifyValue(w)),m[y[r]]=e.toPixels(w,!0))});m.tooltipPos[1]=m.plotHigh+e.pos-a.chart.plotTop})},drawPoints:function(){var a=this,e=a.chart;C(a.points,function(m){var u,
v,w,r,c=m.graphic,k,h=!c;void 0!==m.plotY&&(c||(m.graphic=c=e.renderer.path().add(a.group)),v=c.strokeWidth()%2/2,k=Math.round(m.plotX)-v,w=Math.round(m.shapeArgs.width/2),r=["M",k,Math.round(m.yBottom),"L",k,Math.round(m.plotHigh)],null!==m.open&&(u=Math.round(m.plotOpen)+v,r.push("M",k,u,"L",k-w,u)),null!==m.close&&(u=Math.round(m.plotClose)+v,r.push("M",k,u,"L",k+w,u)),c[h?"attr":"animate"]({d:r}).addClass(m.getClassName(),!0))})},animate:null},{getClassName:function(){return D.prototype.getClassName.call(this)+
(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(K);(function(a){var C=a.defaultPlotOptions,D=a.each,F=a.merge;a=a.seriesType;a("candlestick","ohlc",F(C.column,{states:{hover:{lineWidth:2}},tooltip:C.ohlc.tooltip,threshold:null,stickyTracking:!0}),{drawPoints:function(){var a=this,m=a.chart,e=a.yAxis.reversed;D(a.points,function(u){var x=u.graphic,v,w,r,c,k,h,q,b=!x;void 0!==u.plotY&&(x||(u.graphic=x=m.renderer.path().add(a.group)),k=x.strokeWidth()%2/2,h=Math.round(u.plotX)-
k,v=u.plotOpen,w=u.plotClose,r=Math.min(v,w),v=Math.max(v,w),q=Math.round(u.shapeArgs.width/2),w=e?v!==u.yBottom:Math.round(r)!==Math.round(u.plotHigh),c=e?Math.round(r)!==Math.round(u.plotHigh):v!==u.yBottom,r=Math.round(r)+k,v=Math.round(v)+k,k=[],k.push("M",h-q,v,"L",h-q,r,"L",h+q,r,"L",h+q,v,"Z","M",h,r,"L",h,w?Math.round(e?u.yBottom:u.plotHigh):r,"M",h,v,"L",h,c?Math.round(e?u.plotHigh:u.yBottom):v),x[b?"attr":"animate"]({d:k}).addClass(u.getClassName(),!0))})}})})(K);Z=function(a){var C=a.each,
D=a.defined,F=a.seriesTypes,u=a.stableSort;return{getPlotBox:function(){return a.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){F.column.prototype.translate.apply(this);var a=this.options,e=this.chart,x=this.points,y=x.length-1,v,w,r=a.onSeries,r=r&&e.get(r),a=a.onKey||"y",c=r&&r.options.step,k=r&&r.points,h=k&&k.length,q=e.inverted,b=this.xAxis,n=this.yAxis,d=0,E,g,G,I;if(r&&r.visible&&h)for(d=(r.pointXOffset||0)+(r.barW||
0)/2,v=r.currentDataGrouping,g=k[h-1].x+(v?v.totalRange:0),u(x,function(a,b){return a.x-b.x}),a="plot"+a[0].toUpperCase()+a.substr(1);h--&&x[y]&&!(E=k[h],v=x[y],v.y=E.y,E.x<=v.x&&void 0!==E[a]&&(v.x<=g&&(v.plotY=E[a],E.x<v.x&&!c&&(G=k[h+1])&&void 0!==G[a]&&(I=(v.x-E.x)/(G.x-E.x),v.plotY+=I*(G[a]-E[a]),v.y+=I*(G.y-E.y))),y--,h++,0>y)););C(x,function(a,c){var g;a.plotX+=d;if(void 0===a.plotY||q)0<=a.plotX&&a.plotX<=b.len?q?(a.plotY=b.translate(a.x,0,1,0,1),a.plotX=D(a.y)?n.translate(a.y,0,0,0,1):0):
a.plotY=e.chartHeight-b.bottom-(b.opposite?b.height:0)+b.offset-n.top:a.shapeArgs={};(w=x[c-1])&&w.plotX===a.plotX&&(void 0===w.stackIndex&&(w.stackIndex=0),g=w.stackIndex+1);a.stackIndex=g});this.onSeries=r}}}(K);(function(a,C){function D(a){v[a+"pin"]=function(e,c,k,h,m){var b=m&&m.anchorX;m=m&&m.anchorY;"circle"===a&&h>k&&(e-=Math.round((h-k)/2),k=h);e=v[a](e,c,k,h);b&&m&&(e.push("M","circle"===a?e[1]-e[4]:e[1]+e[4]/2,c>m?c:c+h,"L",b,m),e=e.concat(v.circle(b-1,m-1,2,2)));return e}}var F=a.addEvent,
u=a.each,m=a.noop,e=a.Series,x=a.seriesType,y=a.TrackerMixin,v=a.SVGRenderer.prototype.symbols;x("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}\x3cbr/\x3e"},threshold:null,y:-30},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:e.prototype.init,translate:C.translate,getPlotBox:C.getPlotBox,drawPoints:function(){var e=this.points,m=this.chart,c=m.renderer,
k,h,q=m.inverted,b=this.options,n=b.y,d,v,g,x,y,A,t=this.yAxis,z={},J=[];for(v=e.length;v--;)g=e[v],A=(q?g.plotY:g.plotX)>this.xAxis.len,k=g.plotX,x=g.stackIndex,d=g.options.shape||b.shape,h=g.plotY,void 0!==h&&(h=g.plotY+n-(void 0!==x&&x*b.stackDistance)),g.anchorX=x?void 0:g.plotX,y=x?void 0:g.plotY,x=g.graphic,void 0!==h&&0<=k&&!A?(x||(x=g.graphic=c.label("",null,null,d,null,null,b.useHTML).attr({align:"flag"===d?"left":"center",width:b.width,height:b.height,"text-align":b.textAlign}).addClass("highcharts-point").add(this.markerGroup),
g.graphic.div&&(g.graphic.div.point=g),x.isNew=!0),0<k&&(k-=x.strokeWidth()%2),d={y:h,anchorY:y},b.allowOverlapX&&(d.x=k,d.anchorX=g.anchorX),x.attr({text:g.options.title||b.title||"A"})[x.isNew?"attr":"animate"](d),b.allowOverlapX||(z[g.plotX]?z[g.plotX].size=Math.max(z[g.plotX].size,x.width):z[g.plotX]={align:0,size:x.width,target:k,anchorX:k}),g.tooltipPos=[k,h+t.pos-m.plotTop]):x&&(g.graphic=x.destroy());b.allowOverlapX||(a.objectEach(z,function(a){a.plotX=a.anchorX;J.push(a)}),a.distribute(J,
q?t.len:this.xAxis.len,100),u(e,function(a){var b=a.graphic&&z[a.plotX];b&&(a.graphic[a.graphic.isNew?"attr":"animate"]({x:b.pos,anchorX:a.anchorX}),b.pos?a.graphic.isNew=!1:(a.graphic.attr({x:-9999,anchorX:-9999}),a.graphic.isNew=!0))}));b.useHTML&&a.wrap(this.markerGroup,"on",function(b){return a.SVGElement.prototype.on.apply(b.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var a=this.points;y.drawTrackerPoint.apply(this);u(a,function(e){var c=e.graphic;
c&&F(c.element,"mouseover",function(){0<e.stackIndex&&!e.raised&&(e._y=c.y,c.attr({y:e._y-8}),e.raised=!0);u(a,function(a){a!==e&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:function(a){a?this.setClip():this.animate=null},setClip:function(){e.prototype.setClip.apply(this,arguments);!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup.clip(this.chart[this.sharedClipKey])},buildKDTree:m,invertGroups:m});v.flag=function(a,e,c,k,h){var m=h&&h.anchorX||a;h=h&&h.anchorY||
e;return v.circle(m-1,h-1,2,2).concat(["M",m,h,"L",a,e+k,a,e,a+c,e,a+c,e+k,a,e+k,"Z"])};D("circle");D("square")})(K,Z);(function(a){function C(a,c,d){this.init(a,c,d)}var D=a.addEvent,F=a.Axis,u=a.correctFloat,m=a.defaultOptions,e=a.defined,x=a.destroyObjectProperties,y=a.each,v=a.fireEvent,w=a.hasTouch,r=a.merge,c=a.pick,k=a.removeEvent,h,q={height:a.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3};m.scrollbar=r(!0,q,m.scrollbar);
a.swapXY=h=function(a,c){var b=a.length,e;if(c)for(c=0;c<b;c+=3)e=a[c+1],a[c+1]=a[c+2],a[c+2]=e;return a};C.prototype={init:function(a,e,d){this.scrollbarButtons=[];this.renderer=a;this.userOptions=e;this.options=r(q,e);this.chart=d;this.size=c(this.options.size,this.options.height);e.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,c=this.options,d=this.size,e;this.group=e=a.g("scrollbar").attr({zIndex:c.zIndex,translateY:-99999}).add();this.track=
a.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:c.trackBorderRadius||0,height:d,width:d}).add(e);this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(e);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:d,width:d,r:c.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(h(["M",-3,d/4,"L",-3,2*d/3,"M",0,d/4,"L",0,2*d/3,"M",3,d/4,"L",3,2*d/3],c.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);
this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)},position:function(a,c,d,e){var b=this.options.vertical,h=0,n=this.rendered?"animate":"attr";this.x=a;this.y=c+this.trackBorderWidth;this.width=d;this.xOffset=this.height=e;this.yOffset=h;b?(this.width=this.yOffset=d=h=this.size,this.xOffset=c=0,this.barWidth=e-2*d,this.x=a+=this.options.margin):
(this.height=this.xOffset=e=c=this.size,this.barWidth=d-2*e,this.y+=this.options.margin);this.group[n]({translateX:a,translateY:this.y});this.track[n]({width:d,height:e});this.scrollbarButtons[1][n]({translateX:b?0:d-c,translateY:b?e-h:0})},drawScrollbarButton:function(a){var b=this.renderer,c=this.scrollbarButtons,e=this.options,g=this.size,k;k=b.g().add(this.group);c.push(k);k=b.rect().addClass("highcharts-scrollbar-button").add(k);k.attr(k.crisp({x:-.5,y:-.5,width:g+1,height:g+1,r:e.buttonBorderRadius},
k.strokeWidth()));b.path(h(["M",g/2+(a?-1:1),g/2-3,"L",g/2+(a?-1:1),g/2+3,"L",g/2+(a?2:-2),g/2],e.vertical)).addClass("highcharts-scrollbar-arrow").add(c[a])},setRange:function(a,c){var b=this.options,h=b.vertical,g=b.minWidth,n=this.barWidth,k,m,t=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";e(n)&&(a=Math.max(a,0),k=Math.ceil(n*a),this.calculatedWidth=m=u(n*Math.min(c,1)-k),m<g&&(k=(n-g+m)*a,m=g),g=Math.floor(k+this.xOffset+this.yOffset),
n=m/2-.5,this.from=a,this.to=c,h?(this.scrollbarGroup[t]({translateY:g}),this.scrollbar[t]({height:m}),this.scrollbarRifles[t]({translateY:n}),this.scrollbarTop=g,this.scrollbarLeft=0):(this.scrollbarGroup[t]({translateX:g}),this.scrollbar[t]({width:m}),this.scrollbarRifles[t]({translateX:n}),this.scrollbarLeft=g,this.scrollbarTop=0),12>=m?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===b.showFull&&(0>=a&&1<=c?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=
this;a.mouseMoveHandler=function(b){var c=a.chart.pointer.normalize(b),e=a.options.vertical?"chartY":"chartX",g=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][e]||(c=a.cursorToScrollbarPosition(c)[e],e=a[e],e=c-e,a.hasDragged=!0,a.updatePosition(g[0]+e,g[1]+e),a.hasDragged&&v(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&v(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});
a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=function(b){b=a.chart.pointer.normalize(b);b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY;a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var c=u(a.to-a.from)*a.options.step;a.updatePosition(u(a.from-c),u(a.to-c));v(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var c=(a.to-a.from)*a.options.step;a.updatePosition(a.from+c,
a.to+c);v(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var c=a.chart.pointer.normalize(b),e=a.to-a.from,g=a.y+a.scrollbarTop,h=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>g||!a.options.vertical&&c.chartX>h?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);v(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})}},cursorToScrollbarPosition:function(a){var b=this.options,b=b.minWidth>this.calculatedWidth?b.minWidth:0;return{chartX:(a.chartX-
this.x-this.xOffset)/(this.barWidth-b),chartY:(a.chartY-this.y-this.yOffset)/(this.barWidth-b)}},updatePosition:function(a,c){1<c&&(a=u(1-u(c-a)),c=1);0>a&&(c=u(c-a),a=0);this.from=a;this.to=c},update:function(a){this.destroy();this.init(this.chart.renderer,r(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],c=this.scrollbarButtons,d=this.scrollbarGroup.element,e=this.mouseDownHandler,g=this.mouseMoveHandler,h=this.mouseUpHandler,a=[[c[a[0]].element,"click",
this.buttonToMinClick],[c[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[d,"mousedown",e],[d.ownerDocument,"mousemove",g],[d.ownerDocument,"mouseup",h]];w&&a.push([d,"touchstart",e],[d.ownerDocument,"touchmove",g],[d.ownerDocument,"touchend",h]);y(a,function(a){D.apply(null,a)});this._events=a},removeEvents:function(){y(this._events,function(a){k.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();y(["track",
"scrollbarRifles","scrollbar","scrollbarGroup","group"],function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,x(a.scrollbarButtons))}};D(F,"afterInit",function(){var a=this;a.options&&a.options.scrollbar&&a.options.scrollbar.enabled&&(a.options.scrollbar.vertical=!a.horiz,a.options.startOnTick=a.options.endOnTick=!1,a.scrollbar=new C(a.chart.renderer,a.options.scrollbar,a.chart),D(a.scrollbar,"changed",function(b){var d=Math.min(c(a.options.min,
a.min),a.min,a.dataMin),e=Math.max(c(a.options.max,a.max),a.max,a.dataMax)-d,g;a.horiz&&!a.reversed||!a.horiz&&a.reversed?(g=d+e*this.to,d+=e*this.from):(g=d+e*(1-this.from),d+=e*(1-this.to));a.setExtremes(d,g,!0,!1,b)}))});D(F,"afterRender",function(){var a=Math.min(c(this.options.min,this.min),this.min,c(this.dataMin,this.min)),h=Math.max(c(this.options.max,this.max),this.max,c(this.dataMax,this.max)),d=this.scrollbar,k=this.titleOffset||0;if(d){this.horiz?(d.position(this.left,this.top+this.height+
2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:k+this.axisTitleMargin+this.offset),this.width,this.height),k=1):(d.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?k+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),k=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[k]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(a)||isNaN(h)||!e(this.min)||!e(this.max)?d.setRange(0,0):(k=(this.min-a)/(h-a),a=
(this.max-a)/(h-a),this.horiz&&!this.reversed||!this.horiz&&this.reversed?d.setRange(k,a):d.setRange(1-a,1-k))}});D(F,"afterGetOffset",function(){var a=this.horiz?2:1,c=this.scrollbar;c&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[a]+=c.size+c.options.margin)});a.Scrollbar=C})(K);(function(a){function C(a){this.init(a)}var D=a.addEvent,F=a.Axis,u=a.Chart,m=a.defaultOptions,e=a.defined,x=a.destroyObjectProperties,y=a.each,v=a.erase,w=a.error,r=a.extend,c=a.grep,k=a.hasTouch,h=a.isArray,
q=a.isNumber,b=a.isObject,n=a.isTouchDevice,d=a.merge,E=a.pick,g=a.removeEvent,G=a.Scrollbar,I=a.Series,A=a.seriesTypes,t=a.wrap,z=[].concat(a.defaultDataGroupingUnits),J=function(a){var b=c(arguments,q);if(b.length)return Math[a].apply(0,b)};z[4]=["day",[1,2,3,4]];z[5]=["week",[1,2,3]];r(m,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0},series:{type:void 0===A.areaspline?"line":"areaspline",compare:null,dataGrouping:{approximation:"average",
enabled:!0,groupPixelWidth:2,smoothed:!0,units:z},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,tickPixelInterval:200,labels:{align:"left",x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},
tickLength:0,tickWidth:0}}});a.Renderer.prototype.symbols["navigator-handle"]=function(a,b,c,d,e){a=e.width/2;b=Math.round(a/3)+.5;e=e.height;return["M",-a-1,.5,"L",a,.5,"L",a,e+.5,"L",-a-1,e+.5,"L",-a-1,.5,"M",-b,4,"L",-b,e-3,"M",b-1,4,"L",b-1,e-3]};C.prototype={drawHandle:function(a,b,c,d){var e=this.navigatorOptions.handles.height;this.handles[b][d](c?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(a,10)+.5-e)}:{translateX:Math.round(this.left+parseInt(a,
10)),translateY:Math.round(this.top+this.height/2-e/2-1)})},drawOutline:function(a,b,c,d){var e=this.navigatorOptions.maskInside,f=this.outline.strokeWidth(),l=f/2,f=f%2/2,g=this.outlineHeight,h=this.scrollbarHeight,k=this.size,m=this.left-h,n=this.top;c?(m-=l,c=n+b+f,b=n+a+f,a=["M",m+g,n-h-f,"L",m+g,c,"L",m,c,"L",m,b,"L",m+g,b,"L",m+g,n+k+h].concat(e?["M",m+g,c-l,"L",m+g,b+l]:[])):(a+=m+h-f,b+=m+h-f,n+=l,a=["M",m,n,"L",a,n,"L",a,n+g,"L",b,n+g,"L",b,n,"L",m+k+2*h,n].concat(e?["M",a-l,n,"L",b+l,n]:
[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var e=this.left,f=this.top,l=this.height,g,h,k,m;c?(k=[e,e,e],m=[f,f+a,f+b],h=[l,l,l],g=[a,b-a,this.size-b]):(k=[e,e+a,e+b],m=[f,f,f],h=[a,b-a,this.size-b],g=[l,l,l]);y(this.shades,function(a,b){a[d]({x:k[b],y:m[b],width:h[b],height:g[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,e=d.renderer,g;a.navigatorGroup=g=e.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();y([!c,c,!c],function(b,c){a.shades[c]=
e.rect().addClass("highcharts-navigator-mask"+(1===c?"-inside":"-outside")).add(g)});a.outline=e.path().addClass("highcharts-navigator-outline").add(g);b.handles.enabled&&y([0,1],function(c){b.handles.inverted=d.inverted;a.handles[c]=e.symbol(b.handles.symbols[c],-b.handles.width/2-1,0,b.handles.width,b.handles.height,b.handles);a.handles[c].attr({zIndex:7-c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(g)})},update:function(a){y(this.series||[],function(a){a.baseSeries&&
delete a.baseSeries.navigatorSeries});this.destroy();d(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(b,c,d,g){var f=this.chart,l,h,k=this.scrollbarHeight,m,n=this.xAxis;l=n.fake?f.xAxis[0]:n;var t=this.navigatorEnabled,r,u=this.rendered;h=f.inverted;var v,w=f.xAxis[0].minRange,z=f.xAxis[0].options.maxRange;if(!this.hasDragged||e(d)){if(!q(b)||!q(c))if(u)d=0,g=E(n.width,l.width);else return;this.left=E(n.left,f.plotLeft+k+(h?f.plotWidth:0));this.size=r=m=E(n.len,
(h?f.plotHeight:f.plotWidth)-2*k);f=h?k:m+2*k;d=E(d,n.toPixels(b,!0));g=E(g,n.toPixels(c,!0));q(d)&&Infinity!==Math.abs(d)||(d=0,g=f);b=n.toValue(d,!0);c=n.toValue(g,!0);v=Math.abs(a.correctFloat(c-b));v<w?this.grabbedLeft?d=n.toPixels(c-w,!0):this.grabbedRight&&(g=n.toPixels(b+w,!0)):e(z)&&v>z&&(this.grabbedLeft?d=n.toPixels(c-z,!0):this.grabbedRight&&(g=n.toPixels(b+z,!0)));this.zoomedMax=Math.min(Math.max(d,g,0),r);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:
Math.min(d,g),0),r);this.range=this.zoomedMax-this.zoomedMin;r=Math.round(this.zoomedMax);d=Math.round(this.zoomedMin);t&&(this.navigatorGroup.attr({visibility:"visible"}),u=u&&!this.hasDragged?"animate":"attr",this.drawMasks(d,r,h,u),this.drawOutline(d,r,h,u),this.navigatorOptions.handles.enabled&&(this.drawHandle(d,0,h,u),this.drawHandle(r,1,h,u)));this.scrollbar&&(h?(h=this.top-k,l=this.left-k+(t||!l.opposite?0:(l.titleOffset||0)+l.axisTitleMargin),k=m+2*k):(h=this.top+(t?this.height:-k),l=this.left-
k),this.scrollbar.position(l,h,f,k),this.scrollbar.setRange(this.zoomedMin/(m||1),this.zoomedMax/(m||1)));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,c=b.container,d=[],e,g;a.mouseMoveHandler=e=function(b){a.onMouseMove(b)};a.mouseUpHandler=g=function(b){a.onMouseUp(b)};d=a.getPartsEvents("mousedown");d.push(D(c,"mousemove",e),D(c.ownerDocument,"mouseup",g));k&&(d.push(D(c,"touchmove",e),D(c.ownerDocument,"touchend",g)),d.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=
d;a.series&&a.series[0]&&d.push(D(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,c=[];y(["shades","handles"],function(d){y(b[d],function(e,f){c.push(D(e.element,a,function(a){b[d+"Mousedown"](a,f)}))})});return c},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var c=this.chart,d=this.xAxis,g=this.zoomedMin,l=this.left,h=this.size,k=this.range,m=a.chartX,n,t;c.inverted&&(m=a.chartY,l=this.top);1===b?
(this.grabbedCenter=m,this.fixedWidth=k,this.dragOffset=m-g):(a=m-l-k/2,0===b?a=Math.max(0,a):2===b&&a+k>=h&&(a=h-k,this.reversedExtremes?(a-=k,t=this.getUnionExtremes().dataMin):n=this.getUnionExtremes().dataMax),a!==g&&(this.fixedWidth=k,b=d.toFixedRange(a,a+k,t,n),e(b.min)&&c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(a,b){this.chart.pointer.normalize(a);a=this.chart;var c=a.xAxis[0],d=this.reversedExtremes;0===b?
(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?c.min:c.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?c.max:c.min);a.fixedRange=null},onMouseMove:function(b){var c=this,d=c.chart,e=c.left,g=c.navigatorSize,l=c.range,h=c.dragOffset,k=d.inverted;b.touches&&0===b.touches[0].pageX||(b=d.pointer.normalize(b),d=b.chartX,k&&(e=c.top,d=b.chartY),c.grabbedLeft?(c.hasDragged=!0,c.render(0,0,d-e,c.otherHandlePos)):c.grabbedRight?(c.hasDragged=!0,
c.render(0,0,c.otherHandlePos,d-e)):c.grabbedCenter&&(c.hasDragged=!0,d<h?d=h:d>g+h-l&&(d=g+h-l),c.render(0,0,d-h,d-h+l)),c.hasDragged&&c.scrollbar&&E(c.scrollbar.options.liveRedraw,a.svg&&!n&&!this.chart.isBoosting)&&(b.DOMType=b.type,setTimeout(function(){c.onMouseUp(b)},0)))},onMouseUp:function(a){var b=this.chart,c=this.xAxis,d=this.scrollbar,g,l,h=a.DOMEvent||a;(!this.hasDragged||d&&d.hasDragged)&&"scrollbar"!==a.trigger||(d=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?g=this.fixedExtreme:
this.zoomedMax===this.otherHandlePos&&(l=this.fixedExtreme),this.zoomedMax===this.size&&(l=this.reversedExtremes?d.dataMin:d.dataMax),0===this.zoomedMin&&(g=this.reversedExtremes?d.dataMax:d.dataMin),c=c.toFixedRange(this.zoomedMin,this.zoomedMax,g,l),e(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:h}));"mousemove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=
this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(y(this.eventsToUnbind,function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&y(a,function(a){g(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&g(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=
a.options,c=b.navigator,e=c.enabled,g=b.scrollbar,l=g.enabled,b=e?c.height:0,h=l?g.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=h;this.scrollbarEnabled=l;this.navigatorEnabled=e;this.navigatorOptions=c;this.scrollbarOptions=g;this.outlineHeight=b+h;this.opposite=E(c.opposite,!e&&a.inverted);var k=this,e=k.baseSeries,g=a.xAxis.length,l=a.yAxis.length,m=e&&e[0]&&e[0].xAxis||a.xAxis[0]||{options:{}};a.isDirtyBox=!0;k.navigatorEnabled?(k.xAxis=
new F(a,d({breaks:m.options.breaks,ordinal:m.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:g,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[h,0,-h,0],width:b}:{offsets:[0,-h,0,h],height:b})),k.yAxis=new F(a,d(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:l,isInternal:!0,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||c.series.data?k.updateNavigatorSeries(!1):
0===a.series.length&&(k.unbindRedraw=D(a,"beforeRedraw",function(){0<a.series.length&&!k.series&&(k.setBaseSeries(),k.unbindRedraw())})),k.reversedExtremes=a.inverted&&!k.xAxis.reversed||!a.inverted&&k.xAxis.reversed,k.renderElements(),k.addMouseEvents()):k.xAxis={translate:function(b,c){var d=a.xAxis[0],e=d.getExtremes(),f=d.len-2*h,g=J("min",d.options.min,e.dataMin),d=J("max",d.options.max,e.dataMax)-g;return c?b*d/f+g:f*(b-g)/d},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,
!0)},toFixedRange:F.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=k.scrollbar=new G(a.renderer,d(a.options.scrollbar,{margin:k.navigatorEnabled?0:10,vertical:a.inverted}),a),D(k.scrollbar,"changed",function(b){var c=k.size,d=c*this.to,c=c*this.from;k.hasDragged=k.scrollbar.hasDragged;k.render(0,0,c,d);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType)&&setTimeout(function(){k.onMouseUp(b)})}));k.addBaseSeriesEvents();k.addChartEvents()},
getUnionExtremes:function(a){var b=this.chart.xAxis[0],c=this.xAxis,d=c.options,e=b.options,g;a&&null===b.dataMin||(g={dataMin:E(d&&d.min,J("min",e.min,b.dataMin,c.dataMin,c.min)),dataMax:E(d&&d.max,J("max",e.max,b.dataMax,c.dataMax,c.max))});return g},setBaseSeries:function(a,b){var c=this.chart,d=this.baseSeries=[];a=a||c.options&&c.options.navigator.baseSeries||0;y(c.series||[],function(b,c){b.options.isInternal||!b.options.showInNavigator&&(c!==a&&b.options.id!==a||!1===b.options.showInNavigator)||
d.push(b)});this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(!0,b)},updateNavigatorSeries:function(b,c){var e=this,l=e.chart,k=e.baseSeries,p,n,t=e.navigatorOptions.series,q,u={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0},v=e.series=a.grep(e.series||[],function(b){var c=b.baseSeries;return 0>a.inArray(c,k)?(c&&(g(c,"updatedData",e.updatedDataHandler),delete c.navigatorSeries),
b.chart&&b.destroy(),!1):!0});k&&k.length&&y(k,function(a){var b=a.navigatorSeries,f=r({color:a.color,visible:a.visible},h(t)?m.navigator.series:t);b&&!1===e.navigatorOptions.adaptToUpdatedData||(u.name="Navigator "+k.length,p=a.options||{},q=p.navigatorOptions||{},n=d(p,u,f,q),f=q.data||f.data,e.hasNavigatorData=e.hasNavigatorData||!!f,n.data=f||p.data&&p.data.slice(0),b&&b.options?b.update(n,c):(a.navigatorSeries=l.initSeries(n),a.navigatorSeries.baseSeries=a,v.push(a.navigatorSeries)))});if(t.data&&
(!k||!k.length)||h(t))e.hasNavigatorData=!1,t=a.splat(t),y(t,function(a,b){u.name="Navigator "+(v.length+1);n=d(m.navigator.series,{color:l.series[b]&&!l.series[b].options.isInternal&&l.series[b].color||l.options.colors[b]||l.options.colors[0]},u,a);n.data=a.data;n.data&&(e.hasNavigatorData=!0,v.push(l.initSeries(n)))});b&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&D(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);y(b,function(b){D(b,
"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});D(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&b.xAxis&&D(b,"updatedData",this.updatedDataHandler);D(b,"remove",function(){this.navigatorSeries&&(v(a.series,this.navigatorSeries),e(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(b){return a.reduce(this.baseSeries,
function(a,b){return Math.min(a,b.xData[0])},b)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,b=this.getExtremes(),c=b.dataMin,d=b.dataMax,b=b.max-b.min,e=a.stickToMin,g=a.stickToMax,h=E(this.options.overscroll,0),k,m,n=a.series&&a.series[0],t=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||
(e&&(m=c,k=m+b),g&&(k=d+h,e||(m=Math.max(k-b,a.getBaseSeriesMin(n&&n.xData?n.xData[0]:-Number.MAX_VALUE)))),t&&(e||g)&&q(m)&&(this.min=this.userMin=m,this.max=this.userMax=k));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries,c=a.getBaseSeriesMin(this.xData[0]);a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=q(this.xAxis.min)&&this.xAxis.min<=c&&(!this.chart.fixedRange||
!a.stickToMax);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind||(this.eventsToUnbind=[]);this.eventsToUnbind.push(D(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)}),D(this.chart,"getMargins",function(){var a=this.navigator,b=a.opposite?"plotTop":"marginBottom";this.inverted&&(b=a.opposite?
"marginRight":"plotLeft");this[b]=(this[b]||0)+(a.navigatorEnabled||!this.inverted?a.outlineHeight:0)+a.navigatorOptions.margin}))},destroy:function(){this.removeEvents();this.xAxis&&(v(this.chart.xAxis,this.xAxis),v(this.chart.axes,this.xAxis));this.yAxis&&(v(this.chart.yAxis,this.yAxis),v(this.chart.axes,this.yAxis));y(this.series||[],function(a){a.destroy&&a.destroy()});y("series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),
function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);y([this.handles],function(a){x(a)},this)}};a.Navigator=C;t(F.prototype,"zoom",function(a,b,c){var d=this.chart,f=d.options,g=f.chart.zoomType,l=f.chart.pinchType,h=f.navigator,f=f.rangeSelector,k;this.isXAxis&&(h&&h.enabled||f&&f.enabled)&&(!n&&"x"===g||n&&"x"===l?d.resetZoomButton="blocked":"y"===g?k=!1:(!n&&"xy"===g||n&&"xy"===l)&&this.options.range&&(d=this.previousZoom,e(b)?this.previousZoom=[this.min,this.max]:d&&(b=
d[0],c=d[1],delete this.previousZoom)));return void 0!==k?k:a.call(this,b,c)});D(u,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new C(this)});D(u,"afterSetChartSize",function(){var a=this.legend,b=this.navigator,c,d,e,g;b&&(d=a&&a.options,e=b.xAxis,g=b.yAxis,c=b.scrollbarHeight,this.inverted?(b.left=b.opposite?this.chartWidth-c-b.height:this.spacing[3]+c,b.top=this.plotTop+c):(b.left=this.plotLeft+c,b.top=b.navigatorOptions.top||
this.chartHeight-b.height-c-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(d&&"bottom"===d.verticalAlign&&d.enabled&&!d.floating?a.legendHeight+E(d.margin,10):0)),e&&g&&(this.inverted?e.options.left=g.options.left=b.left:e.options.top=g.options.top=b.top,e.setAxisSize(),g.setAxisSize()))});D(u,"update",function(a){var b=a.options.navigator||{},c=a.options.scrollbar||{};this.navigator||this.scroller||!b.enabled&&!c.enabled||(d(!0,this.options.navigator,
b),d(!0,this.options.scrollbar,c),delete a.options.navigator,delete a.options.scrollbar)});D(u,"afterUpdate",function(){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new C(this))});t(I.prototype,"addPoint",function(a,c,d,e,g){var f=this.options.turboThreshold;f&&this.xData.length>f&&b(c,!0)&&this.chart.navigator&&w(20,!0);a.call(this,c,d,e,g)});D(u,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,
!1)});D(I,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)});u.prototype.callbacks.push(function(a){var b=a.navigator;b&&a.xAxis[0]&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))})})(K);(function(a){function C(a){this.init(a)}var D=a.addEvent,F=a.Axis,u=a.Chart,m=a.css,e=a.createElement,x=a.defaultOptions,y=a.defined,v=a.destroyObjectProperties,w=a.discardElement,r=a.each,c=a.extend,k=a.fireEvent,h=a.isNumber,q=a.merge,b=a.pick,
n=a.pInt,d=a.splat,E=a.wrap;c(x,{rangeSelector:{verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0}}});x.lang=q(x.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});C.prototype={clickButton:function(a,c){var e=this,g=e.chart,k=e.buttonOptions[a],m=g.xAxis[0],n=g.scroller&&g.scroller.getUnionExtremes()||m||{},l=n.dataMin,q=n.dataMax,f,u=m&&Math.round(Math.min(m.max,
b(q,m.max))),v=k.type,p,n=k._range,w,x,y,G=k.dataGrouping;if(null!==l&&null!==q){g.fixedRange=n;G&&(this.forcedDataGrouping=!0,F.prototype.setDataGrouping.call(m||{chart:this.chart},G,!1),this.frozenStates=k.preserveDataGrouping);if("month"===v||"year"===v)m?(v={range:k,max:u,chart:g,dataMin:l,dataMax:q},f=m.minFromRange.call(v),h(v.newMax)&&(u=v.newMax)):n=k;else if(n)f=Math.max(u-n,l),u=Math.min(f+n,q);else if("ytd"===v)if(m)void 0===q&&(l=Number.MAX_VALUE,q=Number.MIN_VALUE,r(g.series,function(a){a=
a.xData;l=Math.min(a[0],l);q=Math.max(a[a.length-1],q)}),c=!1),u=e.getYTDExtremes(q,l,g.time.useUTC),f=w=u.min,u=u.max;else{D(g,"beforeRender",function(){e.clickButton(a)});return}else"all"===v&&m&&(f=l,u=q);f+=k._offsetMin;u+=k._offsetMax;e.setSelected(a);m?m.setExtremes(f,u,b(c,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:k}):(p=d(g.options.xAxis)[0],y=p.range,p.range=n,x=p.min,p.min=w,D(g,"load",function(){p.range=y;p.min=x}))}},setSelected:function(a){this.selected=this.options.selected=
a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(a){var b=this,c=a.options.rangeSelector,d=c.buttons||[].concat(b.defaultButtons),e=c.selected,g=function(){var a=b.minInput,c=b.maxInput;a&&a.blur&&k(a,"blur");c&&c.blur&&k(c,"blur")};b.chart=a;b.options=c;b.buttons=[];a.extraTopMargin=c.height;b.buttonOptions=d;this.unMouseDown=D(a.container,
"mousedown",g);this.unResize=D(a,"resize",g);r(d,b.computeButtonRange);void 0!==e&&d[e]&&this.clickButton(e,!1);D(a,"load",function(){a.xAxis&&a.xAxis[0]&&D(a.xAxis[0],"setExtremes",function(c){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==c.trigger&&"updatedData"!==c.trigger&&b.forcedDataGrouping&&!b.frozenStates&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this,b=this.chart,c=b.xAxis[0],d=Math.round(c.max-c.min),e=!c.hasVisibleSeries,k=b.scroller&&b.scroller.getUnionExtremes()||
c,m=k.dataMin,l=k.dataMax,b=a.getYTDExtremes(l,m,b.time.useUTC),n=b.min,f=b.max,q=a.selected,u=h(q),p=a.options.allButtonsEnabled,v=a.buttons;r(a.buttonOptions,function(b,g){var h=b._range,k=b.type,t=b.count||1,r=v[g],w=0;b=b._offsetMax-b._offsetMin;g=g===q;var x=h>l-m,z=h<c.minRange,A=!1,y=!1,h=h===d;("month"===k||"year"===k)&&d+36E5>=864E5*{month:28,year:365}[k]*t-b&&d-36E5<=864E5*{month:31,year:366}[k]*t+b?h=!0:"ytd"===k?(h=f-n+b===d,A=!g):"all"===k&&(h=c.max-c.min>=l-m,y=!g&&u&&h);k=!p&&(x||z||
y||e);t=g&&h||h&&!u&&!A||g&&a.frozenStates;k?w=3:t&&(u=!0,w=2);r.state!==w&&r.setState(w)})},computeButtonRange:function(a){var c=a.type,d=a.count||1,e={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(e[c])a._range=e[c]*d;else if("month"===c||"year"===c)a._range=864E5*{month:30,year:365}[c]*d;a._offsetMin=b(a.offsetMin,0);a._offsetMax=b(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this.chart.time,e=
this[a+"Input"];y(b)&&(e.previousValue=e.HCTime,e.HCTime=b);e.value=d.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",e.HCTime);this[a+"DateBox"].attr({text:d.dateFormat(c.inputDateFormat||"%b %e, %Y",e.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];m(this[a+"Input"],{left:b.translateX+c.x+"px",top:b.translateY+"px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})},hideInput:function(a){m(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},
drawInput:function(a){function b(){var a=q.value,b=(k.inputDateParser||Date.parse)(a),e=d.xAxis[0],f=d.scroller&&d.scroller.xAxis?d.scroller.xAxis:e,g=f.dataMin,f=f.dataMax;b!==q.previousValue&&(q.previousValue=b,h(b)||(b=a.split("-"),b=Date.UTC(n(b[0]),n(b[1])-1,n(b[2]))),h(b)&&(d.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),l?b>c.maxInput.HCTime?b=void 0:b<g&&(b=g):b<c.minInput.HCTime?b=void 0:b>f&&(b=f),void 0!==b&&e.setExtremes(l?b:e.min,l?e.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}
var c=this,d=c.chart,g=d.renderer,k=d.options.rangeSelector,m=c.div,l="min"===a,q,f,r=this.inputGroup;this[a+"Label"]=f=g.label(x.lang[l?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(r);r.offset+=f.width+5;this[a+"DateBox"]=g=g.label("",r.offset).addClass("highcharts-range-input").attr({padding:2,width:k.inputBoxWidth||90,height:k.inputBoxHeight||17,"text-align":"center"}).on("click",function(){c.showInput(a);c[a+"Input"].focus()}).add(r);
r.offset+=g.width+(l?10:0);this[a+"Input"]=q=e("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:d.plotTop+"px"},m);q.onfocus=function(){c.showInput(a)};q.onblur=function(){c.hideInput(a)};q.onchange=b;q.onkeypress=function(a){13===a.keyCode&&b()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}},getYTDExtremes:function(a,b,c){var d=this.chart.time,
e=new d.Date(a),g=d.get("FullYear",e);c=c?d.Date.UTC(g,0,1):+new d.Date(g,0,1);b=Math.max(b||0,c);e=e.getTime();return{max:Math.min(a||e,e),min:b}},render:function(a,c){var d=this,g=d.chart,h=g.renderer,k=g.container,m=g.options,l=m.exporting&&!1!==m.exporting.enabled&&m.navigation&&m.navigation.buttonOptions,n=x.lang,f=d.div,q=m.rangeSelector,u=b(m.chart.style&&m.chart.style.zIndex,0)+1,m=q.floating,p=d.buttons,f=d.inputGroup,v=q.buttonTheme,w=q.buttonPosition,y=q.inputPosition,C=q.inputEnabled,
G=v&&v.states,D=g.plotLeft,E,F=d.buttonGroup,K;K=d.rendered;var X=d.options.verticalAlign,ba=g.legend,ca=ba&&ba.options,da=w.y,Y=y.y,Q=K||!1,Z=Q?"animate":"attr",V=0,T=0,U;if(!1!==q.enabled){K||(d.group=K=h.g("range-selector-group").attr({zIndex:7}).add(),d.buttonGroup=F=h.g("range-selector-buttons").add(K),d.zoomText=h.text(n.rangeSelectorZoom,0,15).css(q.labelStyle).add(F),r(d.buttonOptions,function(a,b){p[b]=h.button(a.text,0,0,function(){var c=a.events&&a.events.click,e;c&&(e=c.call(a));!1!==
e&&d.clickButton(b);d.isActive=!0},v,G&&G.hover,G&&G.select,G&&G.disabled).attr({"text-align":"center"}).add(F)}),!1!==C&&(d.div=f=e("div",null,{position:"relative",height:0,zIndex:u}),k.parentNode.insertBefore(f,k),d.inputGroup=f=h.g("input-group").add(K),f.offset=0,d.drawInput("min"),d.drawInput("max")));d.zoomText[Z]({x:b(D+w.x,D)});E=b(D+w.x,D)+d.zoomText.getBBox().width+5;r(d.buttonOptions,function(a,c){p[c][Z]({x:E});E+=p[c].width+b(q.buttonSpacing,5)});D=g.plotLeft-g.spacing[3];d.updateButtonStates();
l&&this.titleCollision(g)&&"top"===X&&"right"===w.align&&w.y+F.getBBox().height-12<(l.y||0)+l.height&&(V=-40);"left"===w.align?U=w.x-g.spacing[3]:"right"===w.align&&(U=w.x+V-g.spacing[1]);F.align({y:w.y,width:F.getBBox().width,align:w.align,x:U},!0,g.spacingBox);d.group.placed=Q;d.buttonGroup.placed=Q;!1!==C&&(V=l&&this.titleCollision(g)&&"top"===X&&"right"===y.align&&y.y-f.getBBox().height-12<(l.y||0)+l.height+g.spacing[0]?-40:0,"left"===y.align?U=D:"right"===y.align&&(U=-Math.max(g.axisOffset[1],
-V)),f.align({y:y.y,width:f.getBBox().width,align:y.align,x:y.x+U-2},!0,g.spacingBox),k=f.alignAttr.translateX+f.alignOptions.x-V+f.getBBox().x+2,l=f.alignOptions.width,n=F.alignAttr.translateX+F.getBBox().x,U=F.getBBox().width+20,(y.align===w.align||n+U>k&&k+l>n&&da<Y+f.getBBox().height)&&f.attr({translateX:f.alignAttr.translateX+(g.axisOffset[1]>=-V?0:-V),translateY:f.alignAttr.translateY+F.getBBox().height+10}),d.setInputValue("min",a),d.setInputValue("max",c),d.inputGroup.placed=Q);d.group.align({verticalAlign:X},
!0,g.spacingBox);a=d.group.getBBox().height+20;c=d.group.alignAttr.translateY;"bottom"===X&&(ba=ca&&"bottom"===ca.verticalAlign&&ca.enabled&&!ca.floating?ba.legendHeight+b(ca.margin,10):0,a=a+ba-20,T=c-a-(m?0:q.y)-10);if("top"===X)m&&(T=0),g.titleOffset&&(T=g.titleOffset+g.options.title.margin),T+=g.margin[0]-g.spacing[0]||0;else if("middle"===X)if(Y===da)T=0>Y?c+void 0:c;else if(Y||da)T=0>Y||0>da?T-Math.min(Y,da):c-a+NaN;d.group.translate(q.x,q.y+Math.floor(T));!1!==C&&(d.minInput.style.marginTop=
d.group.translateY+"px",d.maxInput.style.marginTop=d.group.translateY+"px");d.rendered=!0}},getHeight:function(){var a=this.options,b=this.group,c=a.y,d=a.buttonPosition.y,a=a.inputPosition.y,b=b?b.getBBox(!0).height+13+c:0,c=Math.min(a,d);if(0>a&&0>d||0<a&&0<d)b+=Math.abs(c);return b},titleCollision:function(a){return!(a.options.title.text||a.options.subtitle.text)},update:function(a){var b=this.chart;q(!0,b.options.rangeSelector,a);this.destroy();this.init(b);b.rangeSelector.render()},destroy:function(){var b=
this,c=b.minInput,d=b.maxInput;b.unMouseDown();b.unResize();v(b.buttons);c&&(c.onfocus=c.onblur=c.onchange=null);d&&(d.onfocus=d.onblur=d.onchange=null);a.objectEach(b,function(a,c){a&&"chart"!==c&&(a.destroy?a.destroy():a.nodeType&&w(this[c]));a!==C.prototype[c]&&(b[c]=null)},this)}};F.prototype.toFixedRange=function(a,c,d,e){var g=this.chart&&this.chart.fixedRange;a=b(d,this.translate(a,!0,!this.horiz));c=b(e,this.translate(c,!0,!this.horiz));d=g&&(c-a)/g;.7<d&&1.3>d&&(e?a=c-g:c=a+g);h(a)&&h(c)||
(a=c=void 0);return{min:a,max:c}};F.prototype.minFromRange=function(){var a=this.range,c={month:"Month",year:"FullYear"}[a.type],d,e=this.max,k,m,n=function(a,b){var d=new Date(a),e=d["get"+c]();d["set"+c](e+b);e===d["get"+c]()&&d.setDate(0);return d.getTime()-a};h(a)?(d=e-a,m=a):(d=e+n(e,-a.count),this.chart&&(this.chart.fixedRange=e-d));k=b(this.dataMin,Number.MIN_VALUE);h(d)||(d=k);d<=k&&(d=k,void 0===m&&(m=n(d,a.count)),this.newMax=Math.min(d+m,this.dataMax));h(e)||(d=void 0);return d};D(u,"afterGetContainer",
function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new C(this))});E(u.prototype,"render",function(a,b,c){var d=this.axes,e=this.rangeSelector;e&&(r(d,function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),e.render(),d=e.options.verticalAlign,e.options.floating||("bottom"===d?this.extraBottomMargin=!0:"middle"!==d&&(this.extraTopMargin=!0)));a.call(this,b,c)});D(u,"update",function(a){var b=a.options.rangeSelector;a=this.rangeSelector;var c=this.extraBottomMargin,d=this.extraTopMargin;
b&&b.enabled&&!y(a)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new C(this));this.extraTopMargin=this.extraBottomMargin=!1;a&&(a.render(),b=b&&b.verticalAlign||a.options&&a.options.verticalAlign,a.options.floating||("bottom"===b?this.extraBottomMargin=!0:"middle"!==b&&(this.extraTopMargin=!0)),this.extraBottomMargin!==c||this.extraTopMargin!==d)&&(this.isDirtyBox=!0)});E(u.prototype,"redraw",function(a,b,c){var d=this.rangeSelector;d&&!d.options.floating&&(d.render(),d=d.options.verticalAlign,
"bottom"===d?this.extraBottomMargin=!0:"middle"!==d&&(this.extraTopMargin=!0));a.call(this,b,c)});D(u,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))});u.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();h(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector,e,g;d&&(g=D(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)}),e=D(a,"redraw",b),b());D(a,"destroy",
function(){d&&(e(),g())})});a.RangeSelector=C})(K);(function(a){var C=a.addEvent,D=a.arrayMax,F=a.arrayMin,u=a.Axis,m=a.Chart,e=a.defined,x=a.each,y=a.format,v=a.grep,w=a.inArray,r=a.isNumber,c=a.isString,k=a.map,h=a.merge,q=a.pick,b=a.Point,n=a.Series,d=a.splat,E=a.SVGRenderer,g=a.wrap,G=n.prototype,I=G.init,A=G.processData,t=b.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(b,e,g){var l=c(b)||b.nodeName,f=arguments[l?1:0],n=f.series,r=a.getOptions(),p,t=q(f.navigator&&f.navigator.enabled,
r.navigator.enabled,!0),u=t?{startOnTick:!1,endOnTick:!1}:null,v={marker:{enabled:!1,radius:2}},w={shadow:!1,borderWidth:0};f.xAxis=k(d(f.xAxis||{}),function(a,b){return h({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},r.xAxis,r.xAxis&&r.xAxis[b],a,{type:"datetime",categories:null},u)});f.yAxis=k(d(f.yAxis||{}),function(a,b){p=q(a.opposite,!0);return h({labels:{y:-2},opposite:p,showLastLabel:!(!a.categories&&"category"!==a.type),
title:{text:null}},r.yAxis,r.yAxis&&r.yAxis[b],a)});f.series=null;f=h({chart:{panning:!0,pinchType:"x"},navigator:{enabled:t},scrollbar:{enabled:q(r.scrollbar.enabled,!0)},rangeSelector:{enabled:q(r.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:q(r.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1},plotOptions:{line:v,spline:v,area:v,areaspline:v,arearange:v,areasplinerange:v,column:w,columnrange:w,candlestick:w,ohlc:w}},f,{isStock:!0});f.series=n;return l?new m(b,f,g):new m(f,e)};
g(u.prototype,"autoLabelAlign",function(a){var b=this.chart,c=this.options,b=b._labelPanes=b._labelPanes||{},d=this.options.labels;return this.chart.options.isStock&&"yAxis"===this.coll&&(c=c.top+","+c.height,!b[c]&&d.enabled)?(15===d.x&&(d.x=0),void 0===d.align&&(d.align="right"),b[c]=this,"right"):a.apply(this,[].slice.call(arguments,1))});C(u,"destroy",function(){var a=this.chart,b=this.options&&this.options.top+","+this.options.height;b&&a._labelPanes&&a._labelPanes[b]===this&&delete a._labelPanes[b]});
g(u.prototype,"getPlotLinePath",function(b,d,g,h,f,m){var l=this,n=this.isLinked&&!this.series?this.linkedParent.series:this.series,t=l.chart,u=t.renderer,v=l.left,z=l.top,y,B,A,C,D=[],E=[],H,F;if("xAxis"!==l.coll&&"yAxis"!==l.coll)return b.apply(this,[].slice.call(arguments,1));E=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=l.options[b];return r(a)?[t[b][a]]:c(a)?[t.get(a)]:k(n,function(a){return a[b]})}(l.coll);x(l.isXAxis?t.yAxis:t.xAxis,function(a){if(e(a.options.id)?-1===a.options.id.indexOf("navigator"):
1){var b=a.isXAxis?"yAxis":"xAxis",b=e(a.options[b])?t[b][a.options[b]]:t[b][0];l===b&&E.push(a)}});H=E.length?[]:[l.isXAxis?t.yAxis[0]:t.xAxis[0]];x(E,function(b){-1!==w(b,H)||a.find(H,function(a){return a.pos===b.pos&&a.len===b.len})||H.push(b)});F=q(m,l.translate(d,null,null,h));r(F)&&(l.horiz?x(H,function(a){var b;B=a.pos;C=B+a.len;y=A=Math.round(F+l.transB);"pass"!==f&&(y<v||y>v+l.width)&&(f?y=A=Math.min(Math.max(v,y),v+l.width):b=!0);b||D.push("M",y,B,"L",A,C)}):x(H,function(a){var b;y=a.pos;
A=y+a.len;B=C=Math.round(z+l.height-F);"pass"!==f&&(B<z||B>z+l.height)&&(f?B=C=Math.min(Math.max(z,B),l.top+l.height):b=!0);b||D.push("M",y,B,"L",A,C)}));return 0<D.length?u.crispPolyLine(D,g||1):null});E.prototype.crispPolyLine=function(a,b){var c;for(c=0;c<a.length;c+=6)a[c+1]===a[c+4]&&(a[c+1]=a[c+4]=Math.round(a[c+1])-b%2/2),a[c+2]===a[c+5]&&(a[c+2]=a[c+5]=Math.round(a[c+2])+b%2/2);return a};g(u.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});
C(u,"afterDrawCrosshair",function(a){var b,c;if(e(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){var d=this.chart,f=this.options.crosshair.label,g=this.horiz;b=this.opposite;c=this.left;var h=this.top,k=this.crossLabel,m=f.format,n="",r="inside"===this.options.tickPosition,t=!1!==this.crosshair.snap,u=0,v=a.e||this.cross&&this.cross.e,w=a.point;a=this.lin2log;var x,z;this.isLog?(x=a(this.min),z=a(this.max)):(x=this.min,z=this.max);a=g?"center":b?"right"===this.labelAlign?"right":
"left":"left"===this.labelAlign?"left":"center";k||(k=this.crossLabel=d.renderer.label(null,null,null,f.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:f.align||a,padding:q(f.padding,8),r:q(f.borderRadius,3),zIndex:2}).add(this.labelGroup));g?(a=t?w.plotX+c:v.chartX,h+=b?0:this.height):(a=b?this.width+c:0,h=t?w.plotY+h:v.chartY);m||f.formatter||(this.isDatetimeAxis&&(n="%b %d, %Y"),m="{value"+(n?":"+n:"")+"}");n=
t?w[this.isXAxis?"x":"y"]:this.toValue(g?v.chartX:v.chartY);k.attr({text:m?y(m,{value:n},d.time):f.formatter.call(this,n),x:a,y:h,visibility:n<x||n>z?"hidden":"visible"});f=k.getBBox();if(g){if(r&&!b||!r&&b)h=k.y-f.height}else h=k.y-f.height/2;g?(b=c-f.x,c=c+this.width-f.x):(b="left"===this.labelAlign?c:0,c="right"===this.labelAlign?c+this.width:d.chartWidth);k.translateX<b&&(u=b-k.translateX);k.translateX+f.width>=c&&(u=-(k.translateX+f.width-c));k.attr({x:a+u,y:h,anchorX:g?a:this.opposite?0:d.chartWidth,
anchorY:g?this.opposite?d.chartHeight:0:h+f.height/2})}});G.init=function(){I.apply(this,arguments);this.setCompare(this.options.compare)};G.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var d=this.compareValue;if(void 0!==b&&void 0!==d)return b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};G.processData=function(){var a,b=-1,c,d,e=!0===this.options.compareStart?
0:1,g,h;A.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,g=d.length,this.pointArrayMap&&(b=w("close",this.pointArrayMap),-1===b&&(b=w(this.pointValKey||"y",this.pointArrayMap))),a=0;a<g-e;a++)if(h=d[a]&&-1<b?d[a][b]:d[a],r(h)&&c[a+e]>=this.xAxis.min&&0!==h){this.compareValue=h;break}};g(G,"getExtremes",function(a){var b;a.apply(this,[].slice.call(arguments,1));this.modifyValue&&(b=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)],
this.dataMin=F(b),this.dataMax=D(b))});u.prototype.setCompare=function(a,b){this.isXAxis||(x(this.series,function(b){b.setCompare(a)}),q(b,!0)&&this.chart.redraw())};b.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0<this.change?"+":"")+a.numberFormat(this.change,q(this.series.tooltipOptions.changeDecimals,2)));return t.apply(this,[b])};g(n.prototype,"render",function(a){var b;this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(b=this.yAxis.len-
(this.xAxis.axisLine?Math.floor(this.xAxis.axisLine.strokeWidth()/2):0),!this.clipBox&&this.animate?(this.clipBox=h(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=b):this.chart[this.sharedClipKey]?this.chart[this.sharedClipKey].attr({width:this.xAxis.len,height:b}):this.clipBox&&(this.clipBox.width=this.xAxis.len,this.clipBox.height=b));a.call(this)});g(m.prototype,"getSelectedPoints",function(a){var b=a.call(this);x(this.series,function(a){a.hasGroupedData&&(b=b.concat(v(a.points||
[],function(a){return a.selected})))});return b});C(m,"update",function(a){a=a.options;"scrollbar"in a&&this.navigator&&(h(!0,this.options.scrollbar,a.scrollbar),this.navigator.update({},!1),delete a.scrollbar)})})(K);return K});
//# sourceMappingURL=highstock.js.map
