/*
 Highstock JS v6.1.4 (2018-09-25)

 (c) 2009-2016 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(R,K){"object"===typeof module&&module.exports?module.exports=R.document?K(R):K:"function"===typeof define&&define.amd?define(function(){return K(R)}):R.Highcharts=K(R)})("undefined"!==typeof window?window:this,function(R){var K=function(){var a="undefined"===typeof R?window:R,C=a.document,D=a.navigator&&a.navigator.userAgent||"",E=C&&C.createElementNS&&!!C.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,q=/(edge|msie|trident)/i.test(D)&&!a.opera,h=-1!==D.indexOf("Firefox"),
f=-1!==D.indexOf("Chrome"),w=h&&4>parseInt(D.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock",version:"6.1.4",deg2rad:2*Math.PI/360,doc:C,hasBidiBug:w,hasTouch:C&&void 0!==C.documentElement.ontouchstart,isMS:q,isWebKit:-1!==D.indexOf("AppleWebKit"),isFirefox:h,isChrome:f,isSafari:!f&&-1!==D.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(D),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:E,win:a,marginNames:["plotTop",
"marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){a.timers=[];var C=a.charts,D=a.doc,E=a.win;a.error=function(q,h){q=a.isNumber(q)?"Highcharts error #"+q+": www.highcharts.com/errors/"+q:q;if(h)throw Error(q);E.console&&console.log(q)};a.Fx=function(a,h,f){this.options=h;this.elem=a;this.prop=f};a.Fx.prototype={dSetter:function(){var a=this.paths[0],h=this.paths[1],f=[],w=this.now,y=a.length,x;if(1===w)f=this.toD;else if(y===h.length&&1>w)for(;y--;)x=parseFloat(a[y]),
f[y]=isNaN(x)?h[y]:w*parseFloat(h[y]-x)+x;else f=h;this.elem.attr("d",f,null,!0)},update:function(){var a=this.elem,h=this.prop,f=this.now,w=this.options.step;if(this[h+"Setter"])this[h+"Setter"]();else a.attr?a.element&&a.attr(h,f,null,!0):a.style[h]=f+this.unit;w&&w.call(a,f,this)},run:function(q,h,f){var w=this,y=w.options,x=function(a){return x.stopped?!1:w.step(a)},v=E.requestAnimationFrame||function(a){setTimeout(a,13)},d=function(){for(var c=0;c<a.timers.length;c++)a.timers[c]()||a.timers.splice(c--,
1);a.timers.length&&v(d)};q!==h||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=q,this.end=h,this.unit=f,this.now=this.start,this.pos=0,x.elem=this.elem,x.prop=this.prop,x()&&1===a.timers.push(x)&&v(d)):(delete y.curAnim[this.prop],y.complete&&0===a.keys(y.curAnim).length&&y.complete.call(this.elem))},step:function(q){var h=+new Date,f,w=this.options,y=this.elem,x=w.complete,v=w.duration,d=w.curAnim;y.attr&&!y.element?q=!1:q||h>=v+this.startTime?(this.now=this.end,this.pos=
1,this.update(),f=d[this.prop]=!0,a.objectEach(d,function(a){!0!==a&&(f=!1)}),f&&x&&x.call(y),q=!1):(this.pos=w.easing((h-this.startTime)/v),this.now=this.start+(this.end-this.start)*this.pos,this.update(),q=!0);return q},initPath:function(q,h,f){function w(b){var a,c;for(e=b.length;e--;)a="M"===b[e]||"L"===b[e],c=/[a-zA-Z]/.test(b[e+3]),a&&c&&b.splice(e+1,0,b[e+1],b[e+2],b[e+1],b[e+2])}function y(b,a){for(;b.length<n;){b[0]=a[n-b.length];var c=b.slice(0,k);[].splice.apply(b,[0,0].concat(c));t&&(c=
b.slice(b.length-k),[].splice.apply(b,[b.length,0].concat(c)),e--)}b[0]="M"}function x(a,e){for(var c=(n-a.length)/k;0<c&&c--;)b=a.slice().splice(a.length/H-k,k*H),b[0]=e[n-k-c*k],r&&(b[k-6]=b[k-2],b[k-5]=b[k-1]),[].splice.apply(a,[a.length/H,0].concat(b)),t&&c--}h=h||"";var v,d=q.startX,c=q.endX,r=-1<h.indexOf("C"),k=r?7:3,n,b,e;h=h.split(" ");f=f.slice();var t=q.isArea,H=t?2:1,l;r&&(w(h),w(f));if(d&&c){for(e=0;e<d.length;e++)if(d[e]===c[0]){v=e;break}else if(d[0]===c[c.length-d.length+e]){v=e;l=
!0;break}void 0===v&&(h=[])}h.length&&a.isNumber(v)&&(n=f.length+v*H*k,l?(y(h,f),x(f,h)):(y(f,h),x(h,f)));return[h,f]},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 q,h=arguments,f,w={},y=function(f,v){"object"!==typeof f&&(f={});a.objectEach(v,function(d,c){!a.isObject(d,!0)||a.isClass(d)||a.isDOMElement(d)?f[c]=v[c]:f[c]=y(f[c]||{},
d)});return f};!0===h[0]&&(w=h[1],h=Array.prototype.slice.call(h,2));f=h.length;for(q=0;q<f;q++)w=y(w,h[q]);return w};a.pInt=function(a,h){return parseInt(a,h||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(q,h){return!!q&&"object"===typeof q&&(!h||!a.isArray(q))};a.isDOMElement=function(q){return a.isObject(q)&&"number"===typeof q.nodeType};a.isClass=function(q){var h=
q&&q.constructor;return!(!a.isObject(q,!0)||a.isDOMElement(q)||!h||!h.name||"Object"===h.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a};a.erase=function(a,h){for(var f=a.length;f--;)if(a[f]===h){a.splice(f,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(q,h,f){var w;a.isString(h)?a.defined(f)?q.setAttribute(h,f):q&&q.getAttribute&&((w=q.getAttribute(h))||"class"!==h||(w=q.getAttribute(h+"Name"))):a.defined(h)&&a.isObject(h)&&
a.objectEach(h,function(a,f){q.setAttribute(f,a)});return w};a.splat=function(q){return a.isArray(q)?q:[q]};a.syncTimeout=function(a,h,f){if(h)return setTimeout(a,h,f);a.call(0,f)};a.clearTimeout=function(q){a.defined(q)&&clearTimeout(q)};a.extend=function(a,h){var f;a||(a={});for(f in h)a[f]=h[f];return a};a.pick=function(){var a=arguments,h,f,w=a.length;for(h=0;h<w;h++)if(f=a[h],void 0!==f&&null!==f)return f};a.css=function(q,h){a.isMS&&!a.svg&&h&&void 0!==h.opacity&&(h.filter="alpha(opacity\x3d"+
100*h.opacity+")");a.extend(q.style,h)};a.createElement=function(q,h,f,w,y){q=D.createElement(q);var x=a.css;h&&a.extend(q,h);y&&x(q,{padding:0,border:"none",margin:0});f&&x(q,f);w&&w.appendChild(q);return q};a.extendClass=function(q,h){var f=function(){};f.prototype=new q;a.extend(f.prototype,h);return f};a.pad=function(a,h,f){return Array((h||2)+1-String(a).replace("-","").length).join(f||0)+a};a.relativeLength=function(a,h,f){return/%$/.test(a)?h*parseFloat(a)/100+(f||0):parseFloat(a)};a.wrap=
function(a,h,f){var w=a[h];a[h]=function(){var a=Array.prototype.slice.call(arguments),h=arguments,v=this;v.proceed=function(){w.apply(v,arguments.length?arguments:h)};a.unshift(w);a=f.apply(this,a);v.proceed=null;return a}};a.formatSingle=function(q,h,f){var w=/\.([0-9])/,y=a.defaultOptions.lang;/f$/.test(q)?(f=(f=q.match(w))?f[1]:-1,null!==h&&(h=a.numberFormat(h,f,y.decimalPoint,-1<q.indexOf(",")?y.thousandsSep:""))):h=(f||a.time).dateFormat(q,h);return h};a.format=function(q,h,f){for(var w="{",
y=!1,x,v,d,c,r=[],k;q;){w=q.indexOf(w);if(-1===w)break;x=q.slice(0,w);if(y){x=x.split(":");v=x.shift().split(".");c=v.length;k=h;for(d=0;d<c;d++)k&&(k=k[v[d]]);x.length&&(k=a.formatSingle(x.join(":"),k,f));r.push(k)}else r.push(x);q=q.slice(w+1);w=(y=!y)?"}":"{"}r.push(q);return r.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(q,h,f,w,y){var x,v=q;f=a.pick(f,1);x=q/f;h||(h=y?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],
!1===w&&(1===f?h=a.grep(h,function(a){return 0===a%1}):.1>=f&&(h=[1/f])));for(w=0;w<h.length&&!(v=h[w],y&&v*f>=q||!y&&x<=(h[w]+(h[w+1]||h[w]))/2);w++);return v=a.correctFloat(v*f,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,h){var f=a.length,w,y;for(y=0;y<f;y++)a[y].safeI=y;a.sort(function(a,v){w=h(a,v);return 0===w?a.safeI-v.safeI:w});for(y=0;y<f;y++)delete a[y].safeI};a.arrayMin=function(a){for(var h=a.length,f=a[0];h--;)a[h]<f&&(f=a[h]);return f};a.arrayMax=function(a){for(var h=
a.length,f=a[0];h--;)a[h]>f&&(f=a[h]);return f};a.destroyObjectProperties=function(q,h){a.objectEach(q,function(a,w){a&&a!==h&&a.destroy&&a.destroy();delete q[w]})};a.discardElement=function(q){var h=a.garbageBin;h||(h=a.createElement("div"));q&&h.appendChild(q);h.innerHTML=""};a.correctFloat=function(a,h){return parseFloat(a.toPrecision(h||14))};a.setAnimation=function(q,h){h.renderer.globalAnimation=a.pick(q,h.options.chart.animation,!0)};a.animObject=function(q){return a.isObject(q)?a.merge(q):
{duration:q?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(q,h,f,w){q=+q||0;h=+h;var y=a.defaultOptions.lang,x=(q.toString().split(".")[1]||"").split("e")[0].length,v,d,c=q.toString().split("e");-1===h?h=Math.min(x,20):a.isNumber(h)?h&&c[1]&&0>c[1]&&(v=h+ +c[1],0<=v?(c[0]=(+c[0]).toExponential(v).split("e")[0],h=v):(c[0]=c[0].split(".")[0]||0,q=20>h?(c[0]*Math.pow(10,c[1])).toFixed(h):0,c[1]=0)):h=2;d=(Math.abs(c[1]?
c[0]:q)+Math.pow(10,-Math.max(h,x)-1)).toFixed(h);x=String(a.pInt(d));v=3<x.length?x.length%3:0;f=a.pick(f,y.decimalPoint);w=a.pick(w,y.thousandsSep);q=(0>q?"-":"")+(v?x.substr(0,v)+w:"");q+=x.substr(v).replace(/(\d{3})(?=\d)/g,"$1"+w);h&&(q+=f+d.slice(-h));c[1]&&0!==+q&&(q+="e"+c[1]);return q};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(q,h,f){if("width"===h)return Math.max(0,Math.min(q.offsetWidth,q.scrollWidth)-a.getStyle(q,"padding-left")-a.getStyle(q,
"padding-right"));if("height"===h)return Math.max(0,Math.min(q.offsetHeight,q.scrollHeight)-a.getStyle(q,"padding-top")-a.getStyle(q,"padding-bottom"));E.getComputedStyle||a.error(27,!0);if(q=E.getComputedStyle(q,void 0))q=q.getPropertyValue(h),a.pick(f,"opacity"!==h)&&(q=a.pInt(q));return q};a.inArray=function(q,h,f){return(a.indexOfPolyfill||Array.prototype.indexOf).call(h,q,f)};a.grep=function(q,h){return(a.filterPolyfill||Array.prototype.filter).call(q,h)};a.find=Array.prototype.find?function(a,
h){return a.find(h)}:function(a,h){var f,w=a.length;for(f=0;f<w;f++)if(h(a[f],f))return a[f]};a.some=function(q,h,f){return(a.somePolyfill||Array.prototype.some).call(q,h,f)};a.map=function(a,h){for(var f=[],w=0,y=a.length;w<y;w++)f[w]=h.call(a[w],a[w],w,a);return f};a.keys=function(q){return(a.keysPolyfill||Object.keys).call(void 0,q)};a.reduce=function(q,h,f){return(a.reducePolyfill||Array.prototype.reduce).apply(q,2<arguments.length?[h,f]:[h])};a.offset=function(a){var h=D.documentElement;a=a.parentElement||
a.parentNode?a.getBoundingClientRect():{top:0,left:0};return{top:a.top+(E.pageYOffset||h.scrollTop)-(h.clientTop||0),left:a.left+(E.pageXOffset||h.scrollLeft)-(h.clientLeft||0)}};a.stop=function(q,h){for(var f=a.timers.length;f--;)a.timers[f].elem!==q||h&&h!==a.timers[f].prop||(a.timers[f].stopped=!0)};a.each=function(q,h,f){return(a.forEachPolyfill||Array.prototype.forEach).call(q,h,f)};a.objectEach=function(a,h,f){for(var w in a)a.hasOwnProperty(w)&&h.call(f||a[w],a[w],w,a)};a.addEvent=function(q,
h,f,w){var y,x=q.addEventListener||a.addEventListenerPolyfill;y="function"===typeof q&&q.prototype?q.prototype.protoEvents=q.prototype.protoEvents||{}:q.hcEvents=q.hcEvents||{};a.Point&&q instanceof a.Point&&q.series&&q.series.chart&&(q.series.chart.runTrackerClick=!0);x&&x.call(q,h,f,!1);y[h]||(y[h]=[]);y[h].push(f);w&&a.isNumber(w.order)&&(f.order=w.order,y[h].sort(function(a,d){return a.order-d.order}));return function(){a.removeEvent(q,h,f)}};a.removeEvent=function(q,h,f){function w(d,c){var r=
q.removeEventListener||a.removeEventListenerPolyfill;r&&r.call(q,d,c,!1)}function y(d){var c,r;q.nodeName&&(h?(c={},c[h]=!0):c=d,a.objectEach(c,function(a,c){if(d[c])for(r=d[c].length;r--;)w(c,d[c][r])}))}var x,v;a.each(["protoEvents","hcEvents"],function(d){var c=q[d];c&&(h?(x=c[h]||[],f?(v=a.inArray(f,x),-1<v&&(x.splice(v,1),c[h]=x),w(h,f)):(y(c),c[h]=[])):(y(c),q[d]={}))})};a.fireEvent=function(q,h,f,w){var y,x,v,d,c;f=f||{};D.createEvent&&(q.dispatchEvent||q.fireEvent)?(y=D.createEvent("Events"),
y.initEvent(h,!0,!0),a.extend(y,f),q.dispatchEvent?q.dispatchEvent(y):q.fireEvent(h,y)):a.each(["protoEvents","hcEvents"],function(r){if(q[r])for(x=q[r][h]||[],v=x.length,f.target||a.extend(f,{preventDefault:function(){f.defaultPrevented=!0},target:q,type:h}),d=0;d<v;d++)(c=x[d])&&!1===c.call(q,f)&&f.preventDefault()});w&&!f.defaultPrevented&&w.call(q,f)};a.animate=function(q,h,f){var w,y="",x,v,d;a.isObject(f)||(d=arguments,f={duration:d[2],easing:d[3],complete:d[4]});a.isNumber(f.duration)||(f.duration=
400);f.easing="function"===typeof f.easing?f.easing:Math[f.easing]||Math.easeInOutSine;f.curAnim=a.merge(h);a.objectEach(h,function(c,d){a.stop(q,d);v=new a.Fx(q,f,d);x=null;"d"===d?(v.paths=v.initPath(q,q.d,h.d),v.toD=h.d,w=0,x=1):q.attr?w=q.attr(d):(w=parseFloat(a.getStyle(q,d))||0,"opacity"!==d&&(y="px"));x||(x=c);x&&x.match&&x.match("px")&&(x=x.replace(/px/g,""));v.run(w,x,y)})};a.seriesType=function(q,h,f,w,y){var x=a.getOptions(),v=a.seriesTypes;x.plotOptions[q]=a.merge(x.plotOptions[h],f);
v[q]=a.extendClass(v[h]||function(){},w);v[q].prototype.type=q;y&&(v[q].prototype.pointClass=a.extendClass(a.Point,y));return v[q]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),h=0;return function(){return"highcharts-"+a+"-"+h++}}();E.jQuery&&(E.jQuery.fn.highcharts=function(){var q=[].slice.call(arguments);if(this[0])return q[0]?(new (a[a.isString(q[0])?q.shift():"Chart"])(this[0],q[0],q[1]),this):C[a.attr(this[0],"data-highcharts-chart")]})})(K);(function(a){var C=a.each,
D=a.isNumber,E=a.map,q=a.merge,h=a.pInt;a.Color=function(f){if(!(this instanceof a.Color))return new a.Color(f);this.init(f)};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[h(a[1]),h(a[2]),h(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[h(a[1]),h(a[2]),h(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(f){var h,
y,x,v;if((this.input=f=this.names[f&&f.toLowerCase?f.toLowerCase():""]||f)&&f.stops)this.stops=E(f.stops,function(d){return new a.Color(d[1])});else if(f&&f.charAt&&"#"===f.charAt()&&(h=f.length,f=parseInt(f.substr(1),16),7===h?y=[(f&16711680)>>16,(f&65280)>>8,f&255,1]:4===h&&(y=[(f&3840)>>4|(f&3840)>>8,(f&240)>>4|f&240,(f&15)<<4|f&15,1])),!y)for(x=this.parsers.length;x--&&!y;)v=this.parsers[x],(h=v.regex.exec(f))&&(y=v.parse(h));this.rgba=y||[]},get:function(a){var f=this.input,h=this.rgba,x;this.stops?
(x=q(f),x.stops=[].concat(x.stops),C(this.stops,function(v,d){x.stops[d]=[x.stops[d][0],v.get(a)]})):x=h&&D(h[0])?"rgb"===a||!a&&1===h[3]?"rgb("+h[0]+","+h[1]+","+h[2]+")":"a"===a?h[3]:"rgba("+h.join(",")+")":f;return x},brighten:function(a){var f,y=this.rgba;if(this.stops)C(this.stops,function(f){f.brighten(a)});else if(D(a)&&0!==a)for(f=0;3>f;f++)y[f]+=h(255*a),0>y[f]&&(y[f]=0),255<y[f]&&(y[f]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,h){var f=this.rgba,
x=a.rgba;x.length&&f&&f.length?(a=1!==x[3]||1!==f[3],h=(a?"rgba(":"rgb(")+Math.round(x[0]+(f[0]-x[0])*(1-h))+","+Math.round(x[1]+(f[1]-x[1])*(1-h))+","+Math.round(x[2]+(f[2]-x[2])*(1-h))+(a?","+(x[3]+(f[3]-x[3])*(1-h)):"")+")"):h=a.input||"none";return h}};a.color=function(f){return new a.Color(f)}})(K);(function(a){var C,D,E=a.addEvent,q=a.animate,h=a.attr,f=a.charts,w=a.color,y=a.css,x=a.createElement,v=a.defined,d=a.deg2rad,c=a.destroyObjectProperties,r=a.doc,k=a.each,n=a.extend,b=a.erase,e=a.grep,
t=a.hasTouch,H=a.inArray,l=a.isArray,G=a.isFirefox,J=a.isMS,A=a.isObject,m=a.isString,z=a.isWebKit,I=a.merge,u=a.noop,F=a.objectEach,g=a.pick,B=a.pInt,L=a.removeEvent,p=a.splat,M=a.stop,X=a.svg,Q=a.SVG_NS,N=a.symbolSizes,P=a.win;C=a.SVGElement=function(){return this};n(C.prototype,{opacity:1,SVG_NS:Q,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),init:function(a,b){this.element="span"===b?x(b):
r.createElementNS(this.SVG_NS,b);this.renderer=a},animate:function(b,p,B){p=a.animObject(g(p,this.renderer.globalAnimation,!0));0!==p.duration?(B&&(p.complete=B),q(this,b,p)):(this.attr(b,null,B),p.step&&p.step.call(this));return this},complexColor:function(b,g,p){var B=this.renderer,c,e,m,u,O,z,n,t,d,L,M,r=[],A;a.fireEvent(this.renderer,"complexColor",{args:arguments},function(){b.radialGradient?e="radialGradient":b.linearGradient&&(e="linearGradient");e&&(m=b[e],O=B.gradients,n=b.stops,L=p.radialReference,
l(m)&&(b[e]=m={x1:m[0],y1:m[1],x2:m[2],y2:m[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===e&&L&&!v(m.gradientUnits)&&(u=m,m=I(m,B.getRadialAttr(L,u),{gradientUnits:"userSpaceOnUse"})),F(m,function(a,b){"id"!==b&&r.push(b,a)}),F(n,function(a){r.push(a)}),r=r.join(","),O[r]?M=O[r].attr("id"):(m.id=M=a.uniqueKey(),O[r]=z=B.createElement(e).attr(m).add(B.defs),z.radAttr=u,z.stops=[],k(n,function(b){0===b[1].indexOf("rgba")?(c=a.color(b[1]),t=c.get("rgb"),d=c.get("a")):(t=b[1],d=1);b=B.createElement("stop").attr({offset:b[0],
"stop-color":t,"stop-opacity":d}).add(z);z.stops.push(b)})),A="url("+B.url+"#"+M+")",p.setAttribute(g,A),p.gradient=r,b.toString=function(){return A})})},applyTextOutline:function(g){var p=this.element,B,m,e,c,u;-1!==g.indexOf("contrast")&&(g=g.replace(/contrast/g,this.renderer.getContrast(p.style.fill)));g=g.split(" ");m=g[g.length-1];if((e=g[0])&&"none"!==e&&a.svg){this.fakeTS=!0;g=[].slice.call(p.getElementsByTagName("tspan"));this.ySetter=this.xSetter;e=e.replace(/(^[\d\.]+)(.*?)$/g,function(a,
b,g){return 2*b+g});for(u=g.length;u--;)B=g[u],"highcharts-text-outline"===B.getAttribute("class")&&b(g,p.removeChild(B));c=p.firstChild;k(g,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);h(a,{"class":"highcharts-text-outline",fill:m,stroke:m,"stroke-width":e,"stroke-linejoin":"round"});p.insertBefore(a,c)})}},attr:function(a,b,g,p){var B,e=this.element,m,c=this,u,l;"string"===typeof a&&
void 0!==b&&(B=a,a={},a[B]=b);"string"===typeof a?c=(this[a+"Getter"]||this._defaultGetter).call(this,a,e):(F(a,function(b,g){u=!1;p||M(this,g);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(g)&&(m||(this.symbolAttr(a),m=!0),u=!0);!this.rotation||"x"!==g&&"y"!==g||(this.doTransform=!0);u||(l=this[g+"Setter"]||this._defaultSetter,l.call(this,b,g,e))},this),this.afterSetters());g&&g.call(this);return c},afterSetters:function(){this.doTransform&&(this.updateTransform(),
this.doTransform=!1)},addClass:function(a,b){var g=this.attr("class")||"";-1===g.indexOf(a)&&(b||(a=(g+(g?" ":"")+a).replace("  "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==H(a,(this.attr("class")||"").split(" "))},removeClass:function(a){return this.attr("class",(this.attr("class")||"").replace(a,""))},symbolAttr:function(a){var b=this;k("x y r start end width height innerR anchorX anchorY".split(" "),function(p){b[p]=g(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 g;b=b||a.strokeWidth||0;g=Math.round(b)%2/2;a.x=Math.floor(a.x||this.x||0)+g;a.y=Math.floor(a.y||this.y||0)+g;a.width=Math.floor((a.width||this.width||0)-2*g);a.height=Math.floor((a.height||this.height||0)-2*g);v(a.strokeWidth)&&(a.strokeWidth=b);return a},css:function(a){var b=this.styles,g={},p=this.element,e,m="",c,u=!b,l=["textOutline","textOverflow",
"width"];a&&a.color&&(a.fill=a.color);b&&F(a,function(a,p){a!==b[p]&&(g[p]=a,u=!0)});u&&(b&&(a=n(b,g)),a&&(null===a.width||"auto"===a.width?delete this.textWidth:"text"===p.nodeName.toLowerCase()&&a.width&&(e=this.textWidth=B(a.width))),this.styles=a,e&&!X&&this.renderer.forExport&&delete a.width,p.namespaceURI===this.SVG_NS?(c=function(a,b){return"-"+b.toLowerCase()},F(a,function(a,b){-1===H(b,l)&&(m+=b.replace(/([A-Z])/g,c)+":"+a+";")}),m&&h(p,"style",m)):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 P.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=r.createElementNS(Q,"rect"),h(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 g=this,p=g.element;t&&"click"===
a?(p.ontouchstart=function(a){g.touchEventFired=Date.now();a.preventDefault();b.call(p,a)},p.onclick=function(a){(-1===P.navigator.userAgent.indexOf("Android")||1100<Date.now()-(g.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,e=this.inverted,m=this.rotation,c=this.matrix,u=this.element;e&&(a+=this.width,b+=this.height);a=["translate("+a+","+b+")"];v(c)&&a.push("matrix("+c.join(",")+")");e?a.push("rotate(90) scale(-1,1)"):m&&a.push("rotate("+m+" "+g(this.rotationOriginX,u.getAttribute("x"),0)+" "+g(this.rotationOriginY,u.getAttribute("y")||0)+")");(v(p)||
v(B))&&a.push("scale("+g(p,1)+" "+g(B,1)+")");a.length&&u.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,p,B){var e,c,u,l,z={};c=this.renderer;u=c.alignedObjects;var n,t;if(a){if(this.alignOptions=a,this.alignByTranslate=p,!B||m(B))this.alignTo=e=B||"renderer",b(u,this),u.push(this),B=null}else a=this.alignOptions,p=this.alignByTranslate,e=this.alignTo;B=g(B,c[e],c);e=a.align;c=a.verticalAlign;u=(B.x||0)+(a.x||
0);l=(B.y||0)+(a.y||0);"right"===e?n=1:"center"===e&&(n=2);n&&(u+=(B.width-(a.width||0))/n);z[p?"translateX":"x"]=Math.round(u);"bottom"===c?t=1:"middle"===c&&(t=2);t&&(l+=(B.height-(a.height||0))/t);z[p?"translateY":"y"]=Math.round(l);this[this.placed?"animate":"attr"](z);this.placed=!0;this.alignAttr=z;return this},getBBox:function(a,b){var p,B=this.renderer,e,c=this.element,m=this.styles,u,l=this.textStr,z,t=B.cache,I=B.cacheKeys,L;b=g(b,this.rotation);e=b*d;u=c&&C.prototype.getStyle.call(c,"font-size");
v(l)&&(L=l.toString(),-1===L.indexOf("\x3c")&&(L=L.replace(/[0-9]/g,"0")),L+=["",b||0,u,this.textWidth,m&&m.textOverflow].join());L&&!a&&(p=t[L]);if(!p){if(c.namespaceURI===this.SVG_NS||B.forExport){try{(z=this.fakeTS&&function(a){k(c.querySelectorAll(".highcharts-text-outline"),function(b){b.style.display=a})})&&z("none"),p=c.getBBox?n({},c.getBBox()):{width:c.offsetWidth,height:c.offsetHeight},z&&z("")}catch(U){}if(!p||0>p.width)p={width:0,height:0}}else p=this.htmlGetBBox();B.isSVG&&(a=p.width,
B=p.height,m&&"11px"===m.fontSize&&17===Math.round(B)&&(p.height=B=14),b&&(p.width=Math.abs(B*Math.sin(e))+Math.abs(a*Math.cos(e)),p.height=Math.abs(B*Math.cos(e))+Math.abs(a*Math.sin(e))));if(L&&0<p.height){for(;250<I.length;)delete t[I.shift()];t[L]||I.push(L);t[L]=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,g=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(g);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,g=a.element||{},p=a.renderer.isSVG&&"SPAN"===g.nodeName&&a.parentGroup,B=g.ownerSVGElement,c=a.clipPath;g.onclick=
g.onmouseout=g.onmouseover=g.onmousemove=g.point=null;M(a);c&&B&&(k(B.querySelectorAll("[clip-path],[CLIP-PATH]"),function(a){var b=a.getAttribute("clip-path"),g=c.element.id;(-1<b.indexOf("(#"+g+")")||-1<b.indexOf('("#'+g+'")'))&&a.removeAttribute("clip-path")}),a.clipPath=c.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(g);p&&p.div&&0===p.div.childNodes.length;)g=p.parentGroup,a.safeRemoveChild(p.div),delete p.div,p=g;a.alignTo&&
b(a.renderer.alignedObjects,a);F(a,function(b,g){delete a[g]});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=g(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,g){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[b]!==a&&(g.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,g){this[b]=a;g.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=r.createElementNS(this.SVG_NS,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(r.createTextNode(String(g(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,g){"string"===typeof a?g.setAttribute(b,a):a&&this.complexColor(a,b,g)},visibilitySetter:function(a,b,g){"inherit"===a?g.removeAttribute(b):this[b]!==a&&g.setAttribute(b,a);this[b]=a},zIndexSetter:function(a,b){var g=this.renderer,p=this.parentGroup,c=(p||g).element||g.box,e,m=this.element,u,l,g=c===g.box;e=this.added;var z;v(a)?(m.setAttribute("data-z-index",a),a=+a,this[b]===a&&(e=!1)):v(this[b])&&
m.removeAttribute("data-z-index");this[b]=a;if(e){(a=this.zIndex)&&p&&(p.handleZ=!0);b=c.childNodes;for(z=b.length-1;0<=z&&!u;z--)if(p=b[z],e=p.getAttribute("data-z-index"),l=!v(e),p!==m)if(0>a&&l&&!g&&!z)c.insertBefore(m,b[z]),u=!0;else if(B(e)<=a||l&&(!v(a)||0<=a))c.insertBefore(m,b[z+1]||null),u=!0;u||(c.insertBefore(m,b[g?3:0]||null),u=!0)}return u},_defaultSetter:function(a,b,g){g.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)};n(D.prototype,{Element:C,SVG_NS:Q,init:function(a,b,g,p,B,c){var e;p=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});e=p.element;a.appendChild(e);h(a,"dir","ltr");-1===
a.innerHTML.indexOf("xmlns")&&h(e,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=e;this.boxWrapper=p;this.alignedObjects=[];this.url=(G||z)&&r.getElementsByTagName("base").length?P.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(r.createTextNode("Created with Highstock 6.1.4"));this.defs=this.createElement("defs").add();this.allowHTML=c;this.forExport=B;this.gradients={};this.cache={};this.cacheKeys=
[];this.imgCount=0;this.setSize(b,g,!1);var m;G&&a.getBoundingClientRect&&(b=function(){y(a,{left:0,top:0});m=a.getBoundingClientRect();y(a,{left:Math.ceil(m.left)-m.left+"px",top:Math.ceil(m.top)-m.top+"px"})},b(),this.unSubPixelFix=E(P,"resize",b))},definition:function(a){function b(a,B){var c;k(p(a),function(a){var p=g.createElement(a.tagName),e={};F(a,function(a,b){"tagName"!==b&&"children"!==b&&"textContent"!==b&&(e[b]=a)});p.attr(e);p.add(B||g.defs);a.textContent&&p.element.appendChild(r.createTextNode(a.textContent));
b(a.children||[],p);c=p});return c}var g=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:u,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,g,p,B,c,e){var m=this,u=a.rotation,l,z=p?1:0,n=(g||p).length,t=n,k=[],d=function(a){b.firstChild&&b.removeChild(b.firstChild);a&&b.appendChild(r.createTextNode(a))},I=function(c,u){u=u||c;if(void 0===k[u])if(b.getSubStringLength)try{k[u]=B+b.getSubStringLength(0,p?u+1:u)}catch(ea){}else d(e(g||p,c)),k[u]=B+m.getSpanWidth(a,b);return k[u]},L,F;a.rotation=0;L=I(b.textContent.length);if(F=B+L>c){for(;z<=n;)t=Math.ceil((z+n)/2),p&&(l=e(p,t)),L=I(t,l&&
l.length-1),z===n?z=n+1:L>c?n=t-1:z=t;0===n?d(""):g&&n===g.length-1||d(l||e(g||p,t))}p&&p.splice(0,t);a.actualWidth=L;a.rotation=u;return F},escapes:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;","'":"\x26#39;",'"':"\x26quot;"},buildText:function(a){var b=a.element,p=this,c=p.forExport,m=g(a.textStr,"").toString(),u=-1!==m.indexOf("\x3c"),l=b.childNodes,z,n=h(b,"x"),t=a.styles,d=a.textWidth,I=t&&t.lineHeight,L=t&&t.textOutline,M=t&&"ellipsis"===t.textOverflow,A=t&&"nowrap"===t.whiteSpace,J=
t&&t.fontSize,G,v,f=l.length,t=d&&!a.added&&this.box,O=function(a){return I?B(I):p.fontMetrics(void 0,a.getAttribute("style")?a:b).h},x=function(a,b){F(p.escapes,function(g,p){b&&-1!==H(g,b)||(a=a.toString().replace(new RegExp(g,"g"),p))});return a},w=function(a,b){var g;g=a.indexOf("\x3c");a=a.substring(g,a.indexOf("\x3e")-g);g=a.indexOf(b+"\x3d");if(-1!==g&&(g=g+b.length+1,b=a.charAt(g),'"'===b||"'"===b))return a=a.substring(g+1),a.substring(0,a.indexOf(b))};G=[m,M,A,I,L,J,d].join();if(G!==a.textCache){for(a.textCache=
G;f--;)b.removeChild(l[f]);u||L||M||d||-1!==m.indexOf(" ")?(t&&t.appendChild(b),m=u?m.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):[m],m=e(m,function(a){return""!==a}),k(m,function(g,B){var e,m=0,u=0;g=g.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");e=g.split("|||");
k(e,function(g){if(""!==g||1===e.length){var l={},t=r.createElementNS(p.SVG_NS,"tspan"),k,I;(k=w(g,"class"))&&h(t,"class",k);if(k=w(g,"style"))k=k.replace(/(;| |^)color([ :])/,"$1fill$2"),h(t,"style",k);(I=w(g,"href"))&&!c&&(h(t,"onclick",'location.href\x3d"'+I+'"'),h(t,"class","highcharts-anchor"));g=x(g.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==g){t.appendChild(r.createTextNode(g));m?l.dx=0:B&&null!==n&&(l.x=n);h(t,l);b.appendChild(t);!m&&v&&(!X&&c&&y(t,{display:"block"}),h(t,"dy",O(t)));
if(d){var L=g.replace(/([^\^])-/g,"$1- ").split(" "),l=!A&&(1<e.length||B||1<L.length);I=0;var F=O(t);if(M)z=p.truncate(a,t,g,void 0,0,Math.max(0,d-parseInt(J||12,10)),function(a,b){return a.substring(0,b)+"\u2026"});else if(l)for(;L.length;)L.length&&!A&&0<I&&(t=r.createElementNS(Q,"tspan"),h(t,{dy:F,x:n}),k&&h(t,"style",k),t.appendChild(r.createTextNode(L.join(" ").replace(/- /g,"-"))),b.appendChild(t)),p.truncate(a,t,null,L,0===I?u:0,d,function(a,b){return L.slice(0,b).join(" ").replace(/- /g,
"-")}),u=a.actualWidth,I++}m++}}});v=v||b.childNodes.length}),M&&z&&a.attr("title",x(a.textStr,["\x26lt;","\x26gt;"])),t&&t.removeChild(b),L&&a.applyTextOutline&&a.applyTextOutline(L)):b.appendChild(r.createTextNode(x(m)))}},getContrast:function(a){a=w(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,g,p,B,c,e,m,u){var l=this.label(a,b,g,u,null,null,null,null,"button"),z=0;l.attr(I({padding:8,r:2},B));E(l.element,J?"mouseover":"mouseenter",function(){3!==
z&&l.setState(1)});E(l.element,J?"mouseout":"mouseleave",function(){3!==z&&l.setState(z)});l.setState=function(a){1!==a&&(l.state=z=a);l.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0])};return l.on("click",function(a){3!==z&&p.call(l,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={};l(a)?b.d=a:
A(a)&&n(b,a);return this.createElement("path").attr(b)},circle:function(a,b,g){a=A(a)?a:{x:a,y:b,r:g};b=this.createElement("circle");b.xSetter=b.ySetter=function(a,b,g){g.setAttribute("c"+b,a)};return b.attr(a)},arc:function(a,b,g,p,B,c){A(a)?(p=a,b=p.y,g=p.r,a=p.x):p={innerR:p,start:B,end:c};a=this.symbol("arc",a,b,g,g,p);a.r=g;return a},rect:function(a,b,g,p,B,c){B=A(a)?a.r:B;c=this.createElement("rect");a=A(a)?a:void 0===a?{}:{x:a,y:b,width:Math.max(g,0),height:Math.max(p,0)};B&&(a.r=B);c.rSetter=
function(a,b,g){h(g,{rx:a,ry:a})};return c.attr(a)},setSize:function(a,b,p){var B=this.alignedObjects,c=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:g(p,!0)?void 0:0});c--;)B[c].align()},g:function(a){var b=this.createElement("g");return a?b.attr({"class":"highcharts-"+a}):b},image:function(a,b,g,p,B,c){var e={preserveAspectRatio:"none"},m,u=function(a,b){a.setAttributeNS?
a.setAttributeNS("http://www.w3.org/1999/xlink","href",b):a.setAttribute("hc-svg-href",b)},l=function(b){u(m.element,a);c.call(m,b)};1<arguments.length&&n(e,{x:b,y:g,width:p,height:B});m=this.createElement("image").attr(e);c?(u(m.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw\x3d\x3d"),e=new P.Image,E(e,"load",l),e.src=a,e.complete&&l({})):u(m.element,a);return m},symbol:function(a,b,p,B,c,e){var m=this,u,l=/^url\((.*?)\)$/,z=l.test(a),t=!z&&(this.symbols[a]?a:"circle"),
I=t&&this.symbols[t],d=v(b)&&I&&I.call(this.symbols,Math.round(b),Math.round(p),B,c,e),L,F;I?(u=this.path(d),n(u,{symbolName:t,x:b,y:p,width:B,height:c}),e&&n(u,e)):z&&(L=a.match(l)[1],u=this.image(L),u.imgwidth=g(N[L]&&N[L].width,e&&e.width),u.imgheight=g(N[L]&&N[L].height,e&&e.height),F=function(){u.attr({width:u.width,height:u.height})},k(["width","height"],function(a){u[a+"Setter"]=function(a,b){var g={},p=this["img"+b],B="width"===b?"translateX":"translateY";this[b]=a;v(p)&&(this.element&&this.element.setAttribute(b,
p),this.alignByTranslate||(g[B]=((this[b]||0)-p)/2,this.attr(g)))}}),v(b)&&u.attr({x:b,y:p}),u.isImg=!0,v(u.imgwidth)&&v(u.imgheight)?F():(u.attr({width:0,height:0}),x("img",{onload:function(){var a=f[m.chartIndex];0===this.width&&(y(this,{position:"absolute",top:"-999em"}),r.body.appendChild(this));N[L]={width:this.width,height:this.height};u.imgwidth=this.width;u.imgheight=this.height;u.element&&F();this.parentNode&&this.parentNode.removeChild(this);m.imgCount--;if(!m.imgCount&&a&&a.onload)a.onload()},
src:L}),this.imgCount++));return u},symbols:{circle:function(a,b,g,p){return this.arc(a+g/2,b+p/2,g/2,p/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,b,g,p){return["M",a,b,"L",a+g,b,a+g,b+p,a,b+p,"Z"]},triangle:function(a,b,g,p){return["M",a+g/2,b,"L",a+g,b+p,a,b+p,"Z"]},"triangle-down":function(a,b,g,p){return["M",a,b,"L",a+g,b,a+g/2,b+p,"Z"]},diamond:function(a,b,g,p){return["M",a+g/2,b,"L",a+g,b+p/2,a+g/2,b+p,a,b+p/2,"Z"]},arc:function(a,b,p,B,c){var e=c.start,m=c.r||p,u=c.r||B||p,l=c.end-
.001;p=c.innerR;B=g(c.open,.001>Math.abs(c.end-c.start-2*Math.PI));var z=Math.cos(e),t=Math.sin(e),n=Math.cos(l),l=Math.sin(l);c=.001>c.end-e-Math.PI?0:1;m=["M",a+m*z,b+u*t,"A",m,u,0,c,1,a+m*n,b+u*l];v(p)&&m.push(B?"M":"L",a+p*n,b+p*l,"A",p,p,0,c,0,a+p*z,b+p*t);m.push(B?"":"Z");return m},callout:function(a,b,g,p,B){var c=Math.min(B&&B.r||0,g,p),e=c+6,m=B&&B.anchorX;B=B&&B.anchorY;var u;u=["M",a+c,b,"L",a+g-c,b,"C",a+g,b,a+g,b,a+g,b+c,"L",a+g,b+p-c,"C",a+g,b+p,a+g,b+p,a+g-c,b+p,"L",a+c,b+p,"C",a,b+
p,a,b+p,a,b+p-c,"L",a,b+c,"C",a,b,a,b,a+c,b];m&&m>g?B>b+e&&B<b+p-e?u.splice(13,3,"L",a+g,B-6,a+g+6,B,a+g,B+6,a+g,b+p-c):u.splice(13,3,"L",a+g,p/2,m,B,a+g,p/2,a+g,b+p-c):m&&0>m?B>b+e&&B<b+p-e?u.splice(33,3,"L",a,B+6,a-6,B,a,B-6,a,b+c):u.splice(33,3,"L",a,p/2,m,B,a,p/2,a,b+c):B&&B>p&&m>a+e&&m<a+g-e?u.splice(23,3,"L",m+6,b+p,m,b+p+6,m-6,b+p,a+c,b+p):B&&0>B&&m>a+e&&m<a+g-e&&u.splice(3,3,"L",m-6,b,m,b-6,m+6,b,g-c,b);return u}},clipRect:function(b,g,p,B){var c=a.uniqueKey(),m=this.createElement("clipPath").attr({id:c}).add(this.defs);
b=this.rect(b,g,p,B,0).add(m);b.id=c;b.clipPath=m;b.count=0;return b},text:function(a,b,g,p){var B={};if(p&&(this.allowHTML||!this.forExport))return this.html(a,b,g);B.x=Math.round(b||0);g&&(B.y=Math.round(g));if(a||0===a)B.text=a;a=this.createElement("text").attr(B);p||(a.xSetter=function(a,b,g){var p=g.getElementsByTagName("tspan"),B,c=g.getAttribute(b),m;for(m=0;m<p.length;m++)B=p[m],B.getAttribute(b)===c&&B.setAttribute(b,a);g.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,g){var p=a;b&&g&&(p=Math.max(p*Math.cos(b*d),4));return{x:-a/3*Math.sin(b*d),y:p}},label:function(b,g,p,B,c,m,e,u,l){var z=this,t=z.g("button"!==l&&"label"),d=t.text=z.text("",0,0,e).attr({zIndex:1}),F,M,r=0,A=3,J=0,G,H,f,X,h,Q={},x,y=/^url\((.*?)\)$/.test(B),w=y,q,N,P,O;l&&t.addClass("highcharts-"+l);w=!0;
q=function(){return F.strokeWidth()%2/2};N=function(){var a=d.element.style,b={};M=(void 0===G||void 0===H||h)&&v(d.textStr)&&d.getBBox();t.width=(G||M.width||0)+2*A+J;t.height=(H||M.height||0)+2*A;x=A+z.fontMetrics(a&&a.fontSize,d).b;w&&(F||(t.box=F=z.symbols[B]||y?z.symbol(B):z.rect(),F.addClass(("button"===l?"":"highcharts-label-box")+(l?" highcharts-"+l+"-box":"")),F.add(t),a=q(),b.x=a,b.y=(u?-x:0)+a),b.width=Math.round(t.width),b.height=Math.round(t.height),F.attr(n(b,Q)),Q={})};P=function(){var a=
J+A,b;b=u?0:x;v(G)&&M&&("center"===h||"right"===h)&&(a+={center:.5,right:1}[h]*(G-M.width));if(a!==d.x||b!==d.y)d.attr("x",a),d.hasBoxWidthChanged&&(M=d.getBBox(!0),N()),void 0!==b&&d.attr("y",b);d.x=a;d.y=b};O=function(a,b){F?F.attr(a,b):Q[a]=b};t.onAdd=function(){d.add(t);t.attr({text:b||0===b?b:"",x:g,y:p});F&&v(c)&&t.attr({anchorX:c,anchorY:m})};t.widthSetter=function(b){G=a.isNumber(b)?b:null};t.heightSetter=function(a){H=a};t["text-alignSetter"]=function(a){h=a};t.paddingSetter=function(a){v(a)&&
a!==A&&(A=t.padding=a,P())};t.paddingLeftSetter=function(a){v(a)&&a!==J&&(J=a,P())};t.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==r&&(r=a,M&&t.attr({x:f}))};t.textSetter=function(a){void 0!==a&&d.textSetter(a);N();P()};t["stroke-widthSetter"]=function(a,b){a&&(w=!0);this["stroke-width"]=a;O(b,a)};t.rSetter=function(a,b){O(b,a)};t.anchorXSetter=function(a,b){c=t.anchorX=a;O(b,Math.round(a)-q()-f)};t.anchorYSetter=function(a,b){m=t.anchorY=a;O(b,a-X)};t.xSetter=function(a){t.x=a;r&&
(a-=r*((G||M.width)+2*A),t["forceAnimate:x"]=!0);f=Math.round(a);t.attr("translateX",f)};t.ySetter=function(a){X=t.y=Math.round(a);t.attr("translateY",X)};var S=t.css;return n(t,{css:function(a){if(a){var b={};a=I(a);k(t.textProps,function(g){void 0!==a[g]&&(b[g]=a[g],delete a[g])});d.css(b);"width"in b&&N()}return S.call(t,a)},getBBox:function(){return{width:M.width+2*A,height:M.height+2*A,x:M.x-A,y:M.y-A}},destroy:function(){L(t.element,"mouseenter");L(t.element,"mouseleave");d&&(d=d.destroy());
F&&(F=F.destroy());C.prototype.destroy.call(t);t=z=N=P=O=null}})}});a.Renderer=D})(K);(function(a){var C=a.attr,D=a.createElement,E=a.css,q=a.defined,h=a.each,f=a.extend,w=a.isFirefox,y=a.isMS,x=a.isWebKit,v=a.pick,d=a.pInt,c=a.SVGRenderer,r=a.win,k=a.wrap;f(a.SVGElement.prototype,{htmlCss:function(a){var b="SPAN"===this.element.tagName&&a&&"width"in a,c=v(b&&a.width,void 0);b&&(delete a.width,this.textWidth=c,this.htmlUpdateTransform());a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow=
"hidden");this.styles=f(this.styles,a);E(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,c=this.x||0,t=this.y||0,k=this.textAlign||"left",l={left:0,center:.5,right:1}[k],r=this.styles,J=r&&r.whiteSpace;E(b,{marginLeft:this.translateX||0,marginTop:this.translateY||0});this.inverted&&h(b.childNodes,function(c){a.invertChild(c,
b)});if("SPAN"===b.tagName){var r=this.rotation,A=this.textWidth&&d(this.textWidth),m=[r,k,b.innerHTML,this.textWidth,this.textAlign].join(),z;(z=A!==this.oldTextWidth)&&!(z=A>this.oldTextWidth)&&((z=this.textPxLength)||(E(b,{width:"",whiteSpace:J||"nowrap"}),z=b.offsetWidth),z=z>A);z&&/[ \-]/.test(b.textContent||b.innerText)?(E(b,{width:A+"px",display:"block",whiteSpace:J||"normal"}),this.oldTextWidth=A,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1;m!==this.cTT&&(J=a.fontMetrics(b.style.fontSize).b,
!q(r)||r===(this.oldRotation||0)&&k===this.oldAlign||this.setSpanRotation(r,l,J),this.getSpanCorrection(!q(r)&&this.textPxLength||b.offsetWidth,J,l,r,k));E(b,{left:c+(this.xCorr||0)+"px",top:t+(this.yCorr||0)+"px"});this.cTT=m;this.oldRotation=r;this.oldAlign=k}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,c){var e={},n=this.renderer.getTransformKey();e[n]=e.transform="rotate("+a+"deg)";e[n+(w?"Origin":"-origin")]=e.transformOrigin=100*b+"% "+c+"px";E(this.element,e)},getSpanCorrection:function(a,
b,c){this.xCorr=-a*c;this.yCorr=-b}});f(c.prototype,{getTransformKey:function(){return y&&!/Edge/.test(r.navigator.userAgent)?"-ms-transform":x?"-webkit-transform":w?"MozTransform":r.opera?"-o-transform":""},html:function(a,b,c){var e=this.createElement("span"),n=e.element,l=e.renderer,d=l.isSVG,r=function(a,b){h(["opacity","visibility"],function(c){k(a,c+"Setter",function(a,c,e,g){a.call(this,c,e,g);b[e]=c})});a.addedSetters=!0};e.textSetter=function(a){a!==n.innerHTML&&delete this.bBox;this.textStr=
a;n.innerHTML=v(a,"");e.doTransform=!0};d&&r(e,e.element.style);e.xSetter=e.ySetter=e.alignSetter=e.rotationSetter=function(a,b){"align"===b&&(b="textAlign");e[b]=a;e.doTransform=!0};e.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};e.attr({text:a,x:Math.round(b),y:Math.round(c)}).css({position:"absolute"});n.style.whiteSpace="nowrap";e.css=e.htmlCss;d&&(e.add=function(a){var b,c=l.box.parentNode,t=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)t.push(a),
a=a.parentGroup;h(t.reverse(),function(a){function m(b,p){a[p]=b;"translateX"===p?g.left=b+"px":g.top=b+"px";a.doTransform=!0}var g,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);g=b.style;f(a,{classSetter:function(a){return function(b){this.element.setAttribute("class",b);a.className=b}}(b),on:function(){t[0].div&&
e.on.apply({element:t[0].div},arguments);return a},translateXSetter:m,translateYSetter:m});a.addedSetters||r(a,g)})}}else b=c;b.appendChild(n);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e});return e}})})(K);(function(a){var C=a.defined,D=a.each,E=a.extend,q=a.merge,h=a.pick,f=a.timeUnits,w=a.win;a.Time=function(a){this.update(a,!1)};a.Time.prototype={defaultOptions:{},update:function(a){var f=h(a&&a.useUTC,!0),v=this;this.options=a=q(!0,this.options||{},a);this.Date=a.Date||w.Date;this.timezoneOffset=
(this.useUTC=f)&&a.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(f&&!a.getTimezoneOffset&&!a.timezone))||this.timezoneOffset?(this.get=function(a,c){var d=c.getTime(),k=d-v.getTimezoneOffset(c);c.setTime(k);a=c["getUTC"+a]();c.setTime(d);return a},this.set=function(a,c,r){var k;if("Milliseconds"===a||"Seconds"===a||"Minutes"===a&&0===c.getTimezoneOffset()%60)c["set"+a](r);else k=v.getTimezoneOffset(c),k=c.getTime()-k,c.setTime(k),c["setUTC"+a](r),a=v.getTimezoneOffset(c),
k=c.getTime()+a,c.setTime(k)}):f?(this.get=function(a,c){return c["getUTC"+a]()},this.set=function(a,c,r){return c["setUTC"+a](r)}):(this.get=function(a,c){return c["get"+a]()},this.set=function(a,c,r){return c["set"+a](r)})},makeTime:function(f,x,v,d,c,r){var k,n,b;this.useUTC?(k=this.Date.UTC.apply(0,arguments),n=this.getTimezoneOffset(k),k+=n,b=this.getTimezoneOffset(k),n!==b?k+=b-n:n-36E5!==this.getTimezoneOffset(k-36E5)||a.isSafari||(k-=36E5)):k=(new this.Date(f,x,h(v,1),h(d,0),h(c,0),h(r,0))).getTime();
return k},timezoneOffsetFunction:function(){var f=this,h=this.options,v=w.moment;if(!this.useUTC)return function(a){return 6E4*(new Date(a)).getTimezoneOffset()};if(h.timezone){if(v)return function(a){return 6E4*-v.tz(a,h.timezone).utcOffset()};a.error(25)}return this.useUTC&&h.getTimezoneOffset?function(a){return 6E4*h.getTimezoneOffset(a)}:function(){return 6E4*(f.timezoneOffset||0)}},dateFormat:function(f,h,v){if(!a.defined(h)||isNaN(h))return a.defaultOptions.lang.invalidDate||"";f=a.pick(f,"%Y-%m-%d %H:%M:%S");
var d=this,c=new this.Date(h),r=this.get("Hours",c),k=this.get("Day",c),n=this.get("Date",c),b=this.get("Month",c),e=this.get("FullYear",c),t=a.defaultOptions.lang,H=t.weekdays,l=t.shortWeekdays,G=a.pad,c=a.extend({a:l?l[k]:H[k].substr(0,3),A:H[k],d:G(n),e:G(n,2," "),w:k,b:t.shortMonths[b],B:t.months[b],m:G(b+1),o:b+1,y:e.toString().substr(2,2),Y:e,H:G(r),k:r,I:G(r%12||12),l:r%12||12,M:G(d.get("Minutes",c)),p:12>r?"AM":"PM",P:12>r?"am":"pm",S:G(c.getSeconds()),L:G(Math.floor(h%1E3),3)},a.dateFormats);
a.objectEach(c,function(a,b){for(;-1!==f.indexOf("%"+b);)f=f.replace("%"+b,"function"===typeof a?a.call(d,h):a)});return v?f.substr(0,1).toUpperCase()+f.substr(1):f},getTimeTicks:function(a,x,v,d){var c=this,r=[],k,n={},b;k=new c.Date(x);var e=a.unitRange,t=a.count||1,H;d=h(d,1);if(C(x)){c.set("Milliseconds",k,e>=f.second?0:t*Math.floor(c.get("Milliseconds",k)/t));e>=f.second&&c.set("Seconds",k,e>=f.minute?0:t*Math.floor(c.get("Seconds",k)/t));e>=f.minute&&c.set("Minutes",k,e>=f.hour?0:t*Math.floor(c.get("Minutes",
k)/t));e>=f.hour&&c.set("Hours",k,e>=f.day?0:t*Math.floor(c.get("Hours",k)/t));e>=f.day&&c.set("Date",k,e>=f.month?1:t*Math.floor(c.get("Date",k)/t));e>=f.month&&(c.set("Month",k,e>=f.year?0:t*Math.floor(c.get("Month",k)/t)),b=c.get("FullYear",k));e>=f.year&&c.set("FullYear",k,b-b%t);e===f.week&&(b=c.get("Day",k),c.set("Date",k,c.get("Date",k)-b+d+(b<d?-7:0)));b=c.get("FullYear",k);d=c.get("Month",k);var l=c.get("Date",k),G=c.get("Hours",k);x=k.getTime();c.variableTimezone&&(H=v-x>4*f.month||c.getTimezoneOffset(x)!==
c.getTimezoneOffset(v));x=k.getTime();for(k=1;x<v;)r.push(x),x=e===f.year?c.makeTime(b+k*t,0):e===f.month?c.makeTime(b,d+k*t):!H||e!==f.day&&e!==f.week?H&&e===f.hour&&1<t?c.makeTime(b,d,l,G+k*t):x+e*t:c.makeTime(b,d,l+k*t*(e===f.day?1:7)),k++;r.push(x);e<=f.hour&&1E4>r.length&&D(r,function(a){0===a%18E5&&"000000000"===c.dateFormat("%H%M%S%L",a)&&(n[a]="day")})}r.info=E(a,{higherRanks:n,totalRange:e*t});return r}}})(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,q){return a.time.dateFormat(D,C,q)}})(K);(function(a){var C=a.correctFloat,D=a.defined,E=a.destroyObjectProperties,q=a.fireEvent,h=a.isNumber,f=a.pick,w=a.deg2rad;a.Tick=function(a,f,v,d){this.axis=a;this.pos=f;this.type=v||"";this.isNewLabel=this.isNew=!0;v||d||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,h=a.options,v=a.chart,d=
a.categories,c=a.names,r=this.pos,k=h.labels,n=a.tickPositions,b=r===n[0],e=r===n[n.length-1],c=d?f(d[r],c[r],r):r,d=this.label,n=n.info,t;a.isDatetimeAxis&&n&&(t=h.dateTimeLabelFormats[n.higherRanks[r]||n.unitName]);this.isFirst=b;this.isLast=e;h={axis:a,chart:v,isFirst:b,isLast:e,dateTimeLabelFormat:t,value:a.isLog?C(a.lin2log(c)):c,pos:r};h=a.labelFormatter.call(h,h);if(D(d))d&&d.textStr!==h&&(!d.textWidth||k.style&&k.style.width||d.styles.width||d.css({width:null}),d.attr({text:h}));else{if(this.label=
d=D(h)&&k.enabled?v.renderer.text(h,0,0,k.useHTML).add(a.labelGroup):null)d.textPxLength=d.getBBox().width;this.rotation=0}},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var h=this.axis,v=h.options.labels,d=a.x,c=h.chart.chartWidth,r=h.chart.spacing,k=f(h.labelLeft,Math.min(h.pos,r[3])),r=f(h.labelRight,Math.max(h.isRadial?0:h.pos+h.len,c-r[1])),n=this.label,b=this.rotation,e={left:0,center:.5,right:1}[h.labelAlign||
n.attr("align")],t=n.getBBox().width,H=h.getSlotWidth(this),l=H,G=1,J,A={};if(b||"justify"!==f(v.overflow,"justify"))0>b&&d-e*t<k?J=Math.round(d/Math.cos(b*w)-k):0<b&&d+e*t>r&&(J=Math.round((c-d)/Math.cos(b*w)));else if(c=d+(1-e)*t,d-e*t<k?l=a.x+l*(1-e)-k:c>r&&(l=r-a.x+l*e,G=-1),l=Math.min(H,l),l<H&&"center"===h.labelAlign&&(a.x+=G*(H-l-e*(H-Math.min(t,l)))),t>l||h.autoRotation&&(n.styles||{}).width)J=l;J&&(A.width=J,(v.style||{}).textOverflow||(A.textOverflow="ellipsis"),n.css(A))},getPosition:function(f,
h,v,d){var c=this.axis,r=c.chart,k=d&&r.oldChartHeight||r.chartHeight;f={x:f?a.correctFloat(c.translate(h+v,null,null,d)+c.transB):c.left+c.offset+(c.opposite?(d&&r.oldChartWidth||r.chartWidth)-c.right-c.left:0),y:f?k-c.bottom+c.offset-(c.opposite?c.height:0):a.correctFloat(k-c.translate(h+v,null,null,d)-c.transB)};q(this,"afterGetPosition",{pos:f});return f},getLabelPosition:function(a,f,v,d,c,r,k,n){var b=this.axis,e=b.transA,t=b.reversed,H=b.staggerLines,l=b.tickRotCorr||{x:0,y:0},G=c.y,J=d||b.reserveSpaceDefault?
0:-b.labelOffset*("center"===b.labelAlign?.5:1),A={};D(G)||(G=0===b.side?v.rotation?-8:-v.getBBox().height:2===b.side?l.y+8:Math.cos(v.rotation*w)*(l.y-v.getBBox(!1,0).height/2));a=a+c.x+J+l.x-(r&&d?r*e*(t?-1:1):0);f=f+G-(r&&!d?r*e*(t?1:-1):0);H&&(v=k/(n||1)%H,b.opposite&&(v=H-v-1),f+=b.labelOffset/H*v);A.x=a;A.y=Math.round(f);q(this,"afterGetLabelPosition",{pos:A});return A},getMarkPath:function(a,f,v,d,c,r){return r.crispLine(["M",a,f,"L",a+(c?0:-v),f+(c?v:0)],d)},renderGridLine:function(a,f,v){var d=
this.axis,c=this.gridLine,r={},k=this.pos,n=this.type,b=d.tickmarkOffset,e=d.chart.renderer;c||(n||(r.zIndex=1),a&&(r.opacity=0),this.gridLine=c=e.path().attr(r).addClass("highcharts-"+(n?n+"-":"")+"grid-line").add(d.gridGroup));if(!a&&c&&(a=d.getPlotLinePath(k+b,c.strokeWidth()*v,a,!0)))c[this.isNew?"attr":"animate"]({d:a,opacity:f})},renderMark:function(a,f,v){var d=this.axis,c=d.chart.renderer,r=this.type,k=d.tickSize(r?r+"Tick":"tick"),n=this.mark,b=!n,e=a.x;a=a.y;k&&(d.opposite&&(k[0]=-k[0]),
b&&(this.mark=n=c.path().addClass("highcharts-"+(r?r+"-":"")+"tick").add(d.axisGroup)),n[b?"attr":"animate"]({d:this.getMarkPath(e,a,k[0],n.strokeWidth()*v,d.horiz,c),opacity:f}))},renderLabel:function(a,w,v,d){var c=this.axis,r=c.horiz,k=c.options,n=this.label,b=k.labels,e=b.step,c=c.tickmarkOffset,t=!0,H=a.x;a=a.y;n&&h(H)&&(n.xy=a=this.getLabelPosition(H,a,n,r,b,c,d,e),this.isFirst&&!this.isLast&&!f(k.showFirstLabel,1)||this.isLast&&!this.isFirst&&!f(k.showLastLabel,1)?t=!1:!r||b.step||b.rotation||
w||0===v||this.handleOverflow(a),e&&d%e&&(t=!1),t&&h(a.y)?(a.opacity=v,n[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1):(n.attr("y",-9999),this.isNewLabel=!0))},render:function(h,w,v){var d=this.axis,c=d.horiz,r=this.getPosition(c,this.pos,d.tickmarkOffset,w),k=r.x,n=r.y,d=c&&k===d.pos+d.len||!c&&n===d.pos?-1:1;v=f(v,1);this.isActive=!0;this.renderGridLine(w,v,d);this.renderMark(r,v,d);this.renderLabel(r,w,v,h);this.isNew=!1;a.fireEvent(this,"afterRender")},destroy:function(){E(this,this.axis)}}})(K);
var ba=function(a){var C=a.addEvent,D=a.animObject,E=a.arrayMax,q=a.arrayMin,h=a.correctFloat,f=a.defaultOptions,w=a.defined,y=a.deg2rad,x=a.destroyObjectProperties,v=a.each,d=a.extend,c=a.fireEvent,r=a.format,k=a.getMagnitude,n=a.grep,b=a.inArray,e=a.isArray,t=a.isNumber,H=a.isString,l=a.merge,G=a.normalizeTickInterval,J=a.objectEach,A=a.pick,m=a.removeEvent,z=a.splat,I=a.syncTimeout,u=a.Tick,F=function(){this.init.apply(this,arguments)};a.extend(F.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",
second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,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 g=B.isX,p=this;p.chart=a;p.horiz=a.inverted&&!p.isZAxis?!g:g;p.isXAxis=g;p.coll=p.coll||
(g?"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 e=this.options,m=e.type;p.labelFormatter=e.labels.formatter||p.defaultLabelFormatter;p.userOptions=B;p.minPixelPadding=0;p.reversed=e.reversed;p.visible=!1!==e.visible;p.zoomEnabled=!1!==e.zoomEnabled;p.hasNames="category"===m||!0===e.categories;p.categories=e.categories||p.hasNames;p.names||(p.names=[],p.names.keys={});p.plotLinesAndBandsGroups={};p.isLog=
"logarithmic"===m;p.isDatetimeAxis="datetime"===m;p.positiveValuesOnly=p.isLog&&!p.allowNegativeLog;p.isLinked=w(e.linkedTo);p.ticks={};p.labelEdge=[];p.minorTicks={};p.plotLinesAndBands=[];p.alternateBands={};p.len=0;p.minRange=p.userMinRange=e.minRange||e.maxZoom;p.range=e.range;p.offset=e.offset||0;p.stacks={};p.oldStacks={};p.stacksTouched=0;p.max=null;p.min=null;p.crosshair=A(e.crosshair,z(a.options.tooltip.crosshairs)[g?0:1],!1);B=p.options.events;-1===b(p,a.axes)&&(g?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&&g&&void 0===p.reversed&&(p.reversed=!0);J(B,function(a,b){C(p,b,a)});p.lin2log=e.linearToLogConverter||p.lin2log;p.isLog&&(p.val2lin=p.log2lin,p.lin2val=p.lin2log);c(this,"afterInit")},setOptions:function(a){this.options=l(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],
l(f[this.coll],a));c(this,"afterSetOptions",{userOptions:a})},defaultLabelFormatter:function(){var b=this.axis,B=this.value,c=b.chart.time,p=b.categories,e=this.dateTimeLabelFormat,m=f.lang,u=m.numericSymbols,m=m.numericSymbolMagnitude||1E3,l=u&&u.length,z,t=b.options.labels.format,b=b.isLog?Math.abs(B):b.tickInterval;if(t)z=r(t,this,c);else if(p)z=B;else if(e)z=c.dateFormat(e,B);else if(l&&1E3<=b)for(;l--&&void 0===z;)c=Math.pow(m,l+1),b>=c&&0===10*B%c&&null!==u[l]&&0!==B&&(z=a.numberFormat(B/c,
-1)+u[l]);void 0===z&&(z=1E4<=Math.abs(B)?a.numberFormat(B,-1):a.numberFormat(B,-1,void 0,""));return z},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();v(a.series,function(g){if(g.visible||!b.options.chart.ignoreHiddenSeries){var p=g.options,c=p.threshold,B;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=c&&(c=null);if(a.isXAxis)p=g.xData,
p.length&&(g=q(p),B=E(p),t(g)||g instanceof Date||(p=n(p,t),g=q(p),B=E(p)),p.length&&(a.dataMin=Math.min(A(a.dataMin,p[0],g),g),a.dataMax=Math.max(A(a.dataMax,p[0],B),B)));else if(g.getExtremes(),B=g.dataMax,g=g.dataMin,w(g)&&w(B)&&(a.dataMin=Math.min(A(a.dataMin,g),g),a.dataMax=Math.max(A(a.dataMax,B),B)),w(c)&&(a.threshold=c),!p.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})});c(this,"afterGetSeriesExtremes")},translate:function(a,b,c,p,e,m){var g=this.linkedParent||this,B=1,u=0,l=p?
g.oldTransA:g.transA;p=p?g.oldMin:g.min;var z=g.minPixelPadding;e=(g.isOrdinal||g.isBroken||g.isLog&&e)&&g.lin2val;l||(l=g.transA);c&&(B*=-1,u=g.len);g.reversed&&(B*=-1,u-=B*(g.sector||g.len));b?(a=(a*B+u-z)/l+p,e&&(a=g.lin2val(a))):(e&&(a=g.val2lin(a)),a=t(p)?B*(a-p)*l+u+B*z+(t(m)?l*m: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,c,p,e){var g=this.chart,B=this.left,m=this.top,u,l,z=c&&g.oldChartHeight||g.chartHeight,n=c&&g.oldChartWidth||g.chartWidth,k;u=this.transB;var d=function(a,b,g){if(a<b||a>g)p?a=Math.min(Math.max(b,a),g):k=!0;return a};e=A(e,this.translate(a,null,null,c));e=Math.min(Math.max(-1E5,e),1E5);a=c=Math.round(e+u);u=l=Math.round(z-e-u);t(e)?this.horiz?(u=m,l=z-this.bottom,a=c=d(a,B,B+this.width)):(a=B,c=n-this.right,u=l=d(u,m,m+this.height)):(k=!0,p=!1);return k&&!p?null:g.renderer.crispLine(["M",a,u,"L",
c,l],b||1)},getLinearTickPositions:function(a,b,c){var g,e=h(Math.floor(b/a)*a);c=h(Math.ceil(c/a)*a);var B=[],m;h(e+a)===e&&(m=20);if(this.single)return[b];for(b=e;b<=c;){B.push(b);b=h(b+a,m);if(b===g)break;g=b}return B},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,c=a.tickPositions,p=a.minorTickInterval,e=[],m=a.pointRangePadding||0,u=a.min-
m,m=a.max+m,l=m-u;if(l&&l/p<a.len/3)if(a.isLog)v(this.paddedTicks,function(b,g,c){g&&e.push.apply(e,a.getLogTickPositions(p,c[g-1],c[g],!0))});else if(a.isDatetimeAxis&&"auto"===this.getMinorTickInterval())e=e.concat(a.getTimeTicks(a.normalizeTimeTickInterval(p),u,m,b.startOfWeek));else for(b=u+(c[0]-u)%p;b<=m&&b!==e[0];b+=p)e.push(b);0!==e.length&&a.trimTicks(e);return e},adjustForMinRange:function(){var a=this.options,b=this.min,c=this.max,p,e,m,u,l,z,t,n;this.isXAxis&&void 0===this.minRange&&!this.isLog&&
(w(a.min)||w(a.max)?this.minRange=null:(v(this.series,function(a){z=a.xData;for(u=t=a.xIncrement?1:z.length-1;0<u;u--)if(l=z[u]-z[u-1],void 0===m||l<m)m=l}),this.minRange=Math.min(5*m,this.dataMax-this.dataMin)));c-b<this.minRange&&(e=this.dataMax-this.dataMin>=this.minRange,n=this.minRange,p=(n-c+b)/2,p=[b-p,A(a.min,b-p)],e&&(p[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),b=E(p),c=[b+n,A(a.max,b+n)],e&&(c[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),c=q(c),c-b<n&&(p[0]=c-n,p[1]=
A(a.min,c-n),b=E(p)));this.min=b;this.max=c},getClosest:function(){var a;this.categories?a=1:v(this.series,function(b){var g=b.closestPointRange,p=b.visible||!b.chart.options.chart.ignoreHiddenSeries;!b.noSharedTooltip&&w(g)&&p&&(a=w(a)?Math.min(a,g):g)});return a},nameToX:function(a){var g=e(this.categories),c=g?this.categories:this.names,p=a.options.x,m;a.series.requireSorting=!1;w(p)||(p=!1===this.options.uniqueNames?a.series.autoIncrement():g?b(a.name,c):A(c.keys[a.name],-1));-1===p?g||(m=c.length):
m=p;void 0!==m&&(this.names[m]=a.name,this.names.keys[a.name]=m);return m},updateNames:function(){var b=this,c=this.names;0<c.length&&(v(a.keys(c.keys),function(a){delete c.keys[a]}),c.length=0,this.minRange=this.userMinRange,v(this.series||[],function(a){a.xIncrement=null;if(!a.points||a.isDirtyData)a.processData(),a.generatePoints();v(a.points,function(g,c){var p;g.options&&(p=b.nameToX(g),void 0!==p&&p!==g.x&&(g.x=p,a.xData[c]=p))})}))},setAxisTranslation:function(a){var b=this,g=b.max-b.min,p=
b.axisPointRange||0,e,m=0,u=0,l=b.linkedParent,z=!!b.categories,t=b.transA,n=b.isXAxis;if(n||z||p)e=b.getClosest(),l?(m=l.minPointOffset,u=l.pointRangePadding):v(b.series,function(a){var g=z?1:n?A(a.options.pointRange,e,0):b.axisPointRange||0;a=a.options.pointPlacement;p=Math.max(p,g);b.single||(m=Math.max(m,H(a)?0:g/2),u=Math.max(u,"on"===a?0:g))}),l=b.ordinalSlope&&e?b.ordinalSlope/e:1,b.minPointOffset=m*=l,b.pointRangePadding=u*=l,b.pointRange=Math.min(p,g),n&&(b.closestPointRange=e);a&&(b.oldTransA=
t);b.translationSlope=b.transA=t=b.options.staticScale||b.len/(g+u||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=t*m;c(this,"afterSetAxisTranslation")},minFromRange:function(){return this.max-this.range},setTickInterval:function(b){var g=this,e=g.chart,p=g.options,m=g.isLog,u=g.isDatetimeAxis,l=g.isXAxis,z=g.isLinked,n=p.maxPadding,d=p.minPadding,I=p.tickInterval,F=p.tickPixelInterval,r=g.categories,f=t(g.threshold)?g.threshold:null,J=g.softThreshold,H,x,q,y;u||r||z||this.getTickAmount();
q=A(g.userMin,p.min);y=A(g.userMax,p.max);z?(g.linkedParent=e[g.coll][p.linkedTo],e=g.linkedParent.getExtremes(),g.min=A(e.min,e.dataMin),g.max=A(e.max,e.dataMax),p.type!==g.linkedParent.options.type&&a.error(11,1)):(!J&&w(f)&&(g.dataMin>=f?(H=f,d=0):g.dataMax<=f&&(x=f,n=0)),g.min=A(q,H,g.dataMin),g.max=A(y,x,g.dataMax));m&&(g.positiveValuesOnly&&!b&&0>=Math.min(g.min,A(g.dataMin,g.min))&&a.error(10,1),g.min=h(g.log2lin(g.min),15),g.max=h(g.log2lin(g.max),15));g.range&&w(g.max)&&(g.userMin=g.min=
q=Math.max(g.dataMin,g.minFromRange()),g.userMax=y=g.max,g.range=null);c(g,"foundExtremes");g.beforePadding&&g.beforePadding();g.adjustForMinRange();!(r||g.axisPointRange||g.usePercentage||z)&&w(g.min)&&w(g.max)&&(e=g.max-g.min)&&(!w(q)&&d&&(g.min-=e*d),!w(y)&&n&&(g.max+=e*n));t(p.softMin)&&!t(g.userMin)&&(g.min=Math.min(g.min,p.softMin));t(p.softMax)&&!t(g.userMax)&&(g.max=Math.max(g.max,p.softMax));t(p.floor)&&(g.min=Math.max(g.min,p.floor));t(p.ceiling)&&(g.max=Math.min(g.max,p.ceiling));J&&w(g.dataMin)&&
(f=f||0,!w(q)&&g.min<f&&g.dataMin>=f?g.min=f:!w(y)&&g.max>f&&g.dataMax<=f&&(g.max=f));g.tickInterval=g.min===g.max||void 0===g.min||void 0===g.max?1:z&&!I&&F===g.linkedParent.options.tickPixelInterval?I=g.linkedParent.tickInterval:A(I,this.tickAmount?(g.max-g.min)/Math.max(this.tickAmount-1,1):void 0,r?1:(g.max-g.min)*F/Math.max(g.len,F));l&&!b&&v(g.series,function(a){a.processData(g.min!==g.oldMin||g.max!==g.oldMax)});g.setAxisTranslation(!0);g.beforeSetTickPositions&&g.beforeSetTickPositions();
g.postProcessTickInterval&&(g.tickInterval=g.postProcessTickInterval(g.tickInterval));g.pointRange&&!I&&(g.tickInterval=Math.max(g.pointRange,g.tickInterval));b=A(p.minTickInterval,g.isDatetimeAxis&&g.closestPointRange);!I&&g.tickInterval<b&&(g.tickInterval=b);u||m||I||(g.tickInterval=G(g.tickInterval,null,k(g.tickInterval),A(p.allowDecimals,!(.5<g.tickInterval&&5>g.tickInterval&&1E3<g.max&&9999>g.max)),!!this.tickAmount));this.tickAmount||(g.tickInterval=g.unsquish());this.setTickPositions()},setTickPositions:function(){var b=
this.options,e,m=b.tickPositions;e=this.getMinorTickInterval();var p=b.tickPositioner,u=b.startOnTick,l=b.endOnTick;this.tickmarkOffset=this.categories&&"between"===b.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===e&&this.tickInterval?this.tickInterval/5:e;this.single=this.min===this.max&&w(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==b.allowDecimals);this.tickPositions=e=m&&m.slice();!e&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>
Math.max(2*this.len,200)?(e=[this.min,this.max],a.error(19)):e=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),e.length>this.len&&(e=[e[0],e.pop()],e[0]===e[1]&&(e.length=1)),this.tickPositions=e,p&&(p=p.apply(this,[this.min,this.max])))&&
(this.tickPositions=e=p);this.paddedTicks=e.slice(0);this.trimTicks(e,u,l);this.isLinked||(this.single&&2>e.length&&(this.min-=.5,this.max+=.5),m||p||this.adjustTickAmount());c(this,"afterSetTickPositions")},trimTicks:function(a,b,e){var g=a[0],c=a[a.length-1],m=this.minPointOffset||0;if(!this.isLinked){if(b&&-Infinity!==g)this.min=g;else for(;this.min-m>a[0];)a.shift();if(e)this.max=c;else for(;this.max+m<a[a.length-1];)a.pop();0===a.length&&w(g)&&!this.options.tickPositions&&a.push((c+g)/2)}},alignToOthers:function(){var a=
{},b,e=this.options;!1===this.chart.options.chart.alignTicks||!1===e.alignTicks||!1===e.startOnTick||!1===e.endOnTick||this.isLog||v(this.chart[this.coll],function(g){var p=g.options,p=[g.horiz?p.left:p.top,p.width,p.height,p.pane].join();g.series.length&&(a[p]?b=!0:a[p]=1)});return b},getTickAmount:function(){var a=this.options,b=a.tickAmount,e=a.tickPixelInterval;!w(a.tickInterval)&&this.len<e&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&(b=Math.ceil(this.len/
e)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,e=this.tickAmount,p=this.finalTickAmt,c=b&&b.length,m=A(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(c<e){for(;b.length<e;)b.length%2||this.min===m?b.push(h(b[b.length-1]+a)):b.unshift(h(b[0]-a));this.transA*=(c-1)/(e-1);this.min=b[0];this.max=b[b.length-1]}else c>e&&(this.tickInterval*=2,this.setTickPositions());if(w(p)){for(a=e=b.length;a--;)(3===p&&
1===a%2||2>=p&&0<a&&a<e-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;v(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,e,p,m){var g=this,u=g.chart;e=A(e,!0);v(g.series,function(a){delete a.kdTree});m=d(m,{min:a,max:b});c(g,"setExtremes",m,function(){g.userMin=a;g.userMax=b;g.eventArgs=m;e&&u.redraw(p)})},zoom:function(a,b){var g=this.dataMin,p=this.dataMax,e=this.options,
c=Math.min(g,A(e.min,g)),e=Math.max(p,A(e.max,p));if(a!==this.min||b!==this.max)this.allowZoomOutside||(w(g)&&(a<c&&(a=c),a>e&&(a=e)),w(p)&&(b<c&&(b=c),b>e&&(b=e))),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,e=this.options,c=e.offsets||[0,0,0,0],p=this.horiz,m=this.width=Math.round(a.relativeLength(A(e.width,b.plotWidth-c[3]+c[1]),b.plotWidth)),u=this.height=Math.round(a.relativeLength(A(e.height,b.plotHeight-
c[0]+c[2]),b.plotHeight)),l=this.top=Math.round(a.relativeLength(A(e.top,b.plotTop+c[0]),b.plotHeight,b.plotTop)),e=this.left=Math.round(a.relativeLength(A(e.left,b.plotLeft+c[3]),b.plotWidth,b.plotLeft));this.bottom=b.chartHeight-u-l;this.right=b.chartWidth-m-e;this.len=Math.max(p?m:u,0);this.pos=p?e:l},getExtremes:function(){var a=this.isLog;return{min:a?h(this.lin2log(this.min)):this.min,max:a?h(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,g=b?this.lin2log(this.min):this.min,b=b?this.lin2log(this.max):this.max;null===a||-Infinity===a?a=g:Infinity===a?a=b:g>a?a=g: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,g=b[a+"Length"],p=A(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(p&&g)return"inside"===b[a+"Position"]&&(g=-g),[g,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,e=this.tickInterval,p=e,c=this.len/(((this.categories?1:0)+this.max-this.min)/e),m,u=a.rotation,l=this.labelMetrics(),z,t=Number.MAX_VALUE,n,k=function(a){a/=c||1;a=1<a?Math.ceil(a):1;return h(a*e)};b?(n=!a.staggerLines&&!a.step&&(w(u)?[u]:c<A(a.autoRotationLimit,
80)&&a.autoRotation))&&v(n,function(a){var b;if(a===u||a&&-90<=a&&90>=a)z=k(Math.abs(l.h/Math.sin(y*a))),b=z+Math.abs(a/360),b<t&&(t=b,m=a,p=z)}):a.step||(p=k(l.h));this.autoRotation=n;this.labelRotation=A(m,u);return p},getSlotWidth:function(){var a=this.chart,b=this.horiz,e=this.options.labels,p=Math.max(this.tickPositions.length-(this.categories?0:1),1),c=a.margin[3];return b&&2>(e.step||0)&&!e.rotation&&(this.staggerLines||1)*this.len/p||!b&&(e.style&&parseInt(e.style.width,10)||c&&c-a.spacing[3]||
.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,e=this.tickPositions,p=this.ticks,c=this.options.labels,m=c&&c.style||{},u=this.horiz,l=this.getSlotWidth(),z=Math.max(1,Math.round(l-2*(c.padding||5))),t={},n=this.labelMetrics(),k=c.style&&c.style.textOverflow,d,I,F=0,r;H(c.rotation)||(t.rotation=c.rotation||0);v(e,function(a){(a=p[a])&&a.label&&a.label.textPxLength>F&&(F=a.label.textPxLength)});this.maxLabelLength=F;if(this.autoRotation)F>z&&F>n.h?t.rotation=this.labelRotation:
this.labelRotation=0;else if(l&&(d=z,!k))for(I="clip",z=e.length;!u&&z--;)if(r=e[z],r=p[r].label)r.styles&&"ellipsis"===r.styles.textOverflow?r.css({textOverflow:"clip"}):r.textPxLength>l&&r.css({width:l+"px"}),r.getBBox().height>this.len/e.length-(n.h-n.f)&&(r.specificTextOverflow="ellipsis");t.rotation&&(d=F>.5*a.chartHeight?.33*a.chartHeight:F,k||(I="ellipsis"));if(this.labelAlign=c.align||this.autoLabelAlign(this.labelRotation))t.align=this.labelAlign;v(e,function(a){var b=(a=p[a])&&a.label,g=
m.width,e={};b&&(b.attr(t),d&&!g&&"nowrap"!==m.whiteSpace&&(d<b.textPxLength||"SPAN"===b.element.tagName)?(e.width=d,k||(e.textOverflow=b.specificTextOverflow||I),b.css(e)):b.styles&&b.styles.width&&!e.width&&!g&&b.css({width:null}),delete b.specificTextOverflow,a.rotation=t.rotation)});this.tickRotCorr=b.rotCorr(n.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||w(this.min)&&w(this.max)&&this.tickPositions&&0<this.tickPositions.length},addTitle:function(a){var b=
this.chart.renderer,g=this.horiz,p=this.opposite,e=this.options.title,c;this.axisTitle||((c=e.textAlign)||(c=(g?{low:"left",middle:"center",high:"right"}:{low:p?"right":"left",middle:"center",high:p?"left":"right"})[e.align]),this.axisTitle=b.text(e.text,0,0,e.useHTML).attr({zIndex:7,rotation:e.rotation||0,align:c}).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 u(this,a)},getOffset:function(){var a=this,b=a.chart,e=b.renderer,p=a.options,m=a.tickPositions,u=a.ticks,l=a.horiz,z=a.side,t=b.inverted&&!a.isZAxis?[1,0,3,2][z]:z,n,k,d=0,I,F=0,r=p.title,f=p.labels,G=0,H=b.axisOffset,b=b.clipOffset,h=[-1,1,1,-1][z],x=p.className,q=a.axisParent,y=this.tickSize("tick");n=a.hasData();a.showAxis=k=n||A(p.showEmpty,!0);a.staggerLines=a.horiz&&f.staggerLines;a.axisGroup||(a.gridGroup=e.g("grid").attr({zIndex:p.gridZIndex||1}).addClass("highcharts-"+
this.coll.toLowerCase()+"-grid "+(x||"")).add(q),a.axisGroup=e.g("axis").attr({zIndex:p.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(x||"")).add(q),a.labelGroup=e.g("axis-labels").attr({zIndex:f.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(x||"")).add(q));n||a.isLinked?(v(m,function(b,g){a.generateTick(b,g)}),a.renderUnsquish(),a.reserveSpaceDefault=0===z||2===z||{1:"left",3:"right"}[z]===a.labelAlign,A(f.reserveSpace,"center"===a.labelAlign?!0:null,a.reserveSpaceDefault)&&
v(m,function(a){G=Math.max(u[a].getLabelSize(),G)}),a.staggerLines&&(G*=a.staggerLines),a.labelOffset=G*(a.opposite?-1:1)):J(u,function(a,b){a.destroy();delete u[b]});r&&r.text&&!1!==r.enabled&&(a.addTitle(k),k&&!1!==r.reserveSpace&&(a.titleOffset=d=a.axisTitle.getBBox()[l?"height":"width"],I=r.offset,F=w(I)?0:A(r.margin,l?5:10)));a.renderLine();a.offset=h*A(p.offset,H[z]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};e=0===z?-a.labelMetrics().h:2===z?a.tickRotCorr.y:0;F=Math.abs(G)+F;G&&(F=F-e+h*(l?A(f.y,
a.tickRotCorr.y+8*h):f.x));a.axisTitleMargin=A(I,F);H[z]=Math.max(H[z],a.axisTitleMargin+d+h*a.offset,F,n&&m.length&&y?y[0]+h*a.offset:0);p=p.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);b[t]=Math.max(b[t],p);c(this,"afterGetOffset")},getLinePath:function(a){var b=this.chart,g=this.opposite,e=this.offset,c=this.horiz,m=this.left+(g?this.width:0)+e,e=b.chartHeight-this.bottom-(g?this.height:0)+e;g&&(a*=-1);return b.renderer.crispLine(["M",c?this.left:m,c?e:this.top,"L",c?b.chartWidth-this.right:
m,c?e: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,e=this.top,p=this.len,c=this.options.title,m=a?b:e,u=this.opposite,l=this.offset,z=c.x||0,t=c.y||0,n=this.axisTitle,k=this.chart.renderer.fontMetrics(c.style&&c.style.fontSize,n),n=Math.max(n.getBBox(null,0).height-k.h-1,0),p={low:m+(a?0:p),middle:m+p/2,high:m+(a?p:0)}[c.align],
b=(a?e+this.height:b)+(a?1:-1)*(u?-1:1)*this.axisTitleMargin+[-n,n,k.f,-n][this.side];return{x:a?p+z:b+(u?this.width:0)+l+z,y:a?b+t-(u?this.height:0)+l:p+t}},renderMinorTick:function(a){var b=this.chart.hasRendered&&t(this.oldMin),g=this.minorTicks;g[a]||(g[a]=new u(this,a,"minor"));b&&g[a].isNew&&g[a].render(null,!0);g[a].render(null,!1,1)},renderTick:function(a,b){var g=this.isLinked,e=this.ticks,c=this.chart.hasRendered&&t(this.oldMin);if(!g||a>=this.min&&a<=this.max)e[a]||(e[a]=new u(this,a)),
c&&e[a].isNew&&e[a].render(b,!0,.1),e[a].render(b)},render:function(){var b=this,e=b.chart,m=b.options,p=b.isLog,l=b.isLinked,z=b.tickPositions,n=b.axisTitle,k=b.ticks,d=b.minorTicks,F=b.alternateBands,r=m.stackLabels,f=m.alternateGridColor,A=b.tickmarkOffset,G=b.axisLine,H=b.showAxis,h=D(e.renderer.globalAnimation),w,x;b.labelEdge.length=0;b.overlap=!1;v([k,d,F],function(a){J(a,function(a){a.isActive=!1})});if(b.hasData()||l)b.minorTickInterval&&!b.categories&&v(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),
z.length&&(v(z,function(a,e){b.renderTick(a,e)}),A&&(0===b.min||b.single)&&(k[-1]||(k[-1]=new u(b,-1,null,!0)),k[-1].render(-1))),f&&v(z,function(g,c){x=void 0!==z[c+1]?z[c+1]+A:b.max-A;0===c%2&&g<b.max&&x<=b.max+(e.polar?-A:A)&&(F[g]||(F[g]=new a.PlotLineOrBand(b)),w=g+A,F[g].options={from:p?b.lin2log(w):w,to:p?b.lin2log(x):x,color:f},F[g].render(),F[g].isActive=!0)}),b._addedPlotLB||(v((m.plotLines||[]).concat(m.plotBands||[]),function(a){b.addPlotBandOrLine(a)}),b._addedPlotLB=!0);v([k,d,F],function(a){var b,
g=[],p=h.duration;J(a,function(a,b){a.isActive||(a.render(b,!1,0),a.isActive=!1,g.push(b))});I(function(){for(b=g.length;b--;)a[g[b]]&&!a[g[b]].isActive&&(a[g[b]].destroy(),delete a[g[b]])},a!==F&&e.hasRendered&&p?p:0)});G&&(G[G.isPlaced?"animate":"attr"]({d:this.getLinePath(G.strokeWidth())}),G.isPlaced=!0,G[H?"show":"hide"](!0));n&&H&&(m=b.getTitlePosition(),t(m.y)?(n[n.isNew?"attr":"animate"](m),n.isNew=!1):(n.attr("y",-9999),n.isNew=!0));r&&r.enabled&&b.renderStackTotals();b.isDirty=!1;c(this,
"afterRender")},redraw:function(){this.visible&&(this.render(),v(this.plotLinesAndBands,function(a){a.render()}));v(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var e=this,g=e.stacks,p=e.plotLinesAndBands,u;c(this,"destroy",{keepEvents:a});a||m(e);J(g,function(a,b){x(a);g[b]=null});v([e.ticks,e.minorTicks,e.alternateBands],function(a){x(a)});if(p)for(a=p.length;a--;)p[a].destroy();v("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" "),
function(a){e[a]&&(e[a]=e[a].destroy())});for(u in e.plotLinesAndBandsGroups)e.plotLinesAndBandsGroups[u]=e.plotLinesAndBandsGroups[u].destroy();J(e,function(a,g){-1===b(g,e.keepProps)&&delete e[g]})},drawCrosshair:function(a,b){var e,p=this.crosshair,g=A(p.snap,!0),m,u=this.cross;c(this,"drawCrosshair",{e:a,point:b});a||(a=this.cross&&this.cross.e);if(this.crosshair&&!1!==(w(b)||!g)){g?w(b)&&(m=A(b.crosshairPos,this.isXAxis?b.plotX:this.len-b.plotY)):m=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+
this.pos);w(m)&&(e=this.getPlotLinePath(b&&(this.isXAxis?b.x:A(b.stackY,b.y)),null,null,null,m)||null);if(!w(e)){this.hideCrosshair();return}g=this.categories&&!this.isRadial;u||(this.cross=u=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(g?"category ":"thin ")+p.className).attr({zIndex:A(p.zIndex,2)}).add());u.show().attr({d:e});g&&!p.width&&u.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=F}(K);(function(a){var C=a.Axis,D=a.getMagnitude,E=a.normalizeTickInterval,q=a.timeUnits;C.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)};C.prototype.normalizeTimeTickInterval=function(a,f){var h=f||[["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]];f=h[h.length-1];var y=q[f[0]],x=f[1],v;for(v=0;v<h.length&&!(f=h[v],y=q[f[0]],x=f[1],h[v+1]&&a<=(y*x[x.length-1]+q[h[v+1][0]])/2);v++);y===q.year&&a<5*y&&(x=[1,2,5]);a=E(a/y,x,"year"===f[0]?Math.max(D(a/y),1):1);return{unitRange:y,count:a,unitName:f[0]}}})(K);(function(a){var C=a.Axis,D=a.getMagnitude,E=a.map,q=a.normalizeTickInterval,h=a.pick;C.prototype.getLogTickPositions=function(a,w,y,x){var f=this.options,d=this.len,c=[];x||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),
c=this.getLinearTickPositions(a,w,y);else if(.08<=a)for(var d=Math.floor(w),r,k,n,b,e,f=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];d<y+1&&!e;d++)for(k=f.length,r=0;r<k&&!e;r++)n=this.log2lin(this.lin2log(d)*f[r]),n>w&&(!x||b<=y)&&void 0!==b&&c.push(b),b>y&&(e=!0),b=n;else w=this.lin2log(w),y=this.lin2log(y),a=x?this.getMinorTickInterval():f.tickInterval,a=h("auto"===a?null:a,this._minorAutoInterval,f.tickPixelInterval/(x?5:1)*(y-w)/((x?d/this.tickPositions.length:d)||1)),a=q(a,null,D(a)),
c=E(this.getLinearTickPositions(a,w,y),this.log2lin),x||(this._minorAutoInterval=a/5);x||(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,E=a.arrayMin,q=a.defined,h=a.destroyObjectProperties,f=a.each,w=a.erase,y=a.merge,x=a.pick;a.PlotLineOrBand=function(a,d){this.axis=a;d&&(this.options=d,this.id=d.id)};a.PlotLineOrBand.prototype={render:function(){var f=this,d=
f.axis,c=d.horiz,r=f.options,k=r.label,n=f.label,b=r.to,e=r.from,t=r.value,H=q(e)&&q(b),l=q(t),G=f.svgElem,J=!G,A=[],m=x(r.zIndex,0),z=r.events,A={"class":"highcharts-plot-"+(H?"band ":"line ")+(r.className||"")},I={},u=d.chart.renderer,F=H?"bands":"lines",g;d.isLog&&(e=d.log2lin(e),b=d.log2lin(b),t=d.log2lin(t));I.zIndex=m;F+="-"+m;(g=d.plotLinesAndBandsGroups[F])||(d.plotLinesAndBandsGroups[F]=g=u.g("plot-"+F).attr(I).add());J&&(f.svgElem=G=u.path().attr(A).add(g));if(l)A=d.getPlotLinePath(t,G.strokeWidth());
else if(H)A=d.getPlotBandPath(e,b,r);else return;J&&A&&A.length?(G.attr({d:A}),z&&a.objectEach(z,function(a,b){G.on(b,function(a){z[b].apply(f,[a])})})):G&&(A?(G.show(),G.animate({d:A})):(G.hide(),n&&(f.label=n=n.destroy())));k&&q(k.text)&&A&&A.length&&0<d.width&&0<d.height&&!A.isFlat?(k=y({align:c&&H&&"center",x:c?!H&&4:10,verticalAlign:!c&&H&&"middle",y:c?H?16:10:H?6:-4,rotation:c&&!H&&90},k),this.renderLabel(k,A,H,m)):n&&n.hide();return f},renderLabel:function(a,d,c,r){var k=this.label,n=this.axis.chart.renderer;
k||(k={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(c?"band":"line")+"-label "+(a.className||"")},k.zIndex=r,this.label=k=n.text(a.text,0,0,a.useHTML).attr(k).add());r=d.xBounds||[d[1],d[4],c?d[6]:d[1]];d=d.yBounds||[d[2],d[5],c?d[7]:d[2]];c=E(r);n=E(d);k.align(a,!1,{x:c,y:n,width:D(r)-c,height:D(d)-n});k.show()},destroy:function(){w(this.axis.plotLinesAndBands,this);delete this.axis;h(this)}};a.extend(C.prototype,{getPlotBandPath:function(a,d){var c=this.getPlotLinePath(d,
null,null,!0),r=this.getPlotLinePath(a,null,null,!0),k=[],n=this.horiz,b=1,e;a=a<this.min&&d<this.min||a>this.max&&d>this.max;if(r&&c)for(a&&(e=r.toString()===c.toString(),b=0),a=0;a<r.length;a+=6)n&&c[a+1]===r[a+1]?(c[a+1]+=b,c[a+4]+=b):n||c[a+2]!==r[a+2]||(c[a+2]+=b,c[a+5]+=b),k.push("M",r[a+1],r[a+2],"L",r[a+4],r[a+5],c[a+4],c[a+5],c[a+1],c[a+2],"z"),k.isFlat=e;return k},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,
"plotLines")},addPlotBandOrLine:function(f,d){var c=(new a.PlotLineOrBand(this,f)).render(),r=this.userOptions;c&&(d&&(r[d]=r[d]||[],r[d].push(f)),this.plotLinesAndBands.push(c));return c},removePlotBandOrLine:function(a){for(var d=this.plotLinesAndBands,c=this.options,r=this.userOptions,k=d.length;k--;)d[k].id===a&&d[k].destroy();f([c.plotLines||[],r.plotLines||[],c.plotBands||[],r.plotBands||[]],function(c){for(k=c.length;k--;)c[k].id===a&&w(c,c[k])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},
removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(K,ba);(function(a){var C=a.doc,D=a.each,E=a.extend,q=a.format,h=a.isNumber,f=a.map,w=a.merge,y=a.pick,x=a.splat,v=a.syncTimeout,d=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype={init:function(a,d){this.chart=a;this.options=d;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=d.split&&!a.inverted;this.shared=d.shared||this.split;this.outside=d.outside&&!this.split},cleanSplit:function(a){D(this.chart.series,
function(c){var k=c&&c.tt;k&&(!k.isActive||a?c.tt=k.destroy():k.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,d=this.options,k;this.label||(this.outside&&(this.container=k=a.doc.createElement("div"),k.className="highcharts-tooltip-container",a.css(k,{position:"absolute",top:"1px",pointerEvents:d.style&&d.style.pointerEvents}),a.doc.body.appendChild(k),this.renderer=c=new a.Renderer(k,0,0)),this.label=this.split?c.g("tooltip"):c.label("",0,0,d.shape||"callout",null,null,d.useHTML,
null,"tooltip").attr({padding:d.padding,r:d.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){k.style.left=a+"px"},this.label.ySetter=function(a){k.style.top=a+"px"}),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();w(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,w(!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,d,k,n){var b=this,e=b.now,t=!1!==b.options.animation&&!b.isHidden&&(1<Math.abs(c-e.x)||1<Math.abs(d-e.y)),r=b.followPointer||1<b.len;E(e,{x:t?(2*e.x+c)/3:c,y:t?(e.y+d)/2:d,anchorX:r?void 0:t?(2*e.anchorX+k)/3:k,anchorY:r?
void 0:t?(e.anchorY+n)/2:n});b.getLabel().attr(e);t&&(a.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){b&&b.move(c,d,k,n)},32))},hide:function(c){var d=this;a.clearTimeout(this.hideTimer);c=y(c,this.options.hideDelay,500);this.isHidden||(this.hideTimer=v(function(){d.getLabel()[c?"fadeOut":"hide"]();d.isHidden=!0},c))},getAnchor:function(a,d){var c=this.chart,n=c.pointer,b=c.inverted,e=c.plotTop,t=c.plotLeft,r=0,l=0,G,J;a=x(a);this.followPointer&&d?(void 0===d.chartX&&
(d=n.normalize(d)),a=[d.chartX-c.plotLeft,d.chartY-e]):a[0].tooltipPos?a=a[0].tooltipPos:(D(a,function(a){G=a.series.yAxis;J=a.series.xAxis;r+=a.plotX+(!b&&J?J.left-t:0);l+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!b&&G?G.top-e:0)}),r/=a.length,l/=a.length,a=[b?c.plotWidth-l:r,this.shared&&!b&&1<a.length&&d?d.chartY-e:b?c.plotHeight-r:l]);return f(a,Math.round)},getPosition:function(a,d,k){var c=this.chart,b=this.distance,e={},t=c.inverted&&k.h||0,r,l=this.outside,f=l?C.documentElement.clientWidth-
2*b:c.chartWidth,J=l?Math.max(C.body.scrollHeight,C.documentElement.scrollHeight,C.body.offsetHeight,C.documentElement.offsetHeight,C.documentElement.clientHeight):c.chartHeight,A=c.pointer.chartPosition,m=["y",J,d,(l?A.top-b:0)+k.plotY+c.plotTop,l?0:c.plotTop,l?J:c.plotTop+c.plotHeight],z=["x",f,a,(l?A.left-b:0)+k.plotX+c.plotLeft,l?0:c.plotLeft,l?f:c.plotLeft+c.plotWidth],I=!this.followPointer&&y(k.ttBelow,!c.inverted===!!k.negative),u=function(a,g,c,m,u,l){var p=c<m-b,z=m+b+c<g,n=m-b-c;m+=b;if(I&&
z)e[a]=m;else if(!I&&p)e[a]=n;else if(p)e[a]=Math.min(l-c,0>n-t?n:n-t);else if(z)e[a]=Math.max(u,m+t+c>g?m:m+t);else return!1},F=function(a,g,c,m){var p;m<b||m>g-b?p=!1:e[a]=m<c/2?1:m>g-c/2?g-c-2:m-c/2;return p},g=function(a){var b=m;m=z;z=b;r=a},B=function(){!1!==u.apply(0,m)?!1!==F.apply(0,z)||r||(g(!0),B()):r?e.x=e.y=0:(g(!0),B())};(c.inverted||1<this.len)&&g();B();return e},defaultFormatter:function(a){var c=this.points||x(this),d;d=[a.tooltipFooterHeaderFormatter(c[0])];d=d.concat(a.bodyFormatter(c));
d.push(a.tooltipFooterHeaderFormatter(c[0],!0));return d},refresh:function(c,d){var k,n=this.options,b=c,e,t={},f=[];k=n.formatter||this.defaultFormatter;var t=this.shared,l;n.enabled&&(a.clearTimeout(this.hideTimer),this.followPointer=x(b)[0].series.tooltipOptions.followPointer,e=this.getAnchor(b,d),d=e[0],n=e[1],!t||b.series&&b.series.noSharedTooltip?t=b.getLabelConfig():(D(b,function(a){a.setState("hover");f.push(a.getLabelConfig())}),t={x:b[0].category,y:b[0].y},t.points=f,b=b[0]),this.len=f.length,
t=k.call(t,this),l=b.series,this.distance=y(l.tooltipOptions.distance,16),!1===t?this.hide():(k=this.getLabel(),this.isHidden&&k.attr({opacity:1}).show(),this.split?this.renderSplit(t,x(c)):(k.css({width:this.chart.spacingBox.width}),k.attr({text:t&&t.join?t.join(""):t}),k.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+y(b.colorIndex,l.colorIndex)),this.updatePosition({plotX:d,plotY:n,negative:b.negative,ttBelow:b.ttBelow,h:e[2]||0})),this.isHidden=!1))},renderSplit:function(c,
d){var k=this,n=[],b=this.chart,e=b.renderer,t=!0,f=this.options,l=0,r,J=this.getLabel(),A=b.plotTop;a.isString(c)&&(c=[!1,c]);D(c.slice(0,d.length+1),function(a,c){if(!1!==a){c=d[c-1]||{isHeader:!0,plotX:d[0].plotX};var m=c.series||k,u=m.tt,z="highcharts-color-"+y(c.colorIndex,(c.series||{}).colorIndex,"none");u||(m.tt=u=e.label(null,null,null,"callout",null,null,f.useHTML).addClass("highcharts-tooltip-box "+z+(c.isHeader?" highcharts-tooltip-header":"")).attr({padding:f.padding,r:f.borderRadius}).add(J));
u.isActive=!0;u.attr({text:a});a=u.getBBox();z=a.width+u.strokeWidth();c.isHeader?(l=a.height,b.xAxis[0].opposite&&(r=!0,A-=l),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(f.distance,16)-z;0>z&&(t=!1);a=(c.series&&c.series.yAxis&&c.series.yAxis.pos)+(c.plotY||0);a-=A;c.isHeader&&(a=r?-l:b.plotHeight+l);n.push({target:a,rank:c.isHeader?1:0,size:m.tt.getBBox().height+1,point:c,x:z,tt:u})}});this.cleanSplit();
a.distribute(n,b.plotHeight+l);D(n,function(a){var e=a.point,c=e.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:t||e.isHeader?a.x:e.plotX+b.plotLeft+y(f.distance,16),y:a.pos+A,anchorX:e.isHeader?e.plotX+b.plotLeft:e.plotX+c.xAxis.pos,anchorY:e.isHeader?b.plotTop+b.plotHeight/2:e.plotY+c.yAxis.pos})})},updatePosition:function(a){var c=this.chart,d=this.getLabel(),n=(this.options.positioner||this.getPosition).call(this,d.width,d.height,a),b=a.plotX+c.plotLeft;a=a.plotY+c.plotTop;var e;
this.outside&&(e=(this.options.borderWidth||0)+2*this.distance,this.renderer.setSize(d.width+e,d.height+e,!1),b+=c.pointer.chartPosition.left-n.x,a+=c.pointer.chartPosition.top-n.y);this.move(Math.round(n.x),Math.round(n.y||0),b,a)},getDateFormat:function(a,f,k,n){var b=this.chart.time,e=b.dateFormat("%m-%d %H:%M:%S.%L",f),c,r,l={millisecond:15,second:12,minute:9,hour:6,day:3},G="millisecond";for(r in d){if(a===d.week&&+b.dateFormat("%w",f)===k&&"00:00:00.000"===e.substr(6)){r="week";break}if(d[r]>
a){r=G;break}if(l[r]&&e.substr(l[r])!=="01-01 00:00:00.000".substr(l[r]))break;"week"!==r&&(G=r)}r&&(c=n[r]);return c},getXDateFormat:function(a,d,k){d=d.dateTimeLabelFormats;var c=k&&k.closestPointRange;return(c?this.getDateFormat(c,a.x,k.options.startOfWeek,d):d.day)||d.year},tooltipFooterHeaderFormatter:function(a,d){d=d?"footer":"header";var c=a.series,n=c.tooltipOptions,b=n.xDateFormat,e=c.xAxis,t=e&&"datetime"===e.options.type&&h(a.key),f=n[d+"Format"];t&&!b&&(b=this.getXDateFormat(a,n,e));
t&&b&&D(a.point&&a.point.tooltipDateKeys||["key"],function(a){f=f.replace("{point."+a+"}","{point."+a+":"+b+"}")});return q(f,{point:a,series:c},this.chart.time)},bodyFormatter:function(a){return f(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,E=a.charts,q=a.css,h=a.defined,f=a.each,w=a.extend,y=a.find,x=a.fireEvent,
v=a.isNumber,d=a.isObject,c=a.offset,r=a.pick,k=a.splat,n=a.Tooltip;a.Pointer=function(a,e){this.init(a,e)};a.Pointer.prototype={init:function(a,e){this.options=e;this.chart=a;this.runChartClick=e.chart.events&&!!e.chart.events.click;this.pinchDown=[];this.lastValidTouch={};n&&(a.tooltip=new n(a,e.tooltip),this.followTouchMove=r(e.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,c=b.options.chart,d=c.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(d=r(c.pinchType,
d));this.zoomX=a=/x/.test(d);this.zoomY=d=/y/.test(d);this.zoomHor=a&&!b||d&&b;this.zoomVert=d&&!b||a&&b;this.hasZoom=a||d},normalize:function(a,e){var b;b=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;e||(this.chartPosition=e=c(this.chart.container));return w(a,{chartX:Math.round(b.pageX-e.left),chartY:Math.round(b.pageY-e.top)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};f(this.chart.axes,function(e){b[e.isXAxis?"xAxis":"yAxis"].push({axis:e,value:e.toValue(a[e.horiz?
"chartX":"chartY"])})});return b},findNearestKDPoint:function(a,e,c){var b;f(a,function(a){var l=!(a.noSharedTooltip&&e)&&0>a.options.findNearestPointBy.indexOf("y");a=a.searchPoint(c,l);if((l=d(a,!0))&&!(l=!d(b,!0)))var l=b.distX-a.distX,t=b.dist-a.dist,n=(a.series.group&&a.series.group.zIndex)-(b.series.group&&b.series.group.zIndex),l=0<(0!==l&&e?l:0!==t?t:0!==n?n:b.series.index>a.series.index?-1:1);l&&(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,e){var b=a.series,c=b.xAxis,b=b.yAxis,l=r(a.clientX,a.plotX),d=a.shapeArgs;if(c&&b)return e?{chartX:c.len+c.pos-l,chartY:b.len+b.pos-a.plotY}:{chartX:l+c.pos,chartY:a.plotY+b.pos};if(d&&d.x&&d.y)return{chartX:d.x,chartY:d.y}},getHoverData:function(b,e,c,n,l,k,J){var t,m=[],z=J&&J.isBoosting;n=!(!n||!b);J=e&&!e.stickyTracking?[e]:a.grep(c,function(a){return a.visible&&!(!l&&a.directTouch)&&r(a.options.enableMouseTracking,!0)&&a.stickyTracking});e=(t=
n?b:this.findNearestKDPoint(J,l,k))&&t.series;t&&(l&&!e.noSharedTooltip?(J=a.grep(c,function(a){return a.visible&&!(!l&&a.directTouch)&&r(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),f(J,function(a){var b=y(a.points,function(a){return a.x===t.x&&!a.isNull});d(b)&&(z&&(b=a.getPoint(b)),m.push(b))})):m.push(t));return{hoverPoint:t,hoverSeries:e,hoverPoints:m}},runPointActions:function(b,e){var c=this.chart,d=c.tooltip&&c.tooltip.options.enabled?c.tooltip:void 0,l=d?d.shared:!1,n=e||c.hoverPoint,
k=n&&n.series||c.hoverSeries,k=this.getHoverData(n,k,c.series,"touchmove"!==b.type&&(!!e||k&&k.directTouch&&this.isDirectTouch),l,b,{isBoosting:c.isBoosting}),A,n=k.hoverPoint;A=k.hoverPoints;e=(k=k.hoverSeries)&&k.tooltipOptions.followPointer;l=l&&k&&!k.noSharedTooltip;if(n&&(n!==c.hoverPoint||d&&d.isHidden)){f(c.hoverPoints||[],function(b){-1===a.inArray(b,A)&&b.setState()});f(A||[],function(a){a.setState("hover")});if(c.hoverSeries!==k)k.onMouseOver();c.hoverPoint&&c.hoverPoint.firePointEvent("mouseOut");
if(!n.series)return;n.firePointEvent("mouseOver");c.hoverPoints=A;c.hoverPoint=n;d&&d.refresh(l?A:n,b)}else e&&d&&!d.isHidden&&(n=d.getAnchor([{}],b),d.updatePosition({plotX:n[0],plotY:n[1]}));this.unDocMouseMove||(this.unDocMouseMove=C(c.container.ownerDocument,"mousemove",function(b){var e=E[a.hoverChartIndex];if(e)e.pointer.onDocumentMouseMove(b)}));f(c.axes,function(e){var c=r(e.crosshair.snap,!0),m=c?a.find(A,function(a){return a.series[e.coll]===e}):void 0;m||!c?e.drawCrosshair(b,m):e.hideCrosshair()})},
reset:function(a,e){var b=this.chart,c=b.hoverSeries,l=b.hoverPoint,d=b.hoverPoints,n=b.tooltip,r=n&&n.shared?d:l;a&&r&&f(k(r),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)n&&r&&(n.refresh(r),n.shared&&d?f(d,function(a){a.setState(a.state,!0);a.series.xAxis.crosshair&&a.series.xAxis.drawCrosshair(null,a);a.series.yAxis.crosshair&&a.series.yAxis.drawCrosshair(null,a)}):l&&(l.setState(l.state,!0),f(b.axes,function(a){a.crosshair&&a.drawCrosshair(null,l)})));else{if(l)l.onMouseOut();
d&&f(d,function(a){a.setState()});if(c)c.onMouseOut();n&&n.hide(e);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());f(b.axes,function(a){a.hideCrosshair()});this.hoverX=b.hoverPoints=b.hoverPoint=null}},scaleGroups:function(a,e){var b=this.chart,c;f(b.series,function(l){c=a||l.getPlotBox();l.xAxis&&l.xAxis.zoomEnabled&&l.group&&(l.group.attr(c),l.markerGroup&&(l.markerGroup.attr(c),l.markerGroup.clip(e?b.clipRect:null)),l.dataLabelsGroup&&l.dataLabelsGroup.attr(c))});b.clipRect.attr(e||
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,c=b.options.chart,d=a.chartX,l=a.chartY,n=this.zoomHor,k=this.zoomVert,f=b.plotLeft,m=b.plotTop,z=b.plotWidth,I=b.plotHeight,u,F=this.selectionMarker,g=this.mouseDownX,r=this.mouseDownY,h=c.panKey&&a[c.panKey+"Key"];F&&F.touch||(d<f?d=f:d>f+z&&(d=f+z),l<m?l=m:l>m+I&&(l=m+I),this.hasDragged=Math.sqrt(Math.pow(g-
d,2)+Math.pow(r-l,2)),10<this.hasDragged&&(u=b.isInsidePlot(g-f,r-m),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&u&&!h&&!F&&(this.selectionMarker=F=b.renderer.rect(f,m,n?1:z,k?1:I,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add()),F&&n&&(d-=g,F.attr({width:Math.abs(d),x:(0<d?0:d)+g})),F&&k&&(d=l-r,F.attr({height:Math.abs(d),y:(0<d?0:d)+r})),u&&!F&&c.panning&&b.pan(a,c.panning)))},drop:function(a){var b=this,c=this.chart,d=this.hasPinched;if(this.selectionMarker){var l={originalEvent:a,
xAxis:[],yAxis:[]},n=this.selectionMarker,k=n.attr?n.attr("x"):n.x,r=n.attr?n.attr("y"):n.y,m=n.attr?n.attr("width"):n.width,z=n.attr?n.attr("height"):n.height,I;if(this.hasDragged||d)f(c.axes,function(c){if(c.zoomEnabled&&h(c.min)&&(d||b[{xAxis:"zoomX",yAxis:"zoomY"}[c.coll]])){var e=c.horiz,g="touchend"===a.type?c.minPixelPadding:0,u=c.toValue((e?k:r)+g),e=c.toValue((e?k+m:r+z)-g);l[c.coll].push({axis:c,min:Math.min(u,e),max:Math.max(u,e)});I=!0}}),I&&x(c,"selection",l,function(a){c.zoom(w(a,d?
{animation:!1}:null))});v(c.index)&&(this.selectionMarker=this.selectionMarker.destroy());d&&this.scaleGroups()}c&&v(c.index)&&(q(c.container,{cursor:c._cursor}),c.cancelClick=10<this.hasDragged,c.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){E[a.hoverChartIndex]&&E[a.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(a){var b=
this.chart,c=this.chartPosition;a=this.normalize(a,c);!c||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var c=E[a.hoverChartIndex];c&&(b.relatedTarget||b.toElement)&&(c.pointer.reset(),c.pointer.chartPosition=null)},onContainerMouseMove:function(b){var c=this.chart;h(a.hoverChartIndex)&&E[a.hoverChartIndex]&&E[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,c=b.hoverPoint,d=b.plotLeft,l=b.plotTop;a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(x(c.series,"click",w(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(w(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-l)&&x(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,c){b[c]=null})}}})(K);(function(a){var C=a.charts,D=a.each,E=a.extend,q=a.map,h=a.noop,f=a.pick;E(a.Pointer.prototype,{pinchTranslate:function(a,f,h,v,d,c){this.zoomHor&&
this.pinchTranslateDirection(!0,a,f,h,v,d,c);this.zoomVert&&this.pinchTranslateDirection(!1,a,f,h,v,d,c)},pinchTranslateDirection:function(a,f,h,v,d,c,r,k){var n=this.chart,b=a?"x":"y",e=a?"X":"Y",t="chart"+e,H=a?"width":"height",l=n["plot"+(a?"Left":"Top")],G,J,A=k||1,m=n.inverted,z=n.bounds[a?"h":"v"],I=1===f.length,u=f[0][t],F=h[0][t],g=!I&&f[1][t],B=!I&&h[1][t],L;h=function(){!I&&20<Math.abs(u-g)&&(A=k||Math.abs(F-B)/Math.abs(u-g));J=(l-F)/A+u;G=n["plot"+(a?"Width":"Height")]/A};h();f=J;f<z.min?
(f=z.min,L=!0):f+G>z.max&&(f=z.max-G,L=!0);L?(F-=.8*(F-r[b][0]),I||(B-=.8*(B-r[b][1])),h()):r[b]=[F,B];m||(c[b]=J-l,c[H]=G);c=m?1/A:A;d[H]=G;d[b]=f;v[m?a?"scaleY":"scaleX":"scale"+e]=A;v["translate"+e]=c*l+(F-c*u)},pinch:function(a){var w=this,x=w.chart,v=w.pinchDown,d=a.touches,c=d.length,r=w.lastValidTouch,k=w.hasZoom,n=w.selectionMarker,b={},e=1===c&&(w.inClass(a.target,"highcharts-tracker")&&x.runTrackerClick||w.runChartClick),t={};1<c&&(w.initiated=!0);k&&w.initiated&&!e&&a.preventDefault();
q(d,function(a){return w.normalize(a)});"touchstart"===a.type?(D(d,function(a,b){v[b]={chartX:a.chartX,chartY:a.chartY}}),r.x=[v[0].chartX,v[1]&&v[1].chartX],r.y=[v[0].chartY,v[1]&&v[1].chartY],D(x.axes,function(a){if(a.zoomEnabled){var b=x.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,e=a.toPixels(f(a.options.min,a.dataMin)),d=a.toPixels(f(a.options.max,a.dataMax)),m=Math.max(e,d);b.min=Math.min(a.pos,Math.min(e,d)-c);b.max=Math.max(a.pos+a.len,m+c)}}),w.res=!0):w.followTouchMove&&1===c?this.runPointActions(w.normalize(a)):
v.length&&(n||(w.selectionMarker=n=E({destroy:h,touch:!0},x.plotBox)),w.pinchTranslate(v,d,b,n,t,r),w.hasPinched=k,w.scaleGroups(b,t),w.res&&(w.res=!1,this.reset(!1,0)))},touch:function(h,q){var w=this.chart,v,d;if(w.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});a.hoverChartIndex=w.index;1===h.touches.length?(h=this.normalize(h),(d=w.isInsidePlot(h.chartX-w.plotLeft,h.chartY-w.plotTop))&&!w.openMenu?(q&&this.runPointActions(h),"touchmove"===h.type&&(q=this.pinchDown,v=q[0]?
4<=Math.sqrt(Math.pow(q[0].chartX-h.chartX,2)+Math.pow(q[0].chartY-h.chartY,2)):!1),f(v,!0)&&this.pinch(h)):q&&this.reset()):2===h.touches.length&&this.pinch(h)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(f){C[a.hoverChartIndex]&&C[a.hoverChartIndex].pointer.drop(f)}})})(K);(function(a){var C=a.addEvent,D=a.charts,E=a.css,q=a.doc,h=a.extend,f=a.noop,w=a.Pointer,y=a.removeEvent,x=a.win,v=a.wrap;
if(!a.hasTouch&&(x.PointerEvent||x.MSPointerEvent)){var d={},c=!!x.PointerEvent,r=function(){var c=[];c.item=function(a){return this[a]};a.objectEach(d,function(a){c.push({pageX:a.pageX,pageY:a.pageY,target:a.target})});return c},k=function(c,b,e,d){"touch"!==c.pointerType&&c.pointerType!==c.MSPOINTER_TYPE_TOUCH||!D[a.hoverChartIndex]||(d(c),d=D[a.hoverChartIndex].pointer,d[b]({type:e,target:c.currentTarget,preventDefault:f,touches:r()}))};h(w.prototype,{onContainerPointerDown:function(a){k(a,"onContainerTouchStart",
"touchstart",function(a){d[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){k(a,"onContainerTouchMove","touchmove",function(a){d[a.pointerId]={pageX:a.pageX,pageY:a.pageY};d[a.pointerId].target||(d[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){k(a,"onDocumentTouchEnd","touchend",function(a){delete d[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,c?"pointerdown":"MSPointerDown",this.onContainerPointerDown);
a(this.chart.container,c?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(q,c?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});v(w.prototype,"init",function(a,b,c){a.call(this,b,c);this.hasZoom&&E(b.container,{"-ms-touch-action":"none","touch-action":"none"})});v(w.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(C)});v(w.prototype,"destroy",function(a){this.batchMSEvents(y);a.call(this)})}})(K);(function(a){var C=a.addEvent,
D=a.css,E=a.discardElement,q=a.defined,h=a.each,f=a.fireEvent,w=a.isFirefox,y=a.marginNames,x=a.merge,v=a.pick,d=a.setAnimation,c=a.stableSort,r=a.win,k=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=v(a.padding,8);this.options=a;this.itemMarginTop=a.itemMarginTop||0;this.padding=b;this.initialItemY=b-5;this.symbolWidth=v(a.symbolWidth,16);this.pages=[];this.proximate="proximate"===a.layout&&!this.chart.inverted},update:function(a,b){var c=this.chart;this.setOptions(x(!0,this.options,a));this.destroy();c.isDirtyLegend=c.isDirtyBox=!0;v(b,!0)&&c.redraw();f(this,"afterUpdate")},colorizeItem:function(a,b){a.legendGroup[b?"removeClass":"addClass"]("highcharts-legend-item-hidden");
f(this,"afterColorizeItem",{item:a,visible:b})},positionItems:function(){h(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,n=d[0],d=d[1],l=a.checkbox;if((a=a.legendGroup)&&a.element)a[q(a.translateY)?"animate":"attr"]({translateX:b?n:this.legendWidth-n-2*c-4,translateY:d});l&&(l.x=n,l.y=d)},destroyItem:function(a){var b=a.checkbox;h(["legendItem","legendLine","legendSymbol",
"legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&E(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}h(this.getAllItems(),function(b){h(["legendItem","legendGroup"],a,b)});h("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,h(this.allItems,function(e){var l=e.checkbox,n;l&&(n=b+
d+l.y+(this.scrollOffset||0)+3,D(l,{left:a.translateX+e.checkboxOffset+l.x-20+"px",top:n+"px",display:n>b-6&&n<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,k=this.symbolWidth,l=d.symbolPadding,n="horizontal"===d.layout?v(d.itemDistance,20):0,f=!d.rtl,r=a.legendItem,m=!a.series,z=!m&&a.series.drawLegendSymbol?a.series:a,I=z.options,I=this.createCheckboxForItem&&I&&I.showCheckbox,n=k+l+n+(I?20:0),u=d.useHTML,F=a.options.className;r||(a.legendGroup=c.g("legend-item").addClass("highcharts-"+
z.type+"-series highcharts-color-"+a.colorIndex+(F?" "+F:"")+(m?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=r=c.text("",f?k+l:-l,this.baseline||0,u).attr({align:f?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=c.fontMetrics(12,r),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,r.attr("y",this.baseline)),this.symbolHeight=d.symbolHeight||this.fontMetrics.f,z.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,
r,u),I&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);r.css({width:(d.itemWidth||d.width||b.spacingBox.width)-n});this.setText(a);b=r.getBBox();a.itemWidth=a.checkboxOffset=d.itemWidth||a.legendItemWidth||b.width+n;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,k=a.itemHeight,
l=b.itemMarginBottom||0,n=this.itemMarginTop,f=d?v(b.itemDistance,20):0,r=b.width,m=r||this.chart.spacingBox.width-2*c-b.x,b=b.alignColumns&&this.totalItemWidth>m?this.maxItemWidth:a.itemWidth;d&&this.itemX-c+b>m&&(this.itemX=c,this.itemY+=n+this.lastLineHeight+l,this.lastLineHeight=0);this.lastItemY=n+this.itemY+l;this.lastLineHeight=Math.max(k,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];d?this.itemX+=b:(this.itemY+=n+k+l,this.lastLineHeight=k);this.offsetWidth=r||Math.max((d?this.itemX-
c-(a.checkbox?0:f):b)+c,this.offsetWidth)},getAllItems:function(){var a=[];h(this.chart.series,function(b){var c=b&&b.options;b&&v(c.showInLegend,q(c.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))});f(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,k=this.getAlignment();k&&h([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(e,n){e.test(k)&&!q(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"]+v(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=[],e="left"===this.options.align;h(this.allItems,function(d){var k,l;k=e;d.xAxis&&d.points&&(d.xAxis.options.reversed&&
(k=!k),k=a.find(k?d.points:d.points.slice(0).reverse(),function(b){return a.isNumber(b.plotY)}),l=d.legendGroup.getBBox().height,b.push({target:d.visible?(k?k.plotY:d.xAxis.height)-.3*l:c.plotHeight,size:l,item:d}))},this);a.distribute(b,c.plotHeight);h(b,function(a){a.item._legendItemPos[1]=c.plotTop-c.spacing[0]+a.pos})},render:function(){var a=this.chart,b=a.renderer,e=this.group,d,k,l,f=this.box,r=this.options,A=this.padding;this.itemX=A;this.itemY=this.initialItemY;this.lastItemY=this.offsetWidth=
0;e||(this.group=e=b.g("legend").attr({zIndex:7}).add(),this.contentGroup=b.g().attr({zIndex:1}).add(e),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=k=!!d.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;h(d,this.renderItem,this);h(d,this.layoutItem,this);d=(r.width||this.offsetWidth)+
A;l=this.lastItemY+this.lastLineHeight+this.titleHeight;l=this.handleOverflow(l);l+=A;f||(this.box=f=b.rect().addClass("highcharts-legend-box").attr({r:r.borderRadius}).add(e),f.isNew=!0);0<d&&0<l&&(f[f.isNew?"attr":"animate"](f.crisp.call({},{x:0,y:0,width:d,height:l},f.strokeWidth())),f.isNew=!1);f[k?"show":"hide"]();"none"===e.getStyle("display")&&(d=l=0);this.legendWidth=d;this.legendHeight=l;k&&(b=a.spacingBox,/(lth|ct|rth)/.test(this.getAlignment())&&(b=x(b,{y:b.y+a.titleOffset+a.options.title.margin})),
e.align(x(r,{width:d,height:l,verticalAlign:this.proximate?"top":r.verticalAlign}),!0,b));this.proximate||this.positionItems()},handleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,k=this.options,l=k.y,n=this.padding,c=c.spacingBox.height+("top"===k.verticalAlign?-l:l)-n,l=k.maxHeight,f,r=this.clipRect,m=k.navigation,z=v(m.animation,!0),I=m.arrowSize||12,u=this.nav,F=this.pages,g,B=this.allItems,L=function(a){"number"===typeof a?r.attr({height:a}):r&&(b.clipRect=r.destroy(),b.contentGroup.clip());
b.contentGroup.div&&(b.contentGroup.div.style.clip=a?"rect("+n+"px,9999px,"+(n+a)+"px,0)":"auto")};"horizontal"!==k.layout||"middle"===k.verticalAlign||k.floating||(c/=2);l&&(c=Math.min(c,l));F.length=0;a>c&&!1!==m.enabled?(this.clipHeight=f=Math.max(c-20-this.titleHeight-n,0),this.currentPage=v(this.currentPage,1),this.fullHeight=a,h(B,function(a,b){var c=a._legendItemPos[1],p=Math.round(a.legendItem.getBBox().height),e=F.length;if(!e||c-F[e-1]>f&&(g||c)!==F[e-1])F.push(g||c),e++;a.pageIx=e-1;g&&
(B[b-1].pageIx=e-1);b===B.length-1&&c+p-F[e-1]>f&&(F.push(c),a.pageIx=e);c!==g&&(g=c)}),r||(r=b.clipRect=d.clipRect(0,n,9999,0),b.contentGroup.clip(r)),L(f),u||(this.nav=u=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,I,I).on("click",function(){b.scroll(-1,z)}).add(u),this.pager=d.text("",15,10).addClass("highcharts-legend-navigation").add(u),this.down=d.symbol("triangle-down",0,0,I,I).on("click",function(){b.scroll(1,z)}).add(u)),b.scroll(0),a=c):u&&(L(),this.nav=u.destroy(),
this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,b){var c=this.pages,k=c.length;a=this.currentPage+a;var f=this.clipHeight,l=this.pager,n=this.padding;a>k&&(a=k);0<a&&(void 0!==b&&d(b,this.chart),this.nav.attr({translateX:n,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),l.attr({text:a+"/"+k}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===
k?"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,v(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,k=a.symbolHeight;c=k/2;var l=this.chart.renderer,f=this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);this.legendLine=l.path(["M",0,a,"L",d,a]).addClass("highcharts-graph").attr({}).add(f);b&&!1!==b.enabled&&d&&(c=Math.min(v(b.radius,c),c),0===this.symbol.indexOf("url")&&(b=x(b,{width:k,height:k}),c=0),this.legendSymbol=b=l.symbol(this.symbol,d/2-c,a-c,2*c,2*c,b).addClass("highcharts-point").add(f),b.isMarker=!0)}};(/Trident\/7\.0/.test(r.navigator.userAgent)||
w)&&k(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,E=a.attr,q=a.doc,h=a.Axis,f=a.createElement,w=a.defaultOptions,y=a.discardElement,x=a.charts,v=a.defined,d=a.each,c=a.extend,r=a.find,k=a.fireEvent,n=a.grep,b=a.isNumber,e=a.isObject,t=a.isString,H=a.Legend,l=a.marginNames,G=a.merge,J=a.objectEach,A=a.Pointer,m=a.pick,z=a.pInt,I=a.removeEvent,u=a.seriesTypes,F=a.splat,g=
a.syncTimeout,B=a.win,L=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,b,c){return new L(a,b,c)};c(L.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(t(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(b,c){var g,p,e=b.series,m=b.plotOptions||{};k(this,"init",{args:arguments},function(){b.series=null;g=G(w,b);for(p in g.plotOptions)g.plotOptions[p].tooltip=m[p]&&G(m[p].tooltip)||void 0;g.tooltip.userOptions=b.chart&&
b.chart.forExport&&b.tooltip.userOptions||b.tooltip;g.series=b.series=e;this.userOptions=b;var d=g.chart,u=d.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.labelCollectors=[];this.callback=c;this.isResizing=0;this.options=g;this.axes=[];this.series=[];this.time=b.time&&a.keys(b.time).length?new a.Time(b.time):a.time;this.hasCartesianSeries=d.showAxes;var l=this;l.index=x.length;x.push(l);a.chartCount++;u&&J(u,function(a,b){C(l,b,a)});l.xAxis=[];l.yAxis=[];l.pointCount=l.colorCounter=
l.symbolCounter=0;k(l,"afterInit");l.firstRender()})},initSeries:function(b){var c=this.options.chart;(c=u[b.type||c.type||c.defaultSeriesType])||a.error(17,!0);c=new c;c.init(this,b);return c},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,c){var g=c?b:a;a=c?a:b;return 0<=g&&g<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(b){k(this,"beforeRedraw");var g=this.axes,e=this.series,p=this.pointer,
m=this.legend,u=this.userOptions.legend,l=this.isDirtyLegend,z,f,F=this.hasCartesianSeries,I=this.isDirtyBox,n,r=this.renderer,t=r.isHidden(),h=[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(b,this);t&&this.temporaryDisplay();this.layOutTitles();for(b=e.length;b--;)if(n=e[b],n.options.stacking&&(z=!0,n.isDirty)){f=!0;break}if(f)for(b=e.length;b--;)n=e[b],n.options.stacking&&(n.isDirty=!0);d(e,function(a){a.isDirty&&("point"===a.options.legendType?(a.updateTotals&&a.updateTotals(),l=
!0):u&&(u.labelFormatter||u.labelFormat)&&(l=!0));a.isDirtyData&&k(a,"updatedData")});l&&m&&m.options.enabled&&(m.render(),this.isDirtyLegend=!1);z&&this.getStacks();F&&d(g,function(a){a.updateNames();a.setScale()});this.getMargins();F&&(d(g,function(a){a.isDirty&&(I=!0)}),d(g,function(a){var b=a.min+","+a.max;a.extKey!==b&&(a.extKey=b,h.push(function(){k(a,"afterSetExtremes",c(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(I||z)&&a.redraw()}));I&&this.drawChartBox();k(this,"predraw");d(e,function(a){(I||
a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});p&&p.reset(!0);r.draw();k(this,"redraw");k(this,"render");t&&this.temporaryDisplay(!0);d(h,function(a){a.call()})},get:function(a){function b(b){return b.id===a||b.options&&b.options.id===a}var c,g=this.series,e;c=r(this.axes,b)||r(this.series,b);for(e=0;!c&&e<g.length;e++)c=r(g[e].points||[],b);return c},getAxes:function(){var a=this,b=this.options,c=b.xAxis=F(b.xAxis||{}),b=b.yAxis=F(b.yAxis||{});k(this,"getAxes");d(c,function(a,b){a.index=b;
a.isX=!0});d(b,function(a,b){a.index=b});c=c.concat(b);d(c,function(b){new h(a,b)});k(this,"afterGetAxes")},getSelectedPoints:function(){var a=[];d(this.series,function(b){a=a.concat(n(b.data||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return n(this.series,function(a){return a.selected})},setTitle:function(a,b,c){var g=this,e=g.options,p;p=e.title=G(e.title,a);e=e.subtitle=G(e.subtitle,b);d([["title",a,p],["subtitle",b,e]],function(a,b){var c=a[0],e=g[c],p=a[1];a=
a[2];e&&p&&(g[c]=e=e.destroy());a&&!e&&(g[c]=g.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+c,zIndex:a.zIndex||4}).add(),g[c].update=function(a){g.setTitle(!b&&a,b&&a)})});g.layOutTitles(c)},layOutTitles:function(a){var b=0,g,e=this.renderer,p=this.spacingBox;d(["title","subtitle"],function(a){var g=this[a],m=this.options[a];a="title"===a?-3:m.verticalAlign?0:b+2;var u;g&&(u=e.fontMetrics(u,g).b,g.css({width:(m.width||p.width+m.widthAdjust)+"px"}).align(c({y:a+u},
m),!1,"spacingBox"),m.floating||m.verticalAlign||(b=Math.ceil(b+g.getBBox(m.useHTML).height)))},this);g=this.titleOffset!==b;this.titleOffset=b;!this.isDirtyBox&&g&&(this.isDirtyBox=this.isDirtyLegend=g,this.hasRendered&&m(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var b=this.options.chart,c=b.width,b=b.height,g=this.renderTo;v(c)||(this.containerWidth=a.getStyle(g,"width"));v(b)||(this.containerHeight=a.getStyle(g,"height"));this.chartWidth=Math.max(0,c||this.containerWidth||
600);this.chartHeight=Math.max(0,a.relativeLength(b,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},temporaryDisplay:function(b){var c=this.renderTo;if(b)for(;c&&c.style;)c.hcOrigStyle&&(a.css(c,c.hcOrigStyle),delete c.hcOrigStyle),c.hcOrigDetached&&(q.body.removeChild(c),c.hcOrigDetached=!1),c=c.parentNode;else for(;c&&c.style;){q.body.contains(c)||c.parentNode||(c.hcOrigDetached=!0,q.body.appendChild(c));if("none"===a.getStyle(c,"display",!1)||c.hcOricDetached)c.hcOrigStyle=
{display:c.style.display,height:c.style.height,overflow:c.style.overflow},b={display:"block",overflow:"hidden"},c!==this.renderTo&&(b.height=0),a.css(c,b),c.offsetWidth||c.style.setProperty("display","block","important");c=c.parentNode;if(c===q.body)break}},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var c,g=this.options,e=g.chart,m,u;c=this.renderTo;var d=a.uniqueKey(),l;c||(this.renderTo=c=e.renderTo);t(c)&&(this.renderTo=c=q.getElementById(c));
c||a.error(13,!0);m=z(E(c,"data-highcharts-chart"));b(m)&&x[m]&&x[m].hasRendered&&x[m].destroy();E(c,"data-highcharts-chart",this.index);c.innerHTML="";e.skipClone||c.offsetWidth||this.temporaryDisplay();this.getChartSize();m=this.chartWidth;u=this.chartHeight;this.container=c=f("div",{id:d},void 0,c);this._cursor=c.style.cursor;this.renderer=new (a[e.renderer]||a.Renderer)(c,m,u,null,e.forExport,g.exporting&&g.exporting.allowHTML);this.setClassName(e.className);for(l in g.defs)this.renderer.definition(g.defs[l]);
this.renderer.chartIndex=this.index;k(this,"afterGetContainer")},getMargins:function(a){var b=this.spacing,c=this.margin,g=this.titleOffset;this.resetMargins();g&&!v(c[0])&&(this.plotTop=Math.max(this.plotTop,g+this.options.title.margin+b[0]));this.legend&&this.legend.display&&this.legend.adjustMargins(c,b);k(this,"getMargins");a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],c=a.margin;a.hasCartesianSeries&&d(a.axes,function(a){a.visible&&a.getOffset()});d(l,
function(g,e){v(c[e])||(a[g]+=b[e])});a.setChartSize()},reflow:function(b){var c=this,e=c.options.chart,m=c.renderTo,p=v(e.width)&&v(e.height),u=e.width||a.getStyle(m,"width"),e=e.height||a.getStyle(m,"height"),m=b?b.target:B;if(!p&&!c.isPrinting&&u&&e&&(m===B||m===q)){if(u!==c.containerWidth||e!==c.containerHeight)a.clearTimeout(c.reflowTimeout),c.reflowTimeout=g(function(){c.container&&c.setSize(void 0,void 0,!1)},b?100:0);c.containerWidth=u;c.containerHeight=e}},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,c,e){var m=this,p=m.renderer;m.isResizing+=1;a.setAnimation(e,m);m.oldChartHeight=m.chartHeight;m.oldChartWidth=m.chartWidth;void 0!==b&&(m.options.chart.width=b);void 0!==c&&(m.options.chart.height=c);m.getChartSize();m.setChartSize(!0);p.setSize(m.chartWidth,m.chartHeight,e);d(m.axes,function(a){a.isDirty=
!0;a.setScale()});m.isDirtyLegend=!0;m.isDirtyBox=!0;m.layOutTitles();m.getMargins();m.redraw(e);m.oldChartHeight=null;k(m,"resize");g(function(){m&&k(m,"endResize",null,function(){--m.isResizing})},D(void 0).duration)},setChartSize:function(a){var b=this.inverted,c=this.renderer,g=this.chartWidth,e=this.chartHeight,m=this.options.chart,p=this.spacing,u=this.clipOffset,l,z,f,F;this.plotLeft=l=Math.round(this.plotLeft);this.plotTop=z=Math.round(this.plotTop);this.plotWidth=f=Math.max(0,Math.round(g-
l-this.marginRight));this.plotHeight=F=Math.max(0,Math.round(e-z-this.marginBottom));this.plotSizeX=b?F:f;this.plotSizeY=b?f:F;this.plotBorderWidth=m.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:p[3],y:p[0],width:g-p[3]-p[1],height:e-p[0]-p[2]};this.plotBox=c.plotBox={x:l,y:z,width:f,height:F};g=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(Math.max(g,u[3])/2);c=Math.ceil(Math.max(g,u[0])/2);this.clipBox={x:b,y:c,width:Math.floor(this.plotSizeX-Math.max(g,u[1])/2-b),height:Math.max(0,Math.floor(this.plotSizeY-
Math.max(g,u[2])/2-c))};a||d(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()});k(this,"afterSetChartSize",{skipAxes:a})},resetMargins:function(){var a=this,b=a.options.chart;d(["margin","spacing"],function(c){var g=b[c],u=e(g)?g:[g,g,g,g];d(["Top","Right","Bottom","Left"],function(g,e){a[c][e]=m(b[c+g],u[e])})});d(l,function(b,c){a[b]=m(a.margin[c],a.spacing[c])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,
g=this.chartHeight,e=this.chartBackground,m=this.plotBackground,u=this.plotBorder,d,l,z=this.plotLeft,f=this.plotTop,F=this.plotWidth,I=this.plotHeight,n=this.plotBox,r=this.clipRect,t=this.clipBox,h="animate";e||(this.chartBackground=e=b.rect().addClass("highcharts-background").add(),h="attr");d=l=e.strokeWidth();e[h]({x:l/2,y:l/2,width:c-l-d%2,height:g-l-d%2,r:a.borderRadius});h="animate";m||(h="attr",this.plotBackground=m=b.rect().addClass("highcharts-plot-background").add());m[h](n);r?r.animate({width:t.width,
height:t.height}):this.clipRect=b.clipRect(t);h="animate";u||(h="attr",this.plotBorder=u=b.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());u[h](u.crisp({x:z,y:f,width:F,height:I},-u.strokeWidth()));this.isDirtyBox=!1;k(this,"afterDrawChartBox")},propFromSeries:function(){var a=this,b=a.options.chart,c,g=a.options.series,e,m;d(["inverted","angular","polar"],function(p){c=u[b.type||b.defaultSeriesType];m=b[p]||c&&c.prototype[p];for(e=g&&g.length;!m&&e--;)(c=u[g[e].type])&&c.prototype[p]&&
(m=!0);a[p]=m})},linkSeries:function(){var a=this,b=a.series;d(b,function(a){a.linkedSeries.length=0});d(b,function(b){var c=b.options.linkedTo;t(c)&&(c=":previous"===c?a.series[b.index-1]:a.get(c))&&c.linkedParent!==b&&(c.linkedSeries.push(b),b.linkedParent=c,b.visible=m(b.options.visible,c.options.visible,b.visible))});k(this,"afterLinkSeries")},renderSeries:function(){d(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&d(b.items,
function(g){var e=c(b.style,g.style),m=z(e.left)+a.plotLeft,u=z(e.top)+a.plotTop+12;delete e.left;delete e.top;a.renderer.text(g.html,m,u).attr({zIndex:2}).css(e).add()})},render:function(){var a=this.axes,b=this.renderer,c=this.options,g,e,m;this.setTitle();this.legend=new H(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();c=this.plotWidth;g=this.plotHeight=Math.max(this.plotHeight-21,0);d(a,function(a){a.setScale()});this.getAxisMargins();e=1.1<c/this.plotWidth;
m=1.05<g/this.plotHeight;if(e||m)d(a,function(a){(a.horiz&&e||!a.horiz&&m)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&d(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,c=b.axes,g=b.series,e=b.container,m,u=e&&e.parentNode;k(b,"destroy");b.renderer.forExport?a.erase(x,b):x[b.index]=void 0;a.chartCount--;b.renderTo.removeAttribute("data-highcharts-chart");
I(b);for(m=c.length;m--;)c[m]=c[m].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(m=g.length;m--;)g[m]=g[m].destroy();d("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),function(a){var c=b[a];c&&c.destroy&&(b[a]=c.destroy())});e&&(e.innerHTML="",I(e),u&&y(e));J(b,function(a,c){delete b[c]})},firstRender:function(){var a=this,b=a.options;if(!a.isReadyToRender||
a.isReadyToRender()){a.getContainer();a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();d(b.series||[],function(b){a.initSeries(b)});a.linkSeries();k(a,"beforeRender");A&&(a.pointer=new A(a,b));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){d([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);k(this,"load");k(this,"render");v(this.index)&&this.setReflow(this.options.chart.reflow);
this.onload=null}})})(K);(function(a){var C=a.addEvent,D=a.Chart,E=a.each;C(D,"afterSetChartSize",function(q){var h=this.options.chart.scrollablePlotArea;(h=h&&h.minWidth)&&!this.renderer.forExport&&(this.scrollablePixels=h=Math.max(0,h-this.chartWidth))&&(this.plotWidth+=h,this.clipBox.width+=h,q.skipAxes||E(this.axes,function(f){1===f.side?f.getPlotLinePath=function(){var h=this.right,q;this.right=h-f.chart.scrollablePixels;q=a.Axis.prototype.getPlotLinePath.apply(this,arguments);this.right=h;return q}:
(f.setAxisSize(),f.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 q=this.container,h,f,w=!this.fixedDiv;w&&(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=h=new a.Renderer(this.fixedDiv,0,0),this.scrollableMask=h.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(f){a.each(q.querySelectorAll(f),function(a){(a.namespaceURI===h.SVG_NS?h.box:h.box.parentNode).appendChild(a);a.style.pointerEvents="auto"})}));this.fixedRenderer.setSize(this.chartWidth,this.chartHeight);f=this.chartWidth+
this.scrollablePixels;a.stop(this.container);this.container.style.width=f+"px";this.renderer.boxWrapper.attr({width:f,height:this.chartHeight,viewBox:[0,0,f,this.chartHeight].join(" ")});this.chartBackground.attr({width:f});w&&(f=this.options.chart.scrollablePlotArea,f.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixels*f.scrollPositionX));w=this.axisOffset;f=this.plotTop-w[0]-1;var w=this.plotTop+this.plotHeight+w[2],y=this.plotLeft+this.plotWidth-this.scrollablePixels;this.scrollableMask.attr({d:this.scrollablePixels?
["M",0,f,"L",this.plotLeft-1,f,"L",this.plotLeft-1,w,"L",0,w,"Z","M",y,f,"L",this.chartWidth,f,"L",this.chartWidth,w,"L",y,w,"Z"]:["M",0,0]})}})(K);(function(a){var C,D=a.each,E=a.extend,q=a.erase,h=a.fireEvent,f=a.format,w=a.isArray,y=a.isNumber,x=a.pick,v=a.removeEvent;a.Point=C=function(){};a.Point.prototype={init:function(a,c,f){var d=a.chart.options.chart.colorCount;this.series=a;this.applyOptions(c,f);a.options.colorByPoint?(c=a.colorCounter,a.colorCounter++,a.colorCounter===d&&(a.colorCounter=
0)):c=a.colorIndex;this.colorIndex=x(this.colorIndex,c);a.chart.pointCount++;h(this,"afterInit");return this},applyOptions:function(a,c){var d=this.series,k=d.options.pointValKey||d.pointValKey;a=C.prototype.optionsToObject.call(this,a);E(this,a);this.options=this.options?E(this.options,a):a;a.group&&delete this.group;k&&(this.y=this[k]);this.isNull=x(this.isValid&&!this.isValid(),null===this.x||!y(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===c&&d.xAxis&&d.xAxis.hasNames&&
(this.x=d.xAxis.nameToX(this));void 0===this.x&&d&&(this.x=void 0===c?d.autoIncrement(this):c);return this},setNestedProperty:function(d,c,f){f=f.split(".");a.reduce(f,function(d,f,b,e){d[f]=e.length-1===b?c:a.isObject(d[f],!0)?d[f]:{};return d[f]},d);return d},optionsToObject:function(d){var c={},f=this.series,k=f.options.keys,n=k||f.pointArrayMap||["y"],b=n.length,e=0,t=0;if(y(d)||null===d)c[n[0]]=d;else if(w(d))for(!k&&d.length>b&&(f=typeof d[0],"string"===f?c.name=d[0]:"number"===f&&(c.x=d[0]),
e++);t<b;)k&&void 0===d[e]||(0<n[t].indexOf(".")?a.Point.prototype.setNestedProperty(c,d[e],n[t]):c[n[t]]=d[e]),e++,t++;else"object"===typeof d&&(c=d,d.dataLabels&&(f._hasPointLabels=!0),d.marker&&(f._hasPointMarkers=!0));return c},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",f=0,k;for(k=c[f];this[a]>=k.value;)k=c[++f];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=k&&k.color&&!this.options.color?k.color:this.nonZonedColor;return k},destroy:function(){var a=this.series.chart,c=a.hoverPoints,f;a.pointCount--;c&&(this.setState(),q(c,this),c.length||(a.hoverPoints=null));
if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)v(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(f in this)this[f]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],c,f=6;f--;)c=a[f],this[c]&&(this[c]=this[c].destroy())},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,d=c.tooltipOptions,k=x(d.valueDecimals,""),n=d.valuePrefix||"",b=d.valueSuffix||"";D(c.pointArrayMap||["y"],function(c){c="{point."+c;if(n||b)a=a.replace(RegExp(c+"}","g"),n+c+"}"+b);a=a.replace(RegExp(c+"}","g"),c+":,."+k+"f}")});return f(a,{point:this,series:this.series},c.chart.time)},firePointEvent:function(a,c,f){var d=this,n=this.series.options;(n.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&
this.importEvents();"click"===a&&n.allowPointSelect&&(f=function(a){d.select&&d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});h(this,a,c,f)},visible:!0}})(K);(function(a){var C=a.addEvent,D=a.animObject,E=a.arrayMax,q=a.arrayMin,h=a.correctFloat,f=a.defaultOptions,w=a.defined,y=a.each,x=a.erase,v=a.extend,d=a.fireEvent,c=a.grep,r=a.isArray,k=a.isNumber,n=a.isString,b=a.merge,e=a.objectEach,t=a.pick,H=a.removeEvent,l=a.splat,G=a.SVGElement,J=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,m,l=a.series,g;c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();v(c,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});m=b.events;e(m,function(a,b){C(c,b,a)});if(m&&m.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);l.length&&(g=l[l.length-1]);c._i=t(g&&g._i,-1)+1;a.orderSeries(this.insert(l));d(this,"afterInit")},insert:function(a){var b=this.options.index,c;if(k(b)){for(c=a.length;c--;)if(b>=t(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 t(c,a.length-
1)},bindAxes:function(){var b=this,c=b.options,e=b.chart,u;y(b.axisTypes||[],function(m){y(e[m],function(a){u=a.options;if(c[m]===u.index||void 0!==c[m]&&c[m]===u.id||void 0===c[m]&&0===u.index)b.insert(a.series),b[m]=a,a.isDirty=!0});b[m]||b.optionalAxis===m||a.error(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,e=arguments,m=k(b)?function(g){var e="y"===g&&c.toYData?c.toYData(a):a[g];c[g+"Data"][b]=e}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(e,2))};
y(c.parallelArrays,m)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,e=a.pointIntervalUnit,d=this.chart.time,b=t(b,a.pointStart,0);this.pointInterval=c=t(this.pointInterval,a.pointInterval,1);e&&(a=new d.Date(b),"day"===e?d.set("Date",a,d.get("Date",a)+c):"month"===e?d.set("Month",a,d.get("Month",a)+c):"year"===e&&d.set("FullYear",a,d.get("FullYear",a)+c),c=a.getTime()-b);this.xIncrement=b+c;return b},setOptions:function(a){var c=this.chart,e=c.options,m=e.plotOptions,l=(c.userOptions||
{}).plotOptions||{},g=m[this.type];this.userOptions=a;c=b(g,m.series,a);this.tooltipOptions=b(f.tooltip,f.plotOptions.series&&f.plotOptions.series.tooltip,f.plotOptions[this.type].tooltip,e.tooltip.userOptions,m.series&&m.series.tooltip,m[this.type].tooltip,a.tooltip);this.stickyTracking=t(a.stickyTracking,l[this.type]&&l[this.type].stickyTracking,l.series&&l.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:c.stickyTracking);null===g.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&&w(a[a.length-1].value)&&a.push({});d(this,"afterSetOptions",{options:c});return c},getName:function(){return this.name||"Series "+(this.index+1)},getCyclic:function(a,b,c){var e,m=this.chart,g=this.userOptions,d=a+"Index",l=a+"Counter",p=c?c.length:t(m.options.chart[a+"Count"],m[a+"Count"]);b||(e=t(g[d],
g["_"+d]),w(e)||(m.series.length||(m[l]=0),g["_"+d]=e=m[l]%p,m[l]+=1),c&&(b=c[e]));void 0!==e&&(this[d]=e);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 c=this.options,e=this.points,m=[],d,g,l,f=this.requireSorting;y(b,function(b){var g;g=a.defined(b)&&this.pointClass.prototype.optionsToObject.call({series:this},
b).x;k(g)&&(g=a.inArray(g,this.xData,l),-1===g||e[g].touched?m.push(b):b!==c.data[g]?(e[g].update(b,!1,null,!1),e[g].touched=!0,f&&(l=g+1)):e[g]&&(e[g].touched=!0),d=!0)},this);if(d)for(b=e.length;b--;)g=e[b],g.touched||g.remove(!1),g.touched=!1;else if(b.length===e.length)y(b,function(a,b){e[b].update&&a!==c.data[b]&&e[b].update(a,!1,null,!1)});else return!1;y(m,function(a){this.addPoint(a,!1)},this);return!0},setData:function(b,c,e,d){var m=this,g=m.points,u=g&&g.length||0,l,p=m.options,z=m.chart,
f=null,h=m.xAxis,I=p.turboThreshold,A=this.xData,J=this.yData,v=(l=m.pointArrayMap)&&l.length,G;b=b||[];l=b.length;c=t(c,!0);!1!==d&&l&&u&&!m.cropped&&!m.hasGroupedData&&m.visible&&!m.isSeriesBoosting&&(G=this.updateData(b));if(!G){m.xIncrement=null;m.colorCounter=0;y(this.parallelArrays,function(a){m[a+"Data"].length=0});if(I&&l>I){for(e=0;null===f&&e<l;)f=b[e],e++;if(k(f))for(e=0;e<l;e++)A[e]=this.autoIncrement(),J[e]=b[e];else if(r(f))if(v)for(e=0;e<l;e++)f=b[e],A[e]=f[0],J[e]=f.slice(1,v+1);else for(e=
0;e<l;e++)f=b[e],A[e]=f[0],J[e]=f[1];else a.error(12)}else for(e=0;e<l;e++)void 0!==b[e]&&(f={series:m},m.pointClass.prototype.applyOptions.apply(f,[b[e]]),m.updateParallelArrays(f,e));J&&n(J[0])&&a.error(14,!0);m.data=[];m.options.data=m.userOptions.data=b;for(e=u;e--;)g[e]&&g[e].destroy&&g[e].destroy();h&&(h.minRange=h.userMinRange);m.isDirty=z.isDirtyBox=!0;m.isDirtyData=!!g;e=!1}"point"===p.legendType&&(this.processData(),this.generatePoints());c&&z.redraw(e)},processData:function(b){var c=this.xData,
e=this.yData,m=c.length,d;d=0;var g,l,f=this.xAxis,p,k=this.options;p=k.cropThreshold;var n=this.getExtremesFromAll||k.getExtremesFromAll,t=this.isCartesian,k=f&&f.val2lin,r=f&&f.isLog,h=this.requireSorting,A,J;if(t&&!this.isDirty&&!f.isDirty&&!this.yAxis.isDirty&&!b)return!1;f&&(b=f.getExtremes(),A=b.min,J=b.max);t&&this.sorted&&!n&&(!p||m>p||this.forceCrop)&&(c[m-1]<A||c[0]>J?(c=[],e=[]):this.yData&&(c[0]<A||c[m-1]>J)&&(d=this.cropData(this.xData,this.yData,A,J),c=d.xData,e=d.yData,d=d.start,g=
!0));for(p=c.length||1;--p;)m=r?k(c[p])-k(c[p-1]):c[p]-c[p-1],0<m&&(void 0===l||m<l)?l=m:0>m&&h&&(a.error(15),h=!1);this.cropped=g;this.cropStart=d;this.processedXData=c;this.processedYData=e;this.closestPointRange=l},cropData:function(a,b,c,e,d){var g=a.length,m=0,l=g,u;d=t(d,this.cropShoulder,1);for(u=0;u<g;u++)if(a[u]>=c){m=Math.max(0,u-d);break}for(c=u;c<g;c++)if(a[c]>e){l=c+d;break}return{xData:a.slice(m,l),yData:b.slice(m,l),start:m,end:l}},generatePoints:function(){var a=this.options,b=a.data,
c=this.data,e,d=this.processedXData,g=this.processedYData,f=this.pointClass,k=d.length,p=this.cropStart||0,n,t=this.hasGroupedData,a=a.keys,r,h=[],A;c||t||(c=[],c.length=b.length,c=this.data=c);a&&t&&(this.options.keys=!1);for(A=0;A<k;A++)n=p+A,t?(r=(new f).init(this,[d[A]].concat(l(g[A]))),r.dataGroup=this.groupMap[A],r.dataGroup.options&&(r.options=r.dataGroup.options,v(r,r.dataGroup.options))):(r=c[n])||void 0===b[n]||(c[n]=r=(new f).init(this,b[n],d[A])),r&&(r.index=n,h[A]=r);this.options.keys=
a;if(c&&(k!==(e=c.length)||t))for(A=0;A<e;A++)A!==p||t||(A+=k),c[A]&&(c[A].destroyElements(),c[A].plotX=void 0);this.data=c;this.points=h},getExtremes:function(a){var b=this.yAxis,c=this.processedXData,e,m=[],g=0;e=this.xAxis.getExtremes();var d=e.min,l=e.max,p,f,n=this.requireSorting?1:0,t,h;a=a||this.stackedYData||this.processedYData||[];e=a.length;for(h=0;h<e;h++)if(f=c[h],t=a[h],p=(k(t,!0)||r(t))&&(!b.positiveValuesOnly||t.length||0<t),f=this.getExtremesFromAll||this.options.getExtremesFromAll||
this.cropped||(c[h+n]||f)>=d&&(c[h-n]||f)<=l,p&&f)if(p=t.length)for(;p--;)"number"===typeof t[p]&&(m[g++]=t[p]);else m[g++]=t;this.dataMin=q(m);this.dataMax=E(m)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,c=this.xAxis,e=c.categories,l=this.yAxis,g=this.points,f=g.length,n=!!this.modifyValue,p=a.pointPlacement,r="between"===p||k(p),A=a.threshold,J=a.startFromThreshold?A:0,v,G,q,x,H=Number.MAX_VALUE;"between"===p&&(p=.5);k(p)&&
(p*=t(a.pointRange||c.pointRange));for(a=0;a<f;a++){var y=g[a],D=y.x,C=y.y;G=y.low;var E=b&&l.stacks[(this.negStacks&&C<(J?0:A)?"-":"")+this.stackKey],T;l.positiveValuesOnly&&null!==C&&0>=C&&(y.isNull=!0);y.plotX=v=h(Math.min(Math.max(-1E5,c.translate(D,0,0,0,1,p,"flags"===this.type)),1E5));b&&this.visible&&!y.isNull&&E&&E[D]&&(x=this.getStackIndicator(x,D,this.index),T=E[D],C=T.points[x.key],G=C[0],C=C[1],G===J&&x.key===E[D].base&&(G=t(k(A)&&A,l.min)),l.positiveValuesOnly&&0>=G&&(G=null),y.total=
y.stackTotal=T.total,y.percentage=T.total&&y.y/T.total*100,y.stackY=C,T.setOffset(this.pointXOffset||0,this.barW||0));y.yBottom=w(G)?Math.min(Math.max(-1E5,l.translate(G,0,1,0,1)),1E5):null;n&&(C=this.modifyValue(C,y));y.plotY=G="number"===typeof C&&Infinity!==C?Math.min(Math.max(-1E5,l.translate(C,0,1,0,1)),1E5):void 0;y.isInside=void 0!==G&&0<=G&&G<=l.len&&0<=v&&v<=c.len;y.clientX=r?h(c.translate(D,0,0,0,1,p)):v;y.negative=y.y<(A||0);y.category=e&&void 0!==e[y.x]?e[y.x]:y.x;y.isNull||(void 0!==
q&&(H=Math.min(H,Math.abs(v-q))),q=v);y.zone=this.zones.length&&y.getZone()}this.closestPointRangePx=H;d(this,"afterTranslate")},getValidPoints:function(a,b){var e=this.chart;return c(a||this.points||[],function(a){return b&&!e.isInsidePlot(a.plotX,a.plotY,e.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,e=b.renderer,m=b.inverted,g=this.clipBox,d=g||b.clipBox,l=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,d.height,c.xAxis,c.yAxis].join(),p=b[l],f=b[l+
"m"];p||(a&&(d.width=0,m&&(d.x=b.plotSizeX),b[l+"m"]=f=e.clipRect(m?b.plotSizeX+99:-99,m?-b.plotLeft:-b.plotTop,99,m?b.chartWidth:b.chartHeight)),b[l]=p=e.clipRect(d),p.count={length:0});a&&!p.count[this.index]&&(p.count[this.index]=!0,p.count.length+=1);!1!==c.clip&&(this.group.clip(a||g?p:b.clipRect),this.markerGroup.clip(f),this.sharedClipKey=l);a||(p.count[this.index]&&(delete p.count[this.index],--p.count.length),0===p.count.length&&l&&b[l]&&(g||(b[l]=b[l].destroy()),b[l+"m"]&&(b[l+"m"]=b[l+
"m"].destroy())))},animate:function(a){var b=this.chart,c=D(this.options.animation),e;a?this.setClip(c):(e=this.sharedClipKey,(a=b[e])&&a.animate({width:b.plotSizeX,x:0},c),b[e+"m"]&&b[e+"m"].animate({width:b.plotSizeX+99,x:0},c),this.animate=null)},afterAnimate:function(){this.setClip();d(this,"afterAnimate");this.finishedAnimating=!0},drawPoints:function(){var a=this.points,b=this.chart,c,e,l,g,d=this.options.marker,f,p,k,n=this[this.specialGroup]||this.markerGroup,r,h=t(d.enabled,this.xAxis.isRadial?
!0:null,this.closestPointRangePx>=d.enabledThreshold*d.radius);if(!1!==d.enabled||this._hasPointMarkers)for(c=0;c<a.length;c++)e=a[c],g=e.graphic,f=e.marker||{},p=!!e.marker,l=h&&void 0===f.enabled||f.enabled,k=e.isInside,l&&!e.isNull?(l=t(f.symbol,this.symbol),r=this.markerAttribs(e,e.selected&&"select"),g?g[k?"show":"hide"](!0).animate(r):k&&(0<r.width||e.hasImage)&&(e.graphic=g=b.renderer.symbol(l,r.x,r.y,r.width,r.height,p?f:d).add(n)),g&&g.addClass(e.getClassName(),!0)):g&&(e.graphic=g.destroy())},
markerAttribs:function(a,b){var c=this.options.marker,e=a.marker||{},m=e.symbol||c.symbol,g=t(e.radius,c.radius);b&&(c=c.states[b],b=e.states&&e.states[b],g=t(b&&b.radius,c&&c.radius,g+(c&&c.radiusPlus||0)));a.hasImage=m&&0===m.indexOf("url");a.hasImage&&(g=0);a={x:Math.floor(a.plotX)-g,y:a.plotY-g};g&&(a.width=a.height=2*g);return a},destroy:function(){var b=this,c=b.chart,l=/AppleWebKit\/533/.test(A.navigator.userAgent),u,f,g=b.data||[],k,n;d(b,"destroy");H(b);y(b.axisTypes||[],function(a){(n=b[a])&&
n.series&&(x(n.series,b),n.isDirty=n.forceRedraw=!0)});b.legendItem&&b.chart.legend.destroyItem(b);for(f=g.length;f--;)(k=g[f])&&k.destroy&&k.destroy();b.points=null;a.clearTimeout(b.animationTimeout);e(b,function(a,b){a instanceof G&&!a.survive&&(u=l&&"group"===b?"hide":"destroy",a[u]())});c.hoverSeries===b&&(c.hoverSeries=null);x(c.series,b);c.orderSeries();e(b,function(a,c){delete b[c]})},getGraphPath:function(a,b,c){var e=this,l=e.options,g=l.step,d,m=[],p=[],f;a=a||e.points;(d=a.reversed)&&a.reverse();
(g={right:1,center:2}[g]||g&&3)&&d&&(g=4-g);!l.connectNulls||b||c||(a=this.getValidPoints(a));y(a,function(d,u){var k=d.plotX,n=d.plotY,z=a[u-1];(d.leftCliff||z&&z.rightCliff)&&!c&&(f=!0);d.isNull&&!w(b)&&0<u?f=!l.connectNulls:d.isNull&&!b?f=!0:(0===u||f?u=["M",d.plotX,d.plotY]:e.getPointSpline?u=e.getPointSpline(a,d,u):g?(u=1===g?["L",z.plotX,n]:2===g?["L",(z.plotX+k)/2,z.plotY,"L",(z.plotX+k)/2,n]:["L",k,z.plotY],u.push("L",k,n)):u=["L",k,n],p.push(d.x),g&&(p.push(d.x),2===g&&p.push(d.x)),m.push.apply(m,
u),f=!1)});m.xMap=p;return e.graphPath=m},drawGraph:function(){var a=this,b=(this.gappedPath||this.getGraphPath).call(this),c=[["graph","highcharts-graph"]],c=a.getZonesGraphs(c);y(c,function(c,e){e=c[0];var g=a[e];g?(g.endX=a.preventGraphAnimation?null:b.xMap,g.animate({d:b})):b.length&&(a[e]=a.chart.renderer.path(b).addClass(c[1]).attr({zIndex:1}).add(a.group));g&&(g.startX=b.xMap,g.isArea=b.isArea)})},getZonesGraphs:function(a){y(this.zones,function(b,c){a.push(["zone-graph-"+c,"highcharts-graph highcharts-zone-graph-"+
c+" "+(b.className||"")])},this);return a},applyZones:function(){var a=this,b=this.chart,c=b.renderer,e=this.zones,d,g,l=this.clips||[],f,p=this.graph,k=this.area,n=Math.max(b.chartWidth,b.chartHeight),r=this[(this.zoneAxis||"y")+"Axis"],h,A,J=b.inverted,v,G,q,w,x=!1;e.length&&(p||k)&&r&&void 0!==r.min&&(A=r.reversed,v=r.horiz,p&&!this.showLine&&p.hide(),k&&k.hide(),h=r.getExtremes(),y(e,function(e,m){d=A?v?b.plotWidth:0:v?0:r.toPixels(h.min);d=Math.min(Math.max(t(g,d),0),n);g=Math.min(Math.max(Math.round(r.toPixels(t(e.value,
h.max),!0)),0),n);x&&(d=g=r.toPixels(h.max));G=Math.abs(d-g);q=Math.min(d,g);w=Math.max(d,g);r.isXAxis?(f={x:J?w:q,y:0,width:G,height:n},v||(f.x=b.plotHeight-f.x)):(f={x:0,y:J?w:q,width:n,height:G},v&&(f.y=b.plotWidth-f.y));l[m]?l[m].animate(f):(l[m]=c.clipRect(f),p&&a["zone-graph-"+m].clip(l[m]),k&&a["zone-area-"+m].clip(l[m]));x=e.value>h.max;a.resetZones&&0===g&&(g=void 0)}),this.clips=l)},invertGroups:function(a){function b(){y(["group","markerGroup"],function(b){c[b]&&(e.renderer.isVML&&c[b].attr({width:c.yAxis.len,
height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(a))})}var c=this,e=c.chart,d;c.xAxis&&(d=C(e,"resize",b),C(c,"destroy",d),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,e,d){var g=this[a],l=!g;l&&(this[a]=g=this.chart.renderer.g().attr({zIndex:e||.1}).add(d));g.addClass("highcharts-"+b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(w(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(g.hasClass("highcharts-tracker")?
" highcharts-tracker":""),!0);g.attr({visibility:c})[l?"attr":"animate"](this.getPlotBox());return g},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,e=a.options,l=!!a.animate&&b.renderer.isSVG&&D(e.animation).duration,g=a.visible?"inherit":"hidden",f=e.zIndex,k=a.hasRendered,p=b.seriesGroup,n=b.inverted;c=a.plotGroup("group",
"series",g,f,p);a.markerGroup=a.plotGroup("markerGroup","markers",g,f,p);l&&a.animate(!0);c.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===e.clip||a.sharedClipKey||k||c.clip(b.clipRect);l&&a.animate();k||(a.animationTimeout=J(function(){a.afterAnimate()},l));a.isDirty=!1;a.hasRendered=!0;d(a,"afterRender")},redraw:function(){var a=
this.chart,b=this.isDirty||this.isDirtyData,c=this.group,e=this.xAxis,d=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:t(e&&e.left,a.plotLeft),translateY:t(d&&d.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,e=this.yAxis,d=this.chart.inverted;return this.searchKDTree({clientX:d?c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:d?e.len-a.chartX+e.pos:a.chartY-
e.pos},b)},buildKDTree:function(){function a(c,e,g){var d,l;if(l=c&&c.length)return d=b.kdAxisArray[e%g],c.sort(function(a,b){return a[d]-b[d]}),l=Math.floor(l/2),{point:c[l],left:a(c.slice(0,l),e+1,g),right:a(c.slice(l+1),e+1,g)}}this.buildingKdTree=!0;var b=this,c=-1<b.options.findNearestPointBy.indexOf("y")?2:1;delete b.kdTree;J(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),c,c);b.buildingKdTree=!1},b.options.kdNow?0:1)},searchKDTree:function(a,b){function c(a,b,m,u){var p=b.point,
f=e.kdAxisArray[m%u],k,n,r=p;n=w(a[d])&&w(p[d])?Math.pow(a[d]-p[d],2):null;k=w(a[g])&&w(p[g])?Math.pow(a[g]-p[g],2):null;k=(n||0)+(k||0);p.dist=w(k)?Math.sqrt(k):Number.MAX_VALUE;p.distX=w(n)?Math.sqrt(n):Number.MAX_VALUE;f=a[f]-p[f];k=0>f?"left":"right";n=0>f?"right":"left";b[k]&&(k=c(a,b[k],m+1,u),r=k[l]<r[l]?k:p);b[n]&&Math.sqrt(f*f)<r[l]&&(a=c(a,b[n],m+1,u),r=a[l]<r[l]?a:r);return r}var e=this,d=this.kdAxisArray[0],g=this.kdAxisArray[1],l=b?"distX":"dist";b=-1<e.options.findNearestPointBy.indexOf("y")?
2:1;this.kdTree||this.buildingKdTree||this.buildKDTree();if(this.kdTree)return c(a,this.kdTree,b,b)}})})(K);(function(a){var C=a.Axis,D=a.Chart,E=a.correctFloat,q=a.defined,h=a.destroyObjectProperties,f=a.each,w=a.format,y=a.objectEach,x=a.pick,v=a.Series;a.StackItem=function(a,c,f,k,n){var b=a.chart.inverted;this.axis=a;this.isNegative=f;this.options=c;this.x=k;this.total=null;this.points={};this.stack=n;this.rightCliff=this.leftCliff=0;this.alignOptions={align:c.align||(b?f?"left":"right":"center"),
verticalAlign:c.verticalAlign||(b?"middle":f?"bottom":"top"),y:x(c.y,b?4:f?14:-6),x:x(c.x,b?f?-6:6:0)};this.textAlign=c.textAlign||(b?f?"right":"left":"center")};a.StackItem.prototype={destroy:function(){h(this,this.axis)},render:function(a){var c=this.axis.chart,d=this.options,f=d.format,f=f?w(f,this,c.time):d.formatter.call(this);this.label?this.label.attr({text:f,visibility:"hidden"}):this.label=c.renderer.text(f,null,null,d.useHTML).css(d.style).attr({align:this.textAlign,rotation:d.rotation,
visibility:"hidden"}).add(a);this.label.labelrank=c.plotHeight},setOffset:function(a,c){var d=this.axis,f=d.chart,n=d.translate(d.usePercentage?100:this.total,0,0,0,1),b=d.translate(0),b=q(n)&&Math.abs(n-b);a=f.xAxis[0].translate(this.x)+a;d=q(n)&&this.getStackBox(f,this,a,n,c,b,d);(c=this.label)&&d&&(c.align(this.alignOptions,null,d),d=c.alignAttr,c[!1===this.options.crop||f.isInsidePlot(d.x,d.y)?"show":"hide"](!0))},getStackBox:function(a,c,f,k,n,b,e){var d=c.axis.reversed,r=a.inverted;a=e.height+
e.pos-(r?a.plotLeft:a.plotTop);c=c.isNegative&&!d||!c.isNegative&&d;return{x:r?c?k:k-b:f,y:r?a-f-n:c?a-k-b:a-k,width:r?b:n,height:r?n:b}}};D.prototype.getStacks=function(){var a=this;f(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});f(a.series,function(c){!c.options.stacking||!0!==c.visible&&!1!==a.options.chart.ignoreHiddenSeries||(c.stackKey=c.type+x(c.options.stack,""))})};C.prototype.buildStacks=function(){var a=this.series,c=x(this.options.reversedStacks,!0),f=a.length,
k;if(!this.isXAxis){this.usePercentage=!1;for(k=f;k--;)a[c?k:f-k-1].setStackedPoints();for(k=0;k<f;k++)a[k].modifyStacks()}};C.prototype.renderStackTotals=function(){var a=this.chart,c=a.renderer,f=this.stacks,k=this.stackTotalGroup;k||(this.stackTotalGroup=k=c.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());k.translate(a.plotLeft,a.plotTop);y(f,function(a){y(a,function(a){a.render(k)})})};C.prototype.resetStacks=function(){var a=this,c=a.stacks;a.isXAxis||y(c,function(c){y(c,function(d,
f){d.touched<a.stacksTouched?(d.destroy(),delete c[f]):(d.total=null,d.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})}))};v.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var d=this.processedXData,c=this.processedYData,f=[],k=c.length,n=this.options,b=n.threshold,e=x(n.startFromThreshold&&
b,0),t=n.stack,n=n.stacking,h=this.stackKey,l="-"+h,v=this.negStacks,J=this.yAxis,A=J.stacks,m=J.oldStacks,z,I,u,F,g,B,w;J.stacksTouched+=1;for(g=0;g<k;g++)B=d[g],w=c[g],z=this.getStackIndicator(z,B,this.index),F=z.key,u=(I=v&&w<(e?0:b))?l:h,A[u]||(A[u]={}),A[u][B]||(m[u]&&m[u][B]?(A[u][B]=m[u][B],A[u][B].total=null):A[u][B]=new a.StackItem(J,J.options.stackLabels,I,B,t)),u=A[u][B],null!==w?(u.points[F]=u.points[this.index]=[x(u.cumulative,e)],q(u.cumulative)||(u.base=F),u.touched=J.stacksTouched,
0<z.index&&!1===this.singleStacks&&(u.points[F][0]=u.points[this.index+","+B+",0"][0])):u.points[F]=u.points[this.index]=null,"percent"===n?(I=I?h:l,v&&A[I]&&A[I][B]?(I=A[I][B],u.total=I.total=Math.max(I.total,u.total)+Math.abs(w)||0):u.total=E(u.total+(Math.abs(w)||0))):u.total=E(u.total+(w||0)),u.cumulative=x(u.cumulative,e)+(w||0),null!==w&&(u.points[F].push(u.cumulative),f[g]=u.cumulative);"percent"===n&&(J.usePercentage=!0);this.stackedYData=f;J.oldStacks={}}};v.prototype.modifyStacks=function(){var a=
this,c=a.stackKey,h=a.yAxis.stacks,k=a.processedXData,n,b=a.options.stacking;a[b+"Stacker"]&&f([c,"-"+c],function(c){for(var e=k.length,d,l;e--;)if(d=k[e],n=a.getStackIndicator(n,d,a.index,c),l=(d=h[c]&&h[c][d])&&d.points[n.key])a[b+"Stacker"](l,d,e)})};v.prototype.percentStacker=function(a,c,f){c=c.total?100/c.total:0;a[0]=E(a[0]*c);a[1]=E(a[1]*c);this.stackedYData[f]=a[1]};v.prototype.getStackIndicator=function(a,c,f,k){!q(a)||a.x!==c||k&&a.key!==k?a={x:c,index:0,key:k}:a.index++;a.key=[f,c,a.index].join();
return a}})(K);(function(a){var C=a.addEvent,D=a.Axis,E=a.createElement,q=a.css,h=a.defined,f=a.each,w=a.erase,y=a.extend,x=a.fireEvent,v=a.inArray,d=a.isNumber,c=a.isObject,r=a.isArray,k=a.merge,n=a.objectEach,b=a.pick,e=a.Point,t=a.Series,H=a.seriesTypes,l=a.setAnimation,G=a.splat;y(a.Chart.prototype,{addSeries:function(a,c,e){var l,d=this;a&&(c=b(c,!0),x(d,"addSeries",{options:a},function(){l=d.initSeries(a);d.isDirtyLegend=!0;d.linkSeries();x(d,"afterAddSeries");c&&d.redraw(e)}));return l},addAxis:function(a,
c,e,l){var d=c?"xAxis":"yAxis",m=this.options;a=k(a,{index:this[d].length,isX:c});c=new D(this,a);m[d]=G(m[d]||{});m[d].push(a);b(e,!0)&&this.redraw(l);return c},showLoading:function(a){var b=this,c=b.options,e=b.loadingDiv,l=function(){e&&q(e,{left:b.plotLeft+"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};e||(b.loadingDiv=e=E("div",{className:"highcharts-loading highcharts-loading-hidden"},null,b.container),b.loadingSpan=E("span",{className:"highcharts-loading-inner"},
null,e),C(b,"redraw",l));e.className="highcharts-loading";b.loadingSpan.innerHTML=a||c.lang.loading;b.loadingShown=!0;l()},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,c,e,l){var m=this,u={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},t=a.chart,g,z,r=[];x(m,"update",{options:a});if(t){k(!0,m.options.chart,t);"className"in t&&m.setClassName(t.className);"reflow"in t&&m.setReflow(t.reflow);if("inverted"in t||"polar"in t||"type"in t)m.propFromSeries(),g=!0;"alignTicks"in t&&(g=!0);n(t,function(a,b){-1!==
v("chart."+b,m.propsRequireUpdateSeries)&&(z=!0);-1!==v(b,m.propsRequireDirtyBox)&&(m.isDirtyBox=!0)})}a.plotOptions&&k(!0,this.options.plotOptions,a.plotOptions);n(a,function(a,b){if(m[b]&&"function"===typeof m[b].update)m[b].update(a,!1);else if("function"===typeof m[u[b]])m[u[b]](a);"chart"!==b&&-1!==v(b,m.propsRequireUpdateSeries)&&(z=!0)});f("xAxis yAxis zAxis series colorAxis pane".split(" "),function(b){var c;a[b]&&("series"===b&&(c=[],f(m[b],function(a,b){a.options.isInternal||c.push(b)})),
f(G(a[b]),function(a,g){(g=h(a.id)&&m.get(a.id)||m[b][c?c[g]:g])&&g.coll===b&&(g.update(a,!1),e&&(g.touched=!0));if(!g&&e)if("series"===b)m.addSeries(a,!1).touched=!0;else if("xAxis"===b||"yAxis"===b)m.addAxis(a,"xAxis"===b,!1).touched=!0}),e&&f(m[b],function(a){a.touched||a.options.isInternal?delete a.touched:r.push(a)}))});f(r,function(a){a.remove(!1)});g&&f(m.axes,function(a){a.update({},!1)});z&&f(m.series,function(a){a.update({},!1)});a.loading&&k(!0,m.options.loading,a.loading);g=t&&t.width;
t=t&&t.height;d(g)&&g!==m.chartWidth||d(t)&&t!==m.chartHeight?m.setSize(g,t,l):b(c,!0)&&m.redraw(l);x(m,"afterUpdate",{options:a})},setSubtitle:function(a){this.setTitle(void 0,a)}});y(e.prototype,{update:function(a,e,l,d){function m(){f.applyOptions(a);null===f.y&&g&&(f.graphic=g.destroy());c(a,!0)&&(g&&g.element&&a&&a.marker&&void 0!==a.marker.symbol&&(f.graphic=g.destroy()),a&&a.dataLabels&&f.dataLabel&&(f.dataLabel=f.dataLabel.destroy()),f.connector&&(f.connector=f.connector.destroy()));n=f.index;
k.updateParallelArrays(f,n);p.data[n]=c(p.data[n],!0)||c(a,!0)?f.options:b(a,p.data[n]);k.isDirty=k.isDirtyData=!0;!k.fixedBox&&k.hasCartesianSeries&&(t.isDirtyBox=!0);"point"===p.legendType&&(t.isDirtyLegend=!0);e&&t.redraw(l)}var f=this,k=f.series,g=f.graphic,n,t=k.chart,p=k.options;e=b(e,!0);!1===d?m():f.firePointEvent("update",{options:a},m)},remove:function(a,b){this.series.removePoint(v(this,this.series.data),a,b)}});y(t.prototype,{addPoint:function(a,c,e,l){var d=this.options,m=this.data,f=
this.chart,g=this.xAxis,g=g&&g.hasNames&&g.names,k=d.data,n,p,t=this.xData,h,z;c=b(c,!0);n={series:this};this.pointClass.prototype.applyOptions.apply(n,[a]);z=n.x;h=t.length;if(this.requireSorting&&z<t[h-1])for(p=!0;h&&t[h-1]>z;)h--;this.updateParallelArrays(n,"splice",h,0,0);this.updateParallelArrays(n,h);g&&n.name&&(g[z]=n.name);k.splice(h,0,a);p&&(this.data.splice(h,0,null),this.processData());"point"===d.legendType&&this.generatePoints();e&&(m[0]&&m[0].remove?m[0].remove(!1):(m.shift(),this.updateParallelArrays(n,
"shift"),k.shift()));this.isDirtyData=this.isDirty=!0;c&&f.redraw(l)},removePoint:function(a,c,e){var d=this,m=d.data,f=m[a],k=d.points,g=d.chart,n=function(){k&&k.length===m.length&&k.splice(a,1);m.splice(a,1);d.options.data.splice(a,1);d.updateParallelArrays(f||{series:d},"splice",a,1);f&&f.destroy();d.isDirty=!0;d.isDirtyData=!0;c&&g.redraw()};l(e,g);c=b(c,!0);f?f.firePointEvent("remove",null,n):n()},remove:function(a,c,e){function l(){d.destroy();m.isDirtyLegend=m.isDirtyBox=!0;m.linkSeries();
b(a,!0)&&m.redraw(c)}var d=this,m=d.chart;!1!==e?x(d,"remove",null,l):l()},update:function(c,e){var l=this,d=l.chart,n=l.userOptions,u=l.oldType||l.type,t=c.type||n.type||d.options.chart.type,g=H[u].prototype,h,r=["group","markerGroup","dataLabelsGroup"],p=["navigatorSeries","baseSeries"],A=l.finishedAnimating&&{animation:!1},G=["data","name","turboThreshold"],J=a.keys(c),w=0<J.length;f(J,function(a){-1===v(a,G)&&(w=!1)});if(w)c.data&&this.setData(c.data,!1),c.name&&this.setName(c.name,!1);else{p=
r.concat(p);f(p,function(a){p[a]=l[a];delete l[a]});c=k(n,A,{index:l.index,pointStart:b(n.pointStart,l.xData[0])},{data:l.options.data},c);l.remove(!1,null,!1);for(h in g)l[h]=void 0;H[t||u]?y(l,H[t||u].prototype):a.error(17,!0);f(p,function(a){l[a]=p[a]});l.init(d,c);c.zIndex!==n.zIndex&&f(r,function(a){l[a]&&l[a].attr({zIndex:c.zIndex})});l.oldType=u;d.linkSeries()}x(this,"afterUpdate");b(e,!0)&&d.redraw(w?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,c){var e=this.chart,l=a&&a.events||{};a=k(this.userOptions,a);e.options[this.coll].indexOf&&(e.options[this.coll][e.options[this.coll].indexOf(this.userOptions)]=a);n(e.options[this.coll].events,function(a,b){"undefined"===typeof l[b]&&(l[b]=void 0)});this.destroy(!0);this.init(e,y(a,{events:l}));e.isDirtyBox=!0;b(c,!0)&&e.redraw()},remove:function(a){for(var c=this.chart,e=this.coll,l=this.series,d=l.length;d--;)l[d]&&l[d].remove(!1);w(c.axes,this);w(c[e],this);
r(c.options[e])?c.options[e].splice(this.options.index,1):delete c.options[e];f(c[e],function(a,b){a.options.index=a.userOptions.index=b});this.destroy();c.isDirtyBox=!0;b(a,!0)&&c.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,E=a.pick,q=a.Series,h=a.seriesType;h("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(f){var h=[],q=[],x=this.xAxis,v=this.yAxis,
d=v.stacks[this.stackKey],c={},r=this.index,k=v.series,n=k.length,b,e=E(v.options.reversedStacks,!0)?1:-1,t;f=f||this.points;if(this.options.stacking){for(t=0;t<f.length;t++)f[t].leftNull=f[t].rightNull=null,c[f[t].x]=f[t];a.objectEach(d,function(a,b){null!==a.total&&q.push(b)});q.sort(function(a,b){return a-b});b=D(k,function(){return this.visible});C(q,function(a,l){var f=0,k,A;if(c[a]&&!c[a].isNull)h.push(c[a]),C([-1,1],function(m){var f=1===m?"rightNull":"leftNull",h=0,u=d[q[l+m]];if(u)for(t=
r;0<=t&&t<n;)k=u.points[t],k||(t===r?c[a][f]=!0:b[t]&&(A=d[a].points[t])&&(h-=A[1]-A[0])),t+=e;c[a][1===m?"rightCliff":"leftCliff"]=h});else{for(t=r;0<=t&&t<n;){if(k=d[a].points[t]){f=k[1];break}t+=e}f=v.translate(f,0,1,0,1);h.push({isNull:!0,plotX:x.translate(a,0,0,0,1),x:a,plotY:f,yBottom:f})}})}return h},getGraphPath:function(a){var f=q.prototype.getGraphPath,h=this.options,x=h.stacking,v=this.yAxis,d,c,r=[],k=[],n=this.index,b,e=v.stacks[this.stackKey],t=h.threshold,H=v.getThreshold(h.threshold),
l,h=h.connectNulls||"percent"===x,G=function(c,l,d){var m=a[c];c=x&&e[m.x].points[n];var f=m[d+"Null"]||0;d=m[d+"Cliff"]||0;var u,h,m=!0;d||f?(u=(f?c[0]:c[1])+d,h=c[0]+d,m=!!f):!x&&a[l]&&a[l].isNull&&(u=h=t);void 0!==u&&(k.push({plotX:b,plotY:null===u?H:v.getThreshold(u),isNull:m,isCliff:!0}),r.push({plotX:b,plotY:null===h?H:v.getThreshold(h),doCurve:!1}))};a=a||this.points;x&&(a=this.getStackPoints(a));for(d=0;d<a.length;d++)if(c=a[d].isNull,b=E(a[d].rectPlotX,a[d].plotX),l=E(a[d].yBottom,H),!c||
h)h||G(d,d-1,"left"),c&&!x&&h||(k.push(a[d]),r.push({x:d,plotX:b,plotY:l})),h||G(d,d+1,"right");d=f.call(this,k,!0,!0);r.reversed=!0;c=f.call(this,r,!0,!0);c.length&&(c[0]="L");c=d.concat(c);f=f.call(this,k,!1,h);c.xMap=d.xMap;this.areaPath=c;return f},drawGraph:function(){this.areaPath=[];q.prototype.drawGraph.apply(this);var a=this,h=this.areaPath,y=this.options,x=[["area","highcharts-area"]];C(this.zones,function(a,d){x.push(["zone-area-"+d,"highcharts-area highcharts-zone-area-"+d+" "+a.className])});
C(x,function(f){var d=f[0],c=a[d];c?(c.endX=a.preventGraphAnimation?null:h.xMap,c.animate({d:h})):(c=a[d]=a.chart.renderer.path(h).addClass(f[1]).attr({zIndex:0}).add(a.group),c.isArea=!0);c.startX=h.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,E,q){var h=E.plotX,f=E.plotY,w=a[q-1];q=a[q+1];var y,x,v,d;if(w&&!w.isNull&&!1!==w.doCurve&&!E.isCliff&&q&&!q.isNull&&!1!==
q.doCurve&&!E.isCliff){a=w.plotY;v=q.plotX;q=q.plotY;var c=0;y=(1.5*h+w.plotX)/2.5;x=(1.5*f+a)/2.5;v=(1.5*h+v)/2.5;d=(1.5*f+q)/2.5;v!==y&&(c=(d-x)*(v-h)/(v-y)+f-d);x+=c;d+=c;x>a&&x>f?(x=Math.max(a,f),d=2*f-x):x<a&&x<f&&(x=Math.min(a,f),d=2*f-x);d>q&&d>f?(d=Math.max(q,f),x=2*f-d):d<q&&d<f&&(d=Math.min(q,f),x=2*f-d);E.rightContX=v;E.rightContY=d}E=["C",C(w.rightContX,w.plotX),C(w.rightContY,w.plotY),C(y,h),C(x,f),h,f];w.rightContX=w.rightContY=null;return E}})})(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,E=a.extend,q=a.isNumber,h=a.merge,f=a.pick,w=a.Series,y=a.seriesType,x=a.svg;y("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(){w.prototype.init.apply(this,arguments);var a=this,d=a.chart;d.hasRendered&&D(d.series,function(c){c.type===a.type&&(c.isDirty=!0)})},getColumnMetrics:function(){var a=this,d=a.options,c=a.xAxis,h=a.yAxis,k=c.options.reversedStacks,k=c.reversed&&!k||!c.reversed&&k,n,b={},e=0;!1===d.grouping?
e=1:D(a.chart.series,function(c){var l=c.options,d=c.yAxis,m;c.type!==a.type||!c.visible&&a.chart.options.chart.ignoreHiddenSeries||h.len!==d.len||h.pos!==d.pos||(l.stacking?(n=c.stackKey,void 0===b[n]&&(b[n]=e++),m=b[n]):!1!==l.grouping&&(m=e++),c.columnIndex=m)});var t=Math.min(Math.abs(c.transA)*(c.ordinalSlope||d.pointRange||c.closestPointRange||c.tickInterval||1),c.len),q=t*d.groupPadding,l=(t-2*q)/(e||1),d=Math.min(d.maxPointWidth||c.len,f(d.pointWidth,l*(1-2*d.pointPadding)));a.columnMetrics=
{width:d,offset:(l-d)/2+(q+((a.columnIndex||0)+(k?1:0))*l-t/2)*(k?-1:1)};return a.columnMetrics},crispCol:function(a,d,c,f){var k=this.chart,n=this.borderWidth,b=-(n%2?.5:0),n=n%2?.5:1;k.inverted&&k.renderer.isVML&&(n+=1);this.options.crisp&&(c=Math.round(a+c)+b,a=Math.round(a)+b,c-=a);f=Math.round(d+f)+n;b=.5>=Math.abs(d)&&.5<f;d=Math.round(d)+n;f-=d;b&&f&&(--d,f+=1);return{x:a,y:d,width:c,height:f}},translate:function(){var a=this,d=a.chart,c=a.options,h=a.dense=2>a.closestPointRange*a.xAxis.transA,
h=a.borderWidth=f(c.borderWidth,h?0:1),k=a.yAxis,n=c.threshold,b=a.translatedThreshold=k.getThreshold(n),e=f(c.minPointLength,5),t=a.getColumnMetrics(),q=t.width,l=a.barW=Math.max(q,1+2*h),G=a.pointXOffset=t.offset;d.inverted&&(b-=.5);c.pointPadding&&(l=Math.ceil(l));w.prototype.translate.apply(a);D(a.points,function(c){var h=f(c.yBottom,b),m=999+Math.abs(h),m=Math.min(Math.max(-m,c.plotY),k.len+m),t=c.plotX+G,r=l,u=Math.min(m,h),F,g=Math.max(m,h)-u;e&&Math.abs(g)<e&&(g=e,F=!k.reversed&&!c.negative||
k.reversed&&c.negative,c.y===n&&a.dataMax<=n&&k.min<n&&(F=!F),u=Math.abs(u-b)>e?h-e:b-(F?e:0));c.barX=t;c.pointWidth=q;c.tooltipPos=d.inverted?[k.len+k.pos-d.plotLeft-m,a.xAxis.len-t-r/2,g]:[t+r/2,m+k.pos-d.plotTop,g];c.shapeType="rect";c.shapeArgs=a.crispCol.apply(a,c.isNull?[t,b,r,0]:[t,u,r,g])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},drawPoints:function(){var a=this,d=this.chart,
c=a.options,f=d.renderer,k=c.animationLimit||250,n;D(a.points,function(b){var e=b.graphic,t=e&&d.pointCount<k?"animate":"attr";if(q(b.plotY)&&null!==b.y){n=b.shapeArgs;if(e)e[t](h(n));else b.graphic=e=f[b.shapeType](n).add(b.group||a.group);c.borderRadius&&e.attr({r:c.borderRadius});e.addClass(b.getClassName(),!0)}else e&&(b.graphic=e.destroy())})},animate:function(a){var d=this,c=this.yAxis,f=d.options,k=this.chart.inverted,n={},b=k?"translateX":"translateY",e;x&&(a?(n.scaleY=.001,a=Math.min(c.pos+
c.len,Math.max(c.pos,c.toPixels(f.threshold))),k?n.translateX=a-c.len:n.translateY=a,d.group.attr(n)):(e=d.group.attr(b),d.group.animate({scaleY:1},E(C(d.options.animation),{step:function(a,f){n[b]=e+f.pos*(c.pos-e);d.group.attr(n)}})),d.animate=null))},remove:function(){var a=this,d=a.chart;d.hasRendered&&D(d.series,function(c){c.type===a.type&&(c.isDirty=!0)});w.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,E=a.pick,q=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,f=this.chart,w=2*(a.slicedOffset||0),y=f.plotWidth-2*w,f=f.plotHeight-2*w,x=a.center,x=[E(x[0],"50%"),E(x[1],"50%"),a.size||"100%",a.innerSize||0],v=Math.min(y,f),d,c;for(d=0;4>d;++d)c=x[d],a=2>d||2===d&&/%$/.test(c),x[d]=q(c,[y,f,v,x[2]][d])+(a?w:0);x[3]>x[2]&&(x[3]=x[2]);return x},
getStartAndEndRadians:function(a,f){a=D(a)?a:0;f=D(f)&&f>a&&360>f-a?f:a+360;return{start:C*(a+-90),end:C*(f+-90)}}}})(K);(function(a){var C=a.addEvent,D=a.CenteredSeriesMixin,E=a.defined,q=a.each,h=a.extend,f=D.getStartAndEndRadians,w=a.inArray,y=a.noop,x=a.pick,v=a.Point,d=a.Series,c=a.seriesType,r=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||(q(b,function(a){var b=a.graphic,l=a.shapeArgs;b&&(b.attr({r:a.startR||c.center[3]/2,start:e,end:e}),b.animate({r:l.r,
start:l.start,end:l.end},c.options.animation))}),c.animate=null)},updateTotals:function(){var a,c=0,b=this.points,e=b.length,d,f=this.options.ignoreHiddenPoint;for(a=0;a<e;a++)d=b[a],c+=f&&!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||!f)?d.y/c*100:0,d.total=c},generatePoints:function(){d.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var c=0,b=this.options,e=b.slicedOffset,d=e+(b.borderWidth||0),
k,l,h,r=f(b.startAngle,b.endAngle),A=this.startAngleRad=r.start,r=(this.endAngleRad=r.end)-A,m=this.points,z,v=b.dataLabels.distance,b=b.ignoreHiddenPoint,u,F=m.length,g;a||(this.center=a=this.getCenter());this.getX=function(b,c,e){h=Math.asin(Math.min((b-a[1])/(a[2]/2+e.labelDistance),1));return a[0]+(c?-1:1)*Math.cos(h)*(a[2]/2+e.labelDistance)};for(u=0;u<F;u++){g=m[u];g.labelDistance=x(g.options.dataLabels&&g.options.dataLabels.distance,v);this.maxLabelDistance=Math.max(this.maxLabelDistance||
0,g.labelDistance);k=A+c*r;if(!b||g.visible)c+=g.percentage/100;l=A+c*r;g.shapeType="arc";g.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1E3*k)/1E3,end:Math.round(1E3*l)/1E3};h=(l+k)/2;h>1.5*Math.PI?h-=2*Math.PI:h<-Math.PI/2&&(h+=2*Math.PI);g.slicedTranslation={translateX:Math.round(Math.cos(h)*e),translateY:Math.round(Math.sin(h)*e)};l=Math.cos(h)*a[2]/2;z=Math.sin(h)*a[2]/2;g.tooltipPos=[a[0]+.7*l,a[1]+.7*z];g.half=h<-Math.PI/2||h>Math.PI/2?1:0;g.angle=h;k=Math.min(d,g.labelDistance/
5);g.labelPos=[a[0]+l+Math.cos(h)*g.labelDistance,a[1]+z+Math.sin(h)*g.labelDistance,a[0]+l+Math.cos(h)*k,a[1]+z+Math.sin(h)*k,a[0]+l,a[1]+z,0>g.labelDistance?"center":g.half?"right":"left",h]}},drawGraph:null,drawPoints:function(){var a=this,c=a.chart.renderer,b,e,d;q(a.points,function(f){e=f.graphic;f.isNull?e&&(f.graphic=e.destroy()):(d=f.shapeArgs,b=f.getTranslate(),e?e.setRadialReference(a.center).animate(h(d,b)):f.graphic=e=c[f.shapeType](d).setRadialReference(a.center).attr(b).add(a.group),
e.attr({visibility:f.visible?"inherit":"hidden"}),e.addClass(f.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(){v.prototype.init.apply(this,arguments);var a=this,c;a.name=x(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,f=e.options.ignoreHiddenPoint;c=x(c,f);a!==b.visible&&(b.visible=b.options.visible=a=void 0===a?!b.visible:a,e.options.data[w(b,e.data)]=b.options,q(["graphic","dataLabel","connector","shadowGroup"],function(c){if(b[c])b[c][a?"show":"hide"](!0)}),b.legendItem&&d.legend.colorizeItem(b,a),a||"hover"!==b.state||b.setState(""),f&&(e.isDirty=!0),c&&d.redraw())},slice:function(a,c,b){var e=this.series;r(b,e.chart);x(c,!0);this.sliced=
this.options.sliced=E(a)?a:!this.sliced;e.options.data[w(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,E=a.defined,q=a.each,h=a.extend,f=a.format,
w=a.map,y=a.merge,x=a.noop,v=a.pick,d=a.relativeLength,c=a.Series,r=a.seriesTypes,k=a.some,n=a.stableSort;a.distribute=function(b,c,d){function e(a,b){return a.target-b.target}var l,f=!0,h=b,t=[],m;m=0;var r=h.reducedLen||c;for(l=b.length;l--;)m+=b[l].size;if(m>r){n(b,function(a,b){return(b.rank||0)-(a.rank||0)});for(m=l=0;m<=r;)m+=b[l].size,l++;t=b.splice(l-1,b.length)}n(b,e);for(b=w(b,function(a){return{size:a.size,targets:[a.target],align:v(a.align,.5)}});f;){for(l=b.length;l--;)f=b[l],m=(Math.min.apply(0,
f.targets)+Math.max.apply(0,f.targets))/2,f.pos=Math.min(Math.max(0,m-f.size*f.align),c-f.size);l=b.length;for(f=!1;l--;)0<l&&b[l-1].pos+b[l-1].size>b[l].pos&&(b[l-1].size+=b[l].size,b[l-1].targets=b[l-1].targets.concat(b[l].targets),b[l-1].align=.5,b[l-1].pos+b[l-1].size>c&&(b[l-1].pos=c-b[l-1].size),b.splice(l,1),f=!0)}h.push.apply(h,t);l=0;k(b,function(b){var e=0;if(k(b.targets,function(){h[l].pos=b.pos+e;if(Math.abs(h[l].pos-h[l].target)>d)return q(h.slice(0,l+1),function(a){delete a.pos}),h.reducedLen=
(h.reducedLen||c)-.1*c,h.reducedLen>.1*c&&a.distribute(h,c,d),!0;e+=h[l].size;l++}))return!0});n(h,e)};c.prototype.drawDataLabels=function(){function b(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}var c=this,d=c.chart,k=c.options,l=k.dataLabels,h=c.points,n,r,m=c.hasRendered||0,z,w,u=v(l.defer,!!k.animation),F=d.renderer;if(l.enabled||c._hasPointLabels)c.dlProcessOptions&&
c.dlProcessOptions(l),w=c.plotGroup("dataLabelsGroup","data-labels",u&&!m?"hidden":"visible",l.zIndex||6),u&&(w.attr({opacity:+m}),m||C(c,"afterAnimate",function(){c.visible&&w.show(!0);w[k.animation?"animate":"attr"]({opacity:1},{duration:200})})),r=l,q(h,function(e){var g,m=e.dataLabel,p,u,k=e.connector,h=!m,t;n=e.dlOptions||e.options&&e.options.dataLabels;(g=v(n&&n.enabled,r.enabled)&&!e.isNull)&&(g=!0===b(e,n||l));g&&(l=y(r,n),p=e.getLabelConfig(),t=l[e.formatPrefix+"Format"]||l.format,z=E(t)?
f(t,p,d.time):(l[e.formatPrefix+"Formatter"]||l.formatter).call(p,l),p=l.rotation,u={r:l.borderRadius||0,rotation:p,padding:l.padding,zIndex:1},a.objectEach(u,function(a,b){void 0===a&&delete u[b]}));!m||g&&E(z)?g&&E(z)&&(m?u.text=z:(m=e.dataLabel=p?F.text(z,0,-9999,l.useHTML).addClass("highcharts-data-label"):F.label(z,0,-9999,l.shape,null,null,l.useHTML,null,"data-label"),m.addClass(" highcharts-data-label-color-"+e.colorIndex+" "+(l.className||"")+(l.useHTML?" highcharts-tracker":""))),m.attr(u),
m.added||m.add(w),c.alignDataLabel(e,m,l,null,h)):(e.dataLabel=m=m.destroy(),k&&(e.connector=k.destroy()))});a.fireEvent(this,"afterDrawDataLabels")};c.prototype.alignDataLabel=function(a,c,d,f,l){var b=this.chart,e=b.inverted,k=v(a.dlBox&&a.dlBox.centerX,a.plotX,-9999),m=v(a.plotY,-9999),n=c.getBBox(),t,u=d.rotation,r=d.align,g=this.visible&&(a.series.forceDL||b.isInsidePlot(k,Math.round(m),e)||f&&b.isInsidePlot(k,e?f.x+1:f.y+f.height-1,e)),B="justify"===v(d.overflow,"justify");if(g&&(t=b.renderer.fontMetrics(void 0,
c).b,f=h({x:e?this.yAxis.len-m:k,y:Math.round(e?this.xAxis.len-k:m),width:0,height:0},f),h(d,{width:n.width,height:n.height}),u?(B=!1,k=b.renderer.rotCorr(t,u),k={x:f.x+d.x+f.width/2+k.x,y:f.y+d.y+{top:0,middle:.5,bottom:1}[d.verticalAlign]*f.height},c[l?"attr":"animate"](k).attr({align:r}),m=(u+720)%360,m=180<m&&360>m,"left"===r?k.y-=m?n.height:0:"center"===r?(k.x-=n.width/2,k.y-=n.height/2):"right"===r&&(k.x-=n.width,k.y-=m?0:n.height),c.placed=!0,c.alignAttr=k):(c.align(d,null,f),k=c.alignAttr),
B&&0<=f.height?a.isLabelJustified=this.justifyDataLabel(c,d,k,n,f,l):v(d.crop,!0)&&(g=b.isInsidePlot(k.x,k.y)&&b.isInsidePlot(k.x+n.width,k.y+n.height)),d.shape&&!u))c[l?"attr":"animate"]({anchorX:e?b.plotWidth-a.plotY:a.plotX,anchorY:e?b.plotHeight-a.plotX:a.plotY});g||(c.attr({y:-9999}),c.placed=!1)};c.prototype.justifyDataLabel=function(a,c,d,f,l,k){var b=this.chart,e=c.align,m=c.verticalAlign,n,h,u=a.box?0:a.padding||0;n=d.x+u;0>n&&("right"===e?c.align="left":c.x=-n,h=!0);n=d.x+f.width-u;n>b.plotWidth&&
("left"===e?c.align="right":c.x=b.plotWidth-n,h=!0);n=d.y+u;0>n&&("bottom"===m?c.verticalAlign="top":c.y=-n,h=!0);n=d.y+f.height-u;n>b.plotHeight&&("top"===m?c.verticalAlign="bottom":c.y=b.plotHeight-n,h=!0);h&&(a.placed=!k,a.align(c,null,l));return h};r.pie&&(r.pie.prototype.drawDataLabels=function(){var b=this,e=b.data,d,f=b.chart,l=b.options.dataLabels,k=v(l.connectorPadding,10),n=v(l.connectorWidth,1),h=f.plotWidth,m=f.plotHeight,r=Math.round(f.chartWidth/3),w,u=b.center,F=u[2]/2,g=u[1],B,x,p,
y,C=[[],[]],Q,N,P,O,S=[0,0,0,0];b.visible&&(l.enabled||b._hasPointLabels)&&(q(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),q(e,function(a){a.dataLabel&&(a.visible?(C[a.half].push(a),a.dataLabel._pos=null,a.dataLabel.getBBox().width>r&&(a.dataLabel.css({width:.7*r}),a.dataLabel.shortened=!0)):a.dataLabel=a.dataLabel.destroy())}),q(C,function(c,e){var n,
r,t=c.length,z=[],A;if(t)for(b.sortByAngle(c,e-.5),0<b.maxLabelDistance&&(n=Math.max(0,g-F-b.maxLabelDistance),r=Math.min(g+F+b.maxLabelDistance,f.plotHeight),q(c,function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,g-F-a.labelDistance),a.bottom=Math.min(g+F+a.labelDistance,f.plotHeight),A=a.dataLabel.getBBox().height||21,a.distributeBox={target:a.labelPos[1]-a.top+A/2,size:A,rank:a.y},z.push(a.distributeBox))}),n=r+A-n,a.distribute(z,n,n/5)),O=0;O<t;O++)d=c[O],p=d.labelPos,B=d.dataLabel,
P=!1===d.visible?"hidden":"inherit",N=n=p[1],z&&E(d.distributeBox)&&(void 0===d.distributeBox.pos?P="hidden":(y=d.distributeBox.size,N=d.top+d.distributeBox.pos)),delete d.positionIndex,Q=l.justify?u[0]+(e?-1:1)*(F+d.labelDistance):b.getX(N<d.top+2||N>d.bottom-2?n:N,e,d),B._attr={visibility:P,align:p[6]},B._pos={x:Q+l.x+({left:k,right:-k}[p[6]]||0),y:N+l.y-10},p.x=Q,p.y=N,v(l.crop,!0)&&(x=B.getBBox().width,n=null,Q-x<k&&1===e?(n=Math.round(x-Q+k),S[3]=Math.max(n,S[3])):Q+x>h-k&&0===e&&(n=Math.round(Q+
x-h+k),S[1]=Math.max(n,S[1])),0>N-y/2?S[0]=Math.max(Math.round(-N+y/2),S[0]):N+y/2>m&&(S[2]=Math.max(Math.round(N+y/2-m),S[2])),B.sideOverflow=n)}),0===D(S)||this.verifyDataLabelOverflow(S))&&(this.placeDataLabels(),n&&q(this.points,function(a){var c;w=a.connector;if((B=a.dataLabel)&&B._pos&&a.visible&&0<a.labelDistance){P=B._attr.visibility;if(c=!w)a.connector=w=f.renderer.path().addClass("highcharts-data-label-connector  highcharts-color-"+a.colorIndex+(a.className?" "+a.className:"")).add(b.dataLabelsGroup);
w[c?"attr":"animate"]({d:b.connectorPath(a.labelPos)});w.attr("visibility",P)}else w&&(a.connector=w.destroy())}))},r.pie.prototype.connectorPath=function(a){var b=a.x,c=a.y;return v(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]]},r.pie.prototype.placeDataLabels=function(){q(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)},r.pie.prototype.alignDataLabel=x,r.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,f=c.center,l=c.minSize||80,k,n=null!==c.size;n||(null!==f[0]?k=Math.max(b[2]-Math.max(a[1],a[3]),l):(k=Math.max(b[2]-a[1]-
a[3],l),b[0]+=(a[3]-a[1])/2),null!==f[1]?k=Math.max(Math.min(k,b[2]-Math.max(a[0],a[2])),l):(k=Math.max(Math.min(k,b[2]-a[0]-a[2]),l),b[1]+=(a[0]-a[2])/2),k<b[2]?(b[2]=k,b[3]=Math.min(d(c.innerSize||0,k),k),this.translate(b),this.drawDataLabels&&this.drawDataLabels()):n=!0);return n});r.column&&(r.column.prototype.alignDataLabel=function(a,e,d,f,l){var b=this.chart.inverted,k=a.series,n=a.dlBox||a.shapeArgs,m=v(a.below,a.plotY>v(this.translatedThreshold,k.yAxis.len)),h=v(d.inside,!!this.options.stacking);
n&&(f=y(n),0>f.y&&(f.height+=f.y,f.y=0),n=f.y+f.height-k.yAxis.len,0<n&&(f.height-=n),b&&(f={x:k.yAxis.len-f.y-f.height,y:k.xAxis.len-f.x-f.width,width:f.height,height:f.width}),h||(b?(f.x+=m?0:f.width,f.width=0):(f.y+=m?f.height:0,f.height=0)));d.align=v(d.align,!b||h?"center":m?"right":"left");d.verticalAlign=v(d.verticalAlign,b||h?"middle":m?"top":"bottom");c.prototype.alignDataLabel.call(this,a,e,d,f,l);a.isLabelJustified&&a.contrastColor&&a.dataLabel.css({color:a.contrastColor})})})(K);(function(a){var C=
a.Chart,D=a.each,E=a.objectEach,q=a.pick;a=a.addEvent;a(C,"render",function(){var a=[];D(this.labelCollectors||[],function(f){a=a.concat(f())});D(this.yAxis||[],function(f){f.options.stackLabels&&!f.options.stackLabels.allowOverlap&&E(f.stacks,function(f){E(f,function(f){a.push(f.label)})})});D(this.series||[],function(f){var h=f.options.dataLabels,y=f.dataLabelCollections||["dataLabel"];(h.enabled||f._hasPointLabels)&&!h.allowOverlap&&f.visible&&D(y,function(h){D(f.points,function(f){f[h]&&f.visible&&
(f[h].labelrank=q(f.labelrank,f.shapeArgs&&f.shapeArgs.height),a.push(f[h]))})})});this.hideOverlappingLabels(a)});C.prototype.hideOverlappingLabels=function(a){var f=a.length,h=this.renderer,q,x,v,d,c,r,k=function(a,b,c,d,f,l,k,h){return!(f>a+c||f+k<a||l>b+d||l+h<b)};v=function(a){var b,c,d,f=2*(a.box?0:a.padding||0);d=0;if(a&&(!a.alignAttr||a.placed))return b=a.alignAttr||{x:a.attr("x"),y:a.attr("y")},c=a.parentGroup,a.width||(d=a.getBBox(),a.width=d.width,a.height=d.height,d=h.fontMetrics(null,
a.element).h),{x:b.x+(c.translateX||0),y:b.y+(c.translateY||0)-d,width:a.width-f,height:a.height-f}};for(x=0;x<f;x++)if(q=a[x])q.oldOpacity=q.opacity,q.newOpacity=1,q.absoluteBox=v(q);a.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(x=0;x<f;x++)for(r=(v=a[x])&&v.absoluteBox,q=x+1;q<f;++q)if(c=(d=a[q])&&d.absoluteBox,r&&c&&v!==d&&0!==v.newOpacity&&0!==d.newOpacity&&(c=k(r.x,r.y,r.width,r.height,c.x,c.y,c.width,c.height)))(v.labelrank<d.labelrank?v:d).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,E=a.createElement,q=a.css,h=a.defaultOptions,f=a.defaultPlotOptions,w=a.each,y=a.extend,x=a.fireEvent,v=a.hasTouch,d=a.inArray,c=a.isObject,r=a.Legend,k=a.merge,n=a.pick,b=a.Point,e=a.Series,t=a.seriesTypes,H;H=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))};w(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||(w(a.trackerGroups,function(e){if(a[e]&&(a[e].addClass("highcharts-tracker").on("mouseover",c).on("mouseout",function(a){b.onTrackerMouseOut(a)}),v))a[e].on("touchstart",c)}),a._hasTracking=!0);x(this,"afterDrawTracker")},
drawTrackerGraph:function(){var a=this,b=a.options.trackByArea,c=[].concat(b?a.areaPath:a.graphPath),e=c.length,d=a.chart,f=d.pointer,k=d.renderer,u=d.options.tooltip.snap,h=a.tracker,g,n=function(){if(d.hoverSeries!==a)a.onMouseOver()};if(e&&!b)for(g=e+1;g--;)"M"===c[g]&&c.splice(g+1,0,c[g+1]-u,c[g+2],"L"),(g&&"M"===c[g]||g===e)&&c.splice(g,0,"L",c[g-2]+u,c[g-1]);h?h.attr({d:c}):a.graph&&(a.tracker=k.path(c).attr({visibility:a.visible?"visible":"hidden",zIndex:2}).addClass(b?"highcharts-tracker-area":
"highcharts-tracker-line").add(a.group),w([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",n).on("mouseout",function(a){f.onTrackerMouseOut(a)});if(v)a.on("touchstart",n)}));x(this,"afterDrawTracker")}};t.column&&(t.column.prototype.drawTracker=H.drawTrackerPoint);t.pie&&(t.pie.prototype.drawTracker=H.drawTrackerPoint);t.scatter&&(t.scatter.prototype.drawTracker=H.drawTrackerPoint);y(r.prototype,{setItemEvents:function(a,c,e){var d=this.chart.renderer.boxWrapper,
f="highcharts-legend-"+(a instanceof b?"point":"series")+"-active";(e?c:a.legendGroup).on("mouseover",function(){a.setState("hover");d.addClass(f)}).on("mouseout",function(){d.removeClass(f);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible()};d.removeClass(f);b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):x(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=E("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){x(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=h.lang,e=b.options.chart.resetZoomButton,d=e.theme,f=d.states,k="chart"===e.relativeTo?null:"plotBox";x(this,"beforeShowResetZoom",null,function(){b.resetZoomButton=b.renderer.button(c.resetZoom,null,
null,a,d,f&&f.hover).attr({align:e.position.align,title:c.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(e.position,!1,k)})},zoomOut:function(){x(this,"selection",{resetSelection:!0},this.zoom)},zoom:function(a){var b,e=this.pointer,d=!1,f;!a||a.resetSelection?(w(this.axes,function(a){b=a.zoom()}),e.initiated=!1):w(a.xAxis.concat(a.yAxis),function(a){var c=a.axis;e[c.isXAxis?"zoomX":"zoomY"]&&(b=c.zoom(a.min,a.max),c.displayBtn&&(d=!0))});f=this.resetZoomButton;d&&!f?this.showResetZoom():
!d&&c(f)&&(this.resetZoomButton=f.destroy());b&&this.redraw(n(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,e=c.hoverPoints,d;e&&w(e,function(a){a.setState()});w("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var e=b.horiz,f=a[e?"chartX":"chartY"],e=e?"mouseDownX":"mouseDownY",l=c[e],g=(b.pointRange||0)/2,m=b.reversed&&!c.inverted||!b.reversed&&c.inverted?-1:1,k=b.getExtremes(),p=b.toValue(l-f,!0)+g*m,m=b.toValue(l+b.len-f,!0)-g*m,h=m<p,
l=h?m:p,p=h?p:m,m=Math.min(k.dataMin,g?k.min:b.toValue(b.toPixels(k.min)-b.minPixelPadding)),g=Math.max(k.dataMax,g?k.max:b.toValue(b.toPixels(k.max)+b.minPixelPadding)),h=m-l;0<h&&(p+=h,l=m);h=p-g;0<h&&(p=g,l-=h);b.series.length&&l!==k.min&&p!==k.max&&(b.setExtremes(l,p,!1,!1,{trigger:"pan"}),d=!0);c[e]=f});d&&c.redraw(!1);q(c.container,{cursor:"move"})}});y(b.prototype,{select:function(a,b){var c=this,e=c.series,f=e.chart;a=n(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},
function(){c.selected=c.options.selected=a;e.options.data[d(c,e.data)]=c.options;c.setState(a&&"select");b||w(f.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=a.options.selected=!1,e.options.data[d(a,e.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");
w(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var b=this,c=k(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),e=this.plotY,d=this.series,l=d.options.states[a||"normal"]||{},k=f[d.type].marker&&d.options.marker,u=k&&!1===k.enabled,h=k&&k.states&&k.states[a||"normal"]||{},g=!1===h.enabled,r=d.stateMarkerGraphic,
t=this.marker||{},p=d.chart,v=d.halo,q,w=k&&d.markerAttribs;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===l.enabled||a&&(g||u&&!1===h.enabled)||a&&t.states&&t.states[a]&&!1===t.states[a].enabled)){w&&(q=d.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+this.state),a&&this.graphic.addClass("highcharts-point-"+a),q&&this.graphic.animate(q,n(p.options.chart.animation,h.animation,k.animation)),r&&r.hide();else{if(a&&h)if(k=t.symbol||
d.symbol,r&&r.currentSymbol!==k&&(r=r.destroy()),r)r[b?"animate":"attr"]({x:q.x,y:q.y});else k&&(d.stateMarkerGraphic=r=p.renderer.symbol(k,q.x,q.y,q.width,q.height).add(d.markerGroup),r.currentSymbol=k);r&&(r[a&&p.isInsidePlot(c,e,p.inverted)?"show":"hide"](),r.element.point=this)}(c=l.halo)&&c.size?(v||(d.halo=v=p.renderer.path().add((this.graphic||r).parentGroup)),v.show()[b?"animate":"attr"]({d:this.haloPath(c.size)}),v.attr({"class":"highcharts-halo highcharts-color-"+n(this.colorIndex,d.colorIndex)+
(this.className?" "+this.className:""),zIndex:-1}),v.point=this):v&&v.point&&v.point.haloPath&&v.animate({d:v.point.haloPath(0)},null,v.hide);this.state=a;x(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(e.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&x(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=
this.options,b=this.chart,c=b.tooltip,e=b.hoverPoint;b.hoverSeries=null;if(e)e.onMouseOut();this&&a.events.mouseOut&&x(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this;a=a||"";b.state!==a&&(w([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,e=c.chart,d=c.legendItem,
f,l=e.options.chart.ignoreHiddenSeries,k=c.visible;f=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!k:a)?"show":"hide";w(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][f]()});if(e.hoverSeries===c||(e.hoverPoint&&e.hoverPoint.series)===c)c.onMouseOut();d&&e.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&w(e.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});w(c.linkedSeries,function(b){b.setVisible(a,!1)});l&&(e.isDirtyBox=
!0);x(c,f);!1!==b&&e.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);x(this,a?"select":"unselect")},drawTracker:H.drawTrackerGraph})})(K);(function(a){var C=a.Chart,D=a.each,E=a.inArray,q=a.isArray,h=a.isObject,f=a.pick,w=a.splat;C.prototype.setResponsive=function(f){var h=this.options.responsive,v=[],d=this.currentResponsive;h&&h.rules&&D(h.rules,function(c){void 0===
c._id&&(c._id=a.uniqueKey());this.matchResponsiveRule(c,v,f)},this);var c=a.merge.apply(0,a.map(v,function(c){return a.find(h.rules,function(a){return a._id===c}).chartOptions})),v=v.toString()||void 0;v!==(d&&d.ruleIds)&&(d&&this.update(d.undoOptions,f),v?(this.currentResponsive={ruleIds:v,mergedOptions:c,undoOptions:this.currentOptions(c)},this.update(c,f)):this.currentResponsive=void 0)};C.prototype.matchResponsiveRule=function(a,h){var v=a.condition;(v.callback||function(){return this.chartWidth<=
f(v.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=f(v.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=f(v.minWidth,0)&&this.chartHeight>=f(v.minHeight,0)}).call(this)&&h.push(a._id)};C.prototype.currentOptions=function(f){function x(d,c,f,k){var n;a.objectEach(d,function(a,e){if(!k&&-1<E(e,["series","xAxis","yAxis"]))for(a=w(a),f[e]=[],n=0;n<a.length;n++)c[e][n]&&(f[e][n]={},x(a[n],c[e][n],f[e][n],k+1));else h(a)?(f[e]=q(a)?[]:{},x(a,c[e]||{},f[e],k+1)):f[e]=c[e]||null})}var v={};x(f,this.options,v,
0);return v}})(K);(function(a){var C=a.addEvent,D=a.Axis,E=a.Chart,q=a.css,h=a.defined,f=a.each,w=a.extend,y=a.noop,x=a.pick,v=a.timeUnits,d=a.wrap;d(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})});d(D.prototype,"getTimeTicks",function(a,d,f,n,b,e,t,q){var c=0,k,r,w={},m,z,x,u=[],F=-Number.MAX_VALUE,g=this.options.tickPixelInterval,B=this.chart.time;if(!this.options.ordinal&&
!this.options.breaks||!e||3>e.length||void 0===f)return a.call(this,d,f,n,b);z=e.length;for(k=0;k<z;k++){x=k&&e[k-1]>n;e[k]<f&&(c=k);if(k===z-1||e[k+1]-e[k]>5*t||x){if(e[k]>F){for(r=a.call(this,d,e[c],e[k],b);r.length&&r[0]<=F;)r.shift();r.length&&(F=r[r.length-1]);u=u.concat(r)}c=k+1}if(x)break}a=r.info;if(q&&a.unitRange<=v.hour){k=u.length-1;for(c=1;c<k;c++)B.dateFormat("%d",u[c])!==B.dateFormat("%d",u[c-1])&&(w[u[c]]="day",m=!0);m&&(w[u[0]]="day");a.higherRanks=w}u.info=a;if(q&&h(g)){q=B=u.length;
k=[];var y;for(m=[];q--;)c=this.translate(u[q]),y&&(m[q]=y-c),k[q]=y=c;m.sort();m=m[Math.floor(m.length/2)];m<.6*g&&(m=null);q=u[B-1]>n?B-1:B;for(y=void 0;q--;)c=k[q],n=Math.abs(y-c),y&&n<.8*g&&(null===m||n<.8*m)?(w[u[q]]&&!w[u[q+1]]?(n=q+1,y=c):n=q,u.splice(n,1)):y=c}return u});w(D.prototype,{beforeSetTickPositions:function(){var a,d=[],k,n=!1,b,e=this.getExtremes(),t=e.min,q=e.max,l,v=this.isXAxis&&!!this.options.breaks,e=this.options.ordinal,w=Number.MAX_VALUE,A=this.chart.options.chart.ignoreHiddenSeries;
b="highcharts-navigator-xaxis"===this.options.className;var m;!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&&h(this.userMin)&&(this.min+=this.options.overscroll));if(e||v){f(this.series,function(b,c){k=[];if(!(A&&!1===b.visible||!1===b.takeOrdinalPosition&&!v)&&(d=d.concat(b.processedXData),a=d.length,d.sort(function(a,b){return a-b}),w=Math.min(w,x(b.closestPointRange,
w)),a)){for(c=0;c<a-1;)d[c]!==d[c+1]&&k.push(d[c+1]),c++;k[0]!==d[0]&&k.unshift(d[0]);d=k}b.isSeriesBoosting&&(m=!0)});m&&(d.length=0);a=d.length;if(2<a){b=d[1]-d[0];for(l=a-1;l--&&!n;)d[l+1]-d[l]!==b&&(n=!0);!this.options.keepOrdinalPadding&&(d[0]-t>b||q-d[d.length-1]>b)&&(n=!0)}else this.options.overscroll&&(2===a?w=d[1]-d[0]:1===a?(w=this.options.overscroll,d=[d[0],d[0]+w]):w=this.overscrollPointsRange);n?(this.options.overscroll&&(this.overscrollPointsRange=w,d=d.concat(this.getOverscrollPositions())),
this.ordinalPositions=d,b=this.ordinal2lin(Math.max(t,d[0]),!0),l=Math.max(this.ordinal2lin(Math.min(q,d[d.length-1]),!0),1),this.ordinalSlope=q=(q-t)/(l-b),this.ordinalOffset=t-b*q):(this.overscrollPointsRange=x(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=e&&n;this.groupIntervalFactor=null},val2lin:function(a,d){var c=this.ordinalPositions;if(c){var f=c.length,b,e;for(b=f;b--;)if(c[b]===a){e=b;break}for(b=f-
1;b--;)if(a>c[b]||0===b){a=(a-c[b])/(c[b+1]-c[b]);e=b+a;break}d=d?e:this.ordinalSlope*(e||0)+this.ordinalOffset}else d=a;return d},lin2val:function(a,d){var c=this.ordinalPositions;if(c){var f=this.ordinalSlope,b=this.ordinalOffset,e=c.length-1,h;if(d)0>a?a=c[0]:a>e?a=c[e]:(e=Math.floor(a),h=a-e);else for(;e--;)if(d=f*e+b,a>=d){f=f*(e+1)+b;h=(a-d)/(f-d);break}return void 0!==h&&void 0!==c[e]?c[e]+(h?h*(c[e+1]-c[e]):0):a}return a},getExtendedPositions:function(){var a=this,d=a.chart,k=a.series[0].currentDataGrouping,
h=a.ordinalIndex,b=k?k.count+k.unitName:"raw",e=a.options.overscroll,t=a.getExtremes(),q,l;h||(h=a.ordinalIndex={});h[b]||(q={series:[],chart:d,getExtremes:function(){return{min:t.dataMin,max:t.dataMax+e}},options:{ordinal:!0},val2lin:D.prototype.val2lin,ordinal2lin:D.prototype.ordinal2lin},f(a.series,function(b){l={xAxis:q,xData:b.xData.slice(),chart:d,destroyGroupedData:y};l.xData=l.xData.concat(a.getOverscrollPositions());l.options={dataGrouping:k?{enabled:!0,forced:!0,approximation:"open",units:[[k.unitName,
[k.count]]]}:{enabled:!1}};b.processData.apply(l);q.series.push(l)}),a.beforeSetTickPositions.apply(q),h[b]=q.ordinalPositions);return h[b]},getOverscrollPositions:function(){var c=this.options.overscroll,d=this.overscrollPointsRange,f=[],h=this.dataMax;if(a.defined(d))for(f.push(h);h<=this.dataMax+c;)h+=d,f.push(h);return f},getGroupIntervalFactor:function(a,d,f){var c;f=f.processedXData;var b=f.length,e=[];c=this.groupIntervalFactor;if(!c){for(c=0;c<b-1;c++)e[c]=f[c+1]-f[c];e.sort(function(a,b){return a-
b});e=e[Math.floor(b/2)];a=Math.max(a,f[0]);d=Math.min(d,f[b-1]);this.groupIntervalFactor=c=b*e/(d-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;d(E.prototype,"pan",function(a,d){var c=this.xAxis[0],h=c.options.overscroll,b=d.chartX,e=!1;if(c.options.ordinal&&c.series.length){var t=this.mouseDownX,r=c.getExtremes(),l=r.dataMax,v=r.min,w=r.max,
A=this.hoverPoints,m=c.closestPointRange||c.overscrollPointsRange,t=(t-b)/(c.translationSlope*(c.ordinalSlope||m)),z={ordinalPositions:c.getExtendedPositions()},m=c.lin2val,x=c.val2lin,u;z.ordinalPositions?1<Math.abs(t)&&(A&&f(A,function(a){a.setState()}),0>t?(A=z,u=c.ordinalPositions?c:z):(A=c.ordinalPositions?c:z,u=z),z=u.ordinalPositions,l>z[z.length-1]&&z.push(l),this.fixedRange=w-v,t=c.toFixedRange(null,null,m.apply(A,[x.apply(A,[v,!0])+t,!0]),m.apply(u,[x.apply(u,[w,!0])+t,!0])),t.min>=Math.min(r.dataMin,
v)&&t.max<=Math.max(l,w)+h&&c.setExtremes(t.min,t.max,!0,!1,{trigger:"pan"}),this.mouseDownX=b,q(this.container,{cursor:"move"})):e=!0}else e=!0;e&&(h&&(c.max=c.dataMax+h),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,q(this.pointArrayMap,["y"]))}var E=a.addEvent,q=a.pick,h=a.wrap,f=a.each,w=a.extend,y=a.isArray,x=a.fireEvent,
v=a.Axis,d=a.Series;w(v.prototype,{isInBreak:function(a,d){var c=a.repeat||Infinity,f=a.from,b=a.to-a.from;d=d>=f?(d-f)%c:c-(f-d)%c;return a.inclusive?d<=b:d<b&&0!==d},isInAnyBreak:function(a,d){var c=this.options.breaks,f=c&&c.length,b,e,h;if(f){for(;f--;)this.isInBreak(c[f],a)&&(b=!0,e||(e=q(c[f].showPoints,this.isXAxis?!1:!0)));h=b&&d?b&&!e:b}return h}});E(v,"afterSetTickPositions",function(){if(this.options.breaks){var a=this.tickPositions,d=this.tickPositions.info,f=[],h;for(h=0;h<a.length;h++)this.isInAnyBreak(a[h])||
f.push(a[h]);this.tickPositions=f;this.tickPositions.info=d}});E(v,"afterSetOptions",function(){this.options.breaks&&this.options.breaks.length&&(this.options.ordinal=!1)});E(v,"afterInit",function(){var a=this,d;d=this.options.breaks;a.isBroken=y(d)&&!!d.length;a.isBroken&&(a.val2lin=function(c){var d=c,b,e;for(e=0;e<a.breakArray.length;e++)if(b=a.breakArray[e],b.to<=c)d-=b.len;else if(b.from>=c)break;else if(a.isInBreak(b,c)){d-=c-b.from;break}return d},a.lin2val=function(c){var d,b;for(b=0;b<a.breakArray.length&&
!(d=a.breakArray[b],d.from>=c);b++)d.to<c?c+=d.len:a.isInBreak(d,c)&&(c+=d.len);return c},a.setExtremes=function(a,c,b,e,d){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(c);)c-=this.closestPointRange;v.prototype.setExtremes.call(this,a,c,b,e,d)},a.setAxisTranslation=function(c){v.prototype.setAxisTranslation.call(this,c);c=a.options.breaks;var d=[],b=[],e=0,h,k,l=a.userMin||a.min,r=a.userMax||a.max,w=q(a.pointRangePadding,0),A,m;f(c,function(b){k=b.repeat||Infinity;a.isInBreak(b,
l)&&(l+=b.to%k-l%k);a.isInBreak(b,r)&&(r-=r%k-b.from%k)});f(c,function(a){A=a.from;for(k=a.repeat||Infinity;A-k>l;)A-=k;for(;A<l;)A+=k;for(m=A;m<r;m+=k)d.push({value:m,move:"in"}),d.push({value:m+(a.to-a.from),move:"out",size:a.breakSize})});d.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-b.value});h=0;A=l;f(d,function(a){h+="in"===a.move?1:-1;1===h&&"in"===a.move&&(A=a.value);0===h&&(b.push({from:A,to:a.value,len:a.value-A-(a.size||0)}),e+=a.value-A-
(a.size||0))});a.breakArray=b;a.unitLength=r-l-e+w;x(a,"afterBreaks");a.options.staticScale?a.transA=a.options.staticScale:a.unitLength&&(a.transA*=(r-a.min+w)/a.unitLength);w&&(a.minPixelPadding=a.transA*a.minPointOffset);a.min=l;a.max=r})});h(d.prototype,"generatePoints",function(a){a.apply(this,C(arguments));var c=this.xAxis,d=this.yAxis,f=this.points,b,e=f.length,h=this.options.connectNulls,q;if(c&&d&&(c.options.breaks||d.options.breaks))for(;e--;)b=f[e],q=null===b.y&&!1===h,q||!c.isInAnyBreak(b.x,
!0)&&!d.isInAnyBreak(b.y,!0)||(f.splice(e,1),this.data[e]&&this.data[e].destroyElements())});a.Series.prototype.drawBreaks=function(a,d){var c=this,h=c.points,b,e,t,r;a&&f(d,function(d){b=a.breakArray||[];e=a.isXAxis?a.min:q(c.options.threshold,a.min);f(h,function(c){r=q(c["stack"+d.toUpperCase()],c[d]);f(b,function(b){t=!1;if(e<b.from&&r>b.to||e>b.from&&r<b.from)t="pointBreak";else if(e<b.from&&r>b.from&&r<b.to||e>b.from&&r>b.to&&r<b.from)t="pointInBreak";t&&x(a,t,{point:c,brk:b})})})})};a.Series.prototype.gappedPath=
function(){var c=this.currentDataGrouping,d=c&&c.totalRange,c=this.options.gapSize,f=this.points.slice(),h=f.length-1,b=this.yAxis;if(c&&0<h)for("value"!==this.options.gapUnit&&(c*=this.closestPointRange),d&&d>c&&(c=d);h--;)f[h+1].x-f[h].x>c&&(d=(f[h].x+f[h+1].x)/2,f.splice(h+1,0,{isNull:!0,x:d}),this.options.stacking&&(d=b.stacks[this.stackKey][d]=new a.StackItem(b,b.options.stackLabels,!1,d,this.stack),d.total=0));return this.getGraphPath(f)};h(a.seriesTypes.column.prototype,"drawPoints",D);h(a.Series.prototype,
"drawPoints",D)})(K);(function(a){var C=a.addEvent,D=a.arrayMax,E=a.arrayMin,q=a.Axis,h=a.defaultPlotOptions,f=a.defined,w=a.each,y=a.extend,x=a.format,v=a.isNumber,d=a.merge,c=a.pick,r=a.Point,k=a.Series,n=a.Tooltip,b=a.wrap,e=k.prototype,t=e.processData,H=e.generatePoints,l={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}},J=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);v(a)&&b&&(a/=b);return a},averages:function(){var a=
[];w(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?E(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,e){a=A.open(a);b=A.high(b);c=A.low(c);e=A.close(e);if(v(a)||v(b)||v(c)||v(e))return[a,b,c,e]},range:function(a,b){a=A.low(a);b=A.high(b);if(v(a)||
v(b))return[a,b];if(null===a&&null===b)return null}};e.groupData=function(a,b,c,e){var d=this,g=d.data,m=d.options.data,h=[],p=[],u=[],k=a.length,n,t,r=!!b,q=[];e="function"===typeof e?e:A[e]||G[d.type]&&A[G[d.type].approximation]||A[l.approximation];var z=d.pointArrayMap,x=z&&z.length,y=["x"].concat(z||["y"]),I=0,J=0,C,D;x?w(z,function(){q.push([])}):q.push([]);C=x||1;for(D=0;D<=k&&!(a[D]>=c[0]);D++);for(D;D<=k;D++){for(;void 0!==c[I+1]&&a[D]>=c[I+1]||D===k;){n=c[I];d.dataGroupInfo={start:J,length:q[0].length};
t=e.apply(d,q);f(d.dataGroupInfo.options)||(d.dataGroupInfo.options=d.pointClass.prototype.optionsToObject.call({series:d},d.options.data[J]),w(y,function(a){delete d.dataGroupInfo.options[a]}));void 0!==t&&(h.push(n),p.push(t),u.push(d.dataGroupInfo));J=D;for(n=0;n<C;n++)q[n].length=0,q[n].hasNulls=!1;I+=1;if(D===k)break}if(D===k)break;if(z){n=d.cropStart+D;t=g&&g[n]||d.pointClass.prototype.applyOptions.apply({series:d},[m[n]]);var H;for(n=0;n<x;n++)H=t[z[n]],v(H)?q[n].push(H):null===H&&(q[n].hasNulls=
!0)}else n=r?b[D]:null,v(n)?q[0].push(n):null===n&&(q[0].hasNulls=!0)}return[h,p,u]};e.processData=function(){var a=this.chart,b=this.options.dataGrouping,d=!1!==this.allowDG&&b&&c(b.enabled,a.options.isStock),l=this.visible||!a.options.chart.ignoreHiddenSeries,h,g=this.currentDataGrouping,k;this.forceCrop=d;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==t.apply(this,arguments)&&d){this.destroyGroupedData();var n,p=b.groupAll?this.xData:this.processedXData,r=b.groupAll?this.yData:this.processedYData,
q=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;d=a.getExtremes();k=d.min;d=d.max;v=v&&a.getGroupIntervalFactor(k,d,this)||1;w=w*(d-k)/q*v;q=a.getTimeTicks(a.normalizeTimeTickInterval(w,b.units||J),Math.min(k,p[0]),Math.max(d,p[p.length-1]),a.options.startOfWeek,p,this.closestPointRange);r=e.groupData.apply(this,[p,r,q,b.approximation]);p=r[0];v=r[1];if(b.smoothed&&p.length){n=p.length-1;for(p[n]=
Math.min(p[n],d);n--&&0<n;)p[n]+=w/2;p[0]=Math.max(p[0],k)}k=q.info;this.closestPointRange=q.info.totalRange;this.groupMap=r[2];if(f(p[0])&&p[0]<a.dataMin&&l){if(!f(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=(g&&g.totalRange)!==(k&&k.totalRange)}};e.destroyGroupedData=
function(){var a=this.groupedData;w(a||[],function(b,c){b&&(a[c]=b.destroy?b.destroy():null)});this.groupedData=null};e.generatePoints=function(){H.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};C(r,"update",function(){if(this.dataGroup)return a.error(24),!1});b(n.prototype,"tooltipFooterHeaderFormatter",function(a,b,c){var e=this.chart.time,d=b.series,g=d.tooltipOptions,f=d.options.dataGrouping,l=g.xDateFormat,p,h=d.xAxis;return h&&"datetime"===h.options.type&&
f&&v(b.key)?(a=d.currentDataGrouping,f=f.dateTimeLabelFormats,a?(h=f[a.unitName],1===a.count?l=h[0]:(l=h[1],p=h[2])):!l&&f&&(l=this.getXDateFormat(b,g,h)),l=e.dateFormat(l,b.key),p&&(l+=e.dateFormat(p,b.key+a.totalRange-1)),x(g[(c?"footer":"header")+"Format"],{point:y(b.point,{key:l}),series:d},e)):a.call(this,b,c)});C(k,"destroy",e.destroyGroupedData);C(k,"afterSetOptions",function(a){a=a.options;var b=this.type,c=this.chart.options.plotOptions,e=h[b].dataGrouping,f=this.useCommonDataGrouping&&l;
if(G[b]||f)e||(e=d(l,G[b])),a.dataGrouping=d(f,e,c.series&&c.series.dataGrouping,c[b].dataGrouping,this.userOptions.dataGrouping);this.chart.options.isStock&&(this.requireSorting=!0)});C(q,"afterSetScale",function(){w(this.series,function(a){a.hasProcessed=!1})});q.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,e=0,d=!1,g;for(c=b;c--;)(g=a[c].options.dataGrouping)&&(e=Math.max(e,g.groupPixelWidth));for(c=b;c--;)(g=a[c].options.dataGrouping)&&a[c].hasProcessed&&(b=(a[c].processedXData||
a[c].data).length,a[c].groupPixelWidth||b>this.chart.plotSizeX/e||b&&g.forced)&&(d=!0);return d?e:0};q.prototype.setDataGrouping=function(a,b){var e;b=c(b,!0);a||(a={forced:!1,units:null});if(this instanceof q)for(e=this.series.length;e--;)this.series[e].update({dataGrouping:a},!1);else w(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,E=a.seriesType,q=a.seriesTypes;E("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,f=a.yAxis,w=!!a.modifyValue,y=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];q.column.prototype.translate.apply(a);C(a.points,function(h){C([h.open,h.high,h.low,h.close,h.low],function(q,d){null!==q&&(w&&(q=a.modifyValue(q)),h[y[d]]=f.toPixels(q,!0))});h.tooltipPos[1]=h.plotHigh+f.pos-a.chart.plotTop})},
drawPoints:function(){var a=this,f=a.chart;C(a.points,function(h){var q,w,v,d,c=h.graphic,r,k=!c;void 0!==h.plotY&&(c||(h.graphic=c=f.renderer.path().add(a.group)),w=c.strokeWidth()%2/2,r=Math.round(h.plotX)-w,v=Math.round(h.shapeArgs.width/2),d=["M",r,Math.round(h.yBottom),"L",r,Math.round(h.plotHigh)],null!==h.open&&(q=Math.round(h.plotOpen)+w,d.push("M",r,q,"L",r-v,q)),null!==h.close&&(q=Math.round(h.plotClose)+w,d.push("M",r,q,"L",r+v,q)),c[k?"attr":"animate"]({d:d}).addClass(h.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,E=a.merge;a=a.seriesType;a("candlestick","ohlc",E(C.column,{states:{hover:{lineWidth:2}},tooltip:C.ohlc.tooltip,threshold:null,stickyTracking:!0}),{drawPoints:function(){var a=this,h=a.chart,f=a.yAxis.reversed;D(a.points,function(q){var w=q.graphic,x,v,d,c,r,k,n,b=!w;void 0!==q.plotY&&
(w||(q.graphic=w=h.renderer.path().add(a.group)),r=w.strokeWidth()%2/2,k=Math.round(q.plotX)-r,x=q.plotOpen,v=q.plotClose,d=Math.min(x,v),x=Math.max(x,v),n=Math.round(q.shapeArgs.width/2),v=f?x!==q.yBottom:Math.round(d)!==Math.round(q.plotHigh),c=f?Math.round(d)!==Math.round(q.plotHigh):x!==q.yBottom,d=Math.round(d)+r,x=Math.round(x)+r,r=[],r.push("M",k-n,x,"L",k-n,d,"L",k+n,d,"L",k+n,x,"Z","M",k,d,"L",k,v?Math.round(f?q.yBottom:q.plotHigh):d,"M",k,x,"L",k,c?Math.round(f?q.plotHigh:q.yBottom):x),
w[b?"attr":"animate"]({d:r}).addClass(q.getClassName(),!0))})}})})(K);ba=function(a){var C=a.each,D=a.defined,E=a.seriesTypes,q=a.stableSort;return{getPlotBox:function(){return a.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){E.column.prototype.translate.apply(this);var a=this.options,f=this.chart,w=this.points,y=w.length-1,x,v,d=a.onSeries,d=d&&f.get(d),a=a.onKey||"y",c=d&&d.options.step,r=d&&d.points,k=r&&r.length,n=f.inverted,
b=this.xAxis,e=this.yAxis,t=0,H,l,G,J;if(d&&d.visible&&k)for(t=(d.pointXOffset||0)+(d.barW||0)/2,x=d.currentDataGrouping,l=r[k-1].x+(x?x.totalRange:0),q(w,function(a,b){return a.x-b.x}),a="plot"+a[0].toUpperCase()+a.substr(1);k--&&w[y]&&!(H=r[k],x=w[y],x.y=H.y,H.x<=x.x&&void 0!==H[a]&&(x.x<=l&&(x.plotY=H[a],H.x<x.x&&!c&&(G=r[k+1])&&void 0!==G[a]&&(J=(x.x-H.x)/(G.x-H.x),x.plotY+=J*(G[a]-H[a]),x.y+=J*(G.y-H.y))),y--,k++,0>y)););C(w,function(a,c){var d;a.plotX+=t;if(void 0===a.plotY||n)0<=a.plotX&&a.plotX<=
b.len?n?(a.plotY=b.translate(a.x,0,1,0,1),a.plotX=D(a.y)?e.translate(a.y,0,0,0,1):0):a.plotY=f.chartHeight-b.bottom-(b.opposite?b.height:0)+b.offset-e.top:a.shapeArgs={};(v=w[c-1])&&v.plotX===a.plotX&&(void 0===v.stackIndex&&(v.stackIndex=0),d=v.stackIndex+1);a.stackIndex=d});this.onSeries=d}}}(K);(function(a,C){function D(a){x[a+"pin"]=function(d,c,f,h,n){var b=n&&n.anchorX;n=n&&n.anchorY;"circle"===a&&h>f&&(d-=Math.round((h-f)/2),f=h);d=x[a](d,c,f,h);b&&n&&(d.push("M","circle"===a?d[1]-d[4]:d[1]+
d[4]/2,c>n?c:c+h,"L",b,n),d=d.concat(x.circle(b-1,n-1,2,2)));return d}}var E=a.addEvent,q=a.each,h=a.noop,f=a.Series,w=a.seriesType,y=a.TrackerMixin,x=a.SVGRenderer.prototype.symbols;w("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:f.prototype.init,translate:C.translate,
getPlotBox:C.getPlotBox,drawPoints:function(){var f=this.points,d=this.chart,c=d.renderer,h,k,n=d.inverted,b=this.options,e=b.y,t,w,l,x,y,A,m=this.yAxis,z={},I=[];for(w=f.length;w--;)l=f[w],A=(n?l.plotY:l.plotX)>this.xAxis.len,h=l.plotX,x=l.stackIndex,t=l.options.shape||b.shape,k=l.plotY,void 0!==k&&(k=l.plotY+e-(void 0!==x&&x*b.stackDistance)),l.anchorX=x?void 0:l.plotX,y=x?void 0:l.plotY,x=l.graphic,void 0!==k&&0<=h&&!A?(x||(x=l.graphic=c.label("",null,null,t,null,null,b.useHTML).attr({align:"flag"===
t?"left":"center",width:b.width,height:b.height,"text-align":b.textAlign}).addClass("highcharts-point").add(this.markerGroup),l.graphic.div&&(l.graphic.div.point=l),x.isNew=!0),0<h&&(h-=x.strokeWidth()%2),t={y:k,anchorY:y},b.allowOverlapX&&(t.x=h,t.anchorX=l.anchorX),x.attr({text:l.options.title||b.title||"A"})[x.isNew?"attr":"animate"](t),b.allowOverlapX||(z[l.plotX]?z[l.plotX].size=Math.max(z[l.plotX].size,x.width):z[l.plotX]={align:0,size:x.width,target:h,anchorX:h}),l.tooltipPos=[h,k+m.pos-d.plotTop]):
x&&(l.graphic=x.destroy());b.allowOverlapX||(a.objectEach(z,function(a){a.plotX=a.anchorX;I.push(a)}),a.distribute(I,n?m.len:this.xAxis.len,100),q(f,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);q(a,function(d){var c=d.graphic;c&&E(c.element,"mouseover",function(){0<d.stackIndex&&!d.raised&&(d._y=c.y,c.attr({y:d._y-8}),d.raised=!0);q(a,function(a){a!==d&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:function(a){a?this.setClip():this.animate=null},setClip:function(){f.prototype.setClip.apply(this,arguments);!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup.clip(this.chart[this.sharedClipKey])},
buildKDTree:h,invertGroups:h});x.flag=function(a,d,c,f,h){var k=h&&h.anchorX||a;h=h&&h.anchorY||d;return x.circle(k-1,h-1,2,2).concat(["M",k,h,"L",a,d+f,a,d,a+c,d,a+c,d+f,a,d+f,"Z"])};D("circle");D("square")})(K,ba);(function(a){function C(a,c,d){this.init(a,c,d)}var D=a.addEvent,E=a.Axis,q=a.correctFloat,h=a.defaultOptions,f=a.defined,w=a.destroyObjectProperties,y=a.each,x=a.fireEvent,v=a.hasTouch,d=a.merge,c=a.pick,r=a.removeEvent,k,n={height:a.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,
liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3};h.scrollbar=d(!0,n,h.scrollbar);a.swapXY=k=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,f){this.scrollbarButtons=[];this.renderer=a;this.userOptions=e;this.options=d(n,e);this.chart=f;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,
f;this.group=f=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(f);this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(f);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:d,width:d,r:c.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(k(["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,f){var b=this.options.vertical,e=0,h=this.rendered?"animate":"attr";this.x=a;this.y=c+this.trackBorderWidth;this.width=d;this.xOffset=
this.height=f;this.yOffset=e;b?(this.width=this.yOffset=d=e=this.size,this.xOffset=c=0,this.barWidth=f-2*d,this.x=a+=this.options.margin):(this.height=this.xOffset=f=c=this.size,this.barWidth=d-2*f,this.y+=this.options.margin);this.group[h]({translateX:a,translateY:this.y});this.track[h]({width:d,height:f});this.scrollbarButtons[1][h]({translateX:b?0:d-c,translateY:b?f-e:0})},drawScrollbarButton:function(a){var b=this.renderer,c=this.scrollbarButtons,d=this.options,f=this.size,h;h=b.g().add(this.group);
c.push(h);h=b.rect().addClass("highcharts-scrollbar-button").add(h);h.attr(h.crisp({x:-.5,y:-.5,width:f+1,height:f+1,r:d.buttonBorderRadius},h.strokeWidth()));b.path(k(["M",f/2+(a?-1:1),f/2-3,"L",f/2+(a?-1:1),f/2+3,"L",f/2+(a?2:-2),f/2],d.vertical)).addClass("highcharts-scrollbar-arrow").add(c[a])},setRange:function(a,c){var b=this.options,d=b.vertical,e=b.minWidth,h=this.barWidth,k,n,m=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";f(h)&&(a=
Math.max(a,0),k=Math.ceil(h*a),this.calculatedWidth=n=q(h*Math.min(c,1)-k),n<e&&(k=(h-e+n)*a,n=e),e=Math.floor(k+this.xOffset+this.yOffset),h=n/2-.5,this.from=a,this.to=c,d?(this.scrollbarGroup[m]({translateY:e}),this.scrollbar[m]({height:n}),this.scrollbarRifles[m]({translateY:h}),this.scrollbarTop=e,this.scrollbarLeft=0):(this.scrollbarGroup[m]({translateX:e}),this.scrollbar[m]({width:n}),this.scrollbarRifles[m]({translateX:h}),this.scrollbarLeft=e,this.scrollbarTop=0),12>=n?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),d=a.options.vertical?"chartY":"chartX",e=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][d]||(c=a.cursorToScrollbarPosition(c)[d],d=a[d],d=c-d,a.hasDragged=!0,a.updatePosition(e[0]+d,e[1]+d),a.hasDragged&&x(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,
DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&x(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=q(a.to-a.from)*a.options.step;a.updatePosition(q(a.from-c),q(a.to-c));x(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);x(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var c=a.chart.pointer.normalize(b),d=a.to-a.from,e=a.y+a.scrollbarTop,f=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>e||!a.options.vertical&&c.chartX>f?a.updatePosition(a.from+d,a.to+d):a.updatePosition(a.from-d,a.to-d);x(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=q(1-q(c-a)),c=1);0>a&&(c=q(c-a),a=0);this.from=a;this.to=c},update:function(a){this.destroy();this.init(this.chart.renderer,d(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],c=this.scrollbarButtons,
d=this.scrollbarGroup.element,f=this.mouseDownHandler,l=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",f],[d.ownerDocument,"mousemove",l],[d.ownerDocument,"mouseup",h]];v&&a.push([d,"touchstart",f],[d.ownerDocument,"touchmove",l],[d.ownerDocument,"touchend",h]);y(a,function(a){D.apply(null,a)});this._events=a},removeEvents:function(){y(this._events,
function(a){r.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,w(a.scrollbarButtons))}};D(E,"afterInit",function(){var a=this;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,f;a.horiz&&!a.reversed||!a.horiz&&a.reversed?(f=d+e*this.to,d+=e*this.from):(f=d+e*(1-this.from),d+=e*(1-this.to));a.setExtremes(d,f,!0,!1,b)}))});D(E,"afterRender",function(){var a=Math.min(c(this.options.min,this.min),this.min,c(this.dataMin,this.min)),d=Math.max(c(this.options.max,this.max),this.max,c(this.dataMax,
this.max)),h=this.scrollbar,k=this.titleOffset||0;if(h){this.horiz?(h.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):(h.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(d)||!f(this.min)||!f(this.max)?h.setRange(0,0):(k=(this.min-a)/(d-a),a=(this.max-a)/(d-a),this.horiz&&!this.reversed||!this.horiz&&this.reversed?h.setRange(k,a):h.setRange(1-a,1-k))}});D(E,"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,E=a.Axis,q=a.Chart,h=a.defaultOptions,f=a.defined,w=a.destroyObjectProperties,
y=a.each,x=a.erase,v=a.error,d=a.extend,c=a.grep,r=a.hasTouch,k=a.isArray,n=a.isNumber,b=a.isObject,e=a.isTouchDevice,t=a.merge,H=a.pick,l=a.removeEvent,G=a.Scrollbar,J=a.Series,A=a.seriesTypes,m=a.wrap,z=[].concat(a.defaultDataGroupingUnits),I=function(a){var b=c(arguments,n);if(b.length)return Math[a].apply(0,b)};z[4]=["day",[1,2,3,4]];z[5]=["week",[1,2,3]];d(h,{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(),g=f/2,f=f%2/2,l=this.outlineHeight,h=this.scrollbarHeight,k=this.size,m=this.left-h,u=this.top;c?(m-=g,c=u+b+f,b=u+a+f,a=["M",m+l,u-h-f,"L",m+l,c,"L",m,c,"L",m,b,"L",m+l,b,"L",m+l,u+k+h].concat(e?["M",m+l,c-g,"L",m+l,b+g]:[])):(a+=m+h-f,b+=m+h-f,u+=g,a=["M",m,u,"L",a,u,"L",a,u+
l,"L",b,u+l,"L",b,u,"L",m+k+2*h,u].concat(e?["M",a-g,u,"L",b+g,u]:[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var e=this.left,f=this.top,g=this.height,l,h,k,m;c?(k=[e,e,e],m=[f,f+a,f+b],h=[g,g,g],l=[a,b-a,this.size-b]):(k=[e,e+a,e+b],m=[f,f,f],h=[a,b-a,this.size-b],l=[g,g,g]);y(this.shades,function(a,b){a[d]({x:k[b],y:m[b],width:h[b],height:l[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,e=d.renderer,f;a.navigatorGroup=f=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(f)});a.outline=e.path().addClass("highcharts-navigator-outline").add(f);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(f)})},update:function(a){y(this.series||[],function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy();t(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(b,c,d,e){var g=this.chart,l,h,k=this.scrollbarHeight,m,u=this.xAxis;l=u.fake?g.xAxis[0]:u;var r=this.navigatorEnabled,q,t=this.rendered;h=g.inverted;var v,w=g.xAxis[0].minRange,x=g.xAxis[0].options.maxRange;if(!this.hasDragged||f(d)){if(!n(b)||!n(c))if(t)d=0,e=H(u.width,l.width);
else return;this.left=H(u.left,g.plotLeft+k+(h?g.plotWidth:0));this.size=q=m=H(u.len,(h?g.plotHeight:g.plotWidth)-2*k);g=h?k:m+2*k;d=H(d,u.toPixels(b,!0));e=H(e,u.toPixels(c,!0));n(d)&&Infinity!==Math.abs(d)||(d=0,e=g);b=u.toValue(d,!0);c=u.toValue(e,!0);v=Math.abs(a.correctFloat(c-b));v<w?this.grabbedLeft?d=u.toPixels(c-w,!0):this.grabbedRight&&(e=u.toPixels(b+w,!0)):f(x)&&v>x&&(this.grabbedLeft?d=u.toPixels(c-x,!0):this.grabbedRight&&(e=u.toPixels(b+x,!0)));this.zoomedMax=Math.min(Math.max(d,e,
0),q);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(d,e),0),q);this.range=this.zoomedMax-this.zoomedMin;q=Math.round(this.zoomedMax);d=Math.round(this.zoomedMin);r&&(this.navigatorGroup.attr({visibility:"visible"}),t=t&&!this.hasDragged?"animate":"attr",this.drawMasks(d,q,h,t),this.drawOutline(d,q,h,t),this.navigatorOptions.handles.enabled&&(this.drawHandle(d,0,h,t),this.drawHandle(q,1,h,t)));this.scrollbar&&(h?(h=this.top-k,l=this.left-k+(r||!l.opposite?
0:(l.titleOffset||0)+l.axisTitleMargin),k=m+2*k):(h=this.top+(r?this.height:-k),l=this.left-k),this.scrollbar.position(l,h,g,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,f;a.mouseMoveHandler=e=function(b){a.onMouseMove(b)};a.mouseUpHandler=f=function(b){a.onMouseUp(b)};d=a.getPartsEvents("mousedown");d.push(D(c,"mousemove",e),D(c.ownerDocument,"mouseup",f));r&&(d.push(D(c,"touchmove",
e),D(c.ownerDocument,"touchend",f)),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,e=this.zoomedMin,
l=this.left,h=this.size,k=this.range,m=a.chartX,u,n;c.inverted&&(m=a.chartY,l=this.top);1===b?(this.grabbedCenter=m,this.fixedWidth=k,this.dragOffset=m-e):(a=m-l-k/2,0===b?a=Math.max(0,a):2===b&&a+k>=h&&(a=h-k,this.reversedExtremes?(a-=k,n=this.getUnionExtremes().dataMin):u=this.getUnionExtremes().dataMax),a!==e&&(this.fixedWidth=k,b=d.toFixedRange(a,a+k,n,u),f(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,f=c.left,l=c.navigatorSize,h=c.range,k=c.dragOffset,m=d.inverted;b.touches&&0===b.touches[0].pageX||(b=d.pointer.normalize(b),d=b.chartX,m&&(f=c.top,d=b.chartY),c.grabbedLeft?
(c.hasDragged=!0,c.render(0,0,d-f,c.otherHandlePos)):c.grabbedRight?(c.hasDragged=!0,c.render(0,0,c.otherHandlePos,d-f)):c.grabbedCenter&&(c.hasDragged=!0,d<k?d=k:d>l+k-h&&(d=l+k-h),c.render(0,0,d-k,d-k+h)),c.hasDragged&&c.scrollbar&&H(c.scrollbar.options.liveRedraw,a.svg&&!e&&!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,e,l,h=a.DOMEvent||a;(!this.hasDragged||d&&d.hasDragged)&&"scrollbar"!==
a.trigger||(d=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(l=this.fixedExtreme),this.zoomedMax===this.size&&(l=this.reversedExtremes?d.dataMin:d.dataMax),0===this.zoomedMin&&(e=this.reversedExtremes?d.dataMax:d.dataMin),c=c.toFixedRange(this.zoomedMin,this.zoomedMax,e,l),f(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){l(a,"updatedData",this.updatedDataHandler)},
this),a[0].xAxis&&l(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,c=b.navigator,d=c.enabled,e=b.scrollbar,f=e.enabled,b=d?c.height:0,l=f?e.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=l;this.scrollbarEnabled=f;this.navigatorEnabled=d;this.navigatorOptions=c;this.scrollbarOptions=e;this.outlineHeight=b+l;this.opposite=H(c.opposite,!d&&a.inverted);var h=this,d=h.baseSeries,e=a.xAxis.length,f=
a.yAxis.length,k=d&&d[0]&&d[0].xAxis||a.xAxis[0]||{options:{}};a.isDirtyBox=!0;h.navigatorEnabled?(h.xAxis=new E(a,t({breaks:k.options.breaks,ordinal:k.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:e,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[l,0,-l,0],width:b}:{offsets:[0,-l,0,l],height:b})),h.yAxis=new E(a,t(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,
offset:0,index:f,isInternal:!0,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),d||c.series.data?h.updateNavigatorSeries(!1):0===a.series.length&&(h.unbindRedraw=D(a,"beforeRedraw",function(){0<a.series.length&&!h.series&&(h.setBaseSeries(),h.unbindRedraw())})),h.reversedExtremes=a.inverted&&!h.xAxis.reversed||!a.inverted&&h.xAxis.reversed,h.renderElements(),h.addMouseEvents()):h.xAxis={translate:function(b,c){var d=a.xAxis[0],e=d.getExtremes(),f=d.len-2*l,g=I("min",d.options.min,e.dataMin),d=I("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:E.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=h.scrollbar=new G(a.renderer,t(a.options.scrollbar,{margin:h.navigatorEnabled?0:10,vertical:a.inverted}),a),D(h.scrollbar,"changed",function(b){var c=h.size,d=c*this.to,c=c*this.from;h.hasDragged=h.scrollbar.hasDragged;h.render(0,0,c,d);(a.options.scrollbar.liveRedraw||
"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType)&&setTimeout(function(){h.onMouseUp(b)})}));h.addBaseSeriesEvents();h.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],c=this.xAxis,d=c.options,e=b.options,f;a&&null===b.dataMin||(f={dataMin:H(d&&d.min,I("min",e.min,b.dataMin,c.dataMin,c.min)),dataMax:H(d&&d.max,I("max",e.max,b.dataMax,c.dataMax,c.max))});return f},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,f=e.chart,m=e.baseSeries,p,n,u=e.navigatorOptions.series,r,q={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,m)?(c&&(l(c,"updatedData",e.updatedDataHandler),delete c.navigatorSeries),b.chart&&b.destroy(),!1):!0});m&&m.length&&y(m,function(a){var b=a.navigatorSeries,g=d({color:a.color,visible:a.visible},k(u)?h.navigator.series:u);b&&!1===e.navigatorOptions.adaptToUpdatedData||(q.name="Navigator "+m.length,p=a.options||{},r=p.navigatorOptions||{},n=t(p,q,g,r),g=r.data||g.data,e.hasNavigatorData=e.hasNavigatorData||!!g,n.data=g||p.data&&
p.data.slice(0),b&&b.options?b.update(n,c):(a.navigatorSeries=f.initSeries(n),a.navigatorSeries.baseSeries=a,v.push(a.navigatorSeries)))});if(u.data&&(!m||!m.length)||k(u))e.hasNavigatorData=!1,u=a.splat(u),y(u,function(a,b){q.name="Navigator "+(v.length+1);n=t(h.navigator.series,{color:f.series[b]&&!f.series[b].options.isInternal&&f.series[b].color||f.options.colors[b]||f.options.colors[0]},q,a);n.data=a.data;n.data&&(e.hasNavigatorData=!0,v.push(f.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&&(x(a.series,this.navigatorSeries),
f(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},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,f=a.stickToMax,l=H(this.options.overscroll,0),h,k,m=a.series&&a.series[0],r=!!this.setExtremes;
this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(e&&(k=c,h=k+b),f&&(h=d+l,e||(k=Math.max(h-b,m&&m.xData?m.xData[0]:-Number.MAX_VALUE))),r&&(e||f)&&n(k)&&(this.min=this.userMin=k,this.max=this.userMax=h));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries;a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=n(this.xAxis.min)&&this.xAxis.min<=this.xData[0]&&(!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&&(x(this.chart.xAxis,this.xAxis),x(this.chart.axes,this.xAxis));this.yAxis&&(x(this.chart.yAxis,this.yAxis),x(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){w(a)},this)}};a.Navigator=C;m(E.prototype,"zoom",function(a,b,c){var d=this.chart,g=d.options,h=g.chart.zoomType,l=g.chart.pinchType,k=g.navigator,g=g.rangeSelector,m;this.isXAxis&&(k&&k.enabled||g&&g.enabled)&&(!e&&"x"===h||e&&"x"===l?d.resetZoomButton="blocked":"y"===h?m=!1:(!e&&"xy"===h||e&&"xy"===l)&&this.options.range&&(d=this.previousZoom,f(b)?this.previousZoom=[this.min,this.max]:d&&(b=
d[0],c=d[1],delete this.previousZoom)));return void 0!==m?m:a.call(this,b,c)});D(q,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new C(this)});D(q,"afterSetChartSize",function(){var a=this.legend,b=this.navigator,c,d,e,f;b&&(d=a&&a.options,e=b.xAxis,f=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+H(d.margin,10):0)),e&&f&&(this.inverted?e.options.left=f.options.left=b.left:e.options.top=f.options.top=b.top,e.setAxisSize(),f.setAxisSize()))});D(q,"update",function(a){var b=a.options.navigator||{},c=a.options.scrollbar||{};this.navigator||this.scroller||!b.enabled&&!c.enabled||(t(!0,this.options.navigator,
b),t(!0,this.options.scrollbar,c),delete a.options.navigator,delete a.options.scrollbar)});D(q,"afterUpdate",function(){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new C(this))});m(J.prototype,"addPoint",function(a,c,d,e,f){var g=this.options.turboThreshold;g&&this.xData.length>g&&b(c,!0)&&this.chart.navigator&&v(20,!0);a.call(this,c,d,e,f)});D(q,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,
!1)});D(J,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)});q.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,E=a.Axis,q=a.Chart,h=a.css,f=a.createElement,w=a.defaultOptions,y=a.defined,x=a.destroyObjectProperties,v=a.discardElement,d=a.each,c=a.extend,r=a.fireEvent,k=a.isNumber,n=a.merge,b=a.pick,
e=a.pInt,t=a.splat,H=a.wrap;c(w,{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}}});w.lang=n(w.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});C.prototype={clickButton:function(a,c){var e=this,f=e.chart,h=e.buttonOptions[a],l=f.xAxis[0],n=f.scroller&&f.scroller.getUnionExtremes()||l||{},u=n.dataMin,r=n.dataMax,g,q=l&&Math.round(Math.min(l.max,
b(r,l.max))),v=h.type,p,n=h._range,w,x,y,G=h.dataGrouping;if(null!==u&&null!==r){f.fixedRange=n;G&&(this.forcedDataGrouping=!0,E.prototype.setDataGrouping.call(l||{chart:this.chart},G,!1),this.frozenStates=h.preserveDataGrouping);if("month"===v||"year"===v)l?(v={range:h,max:q,chart:f,dataMin:u,dataMax:r},g=l.minFromRange.call(v),k(v.newMax)&&(q=v.newMax)):n=h;else if(n)g=Math.max(q-n,u),q=Math.min(g+n,r);else if("ytd"===v)if(l)void 0===r&&(u=Number.MAX_VALUE,r=Number.MIN_VALUE,d(f.series,function(a){a=
a.xData;u=Math.min(a[0],u);r=Math.max(a[a.length-1],r)}),c=!1),q=e.getYTDExtremes(r,u,f.time.useUTC),g=w=q.min,q=q.max;else{D(f,"beforeRender",function(){e.clickButton(a)});return}else"all"===v&&l&&(g=u,q=r);g+=h._offsetMin;q+=h._offsetMax;e.setSelected(a);l?l.setExtremes(g,q,b(c,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:h}):(p=t(f.options.xAxis)[0],y=p.range,p.range=n,x=p.min,p.min=w,D(f,"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,e=c.buttons||[].concat(b.defaultButtons),f=c.selected,h=function(){var a=b.minInput,c=b.maxInput;a&&a.blur&&r(a,"blur");c&&c.blur&&r(c,"blur")};b.chart=a;b.options=c;b.buttons=[];a.extraTopMargin=c.height;b.buttonOptions=e;this.unMouseDown=D(a.container,
"mousedown",h);this.unResize=D(a,"resize",h);d(e,b.computeButtonRange);void 0!==f&&e[f]&&this.clickButton(f,!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],e=Math.round(c.max-c.min),f=!c.hasVisibleSeries,h=b.scroller&&b.scroller.getUnionExtremes()||
c,n=h.dataMin,r=h.dataMax,b=a.getYTDExtremes(r,n,b.time.useUTC),q=b.min,g=b.max,t=a.selected,v=k(t),p=a.options.allButtonsEnabled,w=a.buttons;d(a.buttonOptions,function(b,d){var h=b._range,l=b.type,k=b.count||1,m=w[d],u=0;b=b._offsetMax-b._offsetMin;d=d===t;var x=h>r-n,z=h<c.minRange,A=!1,y=!1,h=h===e;("month"===l||"year"===l)&&e+36E5>=864E5*{month:28,year:365}[l]*k-b&&e-36E5<=864E5*{month:31,year:366}[l]*k+b?h=!0:"ytd"===l?(h=g-q+b===e,A=!d):"all"===l&&(h=c.max-c.min>=r-n,y=!d&&v&&h);l=!p&&(x||z||
y||f);k=d&&h||h&&!v&&!A||d&&a.frozenStates;l?u=3:k&&(v=!0,u=2);m.state!==u&&m.setState(u)})},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"];h(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){h(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},
drawInput:function(a){function b(){var a=q.value,b=(l.inputDateParser||Date.parse)(a),f=d.xAxis[0],g=d.scroller&&d.scroller.xAxis?d.scroller.xAxis:f,h=g.dataMin,g=g.dataMax;b!==q.previousValue&&(q.previousValue=b,k(b)||(b=a.split("-"),b=Date.UTC(e(b[0]),e(b[1])-1,e(b[2]))),k(b)&&(d.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),r?b>c.maxInput.HCTime?b=void 0:b<h&&(b=h):b<c.minInput.HCTime?b=void 0:b>g&&(b=g),void 0!==b&&f.setExtremes(r?b:f.min,r?f.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}
var c=this,d=c.chart,h=d.renderer,l=d.options.rangeSelector,n=c.div,r="min"===a,q,g,t=this.inputGroup;this[a+"Label"]=g=h.label(w.lang[r?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(t);t.offset+=g.width+5;this[a+"DateBox"]=h=h.label("",t.offset).addClass("highcharts-range-input").attr({padding:2,width:l.inputBoxWidth||90,height:l.inputBoxHeight||17,"text-align":"center"}).on("click",function(){c.showInput(a);c[a+"Input"].focus()}).add(t);
t.offset+=h.width+(r?10:0);this[a+"Input"]=q=f("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:d.plotTop+"px"},n);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),f=d.get("FullYear",e);c=c?d.Date.UTC(f,0,1):+new d.Date(f,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 e=this,h=e.chart,l=h.renderer,k=h.container,n=h.options,r=n.exporting&&!1!==n.exporting.enabled&&n.navigation&&n.navigation.buttonOptions,q=w.lang,g=e.div,t=n.rangeSelector,v=b(n.chart.style&&n.chart.style.zIndex,0)+1,n=t.floating,p=e.buttons,g=e.inputGroup,x=t.buttonTheme,y=t.buttonPosition,C=t.inputPosition,D=t.inputEnabled,
G=x&&x.states,E=h.plotLeft,H,K=e.buttonGroup,Y;Y=e.rendered;var Z=e.options.verticalAlign,ca=h.legend,da=ca&&ca.options,T=y.y,aa=C.y,R=Y||!1,ba=R?"animate":"attr",W=0,V=0,U;if(!1!==t.enabled){Y||(e.group=Y=l.g("range-selector-group").attr({zIndex:7}).add(),e.buttonGroup=K=l.g("range-selector-buttons").add(Y),e.zoomText=l.text(q.rangeSelectorZoom,0,15).css(t.labelStyle).add(K),d(e.buttonOptions,function(a,b){p[b]=l.button(a.text,0,0,function(){var c=a.events&&a.events.click,d;c&&(d=c.call(a));!1!==
d&&e.clickButton(b);e.isActive=!0},x,G&&G.hover,G&&G.select,G&&G.disabled).attr({"text-align":"center"}).add(K)}),!1!==D&&(e.div=g=f("div",null,{position:"relative",height:0,zIndex:v}),k.parentNode.insertBefore(g,k),e.inputGroup=g=l.g("input-group").add(Y),g.offset=0,e.drawInput("min"),e.drawInput("max")));e.zoomText[ba]({x:b(E+y.x,E)});H=b(E+y.x,E)+e.zoomText.getBBox().width+5;d(e.buttonOptions,function(a,c){p[c][ba]({x:H});H+=p[c].width+b(t.buttonSpacing,5)});E=h.plotLeft-h.spacing[3];e.updateButtonStates();
r&&this.titleCollision(h)&&"top"===Z&&"right"===y.align&&y.y+K.getBBox().height-12<(r.y||0)+r.height&&(W=-40);"left"===y.align?U=y.x-h.spacing[3]:"right"===y.align&&(U=y.x+W-h.spacing[1]);K.align({y:y.y,width:K.getBBox().width,align:y.align,x:U},!0,h.spacingBox);e.group.placed=R;e.buttonGroup.placed=R;!1!==D&&(W=r&&this.titleCollision(h)&&"top"===Z&&"right"===C.align&&C.y-g.getBBox().height-12<(r.y||0)+r.height+h.spacing[0]?-40:0,"left"===C.align?U=E:"right"===C.align&&(U=-Math.max(h.axisOffset[1],
-W)),g.align({y:C.y,width:g.getBBox().width,align:C.align,x:C.x+U-2},!0,h.spacingBox),k=g.alignAttr.translateX+g.alignOptions.x-W+g.getBBox().x+2,r=g.alignOptions.width,q=K.alignAttr.translateX+K.getBBox().x,U=K.getBBox().width+20,(C.align===y.align||q+U>k&&k+r>q&&T<aa+g.getBBox().height)&&g.attr({translateX:g.alignAttr.translateX+(h.axisOffset[1]>=-W?0:-W),translateY:g.alignAttr.translateY+K.getBBox().height+10}),e.setInputValue("min",a),e.setInputValue("max",c),e.inputGroup.placed=R);e.group.align({verticalAlign:Z},
!0,h.spacingBox);a=e.group.getBBox().height+20;c=e.group.alignAttr.translateY;"bottom"===Z&&(ca=da&&"bottom"===da.verticalAlign&&da.enabled&&!da.floating?ca.legendHeight+b(da.margin,10):0,a=a+ca-20,V=c-a-(n?0:t.y)-10);if("top"===Z)n&&(V=0),h.titleOffset&&(V=h.titleOffset+h.options.title.margin),V+=h.margin[0]-h.spacing[0]||0;else if("middle"===Z)if(aa===T)V=0>aa?c+void 0:c;else if(aa||T)V=0>aa||0>T?V-Math.min(aa,T):c-a+NaN;e.group.translate(t.x,t.y+Math.floor(V));!1!==D&&(e.minInput.style.marginTop=
e.group.translateY+"px",e.maxInput.style.marginTop=e.group.translateY+"px");e.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;n(!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();x(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&&v(this[c]));a!==C.prototype[c]&&(b[c]=null)},this)}};E.prototype.toFixedRange=function(a,c,d,e){var f=this.chart&&this.chart.fixedRange;a=b(d,this.translate(a,!0,!this.horiz));c=b(e,this.translate(c,!0,!this.horiz));d=f&&(c-a)/f;.7<d&&1.3>d&&(e?a=c-f:c=a+f);k(a)&&k(c)||
(a=c=void 0);return{min:a,max:c}};E.prototype.minFromRange=function(){var a=this.range,c={month:"Month",year:"FullYear"}[a.type],d,e=this.max,f,h,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};k(a)?(d=e-a,h=a):(d=e+n(e,-a.count),this.chart&&(this.chart.fixedRange=e-d));f=b(this.dataMin,Number.MIN_VALUE);k(d)||(d=f);d<=f&&(d=f,void 0===h&&(h=n(d,a.count)),this.newMax=Math.min(d+h,this.dataMax));k(e)||(d=void 0);return d};D(q,"afterGetContainer",
function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new C(this))});H(q.prototype,"render",function(a,b,c){var e=this.axes,f=this.rangeSelector;f&&(d(e,function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),f.render(),e=f.options.verticalAlign,f.options.floating||("bottom"===e?this.extraBottomMargin=!0:"middle"!==e&&(this.extraTopMargin=!0)));a.call(this,b,c)});D(q,"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)});H(q.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(q,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))});q.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();k(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector,e,f;d&&(f=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(),f())})});a.RangeSelector=C})(K);(function(a){var C=a.addEvent,D=a.arrayMax,E=a.arrayMin,q=a.Axis,h=a.Chart,f=a.defined,w=a.each,y=a.format,x=a.grep,v=a.inArray,d=a.isNumber,c=a.isString,r=a.map,k=a.merge,n=a.pick,b=a.Point,e=a.Series,t=a.splat,H=a.SVGRenderer,l=a.wrap,G=e.prototype,J=G.init,A=G.processData,m=b.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(b,d,e){var f=c(b)||b.nodeName,g=arguments[f?1:0],l=g.series,m=a.getOptions(),p,q=n(g.navigator&&g.navigator.enabled,
m.navigator.enabled,!0),u=q?{startOnTick:!1,endOnTick:!1}:null,v={marker:{enabled:!1,radius:2}},w={shadow:!1,borderWidth:0};g.xAxis=r(t(g.xAxis||{}),function(a,b){return k({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},m.xAxis,m.xAxis&&m.xAxis[b],a,{type:"datetime",categories:null},u)});g.yAxis=r(t(g.yAxis||{}),function(a,b){p=n(a.opposite,!0);return k({labels:{y:-2},opposite:p,showLastLabel:!(!a.categories&&"category"!==a.type),
title:{text:null}},m.yAxis,m.yAxis&&m.yAxis[b],a)});g.series=null;g=k({chart:{panning:!0,pinchType:"x"},navigator:{enabled:q},scrollbar:{enabled:n(m.scrollbar.enabled,!0)},rangeSelector:{enabled:n(m.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:n(m.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}},g,{isStock:!0});g.series=l;return f?new h(b,g,e):new h(g,d)};
l(q.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(q,"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]});
l(q.prototype,"getPlotLinePath",function(b,e,h,k,g,l){var m=this,p=this.isLinked&&!this.series?this.linkedParent.series:this.series,q=m.chart,t=q.renderer,u=m.left,x=m.top,z,y,A,B,C=[],D=[],F,I;if("xAxis"!==m.coll&&"yAxis"!==m.coll)return b.apply(this,[].slice.call(arguments,1));D=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=m.options[b];return d(a)?[q[b][a]]:c(a)?[q.get(a)]:r(p,function(a){return a[b]})}(m.coll);w(m.isXAxis?q.yAxis:q.xAxis,function(a){if(f(a.options.id)?-1===a.options.id.indexOf("navigator"):
1){var b=a.isXAxis?"yAxis":"xAxis",b=f(a.options[b])?q[b][a.options[b]]:q[b][0];m===b&&D.push(a)}});F=D.length?[]:[m.isXAxis?q.yAxis[0]:q.xAxis[0]];w(D,function(b){-1!==v(b,F)||a.find(F,function(a){return a.pos===b.pos&&a.len===b.len})||F.push(b)});I=n(l,m.translate(e,null,null,k));d(I)&&(m.horiz?w(F,function(a){var b;y=a.pos;B=y+a.len;z=A=Math.round(I+m.transB);if(z<u||z>u+m.width)g?z=A=Math.min(Math.max(u,z),u+m.width):b=!0;b||C.push("M",z,y,"L",A,B)}):w(F,function(a){var b;z=a.pos;A=z+a.len;y=
B=Math.round(x+m.height-I);if(y<x||y>x+m.height)g?y=B=Math.min(Math.max(x,y),m.top+m.height):b=!0;b||C.push("M",z,y,"L",A,B)}));return 0<C.length?t.crispPolyLine(C,h||1):null});H.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};l(q.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});C(q,"afterDrawCrosshair",
function(a){var b,c;if(f(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){var d=this.chart,e=this.options.crosshair.label,h=this.horiz;b=this.opposite;c=this.left;var k=this.top,l=this.crossLabel,m=e.format,q="",r="inside"===this.options.tickPosition,t=!1!==this.crosshair.snap,v=0,w=a.e||this.cross&&this.cross.e,x=a.point;a=this.lin2log;var z,A;this.isLog?(z=a(this.min),A=a(this.max)):(z=this.min,A=this.max);a=h?"center":b?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?
"left":"center";l||(l=this.crossLabel=d.renderer.label(null,null,null,e.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:e.align||a,padding:n(e.padding,8),r:n(e.borderRadius,3),zIndex:2}).add(this.labelGroup));h?(a=t?x.plotX+c:w.chartX,k+=b?0:this.height):(a=b?this.width+c:0,k=t?x.plotY+k:w.chartY);m||e.formatter||(this.isDatetimeAxis&&(q="%b %d, %Y"),m="{value"+(q?":"+q:"")+"}");q=t?x[this.isXAxis?"x":"y"]:this.toValue(h?
w.chartX:w.chartY);l.attr({text:m?y(m,{value:q},d.time):e.formatter.call(this,q),x:a,y:k,visibility:q<z||q>A?"hidden":"visible"});e=l.getBBox();if(h){if(r&&!b||!r&&b)k=l.y-e.height}else k=l.y-e.height/2;h?(b=c-e.x,c=c+this.width-e.x):(b="left"===this.labelAlign?c:0,c="right"===this.labelAlign?c+this.width:d.chartWidth);l.translateX<b&&(v=b-l.translateX);l.translateX+e.width>=c&&(v=-(l.translateX+e.width-c));l.attr({x:a+v,y:k,anchorX:h?a:this.opposite?0:d.chartWidth,anchorY:h?this.opposite?d.chartHeight:
0:k+e.height/2})}});G.init=function(){J.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,e,f=!0===this.options.compareStart?0:1,h,k;A.apply(this,arguments);
if(this.xAxis&&this.processedYData)for(c=this.processedXData,e=this.processedYData,h=e.length,this.pointArrayMap&&(b=v("close",this.pointArrayMap),-1===b&&(b=v(this.pointValKey||"y",this.pointArrayMap))),a=0;a<h-f;a++)if(k=e[a]&&-1<b?e[a][b]:e[a],d(k)&&c[a+f]>=this.xAxis.min&&0!==k){this.compareValue=k;break}};l(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=E(b),this.dataMax=
D(b))});q.prototype.setCompare=function(a,b){this.isXAxis||(w(this.series,function(b){b.setCompare(a)}),n(b,!0)&&this.chart.redraw())};b.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0<this.change?"+":"")+a.numberFormat(this.change,n(this.series.tooltipOptions.changeDecimals,2)));return m.apply(this,[b])};l(e.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=k(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)});l(h.prototype,"getSelectedPoints",function(a){var b=a.call(this);w(this.series,function(a){a.hasGroupedData&&(b=b.concat(x(a.points||[],function(a){return a.selected})))});return b});C(h,
"update",function(a){a=a.options;"scrollbar"in a&&this.navigator&&(k(!0,this.options.scrollbar,a.scrollbar),this.navigator.update({},!1),delete a.scrollbar)})})(K);return K});
//# sourceMappingURL=highstock.js.map
