/*
 Highstock JS v5.0.0 (2016-09-29)

 (c) 2009-2016 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(J,a){"object"===typeof module&&module.exports?module.exports=J.document?a(J):a:J.Highcharts=a(J)})("undefined"!==typeof window?window:this,function(J){J=function(){var a=window,B=a.document,D=a.navigator&&a.navigator.userAgent||"",F=B&&B.createElementNS&&!!B.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,H=/(edge|msie|trident)/i.test(D)&&!window.opera,t=!F,f=/Firefox/.test(D),l=f&&4>parseInt(D.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock",
version:"5.0.0",deg2rad:2*Math.PI/360,doc:B,hasBidiBug:l,isMS:H,isWebKit:/AppleWebKit/.test(D),isFirefox:f,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(D),SVG_NS:"http://www.w3.org/2000/svg",idCounter:0,chartCount:0,seriesTypes:{},svg:F,vml:t,win:a,charts:[],marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){}}}();(function(a){var B=[],D=a.charts,F=a.doc,H=a.win;a.error=function(a,f){var l="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(f)throw Error(l);
H.console&&console.log(l)};a.Fx=function(a,f,l){this.options=f;this.elem=a;this.prop=l};a.Fx.prototype={dSetter:function(){var a=this.paths[0],f=this.paths[1],l=[],g=this.now,p=a.length,q;if(1===g)l=this.toD;else if(p===f.length&&1>g)for(;p--;)q=parseFloat(a[p]),l[p]=isNaN(q)?a[p]:g*parseFloat(f[p]-q)+q;else l=f;this.elem.attr("d",l)},update:function(){var a=this.elem,f=this.prop,l=this.now,g=this.options.step;if(this[f+"Setter"])this[f+"Setter"]();else a.attr?a.element&&a.attr(f,l):a.style[f]=l+
this.unit;g&&g.call(a,l,this)},run:function(a,f,l){var g=this,p=function(a){return p.stopped?!1:g.step(a)},q;this.startTime=+new Date;this.start=a;this.end=f;this.unit=l;this.now=this.start;this.pos=0;p.elem=this.elem;p()&&1===B.push(p)&&(p.timerId=setInterval(function(){for(q=0;q<B.length;q++)B[q]()||B.splice(q--,1);B.length||clearInterval(p.timerId)},13))},step:function(a){var f=+new Date,l,g=this.options;l=this.elem;var p=g.complete,q=g.duration,h=g.curAnim,c;if(l.attr&&!l.element)l=!1;else if(a||
f>=q+this.startTime){this.now=this.end;this.pos=1;this.update();a=h[this.prop]=!0;for(c in h)!0!==h[c]&&(a=!1);a&&p&&p.call(l);l=!1}else this.pos=g.easing((f-this.startTime)/q),this.now=this.start+(this.end-this.start)*this.pos,this.update(),l=!0;return l},initPath:function(t,f,l){function g(a){for(e=a.length;e--;)"M"!==a[e]&&"L"!==a[e]||a.splice(e+1,0,a[e+1],a[e+2],a[e+1],a[e+2])}function p(a,c){for(;a.length<d;){a[0]=c[d-a.length];var k=a.slice(0,z);[].splice.apply(a,[0,0].concat(k));b&&(k=a.slice(a.length-
z),[].splice.apply(a,[a.length,0].concat(k)),e--)}a[0]="M"}function q(a,e){for(var c=(d-a.length)/z;0<c&&c--;)k=a.slice().splice(a.length/n-z,z*n),k[0]=e[d-z-c*z],v&&(k[z-6]=k[z-2],k[z-5]=k[z-1]),[].splice.apply(a,[a.length/n,0].concat(k)),b&&c--}f=f||"";var h,c=t.startX,m=t.endX,v=-1<f.indexOf("C"),z=v?7:3,d,k,e;f=f.split(" ");l=l.slice();var b=t.isArea,n=b?2:1,G;v&&(g(f),g(l));if(c&&m){for(e=0;e<c.length;e++)if(c[e]===m[0]){h=e;break}else if(c[0]===m[m.length-c.length+e]){h=e;G=!0;break}void 0===
h&&(f=[])}f.length&&a.isNumber(h)&&(d=l.length+h*n*z,G?(p(f,l),q(l,f)):(p(l,f),q(f,l)));return[f,l]}};a.extend=function(a,f){var l;a||(a={});for(l in f)a[l]=f[l];return a};a.merge=function(){var t,f=arguments,l,g={},p=function(q,h){var c,m;"object"!==typeof q&&(q={});for(m in h)h.hasOwnProperty(m)&&(c=h[m],a.isObject(c,!0)&&"renderTo"!==m&&"number"!==typeof c.nodeType?q[m]=p(q[m]||{},c):q[m]=h[m]);return q};!0===f[0]&&(g=f[1],f=Array.prototype.slice.call(f,2));l=f.length;for(t=0;t<l;t++)g=p(g,f[t]);
return g};a.pInt=function(a,f){return parseInt(a,f||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(t,f){return t&&"object"===typeof t&&(!f||!a.isArray(t))};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=function(a,f){for(var l=a.length;l--;)if(a[l]===f){a.splice(l,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=
function(t,f,l){var g,p;if(a.isString(f))a.defined(l)?t.setAttribute(f,l):t&&t.getAttribute&&(p=t.getAttribute(f));else if(a.defined(f)&&a.isObject(f))for(g in f)t.setAttribute(g,f[g]);return p};a.splat=function(t){return a.isArray(t)?t:[t]};a.syncTimeout=function(a,f,l){if(f)return setTimeout(a,f,l);a.call(0,l)};a.pick=function(){var a=arguments,f,l,g=a.length;for(f=0;f<g;f++)if(l=a[f],void 0!==l&&null!==l)return l};a.css=function(t,f){a.isMS&&!a.svg&&f&&void 0!==f.opacity&&(f.filter="alpha(opacity="+
100*f.opacity+")");a.extend(t.style,f)};a.createElement=function(t,f,l,g,p){t=F.createElement(t);var q=a.css;f&&a.extend(t,f);p&&q(t,{padding:0,border:"none",margin:0});l&&q(t,l);g&&g.appendChild(t);return t};a.extendClass=function(t,f){var l=function(){};l.prototype=new t;a.extend(l.prototype,f);return l};a.pad=function(a,f,l){return Array((f||2)+1-String(a).length).join(l||0)+a};a.relativeLength=function(a,f){return/%$/.test(a)?f*parseFloat(a)/100:parseFloat(a)};a.wrap=function(a,f,l){var g=a[f];
a[f]=function(){var a=Array.prototype.slice.call(arguments);a.unshift(g);return l.apply(this,a)}};a.getTZOffset=function(t){var f=a.Date;return 6E4*(f.hcGetTimezoneOffset&&f.hcGetTimezoneOffset(t)||f.hcTimezoneOffset||0)};a.dateFormat=function(t,f,l){if(!a.defined(f)||isNaN(f))return a.defaultOptions.lang.invalidDate||"";t=a.pick(t,"%Y-%m-%d %H:%M:%S");var g=a.Date,p=new g(f-a.getTZOffset(f)),q,h=p[g.hcGetHours](),c=p[g.hcGetDay](),m=p[g.hcGetDate](),v=p[g.hcGetMonth](),z=p[g.hcGetFullYear](),d=a.defaultOptions.lang,
k=d.weekdays,e=d.shortWeekdays,b=a.pad,g=a.extend({a:e?e[c]:k[c].substr(0,3),A:k[c],d:b(m),e:b(m,2," "),w:c,b:d.shortMonths[v],B:d.months[v],m:b(v+1),y:z.toString().substr(2,2),Y:z,H:b(h),k:h,I:b(h%12||12),l:h%12||12,M:b(p[g.hcGetMinutes]()),p:12>h?"AM":"PM",P:12>h?"am":"pm",S:b(p.getSeconds()),L:b(Math.round(f%1E3),3)},a.dateFormats);for(q in g)for(;-1!==t.indexOf("%"+q);)t=t.replace("%"+q,"function"===typeof g[q]?g[q](f):g[q]);return l?t.substr(0,1).toUpperCase()+t.substr(1):t};a.formatSingle=function(t,
f){var l=/\.([0-9])/,g=a.defaultOptions.lang;/f$/.test(t)?(l=(l=t.match(l))?l[1]:-1,null!==f&&(f=a.numberFormat(f,l,g.decimalPoint,-1<t.indexOf(",")?g.thousandsSep:""))):f=a.dateFormat(t,f);return f};a.format=function(t,f){for(var l="{",g=!1,p,q,h,c,m=[],v;t;){l=t.indexOf(l);if(-1===l)break;p=t.slice(0,l);if(g){p=p.split(":");q=p.shift().split(".");c=q.length;v=f;for(h=0;h<c;h++)v=v[q[h]];p.length&&(v=a.formatSingle(p.join(":"),v));m.push(v)}else m.push(p);t=t.slice(l+1);l=(g=!g)?"}":"{"}m.push(t);
return m.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(t,f,l,g,p){var q,h=t;l=a.pick(l,1);q=t/l;f||(f=[1,2,2.5,5,10],!1===g&&(1===l?f=[1,2,5,10]:.1>=l&&(f=[1/l])));for(g=0;g<f.length&&!(h=f[g],p&&h*l>=t||!p&&q<=(f[g]+(f[g+1]||f[g]))/2);g++);return h*l};a.stableSort=function(a,f){var l=a.length,g,p;for(p=0;p<l;p++)a[p].safeI=p;a.sort(function(a,h){g=f(a,h);return 0===g?a.safeI-h.safeI:g});for(p=0;p<l;p++)delete a[p].safeI};
a.arrayMin=function(a){for(var f=a.length,l=a[0];f--;)a[f]<l&&(l=a[f]);return l};a.arrayMax=function(a){for(var f=a.length,l=a[0];f--;)a[f]>l&&(l=a[f]);return l};a.destroyObjectProperties=function(a,f){for(var l in a)a[l]&&a[l]!==f&&a[l].destroy&&a[l].destroy(),delete a[l]};a.discardElement=function(t){var f=a.garbageBin;f||(f=a.createElement("div"));t&&f.appendChild(t);f.innerHTML=""};a.correctFloat=function(a,f){return parseFloat(a.toPrecision(f||14))};a.setAnimation=function(t,f){f.renderer.globalAnimation=
a.pick(t,f.options.chart.animation,!0)};a.animObject=function(t){return a.isObject(t)?a.merge(t):{duration:t?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(t,f,l,g){t=+t||0;f=+f;var p=a.defaultOptions.lang,q=(t.toString().split(".")[1]||"").length,h,c,m=Math.abs(t);-1===f?f=Math.min(q,20):a.isNumber(f)||(f=2);h=String(a.pInt(m.toFixed(f)));c=3<h.length?h.length%3:0;l=a.pick(l,p.decimalPoint);g=a.pick(g,
p.thousandsSep);t=(0>t?"-":"")+(c?h.substr(0,c)+g:"");t+=h.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+g);f&&(g=Math.abs(m-h+Math.pow(10,-Math.max(f,q)-1)),t+=l+g.toFixed(f).slice(2));return t};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(t,f){var l;return"width"===f?Math.min(t.offsetWidth,t.scrollWidth)-a.getStyle(t,"padding-left")-a.getStyle(t,"padding-right"):"height"===f?Math.min(t.offsetHeight,t.scrollHeight)-a.getStyle(t,"padding-top")-a.getStyle(t,"padding-bottom"):
(l=H.getComputedStyle(t,void 0))&&a.pInt(l.getPropertyValue(f))};a.inArray=function(a,f){return f.indexOf?f.indexOf(a):[].indexOf.call(f,a)};a.grep=function(a,f){return[].filter.call(a,f)};a.map=function(a,f){for(var l=[],g=0,p=a.length;g<p;g++)l[g]=f.call(a[g],a[g],g,a);return l};a.offset=function(a){var f=F.documentElement;a=a.getBoundingClientRect();return{top:a.top+(H.pageYOffset||f.scrollTop)-(f.clientTop||0),left:a.left+(H.pageXOffset||f.scrollLeft)-(f.clientLeft||0)}};a.stop=function(a){for(var f=
B.length;f--;)B[f].elem===a&&(B[f].stopped=!0)};a.each=function(a,f,l){return Array.prototype.forEach.call(a,f,l)};a.addEvent=function(a,f,l){function g(g){g.target=g.srcElement||H;l.call(a,g)}var p=a.hcEvents=a.hcEvents||{};a.addEventListener?a.addEventListener(f,l,!1):a.attachEvent&&(a.hcEventsIE||(a.hcEventsIE={}),a.hcEventsIE[l.toString()]=g,a.attachEvent("on"+f,g));p[f]||(p[f]=[]);p[f].push(l)};a.removeEvent=function(t,f,l){function g(a,c){t.removeEventListener?t.removeEventListener(a,c,!1):
t.attachEvent&&(c=t.hcEventsIE[c.toString()],t.detachEvent("on"+a,c))}function p(){var a,c;if(t.nodeName)for(c in f?(a={},a[f]=!0):a=h,a)if(h[c])for(a=h[c].length;a--;)g(c,h[c][a])}var q,h=t.hcEvents,c;h&&(f?(q=h[f]||[],l?(c=a.inArray(l,q),-1<c&&(q.splice(c,1),h[f]=q),g(f,l)):(p(),h[f]=[])):(p(),t.hcEvents={}))};a.fireEvent=function(t,f,l,g){var p;p=t.hcEvents;var q,h;l=l||{};if(F.createEvent&&(t.dispatchEvent||t.fireEvent))p=F.createEvent("Events"),p.initEvent(f,!0,!0),a.extend(p,l),t.dispatchEvent?
t.dispatchEvent(p):t.fireEvent(f,p);else if(p)for(p=p[f]||[],q=p.length,l.target||a.extend(l,{preventDefault:function(){l.defaultPrevented=!0},target:t,type:f}),f=0;f<q;f++)(h=p[f])&&!1===h.call(t,l)&&l.preventDefault();g&&!l.defaultPrevented&&g(l)};a.animate=function(t,f,l){var g,p="",q,h,c;a.isObject(l)||(g=arguments,l={duration:g[2],easing:g[3],complete:g[4]});a.isNumber(l.duration)||(l.duration=400);l.easing="function"===typeof l.easing?l.easing:Math[l.easing]||Math.easeInOutSine;l.curAnim=a.merge(f);
for(c in f)h=new a.Fx(t,l,c),q=null,"d"===c?(h.paths=h.initPath(t,t.d,f.d),h.toD=f.d,g=0,q=1):t.attr?g=t.attr(c):(g=parseFloat(a.getStyle(t,c))||0,"opacity"!==c&&(p="px")),q||(q=f[c]),q.match&&q.match("px")&&(q=q.replace(/px/g,"")),h.run(g,q,p)};a.seriesType=function(t,f,l,g,p){var q=a.getOptions(),h=a.seriesTypes;q.plotOptions[t]=a.merge(q.plotOptions[f],l);h[t]=a.extendClass(h[f]||function(){},g);h[t].prototype.type=t;p&&(h[t].prototype.pointClass=a.extendClass(a.Point,p));return h[t]};H.jQuery&&
(H.jQuery.fn.highcharts=function(){var t=[].slice.call(arguments);if(this[0])return t[0]?(new (a[a.isString(t[0])?t.shift():"Chart"])(this[0],t[0],t[1]),this):D[a.attr(this[0],"data-highcharts-chart")]});F&&!F.defaultView&&(a.getStyle=function(t,f){var l;l={width:"clientWidth",height:"clientHeight"}[f];if(t.style[f])return a.pInt(t.style[f]);"opacity"===f&&(f="filter");if(l)return t.style.zoom=1,Math.max(t[l]-2*a.getStyle(t,"padding"),0);l=t.currentStyle[f.replace(/\-(\w)/g,function(a,f){return f.toUpperCase()})];
"filter"===f&&(l=l.replace(/alpha\(opacity=([0-9]+)\)/,function(a,f){return f/100}));return""===l?1:a.pInt(l)});Array.prototype.forEach||(a.each=function(a,f,l){for(var g=0,p=a.length;g<p;g++)if(!1===f.call(l,a[g],g,a))return g});Array.prototype.indexOf||(a.inArray=function(a,f){var l,g=0;if(f)for(l=f.length;g<l;g++)if(f[g]===a)return g;return-1});Array.prototype.filter||(a.grep=function(a,f){for(var l=[],g=0,p=a.length;g<p;g++)f(a[g],g)&&l.push(a[g]);return l})})(J);(function(a){var B=a.each,D=a.isNumber,
F=a.map,H=a.merge,t=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[t(a[1]),t(a[2]),t(a[3]),parseFloat(a[4],10)]}},{regex:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(a){return[t(a[1],16),t(a[2],16),t(a[3],16),1]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,
parse:function(a){return[t(a[1]),t(a[2]),t(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(f){var l,g,p,q;if((this.input=f=this.names[f]||f)&&f.stops)this.stops=F(f.stops,function(h){return new a.Color(h[1])});else for(p=this.parsers.length;p--&&!g;)q=this.parsers[p],(l=q.regex.exec(f))&&(g=q.parse(l));this.rgba=g||[]},get:function(a){var l=this.input,g=this.rgba,p;this.stops?(p=H(l),p.stops=[].concat(p.stops),B(this.stops,function(g,h){p.stops[h]=[p.stops[h][0],g.get(a)]})):p=g&&
D(g[0])?"rgb"===a||!a&&1===g[3]?"rgb("+g[0]+","+g[1]+","+g[2]+")":"a"===a?g[3]:"rgba("+g.join(",")+")":l;return p},brighten:function(a){var l,g=this.rgba;if(this.stops)B(this.stops,function(g){g.brighten(a)});else if(D(a)&&0!==a)for(l=0;3>l;l++)g[l]+=t(255*a),0>g[l]&&(g[l]=0),255<g[l]&&(g[l]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this}};a.color=function(f){return new a.Color(f)}})(J);(function(a){var B,D,F=a.addEvent,H=a.animate,t=a.attr,f=a.charts,l=a.color,g=a.css,p=a.createElement,
q=a.defined,h=a.deg2rad,c=a.destroyObjectProperties,m=a.doc,v=a.each,z=a.extend,d=a.erase,k=a.grep,e=a.hasTouch,b=a.isArray,n=a.isFirefox,G=a.isMS,E=a.isObject,A=a.isString,u=a.isWebKit,x=a.merge,y=a.noop,r=a.pick,C=a.pInt,K=a.removeEvent,w=a.splat,I=a.stop,N=a.svg,P=a.SVG_NS,L=a.win;B=a.SVGElement=function(){return this};B.prototype={opacity:1,SVG_NS:P,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textDecoration textOverflow textShadow".split(" "),init:function(a,
d){this.element="span"===d?p(d):m.createElementNS(this.SVG_NS,d);this.renderer=a},animate:function(a,d,w){d=r(d,this.renderer.globalAnimation,!0);I(this);d?(w&&(d.complete=w),H(this,a,d)):this.attr(a,null,w);return this},colorGradient:function(O,d,w){var e=this.renderer,c,r,I,k,y,n,u,h,C,m,A,g=[],E;O.linearGradient?r="linearGradient":O.radialGradient&&(r="radialGradient");if(r){I=O[r];y=e.gradients;u=O.stops;m=w.radialReference;b(I)&&(O[r]=I={x1:I[0],y1:I[1],x2:I[2],y2:I[3],gradientUnits:"userSpaceOnUse"});
"radialGradient"===r&&m&&!q(I.gradientUnits)&&(k=I,I=x(I,e.getRadialAttr(m,k),{gradientUnits:"userSpaceOnUse"}));for(A in I)"id"!==A&&g.push(A,I[A]);for(A in u)g.push(u[A]);g=g.join(",");y[g]?m=y[g].attr("id"):(I.id=m="highcharts-"+a.idCounter++,y[g]=n=e.createElement(r).attr(I).add(e.defs),n.radAttr=k,n.stops=[],v(u,function(O){0===O[1].indexOf("rgba")?(c=a.color(O[1]),h=c.get("rgb"),C=c.get("a")):(h=O[1],C=1);O=e.createElement("stop").attr({offset:O[0],"stop-color":h,"stop-opacity":C}).add(n);n.stops.push(O)}));
E="url("+e.url+"#"+m+")";w.setAttribute(d,E);w.gradient=g;O.toString=function(){return E}}},applyTextShadow:function(a){var d=this.element,w,e=-1!==a.indexOf("contrast"),b={},I=this.renderer.forExport,c=this.renderer.forExport||void 0!==d.style.textShadow&&!G;e&&(b.textShadow=a=a.replace(/contrast/g,this.renderer.getContrast(d.style.fill)));if(u||I)b.textRendering="geometricPrecision";c?this.css(b):(this.fakeTS=!0,this.ySetter=this.xSetter,w=[].slice.call(d.getElementsByTagName("tspan")),v(a.split(/\s?,\s?/g),
function(a){var O=d.firstChild,e,b;a=a.split(" ");e=a[a.length-1];(b=a[a.length-2])&&v(w,function(a,w){var I;0===w&&(a.setAttribute("x",d.getAttribute("x")),w=d.getAttribute("y"),a.setAttribute("y",w||0),null===w&&d.setAttribute("y",0));I=a.cloneNode(1);t(I,{"class":"highcharts-text-shadow",fill:e,stroke:e,"stroke-opacity":1/Math.max(C(b),3),"stroke-width":b,"stroke-linejoin":"round"});d.insertBefore(I,O)})}))},attr:function(a,d,w){var e,b=this.element,I,c=this,r;"string"===typeof a&&void 0!==d&&
(e=a,a={},a[e]=d);if("string"===typeof a)c=(this[a+"Getter"]||this._defaultGetter).call(this,a,b);else{for(e in a)d=a[e],r=!1,this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(e)&&(I||(this.symbolAttr(a),I=!0),r=!0),!this.rotation||"x"!==e&&"y"!==e||(this.doTransform=!0),r||(r=this[e+"Setter"]||this._defaultSetter,r.call(this,d,e,b));this.doTransform&&(this.updateTransform(),this.doTransform=!1)}w&&w();return c},addClass:function(a,d){var w=this.attr("class")||"";-1===
w.indexOf(a)&&(d||(a=(w+(w?" ":"")+a).replace("  "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==t(this.element,"class").indexOf(a)},removeClass:function(a){t(this.element,"class",(t(this.element,"class")||"").replace(a,""));return this},symbolAttr:function(a){var d=this;v("x y r start end width height innerR anchorX anchorY".split(" "),function(w){d[w]=r(a[w],d[w])});d.attr({d:d.renderer.symbols[d.symbolName](d.x,d.y,d.width,d.height,d)})},clip:function(a){return this.attr("clip-path",
a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,d){var w,e={},b;d=d||a.strokeWidth||0;b=Math.round(d)%2/2;a.x=Math.floor(a.x||this.x||0)+b;a.y=Math.floor(a.y||this.y||0)+b;a.width=Math.floor((a.width||this.width||0)-2*b);a.height=Math.floor((a.height||this.height||0)-2*b);q(a.strokeWidth)&&(a.strokeWidth=d);for(w in a)this[w]!==a[w]&&(this[w]=e[w]=a[w]);return e},css:function(a){var d=this.styles,w={},e=this.element,b,I,r="";b=!d;a&&a.color&&(a.fill=a.color);if(d)for(I in a)a[I]!==
d[I]&&(w[I]=a[I],b=!0);if(b){b=this.textWidth=a&&a.width&&"text"===e.nodeName.toLowerCase()&&C(a.width)||this.textWidth;d&&(a=z(d,w));this.styles=a;b&&!N&&this.renderer.forExport&&delete a.width;if(G&&!N)g(this.element,a);else{d=function(a,d){return"-"+d.toLowerCase()};for(I in a)r+=I.replace(/([A-Z])/g,d)+":"+a[I]+";";t(e,"style",r)}this.added&&b&&this.renderer.buildText(this)}return this},getStyle:function(a){return L.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){var a=
this.getStyle("stroke-width"),d;a.indexOf("px")===a.length-2?a=C(a):(d=m.createElementNS(P,"rect"),t(d,{width:a,"stroke-width":0}),this.element.parentNode.appendChild(d),a=d.getBBox().width,d.parentNode.removeChild(d));return a},on:function(a,d){var w=this,b=w.element;e&&"click"===a?(b.ontouchstart=function(a){w.touchEventFired=Date.now();a.preventDefault();d.call(b,a)},b.onclick=function(a){(-1===L.navigator.userAgent.indexOf("Android")||1100<Date.now()-(w.touchEventFired||0))&&d.call(b,a)}):b["on"+
a]=d;return this},setRadialReference:function(a){var d=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;d&&d.radAttr&&d.animate(this.renderer.getRadialAttr(a,d.radAttr));return this},translate:function(a,d){return this.attr({translateX:a,translateY:d})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,d=this.translateY||0,w=this.scaleX,e=this.scaleY,b=this.inverted,I=this.rotation,c=this.element;
b&&(a+=this.attr("width"),d+=this.attr("height"));a=["translate("+a+","+d+")"];b?a.push("rotate(90) scale(-1,1)"):I&&a.push("rotate("+I+" "+(c.getAttribute("x")||0)+" "+(c.getAttribute("y")||0)+")");(q(w)||q(e))&&a.push("scale("+r(w,1)+" "+r(e,1)+")");a.length&&c.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,w,e){var b,I,c,k,y={};I=this.renderer;c=I.alignedObjects;var n,u;if(a){if(this.alignOptions=a,this.alignByTranslate=
w,!e||A(e))this.alignTo=b=e||"renderer",d(c,this),c.push(this),e=null}else a=this.alignOptions,w=this.alignByTranslate,b=this.alignTo;e=r(e,I[b],I);b=a.align;I=a.verticalAlign;c=(e.x||0)+(a.x||0);k=(e.y||0)+(a.y||0);"right"===b?n=1:"center"===b&&(n=2);n&&(c+=(e.width-(a.width||0))/n);y[w?"translateX":"x"]=Math.round(c);"bottom"===I?u=1:"middle"===I&&(u=2);u&&(k+=(e.height-(a.height||0))/u);y[w?"translateY":"y"]=Math.round(k);this[this.placed?"animate":"attr"](y);this.placed=!0;this.alignAttr=y;return this},
getBBox:function(a,d){var w,e=this.renderer,b,I,c,k=this.element,y=this.styles,u=this.textStr,C,x=k.style,m,A=e.cache,g=e.cacheKeys,E;I=r(d,this.rotation);c=I*h;b=k&&B.prototype.getStyle.call(k,"font-size");void 0!==u&&(E=u.toString().replace(/[0-9]/g,"0")+["",I||0,b,k.style.width].join());E&&!a&&(w=A[E]);if(!w){if(k.namespaceURI===this.SVG_NS||e.forExport){try{m=this.fakeTS&&function(a){v(k.querySelectorAll(".highcharts-text-shadow"),function(d){d.style.display=a})},n&&x.textShadow?(C=x.textShadow,
x.textShadow=""):m&&m("none"),w=k.getBBox?z({},k.getBBox()):{width:k.offsetWidth,height:k.offsetHeight},C?x.textShadow=C:m&&m("")}catch(q){}if(!w||0>w.width)w={width:0,height:0}}else w=this.htmlGetBBox();e.isSVG&&(e=w.width,b=w.height,G&&y&&"11px"===y.fontSize&&"16.9"===b.toPrecision(3)&&(w.height=b=14),I&&(w.width=Math.abs(b*Math.sin(c))+Math.abs(e*Math.cos(c)),w.height=Math.abs(b*Math.cos(c))+Math.abs(e*Math.sin(c))));if(E&&0<w.height){for(;250<g.length;)delete A[g.shift()];A[E]||g.push(E);A[E]=
w}}return w},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var d=this;d.animate({opacity:0},{duration:a||150,complete:function(){d.attr({y:-9999})}})},add:function(a){var d=this.renderer,w=this.element,e;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&d.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)e=this.zIndexSetter();e||(a?a.element:d.box).appendChild(w);
if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var d=a.parentNode;d&&d.removeChild(a)},destroy:function(){var a=this.element||{},w=this.renderer.isSVG&&"SPAN"===a.nodeName&&this.parentGroup,e,b;a.onclick=a.onmouseout=a.onmouseover=a.onmousemove=a.point=null;I(this);this.clipPath&&(this.clipPath=this.clipPath.destroy());if(this.stops){for(b=0;b<this.stops.length;b++)this.stops[b]=this.stops[b].destroy();this.stops=null}for(this.safeRemoveChild(a);w&&w.div&&0===w.div.childNodes.length;)a=
w.parentGroup,this.safeRemoveChild(w.div),delete w.div,w=a;this.alignTo&&d(this.renderer.alignedObjects,this);for(e in this)delete this[e];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=r(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,d,w){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");
w.setAttribute(d,a);this[d]=a},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},titleSetter:function(a){var d=this.element.getElementsByTagName("title")[0];d||(d=m.createElementNS(this.SVG_NS,"title"),this.element.appendChild(d));d.firstChild&&d.removeChild(d.firstChild);d.appendChild(m.createTextNode(String(r(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},
fillSetter:function(a,d,w){"string"===typeof a?w.setAttribute(d,a):a&&this.colorGradient(a,d,w)},visibilitySetter:function(a,d,w){"inherit"===a?w.removeAttribute(d):w.setAttribute(d,a)},zIndexSetter:function(a,d){var w=this.renderer,e=this.parentGroup,w=(e||w).element||w.box,b,I,c=this.element,r;b=this.added;var k;q(a)&&(c.zIndex=a,a=+a,this[d]===a&&(b=!1),this[d]=a);if(b){(a=this.zIndex)&&e&&(e.handleZ=!0);e=w.childNodes;for(k=0;k<e.length&&!r;k++)b=e[k],I=b.zIndex,b!==c&&(C(I)>a||!q(a)&&q(I))&&
(w.insertBefore(c,b),r=!0);r||w.appendChild(c)}return r},_defaultSetter:function(a,d,w){w.setAttribute(d,a)}};B.prototype.yGetter=B.prototype.xGetter;B.prototype.translateXSetter=B.prototype.translateYSetter=B.prototype.rotationSetter=B.prototype.verticalAlignSetter=B.prototype.scaleXSetter=B.prototype.scaleYSetter=function(a,d){this[d]=a;this.doTransform=!0};B.prototype.opacitySetter=B.prototype.displaySetter=function(a,d,w){this[d]=a;w.setAttribute(d,a)};D=a.SVGRenderer=function(){this.init.apply(this,
arguments)};D.prototype={Element:B,SVG_NS:P,init:function(a,d,w,e,b,I){var c;e=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});c=e.element;a.appendChild(c);-1===a.innerHTML.indexOf("xmlns")&&t(c,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=c;this.boxWrapper=e;this.alignedObjects=[];this.url=(n||u)&&m.getElementsByTagName("base").length?L.location.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(m.createTextNode("Created with Highstock 5.0.0"));
this.defs=this.createElement("defs").add();this.allowHTML=I;this.forExport=b;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(d,w,!1);var r;n&&a.getBoundingClientRect&&(this.subPixelFix=d=function(){g(a,{left:0,top:0});r=a.getBoundingClientRect();g(a,{left:Math.ceil(r.left)-r.left+"px",top:Math.ceil(r.top)-r.top+"px"})},d(),F(L,"resize",d))},definition:function(a){function d(a,b){var I;v(w(a),function(a){var w=e.createElement(a.tagName),c,r={};for(c in a)"tagName"!==
c&&"children"!==c&&"textContent"!==c&&(r[c]=a[c]);w.attr(r);w.add(b||e.defs);a.textContent&&w.element.appendChild(m.createTextNode(a.textContent));d(a.children||[],w);I=w});return I}var e=this;return d(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.subPixelFix&&K(L,"resize",this.subPixelFix);return this.alignedObjects=
null},createElement:function(a){var d=new this.Element;d.init(this,a);return d},draw:y,getRadialAttr:function(a,d){return{cx:a[0]-a[2]/2+d.cx*a[2],cy:a[1]-a[2]/2+d.cy*a[2],r:d.r*a[2]}},buildText:function(a){for(var d=a.element,w=this,e=w.forExport,b=r(a.textStr,"").toString(),I=-1!==b.indexOf("<"),c=d.childNodes,y,n,u,h,x=t(d,"x"),A=a.styles,E=a.textWidth,z=A&&A.lineHeight,q=A&&A.textShadow,G=A&&"ellipsis"===A.textOverflow,K=c.length,f=E&&!a.added&&this.box,l=function(a){return z?C(z):w.fontMetrics(void 0,
a).h};K--;)d.removeChild(c[K]);I||q||G||E||-1!==b.indexOf(" ")?(y=/<.*class="([^"]+)".*>/,n=/<.*style="([^"]+)".*>/,u=/<.*href="(http[^"]+)".*>/,f&&f.appendChild(d),b=I?b.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[b],b=k(b,function(a){return""!==a}),v(b,function(b,I){var c,r=0;b=b.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,
"</span>|||");c=b.split("|||");v(c,function(b){if(""!==b||1===c.length){var k={},C=m.createElementNS(w.SVG_NS,"tspan"),v,z;y.test(b)&&(v=b.match(y)[1],t(C,"class",v));n.test(b)&&(z=b.match(n)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),t(C,"style",z));u.test(b)&&!e&&(t(C,"onclick",'location.href="'+b.match(u)[1]+'"'),g(C,{cursor:"pointer"}));b=(b.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">");if(" "!==b){C.appendChild(m.createTextNode(b));r?k.dx=0:I&&null!==x&&(k.x=x);t(C,
k);d.appendChild(C);!r&&I&&(!N&&e&&g(C,{display:"block"}),t(C,"dy",l(C)));if(E){k=b.replace(/([^\^])-/g,"$1- ").split(" ");v="nowrap"===A.whiteSpace;for(var q=1<c.length||I||1<k.length&&!v,K,f,p=[],L=l(C),S=a.rotation,M=b,Q=M.length;(q||G)&&(k.length||p.length);)a.rotation=0,K=a.getBBox(!0),f=K.width,!N&&w.forExport&&(f=w.measureSpanWidth(C.firstChild.data,a.styles)),K=f>E,void 0===h&&(h=K),G&&h?(Q/=2,""===M||!K&&.5>Q?k=[]:(M=b.substring(0,M.length+(K?-1:1)*Math.ceil(Q)),k=[M+(3<E?"\u2026":"")],C.removeChild(C.firstChild))):
K&&1!==k.length?(C.removeChild(C.firstChild),p.unshift(k.pop())):(k=p,p=[],k.length&&!v&&(C=m.createElementNS(P,"tspan"),t(C,{dy:L,x:x}),z&&t(C,"style",z),d.appendChild(C)),f>E&&(E=f)),k.length&&C.appendChild(m.createTextNode(k.join(" ").replace(/- /g,"-")));a.rotation=S}r++}}})}),h&&a.attr("title",a.textStr),f&&f.removeChild(d),q&&a.applyTextShadow&&a.applyTextShadow(q)):d.appendChild(m.createTextNode(b.replace(/&lt;/g,"<").replace(/&gt;/g,">")))},getContrast:function(a){a=l(a).rgba;return 510<a[0]+
a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,d,w,b,e,I,c,r,k){var y=this.label(a,d,w,k,null,null,null,null,"button"),n=0;y.attr(x({padding:8,r:2},e));F(y.element,G?"mouseover":"mouseenter",function(){3!==n&&y.setState(1)});F(y.element,G?"mouseout":"mouseleave",function(){3!==n&&y.setState(n)});y.setState=function(a){1!==a&&(y.state=n=a);y.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0])};return y.on("click",
function(a){3!==n&&b.call(y,a)})},crispLine:function(a,d){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-d%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+d%2/2);return a},path:function(a){var d={};b(a)?d.d=a:E(a)&&z(d,a);return this.createElement("path").attr(d)},circle:function(a,d,w){a=E(a)?a:{x:a,y:d,r:w};d=this.createElement("circle");d.xSetter=d.ySetter=function(a,d,w){w.setAttribute("c"+d,a)};return d.attr(a)},arc:function(a,d,w,b,e,I){E(a)&&(d=a.y,w=a.r,b=a.innerR,e=a.start,I=a.end,a=a.x);a=this.symbol("arc",
a||0,d||0,w||0,w||0,{innerR:b||0,start:e||0,end:I||0});a.r=w;return a},rect:function(a,d,w,b,e,I){e=E(a)?a.r:e;I=this.createElement("rect");a=E(a)?a:void 0===a?{}:{x:a,y:d,width:Math.max(w,0),height:Math.max(b,0)};e&&(a.r=e);I.rSetter=function(a,d,w){t(w,{rx:a,ry:a})};return I.attr(a)},setSize:function(a,d,w){var b=this.alignedObjects,e=b.length;this.width=a;this.height=d;for(this.boxWrapper.animate({width:a,height:d},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},
duration:r(w,!0)?void 0:0});e--;)b[e].align()},g:function(a){var d=this.createElement("g");return a?d.attr({"class":"highcharts-"+a}):d},image:function(a,d,w,b,e){var I={preserveAspectRatio:"none"};1<arguments.length&&z(I,{x:d,y:w,width:b,height:e});I=this.createElement("image").attr(I);I.element.setAttributeNS?I.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):I.element.setAttribute("hc-svg-href",a);return I},symbol:function(a,d,w,b,e,I){var c=this,k,y=this.symbols[a],n=q(d)&&y&&y(Math.round(d),
Math.round(w),b,e,I),u=/^url\((.*?)\)$/,C,h,x={};y?(k=this.path(n),z(k,{symbolName:a,x:d,y:w,width:b,height:e}),I&&z(k,I)):u.test(a)&&(C=a.match(u)[1],k=this.image(C),k.imgwidth=r(x[C]&&x[C].width,I&&I.width),k.imgheight=r(x[C]&&x[C].height,I&&I.height),h=function(){k.attr({width:k.width,height:k.height})},v(["width","height"],function(a){k[a+"Setter"]=function(a,d){var w={},b=this["img"+d];this[d]=a;q(b)&&(this.element&&this.element.setAttribute(d,b),this.alignByTranslate||(w["width"===d?"translateX":
"translateY"]=(this[d]-b)/2,this.attr(w)))}}),q(d)&&k.attr({x:d,y:w}),k.isImg=!0,q(k.imgwidth)&&q(k.imgheight)?h():(k.attr({width:0,height:0}),p("img",{onload:function(){var a=f[c.chartIndex];0===this.width&&(g(this,{position:"absolute",top:"-999em"}),m.body.appendChild(this));x[C]={width:this.width,height:this.height};k.imgwidth=this.width;k.imgheight=this.height;k.element&&h();this.parentNode&&this.parentNode.removeChild(this);c.imgCount--;if(!c.imgCount&&a&&a.onload)a.onload()},src:C}),this.imgCount++));
return k},symbols:{circle:function(a,d,w,b){var e=.166*w;return["M",a+w/2,d,"C",a+w+e,d,a+w+e,d+b,a+w/2,d+b,"C",a-e,d+b,a-e,d,a+w/2,d,"Z"]},square:function(a,d,w,b){return["M",a,d,"L",a+w,d,a+w,d+b,a,d+b,"Z"]},triangle:function(a,d,w,b){return["M",a+w/2,d,"L",a+w,d+b,a,d+b,"Z"]},"triangle-down":function(a,d,w,b){return["M",a,d,"L",a+w,d,a+w/2,d+b,"Z"]},diamond:function(a,d,w,b){return["M",a+w/2,d,"L",a+w,d+b/2,a+w/2,d+b,a,d+b/2,"Z"]},arc:function(a,d,w,b,e){var I=e.start;w=e.r||w||b;var c=e.end-.001;
b=e.innerR;var r=e.open,k=Math.cos(I),y=Math.sin(I),n=Math.cos(c),c=Math.sin(c);e=e.end-I<Math.PI?0:1;return["M",a+w*k,d+w*y,"A",w,w,0,e,1,a+w*n,d+w*c,r?"M":"L",a+b*n,d+b*c,"A",b,b,0,e,0,a+b*k,d+b*y,r?"":"Z"]},callout:function(a,d,w,b,e){var I=Math.min(e&&e.r||0,w,b),c=I+6,r=e&&e.anchorX;e=e&&e.anchorY;var k;k=["M",a+I,d,"L",a+w-I,d,"C",a+w,d,a+w,d,a+w,d+I,"L",a+w,d+b-I,"C",a+w,d+b,a+w,d+b,a+w-I,d+b,"L",a+I,d+b,"C",a,d+b,a,d+b,a,d+b-I,"L",a,d+I,"C",a,d,a,d,a+I,d];r&&r>w&&e>d+c&&e<d+b-c?k.splice(13,
3,"L",a+w,e-6,a+w+6,e,a+w,e+6,a+w,d+b-I):r&&0>r&&e>d+c&&e<d+b-c?k.splice(33,3,"L",a,e+6,a-6,e,a,e-6,a,d+I):e&&e>b&&r>a+c&&r<a+w-c?k.splice(23,3,"L",r+6,d+b,r,d+b+6,r-6,d+b,a+I,d+b):e&&0>e&&r>a+c&&r<a+w-c&&k.splice(3,3,"L",r-6,d,r,d-6,r+6,d,w-I,d);return k}},clipRect:function(d,w,b,e){var I="highcharts-"+a.idCounter++,c=this.createElement("clipPath").attr({id:I}).add(this.defs);d=this.rect(d,w,b,e,0).add(c);d.id=I;d.clipPath=c;d.count=0;return d},text:function(a,d,w,b){var e=!N&&this.forExport,I={};
if(b&&(this.allowHTML||!this.forExport))return this.html(a,d,w);I.x=Math.round(d||0);w&&(I.y=Math.round(w));if(a||0===a)I.text=a;a=this.createElement("text").attr(I);e&&a.css({position:"absolute"});b||(a.xSetter=function(a,d,w){var b=w.getElementsByTagName("tspan"),e,I=w.getAttribute(d),c;for(c=0;c<b.length;c++)e=b[c],e.getAttribute(d)===I&&e.setAttribute(d,a);w.setAttribute(d,a)});return a},fontMetrics:function(a,d){var w;a=d&&B.prototype.getStyle.call(d,"font-size");a=/px/.test(a)?C(a):/em/.test(a)?
12*parseFloat(a):12;w=24>a?a+3:Math.round(1.2*a);return{h:w,b:Math.round(.8*w),f:a}},rotCorr:function(a,d,w){var b=a;d&&w&&(b=Math.max(b*Math.cos(d*h),4));return{x:-a/3*Math.sin(d*h),y:b}},label:function(a,d,w,b,e,I,c,r,k){var y=this,n=y.g("button"!==k&&"label"),u=n.text=y.text("",0,0,c).attr({zIndex:1}),C,h,A=0,m=3,g=0,E,G,f,l,P,p={},N,L=/^url\((.*?)\)$/.test(b),t=L,D,F,H,J;k&&n.addClass("highcharts-"+k);t=!0;D=function(){return C.strokeWidth()%2/2};F=function(){var a=u.element.style,d={};h=(void 0===
E||void 0===G||P)&&q(u.textStr)&&u.getBBox();n.width=(E||h.width||0)+2*m+g;n.height=(G||h.height||0)+2*m;N=m+y.fontMetrics(a&&a.fontSize,u).b;t&&(C||(n.box=C=y.symbols[b]||L?y.symbol(b):y.rect(),C.addClass(("button"===k?"":"highcharts-label-box")+(k?" highcharts-"+k+"-box":"")),C.add(n),a=D(),d.x=a,d.y=(r?-N:0)+a),d.width=Math.round(n.width),d.height=Math.round(n.height),C.attr(z(d,p)),p={})};H=function(){var a=g+m,d;d=r?0:N;q(E)&&h&&("center"===P||"right"===P)&&(a+={center:.5,right:1}[P]*(E-h.width));
if(a!==u.x||d!==u.y)u.attr("x",a),void 0!==d&&u.attr("y",d);u.x=a;u.y=d};J=function(a,d){C?C.attr(a,d):p[a]=d};n.onAdd=function(){u.add(n);n.attr({text:a||0===a?a:"",x:d,y:w});C&&q(e)&&n.attr({anchorX:e,anchorY:I})};n.widthSetter=function(a){E=a};n.heightSetter=function(a){G=a};n["text-alignSetter"]=function(a){P=a};n.paddingSetter=function(a){q(a)&&a!==m&&(m=n.padding=a,H())};n.paddingLeftSetter=function(a){q(a)&&a!==g&&(g=a,H())};n.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==A&&
(A=a,h&&n.attr({x:f}))};n.textSetter=function(a){void 0!==a&&u.textSetter(a);F();H()};n["stroke-widthSetter"]=function(a,d){a&&(t=!0);this["stroke-width"]=a;J(d,a)};n.rSetter=function(a,d){J(d,a)};n.anchorXSetter=function(a,d){e=a;J(d,Math.round(a)-D()-f)};n.anchorYSetter=function(a,d){I=a;J(d,a-l)};n.xSetter=function(a){n.x=a;A&&(a-=A*((E||h.width)+2*m));f=Math.round(a);n.attr("translateX",f)};n.ySetter=function(a){l=n.y=Math.round(a);n.attr("translateY",l)};var X=n.css;return z(n,{css:function(a){if(a){var d=
{};a=x(a);v(n.textProps,function(w){void 0!==a[w]&&(d[w]=a[w],delete a[w])});u.css(d)}return X.call(n,a)},getBBox:function(){return{width:h.width+2*m,height:h.height+2*m,x:h.x-m,y:h.y-m}},destroy:function(){K(n.element,"mouseenter");K(n.element,"mouseleave");u&&(u=u.destroy());C&&(C=C.destroy());B.prototype.destroy.call(n);n=y=F=H=J=null}})}};a.Renderer=D})(J);(function(a){var B=a.attr,D=a.createElement,F=a.css,H=a.defined,t=a.each,f=a.extend,l=a.isFirefox,g=a.isMS,p=a.isWebKit,q=a.pInt,h=a.SVGRenderer,
c=a.win,m=a.wrap;f(a.SVGElement.prototype,{htmlCss:function(a){var c=this.element;if(c=a&&"SPAN"===c.tagName&&a.width)delete a.width,this.textWidth=c,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=f(this.styles,a);F(this.element,a);return this},htmlGetBBox:function(){var a=this.element;"text"===a.nodeName&&(a.style.position="absolute");return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=
this.renderer,c=this.element,d=this.x||0,k=this.y||0,e=this.textAlign||"left",b={left:0,center:.5,right:1}[e],n=this.styles;F(c,{marginLeft:this.translateX||0,marginTop:this.translateY||0});this.inverted&&t(c.childNodes,function(d){a.invertChild(d,c)});if("SPAN"===c.tagName){var h=this.rotation,m=q(this.textWidth),A=n&&n.whiteSpace,u=[h,e,c.innerHTML,this.textWidth,this.textAlign].join();u!==this.cTT&&(n=a.fontMetrics(c.style.fontSize).b,H(h)&&this.setSpanRotation(h,b,n),F(c,{width:"",whiteSpace:A||
"nowrap"}),c.offsetWidth>m&&/[ \-]/.test(c.textContent||c.innerText)&&F(c,{width:m+"px",display:"block",whiteSpace:A||"normal"}),this.getSpanCorrection(c.offsetWidth,n,b,h,e));F(c,{left:d+(this.xCorr||0)+"px",top:k+(this.yCorr||0)+"px"});p&&(n=c.offsetHeight);this.cTT=u}}else this.alignOnAdd=!0},setSpanRotation:function(a,h,d){var k={},e=g?"-ms-transform":p?"-webkit-transform":l?"MozTransform":c.opera?"-o-transform":"";k[e]=k.transform="rotate("+a+"deg)";k[e+(l?"Origin":"-origin")]=k.transformOrigin=
100*h+"% "+d+"px";F(this.element,k)},getSpanCorrection:function(a,c,d){this.xCorr=-a*d;this.yCorr=-c}});f(h.prototype,{html:function(a,c,d){var k=this.createElement("span"),e=k.element,b=k.renderer,n=b.isSVG,h=function(a,d){t(["display","opacity","visibility"],function(b){m(a,b+"Setter",function(a,b,e,c){a.call(this,b,e,c);d[e]=b})})};k.textSetter=function(a){a!==e.innerHTML&&delete this.bBox;e.innerHTML=this.textStr=a;k.htmlUpdateTransform()};n&&h(k,k.element.style);k.xSetter=k.ySetter=k.alignSetter=
k.rotationSetter=function(a,d){"align"===d&&(d="textAlign");k[d]=a;k.htmlUpdateTransform()};k.attr({text:a,x:Math.round(c),y:Math.round(d)}).css({position:"absolute"});e.style.whiteSpace="nowrap";k.css=k.htmlCss;n&&(k.add=function(a){var d,c=b.box.parentNode,n=[];if(this.parentGroup=a){if(d=a.div,!d){for(;a;)n.push(a),a=a.parentGroup;t(n.reverse(),function(a){var b,e=B(a.element,"class");e&&(e={className:e});d=a.div=a.div||D("div",e,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||
0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},d||c);b=d.style;f(a,{translateXSetter:function(d,w){b.left=d+"px";a[w]=d;a.doTransform=!0},translateYSetter:function(d,w){b.top=d+"px";a[w]=d;a.doTransform=!0}});h(a,b)})}}else d=c;d.appendChild(e);k.added=!0;k.alignOnAdd&&k.htmlUpdateTransform();return k});return k}})})(J);(function(a){function B(){var l=a.defaultOptions.global,g,p=l.useUTC,q=p?"getUTC":"get",h=p?"setUTC":"set";a.Date=g=l.Date||f.Date;g.hcTimezoneOffset=
p&&l.timezoneOffset;g.hcGetTimezoneOffset=p&&l.getTimezoneOffset;g.hcMakeTime=function(a,h,v,q,d,k){var e;p?(e=g.UTC.apply(0,arguments),e+=F(e)):e=(new g(a,h,t(v,1),t(q,0),t(d,0),t(k,0))).getTime();return e};D("Minutes Hours Day Date Month FullYear".split(" "),function(a){g["hcGet"+a]=q+a});D("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(a){g["hcSet"+a]=h+a})}var D=a.each,F=a.getTZOffset,H=a.merge,t=a.pick,f=a.win;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:{useUTC:!0},chart:{borderRadius:0,colorCount:10,defaultSeriesType:"line",
ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}},width:null,height:null},defs:{dropShadow:{tagName:"filter",id:"drop-shadow",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"}]}]},style:{tagName:"style",
textContent:".highcharts-tooltip{filter:url(#drop-shadow)}"}},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",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:'<span class="highcharts-header">{point.key}</span><br/>',pointFormat:'<span class="highcharts-color-{point.colorIndex}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>'},
credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},text:"Highcharts.com"}};a.setOptions=function(f){a.defaultOptions=H(!0,a.defaultOptions,f);B();return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;B()})(J);(function(a){var B=a.arrayMax,D=a.arrayMin,F=a.defined,H=a.destroyObjectProperties,t=a.each,f=a.erase,l=a.merge,g=a.pick;a.PlotLineOrBand=function(a,g){this.axis=
a;g&&(this.options=g,this.id=g.id)};a.PlotLineOrBand.prototype={render:function(){var a=this,q=a.axis,h=q.horiz,c=a.options,m=c.label,v=a.label,f=c.to,d=c.from,k=c.value,e=F(d)&&F(f),b=F(k),n=a.svgElem,G=!n,E=[],A,u=g(c.zIndex,0),x=c.events,E={"class":"highcharts-plot-"+(e?"band ":"line ")+(c.className||"")},y={},r=q.chart.renderer,C=e?"bands":"lines",K;K=q.log2lin;q.isLog&&(d=K(d),f=K(f),k=K(k));y.zIndex=u;C+="-"+u;(K=q[C])||(q[C]=K=r.g("plot-"+C).attr(y).add());G&&(a.svgElem=n=r.path().attr(E).add(K));
if(b)E=q.getPlotLinePath(k,n.strokeWidth());else if(e)E=q.getPlotBandPath(d,f,c);else return;if(G&&E&&E.length){if(n.attr({d:E}),x)for(A in c=function(d){n.on(d,function(b){x[d].apply(a,[b])})},x)c(A)}else n&&(E?(n.show(),n.animate({d:E})):(n.hide(),v&&(a.label=v=v.destroy())));m&&F(m.text)&&E&&E.length&&0<q.width&&0<q.height&&!E.flat?(m=l({align:h&&e&&"center",x:h?!e&&4:10,verticalAlign:!h&&e&&"middle",y:h?e?16:10:e?6:-4,rotation:h&&!e&&90},m),this.renderLabel(m,E,e,u)):v&&v.hide();return a},renderLabel:function(a,
g,h,c){var m=this.label,v=this.axis.chart.renderer;m||(m={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(h?"band":"line")+"-label "+(a.className||"")},m.zIndex=c,this.label=m=v.text(a.text,0,0,a.useHTML).attr(m).add());c=[g[1],g[4],h?g[6]:g[1]];g=[g[2],g[5],h?g[7]:g[2]];h=D(c);v=D(g);m.align(a,!1,{x:h,y:v,width:B(c)-h,height:B(g)-v});m.show()},destroy:function(){f(this.axis.plotLinesAndBands,this);delete this.axis;H(this)}};a.AxisPlotLineOrBandExtension={getPlotBandPath:function(a,
g){var h=this.getPlotLinePath(g,null,null,!0),c=this.getPlotLinePath(a,null,null,!0);c&&h?(c.flat=c.toString()===h.toString(),c.push(h[4],h[5],h[1],h[2])):c=null;return c},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(g,f){var h=(new a.PlotLineOrBand(this,g)).render(),c=this.userOptions;h&&(f&&(c[f]=c[f]||[],c[f].push(g)),this.plotLinesAndBands.push(h));return h},removePlotBandOrLine:function(a){for(var g=
this.plotLinesAndBands,h=this.options,c=this.userOptions,m=g.length;m--;)g[m].id===a&&g[m].destroy();t([h.plotLines||[],c.plotLines||[],h.plotBands||[],c.plotBands||[]],function(c){for(m=c.length;m--;)c[m].id===a&&f(c,c[m])})}}})(J);(function(a){var B=a.correctFloat,D=a.defined,F=a.destroyObjectProperties,H=a.isNumber,t=a.pick,f=a.stop,l=a.deg2rad;a.Tick=function(a,f,l,h){this.axis=a;this.pos=f;this.type=l||"";this.isNew=!0;l||h||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,
f=a.options,l=a.chart,h=a.categories,c=a.names,m=this.pos,v=f.labels,z=a.tickPositions,d=m===z[0],k=m===z[z.length-1],c=h?t(h[m],c[m],m):m,h=this.label,z=z.info,e;a.isDatetimeAxis&&z&&(e=f.dateTimeLabelFormats[z.higherRanks[m]||z.unitName]);this.isFirst=d;this.isLast=k;f=a.labelFormatter.call({axis:a,chart:l,isFirst:d,isLast:k,dateTimeLabelFormat:e,value:a.isLog?B(a.lin2log(c)):c});D(h)?h&&h.attr({text:f}):(this.labelLength=(this.label=h=D(f)&&v.enabled?l.renderer.text(f,0,0,v.useHTML).add(a.labelGroup):
null)&&h.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var f=this.axis,q=a.x,h=f.chart.chartWidth,c=f.chart.spacing,m=t(f.labelLeft,Math.min(f.pos,c[3])),c=t(f.labelRight,Math.max(f.pos+f.len,h-c[1])),v=this.label,z=this.rotation,d={left:0,center:.5,right:1}[f.labelAlign],k=v.getBBox().width,e=f.getSlotWidth(),b=e,n=1,G,E={};if(z)0>z&&q-d*k<m?G=Math.round(q/Math.cos(z*l)-m):0<z&&q+d*
k>c&&(G=Math.round((h-q)/Math.cos(z*l)));else if(h=q+(1-d)*k,q-d*k<m?b=a.x+b*(1-d)-m:h>c&&(b=c-a.x+b*d,n=-1),b=Math.min(e,b),b<e&&"center"===f.labelAlign&&(a.x+=n*(e-b-d*(e-Math.min(k,b)))),k>b||f.autoRotation&&(v.styles||{}).width)G=b;G&&(E.width=G,(f.options.labels.style||{}).textOverflow||(E.textOverflow="ellipsis"),v.css(E))},getPosition:function(a,f,l,h){var c=this.axis,m=c.chart,v=h&&m.oldChartHeight||m.chartHeight;return{x:a?c.translate(f+l,null,null,h)+c.transB:c.left+c.offset+(c.opposite?
(h&&m.oldChartWidth||m.chartWidth)-c.right-c.left:0),y:a?v-c.bottom+c.offset-(c.opposite?c.height:0):v-c.translate(f+l,null,null,h)-c.transB}},getLabelPosition:function(a,f,q,h,c,m,v,z){var d=this.axis,k=d.transA,e=d.reversed,b=d.staggerLines,n=d.tickRotCorr||{x:0,y:0},G=c.y;D(G)||(G=0===d.side?q.rotation?-8:-q.getBBox().height:2===d.side?n.y+8:Math.cos(q.rotation*l)*(n.y-q.getBBox(!1,0).height/2));a=a+c.x+n.x-(m&&h?m*k*(e?-1:1):0);f=f+G-(m&&!h?m*k*(e?1:-1):0);b&&(q=v/(z||1)%b,d.opposite&&(q=b-q-
1),f+=d.labelOffset/b*q);return{x:a,y:Math.round(f)}},getMarkPath:function(a,f,l,h,c,m){return m.crispLine(["M",a,f,"L",a+(c?0:-l),f+(c?l:0)],h)},render:function(a,l,q){var h=this.axis,c=h.options,m=h.chart.renderer,v=h.horiz,z=this.type,d=this.label,k=this.pos,e=c.labels,b=this.gridLine,n=h.tickSize(z?z+"Tick":"tick"),G=this.mark,E=!G,A=e.step,u={},x=!0,y=h.tickmarkOffset,r=this.getPosition(v,k,y,l),C=r.x,r=r.y,K=v&&C===h.pos+h.len||!v&&r===h.pos?-1:1;q=t(q,1);this.isActive=!0;b||(z||(u.zIndex=1),
l&&(u.opacity=0),this.gridLine=b=m.path().attr(u).addClass("highcharts-"+(z?z+"-":"")+"grid-line").add(h.gridGroup));if(!l&&b&&(k=h.getPlotLinePath(k+y,b.strokeWidth()*K,l,!0)))b[this.isNew?"attr":"animate"]({d:k,opacity:q});n&&(h.opposite&&(n[0]=-n[0]),E&&(this.mark=G=m.path().addClass("highcharts-"+(z?z+"-":"")+"tick").add(h.axisGroup)),G[E?"attr":"animate"]({d:this.getMarkPath(C,r,n[0],G.strokeWidth()*K,v,m),opacity:q}));d&&H(C)&&(d.xy=r=this.getLabelPosition(C,r,d,v,e,y,a,A),this.isFirst&&!this.isLast&&
!t(c.showFirstLabel,1)||this.isLast&&!this.isFirst&&!t(c.showLastLabel,1)?x=!1:!v||h.isRadial||e.step||e.rotation||l||0===q||this.handleOverflow(r),A&&a%A&&(x=!1),x&&H(r.y)?(r.opacity=q,d[this.isNew?"attr":"animate"](r)):(f(d),d.attr("y",-9999)),this.isNew=!1)},destroy:function(){F(this,this.axis)}}})(J);(function(a){var B=a.addEvent,D=a.animObject,F=a.arrayMax,H=a.arrayMin,t=a.AxisPlotLineOrBandExtension,f=a.correctFloat,l=a.defaultOptions,g=a.defined,p=a.deg2rad,q=a.destroyObjectProperties,h=a.each,
c=a.error,m=a.extend,v=a.fireEvent,z=a.format,d=a.getMagnitude,k=a.grep,e=a.inArray,b=a.isArray,n=a.isNumber,G=a.isString,E=a.merge,A=a.normalizeTickInterval,u=a.pick,x=a.PlotLineOrBand,y=a.removeEvent,r=a.splat,C=a.syncTimeout,K=a.Tick;a.Axis=function(){this.init.apply(this,arguments)};a.Axis.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},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle"},type:"linear"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{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,d){var b=d.isX;this.chart=a;this.horiz=a.inverted?!b:b;this.isXAxis=b;this.coll=this.coll||(b?"xAxis":"yAxis");this.opposite=d.opposite;this.side=d.side||(this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(d);var c=this.options,k=c.type;
this.labelFormatter=c.labels.formatter||this.defaultLabelFormatter;this.userOptions=d;this.minPixelPadding=0;this.reversed=c.reversed;this.visible=!1!==c.visible;this.zoomEnabled=!1!==c.zoomEnabled;this.hasNames="category"===k||!0===c.categories;this.categories=c.categories||this.hasNames;this.names=this.names||[];this.isLog="logarithmic"===k;this.isDatetimeAxis="datetime"===k;this.isLinked=g(c.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands=
{};this.len=0;this.minRange=this.userMinRange=c.minRange||c.maxZoom;this.range=c.range;this.offset=c.offset||0;this.stacks={};this.oldStacks={};this.stacksTouched=0;this.min=this.max=null;this.crosshair=u(c.crosshair,r(a.options.tooltip.crosshairs)[b?0:1],!1);var n,c=this.options.events;-1===e(this,a.axes)&&(b?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this));this.series=this.series||[];a.inverted&&b&&void 0===this.reversed&&(this.reversed=!0);this.removePlotLine=this.removePlotBand=
this.removePlotBandOrLine;for(n in c)B(this,n,c[n]);this.isLog&&(this.val2lin=this.log2lin,this.lin2val=this.lin2log)},setOptions:function(a){this.options=E(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],E(l[this.coll],a))},defaultLabelFormatter:function(){var d=this.axis,b=this.value,e=d.categories,c=this.dateTimeLabelFormat,k=l.lang.numericSymbols,r=k&&
k.length,n,y=d.options.labels.format,d=d.isLog?b:d.tickInterval;if(y)n=z(y,this);else if(e)n=b;else if(c)n=a.dateFormat(c,b);else if(r&&1E3<=d)for(;r--&&void 0===n;)e=Math.pow(1E3,r+1),d>=e&&0===10*b%e&&null!==k[r]&&0!==b&&(n=a.numberFormat(b/e,-1)+k[r]);void 0===n&&(n=1E4<=Math.abs(b)?a.numberFormat(b,-1):a.numberFormat(b,-1,void 0,""));return n},getSeriesExtremes:function(){var a=this,d=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&
a.buildStacks();h(a.series,function(b){if(b.visible||!d.options.chart.ignoreHiddenSeries){var e=b.options,c=e.threshold,r;a.hasVisibleSeries=!0;a.isLog&&0>=c&&(c=null);if(a.isXAxis)e=b.xData,e.length&&(b=H(e),n(b)||b instanceof Date||(e=k(e,function(a){return n(a)}),b=H(e)),a.dataMin=Math.min(u(a.dataMin,e[0]),b),a.dataMax=Math.max(u(a.dataMax,e[0]),F(e)));else if(b.getExtremes(),r=b.dataMax,b=b.dataMin,g(b)&&g(r)&&(a.dataMin=Math.min(u(a.dataMin,b),b),a.dataMax=Math.max(u(a.dataMax,r),r)),g(c)&&
(a.threshold=c),!e.softThreshold||a.isLog)a.softThreshold=!1}})},translate:function(a,d,b,e,c,r){var k=this.linkedParent||this,y=1,u=0,h=e?k.oldTransA:k.transA;e=e?k.oldMin:k.min;var C=k.minPixelPadding;c=(k.isOrdinal||k.isBroken||k.isLog&&c)&&k.lin2val;h||(h=k.transA);b&&(y*=-1,u=k.len);k.reversed&&(y*=-1,u-=y*(k.sector||k.len));d?(a=(a*y+u-C)/h+e,c&&(a=k.lin2val(a))):(c&&(a=k.val2lin(a)),"between"===r&&(r=.5),a=y*(a-e)*h+u+y*C+(n(r)?h*r*k.pointRange:0));return a},toPixels:function(a,d){return this.translate(a,
!1,!this.horiz,null,!0)+(d?0:this.pos)},toValue:function(a,d){return this.translate(a-(d?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,d,b,e,c){var k=this.chart,r=this.left,y=this.top,h,C,m=b&&k.oldChartHeight||k.chartHeight,x=b&&k.oldChartWidth||k.chartWidth,f;h=this.transB;var A=function(a,d,b){if(a<d||a>b)e?a=Math.min(Math.max(d,a),b):f=!0;return a};c=u(c,this.translate(a,null,null,b));a=b=Math.round(c+h);h=C=Math.round(m-c-h);n(c)?this.horiz?(h=y,C=m-this.bottom,a=b=A(a,r,r+
this.width)):(a=r,b=x-this.right,h=C=A(h,y,y+this.height)):f=!0;return f&&!e?null:k.renderer.crispLine(["M",a,h,"L",b,C],d||1)},getLinearTickPositions:function(a,d,b){var e,c=f(Math.floor(d/a)*a),k=f(Math.ceil(b/a)*a),r=[];if(d===b&&n(d))return[d];for(d=c;d<=k;){r.push(d);d=f(d+a);if(d===e)break;e=d}return r},getMinorTickPositions:function(){var a=this.options,d=this.tickPositions,b=this.minorTickInterval,e=[],c,k=this.pointRangePadding||0;c=this.min-k;var k=this.max+k,r=k-c;if(r&&r/b<this.len/3)if(this.isLog)for(k=
d.length,c=1;c<k;c++)e=e.concat(this.getLogTickPositions(b,d[c-1],d[c],!0));else if(this.isDatetimeAxis&&"auto"===a.minorTickInterval)e=e.concat(this.getTimeTicks(this.normalizeTimeTickInterval(b),c,k,a.startOfWeek));else for(d=c+(d[0]-c)%b;d<=k;d+=b)e.push(d);0!==e.length&&this.trimTicks(e,a.startOnTick,a.endOnTick);return e},adjustForMinRange:function(){var a=this.options,d=this.min,b=this.max,e,c=this.dataMax-this.dataMin>=this.minRange,k,r,n,y,C,m;this.isXAxis&&void 0===this.minRange&&!this.isLog&&
(g(a.min)||g(a.max)?this.minRange=null:(h(this.series,function(a){y=a.xData;for(r=C=a.xIncrement?1:y.length-1;0<r;r--)if(n=y[r]-y[r-1],void 0===k||n<k)k=n}),this.minRange=Math.min(5*k,this.dataMax-this.dataMin)));b-d<this.minRange&&(m=this.minRange,e=(m-b+d)/2,e=[d-e,u(a.min,d-e)],c&&(e[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),d=F(e),b=[d+m,u(a.max,d+m)],c&&(b[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),b=H(b),b-d<m&&(e[0]=b-m,e[1]=u(a.min,b-m),d=F(e)));this.min=d;this.max=
b},getClosest:function(){var a;this.categories?a=1:h(this.series,function(d){var b=d.closestPointRange;!d.noSharedTooltip&&g(b)&&(a=g(a)?Math.min(a,b):b)});return a},nameToX:function(a){var d=b(this.categories),c=d?this.categories:this.names,k=a.options.x,r;a.series.requireSorting=!1;g(k)||(k=!1===this.options.nameToX?a.series.autoIncrement():e(a.name,c));-1===k?d||(r=c.length):r=k;this.names[r]=a.name;return r},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=
void 0,h(this.series||[],function(d){d.processedXData||(d.processData(),d.generatePoints());h(d.points,function(b,e){var c;b.options&&void 0===b.options.x&&(c=a.nameToX(b),c!==b.x&&(b.x=c,d.xData[e]=c))})}))},setAxisTranslation:function(a){var d=this,b=d.max-d.min,e=d.axisPointRange||0,c,k=0,r=0,n=d.linkedParent,y=!!d.categories,C=d.transA,m=d.isXAxis;if(m||y||e)n?(k=n.minPointOffset,r=n.pointRangePadding):(c=d.getClosest(),h(d.series,function(a){var b=y?1:m?u(a.options.pointRange,c,0):d.axisPointRange||
0;a=a.options.pointPlacement;e=Math.max(e,b);d.single||(k=Math.max(k,G(a)?0:b/2),r=Math.max(r,"on"===a?0:b))})),n=d.ordinalSlope&&c?d.ordinalSlope/c:1,d.minPointOffset=k*=n,d.pointRangePadding=r*=n,d.pointRange=Math.min(e,b),m&&(d.closestPointRange=c);a&&(d.oldTransA=C);d.translationSlope=d.transA=C=d.len/(b+r||1);d.transB=d.horiz?d.left:d.bottom;d.minPixelPadding=C*k},minFromRange:function(){return this.max-this.range},setTickInterval:function(a){var b=this,e=b.chart,k=b.options,r=b.isLog,y=b.log2lin,
C=b.isDatetimeAxis,m=b.isXAxis,x=b.isLinked,E=k.maxPadding,K=k.minPadding,G=k.tickInterval,l=k.tickPixelInterval,z=b.categories,q=b.threshold,p=b.softThreshold,t,D,B,F;C||z||x||this.getTickAmount();B=u(b.userMin,k.min);F=u(b.userMax,k.max);x?(b.linkedParent=e[b.coll][k.linkedTo],e=b.linkedParent.getExtremes(),b.min=u(e.min,e.dataMin),b.max=u(e.max,e.dataMax),k.type!==b.linkedParent.options.type&&c(11,1)):(!p&&g(q)&&(b.dataMin>=q?(t=q,K=0):b.dataMax<=q&&(D=q,E=0)),b.min=u(B,t,b.dataMin),b.max=u(F,
D,b.dataMax));r&&(!a&&0>=Math.min(b.min,u(b.dataMin,b.min))&&c(10,1),b.min=f(y(b.min),15),b.max=f(y(b.max),15));b.range&&g(b.max)&&(b.userMin=b.min=B=Math.max(b.min,b.minFromRange()),b.userMax=F=b.max,b.range=null);v(b,"foundExtremes");b.beforePadding&&b.beforePadding();b.adjustForMinRange();!(z||b.axisPointRange||b.usePercentage||x)&&g(b.min)&&g(b.max)&&(y=b.max-b.min)&&(!g(B)&&K&&(b.min-=y*K),!g(F)&&E&&(b.max+=y*E));n(k.floor)&&(b.min=Math.max(b.min,k.floor));n(k.ceiling)&&(b.max=Math.min(b.max,
k.ceiling));p&&g(b.dataMin)&&(q=q||0,!g(B)&&b.min<q&&b.dataMin>=q?b.min=q:!g(F)&&b.max>q&&b.dataMax<=q&&(b.max=q));b.tickInterval=b.min===b.max||void 0===b.min||void 0===b.max?1:x&&!G&&l===b.linkedParent.options.tickPixelInterval?G=b.linkedParent.tickInterval:u(G,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,z?1:(b.max-b.min)*l/Math.max(b.len,l));m&&!a&&h(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&&
b.beforeSetTickPositions();b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval));b.pointRange&&!G&&(b.tickInterval=Math.max(b.pointRange,b.tickInterval));a=u(k.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!G&&b.tickInterval<a&&(b.tickInterval=a);C||r||G||(b.tickInterval=A(b.tickInterval,null,d(b.tickInterval),u(k.allowDecimals,!(.5<b.tickInterval&&5>b.tickInterval&&1E3<b.max&&9999>b.max)),!!this.tickAmount));this.tickAmount||(b.tickInterval=b.unsquish());
this.setTickPositions()},setTickPositions:function(){var a=this.options,d,b=a.tickPositions,e=a.tickPositioner,c=a.startOnTick,k=a.endOnTick,r;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.tickPositions=d=b&&b.slice();!d&&(d=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,
a.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),d.length>this.len&&(d=[d[0],d.pop()]),this.tickPositions=d,e&&(e=e.apply(this,[this.min,this.max])))&&(this.tickPositions=d=e);this.isLinked||(this.trimTicks(d,c,k),this.min===this.max&&g(this.min)&&!this.tickAmount&&(r=!0,this.min-=.5,this.max+=.5),this.single=r,b||e||this.adjustTickAmount())},trimTicks:function(a,
d,b){var e=a[0],c=a[a.length-1],k=this.minPointOffset||0;if(d)this.min=e;else for(;this.min-k>a[0];)a.shift();if(b)this.max=c;else for(;this.max+k<a[a.length-1];)a.pop();0===a.length&&g(e)&&a.push((c+e)/2)},alignToOthers:function(){var a={},d,b=this.options;!1!==this.chart.options.chart.alignTicks&&!1!==b.alignTicks&&h(this.chart[this.coll],function(b){var e=b.options,e=[b.horiz?e.left:e.top,e.width,e.height,e.pane].join();b.series.length&&(a[e]?d=!0:a[e]=1)});return d},getTickAmount:function(){var a=
this.options,d=a.tickAmount,b=a.tickPixelInterval;!g(a.tickInterval)&&this.len<b&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(d=2);!d&&this.alignToOthers()&&(d=Math.ceil(this.len/b)+1);4>d&&(this.finalTickAmt=d,d=5);this.tickAmount=d},adjustTickAmount:function(){var a=this.tickInterval,d=this.tickPositions,b=this.tickAmount,e=this.finalTickAmt,c=d&&d.length;if(c<b){for(;d.length<b;)d.push(f(d[d.length-1]+a));this.transA*=(c-1)/(b-1);this.max=d[d.length-1]}else c>b&&(this.tickInterval*=
2,this.setTickPositions());if(g(e)){for(a=b=d.length;a--;)(3===e&&1===a%2||2>=e&&0<a&&a<b-1)&&d.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,d;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();d=this.len!==this.oldAxisLength;h(this.series,function(d){if(d.isDirtyData||d.isDirty||d.xAxis.isDirty)a=!0});d||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=d||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,d,b,e,c){var k=this,r=k.chart;b=u(b,!0);h(k.series,function(a){delete a.kdTree});c=m(c,{min:a,max:d});v(k,"setExtremes",c,function(){k.userMin=a;k.userMax=d;k.eventArgs=c;b&&r.redraw(e)})},zoom:function(a,d){var b=this.dataMin,
e=this.dataMax,c=this.options,k=Math.min(b,u(c.min,b)),c=Math.max(e,u(c.max,e));this.allowZoomOutside||(g(b)&&a<=k&&(a=k),g(e)&&d>=c&&(d=c));this.displayBtn=void 0!==a||void 0!==d;this.setExtremes(a,d,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,d=this.options,b=d.offsetLeft||0,e=this.horiz,c=u(d.width,a.plotWidth-b+(d.offsetRight||0)),k=u(d.height,a.plotHeight),r=u(d.top,a.plotTop),d=u(d.left,a.plotLeft+b),b=/%$/;b.test(k)&&(k=Math.round(parseFloat(k)/100*a.plotHeight));
b.test(r)&&(r=Math.round(parseFloat(r)/100*a.plotHeight+a.plotTop));this.left=d;this.top=r;this.width=c;this.height=k;this.bottom=a.chartHeight-k-r;this.right=a.chartWidth-c-d;this.len=Math.max(e?c:k,0);this.pos=e?d:r},getExtremes:function(){var a=this.isLog,d=this.lin2log;return{min:a?f(d(this.min)):this.min,max:a?f(d(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var d=this.isLog,b=this.lin2log,e=d?b(this.min):this.min,
d=d?b(this.max):this.max;null===a?a=e:e>a?a=e:d<a&&(a=d);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a=(u(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var d=this.options,b=d[a+"Length"],e=u(d[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(e&&b)return"inside"===d[a+"Position"]&&(b=-b),[b,e]},labelMetrics:function(){return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[0]&&
this.ticks[0].label)},unsquish:function(){var a=this.options.labels,d=this.horiz,b=this.tickInterval,e=b,c=this.len/(((this.categories?1:0)+this.max-this.min)/b),k,r=a.rotation,n=this.labelMetrics(),y,C=Number.MAX_VALUE,m,x=function(a){a/=c||1;a=1<a?Math.ceil(a):1;return a*b};d?(m=!a.staggerLines&&!a.step&&(g(r)?[r]:c<u(a.autoRotationLimit,80)&&a.autoRotation))&&h(m,function(a){var d;if(a===r||a&&-90<=a&&90>=a)y=x(Math.abs(n.h/Math.sin(p*a))),d=y+Math.abs(a/360),d<C&&(C=d,k=a,e=y)}):a.step||(e=x(n.h));
this.autoRotation=m;this.labelRotation=u(k,r);return e},getSlotWidth:function(){var a=this.chart,d=this.horiz,b=this.options.labels,e=Math.max(this.tickPositions.length-(this.categories?0:1),1),c=a.margin[3];return d&&2>(b.step||0)&&!b.rotation&&(this.staggerLines||1)*a.plotWidth/e||!d&&(c&&c-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,d=a.renderer,b=this.tickPositions,e=this.ticks,c=this.options.labels,k=this.horiz,r=this.getSlotWidth(),n=Math.max(1,Math.round(r-2*
(c.padding||5))),y={},C=this.labelMetrics(),u=c.style&&c.style.textOverflow,m,x=0,f,A;G(c.rotation)||(y.rotation=c.rotation||0);h(b,function(a){(a=e[a])&&a.labelLength>x&&(x=a.labelLength)});this.maxLabelLength=x;if(this.autoRotation)x>n&&x>C.h?y.rotation=this.labelRotation:this.labelRotation=0;else if(r&&(m={width:n+"px"},!u))for(m.textOverflow="clip",f=b.length;!k&&f--;)if(A=b[f],n=e[A].label)n.styles&&"ellipsis"===n.styles.textOverflow?n.css({textOverflow:"clip"}):e[A].labelLength>r&&n.css({width:r+
"px"}),n.getBBox().height>this.len/b.length-(C.h-C.f)&&(n.specCss={textOverflow:"ellipsis"});y.rotation&&(m={width:(x>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},u||(m.textOverflow="ellipsis"));if(this.labelAlign=c.align||this.autoLabelAlign(this.labelRotation))y.align=this.labelAlign;h(b,function(a){var d=(a=e[a])&&a.label;d&&(d.attr(y),m&&d.css(E(m,d.specCss)),delete d.specCss,a.rotation=y.rotation)});this.tickRotCorr=d.rotCorr(C.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||
g(this.min)&&g(this.max)&&!!this.tickPositions},getOffset:function(){var a=this,d=a.chart,b=d.renderer,e=a.options,c=a.tickPositions,k=a.ticks,r=a.horiz,n=a.side,y=d.inverted?[1,0,3,2][n]:n,C,m,x=0,f,A=0,v=e.title,E=e.labels,G=0,l=a.opposite,q=d.axisOffset,d=d.clipOffset,z=[-1,1,1,-1][n],p,t=e.className,D=a.axisParent,B=this.tickSize("tick");C=a.hasData();a.showAxis=m=C||u(e.showEmpty,!0);a.staggerLines=a.horiz&&E.staggerLines;a.axisGroup||(a.gridGroup=b.g("grid").attr({zIndex:e.gridZIndex||1}).addClass("highcharts-"+
this.coll.toLowerCase()+"-grid "+(t||"")).add(D),a.axisGroup=b.g("axis").attr({zIndex:e.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(t||"")).add(D),a.labelGroup=b.g("axis-labels").attr({zIndex:E.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(t||"")).add(D));if(C||a.isLinked)h(c,function(d){k[d]?k[d].addLabel():k[d]=new K(a,d)}),a.renderUnsquish(),!1===E.reserveSpace||0!==n&&2!==n&&{1:"left",3:"right"}[n]!==a.labelAlign&&"center"!==a.labelAlign||h(c,function(a){G=
Math.max(k[a].getLabelSize(),G)}),a.staggerLines&&(G*=a.staggerLines,a.labelOffset=G*(a.opposite?-1:1));else for(p in k)k[p].destroy(),delete k[p];v&&v.text&&!1!==v.enabled&&(a.axisTitle||((p=v.textAlign)||(p=(r?{low:"left",middle:"center",high:"right"}:{low:l?"right":"left",middle:"center",high:l?"left":"right"})[v.align]),a.axisTitle=b.text(v.text,0,0,v.useHTML).attr({zIndex:7,rotation:v.rotation||0,align:p}).addClass("highcharts-axis-title").add(a.axisGroup),a.axisTitle.isNew=!0),m&&(x=a.axisTitle.getBBox()[r?
"height":"width"],f=v.offset,A=g(f)?0:u(v.margin,r?5:10)),a.axisTitle[m?"show":"hide"](!0));a.renderLine();a.offset=z*u(e.offset,q[n]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};b=0===n?-a.labelMetrics().h:2===n?a.tickRotCorr.y:0;A=Math.abs(G)+A;G&&(A=A-b+z*(r?u(E.y,a.tickRotCorr.y+8*z):E.x));a.axisTitleMargin=u(f,A);q[n]=Math.max(q[n],a.axisTitleMargin+x+z*a.offset,A,C&&c.length&&B?B[0]:0);e=e.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);d[y]=Math.max(d[y],e)},getLinePath:function(a){var d=this.chart,
b=this.opposite,e=this.offset,c=this.horiz,k=this.left+(b?this.width:0)+e,e=d.chartHeight-this.bottom-(b?this.height:0)+e;b&&(a*=-1);return d.renderer.crispLine(["M",c?this.left:k,c?e:this.top,"L",c?d.chartWidth-this.right:k,c?e:d.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,d=this.left,b=this.top,e=this.len,c=this.options.title,k=a?d:b,
r=this.opposite,n=this.offset,y=c.x||0,C=c.y||0,h=this.chart.renderer.fontMetrics(c.style&&c.style.fontSize,this.axisTitle).f,e={low:k+(a?0:e),middle:k+e/2,high:k+(a?e:0)}[c.align],d=(a?b+this.height:d)+(a?1:-1)*(r?-1:1)*this.axisTitleMargin+(2===this.side?h:0);return{x:a?e+y:d+(r?this.width:0)+n+y,y:a?d+C-(r?this.height:0)+n:e+C}},render:function(){var a=this,d=a.chart,b=d.renderer,e=a.options,c=a.isLog,k=a.lin2log,r=a.isLinked,y=a.tickPositions,u=a.axisTitle,m=a.ticks,f=a.minorTicks,A=a.alternateBands,
v=e.stackLabels,g=e.alternateGridColor,E=a.tickmarkOffset,G=a.axisLine,l=d.hasRendered&&n(a.oldMin),q=a.showAxis,z=D(b.globalAnimation),p,t;a.labelEdge.length=0;a.overlap=!1;h([m,f,A],function(a){for(var d in a)a[d].isActive=!1});if(a.hasData()||r)a.minorTickInterval&&!a.categories&&h(a.getMinorTickPositions(),function(d){f[d]||(f[d]=new K(a,d,"minor"));l&&f[d].isNew&&f[d].render(null,!0);f[d].render(null,!1,1)}),y.length&&(h(y,function(d,b){if(!r||d>=a.min&&d<=a.max)m[d]||(m[d]=new K(a,d)),l&&m[d].isNew&&
m[d].render(b,!0,.1),m[d].render(b)}),E&&(0===a.min||a.single)&&(m[-1]||(m[-1]=new K(a,-1,null,!0)),m[-1].render(-1))),g&&h(y,function(b,e){t=void 0!==y[e+1]?y[e+1]+E:a.max-E;0===e%2&&b<a.max&&t<=a.max+(d.polar?-E:E)&&(A[b]||(A[b]=new x(a)),p=b+E,A[b].options={from:c?k(p):p,to:c?k(t):t,color:g},A[b].render(),A[b].isActive=!0)}),a._addedPlotLB||(h((e.plotLines||[]).concat(e.plotBands||[]),function(d){a.addPlotBandOrLine(d)}),a._addedPlotLB=!0);h([m,f,A],function(a){var b,e,c=[],k=z.duration;for(b in a)a[b].isActive||
(a[b].render(b,!1,0),a[b].isActive=!1,c.push(b));C(function(){for(e=c.length;e--;)a[c[e]]&&!a[c[e]].isActive&&(a[c[e]].destroy(),delete a[c[e]])},a!==A&&d.hasRendered&&k?k:0)});G&&(G[G.isPlaced?"animate":"attr"]({d:this.getLinePath(G.strokeWidth())}),G.isPlaced=!0,G[q?"show":"hide"](!0));u&&q&&(u[u.isNew?"attr":"animate"](a.getTitlePosition()),u.isNew=!1);v&&v.enabled&&a.renderStackTotals();a.isDirty=!1},redraw:function(){this.visible&&(this.render(),h(this.plotLinesAndBands,function(a){a.render()}));
h(this.series,function(a){a.isDirty=!0})},destroy:function(a){var d=this,b=d.stacks,c,k=d.plotLinesAndBands,r;a||y(d);for(c in b)q(b[c]),b[c]=null;h([d.ticks,d.minorTicks,d.alternateBands],function(a){q(a)});if(k)for(a=k.length;a--;)k[a].destroy();h("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),function(a){d[a]&&(d[a]=d[a].destroy())});k=["names","series","userMax","userMin"];for(r in d)d.hasOwnProperty(r)&&-1===e(r,k)&&delete d[r]},drawCrosshair:function(a,
d){var b,e=this.crosshair,c,k=this.cross;a||(a=this.cross&&this.cross.e);this.crosshair&&!1!==(g(d)||!u(e.snap,!0))?(u(e.snap,!0)?g(d)&&(b=this.isXAxis?d.plotX:this.len-d.plotY):b=this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos,b=this.isRadial?this.getPlotLinePath(this.isXAxis?d.x:u(d.stackY,d.y))||null:this.getPlotLinePath(null,null,null,null,b)||null,null===b?this.hideCrosshair():(c=this.categories&&!this.isRadial,k||(this.cross=k=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+
(c?"category ":"thin ")+e.className).attr({zIndex:u(e.zIndex,2)}).add()),k.show().attr({d:b}),c&&k.attr({"stroke-width":this.transA}),this.cross.e=a)):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}};m(a.Axis.prototype,t)})(J);(function(a){var B=a.Axis,D=a.Date,F=a.defaultOptions,H=a.defined,t=a.each,f=a.extend,l=a.getMagnitude,g=a.getTZOffset,p=a.grep,q=a.normalizeTickInterval,h=a.pick,c=a.timeUnits;B.prototype.getTimeTicks=function(a,v,l,d){var k=[],e={},b=F.global.useUTC,
n,G=new D(v-g(v)),E=D.hcMakeTime,A=a.unitRange,u=a.count;if(H(v)){G[D.hcSetMilliseconds](A>=c.second?0:u*Math.floor(G.getMilliseconds()/u));if(A>=c.second)G[D.hcSetSeconds](A>=c.minute?0:u*Math.floor(G.getSeconds()/u));if(A>=c.minute)G[D.hcSetMinutes](A>=c.hour?0:u*Math.floor(G[D.hcGetMinutes]()/u));if(A>=c.hour)G[D.hcSetHours](A>=c.day?0:u*Math.floor(G[D.hcGetHours]()/u));if(A>=c.day)G[D.hcSetDate](A>=c.month?1:u*Math.floor(G[D.hcGetDate]()/u));A>=c.month&&(G[D.hcSetMonth](A>=c.year?0:u*Math.floor(G[D.hcGetMonth]()/
u)),n=G[D.hcGetFullYear]());if(A>=c.year)G[D.hcSetFullYear](n-n%u);if(A===c.week)G[D.hcSetDate](G[D.hcGetDate]()-G[D.hcGetDay]()+h(d,1));v=1;if(D.hcTimezoneOffset||D.hcGetTimezoneOffset)G=G.getTime(),G=new D(G+g(G));n=G[D.hcGetFullYear]();d=G.getTime();for(var x=G[D.hcGetMonth](),y=G[D.hcGetDate](),r=!b||!!D.hcGetTimezoneOffset,C=(c.day+(b?g(G):6E4*G.getTimezoneOffset()))%c.day;d<l;)k.push(d),d=A===c.year?E(n+v*u,0):A===c.month?E(n,x+v*u):!r||A!==c.day&&A!==c.week?d+A*u:E(n,x,y+v*u*(A===c.day?1:7)),
v++;k.push(d);t(p(k,function(a){return A<=c.hour&&a%c.day===C}),function(a){e[a]="day"})}k.info=f(a,{higherRanks:e,totalRange:A*u});return k};B.prototype.normalizeTimeTickInterval=function(a,h){var f=h||[["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]],d=f[f.length-1],k=c[d[0]],e=d[1],b;for(b=0;b<f.length&&!(d=f[b],k=c[d[0]],e=d[1],f[b+1]&&a<=(k*e[e.length-
1]+c[f[b+1][0]])/2);b++);k===c.year&&a<5*k&&(e=[1,2,5]);f=q(a/k,e,"year"===d[0]?Math.max(l(a/k),1):1);return{unitRange:k,count:f,unitName:d[0]}}})(J);(function(a){var B=a.Axis,D=a.getMagnitude,F=a.map,H=a.normalizeTickInterval,t=a.pick;B.prototype.getLogTickPositions=function(a,l,g,p){var q=this.options,h=this.len,c=this.lin2log,m=this.log2lin,v=[];p||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),v=this.getLinearTickPositions(a,l,g);else if(.08<=a)for(var h=Math.floor(l),z,d,k,e,b,q=.3<
a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];h<g+1&&!b;h++)for(d=q.length,z=0;z<d&&!b;z++)k=m(c(h)*q[z]),k>l&&(!p||e<=g)&&void 0!==e&&v.push(e),e>g&&(b=!0),e=k;else l=c(l),g=c(g),a=q[p?"minorTickInterval":"tickInterval"],a=t("auto"===a?null:a,this._minorAutoInterval,q.tickPixelInterval/(p?5:1)*(g-l)/((p?h/this.tickPositions.length:h)||1)),a=H(a,null,D(a)),v=F(this.getLinearTickPositions(a,l,g),m),p||(this._minorAutoInterval=a/5);p||(this.tickInterval=a);return v};B.prototype.log2lin=function(a){return Math.log(a)/
Math.LN10};B.prototype.lin2log=function(a){return Math.pow(10,a)}})(J);(function(a){var B=a.addEvent,D=a.dateFormat,F=a.each,H=a.extend,t=a.format,f=a.isNumber,l=a.map,g=a.merge,p=a.pick,q=a.splat,h=a.stop,c=a.syncTimeout,m=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype={init:function(a,c){this.chart=a;this.options=c;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=c.split&&!a.inverted;this.shared=c.shared||this.split;this.label=this.split?this.chart.renderer.g("tooltip"):
a.renderer.label("",0,0,c.shape||"callout",null,null,c.useHTML,null,"tooltip").attr({padding:c.padding,r:c.borderRadius,display:"none"});this.label.attr({zIndex:8}).add()},update:function(a){this.destroy();this.init(this.chart,g(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,c,d,k){var e=this,b=e.now,n=!1!==e.options.animation&&!e.isHidden&&(1<Math.abs(a-b.x)||1<Math.abs(c-b.y)),
h=e.followPointer||1<e.len;H(b,{x:n?(2*b.x+a)/3:a,y:n?(b.y+c)/2:c,anchorX:h?void 0:n?(2*b.anchorX+d)/3:d,anchorY:h?void 0:n?(b.anchorY+k)/2:k});e.label.attr(b);n&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,c,d,k)},32))},hide:function(a){var h=this;clearTimeout(this.hideTimer);a=p(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=c(function(){h.label[a?"fadeOut":"hide"]();h.isHidden=!0},a))},getAnchor:function(a,c){var d,k=this.chart,e=k.inverted,
b=k.plotTop,n=k.plotLeft,h=0,m=0,A,u;a=q(a);d=a[0].tooltipPos;this.followPointer&&c&&(void 0===c.chartX&&(c=k.pointer.normalize(c)),d=[c.chartX-k.plotLeft,c.chartY-b]);d||(F(a,function(a){A=a.series.yAxis;u=a.series.xAxis;h+=a.plotX+(!e&&u?u.left-n:0);m+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&A?A.top-b:0)}),h/=a.length,m/=a.length,d=[e?k.plotWidth-m:h,this.shared&&!e&&1<a.length&&c?c.chartY-b:e?k.plotHeight-h:m]);return l(d,Math.round)},getPosition:function(a,c,d){var k=this.chart,e=this.distance,
b={},n=d.h||0,h,m=["y",k.chartHeight,c,d.plotY+k.plotTop,k.plotTop,k.plotTop+k.plotHeight],A=["x",k.chartWidth,a,d.plotX+k.plotLeft,k.plotLeft,k.plotLeft+k.plotWidth],u=!this.followPointer&&p(d.ttBelow,!k.inverted===!!d.negative),x=function(a,d,c,k,r,y){var h=c<k-e,C=k+e+c<d,m=k-e-c;k+=e;if(u&&C)b[a]=k;else if(!u&&h)b[a]=m;else if(h)b[a]=Math.min(y-c,0>m-n?m:m-n);else if(C)b[a]=Math.max(r,k+n+c>d?k:k+n);else return!1},y=function(a,d,c,k){var r;k<e||k>d-e?r=!1:b[a]=k<c/2?1:k>d-c/2?d-c-2:k-c/2;return r},
r=function(a){var d=m;m=A;A=d;h=a},C=function(){!1!==x.apply(0,m)?!1!==y.apply(0,A)||h||(r(!0),C()):h?b.x=b.y=0:(r(!0),C())};(k.inverted||1<this.len)&&r();C();return b},defaultFormatter:function(a){var c=this.points||q(this),d;d=[a.tooltipFooterHeaderFormatter(c[0])];d=d.concat(a.bodyFormatter(c));d.push(a.tooltipFooterHeaderFormatter(c[0],!0));return d},refresh:function(a,c){var d=this.chart,k=this.label,e,b,n,m={},f,A=[];f=this.options.formatter||this.defaultFormatter;var m=d.hoverPoints,u=this.shared;
clearTimeout(this.hideTimer);this.followPointer=q(a)[0].series.tooltipOptions.followPointer;n=this.getAnchor(a,c);e=n[0];b=n[1];!u||a.series&&a.series.noSharedTooltip?m=a.getLabelConfig():(d.hoverPoints=a,m&&F(m,function(a){a.setState()}),F(a,function(a){a.setState("hover");A.push(a.getLabelConfig())}),m={x:a[0].category,y:a[0].y},m.points=A,this.len=A.length,a=a[0]);f=f.call(m,this);m=a.series;this.distance=p(m.tooltipOptions.distance,16);!1===f?this.hide():(this.isHidden&&(h(k),k.attr({opacity:1,
display:"block"}).show()),this.split?this.renderSplit(f,d.hoverPoints):(k.attr({text:f.join?f.join(""):f}),k.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+p(a.colorIndex,m.colorIndex)),this.updatePosition({plotX:e,plotY:b,negative:a.negative,ttBelow:a.ttBelow,h:n[2]||0})),this.isHidden=!1)},renderSplit:function(c,h){var d=this,k=[],e=this.chart,b=e.renderer,n=!0,m=this.options,f;F(c.slice(0,c.length-1),function(a,c){var x=h[c-1]||{isHeader:!0,plotX:h[0].plotX},y=x.series||d,
r=y.tt,C="highcharts-color-"+p(x.colorIndex,(x.series||{}).colorIndex,"none"),g;r||(y.tt=r=b.label(null,null,null,x.isHeader&&"callout").addClass("highcharts-tooltip-box "+C).attr({padding:m.padding,r:m.borderRadius}).add(d.label),x.series&&(r.connector=b.path().addClass("highcharts-tooltip-connector "+C).add(d.label),B(x.series,"hide",function(){var a=this.tt;a.connector=a.connector.destroy();a.destroy();this.tt=void 0})));r.isActive=!0;r.attr({text:a});C=r.getBBox();x.isHeader?(f=C.height,g=x.plotX+
e.plotLeft-C.width/2):g=x.plotX+e.plotLeft-p(m.distance,16)-C.width;0>g&&(n=!1);C=(x.series&&x.series.yAxis&&x.series.yAxis.pos)+(x.plotY||0);C-=e.plotTop;k.push({target:x.isHeader?e.plotHeight+f:C,rank:x.isHeader?1:0,size:y.tt.getBBox().height+1,point:x,x:g,tt:r})});F(e.series,function(a){var d=a.tt;d&&(d.isActive?d.isActive=!1:(d.connector=d.connector.destroy(),d.destroy(),a.tt=void 0))});a.distribute(k,e.plotHeight+f);F(k,function(a){var d=a.point,b=a.tt,c;c={display:void 0===a.pos?"none":"",x:n||
d.isHeader?a.x:d.plotX+e.plotLeft+p(m.distance,16),y:a.pos+e.plotTop};d.isHeader&&(c.anchorX=d.plotX+e.plotLeft,c.anchorY=c.y-100);b.attr(c);d.isHeader||b.connector.attr({d:["M",d.plotX+e.plotLeft,d.plotY+d.series.yAxis.pos,"L",n?d.plotX+e.plotLeft-p(m.distance,16):d.plotX+e.plotLeft+p(m.distance,16),a.pos+e.plotTop+b.getBBox().height/2]})})},updatePosition:function(a){var c=this.chart,d=this.label,d=(this.options.positioner||this.getPosition).call(this,d.width,d.height,a);this.move(Math.round(d.x),
Math.round(d.y||0),a.plotX+c.plotLeft,a.plotY+c.plotTop)},getXDateFormat:function(a,c,d){var k;c=c.dateTimeLabelFormats;var e=d&&d.closestPointRange,b,n={millisecond:15,second:12,minute:9,hour:6,day:3},h,f="millisecond";if(e){h=D("%m-%d %H:%M:%S.%L",a.x);for(b in m){if(e===m.week&&+D("%w",a.x)===d.options.startOfWeek&&"00:00:00.000"===h.substr(6)){b="week";break}if(m[b]>e){b=f;break}if(n[b]&&h.substr(n[b])!=="01-01 00:00:00.000".substr(n[b]))break;"week"!==b&&(f=b)}b&&(k=c[b])}else k=c.day;return k||
c.year},tooltipFooterHeaderFormatter:function(a,c){var d=c?"footer":"header",k=a.series,e=k.tooltipOptions,b=e.xDateFormat,n=k.xAxis,h=n&&"datetime"===n.options.type&&f(a.key),d=e[d+"Format"];h&&!b&&(b=this.getXDateFormat(a,e,n));h&&b&&(d=d.replace("{point.key}","{point.key:"+b+"}"));return t(d,{point:a,series:k})},bodyFormatter:function(a){return l(a,function(a){var d=a.series.tooltipOptions;return(d.pointFormatter||a.point.tooltipFormatter).call(a.point,d.pointFormat)})}}})(J);(function(a){var B=
a.addEvent,D=a.attr,F=a.charts,H=a.css,t=a.defined,f=a.doc,l=a.each,g=a.extend,p=a.fireEvent,q=a.offset,h=a.pick,c=a.removeEvent,m=a.splat,v=a.Tooltip,z=a.win;a.hasTouch=f&&void 0!==f.documentElement.ontouchstart;a.Pointer=function(a,c){this.init(a,c)};a.Pointer.prototype={init:function(a,c){this.options=c;this.chart=a;this.runChartClick=c.chart.events&&!!c.chart.events.click;this.pinchDown=[];this.lastValidTouch={};v&&c.tooltip.enabled&&(a.tooltip=new v(a,c.tooltip),this.followTouchMove=h(c.tooltip.followTouchMove,
!0));this.setDOMEvents()},zoomOption:function(){var a=this.chart,c=a.options.chart.zoomType,e=/x/.test(c),c=/y/.test(c),a=a.inverted;this.zoomX=e;this.zoomY=c;this.zoomHor=e&&!a||c&&a;this.zoomVert=c&&!a||e&&a;this.hasZoom=e||c},normalize:function(a,c){var e,b;a=a||z.event;a.target||(a.target=a.srcElement);b=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;c||(this.chartPosition=c=q(this.chart.container));void 0===b.pageX?(e=Math.max(a.x,a.clientX-c.left),b=a.y):(e=b.pageX-c.left,
b=b.pageY-c.top);return g(a,{chartX:Math.round(e),chartY:Math.round(b)})},getCoordinates:function(a){var c={xAxis:[],yAxis:[]};l(this.chart.axes,function(e){c[e.isXAxis?"xAxis":"yAxis"].push({axis:e,value:e.toValue(a[e.horiz?"chartX":"chartY"])})});return c},runPointActions:function(d){var c=this.chart,e=c.series,b=c.tooltip,n=b?b.shared:!1,m=!0,g=c.hoverPoint,A=c.hoverSeries,u,x,y,r=[],C;if(!n&&!A)for(u=0;u<e.length;u++)if(e[u].directTouch||!e[u].options.stickyTracking)e=[];A&&(n?A.noSharedTooltip:
A.directTouch)&&g?r=[g]:(n||!A||A.options.stickyTracking||(e=[A]),l(e,function(a){x=a.noSharedTooltip&&n;y=!n&&a.directTouch;a.visible&&!x&&!y&&h(a.options.enableMouseTracking,!0)&&(C=a.searchPoint(d,!x&&1===a.kdDimensions))&&C.series&&r.push(C)}),r.sort(function(a,d){var b=a.distX-d.distX,c=a.dist-d.dist;return 0!==b?b:0!==c?c:a.series.group.zIndex>d.series.group.zIndex?-1:1}));if(n)for(u=r.length;u--;)(r[u].clientX!==r[0].clientX||r[u].series.noSharedTooltip)&&r.splice(u,1);if(r[0]&&(r[0]!==this.hoverPoint||
b&&b.isHidden)){if(n&&!r[0].series.noSharedTooltip){for(u=0;0<=u;u--)r[u].onMouseOver(d,r[u]!==(A&&A.directTouch&&g||r[0]));if(A&&A.directTouch&&g&&g!==r[0])g.onMouseOver(d,!1);r.length&&b&&b.refresh(r.sort(function(a,d){return a.series.index-d.series.index}),d)}else if(b&&b.refresh(r[0],d),!A||!A.directTouch)r[0].onMouseOver(d);this.prevKDPoint=r[0];m=!1}m&&(e=A&&A.tooltipOptions.followPointer,b&&e&&!b.isHidden&&(e=b.getAnchor([{}],d),b.updatePosition({plotX:e[0],plotY:e[1]})));this._onDocumentMouseMove||
(this._onDocumentMouseMove=function(d){if(F[a.hoverChartIndex])F[a.hoverChartIndex].pointer.onDocumentMouseMove(d)},B(f,"mousemove",this._onDocumentMouseMove));l(n?r:[h(g,r[0])],function(a){l(c.axes,function(b){(!a||a.series&&a.series[b.coll]===b)&&b.drawCrosshair(d,a)})})},reset:function(a,k){var e=this.chart,b=e.hoverSeries,n=e.hoverPoint,h=e.hoverPoints,g=e.tooltip,A=g&&g.shared?h:n;a&&A&&l(m(A),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)g&&A&&(g.refresh(A),n&&(n.setState(n.state,
!0),l(e.axes,function(a){a.crosshair&&a.drawCrosshair(null,n)})));else{if(n)n.onMouseOut();h&&l(h,function(a){a.setState()});if(b)b.onMouseOut();g&&g.hide(k);this._onDocumentMouseMove&&(c(f,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null);l(e.axes,function(a){a.hideCrosshair()});this.hoverX=this.prevKDPoint=e.hoverPoints=e.hoverPoint=null}},scaleGroups:function(a,c){var e=this.chart,b;l(e.series,function(n){b=a||n.getPlotBox();n.xAxis&&n.xAxis.zoomEnabled&&(n.group.attr(b),n.markerGroup&&
(n.markerGroup.attr(b),n.markerGroup.clip(c?e.clipRect:null)),n.dataLabelsGroup&&n.dataLabelsGroup.attr(b))});e.clipRect.attr(c||e.clipBox)},dragStart:function(a){var c=this.chart;c.mouseIsDown=a.type;c.cancelClick=!1;c.mouseDownX=this.mouseDownX=a.chartX;c.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var c=this.chart,e=c.options.chart,b=a.chartX,n=a.chartY,h=this.zoomHor,m=this.zoomVert,f=c.plotLeft,u=c.plotTop,x=c.plotWidth,y=c.plotHeight,r,C=this.selectionMarker,g=this.mouseDownX,w=this.mouseDownY,
l=e.panKey&&a[e.panKey+"Key"];C&&C.touch||(b<f?b=f:b>f+x&&(b=f+x),n<u?n=u:n>u+y&&(n=u+y),this.hasDragged=Math.sqrt(Math.pow(g-b,2)+Math.pow(w-n,2)),10<this.hasDragged&&(r=c.isInsidePlot(g-f,w-u),c.hasCartesianSeries&&(this.zoomX||this.zoomY)&&r&&!l&&!C&&(this.selectionMarker=C=c.renderer.rect(f,u,h?1:x,m?1:y,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add()),C&&h&&(b-=g,C.attr({width:Math.abs(b),x:(0<b?0:b)+g})),C&&m&&(b=n-w,C.attr({height:Math.abs(b),y:(0<b?0:b)+w})),r&&!C&&e.panning&&
c.pan(a,e.panning)))},drop:function(a){var c=this,e=this.chart,b=this.hasPinched;if(this.selectionMarker){var n={originalEvent:a,xAxis:[],yAxis:[]},h=this.selectionMarker,m=h.attr?h.attr("x"):h.x,f=h.attr?h.attr("y"):h.y,u=h.attr?h.attr("width"):h.width,x=h.attr?h.attr("height"):h.height,y;if(this.hasDragged||b)l(e.axes,function(e){if(e.zoomEnabled&&t(e.min)&&(b||c[{xAxis:"zoomX",yAxis:"zoomY"}[e.coll]])){var h=e.horiz,g="touchend"===a.type?e.minPixelPadding:0,w=e.toValue((h?m:f)+g),h=e.toValue((h?
m+u:f+x)-g);n[e.coll].push({axis:e,min:Math.min(w,h),max:Math.max(w,h)});y=!0}}),y&&p(e,"selection",n,function(a){e.zoom(g(a,b?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();b&&this.scaleGroups()}e&&(H(e.container,{cursor:e._cursor}),e.cancelClick=10<this.hasDragged,e.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a);this.zoomOption();a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(d){F[a.hoverChartIndex]&&
F[a.hoverChartIndex].pointer.drop(d)},onDocumentMouseMove:function(a){var c=this.chart,e=this.chartPosition;a=this.normalize(a,e);!e||this.inClass(a.target,"highcharts-tracker")||c.isInsidePlot(a.chartX-c.plotLeft,a.chartY-c.plotTop)||this.reset()},onContainerMouseLeave:function(d){var c=F[a.hoverChartIndex];c&&(d.relatedTarget||d.toElement)&&(c.pointer.reset(),c.pointer.chartPosition=null)},onContainerMouseMove:function(d){var c=this.chart;t(a.hoverChartIndex)&&F[a.hoverChartIndex]&&F[a.hoverChartIndex].mouseIsDown||
(a.hoverChartIndex=c.index);d=this.normalize(d);d.returnValue=!1;"mousedown"===c.mouseIsDown&&this.drag(d);!this.inClass(d.target,"highcharts-tracker")&&!c.isInsidePlot(d.chartX-c.plotLeft,d.chartY-c.plotTop)||c.openMenu||this.runPointActions(d)},inClass:function(a,c){for(var e;a;){if(e=D(a,"class")){if(-1!==e.indexOf(c))return!0;if(-1!==e.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var c=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;if(c&&a&&!c.options.stickyTracking&&
!this.inClass(a,"highcharts-tooltip")&&!this.inClass(a,"highcharts-series-"+c.index))c.onMouseOut()},onContainerClick:function(a){var c=this.chart,e=c.hoverPoint,b=c.plotLeft,n=c.plotTop;a=this.normalize(a);c.cancelClick||(e&&this.inClass(a.target,"highcharts-tracker")?(p(e.series,"click",g(a,{point:e})),c.hoverPoint&&e.firePointEvent("click",a)):(g(a,this.getCoordinates(a)),c.isInsidePlot(a.chartX-b,a.chartY-n)&&p(c,"click",a)))},setDOMEvents:function(){var d=this,c=d.chart.container;c.onmousedown=
function(a){d.onContainerMouseDown(a)};c.onmousemove=function(a){d.onContainerMouseMove(a)};c.onclick=function(a){d.onContainerClick(a)};B(c,"mouseleave",d.onContainerMouseLeave);1===a.chartCount&&B(f,"mouseup",d.onDocumentMouseUp);a.hasTouch&&(c.ontouchstart=function(a){d.onContainerTouchStart(a)},c.ontouchmove=function(a){d.onContainerTouchMove(a)},1===a.chartCount&&B(f,"touchend",d.onDocumentTouchEnd))},destroy:function(){var d;c(this.chart.container,"mouseleave",this.onContainerMouseLeave);a.chartCount||
(c(f,"mouseup",this.onDocumentMouseUp),c(f,"touchend",this.onDocumentTouchEnd));clearInterval(this.tooltipTimeout);for(d in this)this[d]=null}}})(J);(function(a){var B=a.charts,D=a.each,F=a.extend,H=a.map,t=a.noop,f=a.pick;F(a.Pointer.prototype,{pinchTranslate:function(a,f,p,q,h,c){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,a,f,p,q,h,c);(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,a,f,p,q,h,c)},pinchTranslateDirection:function(a,f,p,q,h,c,m,v){var z=this.chart,
d=a?"x":"y",k=a?"X":"Y",e="chart"+k,b=a?"width":"height",n=z["plot"+(a?"Left":"Top")],G,E,A=v||1,u=z.inverted,x=z.bounds[a?"h":"v"],y=1===f.length,r=f[0][e],C=p[0][e],K=!y&&f[1][e],w=!y&&p[1][e],I;p=function(){!y&&20<Math.abs(r-K)&&(A=v||Math.abs(C-w)/Math.abs(r-K));E=(n-C)/A+r;G=z["plot"+(a?"Width":"Height")]/A};p();f=E;f<x.min?(f=x.min,I=!0):f+G>x.max&&(f=x.max-G,I=!0);I?(C-=.8*(C-m[d][0]),y||(w-=.8*(w-m[d][1])),p()):m[d]=[C,w];u||(c[d]=E-n,c[b]=G);c=u?1/A:A;h[b]=G;h[d]=f;q[u?a?"scaleY":"scaleX":
"scale"+k]=A;q["translate"+k]=c*n+(C-c*r)},pinch:function(a){var g=this,p=g.chart,q=g.pinchDown,h=a.touches,c=h.length,m=g.lastValidTouch,v=g.hasZoom,z=g.selectionMarker,d={},k=1===c&&(g.inClass(a.target,"highcharts-tracker")&&p.runTrackerClick||g.runChartClick),e={};1<c&&(g.initiated=!0);v&&g.initiated&&!k&&a.preventDefault();H(h,function(a){return g.normalize(a)});"touchstart"===a.type?(D(h,function(a,d){q[d]={chartX:a.chartX,chartY:a.chartY}}),m.x=[q[0].chartX,q[1]&&q[1].chartX],m.y=[q[0].chartY,
q[1]&&q[1].chartY],D(p.axes,function(a){if(a.zoomEnabled){var d=p.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,e=a.toPixels(f(a.options.min,a.dataMin)),k=a.toPixels(f(a.options.max,a.dataMax)),h=Math.max(e,k);d.min=Math.min(a.pos,Math.min(e,k)-c);d.max=Math.max(a.pos+a.len,h+c)}}),g.res=!0):q.length&&(z||(g.selectionMarker=z=F({destroy:t,touch:!0},p.plotBox)),g.pinchTranslate(q,h,d,z,e,m),g.hasPinched=v,g.scaleGroups(d,e),!v&&g.followTouchMove&&1===c?this.runPointActions(g.normalize(a)):g.res&&(g.res=
!1,this.reset(!1,0)))},touch:function(l,g){var p=this.chart,q;a.hoverChartIndex=p.index;1===l.touches.length?(l=this.normalize(l),p.isInsidePlot(l.chartX-p.plotLeft,l.chartY-p.plotTop)&&!p.openMenu?(g&&this.runPointActions(l),"touchmove"===l.type&&(p=this.pinchDown,q=p[0]?4<=Math.sqrt(Math.pow(p[0].chartX-l.chartX,2)+Math.pow(p[0].chartY-l.chartY,2)):!1),f(q,!0)&&this.pinch(l)):g&&this.reset()):2===l.touches.length&&this.pinch(l)},onContainerTouchStart:function(a){this.zoomOption();this.touch(a,!0)},
onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(f){B[a.hoverChartIndex]&&B[a.hoverChartIndex].pointer.drop(f)}})})(J);(function(a){var B=a.addEvent,D=a.charts,F=a.css,H=a.doc,t=a.extend,f=a.noop,l=a.Pointer,g=a.removeEvent,p=a.win,q=a.wrap;if(p.PointerEvent||p.MSPointerEvent){var h={},c=!!p.PointerEvent,m=function(){var a,d=[];d.item=function(a){return this[a]};for(a in h)h.hasOwnProperty(a)&&d.push({pageX:h[a].pageX,pageY:h[a].pageY,target:h[a].target});return d},v=function(c,
d,k,e){"touch"!==c.pointerType&&c.pointerType!==c.MSPOINTER_TYPE_TOUCH||!D[a.hoverChartIndex]||(e(c),e=D[a.hoverChartIndex].pointer,e[d]({type:k,target:c.currentTarget,preventDefault:f,touches:m()}))};t(l.prototype,{onContainerPointerDown:function(a){v(a,"onContainerTouchStart","touchstart",function(a){h[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){v(a,"onContainerTouchMove","touchmove",function(a){h[a.pointerId]={pageX:a.pageX,pageY:a.pageY};
h[a.pointerId].target||(h[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){v(a,"onDocumentTouchEnd","touchend",function(a){delete h[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,c?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,c?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(H,c?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});q(l.prototype,"init",function(a,d,c){a.call(this,d,c);this.hasZoom&&F(d.container,
{"-ms-touch-action":"none","touch-action":"none"})});q(l.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(B)});q(l.prototype,"destroy",function(a){this.batchMSEvents(g);a.call(this)})}})(J);(function(a){var B,D=a.addEvent,F=a.css,H=a.discardElement,t=a.defined,f=a.each,l=a.extend,g=a.isFirefox,p=a.marginNames,q=a.merge,h=a.pick,c=a.setAnimation,m=a.stableSort,v=a.win,z=a.wrap;B=a.Legend=function(a,c){this.init(a,c)};B.prototype={init:function(a,
c){this.chart=a;this.setOptions(c);c.enabled&&(this.render(),D(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(a){var c=h(a.padding,8);this.options=a;this.itemMarginTop=a.itemMarginTop||0;this.initialItemX=this.padding=c;this.initialItemY=c-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=h(a.symbolWidth,16);this.pages=[]},update:function(a,c){var e=this.chart;this.setOptions(q(!0,this.options,a));this.destroy();e.isDirtyLegend=e.isDirtyBox=!0;h(c,
!0)&&e.redraw()},colorizeItem:function(a,c){a.legendGroup[c?"removeClass":"addClass"]("highcharts-legend-item-hidden")},positionItem:function(a){var c=this.options,e=c.symbolPadding,c=!c.rtl,b=a._legendItemPos,n=b[0],b=b[1],h=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(c?n:this.legendWidth-n-2*e-4,b);h&&(h.x=n,h.y=b)},destroyItem:function(a){var c=a.checkbox;f(["legendItem","legendLine","legendSymbol","legendGroup"],function(c){a[c]&&(a[c]=a[c].destroy())});c&&H(a.checkbox)},destroy:function(){var a=
this.group,c=this.box;c&&(this.box=c.destroy());f(this.getAllItems(),function(a){f(["legendItem","legendGroup"],function(d){a[d]&&(a[d]=a[d].destroy())})});a&&(this.group=a.destroy())},positionCheckboxes:function(a){var c=this.group.alignAttr,e,b=this.clipHeight||this.legendHeight,n=this.titleHeight;c&&(e=c.translateY,f(this.allItems,function(h){var m=h.checkbox,f;m&&(f=e+n+m.y+(a||0)+3,F(m,{left:c.translateX+h.checkboxOffset+m.x-20+"px",top:f+"px",display:f>e-6&&f<e+b-6?"":"none"}))}))},renderTitle:function(){var a=
this.padding,c=this.options.title,e=0;c.text&&(this.title||(this.title=this.chart.renderer.label(c.text,a-3,a-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).add(this.group)),a=this.title.getBBox(),e=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:e}));this.titleHeight=e},setText:function(d){var c=this.options;d.legendItem.attr({text:c.labelFormat?a.format(c.labelFormat,d):c.labelFormatter.call(d)})},renderItem:function(a){var c=this.chart,e=c.renderer,b=this.options,
n="horizontal"===b.layout,m=this.symbolWidth,f=b.symbolPadding,g=this.padding,u=n?h(b.itemDistance,20):0,x=!b.rtl,y=b.width,r=b.itemMarginBottom||0,C=this.itemMarginTop,l=this.initialItemX,w=a.legendItem,q=!a.series,v=!q&&a.series.drawLegendSymbol?a.series:a,p=v.options,p=this.createCheckboxForItem&&p&&p.showCheckbox,z=b.useHTML;w||(a.legendGroup=e.g("legend-item").addClass("highcharts-"+v.type+"-series highcharts-color-"+a.colorIndex+" "+(a.options.className||"")+(q?"highcharts-series-"+a.index:
"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=w=e.text("",x?m+f:-f,this.baseline||0,z).attr({align:x?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=e.fontMetrics(12,w),this.baseline=this.fontMetrics.f+3+C,w.attr("y",this.baseline)),v.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,w,z),p&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);this.setText(a);e=w.getBBox();m=a.checkboxOffset=b.itemWidth||a.legendItemWidth||m+f+e.width+
u+(p?20:0);this.itemHeight=f=Math.round(a.legendItemHeight||e.height);n&&this.itemX-l+m>(y||c.chartWidth-2*g-l-b.x)&&(this.itemX=l,this.itemY+=C+this.lastLineHeight+r,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,m);this.lastItemY=C+this.itemY+r;this.lastLineHeight=Math.max(f,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];n?this.itemX+=m:(this.itemY+=C+f+r,this.lastLineHeight=f);this.offsetWidth=y||Math.max((n?this.itemX-l-u:m)+g,this.offsetWidth)},getAllItems:function(){var a=
[];f(this.chart.series,function(c){var e=c&&c.options;c&&h(e.showInLegend,t(e.linkedTo)?!1:void 0,!0)&&(a=a.concat(c.legendItems||("point"===e.legendType?c.data:c)))});return a},adjustMargins:function(a,c){var e=this.chart,b=this.options,n=b.align.charAt(0)+b.verticalAlign.charAt(0)+b.layout.charAt(0);b.floating||f([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(m,f){m.test(n)&&!t(a[f])&&(e[p[f]]=Math.max(e[p[f]],e.legend[(f+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][f]*
b[f%2?"x":"y"]+h(b.margin,12)+c[f]))})},render:function(){var a=this,c=a.chart,e=c.renderer,b=a.group,n,h,g,A,u=a.box,x=a.options,y=a.padding;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;b||(a.group=b=e.g("legend").attr({zIndex:7}).add(),a.contentGroup=e.g().attr({zIndex:1}).add(b),a.scrollGroup=e.g().add(a.contentGroup));a.renderTitle();n=a.getAllItems();m(n,function(a,d){return(a.options&&a.options.legendIndex||0)-(d.options&&d.options.legendIndex||0)});x.reversed&&
n.reverse();a.allItems=n;a.display=h=!!n.length;a.lastLineHeight=0;f(n,function(b){a.renderItem(b)});g=(x.width||a.offsetWidth)+y;A=a.lastItemY+a.lastLineHeight+a.titleHeight;A=a.handleOverflow(A);A+=y;u||(a.box=u=e.rect().addClass("highcharts-legend-box").attr({r:x.borderRadius}).add(b),u.isNew=!0);0<g&&0<A&&(u[u.isNew?"attr":"animate"](u.crisp({x:0,y:0,width:g,height:A},u.strokeWidth())),u.isNew=!1);u[h?"show":"hide"]();"none"===b.getStyle("display")&&(g=A=0);a.legendWidth=g;a.legendHeight=A;f(n,
function(b){a.positionItem(b)});h&&b.align(l({width:g,height:A},x),!0,"spacingBox");c.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var c=this,e=this.chart,b=e.renderer,n=this.options,m=n.y,m=e.spacingBox.height+("top"===n.verticalAlign?-m:m)-this.padding,g=n.maxHeight,A,u=this.clipRect,x=n.navigation,y=h(x.animation,!0),r=x.arrowSize||12,C=this.nav,l=this.pages,w=this.padding,q,v=this.allItems,p=function(a){u.attr({height:a});c.contentGroup.div&&(c.contentGroup.div.style.clip=
"rect("+w+"px,9999px,"+(w+a)+"px,0)")};"horizontal"===n.layout&&(m/=2);g&&(m=Math.min(m,g));l.length=0;a>m&&!1!==x.enabled?(this.clipHeight=A=Math.max(m-20-this.titleHeight-w,0),this.currentPage=h(this.currentPage,1),this.fullHeight=a,f(v,function(a,d){var b=a._legendItemPos[1],c=Math.round(a.legendItem.getBBox().height),e=l.length;if(!e||b-l[e-1]>A&&(q||b)!==l[e-1])l.push(q||b),e++;d===v.length-1&&b+c-l[e-1]>A&&l.push(b);b!==q&&(q=b)}),u||(u=c.clipRect=b.clipRect(0,w,9999,0),c.contentGroup.clip(u)),
p(A),C||(this.nav=C=b.g().attr({zIndex:1}).add(this.group),this.up=b.symbol("triangle",0,0,r,r).on("click",function(){c.scroll(-1,y)}).add(C),this.pager=b.text("",15,10).addClass("highcharts-legend-navigation").add(C),this.down=b.symbol("triangle-down",0,0,r,r).on("click",function(){c.scroll(1,y)}).add(C)),c.scroll(0),a=m):C&&(p(e.chartHeight),C.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,k){var e=this.pages,b=e.length,n=this.currentPage+a,h=this.clipHeight,
m=this.pager,f=this.padding;n>b&&(n=b);0<n&&(void 0!==k&&c(k,this.chart),this.nav.attr({translateX:f,translateY:h+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===n?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),m.attr({text:n+"/"+b}),this.down.attr({x:18+this.pager.getBBox().width,"class":n===b?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),e=-e[n-1]+this.initialItemY,this.scrollGroup.animate({translateY:e}),this.currentPage=n,
this.positionCheckboxes(e))}};a.LegendSymbolMixin={drawRectangle:function(a,c){var e=a.options,b=e.symbolHeight||a.fontMetrics.f,e=e.squareSymbol;c.legendSymbol=this.chart.renderer.rect(e?(a.symbolWidth-b)/2:0,a.baseline-b+1,e?b:a.symbolWidth,b,h(a.options.symbolRadius,b/2)).addClass("highcharts-point").attr({zIndex:3}).add(c.legendGroup)},drawLineMarker:function(a){var c=this.options.marker,e=a.symbolWidth,b=this.chart.renderer,n=this.legendGroup,h=a.baseline-Math.round(.3*a.fontMetrics.b);this.legendLine=
b.path(["M",0,h,"L",e,h]).addClass("highcharts-graph").attr({}).add(n);c&&!1!==c.enabled&&(a=c.radius,this.legendSymbol=c=b.symbol(this.symbol,e/2-a,h-a,2*a,2*a,c).addClass("highcharts-point").add(n),c.isMarker=!0)}};(/Trident\/7\.0/.test(v.navigator.userAgent)||g)&&z(B.prototype,"positionItem",function(a,c){var e=this,b=function(){c._legendItemPos&&a.call(e,c)};b();setTimeout(b)})})(J);(function(a){var B=a.addEvent,D=a.animObject,F=a.attr,H=a.doc,t=a.Axis,f=a.createElement,l=a.defaultOptions,g=a.discardElement,
p=a.charts,q=a.css,h=a.defined,c=a.each,m=a.error,v=a.extend,z=a.fireEvent,d=a.getStyle,k=a.grep,e=a.isNumber,b=a.isObject,n=a.isString,G=a.Legend,E=a.marginNames,A=a.merge,u=a.Pointer,x=a.pick,y=a.pInt,r=a.removeEvent,C=a.seriesTypes,K=a.splat,w=a.svg,I=a.syncTimeout,N=a.win,P=a.Renderer,L=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,b,d){return new L(a,b,d)};L.prototype={callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(n(a[0])||a[0].nodeName)this.renderTo=
a.shift();this.init(a[0],a[1])},init:function(b,d){var c,e=b.series;b.series=null;c=A(l,b);c.series=b.series=e;this.userOptions=b;this.respRules=[];var e=c.chart,r=e.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.callback=d;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=e.showAxes;var n;this.index=p.length;p.push(this);a.chartCount++;if(r)for(n in r)B(this,n,r[n]);this.xAxis=[];this.yAxis=[];this.pointCount=this.colorCounter=this.symbolCounter=
0;this.firstRender()},initSeries:function(a){var b=this.options.chart;(b=C[a.type||b.type||b.defaultSeriesType])||m(17,!0);b=new b;b.init(this,a);return b},isInsidePlot:function(a,b,d){var c=d?b:a;a=d?a:b;return 0<=c&&c<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(b){var d=this.axes,e=this.series,r=this.pointer,n=this.legend,h=this.isDirtyLegend,k,y,m=this.hasCartesianSeries,C=this.isDirtyBox,f=e.length,u=f,w=this.renderer,g=w.isHidden(),x=[];a.setAnimation(b,this);g&&this.cloneRenderTo();
for(this.layOutTitles();u--;)if(b=e[u],b.options.stacking&&(k=!0,b.isDirty)){y=!0;break}if(y)for(u=f;u--;)b=e[u],b.options.stacking&&(b.isDirty=!0);c(e,function(a){a.isDirty&&"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),h=!0);a.isDirtyData&&z(a,"updatedData")});h&&n.options.enabled&&(n.render(),this.isDirtyLegend=!1);k&&this.getStacks();m&&c(d,function(a){a.updateNames();a.setScale()});this.getMargins();m&&(c(d,function(a){a.isDirty&&(C=!0)}),c(d,function(a){var b=a.min+","+a.max;
a.extKey!==b&&(a.extKey=b,x.push(function(){z(a,"afterSetExtremes",v(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(C||k)&&a.redraw()}));C&&this.drawChartBox();c(e,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});r&&r.reset(!0);w.draw();z(this,"redraw");g&&this.cloneRenderTo(!0);c(x,function(a){a.call()})},get:function(a){var b=this.axes,d=this.series,c,e;for(c=0;c<b.length;c++)if(b[c].options.id===a)return b[c];for(c=0;c<d.length;c++)if(d[c].options.id===a)return d[c];
for(c=0;c<d.length;c++)for(e=d[c].points||[],b=0;b<e.length;b++)if(e[b].id===a)return e[b];return null},getAxes:function(){var a=this,b=this.options,d=b.xAxis=K(b.xAxis||{}),b=b.yAxis=K(b.yAxis||{});c(d,function(a,b){a.index=b;a.isX=!0});c(b,function(a,b){a.index=b});d=d.concat(b);c(d,function(b){new t(a,b)})},getSelectedPoints:function(){var a=[];c(this.series,function(b){a=a.concat(k(b.points||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return k(this.series,function(a){return a.selected})},
setTitle:function(a,b,d){var e=this,r=e.options,n;n=r.title=A(r.title,a);r=r.subtitle=A(r.subtitle,b);c([["title",a,n],["subtitle",b,r]],function(a,b){var d=a[0],c=e[d],r=a[1],n=a[2];c&&r&&(e[d]=c=c.destroy());n&&n.text&&!c&&(e[d]=e.renderer.text(n.text,0,0,n.useHTML).attr({align:n.align,"class":"highcharts-"+d,zIndex:n.zIndex||4}).add(),e[d].update=function(a){e.setTitle(!b&&a,b&&a)})});e.layOutTitles(d)},layOutTitles:function(a){var b=0,d,e=this.renderer,r=this.spacingBox;c(["title","subtitle"],
function(a){var d=this[a],c=this.options[a],n;d&&(n=e.fontMetrics(n,d).b,d.css({width:(c.width||r.width+c.widthAdjust)+"px"}).align(v({y:b+n+("title"===a?-3:2)},c),!1,"spacingBox"),c.floating||c.verticalAlign||(b=Math.ceil(b+d.getBBox().height)))},this);d=this.titleOffset!==b;this.titleOffset=b;!this.isDirtyBox&&d&&(this.isDirtyBox=d,this.hasRendered&&x(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var a=this.options.chart,b=a.width,a=a.height,c=this.renderToClone||this.renderTo;
h(b)||(this.containerWidth=d(c,"width"));h(a)||(this.containerHeight=d(c,"height"));this.chartWidth=Math.max(0,b||this.containerWidth||600);this.chartHeight=Math.max(0,x(a,19<this.containerHeight?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,d=this.container;if(a){if(b){for(;b.childNodes.length;)this.renderTo.appendChild(b.firstChild);g(b);delete this.renderToClone}}else d&&d.parentNode===this.renderTo&&this.renderTo.removeChild(d),this.renderToClone=b=this.renderTo.cloneNode(0),
q(b,{position:"absolute",top:"-9999px",display:"block"}),b.style.setProperty&&b.style.setProperty("display","block","important"),H.body.appendChild(b),d&&b.appendChild(d)},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var b,d=this.options,c=d.chart,r,h;b=this.renderTo;var k="highcharts-"+a.idCounter++,C;b||(this.renderTo=b=c.renderTo);n(b)&&(this.renderTo=b=H.getElementById(b));b||m(13,!0);r=y(F(b,"data-highcharts-chart"));e(r)&&p[r]&&p[r].hasRendered&&
p[r].destroy();F(b,"data-highcharts-chart",this.index);b.innerHTML="";c.skipClone||b.offsetWidth||this.cloneRenderTo();this.getChartSize();r=this.chartWidth;h=this.chartHeight;this.container=b=f("div",{id:k},void 0,this.renderToClone||b);this._cursor=b.style.cursor;this.renderer=new (a[c.renderer]||P)(b,r,h,null,c.forExport,d.exporting&&d.exporting.allowHTML);this.setClassName(c.className);for(C in d.defs)this.renderer.definition(d.defs[C]);this.renderer.chartIndex=this.index},getMargins:function(a){var b=
this.spacing,d=this.margin,c=this.titleOffset;this.resetMargins();c&&!h(d[0])&&(this.plotTop=Math.max(this.plotTop,c+this.options.title.margin+b[0]));this.legend.display&&this.legend.adjustMargins(d,b);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],d=a.margin;a.hasCartesianSeries&&c(a.axes,function(a){a.visible&&a.getOffset()});c(E,function(c,
e){h(d[e])||(a[c]+=b[e])});a.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,e=b.renderTo,r=h(c.width),n=c.width||d(e,"width"),c=c.height||d(e,"height"),e=a?a.target:N;if(!r&&!b.isPrinting&&n&&c&&(e===N||e===H)){if(n!==b.containerWidth||c!==b.containerHeight)clearTimeout(b.reflowTimeout),b.reflowTimeout=I(function(){b.container&&b.setSize(void 0,void 0,!1)},a?100:0);b.containerWidth=n;b.containerHeight=c}},initReflow:function(){var a=this,b=function(b){a.reflow(b)};B(N,"resize",b);
B(a,"destroy",function(){r(N,"resize",b)})},setSize:function(b,d,e){var r=this,n=r.renderer;r.isResizing+=1;a.setAnimation(e,r);r.oldChartHeight=r.chartHeight;r.oldChartWidth=r.chartWidth;void 0!==b&&(r.options.chart.width=b);void 0!==d&&(r.options.chart.height=d);r.getChartSize();r.setChartSize(!0);n.setSize(r.chartWidth,r.chartHeight,e);c(r.axes,function(a){a.isDirty=!0;a.setScale()});c(r.series,function(a){a.isDirty=!0});r.isDirtyLegend=!0;r.isDirtyBox=!0;r.layOutTitles();r.getMargins();r.setResponsive&&
r.setResponsive(!1);r.redraw(e);r.oldChartHeight=null;z(r,"resize");I(function(){r&&z(r,"endResize",null,function(){--r.isResizing})},D(void 0).duration)},setChartSize:function(a){var b=this.inverted,d=this.renderer,e=this.chartWidth,r=this.chartHeight,n=this.options.chart,h=this.spacing,k=this.clipOffset,y,m,C,f;this.plotLeft=y=Math.round(this.plotLeft);this.plotTop=m=Math.round(this.plotTop);this.plotWidth=C=Math.max(0,Math.round(e-y-this.marginRight));this.plotHeight=f=Math.max(0,Math.round(r-
m-this.marginBottom));this.plotSizeX=b?f:C;this.plotSizeY=b?C:f;this.plotBorderWidth=n.plotBorderWidth||0;this.spacingBox=d.spacingBox={x:h[3],y:h[0],width:e-h[3]-h[1],height:r-h[0]-h[2]};this.plotBox=d.plotBox={x:y,y:m,width:C,height:f};e=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(Math.max(e,k[3])/2);d=Math.ceil(Math.max(e,k[0])/2);this.clipBox={x:b,y:d,width:Math.floor(this.plotSizeX-Math.max(e,k[1])/2-b),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(e,k[2])/2-d))};a||c(this.axes,function(a){a.setAxisSize();
a.setAxisTranslation()})},resetMargins:function(){var a=this,d=a.options.chart;c(["margin","spacing"],function(e){var r=d[e],n=b(r)?r:[r,r,r,r];c(["Top","Right","Bottom","Left"],function(b,c){a[e][c]=x(d[e+b],n[c])})});c(E,function(b,d){a[b]=x(a.margin[d],a.spacing[d])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,d=this.chartWidth,c=this.chartHeight,e=this.chartBackground,r=this.plotBackground,n=this.plotBorder,h,k,y=this.plotLeft,
m=this.plotTop,C=this.plotWidth,f=this.plotHeight,u=this.plotBox,w=this.clipRect,g=this.clipBox,x="animate";e||(this.chartBackground=e=b.rect().addClass("highcharts-background").add(),x="attr");h=k=e.strokeWidth();e[x]({x:k/2,y:k/2,width:d-k-h%2,height:c-k-h%2,r:a.borderRadius});x="animate";r||(x="attr",this.plotBackground=r=b.rect().addClass("highcharts-plot-background").add());r[x](u);w?w.animate({width:g.width,height:g.height}):this.clipRect=b.clipRect(g);x="animate";n||(x="attr",this.plotBorder=
n=b.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());n[x](n.crisp({x:y,y:m,width:C,height:f},-n.strokeWidth()));this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,d,e=a.options.series,r,n;c(["inverted","angular","polar"],function(c){d=C[b.type||b.defaultSeriesType];n=b[c]||d&&d.prototype[c];for(r=e&&e.length;!n&&r--;)(d=C[e[r].type])&&d.prototype[c]&&(n=!0);a[c]=n})},linkSeries:function(){var a=this,b=a.series;c(b,function(a){a.linkedSeries.length=0});c(b,
function(b){var d=b.options.linkedTo;n(d)&&(d=":previous"===d?a.series[b.index-1]:a.get(d))&&d.linkedParent!==b&&(d.linkedSeries.push(b),b.linkedParent=d,b.visible=x(b.options.visible,d.options.visible,b.visible))})},renderSeries:function(){c(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&c(b.items,function(d){var c=v(b.style,d.style),e=y(c.left)+a.plotLeft,r=y(c.top)+a.plotTop+12;delete c.left;delete c.top;a.renderer.text(d.html,
e,r).attr({zIndex:2}).css(c).add()})},render:function(){var a=this.axes,b=this.renderer,d=this.options,e,r,n;this.setTitle();this.legend=new G(this,d.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();d=this.plotWidth;e=this.plotHeight-=21;c(a,function(a){a.setScale()});this.getAxisMargins();r=1.1<d/this.plotWidth;n=1.05<e/this.plotHeight;if(r||n)c(a,function(a){(a.horiz&&r||!a.horiz&&n)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&
c(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=A(!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&&(N.location.href=a.href)}).attr({align:a.position.align,
zIndex:8}).add().align(a.position),this.credits.update=function(a){b.credits=b.credits.destroy();b.addCredits(a)})},destroy:function(){var b=this,d=b.axes,e=b.series,n=b.container,h,k=n&&n.parentNode;z(b,"destroy");p[b.index]=void 0;a.chartCount--;b.renderTo.removeAttribute("data-highcharts-chart");r(b);for(h=d.length;h--;)d[h]=d[h].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(h=e.length;h--;)e[h]=e[h].destroy();c("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),
function(a){var d=b[a];d&&d.destroy&&(b[a]=d.destroy())});n&&(n.innerHTML="",r(n),k&&g(n));for(h in b)delete b[h]},isReadyToRender:function(){var a=this;return w||N!=N.top||"complete"===H.readyState?!0:(H.attachEvent("onreadystatechange",function(){H.detachEvent("onreadystatechange",a.firstRender);"complete"===H.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,b=a.options;if(a.isReadyToRender()){a.getContainer();z(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();
a.getAxes();c(b.series||[],function(b){a.initSeries(b)});a.linkSeries();z(a,"beforeRender");u&&(a.pointer=new u(a,b));a.render();a.renderer.draw();if(!a.renderer.imgCount&&a.onload)a.onload();a.cloneRenderTo(!0)}},onload:function(){c([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);z(this,"load");this.initReflow();this.onload=null}}})(J);(function(a){var B,D=a.each,F=a.extend,H=a.erase,t=a.fireEvent,f=a.format,l=a.isArray,g=a.isNumber,p=a.pick,
q=a.removeEvent;B=a.Point=function(){};B.prototype={init:function(a,c,m){var f=a.chart.options.chart.colorCount;this.series=a;this.applyOptions(c,m);a.options.colorByPoint?(c=a.colorCounter,a.colorCounter++,a.colorCounter===f&&(a.colorCounter=0)):c=a.colorIndex;this.colorIndex=p(this.colorIndex,c);a.chart.pointCount++;return this},applyOptions:function(a,c){var m=this.series,f=m.options.pointValKey||m.pointValKey;a=B.prototype.optionsToObject.call(this,a);F(this,a);this.options=this.options?F(this.options,
a):a;a.group&&delete this.group;f&&(this.y=this[f]);this.isNull=p(this.isValid&&!this.isValid(),null===this.x||!g(this.y,!0));"name"in this&&void 0===c&&m.xAxis&&m.xAxis.hasNames&&(this.x=m.xAxis.nameToX(this));void 0===this.x&&m&&(this.x=void 0===c?m.autoIncrement(this):c);return this},optionsToObject:function(a){var c={},m=this.series,f=m.options.keys,q=f||m.pointArrayMap||["y"],d=q.length,k=0,e=0;if(g(a)||null===a)c[q[0]]=a;else if(l(a))for(!f&&a.length>d&&(m=typeof a[0],"string"===m?c.name=a[0]:
"number"===m&&(c.x=a[0]),k++);e<d;)f&&void 0===a[k]||(c[q[e]]=a[k]),k++,e++;else"object"===typeof a&&(c=a,a.dataLabels&&(m._hasPointLabels=!0),a.marker&&(m._hasPointMarkers=!0));return c},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")},getZone:function(){var a=this.series,c=a.zones,a=a.zoneAxis||
"y",m=0,f;for(f=c[m];this[a]>=f.value;)f=c[++m];f&&f.color&&!this.options.color&&(this.color=f.color);return f},destroy:function(){var a=this.series.chart,c=a.hoverPoints,m;a.pointCount--;c&&(this.setState(),H(c,this),c.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)q(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(m in this)this[m]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper",
"connector","shadowGroup"],c,m=6;m--;)c=a[m],this[c]&&(this[c]=this[c].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,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,m=c.tooltipOptions,g=p(m.valueDecimals,""),l=m.valuePrefix||"",d=m.valueSuffix||"";D(c.pointArrayMap||["y"],function(c){c="{point."+c;if(l||d)a=a.replace(c+"}",l+c+"}"+d);a=a.replace(c+
"}",c+":,."+g+"f}")});return f(a,{point:this,series:this.series})},firePointEvent:function(a,c,m){var f=this,g=this.series.options;(g.point.events[a]||f.options&&f.options.events&&f.options.events[a])&&this.importEvents();"click"===a&&g.allowPointSelect&&(m=function(a){f.select&&f.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});t(this,a,c,m)},visible:!0}})(J);(function(a){var B=a.addEvent,D=a.animObject,F=a.arrayMax,H=a.arrayMin,t=a.correctFloat,f=a.Date,l=a.defaultOptions,g=a.defined,p=a.each,q=
a.erase,h=a.error,c=a.extend,m=a.fireEvent,v=a.grep,z=a.isArray,d=a.isNumber,k=a.isString,e=a.merge,b=a.pick,n=a.removeEvent,G=a.splat,E=a.stableSort,A=a.SVGElement,u=a.syncTimeout,x=a.win;a.Series=a.seriesType("line",null,{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{radius:4,states:{hover:{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:{hover:{lineWidthPlus:1,marker:{},halo:{size:10}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,d){var e=this,n,k,h=a.series,m=function(a,d){return b(a.options.index,a._i)-b(d.options.index,d._i)};e.chart=a;e.options=d=e.setOptions(d);e.linkedSeries=
[];e.bindAxes();c(e,{name:d.name,state:"",visible:!1!==d.visible,selected:!0===d.selected});k=d.events;for(n in k)B(e,n,k[n]);if(k&&k.click||d.point&&d.point.events&&d.point.events.click||d.allowPointSelect)a.runTrackerClick=!0;e.getColor();e.getSymbol();p(e.parallelArrays,function(a){e[a+"Data"]=[]});e.setData(d.data,!1);e.isCartesian&&(a.hasCartesianSeries=!0);h.push(e);e._i=h.length-1;E(h,m);this.yAxis&&E(this.yAxis.series,m);p(h,function(a,b){a.index=b;a.name=a.name||"Series "+(b+1)})},bindAxes:function(){var a=
this,b=a.options,d=a.chart,c;p(a.axisTypes||[],function(e){p(d[e],function(d){c=d.options;if(b[e]===c.index||void 0!==b[e]&&b[e]===c.id||void 0===b[e]&&0===c.index)d.series.push(a),a[e]=d,d.isDirty=!0});a[e]||a.optionalAxis===e||h(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,e=arguments,n=d(b)?function(d){var e="y"===d&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=e}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(e,2))};p(c.parallelArrays,n)},autoIncrement:function(){var a=
this.options,d=this.xIncrement,c,e=a.pointIntervalUnit,d=b(d,a.pointStart,0);this.pointInterval=c=b(this.pointInterval,a.pointInterval,1);e&&(a=new f(d),"day"===e?a=+a[f.hcSetDate](a[f.hcGetDate]()+c):"month"===e?a=+a[f.hcSetMonth](a[f.hcGetMonth]()+c):"year"===e&&(a=+a[f.hcSetFullYear](a[f.hcGetFullYear]()+c)),c=a-d);this.xIncrement=d+c;return d},setOptions:function(a){var b=this.chart,d=b.options.plotOptions,b=b.userOptions||{},c=b.plotOptions||{},n=d[this.type];this.userOptions=a;d=e(n,d.series,
a);this.tooltipOptions=e(l.tooltip,l.plotOptions[this.type].tooltip,b.tooltip,c.series&&c.series.tooltip,c[this.type]&&c[this.type].tooltip,a.tooltip);null===n.marker&&delete d.marker;this.zoneAxis=d.zoneAxis;a=this.zones=(d.zones||[]).slice();!d.negativeColor&&!d.negativeFillColor||d.zones||a.push({value:d[this.zoneAxis+"Threshold"]||d.threshold||0,className:"highcharts-negative"});a.length&&g(a[a.length-1].value)&&a.push({});return d},getCyclic:function(a,d,c){var e,n=this.userOptions,k=a+"Index",
h=a+"Counter",m=c?c.length:b(this.chart.options.chart[a+"Count"],this.chart[a+"Count"]);d||(e=b(n[k],n["_"+k]),g(e)||(n["_"+k]=e=this.chart[h]%m,this.chart[h]+=1),c&&(d=c[e]));void 0!==e&&(this[k]=e);this[a]=d},getColor:function(){this.getCyclic("color")},getSymbol:function(){var a=this.options.marker;this.getCyclic("symbol",a.symbol,this.chart.options.symbols);/^url/.test(this.symbol)&&(a.radius=0)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(a,c,e,n){var m=this,f=m.points,
u=f&&f.length||0,g,x=m.options,A=m.chart,l=null,q=m.xAxis,v=x.turboThreshold,E=this.xData,G=this.yData,t=(g=m.pointArrayMap)&&g.length;a=a||[];g=a.length;c=b(c,!0);if(!1!==n&&g&&u===g&&!m.cropped&&!m.hasGroupedData&&m.visible)p(a,function(a,b){f[b].update&&a!==x.data[b]&&f[b].update(a,!1,null,!1)});else{m.xIncrement=null;m.colorCounter=0;p(this.parallelArrays,function(a){m[a+"Data"].length=0});if(v&&g>v){for(e=0;null===l&&e<g;)l=a[e],e++;if(d(l))for(e=0;e<g;e++)E[e]=this.autoIncrement(),G[e]=a[e];
else if(z(l))if(t)for(e=0;e<g;e++)l=a[e],E[e]=l[0],G[e]=l.slice(1,t+1);else for(e=0;e<g;e++)l=a[e],E[e]=l[0],G[e]=l[1];else h(12)}else for(e=0;e<g;e++)void 0!==a[e]&&(l={series:m},m.pointClass.prototype.applyOptions.apply(l,[a[e]]),m.updateParallelArrays(l,e));k(G[0])&&h(14,!0);m.data=[];m.options.data=m.userOptions.data=a;for(e=u;e--;)f[e]&&f[e].destroy&&f[e].destroy();q&&(q.minRange=q.userMinRange);m.isDirty=A.isDirtyBox=!0;m.isDirtyData=!!f;e=!1}"point"===x.legendType&&(this.processData(),this.generatePoints());
c&&A.redraw(e)},processData:function(a){var b=this.xData,d=this.yData,c=b.length,e;e=0;var n,k,m=this.xAxis,f,u=this.options;f=u.cropThreshold;var g=this.getExtremesFromAll||u.getExtremesFromAll,x=this.isCartesian,u=m&&m.val2lin,A=m&&m.isLog,l,q;if(x&&!this.isDirty&&!m.isDirty&&!this.yAxis.isDirty&&!a)return!1;m&&(a=m.getExtremes(),l=a.min,q=a.max);if(x&&this.sorted&&!g&&(!f||c>f||this.forceCrop))if(b[c-1]<l||b[0]>q)b=[],d=[];else if(b[0]<l||b[c-1]>q)e=this.cropData(this.xData,this.yData,l,q),b=e.xData,
d=e.yData,e=e.start,n=!0;for(f=b.length||1;--f;)c=A?u(b[f])-u(b[f-1]):b[f]-b[f-1],0<c&&(void 0===k||c<k)?k=c:0>c&&this.requireSorting&&h(15);this.cropped=n;this.cropStart=e;this.processedXData=b;this.processedYData=d;this.closestPointRange=k},cropData:function(a,d,c,e){var n=a.length,k=0,m=n,h=b(this.cropShoulder,1),f;for(f=0;f<n;f++)if(a[f]>=c){k=Math.max(0,f-h);break}for(c=f;c<n;c++)if(a[c]>e){m=c+h;break}return{xData:a.slice(k,m),yData:d.slice(k,m),start:k,end:m}},generatePoints:function(){var a=
this.options.data,b=this.data,d,c=this.processedXData,e=this.processedYData,n=this.pointClass,k=c.length,m=this.cropStart||0,h,f=this.hasGroupedData,u,g=[],x;b||f||(b=[],b.length=a.length,b=this.data=b);for(x=0;x<k;x++)h=m+x,f?(g[x]=(new n).init(this,[c[x]].concat(G(e[x]))),g[x].dataGroup=this.groupMap[x]):(b[h]?u=b[h]:void 0!==a[h]&&(b[h]=u=(new n).init(this,a[h],c[x])),g[x]=u),g[x].index=h;if(b&&(k!==(d=b.length)||f))for(x=0;x<d;x++)x!==m||f||(x+=k),b[x]&&(b[x].destroyElements(),b[x].plotX=void 0);
this.data=b;this.points=g},getExtremes:function(a){var b=this.yAxis,c=this.processedXData,e,n=[],k=0;e=this.xAxis.getExtremes();var m=e.min,h=e.max,f,u,x,g;a=a||this.stackedYData||this.processedYData||[];e=a.length;for(g=0;g<e;g++)if(u=c[g],x=a[g],f=(d(x,!0)||z(x))&&(!b.isLog||x.length||0<x),u=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(c[g+1]||u)>=m&&(c[g-1]||u)<=h,f&&u)if(f=x.length)for(;f--;)null!==x[f]&&(n[k++]=x[f]);else n[k++]=x;this.dataMin=H(n);this.dataMax=F(n)},
translate:function(){this.processedXData||this.processData();this.generatePoints();for(var a=this.options,c=a.stacking,e=this.xAxis,n=e.categories,k=this.yAxis,m=this.points,h=m.length,f=!!this.modifyValue,u=a.pointPlacement,x="between"===u||d(u),A=a.threshold,l=a.startFromThreshold?A:0,q,v,E,p,G=Number.MAX_VALUE,a=0;a<h;a++){var z=m[a],D=z.x,B=z.y;v=z.low;var F=c&&k.stacks[(this.negStacks&&B<(l?0:A)?"-":"")+this.stackKey],H;k.isLog&&null!==B&&0>=B&&(z.isNull=!0);z.plotX=q=t(Math.min(Math.max(-1E5,
e.translate(D,0,0,0,1,u,"flags"===this.type)),1E5));c&&this.visible&&!z.isNull&&F&&F[D]&&(p=this.getStackIndicator(p,D,this.index),H=F[D],B=H.points[p.key],v=B[0],B=B[1],v===l&&p.key===F[D].base&&(v=b(A,k.min)),k.isLog&&0>=v&&(v=null),z.total=z.stackTotal=H.total,z.percentage=H.total&&z.y/H.total*100,z.stackY=B,H.setOffset(this.pointXOffset||0,this.barW||0));z.yBottom=g(v)?k.translate(v,0,1,0,1):null;f&&(B=this.modifyValue(B,z));z.plotY=v="number"===typeof B&&Infinity!==B?Math.min(Math.max(-1E5,k.translate(B,
0,1,0,1)),1E5):void 0;z.isInside=void 0!==v&&0<=v&&v<=k.len&&0<=q&&q<=e.len;z.clientX=x?t(e.translate(D,0,0,0,1,u)):q;z.negative=z.y<(A||0);z.category=n&&void 0!==n[z.x]?n[z.x]:z.x;z.isNull||(void 0!==E&&(G=Math.min(G,Math.abs(q-E))),E=q)}this.closestPointRangePx=G},getValidPoints:function(a,b){var d=this.chart;return v(a||this.points||[],function(a){return b&&!d.isInsidePlot(a.plotX,a.plotY,d.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,d=this.options,c=b.renderer,e=b.inverted,
n=this.clipBox,k=n||b.clipBox,m=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,k.height,d.xAxis,d.yAxis].join(),h=b[m],f=b[m+"m"];h||(a&&(k.width=0,b[m+"m"]=f=c.clipRect(-99,e?-b.plotLeft:-b.plotTop,99,e?b.chartWidth:b.chartHeight)),b[m]=h=c.clipRect(k),h.count={length:0});a&&!h.count[this.index]&&(h.count[this.index]=!0,h.count.length+=1);!1!==d.clip&&(this.group.clip(a||n?h:b.clipRect),this.markerGroup.clip(f),this.sharedClipKey=m);a||(h.count[this.index]&&(delete h.count[this.index],
--h.count.length),0===h.count.length&&m&&b[m]&&(n||(b[m]=b[m].destroy()),b[m+"m"]&&(b[m+"m"]=b[m+"m"].destroy())))},animate:function(a){var b=this.chart,d=D(this.options.animation),c;a?this.setClip(d):(c=this.sharedClipKey,(a=b[c])&&a.animate({width:b.plotSizeX},d),b[c+"m"]&&b[c+"m"].animate({width:b.plotSizeX+99},d),this.animate=null)},afterAnimate:function(){this.setClip();m(this,"afterAnimate")},drawPoints:function(){var a=this.points,e=this.chart,n,k,m,h,f,u,x,g,A=this.options.marker,l,q,v,E=
this.markerGroup,p=b(A.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>2*A.radius);if(!1!==A.enabled||this._hasPointMarkers)for(m=a.length;m--;)h=a[m],n=Math.floor(h.plotX),k=h.plotY,g=h.graphic,l=h.marker||{},q=!!h.marker,f=p&&void 0===l.enabled||l.enabled,v=h.isInside,f&&d(k)&&null!==h.y?(f=A.radius,u=b(l.symbol,this.symbol),x=0===u.indexOf("url"),g?g[v?"show":"hide"](!0).animate(c({x:n-f,y:k-f},g.symbolName?{width:2*f,height:2*f}:{})):v&&(0<f||x)&&(h.graphic=g=e.renderer.symbol(u,
n-f,k-f,2*f,2*f,q?l:A).attr({r:f}).add(E)),g&&g.addClass(h.getClassName(),!0)):g&&(h.graphic=g.destroy())},destroy:function(){var a=this,b=a.chart,d=/AppleWebKit\/533/.test(x.navigator.userAgent),c,e=a.data||[],k,h,f;m(a,"destroy");n(a);p(a.axisTypes||[],function(b){(f=a[b])&&f.series&&(q(f.series,a),f.isDirty=f.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(c=e.length;c--;)(k=e[c])&&k.destroy&&k.destroy();a.points=null;clearTimeout(a.animationTimeout);for(h in a)a[h]instanceof
A&&!a[h].survive&&(c=d&&"group"===h?"hide":"destroy",a[h][c]());b.hoverSeries===a&&(b.hoverSeries=null);q(b.series,a);for(h in a)delete a[h]},getGraphPath:function(a,b,d){var c=this,e=c.options,n=e.step,k,h=[],m=[],f;a=a||c.points;(k=a.reversed)&&a.reverse();(n={right:1,center:2}[n]||n&&3)&&k&&(n=4-n);!e.connectNulls||b||d||(a=this.getValidPoints(a));p(a,function(k,u){var x=k.plotX,A=k.plotY,l=a[u-1];(k.leftCliff||l&&l.rightCliff)&&!d&&(f=!0);k.isNull&&!g(b)&&0<u?f=!e.connectNulls:k.isNull&&!b?f=
!0:(0===u||f?l=["M",k.plotX,k.plotY]:c.getPointSpline?l=c.getPointSpline(a,k,u):n?(l=1===n?["L",l.plotX,A]:2===n?["L",(l.plotX+x)/2,l.plotY,"L",(l.plotX+x)/2,A]:["L",x,l.plotY],l.push("L",x,A)):l=["L",x,A],m.push(k.x),n&&m.push(k.x),h.push.apply(h,l),f=!1)});h.xMap=m;return c.graphPath=h},drawGraph:function(){var a=this,b=(this.gappedPath||this.getGraphPath).call(this),d=[["graph","highcharts-graph"]];p(this.zones,function(a,b){d.push(["zone-graph-"+b,"highcharts-graph highcharts-zone-graph-"+b+" "+
(a.className||"")])});p(d,function(d,c){var e=d[0],n=a[e];n?(n.endX=b.xMap,n.animate({d:b})):b.length&&(a[e]=a.chart.renderer.path(b).addClass(d[1]).attr({zIndex:1}).add(a.group));n&&(n.startX=b.xMap,n.isArea=b.isArea)})},applyZones:function(){var a=this,d=this.chart,c=d.renderer,e=this.zones,n,k,h=this.clips||[],m,f=this.graph,u=this.area,x=Math.max(d.chartWidth,d.chartHeight),g=this[(this.zoneAxis||"y")+"Axis"],l,A,q=d.inverted,v,E,G,z,t=!1;e.length&&(f||u)&&g&&void 0!==g.min&&(A=g.reversed,v=g.horiz,
f&&f.hide(),u&&u.hide(),l=g.getExtremes(),p(e,function(e,p){n=A?v?d.plotWidth:0:v?0:g.toPixels(l.min);n=Math.min(Math.max(b(k,n),0),x);k=Math.min(Math.max(Math.round(g.toPixels(b(e.value,l.max),!0)),0),x);t&&(n=k=g.toPixels(l.max));E=Math.abs(n-k);G=Math.min(n,k);z=Math.max(n,k);g.isXAxis?(m={x:q?z:G,y:0,width:E,height:x},v||(m.x=d.plotHeight-m.x)):(m={x:0,y:q?z:G,width:x,height:E},v&&(m.y=d.plotWidth-m.y));h[p]?h[p].animate(m):(h[p]=c.clipRect(m),f&&a["zone-graph-"+p].clip(h[p]),u&&a["zone-area-"+
p].clip(h[p]));t=e.value>l.max}),this.clips=h)},invertGroups:function(a){function b(){var c={width:d.yAxis.len,height:d.xAxis.len};p(["group","markerGroup"],function(b){d[b]&&d[b].attr(c).invert(a)})}var d=this,c=d.chart;d.xAxis&&(B(c,"resize",b),B(d,"destroy",function(){n(c,"resize",b)}),b(a),d.invertGroups=b)},plotGroup:function(a,b,d,c,e){var n=this[a],k=!n;k&&(this[a]=n=this.chart.renderer.g(b).attr({zIndex:c||.1}).add(e),n.addClass("highcharts-series-"+this.index+" highcharts-"+this.type+"-series highcharts-color-"+
this.colorIndex+" "+(this.options.className||"")));n.attr({visibility:d})[k?"attr":"animate"](this.getPlotBox());return n},getPlotBox:function(){var a=this.chart,b=this.xAxis,d=this.yAxis;a.inverted&&(b=d,d=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:d?d.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,d,c=a.options,e=!!a.animate&&b.renderer.isSVG&&D(c.animation).duration,n=a.visible?"inherit":"hidden",k=c.zIndex,h=a.hasRendered,m=b.seriesGroup,f=b.inverted;
d=a.plotGroup("group","series",n,k,m);a.markerGroup=a.plotGroup("markerGroup","markers",n,k,m);e&&a.animate(!0);d.inverted=a.isCartesian?f:!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(f);!1===c.clip||a.sharedClipKey||h||d.clip(b.clipRect);e&&a.animate();h||(a.animationTimeout=u(function(){a.afterAnimate()},e));a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},
redraw:function(){var a=this.chart,d=this.isDirty||this.isDirtyData,c=this.group,e=this.xAxis,n=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:b(e&&e.left,a.plotLeft),translateY:b(n&&n.top,a.plotTop)}));this.translate();this.render();d&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var d=this.xAxis,c=this.yAxis,e=this.chart.inverted;return this.searchKDTree({clientX:e?d.len-a.chartY+d.pos:a.chartX-d.pos,
plotY:e?c.len-a.chartX+c.pos:a.chartY-c.pos},b)},buildKDTree:function(){function a(d,c,e){var n,k;if(k=d&&d.length)return n=b.kdAxisArray[c%e],d.sort(function(a,b){return a[n]-b[n]}),k=Math.floor(k/2),{point:d[k],left:a(d.slice(0,k),c+1,e),right:a(d.slice(k+1),c+1,e)}}var b=this,d=b.kdDimensions;delete b.kdTree;u(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),d,d)},b.options.kdNow?0:1)},searchKDTree:function(a,b){function d(a,b,h,m){var f=b.point,r=c.kdAxisArray[h%m],u,x,l=f;x=g(a[e])&&
g(f[e])?Math.pow(a[e]-f[e],2):null;u=g(a[n])&&g(f[n])?Math.pow(a[n]-f[n],2):null;u=(x||0)+(u||0);f.dist=g(u)?Math.sqrt(u):Number.MAX_VALUE;f.distX=g(x)?Math.sqrt(x):Number.MAX_VALUE;r=a[r]-f[r];u=0>r?"left":"right";x=0>r?"right":"left";b[u]&&(u=d(a,b[u],h+1,m),l=u[k]<l[k]?u:f);b[x]&&Math.sqrt(r*r)<l[k]&&(a=d(a,b[x],h+1,m),l=a[k]<l[k]?a:l);return l}var c=this,e=this.kdAxisArray[0],n=this.kdAxisArray[1],k=b?"distX":"dist";this.kdTree||this.buildKDTree();if(this.kdTree)return d(a,this.kdTree,this.kdDimensions,
this.kdDimensions)}})})(J);(function(a){function B(a,h,c,m,f){var g=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=h;this.x=m;this.total=null;this.points={};this.stack=f;this.rightCliff=this.leftCliff=0;this.alignOptions={align:h.align||(g?c?"left":"right":"center"),verticalAlign:h.verticalAlign||(g?"middle":c?"bottom":"top"),y:p(h.y,g?4:c?14:-6),x:p(h.x,g?c?-6:6:0)};this.textAlign=h.textAlign||(g?c?"right":"left":"center")}var D=a.Axis,F=a.Chart,H=a.correctFloat,t=a.defined,f=a.destroyObjectProperties,
l=a.each,g=a.format,p=a.pick;a=a.Series;B.prototype={destroy:function(){f(this,this.axis)},render:function(a){var h=this.options,c=h.format,c=c?g(c,this):h.formatter.call(this);this.label?this.label.attr({text:c,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(c,null,null,h.useHTML).css(h.style).attr({align:this.textAlign,rotation:h.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,h){var c=this.axis,m=c.chart,f=m.inverted,g=c.reversed,g=this.isNegative&&!g||!this.isNegative&&
g,d=c.translate(c.usePercentage?100:this.total,0,0,0,1),c=c.translate(0),c=Math.abs(d-c),k=m.xAxis[0].translate(this.x)+a,e=m.plotHeight,g={x:f?g?d:d-c:k,y:f?e-k-h:g?e-d-c:e-d,width:f?c:h,height:f?h:c};if(f=this.label)f.align(this.alignOptions,null,g),g=f.alignAttr,f[!1===this.options.crop||m.isInsidePlot(g.x,g.y)?"show":"hide"](!0)}};F.prototype.getStacks=function(){var a=this;l(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});l(a.series,function(h){!h.options.stacking||
!0!==h.visible&&!1!==a.options.chart.ignoreHiddenSeries||(h.stackKey=h.type+p(h.options.stack,""))})};D.prototype.buildStacks=function(){var a=this.series,h,c=p(this.options.reversedStacks,!0),m=a.length,f;if(!this.isXAxis){this.usePercentage=!1;for(f=m;f--;)a[c?f:m-f-1].setStackedPoints();for(f=m;f--;)h=a[c?f:m-f-1],h.setStackCliffs&&h.setStackCliffs();if(this.usePercentage)for(f=0;f<m;f++)a[f].setPercentStacks()}};D.prototype.renderStackTotals=function(){var a=this.chart,f=a.renderer,c=this.stacks,
m,g,l=this.stackTotalGroup;l||(this.stackTotalGroup=l=f.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());l.translate(a.plotLeft,a.plotTop);for(m in c)for(g in a=c[m],a)a[g].render(l)};D.prototype.resetStacks=function(){var a=this.stacks,f,c;if(!this.isXAxis)for(f in a)for(c in a[f])a[f][c].touched<this.stacksTouched?(a[f][c].destroy(),delete a[f][c]):(a[f][c].total=null,a[f][c].cum=0)};D.prototype.cleanStacks=function(){var a,f,c;if(!this.isXAxis)for(f in this.oldStacks&&(a=this.stacks=
this.oldStacks),a)for(c in a[f])a[f][c].cum=a[f][c].total};a.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a=this.processedXData,f=this.processedYData,c=[],m=f.length,g=this.options,l=g.threshold,d=g.startFromThreshold?l:0,k=g.stack,g=g.stacking,e=this.stackKey,b="-"+e,n=this.negStacks,G=this.yAxis,E=G.stacks,A=G.oldStacks,u,x,y,r,C,K,w;G.stacksTouched+=1;for(C=0;C<m;C++)K=a[C],w=f[C],u=this.getStackIndicator(u,
K,this.index),r=u.key,y=(x=n&&w<(d?0:l))?b:e,E[y]||(E[y]={}),E[y][K]||(A[y]&&A[y][K]?(E[y][K]=A[y][K],E[y][K].total=null):E[y][K]=new B(G,G.options.stackLabels,x,K,k)),y=E[y][K],null!==w&&(y.points[r]=y.points[this.index]=[p(y.cum,d)],t(y.cum)||(y.base=r),y.touched=G.stacksTouched,0<u.index&&!1===this.singleStacks&&(y.points[r][0]=y.points[this.index+","+K+",0"][0])),"percent"===g?(x=x?e:b,n&&E[x]&&E[x][K]?(x=E[x][K],y.total=x.total=Math.max(x.total,y.total)+Math.abs(w)||0):y.total=H(y.total+(Math.abs(w)||
0))):y.total=H(y.total+(w||0)),y.cum=p(y.cum,d)+(w||0),null!==w&&(y.points[r].push(y.cum),c[C]=y.cum);"percent"===g&&(G.usePercentage=!0);this.stackedYData=c;G.oldStacks={}}};a.prototype.setPercentStacks=function(){var a=this,f=a.stackKey,c=a.yAxis.stacks,m=a.processedXData,g;l([f,"-"+f],function(f){for(var d=m.length,k,e;d--;)if(k=m[d],g=a.getStackIndicator(g,k,a.index),k=(e=c[f]&&c[f][k])&&e.points[g.key])e=e.total?100/e.total:0,k[0]=H(k[0]*e),k[1]=H(k[1]*e),a.stackedYData[d]=k[1]})};a.prototype.getStackIndicator=
function(a,f,c){t(a)&&a.x===f?a.index++:a={x:f,index:0};a.key=[c,f,a.index].join();return a}})(J);(function(a){var B=a.addEvent,D=a.Axis,F=a.createElement,H=a.css,t=a.defined,f=a.each,l=a.erase,g=a.extend,p=a.fireEvent,q=a.inArray,h=a.isObject,c=a.merge,m=a.pick,v=a.Point,z=a.Series,d=a.seriesTypes,k=a.setAnimation,e=a.splat;g(a.Chart.prototype,{addSeries:function(a,d,c){var e,k=this;a&&(d=m(d,!0),p(k,"addSeries",{options:a},function(){e=k.initSeries(a);k.isDirtyLegend=!0;k.linkSeries();d&&k.redraw(c)}));
return e},addAxis:function(a,d,k,f){var h=d?"xAxis":"yAxis",u=this.options;a=c(a,{index:this[h].length,isX:d});new D(this,a);u[h]=e(u[h]||{});u[h].push(a);m(k,!0)&&this.redraw(f)},showLoading:function(a){var d=this,c=d.options,e=d.loadingDiv,k=function(){e&&H(e,{left:d.plotLeft+"px",top:d.plotTop+"px",width:d.plotWidth+"px",height:d.plotHeight+"px"})};e||(d.loadingDiv=e=F("div",{className:"highcharts-loading highcharts-loading-hidden"},null,d.container),d.loadingSpan=F("span",{className:"highcharts-loading-inner"},
null,e),B(d,"redraw",k));setTimeout(function(){e.className="highcharts-loading"});d.loadingSpan.innerHTML=a||c.lang.loading;d.loadingShown=!0;k()},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.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions"],update:function(a,d){var k,h={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},g=a.chart,u,x;if(g){c(!0,this.options.chart,g);"className"in g&&this.setClassName(g.className);if("inverted"in g||"polar"in g)this.propFromSeries(),u=!0;for(k in g)g.hasOwnProperty(k)&&(-1!==q("chart."+k,this.propsRequireUpdateSeries)&&(x=!0),-1!==q(k,this.propsRequireDirtyBox)&&(this.isDirtyBox=!0))}for(k in a){if(this[k]&&
"function"===typeof this[k].update)this[k].update(a[k],!1);else if("function"===typeof this[h[k]])this[h[k]](a[k]);"chart"!==k&&-1!==q(k,this.propsRequireUpdateSeries)&&(x=!0)}a.plotOptions&&c(!0,this.options.plotOptions,a.plotOptions);f(["xAxis","yAxis","series"],function(d){a[d]&&f(e(a[d]),function(a){var b=t(a.id)&&this.get(a.id)||this[d][0];b&&b.coll===d&&b.update(a,!1)},this)},this);u&&f(this.axes,function(a){a.update({},!1)});x&&f(this.series,function(a){a.update({},!1)});a.loading&&c(!0,this.options.loading,
a.loading);g&&("width"in g||"height"in g)?this.setSize(g.width,g.height):m(d,!0)&&this.redraw()},setSubtitle:function(a){this.setTitle(void 0,a)}});g(v.prototype,{update:function(a,d,c,e){function k(){f.applyOptions(a);null===f.y&&l&&(f.graphic=l.destroy());h(a,!0)&&(l&&l.element&&a&&a.marker&&a.marker.symbol&&(f.graphic=l.destroy()),a&&a.dataLabels&&f.dataLabel&&(f.dataLabel=f.dataLabel.destroy()));r=f.index;g.updateParallelArrays(f,r);q.data[r]=h(q.data[r],!0)?f.options:a;g.isDirty=g.isDirtyData=
!0;!g.fixedBox&&g.hasCartesianSeries&&(C.isDirtyBox=!0);"point"===q.legendType&&(C.isDirtyLegend=!0);d&&C.redraw(c)}var f=this,g=f.series,l=f.graphic,r,C=g.chart,q=g.options;d=m(d,!0);!1===e?k():f.firePointEvent("update",{options:a},k)},remove:function(a,d){this.series.removePoint(q(this,this.series.data),a,d)}});g(z.prototype,{addPoint:function(a,d,c,e){var k=this.options,f=this.data,h=this.chart,g=this.xAxis&&this.xAxis.names,r=k.data,l,q,w=this.xData,p,v;d=m(d,!0);l={series:this};this.pointClass.prototype.applyOptions.apply(l,
[a]);v=l.x;p=w.length;if(this.requireSorting&&v<w[p-1])for(q=!0;p&&w[p-1]>v;)p--;this.updateParallelArrays(l,"splice",p,0,0);this.updateParallelArrays(l,p);g&&l.name&&(g[v]=l.name);r.splice(p,0,a);q&&(this.data.splice(p,0,null),this.processData());"point"===k.legendType&&this.generatePoints();c&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),this.updateParallelArrays(l,"shift"),r.shift()));this.isDirtyData=this.isDirty=!0;d&&h.redraw(e)},removePoint:function(a,d,c){var e=this,f=e.data,h=f[a],g=e.points,
l=e.chart,r=function(){g&&g.length===f.length&&g.splice(a,1);f.splice(a,1);e.options.data.splice(a,1);e.updateParallelArrays(h||{series:e},"splice",a,1);h&&h.destroy();e.isDirty=!0;e.isDirtyData=!0;d&&l.redraw()};k(c,l);d=m(d,!0);h?h.firePointEvent("remove",null,r):r()},remove:function(a,d,c){function e(){k.destroy();f.isDirtyLegend=f.isDirtyBox=!0;f.linkSeries();m(a,!0)&&f.redraw(d)}var k=this,f=k.chart;!1!==c?p(k,"remove",null,e):e()},update:function(a,e){var k=this,h=this.chart,l=this.userOptions,
u=this.type,x=a.type||l.type||h.options.chart.type,y=d[u].prototype,r=["group","markerGroup","dataLabelsGroup"],q;if(x&&x!==u||void 0!==a.zIndex)r.length=0;f(r,function(a){r[a]=k[a];delete k[a]});a=c(l,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},a);this.remove(!1,null,!1);for(q in y)this[q]=void 0;g(this,d[x||u].prototype);f(r,function(a){k[a]=r[a]});this.init(h,a);h.linkSeries();m(e,!0)&&h.redraw(!1)}});g(D.prototype,{update:function(a,d){var e=this.chart;a=
e.options[this.coll][this.options.index]=c(this.userOptions,a);this.destroy(!0);this.init(e,g(a,{events:void 0}));e.isDirtyBox=!0;m(d,!0)&&e.redraw()},remove:function(a){for(var d=this.chart,c=this.coll,e=this.series,k=e.length;k--;)e[k]&&e[k].remove(!1);l(d.axes,this);l(d[c],this);d.options[c].splice(this.options.index,1);f(d[c],function(a,d){a.options.index=d});this.destroy();d.isDirtyBox=!0;m(a,!0)&&d.redraw()},setTitle:function(a,d){this.update({title:a},d)},setCategories:function(a,d){this.update({categories:a},
d)}})})(J);(function(a){var B=a.each,D=a.map,F=a.pick,H=a.Series,t=a.seriesType;t("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var a=[],l=[],g=this.xAxis,p=this.yAxis,q=p.stacks[this.stackKey],h={},c=this.points,m=this.index,v=p.series,z=v.length,d,k=F(p.options.reversedStacks,!0)?1:-1,e,b;if(this.options.stacking){for(e=0;e<c.length;e++)h[c[e].x]=c[e];for(b in q)null!==q[b].total&&l.push(b);l.sort(function(a,d){return a-d});d=D(v,function(){return this.visible});
B(l,function(b,c){var v=0,A,u;if(h[b]&&!h[b].isNull)a.push(h[b]),B([-1,1],function(a){var f=1===a?"rightNull":"leftNull",r=0,g=q[l[c+a]];if(g)for(e=m;0<=e&&e<z;)A=g.points[e],A||(e===m?h[b][f]=!0:d[e]&&(u=q[b].points[e])&&(r-=u[1]-u[0])),e+=k;h[b][1===a?"rightCliff":"leftCliff"]=r});else{for(e=m;0<=e&&e<z;){if(A=q[b].points[e]){v=A[1];break}e+=k}v=p.toPixels(v,!0);a.push({isNull:!0,plotX:g.toPixels(b,!0),plotY:v,yBottom:v})}})}return a},getGraphPath:function(a){var l=H.prototype.getGraphPath,g=this.options,
p=g.stacking,q=this.yAxis,h,c,m=[],v=[],z=this.index,d,k=q.stacks[this.stackKey],e=g.threshold,b=q.getThreshold(g.threshold),n,g=g.connectNulls||"percent"===p,G=function(c,n,h){var g=a[c];c=p&&k[g.x].points[z];var l=g[h+"Null"]||0;h=g[h+"Cliff"]||0;var r,C,g=!0;h||l?(r=(l?c[0]:c[1])+h,C=c[0]+h,g=!!l):!p&&a[n]&&a[n].isNull&&(r=C=e);void 0!==r&&(v.push({plotX:d,plotY:null===r?b:q.getThreshold(r),isNull:g}),m.push({plotX:d,plotY:null===C?b:q.getThreshold(C),doCurve:!1}))};a=a||this.points;p&&(a=this.getStackPoints());
for(h=0;h<a.length;h++)if(c=a[h].isNull,d=F(a[h].rectPlotX,a[h].plotX),n=F(a[h].yBottom,b),!c||g)g||G(h,h-1,"left"),c&&!p&&g||(v.push(a[h]),m.push({x:h,plotX:d,plotY:n})),g||G(h,h+1,"right");h=l.call(this,v,!0,!0);m.reversed=!0;c=l.call(this,m,!0,!0);c.length&&(c[0]="L");c=h.concat(c);l=l.call(this,v,!1,g);c.xMap=h.xMap;this.areaPath=c;return l},drawGraph:function(){this.areaPath=[];H.prototype.drawGraph.apply(this);var a=this,l=this.areaPath,g=this.options,p=[["area","highcharts-area"]];B(this.zones,
function(a,f){p.push(["zone-area-"+f,"highcharts-area highcharts-zone-area-"+f+" "+a.className])});B(p,function(q){var h=q[0],c=a[h];c?(c.endX=l.xMap,c.animate({d:l})):(c=a[h]=a.chart.renderer.path(l).addClass(q[1]).attr({zIndex:0}).add(a.group),c.isArea=!0);c.startX=l.xMap;c.shiftUnit=g.step?2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(J);(function(a){var B=a.extendClass,D=a.merge,F=a.pick,H=a.Series,t=a.seriesTypes;a.defaultPlotOptions.spline=D(a.defaultPlotOptions.line);t.spline=
B(H,{type:"spline",getPointSpline:function(a,l,g){var p=l.plotX,q=l.plotY,h=a[g-1];g=a[g+1];var c,m,v,z;if(h&&!h.isNull&&!1!==h.doCurve&&g&&!g.isNull&&!1!==g.doCurve){a=h.plotY;v=g.plotX;g=g.plotY;var d=0;c=(1.5*p+h.plotX)/2.5;m=(1.5*q+a)/2.5;v=(1.5*p+v)/2.5;z=(1.5*q+g)/2.5;v!==c&&(d=(z-m)*(v-p)/(v-c)+q-z);m+=d;z+=d;m>a&&m>q?(m=Math.max(a,q),z=2*q-m):m<a&&m<q&&(m=Math.min(a,q),z=2*q-m);z>g&&z>q?(z=Math.max(g,q),m=2*q-z):z<g&&z<q&&(z=Math.min(g,q),m=2*q-z);l.rightContX=v;l.rightContY=z}l=["C",F(h.rightContX,
h.plotX),F(h.rightContY,h.plotY),F(c,p),F(m,q),p,q];h.rightContX=h.rightContY=null;return l}})})(J);(function(a){var B=a.seriesTypes.area.prototype,D=a.seriesType;D("areaspline","spline",a.defaultPlotOptions.area,{getStackPoints:B.getStackPoints,getGraphPath:B.getGraphPath,setStackCliffs:B.setStackCliffs,drawGraph:B.drawGraph,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(J);(function(a){var B=a.animObject,D=a.each,F=a.extend,H=a.isNumber,t=a.merge,f=a.pick,l=a.Series,g=a.seriesType,p=a.stop,
q=a.svg;g("column","line",{borderRadius: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(){l.prototype.init.apply(this,arguments);var a=this,c=a.chart;c.hasRendered&&D(c.series,function(c){c.type===
a.type&&(c.isDirty=!0)})},getColumnMetrics:function(){var a=this,c=a.options,m=a.xAxis,g=a.yAxis,l=m.reversed,d,k={},e=0;!1===c.grouping?e=1:D(a.chart.series,function(b){var c=b.options,n=b.yAxis,f;b.type===a.type&&b.visible&&g.len===n.len&&g.pos===n.pos&&(c.stacking?(d=b.stackKey,void 0===k[d]&&(k[d]=e++),f=k[d]):!1!==c.grouping&&(f=e++),b.columnIndex=f)});var b=Math.min(Math.abs(m.transA)*(m.ordinalSlope||c.pointRange||m.closestPointRange||m.tickInterval||1),m.len),n=b*c.groupPadding,q=(b-2*n)/
e,c=Math.min(c.maxPointWidth||m.len,f(c.pointWidth,q*(1-2*c.pointPadding)));a.columnMetrics={width:c,offset:(q-c)/2+(n+((a.columnIndex||0)+(l?1:0))*q-b/2)*(l?-1:1)};return a.columnMetrics},crispCol:function(a,c,f,g){var l=this.chart,d=this.borderWidth,k=-(d%2?.5:0),d=d%2?.5:1;l.inverted&&l.renderer.isVML&&(d+=1);f=Math.round(a+f)+k;a=Math.round(a)+k;g=Math.round(c+g)+d;k=.5>=Math.abs(c)&&.5<g;c=Math.round(c)+d;g-=c;k&&g&&(--c,g+=1);return{x:a,y:c,width:f-a,height:g}},translate:function(){var a=this,
c=a.chart,m=a.options,g=a.dense=2>a.closestPointRange*a.xAxis.transA,g=a.borderWidth=f(m.borderWidth,g?0:1),q=a.yAxis,d=a.translatedThreshold=q.getThreshold(m.threshold),k=f(m.minPointLength,5),e=a.getColumnMetrics(),b=e.width,n=a.barW=Math.max(b,1+2*g),p=a.pointXOffset=e.offset;c.inverted&&(d-=.5);m.pointPadding&&(n=Math.ceil(n));l.prototype.translate.apply(a);D(a.points,function(e){var m=f(e.yBottom,d),g=999+Math.abs(m),g=Math.min(Math.max(-g,e.plotY),q.len+g),l=e.plotX+p,y=n,r=Math.min(g,m),C,
v=Math.max(g,m)-r;Math.abs(v)<k&&k&&(v=k,C=!q.reversed&&!e.negative||q.reversed&&e.negative,r=Math.abs(r-d)>k?m-k:d-(C?k:0));e.barX=l;e.pointWidth=b;e.tooltipPos=c.inverted?[q.len+q.pos-c.plotLeft-g,a.xAxis.len-l-y/2,v]:[l+y/2,g+q.pos-c.plotTop,v];e.shapeType="rect";e.shapeArgs=a.crispCol.apply(a,e.isNull?[e.plotX,q.len/2,0,0]:[l,r,y,v])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},
drawPoints:function(){var a=this,c=this.chart,f=c.renderer,g=a.options.animationLimit||250,l;D(a.points,function(d){var k=d.graphic;H(d.plotY)&&null!==d.y?(l=d.shapeArgs,k?(p(k),k[c.pointCount<g?"animate":"attr"](t(l))):d.graphic=f[d.shapeType](l).attr({"class":d.getClassName()}).add(d.group||a.group)):k&&(d.graphic=k.destroy())})},animate:function(a){var c=this,f=this.yAxis,g=c.options,l=this.chart.inverted,d={};q&&(a?(d.scaleY=.001,a=Math.min(f.pos+f.len,Math.max(f.pos,f.toPixels(g.threshold))),
l?d.translateX=a-f.len:d.translateY=a,c.group.attr(d)):(d[l?"translateX":"translateY"]=f.pos,c.group.animate(d,F(B(c.options.animation),{step:function(a,d){c.group.attr({scaleY:Math.max(.001,d.pos)})}})),c.animate=null))},remove:function(){var a=this,c=a.chart;c.hasRendered&&D(c.series,function(c){c.type===a.type&&(c.isDirty=!0)});l.prototype.remove.apply(a,arguments)}})})(J);(function(a){a=a.seriesType;a("bar","column",null,{inverted:!0})})(J);(function(a){var B=a.Series;a=a.seriesType;a("scatter",
"line",{lineWidth:0,marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 0.85em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,kdDimensions:2,drawGraph:function(){this.options.lineWidth&&B.prototype.drawGraph.call(this)}})})(J);(function(a){var B=a.pick,D=a.relativeLength;
a.CenteredSeriesMixin={getCenter:function(){var a=this.options,H=this.chart,t=2*(a.slicedOffset||0),f=H.plotWidth-2*t,H=H.plotHeight-2*t,l=a.center,l=[B(l[0],"50%"),B(l[1],"50%"),a.size||"100%",a.innerSize||0],g=Math.min(f,H),p,q;for(p=0;4>p;++p)q=l[p],a=2>p||2===p&&/%$/.test(q),l[p]=D(q,[f,H,g,l[2]][p])+(a?t:0);l[3]>l[2]&&(l[3]=l[2]);return l}}})(J);(function(a){var B=a.addEvent,D=a.defined,F=a.each,H=a.extend,t=a.inArray,f=a.noop,l=a.pick,g=a.Point,p=a.Series,q=a.seriesType,h=a.setAnimation;q("pie",
"line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return null===this.y?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 f=
this,g=f.points,h=f.startAngleRad;a||(F(g,function(a){var c=a.graphic,e=a.shapeArgs;c&&(c.attr({r:a.startR||f.center[3]/2,start:h,end:h}),c.animate({r:e.r,start:e.start,end:e.end},f.options.animation))}),f.animate=null)},updateTotals:function(){var a,f=0,g=this.points,h=g.length,d,k=this.options.ignoreHiddenPoint;for(a=0;a<h;a++)d=g[a],0>d.y&&(d.y=null),f+=k&&!d.visible?0:d.y;this.total=f;for(a=0;a<h;a++)d=g[a],d.percentage=0<f&&(d.visible||!k)?d.y/f*100:0,d.total=f},generatePoints:function(){p.prototype.generatePoints.call(this);
this.updateTotals()},translate:function(a){this.generatePoints();var f=0,g=this.options,h=g.slicedOffset,d=h+(g.borderWidth||0),k,e,b,n=g.startAngle||0,q=this.startAngleRad=Math.PI/180*(n-90),n=(this.endAngleRad=Math.PI/180*(l(g.endAngle,n+360)-90))-q,p=this.points,A=g.dataLabels.distance,g=g.ignoreHiddenPoint,u,x=p.length,y;a||(this.center=a=this.getCenter());this.getX=function(d,e){b=Math.asin(Math.min((d-a[1])/(a[2]/2+A),1));return a[0]+(e?-1:1)*Math.cos(b)*(a[2]/2+A)};for(u=0;u<x;u++){y=p[u];
k=q+f*n;if(!g||y.visible)f+=y.percentage/100;e=q+f*n;y.shapeType="arc";y.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*e)/1E3};b=(e+k)/2;b>1.5*Math.PI?b-=2*Math.PI:b<-Math.PI/2&&(b+=2*Math.PI);y.slicedTranslation={translateX:Math.round(Math.cos(b)*h),translateY:Math.round(Math.sin(b)*h)};k=Math.cos(b)*a[2]/2;e=Math.sin(b)*a[2]/2;y.tooltipPos=[a[0]+.7*k,a[1]+.7*e];y.half=b<-Math.PI/2||b>Math.PI/2?1:0;y.angle=b;d=Math.min(d,A/5);y.labelPos=[a[0]+k+Math.cos(b)*
A,a[1]+e+Math.sin(b)*A,a[0]+k+Math.cos(b)*d,a[1]+e+Math.sin(b)*d,a[0]+k,a[1]+e,0>A?"center":y.half?"right":"left",b]}},drawGraph:null,drawPoints:function(){var a=this,f=a.chart.renderer,g,h,d;F(a.points,function(k){null!==k.y&&(h=k.graphic,d=k.shapeArgs,g=k.sliced?k.slicedTranslation:{},h?h.setRadialReference(a.center).animate(H(d,g)):(k.graphic=h=f[k.shapeType](d).addClass(k.getClassName()).setRadialReference(a.center).attr(g).add(a.group),k.visible||h.attr({visibility:"hidden"})))})},searchPoint:f,
sortByAngle:function(a,f){a.sort(function(a,c){return void 0!==a.angle&&(c.angle-a.angle)*f})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:f},{init:function(){g.prototype.init.apply(this,arguments);var a=this,f;a.name=l(a.name,"Slice");f=function(f){a.slice("select"===f.type)};B(a,"select",f);B(a,"unselect",f);return a},setVisible:function(a,f){var g=this,h=g.series,d=h.chart,k=h.options.ignoreHiddenPoint;f=l(f,k);a!==g.visible&&(g.visible=
g.options.visible=a=void 0===a?!g.visible:a,h.options.data[t(g,h.data)]=g.options,F(["graphic","dataLabel","connector","shadowGroup"],function(d){if(g[d])g[d][a?"show":"hide"](!0)}),g.legendItem&&d.legend.colorizeItem(g,a),a||"hover"!==g.state||g.setState(""),k&&(h.isDirty=!0),f&&d.redraw())},slice:function(a,f,g){var q=this.series;h(g,q.chart);l(f,!0);this.sliced=this.options.sliced=a=D(a)?a:!this.sliced;q.options.data[t(this,q.data)]=this.options;this.graphic.animate(a?this.slicedTranslation:{translateX:0,
translateY:0})},haloPath:function(a){var f=this.shapeArgs,g=this.series.chart;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(g.plotLeft+f.x,g.plotTop+f.y,f.r+a,f.r+a,{innerR:this.shapeArgs.r,start:f.start,end:f.end})}})})(J);(function(a){var B=a.addEvent,D=a.arrayMax,F=a.defined,H=a.each,t=a.extend,f=a.format,l=a.map,g=a.merge,p=a.noop,q=a.pick,h=a.relativeLength,c=a.Series,m=a.seriesTypes,v=a.stableSort,z=a.stop;a.distribute=function(a,c){function e(a,b){return a.target-
b.target}var b,f=!0,g=a,h=[],m;m=0;for(b=a.length;b--;)m+=a[b].size;if(m>c){v(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(m=b=0;m<=c;)m+=a[b].size,b++;h=a.splice(b-1,a.length)}v(a,e);for(a=l(a,function(a){return{size:a.size,targets:[a.target]}});f;){for(b=a.length;b--;)f=a[b],m=(Math.min.apply(0,f.targets)+Math.max.apply(0,f.targets))/2,f.pos=Math.min(Math.max(0,m-f.size/2),c-f.size);b=a.length;for(f=!1;b--;)0<b&&a[b-1].pos+a[b-1].size>a[b].pos&&(a[b-1].size+=a[b].size,a[b-1].targets=a[b-
1].targets.concat(a[b].targets),a[b-1].pos+a[b-1].size>c&&(a[b-1].pos=c-a[b-1].size),a.splice(b,1),f=!0)}b=0;H(a,function(a){var d=0;H(a.targets,function(){g[b].pos=a.pos+d;d+=g[b].size;b++})});g.push.apply(g,h);v(g,e)};c.prototype.drawDataLabels=function(){var a=this,c=a.options,e=c.dataLabels,b=a.points,n,h,m=a.hasRendered||0,l,u,x=q(e.defer,!0),y=a.chart.renderer;if(e.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(e),u=a.plotGroup("dataLabelsGroup","data-labels",x&&!m?"hidden":
"visible",e.zIndex||6),x&&(u.attr({opacity:+m}),m||B(a,"afterAnimate",function(){a.visible&&u.show(!0);u[c.animation?"animate":"attr"]({opacity:1},{duration:200})})),h=e,H(b,function(b){var c,k=b.dataLabel,m,x,p=b.connector,v=!0;n=b.dlOptions||b.options&&b.options.dataLabels;c=q(n&&n.enabled,h.enabled)&&null!==b.y;if(k&&!c)b.dataLabel=k.destroy();else if(c){e=g(h,n);c=e.rotation;m=b.getLabelConfig();l=e.format?f(e.format,m):e.formatter.call(m,e);if(k)F(l)?(k.attr({text:l}),v=!1):(b.dataLabel=k=k.destroy(),
p&&(b.connector=p.destroy()));else if(F(l)){k={r:e.borderRadius||0,rotation:c,padding:e.padding,zIndex:1};for(x in k)void 0===k[x]&&delete k[x];k=b.dataLabel=y[c?"text":"label"](l,0,-9999,e.shape,null,null,e.useHTML,null,"data-label").attr(k);k.addClass("highcharts-data-label-color-"+b.colorIndex+" "+(e.className||""));k.add(u)}k&&a.alignDataLabel(b,k,e,null,v)}})};c.prototype.alignDataLabel=function(a,c,e,b,f){var g=this.chart,h=g.inverted,m=q(a.plotX,-9999),l=q(a.plotY,-9999),x=c.getBBox(),y,r=
e.rotation,p=e.align,v=this.visible&&(a.series.forceDL||g.isInsidePlot(m,Math.round(l),h)||b&&g.isInsidePlot(m,h?b.x+1:b.y+b.height-1,h)),w="justify"===q(e.overflow,"justify");v&&(y=g.renderer.fontMetrics(void 0,c).b,b=t({x:h?g.plotWidth-l:m,y:Math.round(h?g.plotHeight-m:l),width:0,height:0},b),t(e,{width:x.width,height:x.height}),r?(w=!1,h=g.renderer.rotCorr(y,r),h={x:b.x+e.x+b.width/2+h.x,y:b.y+e.y+{top:0,middle:.5,bottom:1}[e.verticalAlign]*b.height},c[f?"attr":"animate"](h).attr({align:p}),m=
(r+720)%360,m=180<m&&360>m,"left"===p?h.y-=m?x.height:0:"center"===p?(h.x-=x.width/2,h.y-=x.height/2):"right"===p&&(h.x-=x.width,h.y-=m?0:x.height)):(c.align(e,null,b),h=c.alignAttr),w?this.justifyDataLabel(c,e,h,x,b,f):q(e.crop,!0)&&(v=g.isInsidePlot(h.x,h.y)&&g.isInsidePlot(h.x+x.width,h.y+x.height)),e.shape&&!r&&c.attr({anchorX:a.plotX,anchorY:a.plotY}));v||(z(c),c.attr({y:-9999}),c.placed=!1)};c.prototype.justifyDataLabel=function(a,c,e,b,f,g){var h=this.chart,m=c.align,l=c.verticalAlign,x,q,
r=a.box?0:a.padding||0;x=e.x+r;0>x&&("right"===m?c.align="left":c.x=-x,q=!0);x=e.x+b.width-r;x>h.plotWidth&&("left"===m?c.align="right":c.x=h.plotWidth-x,q=!0);x=e.y+r;0>x&&("bottom"===l?c.verticalAlign="top":c.y=-x,q=!0);x=e.y+b.height-r;x>h.plotHeight&&("top"===l?c.verticalAlign="bottom":c.y=h.plotHeight-x,q=!0);q&&(a.placed=!g,a.align(c,null,f))};m.pie&&(m.pie.prototype.drawDataLabels=function(){var d=this,f=d.data,e,b=d.chart,n=d.options.dataLabels,g=q(n.connectorPadding,10),h=q(n.connectorWidth,
1),m=b.plotWidth,u=b.plotHeight,x,y=n.distance,r=d.center,p=r[2]/2,v=r[1],w=0<y,t,z,B,L,F=[[],[]],T,R,U,S,M=[0,0,0,0];d.visible&&(n.enabled||d._hasPointLabels)&&(c.prototype.drawDataLabels.apply(d),H(f,function(a){a.dataLabel&&a.visible&&(F[a.half].push(a),a.dataLabel._pos=null)}),H(F,function(c,f){var k,h,x=c.length,q,w,E;if(x)for(d.sortByAngle(c,f-.5),0<y&&(k=Math.max(0,v-p-y),h=Math.min(v+p+y,b.plotHeight),q=l(c,function(a){if(a.dataLabel)return E=a.dataLabel.getBBox().height||21,{target:a.labelPos[1]-
k+E/2,size:E,rank:a.y}}),a.distribute(q,h+E-k)),S=0;S<x;S++)e=c[S],B=e.labelPos,t=e.dataLabel,U=!1===e.visible?"hidden":"inherit",w=B[1],q?void 0===q[S].pos?U="hidden":(L=q[S].size,R=k+q[S].pos):R=w,T=n.justify?r[0]+(f?-1:1)*(p+y):d.getX(R<k+2||R>h-2?w:R,f),t._attr={visibility:U,align:B[6]},t._pos={x:T+n.x+({left:g,right:-g}[B[6]]||0),y:R+n.y-10},B.x=T,B.y=R,null===d.options.size&&(z=t.width,T-z<g?M[3]=Math.max(Math.round(z-T+g),M[3]):T+z>m-g&&(M[1]=Math.max(Math.round(T+z-m+g),M[1])),0>R-L/2?M[0]=
Math.max(Math.round(-R+L/2),M[0]):R+L/2>u&&(M[2]=Math.max(Math.round(R+L/2-u),M[2])))}),0===D(M)||this.verifyDataLabelOverflow(M))&&(this.placeDataLabels(),w&&h&&H(this.points,function(a){var c;x=a.connector;if((t=a.dataLabel)&&t._pos&&a.visible){U=t._attr.visibility;if(c=!x)a.connector=x=b.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex).add(d.dataLabelsGroup);x[c?"attr":"animate"]({d:d.connectorPath(a.labelPos)});x.attr("visibility",U)}else x&&(a.connector=
x.destroy())}))},m.pie.prototype.connectorPath=function(a){var c=a.x,e=a.y;return q(this.options.softConnector,!0)?["M",c+("left"===a[6]?5:-5),e,"C",c,e,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],"L",a[4],a[5]]:["M",c+("left"===a[6]?5:-5),e,"L",a[2],a[3],"L",a[4],a[5]]},m.pie.prototype.placeDataLabels=function(){H(this.points,function(a){var c=a.dataLabel;c&&a.visible&&((a=c._pos)?(c.attr(c._attr),c[c.moved?"animate":"attr"](a),c.moved=!0):c&&c.attr({y:-9999}))})},m.pie.prototype.alignDataLabel=p,m.pie.prototype.verifyDataLabelOverflow=
function(a){var c=this.center,e=this.options,b=e.center,f=e.minSize||80,g,m;null!==b[0]?g=Math.max(c[2]-Math.max(a[1],a[3]),f):(g=Math.max(c[2]-a[1]-a[3],f),c[0]+=(a[3]-a[1])/2);null!==b[1]?g=Math.max(Math.min(g,c[2]-Math.max(a[0],a[2])),f):(g=Math.max(Math.min(g,c[2]-a[0]-a[2]),f),c[1]+=(a[0]-a[2])/2);g<c[2]?(c[2]=g,c[3]=Math.min(h(e.innerSize||0,g),g),this.translate(c),this.drawDataLabels&&this.drawDataLabels()):m=!0;return m});m.column&&(m.column.prototype.alignDataLabel=function(a,f,e,b,n){var h=
this.chart.inverted,m=a.series,l=a.dlBox||a.shapeArgs,u=q(a.below,a.plotY>q(this.translatedThreshold,m.yAxis.len)),x=q(e.inside,!!this.options.stacking);l&&(b=g(l),0>b.y&&(b.height+=b.y,b.y=0),l=b.y+b.height-m.yAxis.len,0<l&&(b.height-=l),h&&(b={x:m.yAxis.len-b.y-b.height,y:m.xAxis.len-b.x-b.width,width:b.height,height:b.width}),x||(h?(b.x+=u?0:b.width,b.width=0):(b.y+=u?b.height:0,b.height=0)));e.align=q(e.align,!h||x?"center":u?"right":"left");e.verticalAlign=q(e.verticalAlign,h||x?"middle":u?"top":
"bottom");c.prototype.alignDataLabel.call(this,a,f,e,b,n)})})(J);(function(a){var B=a.Chart,D=a.each,F=a.pick,H=a.addEvent;B.prototype.callbacks.push(function(a){function f(){var f=[];D(a.series,function(a){var p=a.options.dataLabels,q=a.dataLabelCollections||["dataLabel"];(p.enabled||a._hasPointLabels)&&!p.allowOverlap&&a.visible&&D(q,function(h){D(a.points,function(a){a[h]&&(a[h].labelrank=F(a.labelrank,a.shapeArgs&&a.shapeArgs.height),f.push(a[h]))})})});a.hideOverlappingLabels(f)}f();H(a,"redraw",
f)});B.prototype.hideOverlappingLabels=function(a){var f=a.length,l,g,p,q,h,c,m,v,z,d=function(a,c,b,d,f,g,h,m){return!(f>a+b||f+h<a||g>c+d||g+m<c)};for(g=0;g<f;g++)if(l=a[g])l.oldOpacity=l.opacity,l.newOpacity=1;a.sort(function(a,c){return(c.labelrank||0)-(a.labelrank||0)});for(g=0;g<f;g++)for(p=a[g],l=g+1;l<f;++l)if(q=a[l],p&&q&&p.placed&&q.placed&&0!==p.newOpacity&&0!==q.newOpacity&&(h=p.alignAttr,c=q.alignAttr,m=p.parentGroup,v=q.parentGroup,z=2*(p.box?0:p.padding),h=d(h.x+m.translateX,h.y+m.translateY,
p.width-z,p.height-z,c.x+v.translateX,c.y+v.translateY,q.width-z,q.height-z)))(p.labelrank<q.labelrank?p:q).newOpacity=0;D(a,function(a){var c,b;a&&(b=a.newOpacity,a.oldOpacity!==b&&a.placed&&(b?a.show(!0):c=function(){a.hide()},a.alignAttr.opacity=b,a[a.isOld?"animate":"attr"](a.alignAttr,null,c)),a.isOld=!0)})}})(J);(function(a){var B=a.addEvent,D=a.Chart,F=a.createElement,H=a.css,t=a.defaultOptions,f=a.defaultPlotOptions,l=a.each,g=a.extend,p=a.fireEvent,q=a.hasTouch,h=a.inArray,c=a.isObject,m=
a.Legend,v=a.merge,z=a.pick,d=a.Point,k=a.Series,e=a.seriesTypes,b=a.svg;a=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=function(a){for(var c=a.target,d;c&&!d;)d=c.point,c=c.parentNode;if(void 0!==d&&d!==b.hoverPoint)d.onMouseOver(a)};l(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.element.point=a)});a._hasTracking||(l(a.trackerGroups,function(b){if(a[b]&&(a[b].addClass("highcharts-tracker").on("mouseover",d).on("mouseout",
function(a){c.onTrackerMouseOut(a)}),q))a[b].on("touchstart",d)}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,c=a.options.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,k=f.pointer,g=f.renderer,h=f.options.tooltip.snap,m=a.tracker,p,w=function(){if(f.hoverSeries!==a)a.onMouseOver()},v="rgba(192,192,192,"+(b?1E-4:.002)+")";if(e&&!c)for(p=e+1;p--;)"M"===d[p]&&d.splice(p+1,0,d[p+1]-h,d[p+2],"L"),(p&&"M"===d[p]||p===e)&&d.splice(p,0,"L",d[p-2]+h,d[p-1]);m?m.attr({d:d}):
a.graph&&(a.tracker=g.path(d).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:v,fill:c?v:"none","stroke-width":a.graph.strokeWidth()+(c?0:2*h),zIndex:2}).add(a.group),l([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",w).on("mouseout",function(a){k.onTrackerMouseOut(a)});if(q)a.on("touchstart",w)}))}};e.column&&(e.column.prototype.drawTracker=a.drawTrackerPoint);e.pie&&(e.pie.prototype.drawTracker=a.drawTrackerPoint);e.scatter&&(e.scatter.prototype.drawTracker=
a.drawTrackerPoint);g(m.prototype,{setItemEvents:function(a,b,c){var d=this.chart,e="highcharts-legend-"+(a.series?"point":"series")+"-active";(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");d.seriesGroup.addClass(e)}).on("mouseout",function(){d.seriesGroup.removeClass(e);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible()};b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):p(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=
F("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);B(a.checkbox,"click",function(b){p(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});g(D.prototype,{showResetZoom:function(){var a=this,b=t.lang,c=a.options.chart.resetZoomButton,d=c.theme,e=d.states,f="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,
title:b.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(c.position,!1,f)},zoomOut:function(){var a=this;p(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,d=this.pointer,e=!1,f;!a||a.resetSelection?l(this.axes,function(a){b=a.zoom()}):l(a.xAxis.concat(a.yAxis),function(a){var c=a.axis,f=c.isXAxis;if(d[f?"zoomX":"zoomY"]||d[f?"pinchX":"pinchY"])b=c.zoom(a.min,a.max),c.displayBtn&&(e=!0)});f=this.resetZoomButton;e&&!f?this.showResetZoom():!e&&c(f)&&(this.resetZoomButton=
f.destroy());b&&this.redraw(z(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,e;d&&l(d,function(a){a.setState()});l("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,f=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",k=c[d],g=(b.pointRange||0)/2,h=b.getExtremes(),m=b.toValue(k-f,!0)+g,g=b.toValue(k+b.len-f,!0)-g,k=k>f;b.series.length&&(k||m>Math.min(h.dataMin,h.min))&&(!k||g<Math.max(h.dataMax,h.max))&&(b.setExtremes(m,
g,!1,!1,{trigger:"pan"}),e=!0);c[d]=f});e&&c.redraw(!1);H(c.container,{cursor:"move"})}});g(d.prototype,{select:function(a,b){var c=this,d=c.series,e=d.chart;a=z(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a;d.options.data[h(c,d.data)]=c.options;c.setState(a&&"select");b||l(e.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=a.options.selected=!1,d.options.data[h(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},
onMouseOver:function(a,b){var c=this.series,d=c.chart,e=d.tooltip,f=d.hoverPoint;if(d.hoverSeries!==c)c.onMouseOver();if(f&&f!==this)f.onMouseOut();this.series&&(this.firePointEvent("mouseOver"),!e||e.shared&&!c.noSharedTooltip||e.refresh(this,a),this.setState("hover"),b||(d.hoverPoint=this))},onMouseOut:function(){var a=this.series.chart,b=a.hoverPoints;this.firePointEvent("mouseOut");b&&-1!==h(this,b)||(this.setState(),a.hoverPoint=null)},importEvents:function(){if(!this.hasImportedEvents){var a=
v(this.series.options.point,this.options).events,b;this.events=a;for(b in a)B(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a,b){var c=Math.floor(this.plotX),d=this.plotY,e=this.series,k=e.options.states[a]||{},g=f[e.type].marker&&e.options.marker||{},h=!1===g.enabled,m=g.states&&g.states[a]||{},l=!1===m.enabled,q=e.stateMarkerGraphic,p=this.marker||{},v=e.chart,t=e.halo;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===k.enabled||a&&(l||h&&!1===m.enabled)||a&&p.states&&
p.states[a]&&!1===p.states[a].enabled)){g=m.radius||g.radius+(m.radiusPlus||0);if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+this.state),a&&this.graphic.addClass("highcharts-point-"+a),c=g?{x:c-g,y:d-g,width:2*g,height:2*g}:{},this.graphic.attr(c),q&&q.hide();else{if(a&&m)if(m=p.symbol||e.symbol,q&&q.currentSymbol!==m&&(q=q.destroy()),q)q[b?"animate":"attr"]({x:c-g,y:d-g});else m&&(e.stateMarkerGraphic=q=v.renderer.symbol(m,c-g,d-g,2*g,2*g).add(e.markerGroup),q.currentSymbol=
m);q&&(q[a&&v.isInsidePlot(c,d,v.inverted)?"show":"hide"](),q.element.point=this)}(k=k.halo)&&k.size?(t||(e.halo=t=v.renderer.path().add(v.seriesGroup)),t[b?"animate":"attr"]({d:this.haloPath(k.size)}),t.attr({"class":"highcharts-halo highcharts-color-"+z(this.colorIndex,e.colorIndex)})):t&&t.attr({d:[]});this.state=a}},haloPath:function(a){var b=this.series,c=b.chart,d=b.getPlotBox(),e=c.inverted,f=Math.floor(this.plotX);return c.renderer.symbols.circle(d.translateX+(e?b.yAxis.len-this.plotY:f)-
a,d.translateY+(e?b.xAxis.len-f:this.plotY)-a,2*a,2*a)}});g(k.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&p(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&p(this,"mouseOut");!c||a.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=
this;a=a||"";b.state!==a&&(l([b.group,b.markerGroup],function(c){c&&(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a)},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,f,g=d.options.chart.ignoreHiddenSeries,k=c.visible;f=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!k:a)?"show":"hide";l(["group","dataLabelsGroup","markerGroup","tracker"],function(a){if(c[a])c[a][f]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===
c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&l(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});l(c.linkedSeries,function(b){b.setVisible(a,!1)});g&&(d.isDirtyBox=!0);!1!==b&&d.redraw();p(c,f)},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);p(this,a?"select":"unselect")},drawTracker:a.drawTrackerGraph})})(J);(function(a){var B=
a.Chart,D=a.each,F=a.inArray,H=a.isObject,t=a.pick,f=a.splat;B.prototype.setResponsive=function(a){var f=this.options.responsive;f&&f.rules&&D(f.rules,function(f){this.matchResponsiveRule(f,a)},this)};B.prototype.matchResponsiveRule=function(f,g){var p=this.respRules,q=f.condition,h;h=f.callback||function(){return this.chartWidth<=t(q.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=t(q.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=t(q.minWidth,0)&&this.chartHeight>=t(q.minHeight,0)};void 0===f._id&&
(f._id=a.idCounter++);h=h.call(this);!p[f._id]&&h?f.chartOptions&&(p[f._id]=this.currentOptions(f.chartOptions),this.update(f.chartOptions,g)):p[f._id]&&!h&&(this.update(p[f._id],g),delete p[f._id])};B.prototype.currentOptions=function(a){function g(a,h,c){var m,l;for(m in a)if(-1<F(m,["series","xAxis","yAxis"]))for(a[m]=f(a[m]),c[m]=[],l=0;l<a[m].length;l++)c[m][l]={},g(a[m][l],h[m][l],c[m][l]);else H(a[m])?(c[m]={},g(a[m],h[m]||{},c[m])):c[m]=h[m]||null}var p={};g(a,this.options,p);return p}})(J);
(function(a){var B=a.addEvent,D=a.Axis,F=a.Chart,H=a.css,t=a.dateFormat,f=a.defined,l=a.each,g=a.extend,p=a.noop,q=a.Series,h=a.timeUnits;a=a.wrap;a(q.prototype,"init",function(a){var f;a.apply(this,Array.prototype.slice.call(arguments,1));(f=this.xAxis)&&f.options.ordinal&&B(this,"updatedData",function(){delete f.ordinalIndex})});a(D.prototype,"getTimeTicks",function(a,g,l,q,d,k,e,b){var n=0,p,E,A={},u,x,y,r=[],C=-Number.MAX_VALUE,K=this.options.tickPixelInterval;if(!this.options.ordinal&&!this.options.breaks||
!k||3>k.length||void 0===l)return a.call(this,g,l,q,d);x=k.length;for(p=0;p<x;p++){y=p&&k[p-1]>q;k[p]<l&&(n=p);if(p===x-1||k[p+1]-k[p]>5*e||y){if(k[p]>C){for(E=a.call(this,g,k[n],k[p],d);E.length&&E[0]<=C;)E.shift();E.length&&(C=E[E.length-1]);r=r.concat(E)}n=p+1}if(y)break}a=E.info;if(b&&a.unitRange<=h.hour){p=r.length-1;for(n=1;n<p;n++)t("%d",r[n])!==t("%d",r[n-1])&&(A[r[n]]="day",u=!0);u&&(A[r[0]]="day");a.higherRanks=A}r.info=a;if(b&&f(K)){b=a=r.length;p=[];var w;for(u=[];b--;)n=this.translate(r[b]),
w&&(u[b]=w-n),p[b]=w=n;u.sort();u=u[Math.floor(u.length/2)];u<.6*K&&(u=null);b=r[a-1]>q?a-1:a;for(w=void 0;b--;)n=p[b],q=w-n,w&&q<.8*K&&(null===u||q<.8*u)?(A[r[b]]&&!A[r[b+1]]?(q=b+1,w=n):q=b,r.splice(q,1)):w=n}return r});g(D.prototype,{beforeSetTickPositions:function(){var a,f=[],g=!1,h,d=this.getExtremes(),k=d.min,e=d.max,b,n=this.isXAxis&&!!this.options.breaks,d=this.options.ordinal,q=this.chart.options.chart.ignoreHiddenSeries;if(d||n){l(this.series,function(b,d){if(!(q&&!1===b.visible||!1===
b.takeOrdinalPosition&&!n)&&(f=f.concat(b.processedXData),a=f.length,f.sort(function(a,b){return a-b}),a))for(d=a-1;d--;)f[d]===f[d+1]&&f.splice(d,1)});a=f.length;if(2<a){h=f[1]-f[0];for(b=a-1;b--&&!g;)f[b+1]-f[b]!==h&&(g=!0);!this.options.keepOrdinalPadding&&(f[0]-k>h||e-f[f.length-1]>h)&&(g=!0)}g?(this.ordinalPositions=f,h=this.val2lin(Math.max(k,f[0]),!0),b=Math.max(this.val2lin(Math.min(e,f[f.length-1]),!0),1),this.ordinalSlope=e=(e-k)/(b-h),this.ordinalOffset=k-h*e):this.ordinalPositions=this.ordinalSlope=
this.ordinalOffset=void 0}this.isOrdinal=d&&g;this.groupIntervalFactor=null},val2lin:function(a,f){var g=this.ordinalPositions,h;if(g){var d=g.length,k;for(h=d;h--;)if(g[h]===a){k=h;break}for(h=d-1;h--;)if(a>g[h]||0===h){g=(a-g[h])/(g[h+1]-g[h]);k=h+g;break}h=f?k:this.ordinalSlope*(k||0)+this.ordinalOffset}else h=a;return h},lin2val:function(a,f){var g=this.ordinalPositions;if(g){var h=this.ordinalSlope,d=this.ordinalOffset,k=g.length-1,e,b;if(f)0>a?a=g[0]:a>k?a=g[k]:(k=Math.floor(a),b=a-k);else for(;k--;)if(e=
h*k+d,a>=e){h=h*(k+1)+d;b=(a-e)/(h-e);break}return void 0!==b&&void 0!==g[k]?g[k]+(b?b*(g[k+1]-g[k]):0):a}return a},getExtendedPositions:function(){var a=this.chart,f=this.series[0].currentDataGrouping,g=this.ordinalIndex,h=f?f.count+f.unitName:"raw",d=this.getExtremes(),k,e;g||(g=this.ordinalIndex={});g[h]||(k={series:[],chart:a,getExtremes:function(){return{min:d.dataMin,max:d.dataMax}},options:{ordinal:!0},val2lin:D.prototype.val2lin},l(this.series,function(b){e={xAxis:k,xData:b.xData,chart:a,
destroyGroupedData:p};e.options={dataGrouping:f?{enabled:!0,forced:!0,approximation:"open",units:[[f.unitName,[f.count]]]}:{enabled:!1}};b.processData.apply(e);k.series.push(e)}),this.beforeSetTickPositions.apply(k),g[h]=k.ordinalPositions);return g[h]},getGroupIntervalFactor:function(a,f,g){var h;g=g.processedXData;var d=g.length,k=[];h=this.groupIntervalFactor;if(!h){for(h=0;h<d-1;h++)k[h]=g[h+1]-g[h];k.sort(function(a,b){return a-b});k=k[Math.floor(d/2)];a=Math.max(a,g[0]);f=Math.min(f,g[d-1]);
this.groupIntervalFactor=h=d*k/(f-a)}return h},postProcessTickInterval:function(a){var f=this.ordinalSlope;return f?this.options.breaks?this.closestPointRange:a/(f/this.closestPointRange):a}});a(F.prototype,"pan",function(a,f){var g=this.xAxis[0],h=f.chartX,d=!1;if(g.options.ordinal&&g.series.length){var k=this.mouseDownX,e=g.getExtremes(),b=e.dataMax,n=e.min,q=e.max,p=this.hoverPoints,A=g.closestPointRange,k=(k-h)/(g.translationSlope*(g.ordinalSlope||A)),u={ordinalPositions:g.getExtendedPositions()},
A=g.lin2val,x=g.val2lin,y;u.ordinalPositions?1<Math.abs(k)&&(p&&l(p,function(a){a.setState()}),0>k?(p=u,y=g.ordinalPositions?g:u):(p=g.ordinalPositions?g:u,y=u),u=y.ordinalPositions,b>u[u.length-1]&&u.push(b),this.fixedRange=q-n,k=g.toFixedRange(null,null,A.apply(p,[x.apply(p,[n,!0])+k,!0]),A.apply(y,[x.apply(y,[q,!0])+k,!0])),k.min>=Math.min(e.dataMin,n)&&k.max<=Math.max(b,q)&&g.setExtremes(k.min,k.max,!0,!1,{trigger:"pan"}),this.mouseDownX=h,H(this.container,{cursor:"move"})):d=!0}else d=!0;d&&
a.apply(this,Array.prototype.slice.call(arguments,1))});q.prototype.gappedPath=function(){var a=this.options.gapSize,f=this.points.slice(),g=f.length-1;if(a&&0<g)for(;g--;)f[g+1].x-f[g].x>this.closestPointRange*a&&f.splice(g+1,0,{isNull:!0});return this.getGraphPath(f)}})(J);(function(a){function B(){return Array.prototype.slice.call(arguments,1)}function D(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,F(this.pointArrayMap,["y"]))}var F=a.pick,H=a.wrap,t=a.each,f=a.extend,
l=a.fireEvent,g=a.Axis,p=a.Series;f(g.prototype,{isInBreak:function(a,f){var c=a.repeat||Infinity,g=a.from,l=a.to-a.from,c=f>=g?(f-g)%c:c-(g-f)%c;return a.inclusive?c<=l:c<l&&0!==c},isInAnyBreak:function(a,f){var c=this.options.breaks,g=c&&c.length,l,p,d;if(g){for(;g--;)this.isInBreak(c[g],a)&&(l=!0,p||(p=F(c[g].showPoints,this.isXAxis?!1:!0)));d=l&&f?l&&!p:l}return d}});H(g.prototype,"setTickPositions",function(a){a.apply(this,Array.prototype.slice.call(arguments,1));if(this.options.breaks){var f=
this.tickPositions,c=this.tickPositions.info,g=[],l;for(l=0;l<f.length;l++)this.isInAnyBreak(f[l])||g.push(f[l]);this.tickPositions=g;this.tickPositions.info=c}});H(g.prototype,"init",function(a,f,c){c.breaks&&c.breaks.length&&(c.ordinal=!1);a.call(this,f,c);if(this.options.breaks){var m=this;m.isBroken=!0;this.val2lin=function(a){var c=a,d,f;for(f=0;f<m.breakArray.length;f++)if(d=m.breakArray[f],d.to<=a)c-=d.len;else if(d.from>=a)break;else if(m.isInBreak(d,a)){c-=a-d.from;break}return c};this.lin2val=
function(a){var c,d;for(d=0;d<m.breakArray.length&&!(c=m.breakArray[d],c.from>=a);d++)c.to<a?a+=c.len:m.isInBreak(c,a)&&(a+=c.len);return a};this.setExtremes=function(a,c,d,f,e){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(c);)c-=this.closestPointRange;g.prototype.setExtremes.call(this,a,c,d,f,e)};this.setAxisTranslation=function(a){g.prototype.setAxisTranslation.call(this,a);var c=m.options.breaks;a=[];var d=[],f=0,e,b,h=m.userMin||m.min,p=m.userMax||m.max,q,A;for(A in c)b=
c[A],e=b.repeat||Infinity,m.isInBreak(b,h)&&(h+=b.to%e-h%e),m.isInBreak(b,p)&&(p-=p%e-b.from%e);for(A in c){b=c[A];q=b.from;for(e=b.repeat||Infinity;q-e>h;)q-=e;for(;q<h;)q+=e;for(;q<p;q+=e)a.push({value:q,move:"in"}),a.push({value:q+(b.to-b.from),move:"out",size:b.breakSize})}a.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-b.value});c=0;q=h;for(A in a)b=a[A],c+="in"===b.move?1:-1,1===c&&"in"===b.move&&(q=b.value),0===c&&(d.push({from:q,to:b.value,len:b.value-
q-(b.size||0)}),f+=b.value-q-(b.size||0));m.breakArray=d;l(m,"afterBreaks");m.transA*=(p-m.min)/(p-h-f);m.min=h;m.max=p}}});H(p.prototype,"generatePoints",function(a){a.apply(this,B(arguments));var f=this.xAxis,c=this.yAxis,g=this.points,l,p=g.length,d=this.options.connectNulls,k;if(f&&c&&(f.options.breaks||c.options.breaks))for(;p--;)l=g[p],k=null===l.y&&!1===d,k||!f.isInAnyBreak(l.x,!0)&&!c.isInAnyBreak(l.y,!0)||(g.splice(p,1),this.data[p]&&this.data[p].destroyElements())});a.Series.prototype.drawBreaks=
function(a,f){var c=this,g=c.points,p,z,d,k;t(f,function(e){p=a.breakArray||[];z=a.isXAxis?a.min:F(c.options.threshold,a.min);t(g,function(b){k=F(b["stack"+e.toUpperCase()],b[e]);t(p,function(c){d=!1;if(z<c.from&&k>c.to||z>c.from&&k<c.from)d="pointBreak";else if(z<c.from&&k>c.from&&k<c.to||z>c.from&&k>c.to&&k<c.from)d="pointInBreak";d&&l(a,d,{point:b,brk:c})})})})};H(a.seriesTypes.column.prototype,"drawPoints",D);H(a.Series.prototype,"drawPoints",D)})(J);(function(a){var B=a.arrayMax,D=a.arrayMin,
F=a.Axis,H=a.defaultPlotOptions,t=a.defined,f=a.each,l=a.error,g=a.extend,p=a.format,q=a.isNumber,h=a.merge,c=a.pick,m=a.Point,v=a.Tooltip,z=a.wrap,d=a.Series.prototype,k=d.processData,e=d.generatePoints,b=d.destroy,n={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}},
E=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={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);q(a)&&b&&(a/=b);return a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?B(a):a.hasNulls?
null:void 0},low:function(a){return a.length?D(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,b,c,d){a=A.open(a);b=A.high(b);c=A.low(c);d=A.close(d);if(q(a)||q(b)||q(c)||q(d))return[a,b,c,d]},range:function(a,b){a=A.low(a);b=A.high(b);if(q(a)||q(b))return[a,b]}};d.groupData=function(a,b,c,d){var e=this.data,f=this.options.data,g=[],h=[],k=[],m=a.length,l,n,p=!!b,t=[[],[],[],[]];d="function"===typeof d?d:A[d];var v=this.pointArrayMap,
z=v&&v.length,G,E=0;for(G=n=0;G<=m&&!(a[G]>=c[0]);G++);for(G;G<=m;G++){for(;(void 0!==c[E+1]&&a[G]>=c[E+1]||G===m)&&(l=c[E],this.dataGroupInfo={start:n,length:t[0].length},n=d.apply(this,t),void 0!==n&&(g.push(l),h.push(n),k.push(this.dataGroupInfo)),n=G,t[0]=[],t[1]=[],t[2]=[],t[3]=[],E+=1,G!==m););if(G===m)break;if(v){l=this.cropStart+G;l=e&&e[l]||this.pointClass.prototype.applyOptions.apply({series:this},[f[l]]);var B,D;for(B=0;B<z;B++)D=l[v[B]],q(D)?t[B].push(D):null===D&&(t[B].hasNulls=!0)}else l=
p?b[G]:null,q(l)?t[0].push(l):null===l&&(t[0].hasNulls=!0)}return[g,h,k]};d.processData=function(){var a=this.chart,b=this.options.dataGrouping,e=!1!==this.allowDG&&b&&c(b.enabled,a.options._stock),f;this.forceCrop=e;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==k.apply(this,arguments)&&e&&this.visible){this.destroyGroupedData();var g=this.processedXData,h=this.processedYData,m=a.plotSizeX,a=this.xAxis,l=a.options.ordinal,n=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();
if(n){this.isDirty=f=!0;var p=a.getExtremes(),e=p.min,p=p.max,l=l&&a.getGroupIntervalFactor(e,p,this)||1,m=n*(p-e)/m*l,n=a.getTimeTicks(a.normalizeTimeTickInterval(m,b.units||E),Math.min(e,g[0]),Math.max(p,g[g.length-1]),a.options.startOfWeek,g,this.closestPointRange),g=d.groupData.apply(this,[g,h,n,b.approximation]),h=g[0],l=g[1];if(b.smoothed){b=h.length-1;for(h[b]=Math.min(h[b],p);b--&&0<b;)h[b]+=m/2;h[0]=Math.max(h[0],e)}this.currentDataGrouping=n.info;this.closestPointRange=n.info.totalRange;
this.groupMap=g[2];t(h[0])&&h[0]<a.dataMin&&(a.min===a.dataMin&&(a.min=h[0]),a.dataMin=h[0]);this.processedXData=h;this.processedYData=l}else this.currentDataGrouping=this.groupMap=null;this.hasGroupedData=f}};d.destroyGroupedData=function(){var a=this.groupedData;f(a||[],function(b,c){b&&(a[c]=b.destroy?b.destroy():null)});this.groupedData=null};d.generatePoints=function(){e.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};z(m.prototype,"update",function(a){this.dataGroup?
l(24):a.apply(this,[].slice.call(arguments,1))});z(v.prototype,"tooltipFooterHeaderFormatter",function(b,c,d){var e=c.series,f=e.tooltipOptions,h=e.options.dataGrouping,k=f.xDateFormat,m,l=e.xAxis,n=a.dateFormat;return l&&"datetime"===l.options.type&&h&&q(c.key)?(b=e.currentDataGrouping,h=h.dateTimeLabelFormats,b?(l=h[b.unitName],1===b.count?k=l[0]:(k=l[1],m=l[2])):!k&&h&&(k=this.getXDateFormat(c,f,l)),k=n(k,c.key),m&&(k+=n(m,c.key+b.totalRange-1)),p(f[(d?"footer":"header")+"Format"],{point:g(c.point,
{key:k}),series:e})):b.call(this,c,d)});d.destroy=function(){for(var a=this.groupedData||[],c=a.length;c--;)a[c]&&a[c].destroy();b.apply(this)};z(d,"setOptions",function(a,b){var c=a.call(this,b),d=this.type,e=this.chart.options.plotOptions,f=H[d].dataGrouping;G[d]&&(f||(f=h(n,G[d])),c.dataGrouping=h(f,e.series&&e.series.dataGrouping,e[d].dataGrouping,b.dataGrouping));this.chart.options._stock&&(this.requireSorting=!0);return c});z(F.prototype,"setScale",function(a){a.call(this);f(this.series,function(a){a.hasProcessed=
!1})});F.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,d=0,e=!1,f;for(c=b;c--;)(f=a[c].options.dataGrouping)&&(d=Math.max(d,f.groupPixelWidth));for(c=b;c--;)(f=a[c].options.dataGrouping)&&a[c].hasProcessed&&(b=(a[c].processedXData||a[c].data).length,a[c].groupPixelWidth||b>this.chart.plotSizeX/d||b&&f.forced)&&(e=!0);return e?d:0};F.prototype.setDataGrouping=function(a,b){var d;b=c(b,!0);a||(a={forced:!1,units:null});if(this instanceof F)for(d=this.series.length;d--;)this.series[d].update({dataGrouping:a},
!1);else f(this.chart.options.series,function(b){b.dataGrouping=a},!1);b&&this.chart.redraw()}})(J);(function(a){var B=a.each,D=a.Point,F=a.seriesType,H=a.seriesTypes;F("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'<span class="highcharts-color-{point.colorIndex}">\u25cf</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>'},threshold:null},{pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,
a.low,a.close]},pointValKey:"high",translate:function(){var a=this,f=a.yAxis,l=!!a.modifyValue,g=["plotOpen","yBottom","plotClose"];H.column.prototype.translate.apply(a);B(a.points,function(p){B([p.open,p.low,p.close],function(q,h){null!==q&&(l&&(q=a.modifyValue(q)),p[g[h]]=f.toPixels(q,!0))})})},drawPoints:function(){var a=this,f=a.chart;B(a.points,function(l){var g,p,q,h,c=l.graphic,m,v=!c;void 0!==l.plotY&&(c||(l.graphic=c=f.renderer.path().add(a.group)),p=c.strokeWidth()%2/2,m=Math.round(l.plotX)-
p,q=Math.round(l.shapeArgs.width/2),h=["M",m,Math.round(l.yBottom),"L",m,Math.round(l.plotY)],null!==l.open&&(g=Math.round(l.plotOpen)+p,h.push("M",m,g,"L",m-q,g)),null!==l.close&&(g=Math.round(l.plotClose)+p,h.push("M",m,g,"L",m+q,g)),c[v?"attr":"animate"]({d:h}).addClass(l.getClassName(),!0))})},animate:null},{getClassName:function(){return D.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(J);(function(a){var B=a.defaultPlotOptions,D=
a.each,F=a.merge;a=a.seriesType;a("candlestick","ohlc",F(B.column,{states:{hover:{lineWidth:2}},tooltip:B.ohlc.tooltip,threshold:null}),{drawPoints:function(){var a=this,t=a.chart;D(a.points,function(f){var l=f.graphic,g,p,q,h,c,m,v,z=!l;void 0!==f.plotY&&(l||(f.graphic=l=t.renderer.path().add(a.group)),c=l.strokeWidth()%2/2,m=Math.round(f.plotX)-c,g=f.plotOpen,p=f.plotClose,q=Math.min(g,p),g=Math.max(g,p),v=Math.round(f.shapeArgs.width/2),p=Math.round(q)!==Math.round(f.plotY),h=g!==f.yBottom,q=Math.round(q)+
c,g=Math.round(g)+c,c=[],c.push("M",m-v,g,"L",m-v,q,"L",m+v,q,"L",m+v,g,"Z","M",m,q,"L",m,p?Math.round(f.plotY):q,"M",m,g,"L",m,h?Math.round(f.yBottom):g),l[z?"attr":"animate"]({d:c}).addClass(f.getClassName(),!0))})}})})(J);(function(a){var B=a.addEvent,D=a.each,F=a.noop,H=a.seriesType,t=a.seriesTypes,f=a.TrackerMixin,l=a.SVGRenderer.prototype.symbols;H("flags","column",{pointRange:0,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}<br/>"},threshold:null,y:-30},
{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:a.Series.prototype.init,translate:function(){t.column.prototype.translate.apply(this);var a=this.options,f=this.chart,l=this.points,h=l.length-1,c,m,v=a.onSeries;c=v&&f.get(v);var a=a.onKey||"y",v=c&&c.options.step,z=c&&c.points,d=z&&z.length,k=this.xAxis,e=k.getExtremes(),b=0,n,G,E;if(c&&c.visible&&d)for(b=(c.pointXOffset||0)+(c.barW||0)/2,c=c.currentDataGrouping,G=z[d-1].x+(c?c.totalRange:
0),l.sort(function(a,b){return a.x-b.x}),a="plot"+a[0].toUpperCase()+a.substr(1);d--&&l[h]&&!(c=l[h],n=z[d],n.x<=c.x&&void 0!==n[a]&&(c.x<=G&&(c.plotY=n[a],n.x<c.x&&!v&&(E=z[d+1])&&void 0!==E[a]&&(c.plotY+=(c.x-n.x)/(E.x-n.x)*(E[a]-n[a]))),h--,d++,0>h)););D(l,function(a,c){var d;void 0===a.plotY&&(a.x>=e.min&&a.x<=e.max?a.plotY=f.chartHeight-k.bottom-(k.opposite?k.height:0)+k.offset-f.plotTop:a.shapeArgs={});a.plotX+=b;(m=l[c-1])&&m.plotX===a.plotX&&(void 0===m.stackIndex&&(m.stackIndex=0),d=m.stackIndex+
1);a.stackIndex=d})},drawPoints:function(){var a=this.points,f=this.chart,l=f.renderer,h,c,m=this.options,t=m.y,z,d,k,e,b,n,G,E=this.yAxis;for(d=a.length;d--;)k=a[d],G=k.plotX>this.xAxis.len,h=k.plotX,e=k.stackIndex,z=k.options.shape||m.shape,c=k.plotY,void 0!==c&&(c=k.plotY+t-(void 0!==e&&e*m.stackDistance)),b=e?void 0:k.plotX,n=e?void 0:k.plotY,e=k.graphic,void 0!==c&&0<=h&&!G?(e||(e=k.graphic=l.label("",null,null,z,null,null,m.useHTML).attr({align:"flag"===z?"left":"center",width:m.width,height:m.height,
"text-align":m.textAlign}).addClass("highcharts-point").add(this.markerGroup)),0<h&&(h-=e.strokeWidth()%2),e.attr({text:k.options.title||m.title||"A",x:h,y:c,anchorX:b,anchorY:n}),k.tooltipPos=f.inverted?[E.len+E.pos-f.plotLeft-c,this.xAxis.len-h]:[h,c]):e&&(k.graphic=e.destroy())},drawTracker:function(){var a=this.points;f.drawTrackerPoint.apply(this);D(a,function(f){var l=f.graphic;l&&B(l.element,"mouseover",function(){0<f.stackIndex&&!f.raised&&(f._y=l.y,l.attr({y:f._y-8}),f.raised=!0);D(a,function(a){a!==
f&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:F,buildKDTree:F,setClip:F});l.flag=function(a,f,l,h,c){return["M",c&&c.anchorX||a,c&&c.anchorY||f,"L",a,f+h,a,f,a+l,f,a+l,f+h,a,f+h,"Z"]};D(["circle","square"],function(a){l[a+"pin"]=function(f,q,h,c,m){var t=m&&m.anchorX;m=m&&m.anchorY;"circle"===a&&c>h&&(f-=Math.round((c-h)/2),h=c);f=l[a](f,q,h,c);t&&m&&f.push("M",t,q>m?q:q+c,"L",t,m);return f}})})(J);(function(a){function B(a,b,c){this.init(a,b,c)}var D=a.addEvent,F=
a.Axis,H=a.correctFloat,t=a.defaultOptions,f=a.defined,l=a.destroyObjectProperties,g=a.doc,p=a.each,q=a.fireEvent,h=a.hasTouch,c=a.isTouchDevice,m=a.merge,v=a.pick,z=a.removeEvent,d=a.wrap,k={height:c?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!c,margin:10,minWidth:6,step:.2,zIndex:3};t.scrollbar=m(!0,k,t.scrollbar);B.prototype={init:function(a,b,c){this.scrollbarButtons=[];this.renderer=a;this.userOptions=b;this.options=m(k,b);this.chart=c;this.size=v(this.options.size,this.options.height);
b.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,b=this.options,c=this.size,d;this.group=d=a.g("scrollbar").attr({zIndex:b.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:b.trackBorderRadius||0,height:c,width:c}).add(d);this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(d);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:c,
width:c,r:b.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(this.swapXY(["M",-3,c/4,"L",-3,2*c/3,"M",0,c/4,"L",0,2*c/3,"M",3,c/4,"L",3,2*c/3],b.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,b,c,d){var f=this.options.vertical,
g=0,h=this.rendered?"animate":"attr";this.x=a;this.y=b+this.trackBorderWidth;this.width=c;this.xOffset=this.height=d;this.yOffset=g;f?(this.width=this.yOffset=c=g=this.size,this.xOffset=b=0,this.barWidth=d-2*c,this.x=a+=this.options.margin):(this.height=this.xOffset=d=b=this.size,this.barWidth=c-2*d,this.y+=this.options.margin);this.group[h]({translateX:a,translateY:this.y});this.track[h]({width:c,height:d});this.scrollbarButtons[1].attr({translateX:f?0:c-b,translateY:f?d-g:0})},drawScrollbarButton:function(a){var b=
this.renderer,c=this.scrollbarButtons,d=this.options,f=this.size,g;g=b.g().add(this.group);c.push(g);g=b.rect().addClass("highcharts-scrollbar-button").add(g);g.attr(g.crisp({x:-.5,y:-.5,width:f+1,height:f+1,r:d.buttonBorderRadius},g.strokeWidth()));b.path(this.swapXY(["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])},swapXY:function(a,b){var c,d=a.length,f;if(b)for(c=0;c<d;c+=3)f=a[c+1],a[c+1]=a[c+2],a[c+2]=f;return a},
setRange:function(a,b){var c=this.options,d=c.vertical,g=c.minWidth,h=this.barWidth,k,m,l=this.rendered&&!this.hasDragged?"animate":"attr";f(h)&&(a=Math.max(a,0),k=h*a,m=h*Math.min(b,1),this.calculatedWidth=m=H(m-k),m<g&&(k=(h-g+m)*a,m=g),g=Math.floor(k+this.xOffset+this.yOffset),h=m/2-.5,this.from=a,this.to=b,d?(this.scrollbarGroup[l]({translateY:g}),this.scrollbar[l]({height:m}),this.scrollbarRifles[l]({translateY:h}),this.scrollbarTop=g,this.scrollbarLeft=0):(this.scrollbarGroup[l]({translateX:g}),
this.scrollbar[l]({width:m}),this.scrollbarRifles[l]({translateX:h}),this.scrollbarLeft=g,this.scrollbarTop=0),12>=m?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===c.showFull&&(0>=a&&1<=b?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",f=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(f[0]+d,f[1]+d),a.hasDragged&&q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&q(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=H(a.to-a.from)*a.options.step;a.updatePosition(H(a.from-c),H(a.to-c));q(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);q(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,f=a.y+a.scrollbarTop,g=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>f||!a.options.vertical&&
c.chartX>g?a.updatePosition(a.from+d,a.to+d):a.updatePosition(a.from-d,a.to-d);q(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,b){1<b&&(a=H(1-H(b-a)),b=1);0>a&&(b=H(b-a),a=0);this.from=a;this.to=b},update:function(a){this.destroy();
this.init(this.chart.renderer,m(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,c=this.scrollbarGroup.element,d=this.mouseDownHandler,f=this.mouseMoveHandler,k=this.mouseUpHandler,a=[[b[a[0]].element,"click",this.buttonToMinClick],[b[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[c,"mousedown",d],[g,"mousemove",f],[g,"mouseup",k]];h&&a.push([c,"touchstart",d],[g,"touchmove",f],[g,"touchend",
k]);p(a,function(a){D.apply(null,a)});this._events=a},removeEvents:function(){p(this._events,function(a){z.apply(null,a)});this._events=void 0},destroy:function(){var a=this.chart.scroller;this.removeEvents();p(["track","scrollbarRifles","scrollbar","scrollbarGroup","group"],function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&(a.scrollbar=null,l(a.scrollbarButtons))}};d(F.prototype,"init",function(a){var b=this;a.apply(b,[].slice.call(arguments,1));b.options.scrollbar&&b.options.scrollbar.enabled&&
(b.options.scrollbar.vertical=!b.horiz,b.options.startOnTick=b.options.endOnTick=!1,b.scrollbar=new B(b.chart.renderer,b.options.scrollbar,b.chart),D(b.scrollbar,"changed",function(a){var c=Math.min(v(b.options.min,b.min),b.min,b.dataMin),d=Math.max(v(b.options.max,b.max),b.max,b.dataMax)-c,e;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(e=c+d*this.to,c+=d*this.from):(e=c+d*(1-this.from),c+=d*(1-this.to));b.setExtremes(c,e,!0,!1,a)}))});d(F.prototype,"render",function(a){var b=Math.min(v(this.options.min,
this.min),this.min,this.dataMin),c=Math.max(v(this.options.max,this.max),this.max,this.dataMax),d=this.scrollbar,g;a.apply(this,[].slice.call(arguments,1));d&&(this.horiz?d.position(this.left,this.top+this.height+this.offset+2+(this.opposite?0:this.axisTitleMargin),this.width,this.height):d.position(this.left+this.width+2+this.offset+(this.opposite?this.axisTitleMargin:0),this.top,this.width,this.height),isNaN(b)||isNaN(c)||!f(this.min)||!f(this.max)?d.setRange(0,0):(g=(this.min-b)/(c-b),b=(this.max-
b)/(c-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?d.setRange(g,b):d.setRange(1-b,1-g)))});d(F.prototype,"getOffset",function(a){var b=this.horiz?2:1,c=this.scrollbar;a.apply(this,[].slice.call(arguments,1));c&&(this.chart.axisOffset[b]+=c.size+c.options.margin)});d(F.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,[].slice.call(arguments,1))});a.Scrollbar=B})(J);(function(a){function B(a){this.init(a)}var D=a.addEvent,F=a.Axis,H=
a.Chart,t=a.defaultOptions,f=a.defined,l=a.destroyObjectProperties,g=a.doc,p=a.each,q=a.erase,h=a.error,c=a.extend,m=a.grep,v=a.hasTouch,z=a.isNumber,d=a.isObject,k=a.isTouchDevice,e=a.merge,b=a.pick,n=a.removeEvent,G=a.Scrollbar,E=a.Series,A=a.seriesTypes,u=a.wrap,x=[].concat(a.defaultDataGroupingUnits),y=function(a){var b=m(arguments,z);if(b.length)return Math[a].apply(0,b)};x[4]=["day",[1,2,3,4]];x[5]=["week",[1,2,3]];c(t,{navigator:{height:40,margin:25,maskInside:!0,series:{type:void 0===A.areaspline?
"line":"areaspline",compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:x},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,shadow:!1,threshold:null},xAxis:{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}}});B.prototype={drawHandle:function(a,b){var c=this.chart.renderer,d=this.handles;this.rendered||(d[b]=c.path(["M",-4.5,.5,"L",3.5,.5,3.5,15.5,-4.5,15.5,-4.5,.5,"M",-1.5,4,"L",-1.5,12,"M",.5,4,"L",.5,12]).attr({zIndex:10-b}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][b]).add());d[b][this.rendered&&!this.hasDragged?"animate":"attr"]({translateX:this.scrollerLeft+
this.scrollbarHeight+parseInt(a,10),translateY:this.top+this.height/2-8})},update:function(a){this.destroy();e(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,c,d,e){var g=this.chart,h=g.renderer,k,m,l,n;n=this.scrollbarHeight;var p=this.xAxis,q=this.navigatorOptions,x=q.maskInside,u=this.height,y=this.top,t=this.navigatorEnabled,A=this.outlineHeight,v;v=this.rendered;if(z(a)&&z(c)&&(!this.hasDragged||f(d))&&(this.navigatorLeft=k=b(p.left,g.plotLeft+n),this.navigatorWidth=
m=b(p.len,g.plotWidth-2*n),this.scrollerLeft=l=k-n,this.scrollerWidth=n=n=m+2*n,d=b(d,p.translate(a)),e=b(e,p.translate(c)),z(d)&&Infinity!==Math.abs(d)||(d=0,e=n),!(p.translate(e,!0)-p.translate(d,!0)<g.xAxis[0].minRange))){this.zoomedMax=Math.min(Math.max(d,e,0),m);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(d,e),0),m);this.range=this.zoomedMax-this.zoomedMin;c=Math.round(this.zoomedMax);a=Math.round(this.zoomedMin);!v&&t&&(this.navigatorGroup=d=h.g("navigator").attr({zIndex:3}).add(),
this.leftShade=h.rect().addClass("highcharts-navigator-mask"+(x?"-inside":"")).add(d),x||(this.rightShade=h.rect().addClass("highcharts-navigator-mask").add(d)),this.outline=h.path().addClass("highcharts-navigator-outline").add(d));if(t){h=v&&!this.hasDragged?"animate":"attr";x=this.outline.strokeWidth();x/=2;v=y+x;this.leftShade[h](q.maskInside?{x:k+a,y:y,width:c-a,height:u}:{x:k,y:y,width:a,height:u});if(this.rightShade)this.rightShade[h]({x:k+c,y:y,width:m-c,height:u});this.outline[h]({d:["M",
l,v,"L",k+a-x,v,k+a-x,v+A,"L",k+c-x,v+A,"L",k+c-x,v,l+n,v].concat(q.maskInside?["M",k+a+x,v,"L",k+c-x,v]:[])});this.drawHandle(a+x,0);this.drawHandle(c+x,1)}this.scrollbar&&(this.scrollbar.hasDragged=this.hasDragged,this.scrollbar.position(this.scrollerLeft,this.top+(t?this.height:-this.scrollbarHeight),this.scrollerWidth,this.scrollbarHeight),this.scrollbar.setRange(a/m,c/m));this.rendered=!0}},addEvents:function(){var a=this.chart,b=a.container,c=this.mouseDownHandler,d=this.mouseMoveHandler,e=
this.mouseUpHandler,f;f=[[b,"mousedown",c],[b,"mousemove",d],[g,"mouseup",e]];v&&f.push([b,"touchstart",c],[b,"touchmove",d],[g,"touchend",e]);p(f,function(a){D.apply(null,a)});this._events=f;this.series&&this.series[0]&&D(this.series[0].xAxis,"foundExtremes",function(){a.scroller.modifyNavigatorAxisExtremes()});D(a,"redraw",function(){var a=this.scroller,b=a&&a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis;b&&a.render(b.min,b.max)})},removeEvents:function(){this._events&&(p(this._events,function(a){n.apply(null,
a)}),this._events=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&!1!==this.navigatorOptions.adaptToUpdatedData&&(p(a,function(a){n(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&n(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,c=b.navigator,d=c.enabled,b=b.scrollbar,g=b.enabled,h=d?c.height:0,m=g?b.height:0;this.handles=[];this.scrollbarButtons=[];this.elementsToDestroy=
[];this.chart=a;this.setBaseSeries();this.height=h;this.scrollbarHeight=m;this.scrollbarEnabled=g;this.navigatorEnabled=d;this.navigatorOptions=c;this.scrollbarOptions=b;this.outlineHeight=h+m;var l=this,n,p,d=l.baseSeries;l.mouseDownHandler=function(b){b=a.pointer.normalize(b);var c=l.zoomedMin,d=l.zoomedMax,e=l.top,f=l.scrollerLeft,g=l.scrollerWidth,m=l.navigatorLeft,q=l.navigatorWidth,x=l.scrollbarPad||0,u=l.range,w=b.chartX,y=b.chartY;b=a.xAxis[0];var t,C=k?10:7;y>e&&y<e+h&&(Math.abs(w-c-m)<C?
(l.grabbedLeft=!0,l.otherHandlePos=d,l.fixedExtreme=b.max,a.fixedRange=null):Math.abs(w-d-m)<C?(l.grabbedRight=!0,l.otherHandlePos=c,l.fixedExtreme=b.min,a.fixedRange=null):w>m+c-x&&w<m+d+x?(l.grabbedCenter=w,l.fixedWidth=u,p=w-c):w>f&&w<f+g&&(d=w-m-u/2,0>d?d=0:d+u>=q&&(d=q-u,t=l.getUnionExtremes().dataMax),d!==c&&(l.fixedWidth=u,c=n.toFixedRange(d,d+u,null,t),b.setExtremes(c.min,c.max,!0,null,{trigger:"navigator"}))))};l.mouseMoveHandler=function(b){var c=l.scrollbarHeight,d=l.navigatorLeft,e=l.navigatorWidth,
f=l.scrollerLeft,g=l.scrollerWidth,h=l.range,k;b.touches&&0===b.touches[0].pageX||(b=a.pointer.normalize(b),k=b.chartX,k<d?k=d:k>f+g-c&&(k=f+g-c),l.grabbedLeft?(l.hasDragged=!0,l.render(0,0,k-d,l.otherHandlePos)):l.grabbedRight?(l.hasDragged=!0,l.render(0,0,l.otherHandlePos,k-d)):l.grabbedCenter&&(l.hasDragged=!0,k<p?k=p:k>e+p-h&&(k=e+p-h),l.render(0,0,k-p,k-p+h)),l.hasDragged&&l.scrollbar&&l.scrollbar.options.liveRedraw&&(b.DOMType=b.type,setTimeout(function(){l.mouseUpHandler(b)},0)))};l.mouseUpHandler=
function(b){var c,d,e=b.DOMEvent||b;if(l.hasDragged||"scrollbar"===b.trigger)l.zoomedMin===l.otherHandlePos?c=l.fixedExtreme:l.zoomedMax===l.otherHandlePos&&(d=l.fixedExtreme),l.zoomedMax===l.navigatorWidth&&(d=l.getUnionExtremes().dataMax),c=n.toFixedRange(l.zoomedMin,l.zoomedMax,c,d),f(c.min)&&a.xAxis[0].setExtremes(c.min,c.max,!0,l.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:e});"mousemove"!==b.DOMType&&(l.grabbedLeft=l.grabbedRight=l.grabbedCenter=l.fixedWidth=
l.fixedExtreme=l.otherHandlePos=l.hasDragged=p=null)};var b=a.xAxis.length,g=a.yAxis.length,q=d&&d[0]&&d[0].xAxis||a.xAxis[0];a.extraBottomMargin=l.outlineHeight+c.margin;a.isDirtyBox=!0;l.navigatorEnabled?(l.xAxis=n=new F(a,e({breaks:q.options.breaks,ordinal:q.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:b,height:h,offset:0,offsetLeft:m,offsetRight:-m,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1})),
l.yAxis=new F(a,e(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,height:h,offset:0,index:g,zoomEnabled:!1})),d||c.series.data?l.addBaseSeries():0===a.series.length&&u(a,"redraw",function(b,c){0<a.series.length&&!l.series&&(l.setBaseSeries(),a.redraw=b);b.call(a,c)})):l.xAxis=n={translate:function(b,c){var d=a.xAxis[0],e=d.getExtremes(),f=a.plotWidth-2*m,g=y("min",d.options.min,e.dataMin),d=y("max",d.options.max,e.dataMax)-g;return c?b*d/f+g:f*(b-g)/d},toFixedRange:F.prototype.toFixedRange};a.options.scrollbar.enabled&&
(a.scrollbar=l.scrollbar=new G(a.renderer,e(a.options.scrollbar,{margin:l.navigatorEnabled?0:10}),a),D(l.scrollbar,"changed",function(b){var c=l.navigatorWidth,d=c*this.to,c=c*this.from;l.hasDragged=l.scrollbar.hasDragged;l.render(0,0,c,d);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType)&&setTimeout(function(){l.mouseUpHandler(b)})}));l.addBaseSeriesEvents();l.addEvents()},getUnionExtremes:function(a){var c=this.chart.xAxis[0],d=this.xAxis,e=d.options,f=c.options,g;a&&null===c.dataMin||(g=
{dataMin:b(e&&e.min,y("min",f.min,c.dataMin,d.dataMin,d.min)),dataMax:b(e&&e.max,y("max",f.max,c.dataMax,d.dataMax,d.max))});return g},setBaseSeries:function(a){var b=this.chart,c=this.baseSeries=[];a=a||b.options&&b.options.navigator.baseSeries||0;this.series&&(this.removeBaseSeriesEvents(),p(this.series,function(a){a.remove()}));p(b.series||[],function(b,d){(b.options.showInNavigator||(d===a||b.options.id===a)&&!1!==b.options.showInNavigator)&&c.push(b)});this.xAxis&&this.addBaseSeries()},addBaseSeries:function(){var a=
this,b=a.chart,c=a.series=[],d=a.baseSeries,f,g,h=a.navigatorOptions.series,k,l={enableMouseTracking:!1,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,visible:!0};d?p(d,function(d,m){l.name="Navigator "+(m+1);f=d.options||{};k=f.navigatorOptions||{};g=e(f,l,h,k);var n=k.data||h.data;a.hasNavigatorData=a.hasNavigatorData||!!n;g.data=n||f.data&&f.data.slice(0);d.navigatorSeries=b.initSeries(g);c.push(d.navigatorSeries)}):(g=e(h,l),
g.data=h.data,a.hasNavigatorData=!!g.data,c.push(b.initSeries(g)));this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&D(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);!1!==this.navigatorOptions.adaptToUpdatedData&&p(b,function(b){b.xAxis&&(D(b,"updatedData",this.updatedDataHandler),b.userOptions.events=c(b.userOptions.event,{updatedData:this.updatedDataHandler}));D(b,"remove",function(){this.navigatorSeries&&(q(a.series,this.navigatorSeries),
this.navigatorSeries.remove(),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.scroller,b=this.getExtremes(),c=b.dataMin,d=b.dataMax,b=b.max-b.min,e=a.stickToMin,f=a.stickToMax,g,h,k=a.series&&a.series[0],l=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||
(e&&(h=c,g=h+b),f&&(g=d,e||(h=Math.max(g-b,k&&k.xData?k.xData[0]:-Number.MAX_VALUE))),l&&(e||f)&&z(h)&&(this.min=this.userMin=h,this.max=this.userMax=g));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.scroller,b=this.navigatorSeries;a.stickToMin=z(this.xAxis.min)&&this.xAxis.min<=this.xData[0];a.stickToMax=Math.round(a.zoomedMax)>=Math.round(a.navigatorWidth);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},destroy:function(){this.removeEvents();
this.xAxis&&(q(this.chart.xAxis,this.xAxis),q(this.chart.axes,this.xAxis));this.yAxis&&(q(this.chart.yAxis,this.yAxis),q(this.chart.axes,this.yAxis));p(this.series||[],function(a){a.destroy&&a.destroy()});delete this.series;p("xAxis yAxis leftShade rightShade outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup".split(" "),function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);this.rendered=null;p([this.handles,this.elementsToDestroy],function(a){l(a)},
this)}};a.Navigator=B;u(F.prototype,"zoom",function(a,b,c){var d=this.chart,e=d.options,g=e.chart.zoomType,h=e.navigator,e=e.rangeSelector,k;this.isXAxis&&(h&&h.enabled||e&&e.enabled)&&("x"===g?d.resetZoomButton="blocked":"y"===g?k=!1:"xy"===g&&(d=this.previousZoom,f(b)?this.previousZoom=[this.min,this.max]:d&&(b=d[0],c=d[1],delete this.previousZoom)));return void 0!==k?k:a.call(this,b,c)});u(H.prototype,"init",function(a,b,c){D(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||
a.scrollbar.enabled)this.scroller=this.navigator=new B(this)});a.call(this,b,c)});u(H.prototype,"getMargins",function(a){var c=this.legend,d=c.options,e=this.scroller,f,g;a.apply(this,[].slice.call(arguments,1));e&&(f=e.xAxis,g=e.yAxis,e.top=e.navigatorOptions.top||this.chartHeight-e.height-e.scrollbarHeight-this.spacing[2]-("bottom"===d.verticalAlign&&d.enabled&&!d.floating?c.legendHeight+b(d.margin,10):0),f&&g&&(f.options.top=g.options.top=e.top,f.setAxisSize(),g.setAxisSize()))});u(E.prototype,
"addPoint",function(a,b,c,e,f){var g=this.options.turboThreshold;g&&this.xData.length>g&&d(b,!0)&&this.chart.scroller&&h(20,!0);a.call(this,b,c,e,f)});u(H.prototype,"addSeries",function(a,c,d,e){a.call(this,c,!1,e);this.scroller&&this.scroller.setBaseSeries();b(d,!0)&&this.redraw()});u(E.prototype,"update",function(a,c,d){a.call(this,c,!1);this.chart.scroller&&this.chart.scroller.setBaseSeries();b(d,!0)&&this.chart.redraw()})})(J);(function(a){function B(a){this.init(a)}var D=a.addEvent,F=a.Axis,
H=a.Chart,t=a.css,f=a.createElement,l=a.dateFormat,g=a.defaultOptions,p=a.defined,q=a.destroyObjectProperties,h=a.discardElement,c=a.each,m=a.extend,v=a.fireEvent,z=a.Date,d=a.isNumber,k=a.merge,e=a.pick,b=a.pInt,n=a.removeEvent,G=a.splat,E=a.wrap;m(g,{rangeSelector:{buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},height:35,inputPosition:{align:"right"}}});g.lang=k(g.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});B.prototype={clickButton:function(a,
b){var f=this,g=f.selected,h=f.chart,k=f.buttons,l=f.buttonOptions[a],m=h.xAxis[0],n=h.scroller&&h.scroller.getUnionExtremes()||m||{},p=n.dataMin,q=n.dataMax,t,v=m&&Math.round(Math.min(m.max,e(q,m.max))),B=l.type,E,n=l._range,H,J,M,Q=l.dataGrouping;if(null!==p&&null!==q&&a!==f.selected){h.fixedRange=n;Q&&(this.forcedDataGrouping=!0,F.prototype.setDataGrouping.call(m||{chart:this.chart},Q,!1));if("month"===B||"year"===B)m?(B={range:l,max:v,dataMin:p,dataMax:q},t=m.minFromRange.call(B),d(B.newMax)&&
(v=B.newMax)):n=l;else if(n)t=Math.max(v-n,p),v=Math.min(t+n,q);else if("ytd"===B)if(m)void 0===q&&(p=Number.MAX_VALUE,q=Number.MIN_VALUE,c(h.series,function(a){a=a.xData;p=Math.min(a[0],p);q=Math.max(a[a.length-1],q)}),b=!1),v=new z(q),t=v[z.hcGetFullYear](),t=H=Math.max(p||0,z.UTC(t,0,1)),v=v.getTime(),v=Math.min(q||v,v);else{D(h,"beforeRender",function(){f.clickButton(a)});return}else"all"===B&&m&&(t=p,v=q);k[g]&&k[g].setState(0);k[a]&&(k[a].setState(2),f.lastSelected=a);m?(m.setExtremes(t,v,e(b,
1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:l}),f.setSelected(a)):(E=G(h.options.xAxis)[0],M=E.range,E.range=n,J=E.min,E.min=H,f.setSelected(a),D(h,"load",function(){E.range=M;E.min=J}))}},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,d=a.options.rangeSelector,
e=d.buttons||[].concat(b.defaultButtons),f=d.selected,g=b.blurInputs=function(){var a=b.minInput,c=b.maxInput;a&&a.blur&&v(a,"blur");c&&c.blur&&v(c,"blur")};b.chart=a;b.options=d;b.buttons=[];a.extraTopMargin=d.height;b.buttonOptions=e;D(a.container,"mousedown",g);D(a,"resize",g);c(e,b.computeButtonRange);void 0!==f&&e[f]&&this.clickButton(f,!1);D(a,"load",function(){D(a.xAxis[0],"setExtremes",function(c){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==c.trigger&&"updatedData"!==c.trigger&&
b.forcedDataGrouping&&this.setDataGrouping(!1,!1)});D(a.xAxis[0],"afterSetExtremes",function(){b.updateButtonStates(!0)})})},updateButtonStates:function(a){var b=this,d=this.chart,e=d.xAxis[0],f=d.scroller&&d.scroller.getUnionExtremes()||e,g=f.dataMin,h=f.dataMax,k=b.selected,l=b.options.allButtonsEnabled,m=b.buttons;a&&d.fixedRange!==Math.round(e.max-e.min)&&(m[k]&&m[k].setState(0),b.setSelected(null));c(b.buttonOptions,function(a,c){var f=Math.round(e.max-e.min),n=a._range,p=a.type,q=a.count||1,
r=n>h-g,t=n<e.minRange,A="all"===a.type&&e.max-e.min>=h-g&&2!==m[c].state,v=d.renderer.forExport&&c===k,n=n===f,z=!e.hasVisibleSeries;("month"===p||"year"===p)&&f>=864E5*{month:28,year:365}[p]*q&&f<=864E5*{month:31,year:366}[p]*q&&(n=!0);v||n&&c!==k&&c===b.lastSelected?(b.setSelected(c),m[c].setState(2)):!l&&(r||t||A||z)?m[c].setState(3):3===m[c].state&&m[c].setState(0)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};
if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c},setInputValue:function(a,b){var c=this.chart.options.rangeSelector;p(b)&&(this[a+"Input"].HCTime=b);this[a+"Input"].value=l(c.inputEditDateFormat||"%Y-%m-%d",this[a+"Input"].HCTime);this[a+"DateBox"].attr({text:l(c.inputDateFormat||"%b %e, %Y",this[a+"Input"].HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];t(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){t(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(a){function c(){var a=p.value,f=(l.inputDateParser||Date.parse)(a),k=h.scroller&&h.scroller.xAxis?h.scroller.xAxis:h.xAxis[0],m=k.dataMin,q=k.dataMax;f!==p.previousValue&&(p.previousValue=f,d(f)||(f=a.split("-"),f=Date.UTC(b(f[0]),b(f[1])-1,b(f[2]))),d(f)&&(g.global.useUTC||(f+=6E4*(new Date).getTimezoneOffset()),n?f>e.maxInput.HCTime?
f=void 0:f<m&&(f=m):f<e.minInput.HCTime?f=void 0:f>q&&(f=q),void 0!==f&&h.xAxis[0].setExtremes(n?f:k.min,n?k.max:f,void 0,void 0,{trigger:"rangeSelectorInput"})))}var e=this,h=e.chart,k=h.renderer,l=h.options.rangeSelector,m=e.div,n="min"===a,p,q,t=this.inputGroup;this[a+"Label"]=q=k.label(g.lang[n?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(t);t.offset+=q.width+5;this[a+"DateBox"]=k=k.label("",t.offset).addClass("highcharts-range-input").attr({padding:2,
width:l.inputBoxWidth||90,height:l.inputBoxHeight||17,stroke:l.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click",function(){e.showInput(a);e[a+"Input"].focus()}).add(t);t.offset+=k.width+(n?10:0);this[a+"Input"]=p=f("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:h.plotTop+"px"},m);p.onfocus=function(){e.showInput(a)};p.onblur=function(){e.hideInput(a)};p.onchange=c;p.onkeypress=function(a){13===a.keyCode&&c()}},getPosition:function(){var a=
this.chart,b=a.options.rangeSelector,a=e((b.buttonPosition||{}).y,a.plotTop-a.axisOffset[0]-b.height);return{buttonTop:a,inputTop:a-10}},render:function(a,b){var d=this,h=d.chart,k=h.renderer,l=h.container,n=h.options,q=n.exporting&&!1!==n.exporting.enabled&&n.navigation&&n.navigation.buttonOptions,t=n.rangeSelector,v=d.buttons,n=g.lang,z=d.div,z=d.inputGroup,B=t.buttonTheme,D=t.buttonPosition||{},F=t.inputEnabled,E=B&&B.states,G=h.plotLeft,H,J=this.getPosition(),Q=d.group,W=d.rendered;!1!==t.enabled&&
(W||(d.group=Q=k.g("range-selector-buttons").add(),d.zoomText=k.text(n.rangeSelectorZoom,e(D.x,G),15).css(t.labelStyle).add(Q),H=e(D.x,G)+d.zoomText.getBBox().width+5,c(d.buttonOptions,function(a,b){v[b]=k.button(a.text,H,0,function(){d.clickButton(b);d.isActive=!0},B,E&&E.hover,E&&E.select,E&&E.disabled).attr({"text-align":"center"}).add(Q);H+=v[b].width+e(t.buttonSpacing,5);d.selected===b&&v[b].setState(2)}),d.updateButtonStates(),!1!==F&&(d.div=z=f("div",null,{position:"relative",height:0,zIndex:1}),
l.parentNode.insertBefore(z,l),d.inputGroup=z=k.g("input-group").add(),z.offset=0,d.drawInput("min"),d.drawInput("max"))),Q[W?"animate":"attr"]({translateY:J.buttonTop}),!1!==F&&(z.align(m({y:J.inputTop,width:z.offset,x:q&&J.inputTop<(q.y||0)+q.height-h.spacing[0]?-40:0},t.inputPosition),!0,h.spacingBox),p(F)||(h=Q.getBBox(),z[z.translateX<h.x+h.width+10?"hide":"show"]()),d.setInputValue("min",a),d.setInputValue("max",b)),d.rendered=!0)},update:function(a){var b=this.chart;k(!0,b.options.rangeSelector,
a);this.destroy();this.init(b)},destroy:function(){var a=this.minInput,b=this.maxInput,c=this.chart,d=this.blurInputs,e;n(c.container,"mousedown",d);n(c,"resize",d);q(this.buttons);a&&(a.onfocus=a.onblur=a.onchange=null);b&&(b.onfocus=b.onblur=b.onchange=null);for(e in this)this[e]&&"chart"!==e&&(this[e].destroy?this[e].destroy():this[e].nodeType&&h(this[e])),this[e]!==B.prototype[e]&&(this[e]=null)}};F.prototype.toFixedRange=function(a,b,c,f){var g=this.chart&&this.chart.fixedRange;a=e(c,this.translate(a,
!0));b=e(f,this.translate(b,!0));c=g&&(b-a)/g;.7<c&&1.3>c&&(f?a=b-g:b=a+g);d(a)||(a=b=void 0);return{min:a,max:b}};F.prototype.minFromRange=function(){var a=this.range,b={month:"Month",year:"FullYear"}[a.type],c,f=this.max,g,h,k=function(a,c){var d=new Date(a);d["set"+b](d["get"+b]()+c);return d.getTime()-a};d(a)?(c=this.max-a,h=a):c=f+k(f,-a.count);g=e(this.dataMin,Number.MIN_VALUE);d(c)||(c=g);c<=g&&(c=g,void 0===h&&(h=k(c,a.count)),this.newMax=Math.min(c+h,this.dataMax));d(f)||(c=void 0);return c};
E(H.prototype,"init",function(a,b,c){D(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new B(this))});a.call(this,b,c)});a.RangeSelector=B})(J);(function(a){var B=a.addEvent,D=a.isNumber,F=a.removeEvent;a.Chart.prototype.callbacks.push(function(a){function t(){l=a.xAxis[0].getExtremes();D(l.min)&&p.render(l.min,l.max)}function f(a){p.render(a.min,a.max)}var l,g=a.scroller,p=a.rangeSelector;g&&(l=a.xAxis[0].getExtremes(),g.render(l.min,l.max));p&&(B(a.xAxis[0],"afterSetExtremes",
f),B(a,"redraw",t),t());B(a,"destroy",function(){p&&(F(a,"redraw",t),F(a.xAxis[0],"afterSetExtremes",f))})})})(J);(function(a){var B=a.arrayMax,D=a.arrayMin,F=a.Axis,H=a.Chart,t=a.defined,f=a.each,l=a.format,g=a.inArray,p=a.isNumber,q=a.isString,h=a.map,c=a.merge,m=a.pick,v=a.Point,z=a.Pointer,d=a.Series,k=a.splat,e=a.stop,b=a.SVGRenderer,n=a.wrap,G=d.prototype,E=G.init,A=G.processData,u=v.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(a,b,d){var e=q(a)||a.nodeName,f=arguments[e?1:
0],g=f.series,l,n=m(f.navigator&&f.navigator.enabled,!0)?{startOnTick:!1,endOnTick:!1}:null,p={marker:{enabled:!1,radius:2}},t={shadow:!1,borderWidth:0};f.xAxis=h(k(f.xAxis||{}),function(a){return c({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},a,{type:"datetime",categories:null},n)});f.yAxis=h(k(f.yAxis||{}),function(a){l=m(a.opposite,!0);return c({labels:{y:-2},opposite:l,showLastLabel:!1,title:{text:null}},a)});f.series=null;f=c({chart:{panning:!0,
pinchType:"x"},navigator:{enabled:!0},scrollbar:{enabled:!0},rangeSelector:{enabled:!0},title:{text:null,style:{fontSize:"16px"}},tooltip:{shared:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:p,spline:p,area:p,areaspline:p,arearange:p,areasplinerange:p,column:t,columnrange:t,candlestick:t,ohlc:t}},f,{_stock:!0,chart:{inverted:!1}});f.series=g;return e?new H(a,f,d):new H(f,b)};n(z.prototype,"init",function(a,b,c){var d=c.chart.pinchType||"";a.call(this,b,c);this.pinchX=this.pinchHor=-1!==
d.indexOf("x");this.pinchY=this.pinchVert=-1!==d.indexOf("y");this.hasZoom=this.hasZoom||this.pinchHor||this.pinchVert});n(F.prototype,"autoLabelAlign",function(a){var b=this.chart,c=this.options,b=b._labelPanes=b._labelPanes||{},d=this.options.labels;return this.chart.options._stock&&"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]=1,"right"):a.call(this,[].slice.call(arguments,1))});n(F.prototype,"getPlotLinePath",function(a,
b,c,d,e,k){var l=this,n=this.isLinked&&!this.series?this.linkedParent.series:this.series,u=l.chart,v=u.renderer,z=l.left,A=l.top,B,D,E,F,G=[],H=[],J,V;if("colorAxis"===l.coll)return a.apply(this,[].slice.call(arguments,1));H=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=l.options[b];return p(a)?[u[b][a]]:q(a)?[u.get(a)]:h(n,function(a){return a[b]})}(l.coll);f(l.isXAxis?u.yAxis:u.xAxis,function(a){if(t(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=t(a.options[b])?
u[b][a.options[b]]:u[b][0];l===b&&H.push(a)}});J=H.length?[]:[l.isXAxis?u.yAxis[0]:u.xAxis[0]];f(H,function(a){-1===g(a,J)&&J.push(a)});V=m(k,l.translate(b,null,null,d));p(V)&&(l.horiz?f(J,function(a){var b;D=a.pos;F=D+a.len;B=E=Math.round(V+l.transB);if(B<z||B>z+l.width)e?B=E=Math.min(Math.max(z,B),z+l.width):b=!0;b||G.push("M",B,D,"L",E,F)}):f(J,function(a){var b;B=a.pos;E=B+a.len;D=F=Math.round(A+l.height-V);if(D<A||D>A+l.height)e?D=F=Math.min(Math.max(A,D),l.top+l.height):b=!0;b||G.push("M",B,
D,"L",E,F)}));return 0<G.length?v.crispPolyLine(G,c||1):null});F.prototype.getPlotBandPath=function(a,b){var c=this.getPlotLinePath(b,null,null,!0),d=this.getPlotLinePath(a,null,null,!0),e=[],f;if(d&&c&&d.toString()!==c.toString())for(f=0;f<d.length;f+=6)e.push("M",d[f+1],d[f+2],"L",d[f+4],d[f+5],c[f+4],c[f+5],c[f+1],c[f+2]);else e=null;return e};b.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};n(F.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});n(F.prototype,"drawCrosshair",function(a,b,c){var d,e;a.call(this,b,c);if(t(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){a=this.chart;var f=this.options.crosshair.label,g=this.horiz;d=this.opposite;e=this.left;var h=this.top,k=this.crossLabel,n,p=f.format,q="",u="inside"===this.options.tickPosition,v=!1!==this.crosshair.snap,
z=0;b||(b=this.cross&&this.cross.e);n=g?"center":d?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";k||(k=this.crossLabel=a.renderer.label(null,null,null,f.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:f.align||n,padding:m(f.padding,8),r:m(f.borderRadius,3),zIndex:2}).add(this.labelGroup));g?(n=v?c.plotX+e:b.chartX,h+=d?0:this.height):(n=d?this.width+e:0,h=v?c.plotY+h:b.chartY);
p||f.formatter||(this.isDatetimeAxis&&(q="%b %d, %Y"),p="{value"+(q?":"+q:"")+"}");b=v?c[this.isXAxis?"x":"y"]:this.toValue(g?b.chartX:b.chartY);k.attr({text:p?l(p,{value:b}):f.formatter.call(this,b),x:n,y:h,visibility:"visible"});b=k.getBBox();if(g){if(u&&!d||!u&&d)h=k.y-b.height}else h=k.y-b.height/2;g?(d=e-b.x,e=e+this.width-b.x):(d="left"===this.labelAlign?e:0,e="right"===this.labelAlign?e+this.width:a.chartWidth);k.translateX<d&&(z=d-k.translateX);k.translateX+b.width>=e&&(z=-(k.translateX+b.width-
e));k.attr({x:n+z,y:h,anchorX:g?n:this.opposite?0:a.chartWidth,anchorY:g?this.opposite?a.chartHeight:0:h+b.height/2})}});G.init=function(){E.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;void 0!==b&&(b="value"===a?b-d:b=b/d*100-100,c&&(c.change=b));return b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};G.processData=function(){var a,b=-1,c,d,e,f;A.apply(this,
arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,e=d.length,this.pointArrayMap&&(b=g("close",this.pointArrayMap),-1===b&&(b=g(this.pointValKey||"y",this.pointArrayMap))),a=0;a<e-1;a++)if(f=-1<b?d[a][b]:d[a],p(f)&&c[a+1]>=this.xAxis.min&&0!==f){this.compareValue=f;break}};n(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=D(b),this.dataMax=
B(b))});F.prototype.setCompare=function(a,b){this.isXAxis||(f(this.series,function(b){b.setCompare(a)}),m(b,!0)&&this.chart.redraw())};v.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0<this.change?"+":"")+a.numberFormat(this.change,m(this.series.tooltipOptions.changeDecimals,2)));return u.apply(this,[b])};n(d.prototype,"render",function(a){this.chart.options._stock&&this.xAxis&&(!this.clipBox&&this.animate?(this.clipBox=c(this.chart.clipBox),this.clipBox.width=this.xAxis.len,
this.clipBox.height=this.yAxis.len):this.chart[this.sharedClipKey]?(e(this.chart[this.sharedClipKey]),this.chart[this.sharedClipKey].attr({width:this.xAxis.len,height:this.yAxis.len})):this.clipBox&&(this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len));a.call(this)})})(J);return J});
