/*
 Highcharts JS v5.0.11 (2017-05-04)

 (c) 2009-2016 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(K,T){"object"===typeof module&&module.exports?module.exports=K.document?T(K):T:K.Highcharts=T(K)})("undefined"!==typeof window?window:this,function(K){K=function(){var a=window,x=a.document,B=a.navigator&&a.navigator.userAgent||"",D=x&&x.createElementNS&&!!x.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,E=/(edge|msie|trident)/i.test(B)&&!window.opera,p=!D,e=/Firefox/.test(B),d=e&&4>parseInt(B.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highcharts",
version:"5.0.11",deg2rad:2*Math.PI/360,doc:x,hasBidiBug:d,hasTouch:x&&void 0!==x.documentElement.ontouchstart,isMS:E,isWebKit:/AppleWebKit/.test(B),isFirefox:e,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(B),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:D,vml:p,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){var x=[],B=a.charts,D=a.doc,E=a.win;a.error=function(p,e){p=a.isNumber(p)?"Highcharts error #"+
p+": www.highcharts.com/errors/"+p:p;if(e)throw Error(p);E.console&&console.log(p)};a.Fx=function(a,e,d){this.options=e;this.elem=a;this.prop=d};a.Fx.prototype={dSetter:function(){var a=this.paths[0],e=this.paths[1],d=[],r=this.now,l=a.length,n;if(1===r)d=this.toD;else if(l===e.length&&1>r)for(;l--;)n=parseFloat(a[l]),d[l]=isNaN(n)?a[l]:r*parseFloat(e[l]-n)+n;else d=e;this.elem.attr("d",d,null,!0)},update:function(){var a=this.elem,e=this.prop,d=this.now,r=this.options.step;if(this[e+"Setter"])this[e+
"Setter"]();else a.attr?a.element&&a.attr(e,d,null,!0):a.style[e]=d+this.unit;r&&r.call(a,d,this)},run:function(a,e,d){var p=this,l=function(a){return l.stopped?!1:p.step(a)},n;this.startTime=+new Date;this.start=a;this.end=e;this.unit=d;this.now=this.start;this.pos=0;l.elem=this.elem;l.prop=this.prop;l()&&1===x.push(l)&&(l.timerId=setInterval(function(){for(n=0;n<x.length;n++)x[n]()||x.splice(n--,1);x.length||clearInterval(l.timerId)},13))},step:function(p){var e=+new Date,d,r=this.options,l=this.elem,
n=r.complete,h=r.duration,c=r.curAnim;l.attr&&!l.element?p=!1:p||e>=h+this.startTime?(this.now=this.end,this.pos=1,this.update(),d=c[this.prop]=!0,a.objectEach(c,function(a){!0!==a&&(d=!1)}),d&&n&&n.call(l),p=!1):(this.pos=r.easing((e-this.startTime)/h),this.now=this.start+(this.end-this.start)*this.pos,this.update(),p=!0);return p},initPath:function(p,e,d){function r(a){var b,f;for(m=a.length;m--;)b="M"===a[m]||"L"===a[m],f=/[a-zA-Z]/.test(a[m+3]),b&&f&&a.splice(m+1,0,a[m+1],a[m+2],a[m+1],a[m+2])}
function l(a,c){for(;a.length<f;){a[0]=c[f-a.length];var k=a.slice(0,b);[].splice.apply(a,[0,0].concat(k));F&&(k=a.slice(a.length-b),[].splice.apply(a,[a.length,0].concat(k)),m--)}a[0]="M"}function n(a,c){for(var m=(f-a.length)/b;0<m&&m--;)k=a.slice().splice(a.length/I-b,b*I),k[0]=c[f-b-m*b],v&&(k[b-6]=k[b-2],k[b-5]=k[b-1]),[].splice.apply(a,[a.length/I,0].concat(k)),F&&m--}e=e||"";var h,c=p.startX,u=p.endX,v=-1<e.indexOf("C"),b=v?7:3,f,k,m;e=e.split(" ");d=d.slice();var F=p.isArea,I=F?2:1,z;v&&(r(e),
r(d));if(c&&u){for(m=0;m<c.length;m++)if(c[m]===u[0]){h=m;break}else if(c[0]===u[u.length-c.length+m]){h=m;z=!0;break}void 0===h&&(e=[])}e.length&&a.isNumber(h)&&(f=d.length+h*I*b,z?(l(e,d),n(d,e)):(l(d,e),n(e,d)));return[e,d]}};a.extend=function(a,e){var d;a||(a={});for(d in e)a[d]=e[d];return a};a.merge=function(){var p,e=arguments,d,r={},l=function(d,h){"object"!==typeof d&&(d={});a.objectEach(h,function(c,e){!a.isObject(c,!0)||a.isClass(c)||a.isDOMElement(c)?d[e]=h[e]:d[e]=l(d[e]||{},c)});return d};
!0===e[0]&&(r=e[1],e=Array.prototype.slice.call(e,2));d=e.length;for(p=0;p<d;p++)r=l(r,e[p]);return r};a.pInt=function(a,e){return parseInt(a,e||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(p,e){return!!p&&"object"===typeof p&&(!e||!a.isArray(p))};a.isDOMElement=function(p){return a.isObject(p)&&"number"===typeof p.nodeType};a.isClass=function(p){var e=
p&&p.constructor;return!(!a.isObject(p,!0)||a.isDOMElement(p)||!e||!e.name||"Object"===e.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=function(a,e){for(var d=a.length;d--;)if(a[d]===e){a.splice(d,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(p,e,d){var r;a.isString(e)?a.defined(d)?p.setAttribute(e,d):p&&p.getAttribute&&(r=p.getAttribute(e)):a.defined(e)&&a.isObject(e)&&a.objectEach(e,function(a,d){p.setAttribute(d,a)});return r};a.splat=
function(p){return a.isArray(p)?p:[p]};a.syncTimeout=function(a,e,d){if(e)return setTimeout(a,e,d);a.call(0,d)};a.pick=function(){var a=arguments,e,d,r=a.length;for(e=0;e<r;e++)if(d=a[e],void 0!==d&&null!==d)return d};a.css=function(p,e){a.isMS&&!a.svg&&e&&void 0!==e.opacity&&(e.filter="alpha(opacity\x3d"+100*e.opacity+")");a.extend(p.style,e)};a.createElement=function(p,e,d,r,l){p=D.createElement(p);var n=a.css;e&&a.extend(p,e);l&&n(p,{padding:0,border:"none",margin:0});d&&n(p,d);r&&r.appendChild(p);
return p};a.extendClass=function(p,e){var d=function(){};d.prototype=new p;a.extend(d.prototype,e);return d};a.pad=function(a,e,d){return Array((e||2)+1-String(a).length).join(d||0)+a};a.relativeLength=function(a,e){return/%$/.test(a)?e*parseFloat(a)/100:parseFloat(a)};a.wrap=function(a,e,d){var p=a[e];a[e]=function(){var a=Array.prototype.slice.call(arguments),e=arguments,h=this;h.proceed=function(){p.apply(h,arguments.length?arguments:e)};a.unshift(p);a=d.apply(this,a);h.proceed=null;return a}};
a.getTZOffset=function(p){var e=a.Date;return 6E4*(e.hcGetTimezoneOffset&&e.hcGetTimezoneOffset(p)||e.hcTimezoneOffset||0)};a.dateFormat=function(p,e,d){if(!a.defined(e)||isNaN(e))return a.defaultOptions.lang.invalidDate||"";p=a.pick(p,"%Y-%m-%d %H:%M:%S");var r=a.Date,l=new r(e-a.getTZOffset(e)),n=l[r.hcGetHours](),h=l[r.hcGetDay](),c=l[r.hcGetDate](),u=l[r.hcGetMonth](),v=l[r.hcGetFullYear](),b=a.defaultOptions.lang,f=b.weekdays,k=b.shortWeekdays,m=a.pad,r=a.extend({a:k?k[h]:f[h].substr(0,3),A:f[h],
d:m(c),e:m(c,2," "),w:h,b:b.shortMonths[u],B:b.months[u],m:m(u+1),y:v.toString().substr(2,2),Y:v,H:m(n),k:n,I:m(n%12||12),l:n%12||12,M:m(l[r.hcGetMinutes]()),p:12>n?"AM":"PM",P:12>n?"am":"pm",S:m(l.getSeconds()),L:m(Math.round(e%1E3),3)},a.dateFormats);a.objectEach(r,function(a,b){for(;-1!==p.indexOf("%"+b);)p=p.replace("%"+b,"function"===typeof a?a(e):a)});return d?p.substr(0,1).toUpperCase()+p.substr(1):p};a.formatSingle=function(p,e){var d=/\.([0-9])/,r=a.defaultOptions.lang;/f$/.test(p)?(d=(d=
p.match(d))?d[1]:-1,null!==e&&(e=a.numberFormat(e,d,r.decimalPoint,-1<p.indexOf(",")?r.thousandsSep:""))):e=a.dateFormat(p,e);return e};a.format=function(p,e){for(var d="{",r=!1,l,n,h,c,u=[],v;p;){d=p.indexOf(d);if(-1===d)break;l=p.slice(0,d);if(r){l=l.split(":");n=l.shift().split(".");c=n.length;v=e;for(h=0;h<c;h++)v=v[n[h]];l.length&&(v=a.formatSingle(l.join(":"),v));u.push(v)}else u.push(l);p=p.slice(d+1);d=(r=!r)?"}":"{"}u.push(p);return u.join("")};a.getMagnitude=function(a){return Math.pow(10,
Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(p,e,d,r,l){var n,h=p;d=a.pick(d,1);n=p/d;e||(e=l?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===r&&(1===d?e=a.grep(e,function(a){return 0===a%1}):.1>=d&&(e=[1/d])));for(r=0;r<e.length&&!(h=e[r],l&&h*d>=p||!l&&n<=(e[r]+(e[r+1]||e[r]))/2);r++);return h=a.correctFloat(h*d,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,e){var d=a.length,p,l;for(l=0;l<d;l++)a[l].safeI=l;a.sort(function(a,d){p=e(a,d);return 0===p?
a.safeI-d.safeI:p});for(l=0;l<d;l++)delete a[l].safeI};a.arrayMin=function(a){for(var e=a.length,d=a[0];e--;)a[e]<d&&(d=a[e]);return d};a.arrayMax=function(a){for(var e=a.length,d=a[0];e--;)a[e]>d&&(d=a[e]);return d};a.destroyObjectProperties=function(p,e){a.objectEach(p,function(a,r){a&&a!==e&&a.destroy&&a.destroy();delete p[r]})};a.discardElement=function(p){var e=a.garbageBin;e||(e=a.createElement("div"));p&&e.appendChild(p);e.innerHTML=""};a.correctFloat=function(a,e){return parseFloat(a.toPrecision(e||
14))};a.setAnimation=function(p,e){e.renderer.globalAnimation=a.pick(p,e.options.chart.animation,!0)};a.animObject=function(p){return a.isObject(p)?a.merge(p):{duration:p?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(p,e,d,r){p=+p||0;e=+e;var l=a.defaultOptions.lang,n=(p.toString().split(".")[1]||"").length,h,c;-1===e?e=Math.min(n,20):a.isNumber(e)||(e=2);c=(Math.abs(p)+Math.pow(10,-Math.max(e,n)-1)).toFixed(e);
n=String(a.pInt(c));h=3<n.length?n.length%3:0;d=a.pick(d,l.decimalPoint);r=a.pick(r,l.thousandsSep);p=(0>p?"-":"")+(h?n.substr(0,h)+r:"");p+=n.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+r);e&&(p+=d+c.slice(-e));return p};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(p,e,d){if("width"===e)return Math.min(p.offsetWidth,p.scrollWidth)-a.getStyle(p,"padding-left")-a.getStyle(p,"padding-right");if("height"===e)return Math.min(p.offsetHeight,p.scrollHeight)-a.getStyle(p,
"padding-top")-a.getStyle(p,"padding-bottom");if(p=E.getComputedStyle(p,void 0))p=p.getPropertyValue(e),a.pick(d,!0)&&(p=a.pInt(p));return p};a.inArray=function(a,e){return e.indexOf?e.indexOf(a):[].indexOf.call(e,a)};a.grep=function(a,e){return[].filter.call(a,e)};a.find=function(a,e){return[].find.call(a,e)};a.map=function(a,e){for(var d=[],r=0,l=a.length;r<l;r++)d[r]=e.call(a[r],a[r],r,a);return d};a.offset=function(a){var e=D.documentElement;a=a.getBoundingClientRect();return{top:a.top+(E.pageYOffset||
e.scrollTop)-(e.clientTop||0),left:a.left+(E.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}};a.stop=function(a,e){for(var d=x.length;d--;)x[d].elem!==a||e&&e!==x[d].prop||(x[d].stopped=!0)};a.each=function(a,e,d){return Array.prototype.forEach.call(a,e,d)};a.objectEach=function(a,e,d){for(var r in a)a.hasOwnProperty(r)&&e.call(d,a[r],r,a)};a.addEvent=function(p,e,d){function r(a){a.target=a.srcElement||E;d.call(p,a)}var l=p.hcEvents=p.hcEvents||{};p.addEventListener?p.addEventListener(e,d,!1):p.attachEvent&&
(p.hcEventsIE||(p.hcEventsIE={}),p.hcEventsIE[d.toString()]=r,p.attachEvent("on"+e,r));l[e]||(l[e]=[]);l[e].push(d);return function(){a.removeEvent(p,e,d)}};a.removeEvent=function(p,e,d){function r(a,c){p.removeEventListener?p.removeEventListener(a,c,!1):p.attachEvent&&(c=p.hcEventsIE[c.toString()],p.detachEvent("on"+a,c))}function l(){var c,d;p.nodeName&&(e?(c={},c[e]=!0):c=h,a.objectEach(c,function(a,f){if(h[f])for(d=h[f].length;d--;)r(f,h[f][d])}))}var n,h=p.hcEvents,c;h&&(e?(n=h[e]||[],d?(c=a.inArray(d,
n),-1<c&&(n.splice(c,1),h[e]=n),r(e,d)):(l(),h[e]=[])):(l(),p.hcEvents={}))};a.fireEvent=function(p,e,d,r){var l;l=p.hcEvents;var n,h;d=d||{};if(D.createEvent&&(p.dispatchEvent||p.fireEvent))l=D.createEvent("Events"),l.initEvent(e,!0,!0),a.extend(l,d),p.dispatchEvent?p.dispatchEvent(l):p.fireEvent(e,l);else if(l)for(l=l[e]||[],n=l.length,d.target||a.extend(d,{preventDefault:function(){d.defaultPrevented=!0},target:p,type:e}),e=0;e<n;e++)(h=l[e])&&!1===h.call(p,d)&&d.preventDefault();r&&!d.defaultPrevented&&
r(d)};a.animate=function(p,e,d){var r,l="",n,h,c;a.isObject(d)||(c=arguments,d={duration:c[2],easing:c[3],complete:c[4]});a.isNumber(d.duration)||(d.duration=400);d.easing="function"===typeof d.easing?d.easing:Math[d.easing]||Math.easeInOutSine;d.curAnim=a.merge(e);a.objectEach(e,function(c,v){a.stop(p,v);h=new a.Fx(p,d,v);n=null;"d"===v?(h.paths=h.initPath(p,p.d,e.d),h.toD=e.d,r=0,n=1):p.attr?r=p.attr(v):(r=parseFloat(a.getStyle(p,v))||0,"opacity"!==v&&(l="px"));n||(n=c);n&&n.match&&n.match("px")&&
(n=n.replace(/px/g,""));h.run(r,n,l)})};a.seriesType=function(p,e,d,r,l){var n=a.getOptions(),h=a.seriesTypes;n.plotOptions[p]=a.merge(n.plotOptions[e],d);h[p]=a.extendClass(h[e]||function(){},r);h[p].prototype.type=p;l&&(h[p].prototype.pointClass=a.extendClass(a.Point,l));return h[p]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),e=0;return function(){return"highcharts-"+a+"-"+e++}}();E.jQuery&&(E.jQuery.fn.highcharts=function(){var p=[].slice.call(arguments);if(this[0])return p[0]?
(new (a[a.isString(p[0])?p.shift():"Chart"])(this[0],p[0],p[1]),this):B[a.attr(this[0],"data-highcharts-chart")]});D&&!D.defaultView&&(a.getStyle=function(p,e){var d={width:"clientWidth",height:"clientHeight"}[e];if(p.style[e])return a.pInt(p.style[e]);"opacity"===e&&(e="filter");if(d)return p.style.zoom=1,Math.max(p[d]-2*a.getStyle(p,"padding"),0);p=p.currentStyle[e.replace(/\-(\w)/g,function(a,d){return d.toUpperCase()})];"filter"===e&&(p=p.replace(/alpha\(opacity=([0-9]+)\)/,function(a,d){return d/
100}));return""===p?1:a.pInt(p)});Array.prototype.forEach||(a.each=function(a,e,d){for(var r=0,l=a.length;r<l;r++)if(!1===e.call(d,a[r],r,a))return r});Array.prototype.indexOf||(a.inArray=function(a,e){var d,r=0;if(e)for(d=e.length;r<d;r++)if(e[r]===a)return r;return-1});Array.prototype.filter||(a.grep=function(a,e){for(var d=[],r=0,l=a.length;r<l;r++)e(a[r],r)&&d.push(a[r]);return d});Array.prototype.find||(a.find=function(a,e){var d,r=a.length;for(d=0;d<r;d++)if(e(a[d],d))return a[d]})})(K);(function(a){var x=
a.each,B=a.isNumber,D=a.map,E=a.merge,p=a.pInt;a.Color=function(e){if(!(this instanceof a.Color))return new a.Color(e);this.init(e)};a.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(a){return[p(a[1]),p(a[2]),p(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[p(a[1]),p(a[2]),p(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},
init:function(e){var d,r,l,n;if((this.input=e=this.names[e&&e.toLowerCase?e.toLowerCase():""]||e)&&e.stops)this.stops=D(e.stops,function(d){return new a.Color(d[1])});else if(e&&"#"===e[0]&&(d=e.length,e=parseInt(e.substr(1),16),7===d?r=[(e&16711680)>>16,(e&65280)>>8,e&255,1]:4===d&&(r=[(e&3840)>>4|(e&3840)>>8,(e&240)>>4|e&240,(e&15)<<4|e&15,1])),!r)for(l=this.parsers.length;l--&&!r;)n=this.parsers[l],(d=n.regex.exec(e))&&(r=n.parse(d));this.rgba=r||[]},get:function(a){var d=this.input,e=this.rgba,
l;this.stops?(l=E(d),l.stops=[].concat(l.stops),x(this.stops,function(d,h){l.stops[h]=[l.stops[h][0],d.get(a)]})):l=e&&B(e[0])?"rgb"===a||!a&&1===e[3]?"rgb("+e[0]+","+e[1]+","+e[2]+")":"a"===a?e[3]:"rgba("+e.join(",")+")":d;return l},brighten:function(a){var d,e=this.rgba;if(this.stops)x(this.stops,function(d){d.brighten(a)});else if(B(a)&&0!==a)for(d=0;3>d;d++)e[d]+=p(255*a),0>e[d]&&(e[d]=0),255<e[d]&&(e[d]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this}};a.color=function(e){return new a.Color(e)}})(K);
(function(a){var x,B,D=a.addEvent,E=a.animate,p=a.attr,e=a.charts,d=a.color,r=a.css,l=a.createElement,n=a.defined,h=a.deg2rad,c=a.destroyObjectProperties,u=a.doc,v=a.each,b=a.extend,f=a.erase,k=a.grep,m=a.hasTouch,F=a.inArray,I=a.isArray,z=a.isFirefox,H=a.isMS,q=a.isObject,G=a.isString,C=a.isWebKit,A=a.merge,y=a.noop,L=a.objectEach,g=a.pick,t=a.pInt,N=a.removeEvent,J=a.splat,S=a.stop,M=a.svg,P=a.SVG_NS,Q=a.symbolSizes,O=a.win;x=a.SVGElement=function(){return this};x.prototype={opacity:1,SVG_NS:P,
textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),init:function(a,g){this.element="span"===g?l(g):u.createElementNS(this.SVG_NS,g);this.renderer=a},animate:function(w,b,t){b=a.animObject(g(b,this.renderer.globalAnimation,!0));0!==b.duration?(t&&(b.complete=t),E(this,w,b)):(this.attr(w,null,t),b.step&&b.step.call(this));return this},colorGradient:function(w,g,b){var t=this.renderer,f,c,k,d,m,h,e,C,y,R,
q=[],J;w.radialGradient?c="radialGradient":w.linearGradient&&(c="linearGradient");c&&(k=w[c],m=t.gradients,e=w.stops,R=b.radialReference,I(k)&&(w[c]=k={x1:k[0],y1:k[1],x2:k[2],y2:k[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===c&&R&&!n(k.gradientUnits)&&(d=k,k=A(k,t.getRadialAttr(R,d),{gradientUnits:"userSpaceOnUse"})),L(k,function(a,w){"id"!==w&&q.push(w,a)}),L(e,function(a){q.push(a)}),q=q.join(","),m[q]?R=m[q].attr("id"):(k.id=R=a.uniqueKey(),m[q]=h=t.createElement(c).attr(k).add(t.defs),
h.radAttr=d,h.stops=[],v(e,function(w){0===w[1].indexOf("rgba")?(f=a.color(w[1]),C=f.get("rgb"),y=f.get("a")):(C=w[1],y=1);w=t.createElement("stop").attr({offset:w[0],"stop-color":C,"stop-opacity":y}).add(h);h.stops.push(w)})),J="url("+t.url+"#"+R+")",b.setAttribute(g,J),b.gradient=q,w.toString=function(){return J})},applyTextOutline:function(w){var g=this.element,b,t,c,k,d;-1!==w.indexOf("contrast")&&(w=w.replace(/contrast/g,this.renderer.getContrast(g.style.fill)));w=w.split(" ");t=w[w.length-1];
if((c=w[0])&&"none"!==c&&a.svg){this.fakeTS=!0;w=[].slice.call(g.getElementsByTagName("tspan"));this.ySetter=this.xSetter;c=c.replace(/(^[\d\.]+)(.*?)$/g,function(a,w,g){return 2*w+g});for(d=w.length;d--;)b=w[d],"highcharts-text-outline"===b.getAttribute("class")&&f(w,g.removeChild(b));k=g.firstChild;v(w,function(a,w){0===w&&(a.setAttribute("x",g.getAttribute("x")),w=g.getAttribute("y"),a.setAttribute("y",w||0),null===w&&g.setAttribute("y",0));a=a.cloneNode(1);p(a,{"class":"highcharts-text-outline",
fill:t,stroke:t,"stroke-width":c,"stroke-linejoin":"round"});g.insertBefore(a,k)})}},attr:function(a,g,b,t){var w,f=this.element,c,k=this,d,m;"string"===typeof a&&void 0!==g&&(w=a,a={},a[w]=g);"string"===typeof a?k=(this[a+"Getter"]||this._defaultGetter).call(this,a,f):(L(a,function(w,g){d=!1;t||S(this,g);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(g)&&(c||(this.symbolAttr(a),c=!0),d=!0);!this.rotation||"x"!==g&&"y"!==g||(this.doTransform=!0);d||(m=this[g+"Setter"]||
this._defaultSetter,m.call(this,w,g,f))},this),this.doTransform&&(this.updateTransform(),this.doTransform=!1));b&&b();return k},addClass:function(a,g){var w=this.attr("class")||"";-1===w.indexOf(a)&&(g||(a=(w+(w?" ":"")+a).replace("  "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==p(this.element,"class").indexOf(a)},removeClass:function(a){p(this.element,"class",(p(this.element,"class")||"").replace(a,""));return this},symbolAttr:function(a){var w=this;v("x y r start end width height innerR anchorX anchorY".split(" "),
function(b){w[b]=g(a[b],w[b])});w.attr({d:w.renderer.symbols[w.symbolName](w.x,w.y,w.width,w.height,w)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,g){var w=this,b={},t;g=g||a.strokeWidth||0;t=Math.round(g)%2/2;a.x=Math.floor(a.x||w.x||0)+t;a.y=Math.floor(a.y||w.y||0)+t;a.width=Math.floor((a.width||w.width||0)-2*t);a.height=Math.floor((a.height||w.height||0)-2*t);n(a.strokeWidth)&&(a.strokeWidth=g);L(a,function(a,g){w[g]!==a&&(w[g]=
b[g]=a)});return b},css:function(a){var w=this.styles,g={},f=this.element,c,k="",d,m=!w,h=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);w&&L(a,function(a,b){a!==w[b]&&(g[b]=a,m=!0)});m&&(w&&(a=b(w,g)),c=this.textWidth=a&&a.width&&"auto"!==a.width&&"text"===f.nodeName.toLowerCase()&&t(a.width),this.styles=a,c&&!M&&this.renderer.forExport&&delete a.width,H&&!M?r(this.element,a):(d=function(a,w){return"-"+w.toLowerCase()},L(a,function(a,w){-1===F(w,h)&&(k+=w.replace(/([A-Z])/g,
d)+":"+a+";")}),k&&p(f,"style",k)),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},getStyle:function(a){return O.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){var a=this.getStyle("stroke-width"),g;a.indexOf("px")===a.length-2?a=t(a):(g=u.createElementNS(P,"rect"),p(g,{width:a,"stroke-width":0}),this.element.parentNode.appendChild(g),a=g.getBBox().width,g.parentNode.removeChild(g));
return a},on:function(a,g){var w=this,b=w.element;m&&"click"===a?(b.ontouchstart=function(a){w.touchEventFired=Date.now();a.preventDefault();g.call(b,a)},b.onclick=function(a){(-1===O.navigator.userAgent.indexOf("Android")||1100<Date.now()-(w.touchEventFired||0))&&g.call(b,a)}):b["on"+a]=g;return this},setRadialReference:function(a){var g=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;g&&g.radAttr&&g.animate(this.renderer.getRadialAttr(a,g.radAttr));return this},translate:function(a,
g){return this.attr({translateX:a,translateY:g})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,t=this.scaleX,f=this.scaleY,c=this.inverted,k=this.rotation,d=this.element;c&&(a+=this.width,b+=this.height);a=["translate("+a+","+b+")"];c?a.push("rotate(90) scale(-1,1)"):k&&a.push("rotate("+k+" "+(d.getAttribute("x")||0)+" "+(d.getAttribute("y")||0)+")");(n(t)||n(f))&&a.push("scale("+g(t,1)+" "+g(f,1)+")");
a.length&&d.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,t){var w,c,k,d,m={};c=this.renderer;k=c.alignedObjects;var h,e;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!t||G(t))this.alignTo=w=t||"renderer",f(k,this),k.push(this),t=null}else a=this.alignOptions,b=this.alignByTranslate,w=this.alignTo;t=g(t,c[w],c);w=a.align;c=a.verticalAlign;k=(t.x||0)+(a.x||0);d=(t.y||0)+(a.y||0);"right"===w?h=1:"center"===
w&&(h=2);h&&(k+=(t.width-(a.width||0))/h);m[b?"translateX":"x"]=Math.round(k);"bottom"===c?e=1:"middle"===c&&(e=2);e&&(d+=(t.height-(a.height||0))/e);m[b?"translateY":"y"]=Math.round(d);this[this.placed?"animate":"attr"](m);this.placed=!0;this.alignAttr=m;return this},getBBox:function(a,t){var w,f=this.renderer,c,k=this.element,d=this.styles,m,e=this.textStr,C,y=f.cache,q=f.cacheKeys,A;t=g(t,this.rotation);c=t*h;m=k&&x.prototype.getStyle.call(k,"font-size");void 0!==e&&(A=e.toString(),-1===A.indexOf("\x3c")&&
(A=A.replace(/[0-9]/g,"0")),A+=["",t||0,m,d&&d.width,d&&d.textOverflow].join());A&&!a&&(w=y[A]);if(!w){if(k.namespaceURI===this.SVG_NS||f.forExport){try{(C=this.fakeTS&&function(a){v(k.querySelectorAll(".highcharts-text-outline"),function(g){g.style.display=a})})&&C("none"),w=k.getBBox?b({},k.getBBox()):{width:k.offsetWidth,height:k.offsetHeight},C&&C("")}catch(V){}if(!w||0>w.width)w={width:0,height:0}}else w=this.htmlGetBBox();f.isSVG&&(a=w.width,f=w.height,d&&"11px"===d.fontSize&&17===Math.round(f)&&
(w.height=f=14),t&&(w.width=Math.abs(f*Math.sin(c))+Math.abs(a*Math.cos(c)),w.height=Math.abs(f*Math.cos(c))+Math.abs(a*Math.sin(c))));if(A&&0<w.height){for(;250<q.length;)delete y[q.shift()];y[A]||q.push(A);y[A]=w}}return w},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var g=this;g.animate({opacity:0},{duration:a||150,complete:function(){g.attr({y:-9999})}})},add:function(a){var g=this.renderer,
b=this.element,w;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&g.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)w=this.zIndexSetter();w||(a?a.element:g.box).appendChild(b);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var g=a.parentNode;g&&g.removeChild(a)},destroy:function(){var a=this,g=a.element||{},b=a.renderer.isSVG&&"SPAN"===g.nodeName&&a.parentGroup,t=g.ownerSVGElement;g.onclick=g.onmouseout=g.onmouseover=g.onmousemove=g.point=
null;S(a);a.clipPath&&t&&(v(t.querySelectorAll("[clip-path]"),function(g){-1<g.getAttribute("clip-path").indexOf(a.clipPath.element.id+")")&&g.removeAttribute("clip-path")}),a.clipPath=a.clipPath.destroy());if(a.stops){for(t=0;t<a.stops.length;t++)a.stops[t]=a.stops[t].destroy();a.stops=null}for(a.safeRemoveChild(g);b&&b.div&&0===b.div.childNodes.length;)g=b.parentGroup,a.safeRemoveChild(b.div),delete b.div,b=g;a.alignTo&&f(a.renderer.alignedObjects,a);L(a,function(g,b){delete a[b]});return null},
xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=g(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,g,b){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");b.setAttribute(g,a);this[g]=a},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,
g,b){this[g]=a;b.setAttribute(g,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=u.createElementNS(this.SVG_NS,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(u.createTextNode(String(g(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,g,b){"string"===typeof a?b.setAttribute(g,a):a&&this.colorGradient(a,
g,b)},visibilitySetter:function(a,g,b){"inherit"===a?b.removeAttribute(g):b.setAttribute(g,a)},zIndexSetter:function(a,g){var b=this.renderer,f=this.parentGroup,w=(f||b).element||b.box,c,k=this.element,d;c=this.added;var m;n(a)&&(k.zIndex=a,a=+a,this[g]===a&&(c=!1),this[g]=a);if(c){(a=this.zIndex)&&f&&(f.handleZ=!0);g=w.childNodes;for(m=0;m<g.length&&!d;m++)f=g[m],c=f.zIndex,f!==k&&(t(c)>a||!n(a)&&n(c)||0>a&&!n(c)&&w!==b.box)&&(w.insertBefore(k,f),d=!0);d||w.appendChild(k)}return d},_defaultSetter:function(a,
g,b){b.setAttribute(g,a)}};x.prototype.yGetter=x.prototype.xGetter;x.prototype.translateXSetter=x.prototype.translateYSetter=x.prototype.rotationSetter=x.prototype.verticalAlignSetter=x.prototype.scaleXSetter=x.prototype.scaleYSetter=function(a,g){this[g]=a;this.doTransform=!0};B=a.SVGRenderer=function(){this.init.apply(this,arguments)};B.prototype={Element:x,SVG_NS:P,init:function(a,g,b,t,f,c){var w;t=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});w=t.element;a.appendChild(w);
-1===a.innerHTML.indexOf("xmlns")&&p(w,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=w;this.boxWrapper=t;this.alignedObjects=[];this.url=(z||C)&&u.getElementsByTagName("base").length?O.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highcharts 5.0.11"));this.defs=this.createElement("defs").add();this.allowHTML=c;this.forExport=f;this.gradients={};this.cache=
{};this.cacheKeys=[];this.imgCount=0;this.setSize(g,b,!1);var k;z&&a.getBoundingClientRect&&(g=function(){r(a,{left:0,top:0});k=a.getBoundingClientRect();r(a,{left:Math.ceil(k.left)-k.left+"px",top:Math.ceil(k.top)-k.top+"px"})},g(),this.unSubPixelFix=D(O,"resize",g))},definition:function(a){function g(a,t){var f;v(J(a),function(a){var w=b.createElement(a.tagName),c={};L(a,function(a,g){"tagName"!==g&&"children"!==g&&"textContent"!==g&&(c[g]=a)});w.attr(c);w.add(t||b.defs);a.textContent&&w.element.appendChild(u.createTextNode(a.textContent));
g(a.children||[],w);f=w});return f}var b=this;return g(a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();c(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var g=new this.Element;g.init(this,a);return g},draw:y,getRadialAttr:function(a,g){return{cx:a[0]-a[2]/2+g.cx*a[2],cy:a[1]-
a[2]/2+g.cy*a[2],r:g.r*a[2]}},getSpanWidth:function(a,g){var b=a.getBBox(!0).width;!M&&this.forExport&&(b=this.measureSpanWidth(g.firstChild.data,a.styles));return b},applyEllipsis:function(a,g,b,t){var f=this.getSpanWidth(a,g),w=f>t,f=b,c,k=0,d=b.length,m=function(a){g.removeChild(g.firstChild);a&&g.appendChild(u.createTextNode(a))};if(w){for(;k<=d;)c=Math.ceil((k+d)/2),f=b.substring(0,c)+"\u2026",m(f),f=this.getSpanWidth(a,g),k===d?k=d+1:f>t?d=c-1:k=c;0===d&&m("")}return w},buildText:function(a){var b=
a.element,f=this,c=f.forExport,w=g(a.textStr,"").toString(),d=-1!==w.indexOf("\x3c"),m=b.childNodes,h,e,C,y,A=p(b,"x"),q=a.styles,n=a.textWidth,J=q&&q.lineHeight,z=q&&q.textOutline,H=q&&"ellipsis"===q.textOverflow,N=q&&"nowrap"===q.whiteSpace,l,F=m.length,G=n&&!a.added&&this.box,Q=function(a){return J?t(J):f.fontMetrics(void 0,a.getAttribute("style")?a:b).h},q=[w,H,N,J,z,q&&q.fontSize,n].join();if(q!==a.textCache){for(a.textCache=q;F--;)b.removeChild(m[F]);d||z||H||n||-1!==w.indexOf(" ")?(h=/<.*class="([^"]+)".*>/,
e=/<.*style="([^"]+)".*>/,C=/<.*href="(http[^"]+)".*>/,G&&G.appendChild(b),w=d?w.replace(/<(b|strong)>/g,'\x3cspan class\x3d"highcharts-strong"\x3e').replace(/<(i|em)>/g,'\x3cspan class\x3d"highcharts-emphasized"\x3e').replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g):[w],w=k(w,function(a){return""!==a}),v(w,function(g,t){var w,k=0;g=g.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");w=g.split("|||");v(w,function(g){if(""!==
g||1===w.length){var d={},m=u.createElementNS(f.SVG_NS,"tspan"),q,J;h.test(g)&&(q=g.match(h)[1],p(m,"class",q));e.test(g)&&(J=g.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),p(m,"style",J));C.test(g)&&!c&&(p(m,"onclick",'location.href\x3d"'+g.match(C)[1]+'"'),r(m,{cursor:"pointer"}));g=(g.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"\x3c").replace(/&gt;/g,"\x3e");if(" "!==g){m.appendChild(u.createTextNode(g));k?d.dx=0:t&&null!==A&&(d.x=A);p(m,d);b.appendChild(m);!k&&l&&(!M&&c&&r(m,{display:"block"}),
p(m,"dy",Q(m)));if(n){d=g.replace(/([^\^])-/g,"$1- ").split(" ");q=1<w.length||t||1<d.length&&!N;var v=[],z,F=Q(m),G=a.rotation;for(H&&(y=f.applyEllipsis(a,m,g,n));!H&&q&&(d.length||v.length);)a.rotation=0,z=f.getSpanWidth(a,m),g=z>n,void 0===y&&(y=g),g&&1!==d.length?(m.removeChild(m.firstChild),v.unshift(d.pop())):(d=v,v=[],d.length&&!N&&(m=u.createElementNS(P,"tspan"),p(m,{dy:F,x:A}),J&&p(m,"style",J),b.appendChild(m)),z>n&&(n=z)),d.length&&m.appendChild(u.createTextNode(d.join(" ").replace(/- /g,
"-")));a.rotation=G}k++}}});l=l||b.childNodes.length}),y&&a.attr("title",a.textStr),G&&G.removeChild(b),z&&a.applyTextOutline&&a.applyTextOutline(z)):b.appendChild(u.createTextNode(w.replace(/&lt;/g,"\x3c").replace(/&gt;/g,"\x3e")))}},getContrast:function(a){a=d(a).rgba;return 510<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,g,b,t,f,c,k,d,m){var w=this.label(a,g,b,m,null,null,null,null,"button"),h=0;w.attr(A({padding:8,r:2},f));D(w.element,H?"mouseover":"mouseenter",function(){3!==h&&w.setState(1)});
D(w.element,H?"mouseout":"mouseleave",function(){3!==h&&w.setState(h)});w.setState=function(a){1!==a&&(w.state=h=a);w.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0])};return w.on("click",function(a){3!==h&&t.call(w,a)})},crispLine:function(a,g){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-g%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+g%2/2);return a},path:function(a){var g={};I(a)?g.d=a:q(a)&&b(g,a);return this.createElement("path").attr(g)},
circle:function(a,g,b){a=q(a)?a:{x:a,y:g,r:b};g=this.createElement("circle");g.xSetter=g.ySetter=function(a,g,b){b.setAttribute("c"+g,a)};return g.attr(a)},arc:function(a,g,b,t,f,c){q(a)?(t=a,g=t.y,b=t.r,a=t.x):t={innerR:t,start:f,end:c};a=this.symbol("arc",a,g,b,b,t);a.r=b;return a},rect:function(a,g,b,t,f,c){f=q(a)?a.r:f;c=this.createElement("rect");a=q(a)?a:void 0===a?{}:{x:a,y:g,width:Math.max(b,0),height:Math.max(t,0)};f&&(a.r=f);c.rSetter=function(a,g,b){p(b,{rx:a,ry:a})};return c.attr(a)},
setSize:function(a,b,t){var f=this.alignedObjects,c=f.length;this.width=a;this.height=b;for(this.boxWrapper.animate({width:a,height:b},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:g(t,!0)?void 0:0});c--;)f[c].align()},g:function(a){var g=this.createElement("g");return a?g.attr({"class":"highcharts-"+a}):g},image:function(a,g,t,f,c){var k={preserveAspectRatio:"none"};1<arguments.length&&b(k,{x:g,y:t,width:f,height:c});k=this.createElement("image").attr(k);
k.element.setAttributeNS?k.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):k.element.setAttribute("hc-svg-href",a);return k},symbol:function(a,t,f,c,k,d){var m=this,w,h=/^url\((.*?)\)$/,C=h.test(a),q=!C&&(this.symbols[a]?a:"circle"),y=q&&this.symbols[q],A=n(t)&&y&&y.call(this.symbols,Math.round(t),Math.round(f),c,k,d),J,P;y?(w=this.path(A),b(w,{symbolName:q,x:t,y:f,width:c,height:k}),d&&b(w,d)):C&&(J=a.match(h)[1],w=this.image(J),w.imgwidth=g(Q[J]&&Q[J].width,d&&d.width),w.imgheight=
g(Q[J]&&Q[J].height,d&&d.height),P=function(){w.attr({width:w.width,height:w.height})},v(["width","height"],function(a){w[a+"Setter"]=function(a,g){var b={},t=this["img"+g],f="width"===g?"translateX":"translateY";this[g]=a;n(t)&&(this.element&&this.element.setAttribute(g,t),this.alignByTranslate||(b[f]=((this[g]||0)-t)/2,this.attr(b)))}}),n(t)&&w.attr({x:t,y:f}),w.isImg=!0,n(w.imgwidth)&&n(w.imgheight)?P():(w.attr({width:0,height:0}),l("img",{onload:function(){var a=e[m.chartIndex];0===this.width&&
(r(this,{position:"absolute",top:"-999em"}),u.body.appendChild(this));Q[J]={width:this.width,height:this.height};w.imgwidth=this.width;w.imgheight=this.height;w.element&&P();this.parentNode&&this.parentNode.removeChild(this);m.imgCount--;if(!m.imgCount&&a&&a.onload)a.onload()},src:J}),this.imgCount++));return w},symbols:{circle:function(a,g,b,t){return this.arc(a+b/2,g+t/2,b/2,t/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,g,b,t){return["M",a,g,"L",a+b,g,a+b,g+t,a,g+t,"Z"]},triangle:function(a,
g,b,t){return["M",a+b/2,g,"L",a+b,g+t,a,g+t,"Z"]},"triangle-down":function(a,g,b,t){return["M",a,g,"L",a+b,g,a+b/2,g+t,"Z"]},diamond:function(a,g,b,t){return["M",a+b/2,g,"L",a+b,g+t/2,a+b/2,g+t,a,g+t/2,"Z"]},arc:function(a,g,b,t,f){var c=f.start,k=f.r||b,d=f.r||t||b,m=f.end-.001;b=f.innerR;t=f.open;var w=Math.cos(c),h=Math.sin(c),e=Math.cos(m),m=Math.sin(m);f=f.end-c<Math.PI?0:1;k=["M",a+k*w,g+d*h,"A",k,d,0,f,1,a+k*e,g+d*m];n(b)&&k.push(t?"M":"L",a+b*e,g+b*m,"A",b,b,0,f,0,a+b*w,g+b*h);k.push(t?"":
"Z");return k},callout:function(a,g,b,t,f){var c=Math.min(f&&f.r||0,b,t),k=c+6,d=f&&f.anchorX;f=f&&f.anchorY;var m;m=["M",a+c,g,"L",a+b-c,g,"C",a+b,g,a+b,g,a+b,g+c,"L",a+b,g+t-c,"C",a+b,g+t,a+b,g+t,a+b-c,g+t,"L",a+c,g+t,"C",a,g+t,a,g+t,a,g+t-c,"L",a,g+c,"C",a,g,a,g,a+c,g];d&&d>b?f>g+k&&f<g+t-k?m.splice(13,3,"L",a+b,f-6,a+b+6,f,a+b,f+6,a+b,g+t-c):m.splice(13,3,"L",a+b,t/2,d,f,a+b,t/2,a+b,g+t-c):d&&0>d?f>g+k&&f<g+t-k?m.splice(33,3,"L",a,f+6,a-6,f,a,f-6,a,g+c):m.splice(33,3,"L",a,t/2,d,f,a,t/2,a,g+c):
f&&f>t&&d>a+k&&d<a+b-k?m.splice(23,3,"L",d+6,g+t,d,g+t+6,d-6,g+t,a+c,g+t):f&&0>f&&d>a+k&&d<a+b-k&&m.splice(3,3,"L",d-6,g,d,g-6,d+6,g,b-c,g);return m}},clipRect:function(g,b,t,f){var c=a.uniqueKey(),k=this.createElement("clipPath").attr({id:c}).add(this.defs);g=this.rect(g,b,t,f,0).add(k);g.id=c;g.clipPath=k;g.count=0;return g},text:function(a,g,b,t){var f=!M&&this.forExport,c={};if(t&&(this.allowHTML||!this.forExport))return this.html(a,g,b);c.x=Math.round(g||0);b&&(c.y=Math.round(b));if(a||0===a)c.text=
a;a=this.createElement("text").attr(c);f&&a.css({position:"absolute"});t||(a.xSetter=function(a,g,b){var t=b.getElementsByTagName("tspan"),f,c=b.getAttribute(g),k;for(k=0;k<t.length;k++)f=t[k],f.getAttribute(g)===c&&f.setAttribute(g,a);b.setAttribute(g,a)});return a},fontMetrics:function(a,g){a=g&&x.prototype.getStyle.call(g,"font-size");a=/px/.test(a)?t(a):/em/.test(a)?parseFloat(a)*(g?this.fontMetrics(null,g.parentNode).f:16):12;g=24>a?a+3:Math.round(1.2*a);return{h:g,b:Math.round(.8*g),f:a}},rotCorr:function(a,
g,b){var t=a;g&&b&&(t=Math.max(t*Math.cos(g*h),4));return{x:-a/3*Math.sin(g*h),y:t}},label:function(g,t,f,c,k,d,m,h,e){var C=this,q=C.g("button"!==e&&"label"),y=q.text=C.text("",0,0,m).attr({zIndex:1}),w,J,P=0,u=3,z=0,H,l,F,r,G,p={},Q,S=/^url\((.*?)\)$/.test(c),L=S,I,M,O,R;e&&q.addClass("highcharts-"+e);L=!0;I=function(){return w.strokeWidth()%2/2};M=function(){var a=y.element.style,g={};J=(void 0===H||void 0===l||G)&&n(y.textStr)&&y.getBBox();q.width=(H||J.width||0)+2*u+z;q.height=(l||J.height||
0)+2*u;Q=u+C.fontMetrics(a&&a.fontSize,y).b;L&&(w||(q.box=w=C.symbols[c]||S?C.symbol(c):C.rect(),w.addClass(("button"===e?"":"highcharts-label-box")+(e?" highcharts-"+e+"-box":"")),w.add(q),a=I(),g.x=a,g.y=(h?-Q:0)+a),g.width=Math.round(q.width),g.height=Math.round(q.height),w.attr(b(g,p)),p={})};O=function(){var a=z+u,g;g=h?0:Q;n(H)&&J&&("center"===G||"right"===G)&&(a+={center:.5,right:1}[G]*(H-J.width));if(a!==y.x||g!==y.y)y.attr("x",a),void 0!==g&&y.attr("y",g);y.x=a;y.y=g};R=function(a,g){w?w.attr(a,
g):p[a]=g};q.onAdd=function(){y.add(q);q.attr({text:g||0===g?g:"",x:t,y:f});w&&n(k)&&q.attr({anchorX:k,anchorY:d})};q.widthSetter=function(g){H=a.isNumber(g)?g:null};q.heightSetter=function(a){l=a};q["text-alignSetter"]=function(a){G=a};q.paddingSetter=function(a){n(a)&&a!==u&&(u=q.padding=a,O())};q.paddingLeftSetter=function(a){n(a)&&a!==z&&(z=a,O())};q.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==P&&(P=a,J&&q.attr({x:F}))};q.textSetter=function(a){void 0!==a&&y.textSetter(a);M();
O()};q["stroke-widthSetter"]=function(a,g){a&&(L=!0);this["stroke-width"]=a;R(g,a)};q.rSetter=function(a,g){R(g,a)};q.anchorXSetter=function(a,g){k=q.anchorX=a;R(g,Math.round(a)-I()-F)};q.anchorYSetter=function(a,g){d=q.anchorY=a;R(g,a-r)};q.xSetter=function(a){q.x=a;P&&(a-=P*((H||J.width)+2*u));F=Math.round(a);q.attr("translateX",F)};q.ySetter=function(a){r=q.y=Math.round(a);q.attr("translateY",r)};var U=q.css;return b(q,{css:function(a){if(a){var g={};a=A(a);v(q.textProps,function(b){void 0!==a[b]&&
(g[b]=a[b],delete a[b])});y.css(g)}return U.call(q,a)},getBBox:function(){return{width:J.width+2*u,height:J.height+2*u,x:J.x-u,y:J.y-u}},destroy:function(){N(q.element,"mouseenter");N(q.element,"mouseleave");y&&(y=y.destroy());w&&(w=w.destroy());x.prototype.destroy.call(q);q=C=M=O=R=null}})}};a.Renderer=B})(K);(function(a){var x=a.attr,B=a.createElement,D=a.css,E=a.defined,p=a.each,e=a.extend,d=a.isFirefox,r=a.isMS,l=a.isWebKit,n=a.pInt,h=a.SVGRenderer,c=a.win,u=a.wrap;e(a.SVGElement.prototype,{htmlCss:function(a){var b=
this.element;if(b=a&&"SPAN"===b.tagName&&a.width)delete a.width,this.textWidth=b,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=e(this.styles,a);D(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,b=this.element,f=this.x||
0,c=this.y||0,d=this.textAlign||"left",h={left:0,center:.5,right:1}[d],e=this.styles;D(b,{marginLeft:this.translateX||0,marginTop:this.translateY||0});this.inverted&&p(b.childNodes,function(f){a.invertChild(f,b)});if("SPAN"===b.tagName){var u=this.rotation,H=n(this.textWidth),q=e&&e.whiteSpace,r=[u,d,b.innerHTML,this.textWidth,this.textAlign].join();r!==this.cTT&&(e=a.fontMetrics(b.style.fontSize).b,E(u)&&this.setSpanRotation(u,h,e),D(b,{width:"",whiteSpace:q||"nowrap"}),b.offsetWidth>H&&/[ \-]/.test(b.textContent||
b.innerText)&&D(b,{width:H+"px",display:"block",whiteSpace:q||"normal"}),this.getSpanCorrection(b.offsetWidth,e,h,u,d));D(b,{left:f+(this.xCorr||0)+"px",top:c+(this.yCorr||0)+"px"});l&&(e=b.offsetHeight);this.cTT=r}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,f){var k={},m=r?"-ms-transform":l?"-webkit-transform":d?"MozTransform":c.opera?"-o-transform":"";k[m]=k.transform="rotate("+a+"deg)";k[m+(d?"Origin":"-origin")]=k.transformOrigin=100*b+"% "+f+"px";D(this.element,k)},getSpanCorrection:function(a,
b,f){this.xCorr=-a*f;this.yCorr=-b}});e(h.prototype,{html:function(a,b,f){var c=this.createElement("span"),d=c.element,h=c.renderer,n=h.isSVG,z=function(a,b){p(["opacity","visibility"],function(f){u(a,f+"Setter",function(a,f,c,d){a.call(this,f,c,d);b[c]=f})})};c.textSetter=function(a){a!==d.innerHTML&&delete this.bBox;d.innerHTML=this.textStr=a;c.htmlUpdateTransform()};n&&z(c,c.element.style);c.xSetter=c.ySetter=c.alignSetter=c.rotationSetter=function(a,b){"align"===b&&(b="textAlign");c[b]=a;c.htmlUpdateTransform()};
c.attr({text:a,x:Math.round(b),y:Math.round(f)}).css({position:"absolute"});d.style.whiteSpace="nowrap";c.css=c.htmlCss;n&&(c.add=function(a){var b,f=h.box.parentNode,k=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)k.push(a),a=a.parentGroup;p(k.reverse(),function(a){var d,m=x(a.element,"class");m&&(m={className:m});b=a.div=a.div||B("div",m,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},
b||f);d=b.style;e(a,{on:function(){c.on.apply({element:k[0].div},arguments);return a},translateXSetter:function(g,b){d.left=g+"px";a[b]=g;a.doTransform=!0},translateYSetter:function(g,b){d.top=g+"px";a[b]=g;a.doTransform=!0}});z(a,d)})}}else b=f;b.appendChild(d);c.added=!0;c.alignOnAdd&&c.htmlUpdateTransform();return c});return c}})})(K);(function(a){function x(){var e=a.defaultOptions.global,l=d.moment;if(e.timezone){if(l)return function(a){return-l.tz(a,e.timezone).utcOffset()};a.error(25)}return e.useUTC&&
e.getTimezoneOffset}function B(){var r=a.defaultOptions.global,l,n=r.useUTC,h=n?"getUTC":"get",c=n?"setUTC":"set";a.Date=l=r.Date||d.Date;l.hcTimezoneOffset=n&&r.timezoneOffset;l.hcGetTimezoneOffset=x();l.hcMakeTime=function(a,c,b,f,d,m){var k;n?(k=l.UTC.apply(0,arguments),k+=E(k)):k=(new l(a,c,e(b,1),e(f,0),e(d,0),e(m,0))).getTime();return k};D("Minutes Hours Day Date Month FullYear".split(" "),function(a){l["hcGet"+a]=h+a});D("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(a){l["hcSet"+
a]=c+a})}var D=a.each,E=a.getTZOffset,p=a.merge,e=a.pick,d=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},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:'\x3cspan class\x3d"highcharts-header"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cspan class\x3d"highcharts-strong"\x3e{point.y}\x3c/span\x3e\x3cbr/\x3e'},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},text:"Highcharts.com"}};a.setOptions=function(d){a.defaultOptions=
p(!0,a.defaultOptions,d);B();return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;B()})(K);(function(a){var x=a.correctFloat,B=a.defined,D=a.destroyObjectProperties,E=a.isNumber,p=a.pick,e=a.deg2rad;a.Tick=function(a,e,l,n){this.axis=a;this.pos=e;this.type=l||"";this.isNew=!0;l||n||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,e=a.options,l=a.chart,n=a.categories,h=a.names,c=this.pos,u=e.labels,v=a.tickPositions,
b=c===v[0],f=c===v[v.length-1],h=n?p(n[c],h[c],c):c,n=this.label,v=v.info,k;a.isDatetimeAxis&&v&&(k=e.dateTimeLabelFormats[v.higherRanks[c]||v.unitName]);this.isFirst=b;this.isLast=f;e=a.labelFormatter.call({axis:a,chart:l,isFirst:b,isLast:f,dateTimeLabelFormat:k,value:a.isLog?x(a.lin2log(h)):h});B(n)?n&&n.attr({text:e}):(this.labelLength=(this.label=n=B(e)&&u.enabled?l.renderer.text(e,0,0,u.useHTML).add(a.labelGroup):null)&&n.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?
this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var d=this.axis,l=a.x,n=d.chart.chartWidth,h=d.chart.spacing,c=p(d.labelLeft,Math.min(d.pos,h[3])),h=p(d.labelRight,Math.max(d.pos+d.len,n-h[1])),u=this.label,v=this.rotation,b={left:0,center:.5,right:1}[d.labelAlign],f=u.getBBox().width,k=d.getSlotWidth(),m=k,F=1,I,z={};if(v)0>v&&l-b*f<c?I=Math.round(l/Math.cos(v*e)-c):0<v&&l+b*f>h&&(I=Math.round((n-l)/Math.cos(v*e)));else if(n=l+(1-b)*f,l-b*f<c?m=a.x+m*(1-b)-c:
n>h&&(m=h-a.x+m*b,F=-1),m=Math.min(k,m),m<k&&"center"===d.labelAlign&&(a.x+=F*(k-m-b*(k-Math.min(f,m)))),f>m||d.autoRotation&&(u.styles||{}).width)I=m;I&&(z.width=I,(d.options.labels.style||{}).textOverflow||(z.textOverflow="ellipsis"),u.css(z))},getPosition:function(a,e,l,n){var d=this.axis,c=d.chart,u=n&&c.oldChartHeight||c.chartHeight;return{x:a?d.translate(e+l,null,null,n)+d.transB:d.left+d.offset+(d.opposite?(n&&c.oldChartWidth||c.chartWidth)-d.right-d.left:0),y:a?u-d.bottom+d.offset-(d.opposite?
d.height:0):u-d.translate(e+l,null,null,n)-d.transB}},getLabelPosition:function(a,p,l,n,h,c,u,v){var b=this.axis,f=b.transA,d=b.reversed,m=b.staggerLines,F=b.tickRotCorr||{x:0,y:0},r=h.y;B(r)||(r=0===b.side?l.rotation?-8:-l.getBBox().height:2===b.side?F.y+8:Math.cos(l.rotation*e)*(F.y-l.getBBox(!1,0).height/2));a=a+h.x+F.x-(c&&n?c*f*(d?-1:1):0);p=p+r-(c&&!n?c*f*(d?1:-1):0);m&&(l=u/(v||1)%m,b.opposite&&(l=m-l-1),p+=b.labelOffset/m*l);return{x:a,y:Math.round(p)}},getMarkPath:function(a,e,l,n,h,c){return c.crispLine(["M",
a,e,"L",a+(h?0:-l),e+(h?l:0)],n)},renderGridLine:function(a,e,l){var d=this.axis,h=this.gridLine,c={},u=this.pos,v=this.type,b=d.tickmarkOffset,f=d.chart.renderer;h||(v||(c.zIndex=1),a&&(c.opacity=0),this.gridLine=h=f.path().attr(c).addClass("highcharts-"+(v?v+"-":"")+"grid-line").add(d.gridGroup));if(!a&&h&&(a=d.getPlotLinePath(u+b,h.strokeWidth()*l,a,!0)))h[this.isNew?"attr":"animate"]({d:a,opacity:e})},renderMark:function(a,e,l){var d=this.axis,h=d.chart.renderer,c=this.type,u=d.tickSize(c?c+"Tick":
"tick"),v=this.mark,b=!v,f=a.x;a=a.y;u&&(d.opposite&&(u[0]=-u[0]),b&&(this.mark=v=h.path().addClass("highcharts-"+(c?c+"-":"")+"tick").add(d.axisGroup)),v[b?"attr":"animate"]({d:this.getMarkPath(f,a,u[0],v.strokeWidth()*l,d.horiz,h),opacity:e}))},renderLabel:function(a,e,l,n){var d=this.axis,c=d.horiz,u=d.options,v=this.label,b=u.labels,f=b.step,k=d.tickmarkOffset,m=!0,F=a.x;a=a.y;v&&E(F)&&(v.xy=a=this.getLabelPosition(F,a,v,c,b,k,n,f),this.isFirst&&!this.isLast&&!p(u.showFirstLabel,1)||this.isLast&&
!this.isFirst&&!p(u.showLastLabel,1)?m=!1:!c||d.isRadial||b.step||b.rotation||e||0===l||this.handleOverflow(a),f&&n%f&&(m=!1),m&&E(a.y)?(a.opacity=l,v[this.isNew?"attr":"animate"](a)):v.attr("y",-9999),this.isNew=!1)},render:function(a,e,l){var d=this.axis,h=d.horiz,c=this.getPosition(h,this.pos,d.tickmarkOffset,e),u=c.x,v=c.y,d=h&&u===d.pos+d.len||!h&&v===d.pos?-1:1;l=p(l,1);this.isActive=!0;this.renderGridLine(e,l,d);this.renderMark(c,l,d);this.renderLabel(c,e,l,a)},destroy:function(){D(this,this.axis)}}})(K);
var T=function(a){var x=a.addEvent,B=a.animObject,D=a.arrayMax,E=a.arrayMin,p=a.correctFloat,e=a.defaultOptions,d=a.defined,r=a.deg2rad,l=a.destroyObjectProperties,n=a.each,h=a.extend,c=a.fireEvent,u=a.format,v=a.getMagnitude,b=a.grep,f=a.inArray,k=a.isArray,m=a.isNumber,F=a.isString,I=a.merge,z=a.normalizeTickInterval,H=a.objectEach,q=a.pick,G=a.removeEvent,C=a.splat,A=a.syncTimeout,y=a.Tick,L=function(){this.init.apply(this,arguments)};a.extend(L.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,b){var g=b.isX,t=this;t.chart=a;t.horiz=a.inverted?!g:g;t.isXAxis=g;t.coll=t.coll||(g?"xAxis":"yAxis");t.opposite=
b.opposite;t.side=b.side||(t.horiz?t.opposite?0:2:t.opposite?1:3);t.setOptions(b);var c=this.options,k=c.type;t.labelFormatter=c.labels.formatter||t.defaultLabelFormatter;t.userOptions=b;t.minPixelPadding=0;t.reversed=c.reversed;t.visible=!1!==c.visible;t.zoomEnabled=!1!==c.zoomEnabled;t.hasNames="category"===k||!0===c.categories;t.categories=c.categories||t.hasNames;t.names=t.names||[];t.plotLinesAndBandsGroups={};t.isLog="logarithmic"===k;t.isDatetimeAxis="datetime"===k;t.positiveValuesOnly=t.isLog&&
!t.allowNegativeLog;t.isLinked=d(c.linkedTo);t.ticks={};t.labelEdge=[];t.minorTicks={};t.plotLinesAndBands=[];t.alternateBands={};t.len=0;t.minRange=t.userMinRange=c.minRange||c.maxZoom;t.range=c.range;t.offset=c.offset||0;t.stacks={};t.oldStacks={};t.stacksTouched=0;t.max=null;t.min=null;t.crosshair=q(c.crosshair,C(a.options.tooltip.crosshairs)[g?0:1],!1);b=t.options.events;-1===f(t,a.axes)&&(g?a.axes.splice(a.xAxis.length,0,t):a.axes.push(t),a[t.coll].push(t));t.series=t.series||[];a.inverted&&
g&&void 0===t.reversed&&(t.reversed=!0);H(b,function(a,g){x(t,g,a)});t.lin2log=c.linearToLogConverter||t.lin2log;t.isLog&&(t.val2lin=t.log2lin,t.lin2val=t.lin2log)},setOptions:function(a){this.options=I(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],I(e[this.coll],a))},defaultLabelFormatter:function(){var g=this.axis,b=this.value,f=g.categories,c=this.dateTimeLabelFormat,
d=e.lang,k=d.numericSymbols,d=d.numericSymbolMagnitude||1E3,m=k&&k.length,q,h=g.options.labels.format,g=g.isLog?Math.abs(b):g.tickInterval;if(h)q=u(h,this);else if(f)q=b;else if(c)q=a.dateFormat(c,b);else if(m&&1E3<=g)for(;m--&&void 0===q;)f=Math.pow(d,m+1),g>=f&&0===10*b%f&&null!==k[m]&&0!==b&&(q=a.numberFormat(b/f,-1)+k[m]);void 0===q&&(q=1E4<=Math.abs(b)?a.numberFormat(b,-1):a.numberFormat(b,-1,void 0,""));return q},getSeriesExtremes:function(){var a=this,t=a.chart;a.hasVisibleSeries=!1;a.dataMin=
a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();n(a.series,function(g){if(g.visible||!t.options.chart.ignoreHiddenSeries){var f=g.options,c=f.threshold,k;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=c&&(c=null);if(a.isXAxis)f=g.xData,f.length&&(g=E(f),m(g)||g instanceof Date||(f=b(f,function(a){return m(a)}),g=E(f)),a.dataMin=Math.min(q(a.dataMin,f[0]),g),a.dataMax=Math.max(q(a.dataMax,f[0]),D(f)));else if(g.getExtremes(),k=g.dataMax,g=g.dataMin,d(g)&&d(k)&&
(a.dataMin=Math.min(q(a.dataMin,g),g),a.dataMax=Math.max(q(a.dataMax,k),k)),d(c)&&(a.threshold=c),!f.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,b,f,c,d,k){var g=this.linkedParent||this,t=1,e=0,q=c?g.oldTransA:g.transA;c=c?g.oldMin:g.min;var h=g.minPixelPadding;d=(g.isOrdinal||g.isBroken||g.isLog&&d)&&g.lin2val;q||(q=g.transA);f&&(t*=-1,e=g.len);g.reversed&&(t*=-1,e-=t*(g.sector||g.len));b?(a=(a*t+e-h)/q+c,d&&(a=g.lin2val(a))):(d&&(a=g.val2lin(a)),a=t*(a-c)*q+e+
t*h+(m(k)?q*k:0));return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,f,c,d){var g=this.chart,t=this.left,k=this.top,e,h,y=f&&g.oldChartHeight||g.chartHeight,C=f&&g.oldChartWidth||g.chartWidth,A;e=this.transB;var n=function(a,g,b){if(a<g||a>b)c?a=Math.min(Math.max(g,a),b):A=!0;return a};d=q(d,this.translate(a,null,null,f));a=f=Math.round(d+
e);e=h=Math.round(y-d-e);m(d)?this.horiz?(e=k,h=y-this.bottom,a=f=n(a,t,t+this.width)):(a=t,f=C-this.right,e=h=n(e,k,k+this.height)):A=!0;return A&&!c?null:g.renderer.crispLine(["M",a,e,"L",f,h],b||1)},getLinearTickPositions:function(a,b,f){var g,t=p(Math.floor(b/a)*a);f=p(Math.ceil(f/a)*a);var c=[];if(this.single)return[b];for(b=t;b<=f;){c.push(b);b=p(b+a);if(b===g)break;g=b}return c},getMinorTickPositions:function(){var a=this,b=a.options,f=a.tickPositions,c=a.minorTickInterval,d=[],k=a.pointRangePadding||
0,m=a.min-k,k=a.max+k,e=k-m;if(e&&e/c<a.len/3)if(a.isLog)n(this.paddedTicks,function(g,b,t){b&&d.push.apply(d,a.getLogTickPositions(c,t[b-1],t[b],!0))});else if(a.isDatetimeAxis&&"auto"===b.minorTickInterval)d=d.concat(a.getTimeTicks(a.normalizeTimeTickInterval(c),m,k,b.startOfWeek));else for(b=m+(f[0]-m)%c;b<=k&&b!==d[0];b+=c)d.push(b);0!==d.length&&a.trimTicks(d);return d},adjustForMinRange:function(){var a=this.options,b=this.min,f=this.max,c,k=this.dataMax-this.dataMin>=this.minRange,m,e,h,y,
C,A;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(d(a.min)||d(a.max)?this.minRange=null:(n(this.series,function(a){y=a.xData;for(e=C=a.xIncrement?1:y.length-1;0<e;e--)if(h=y[e]-y[e-1],void 0===m||h<m)m=h}),this.minRange=Math.min(5*m,this.dataMax-this.dataMin)));f-b<this.minRange&&(A=this.minRange,c=(A-f+b)/2,c=[b-c,q(a.min,b-c)],k&&(c[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),b=D(c),f=[b+A,q(a.max,b+A)],k&&(f[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),f=E(f),f-b<A&&
(c[0]=f-A,c[1]=q(a.min,f-A),b=D(c)));this.min=b;this.max=f},getClosest:function(){var a;this.categories?a=1:n(this.series,function(g){var b=g.closestPointRange,t=g.visible||!g.chart.options.chart.ignoreHiddenSeries;!g.noSharedTooltip&&d(b)&&t&&(a=d(a)?Math.min(a,b):b)});return a},nameToX:function(a){var g=k(this.categories),b=g?this.categories:this.names,c=a.options.x,m;a.series.requireSorting=!1;d(c)||(c=!1===this.options.uniqueNames?a.series.autoIncrement():f(a.name,b));-1===c?g||(m=b.length):m=
c;void 0!==m&&(this.names[m]=a.name);return m},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=void 0,n(this.series||[],function(g){g.xIncrement=null;if(!g.points||g.isDirtyData)g.processData(),g.generatePoints();n(g.points,function(b,t){var f;b.options&&(f=a.nameToX(b),void 0!==f&&f!==b.x&&(b.x=f,g.xData[t]=f))})}))},setAxisTranslation:function(a){var g=this,b=g.max-g.min,f=g.axisPointRange||0,c,d=0,k=0,m=g.linkedParent,e=!!g.categories,h=g.transA,y=g.isXAxis;
if(y||e||f)c=g.getClosest(),m?(d=m.minPointOffset,k=m.pointRangePadding):n(g.series,function(a){var b=e?1:y?q(a.options.pointRange,c,0):g.axisPointRange||0;a=a.options.pointPlacement;f=Math.max(f,b);g.single||(d=Math.max(d,F(a)?0:b/2),k=Math.max(k,"on"===a?0:b))}),m=g.ordinalSlope&&c?g.ordinalSlope/c:1,g.minPointOffset=d*=m,g.pointRangePadding=k*=m,g.pointRange=Math.min(f,b),y&&(g.closestPointRange=c);a&&(g.oldTransA=h);g.translationSlope=g.transA=h=g.options.staticScale||g.len/(b+k||1);g.transB=
g.horiz?g.left:g.bottom;g.minPixelPadding=h*d},minFromRange:function(){return this.max-this.range},setTickInterval:function(g){var b=this,f=b.chart,k=b.options,e=b.isLog,h=b.log2lin,y=b.isDatetimeAxis,C=b.isXAxis,A=b.isLinked,w=k.maxPadding,u=k.minPadding,l=k.tickInterval,H=k.tickPixelInterval,F=b.categories,G=b.threshold,r=b.softThreshold,L,I,x,B;y||F||A||this.getTickAmount();x=q(b.userMin,k.min);B=q(b.userMax,k.max);A?(b.linkedParent=f[b.coll][k.linkedTo],f=b.linkedParent.getExtremes(),b.min=q(f.min,
f.dataMin),b.max=q(f.max,f.dataMax),k.type!==b.linkedParent.options.type&&a.error(11,1)):(!r&&d(G)&&(b.dataMin>=G?(L=G,u=0):b.dataMax<=G&&(I=G,w=0)),b.min=q(x,L,b.dataMin),b.max=q(B,I,b.dataMax));e&&(b.positiveValuesOnly&&!g&&0>=Math.min(b.min,q(b.dataMin,b.min))&&a.error(10,1),b.min=p(h(b.min),15),b.max=p(h(b.max),15));b.range&&d(b.max)&&(b.userMin=b.min=x=Math.max(b.min,b.minFromRange()),b.userMax=B=b.max,b.range=null);c(b,"foundExtremes");b.beforePadding&&b.beforePadding();b.adjustForMinRange();
!(F||b.axisPointRange||b.usePercentage||A)&&d(b.min)&&d(b.max)&&(h=b.max-b.min)&&(!d(x)&&u&&(b.min-=h*u),!d(B)&&w&&(b.max+=h*w));m(k.softMin)&&(b.min=Math.min(b.min,k.softMin));m(k.softMax)&&(b.max=Math.max(b.max,k.softMax));m(k.floor)&&(b.min=Math.max(b.min,k.floor));m(k.ceiling)&&(b.max=Math.min(b.max,k.ceiling));r&&d(b.dataMin)&&(G=G||0,!d(x)&&b.min<G&&b.dataMin>=G?b.min=G:!d(B)&&b.max>G&&b.dataMax<=G&&(b.max=G));b.tickInterval=b.min===b.max||void 0===b.min||void 0===b.max?1:A&&!l&&H===b.linkedParent.options.tickPixelInterval?
l=b.linkedParent.tickInterval:q(l,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,F?1:(b.max-b.min)*H/Math.max(b.len,H));C&&!g&&n(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&&!l&&(b.tickInterval=Math.max(b.pointRange,b.tickInterval));g=q(k.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);
!l&&b.tickInterval<g&&(b.tickInterval=g);y||e||l||(b.tickInterval=z(b.tickInterval,null,v(b.tickInterval),q(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,b,f=a.tickPositions,c=a.tickPositioner,k=a.startOnTick,m=a.endOnTick;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.single=this.min===this.max&&d(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=b=f&&f.slice();!b&&(b=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),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,c&&(c=c.apply(this,[this.min,this.max])))&&(this.tickPositions=b=c);this.paddedTicks=b.slice(0);this.trimTicks(b,k,m);this.isLinked||(this.single&&(this.min-=.5,this.max+=.5),f||c||this.adjustTickAmount())},trimTicks:function(a,b,f){var g=a[0],c=a[a.length-1],k=this.minPointOffset||0;if(!this.isLinked){if(b&&-Infinity!==g)this.min=g;else for(;this.min-k>a[0];)a.shift();if(f)this.max=c;else for(;this.max+k<a[a.length-1];)a.pop();
0===a.length&&d(g)&&a.push((c+g)/2)}},alignToOthers:function(){var a={},b,f=this.options;!1===this.chart.options.chart.alignTicks||!1===f.alignTicks||this.isLog||n(this.chart[this.coll],function(g){var f=g.options,f=[g.horiz?f.left:f.top,f.width,f.height,f.pane].join();g.series.length&&(a[f]?b=!0:a[f]=1)});return b},getTickAmount:function(){var a=this.options,b=a.tickAmount,f=a.tickPixelInterval;!d(a.tickInterval)&&this.len<f&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&
(b=Math.ceil(this.len/f)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,f=this.tickAmount,c=this.finalTickAmt,k=b&&b.length;if(k<f){for(;b.length<f;)b.push(p(b[b.length-1]+a));this.transA*=(k-1)/(f-1);this.max=b[b.length-1]}else k>f&&(this.tickInterval*=2,this.setTickPositions());if(d(c)){for(a=f=b.length;a--;)(3===c&&1===a%2||2>=c&&0<a&&a<f-1)&&b.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,b;this.oldMin=
this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();b=this.len!==this.oldAxisLength;n(this.series,function(b){if(b.isDirtyData||b.isDirty||b.xAxis.isDirty)a=!0});b||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=
b||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,b,f,k,d){var g=this,m=g.chart;f=q(f,!0);n(g.series,function(a){delete a.kdTree});d=h(d,{min:a,max:b});c(g,"setExtremes",d,function(){g.userMin=a;g.userMax=b;g.eventArgs=d;f&&m.redraw(k)})},zoom:function(a,b){var g=this.dataMin,f=this.dataMax,c=this.options,k=Math.min(g,q(c.min,g)),c=Math.max(f,q(c.max,f));if(a!==this.min||b!==this.max)this.allowZoomOutside||(d(g)&&(a<k&&(a=k),a>c&&(a=c)),
d(f)&&(b<k&&(b=k),b>c&&(b=c))),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,f=b.offsets||[0,0,0,0],c=this.horiz,k=q(b.width,a.plotWidth-f[3]+f[1]),d=q(b.height,a.plotHeight-f[0]+f[2]),m=q(b.top,a.plotTop+f[0]),b=q(b.left,a.plotLeft+f[3]),f=/%$/;f.test(d)&&(d=Math.round(parseFloat(d)/100*a.plotHeight));f.test(m)&&(m=Math.round(parseFloat(m)/100*a.plotHeight+a.plotTop));this.left=b;this.top=m;
this.width=k;this.height=d;this.bottom=a.chartHeight-d-m;this.right=a.chartWidth-k-b;this.len=Math.max(c?k:d,0);this.pos=c?b:m},getExtremes:function(){var a=this.isLog,b=this.lin2log;return{min:a?p(b(this.min)):this.min,max:a?p(b(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,g=this.lin2log,f=b?g(this.min):this.min,b=b?g(this.max):this.max;null===a?a=f:f>a?a=f:b<a&&(a=b);return this.translate(a,0,
1,0,1)},autoLabelAlign:function(a){a=(q(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var b=this.options,g=b[a+"Length"],f=q(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(f&&g)return"inside"===b[a+"Position"]&&(g=-g),[g,f]},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,b=this.horiz,
f=this.tickInterval,c=f,k=this.len/(((this.categories?1:0)+this.max-this.min)/f),m,e=a.rotation,h=this.labelMetrics(),y,C=Number.MAX_VALUE,A,u=function(a){a/=k||1;a=1<a?Math.ceil(a):1;return a*f};b?(A=!a.staggerLines&&!a.step&&(d(e)?[e]:k<q(a.autoRotationLimit,80)&&a.autoRotation))&&n(A,function(a){var b;if(a===e||a&&-90<=a&&90>=a)y=u(Math.abs(h.h/Math.sin(r*a))),b=y+Math.abs(a/360),b<C&&(C=b,m=a,c=y)}):a.step||(c=u(h.h));this.autoRotation=A;this.labelRotation=q(m,e);return c},getSlotWidth:function(){var a=
this.chart,b=this.horiz,f=this.options.labels,c=Math.max(this.tickPositions.length-(this.categories?0:1),1),k=a.margin[3];return b&&2>(f.step||0)&&!f.rotation&&(this.staggerLines||1)*this.len/c||!b&&(k&&k-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,f=this.tickPositions,c=this.ticks,k=this.options.labels,d=this.horiz,m=this.getSlotWidth(),e=Math.max(1,Math.round(m-2*(k.padding||5))),h={},q=this.labelMetrics(),y=k.style&&k.style.textOverflow,C,A=0,u,z;F(k.rotation)||
(h.rotation=k.rotation||0);n(f,function(a){(a=c[a])&&a.labelLength>A&&(A=a.labelLength)});this.maxLabelLength=A;if(this.autoRotation)A>e&&A>q.h?h.rotation=this.labelRotation:this.labelRotation=0;else if(m&&(C={width:e+"px"},!y))for(C.textOverflow="clip",u=f.length;!d&&u--;)if(z=f[u],e=c[z].label)e.styles&&"ellipsis"===e.styles.textOverflow?e.css({textOverflow:"clip"}):c[z].labelLength>m&&e.css({width:m+"px"}),e.getBBox().height>this.len/f.length-(q.h-q.f)&&(e.specCss={textOverflow:"ellipsis"});h.rotation&&
(C={width:(A>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},y||(C.textOverflow="ellipsis"));if(this.labelAlign=k.align||this.autoLabelAlign(this.labelRotation))h.align=this.labelAlign;n(f,function(a){var b=(a=c[a])&&a.label;b&&(b.attr(h),C&&b.css(I(C,b.specCss)),delete b.specCss,a.rotation=h.rotation)});this.tickRotCorr=b.rotCorr(q.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||d(this.min)&&d(this.max)&&!!this.tickPositions},addTitle:function(a){var b=
this.chart.renderer,g=this.horiz,f=this.opposite,c=this.options.title,k;this.axisTitle||((k=c.textAlign)||(k=(g?{low:"left",middle:"center",high:"right"}:{low:f?"right":"left",middle:"center",high:f?"left":"right"})[c.align]),this.axisTitle=b.text(c.text,0,0,c.useHTML).attr({zIndex:7,rotation:c.rotation||0,align:k}).addClass("highcharts-axis-title").add(this.axisGroup),this.axisTitle.isNew=!0);this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var b=this.ticks;b[a]?b[a].addLabel():b[a]=
new y(this,a)},getOffset:function(){var a=this,b=a.chart,f=b.renderer,c=a.options,k=a.tickPositions,m=a.ticks,e=a.horiz,h=a.side,y=b.inverted?[1,0,3,2][h]:h,C,A,u=0,z,v=0,l=c.title,F=c.labels,G=0,p=b.axisOffset,b=b.clipOffset,r=[-1,1,1,-1][h],L=c.className,I=a.axisParent,x=this.tickSize("tick");C=a.hasData();a.showAxis=A=C||q(c.showEmpty,!0);a.staggerLines=a.horiz&&F.staggerLines;a.axisGroup||(a.gridGroup=f.g("grid").attr({zIndex:c.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+
(L||"")).add(I),a.axisGroup=f.g("axis").attr({zIndex:c.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(L||"")).add(I),a.labelGroup=f.g("axis-labels").attr({zIndex:F.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(L||"")).add(I));C||a.isLinked?(n(k,function(b,f){a.generateTick(b,f)}),a.renderUnsquish(),!1===F.reserveSpace||0!==h&&2!==h&&{1:"left",3:"right"}[h]!==a.labelAlign&&"center"!==a.labelAlign||n(k,function(a){G=Math.max(m[a].getLabelSize(),G)}),a.staggerLines&&
(G*=a.staggerLines,a.labelOffset=G*(a.opposite?-1:1))):H(m,function(a,b){a.destroy();delete m[b]});l&&l.text&&!1!==l.enabled&&(a.addTitle(A),A&&!1!==l.reserveSpace&&(a.titleOffset=u=a.axisTitle.getBBox()[e?"height":"width"],z=l.offset,v=d(z)?0:q(l.margin,e?5:10)));a.renderLine();a.offset=r*q(c.offset,p[h]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};f=0===h?-a.labelMetrics().h:2===h?a.tickRotCorr.y:0;v=Math.abs(G)+v;G&&(v=v-f+r*(e?q(F.y,a.tickRotCorr.y+8*r):F.x));a.axisTitleMargin=q(z,v);p[h]=Math.max(p[h],
a.axisTitleMargin+u+r*a.offset,v,C&&k.length&&x?x[0]+r*a.offset:0);c=c.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);b[y]=Math.max(b[y],c)},getLinePath:function(a){var b=this.chart,f=this.opposite,g=this.offset,c=this.horiz,k=this.left+(f?this.width:0)+g,g=b.chartHeight-this.bottom-(f?this.height:0)+g;f&&(a*=-1);return b.renderer.crispLine(["M",c?this.left:k,c?g:this.top,"L",c?b.chartWidth-this.right:k,c?g:b.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup))},
getTitlePosition:function(){var a=this.horiz,b=this.left,f=this.top,c=this.len,k=this.options.title,d=a?b:f,m=this.opposite,e=this.offset,h=k.x||0,q=k.y||0,y=this.chart.renderer.fontMetrics(k.style&&k.style.fontSize,this.axisTitle).f,c={low:d+(a?0:c),middle:d+c/2,high:d+(a?c:0)}[k.align],b=(a?f+this.height:b)+(a?1:-1)*(m?-1:1)*this.axisTitleMargin+(2===this.side?y:0);return{x:a?c+h:b+(m?this.width:0)+e+h,y:a?b+q-(m?this.height:0)+e:c+q}},renderMinorTick:function(a){var b=this.chart.hasRendered&&m(this.oldMin),
f=this.minorTicks;f[a]||(f[a]=new y(this,a,"minor"));b&&f[a].isNew&&f[a].render(null,!0);f[a].render(null,!1,1)},renderTick:function(a,b){var f=this.isLinked,g=this.ticks,c=this.chart.hasRendered&&m(this.oldMin);if(!f||a>=this.min&&a<=this.max)g[a]||(g[a]=new y(this,a)),c&&g[a].isNew&&g[a].render(b,!0,.1),g[a].render(b)},render:function(){var b=this,f=b.chart,c=b.options,k=b.isLog,d=b.lin2log,m=b.isLinked,e=b.tickPositions,h=b.axisTitle,q=b.ticks,C=b.minorTicks,u=b.alternateBands,z=c.stackLabels,
v=c.alternateGridColor,l=b.tickmarkOffset,F=b.axisLine,G=b.showAxis,p=B(f.renderer.globalAnimation),r,L;b.labelEdge.length=0;b.overlap=!1;n([q,C,u],function(a){H(a,function(a){a.isActive=!1})});if(b.hasData()||m)b.minorTickInterval&&!b.categories&&n(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),e.length&&(n(e,function(a,f){b.renderTick(a,f)}),l&&(0===b.min||b.single)&&(q[-1]||(q[-1]=new y(b,-1,null,!0)),q[-1].render(-1))),v&&n(e,function(g,c){L=void 0!==e[c+1]?e[c+1]+l:b.max-l;0===
c%2&&g<b.max&&L<=b.max+(f.polar?-l:l)&&(u[g]||(u[g]=new a.PlotLineOrBand(b)),r=g+l,u[g].options={from:k?d(r):r,to:k?d(L):L,color:v},u[g].render(),u[g].isActive=!0)}),b._addedPlotLB||(n((c.plotLines||[]).concat(c.plotBands||[]),function(a){b.addPlotBandOrLine(a)}),b._addedPlotLB=!0);n([q,C,u],function(a){var b,g=[],c=p.duration;H(a,function(a,b){a.isActive||(a.render(b,!1,0),a.isActive=!1,g.push(b))});A(function(){for(b=g.length;b--;)a[g[b]]&&!a[g[b]].isActive&&(a[g[b]].destroy(),delete a[g[b]])},
a!==u&&f.hasRendered&&c?c:0)});F&&(F[F.isPlaced?"animate":"attr"]({d:this.getLinePath(F.strokeWidth())}),F.isPlaced=!0,F[G?"show":"hide"](!0));h&&G&&(h[h.isNew?"attr":"animate"](b.getTitlePosition()),h.isNew=!1);z&&z.enabled&&b.renderStackTotals();b.isDirty=!1},redraw:function(){this.visible&&(this.render(),n(this.plotLinesAndBands,function(a){a.render()}));n(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var b=this,
g=b.stacks,c=b.plotLinesAndBands,k;a||G(b);H(g,function(a,b){l(a);g[b]=null});n([b.ticks,b.minorTicks,b.alternateBands],function(a){l(a)});if(c)for(a=c.length;a--;)c[a].destroy();n("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),function(a){b[a]&&(b[a]=b[a].destroy())});for(k in b.plotLinesAndBandsGroups)b.plotLinesAndBandsGroups[k]=b.plotLinesAndBandsGroups[k].destroy();H(b,function(a,g){-1===f(g,b.keepProps)&&delete b[g]})},drawCrosshair:function(a,b){var f,
g=this.crosshair,c=q(g.snap,!0),k,m=this.cross;a||(a=this.cross&&this.cross.e);this.crosshair&&!1!==(d(b)||!c)?(c?d(b)&&(k=this.isXAxis?b.plotX:this.len-b.plotY):k=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),d(k)&&(f=this.getPlotLinePath(b&&(this.isXAxis?b.x:q(b.stackY,b.y)),null,null,null,k)||null),d(f)?(b=this.categories&&!this.isRadial,m||(this.cross=m=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(b?"category ":"thin ")+g.className).attr({zIndex:q(g.zIndex,
2)}).add()),m.show().attr({d:f}),b&&!g.width&&m.attr({"stroke-width":this.transA}),this.cross.e=a):this.hideCrosshair()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}});return a.Axis=L}(K);(function(a){var x=a.Axis,B=a.Date,D=a.dateFormat,E=a.defaultOptions,p=a.defined,e=a.each,d=a.extend,r=a.getMagnitude,l=a.getTZOffset,n=a.normalizeTickInterval,h=a.pick,c=a.timeUnits;x.prototype.getTimeTicks=function(a,n,b,f){var k=[],m={},u=E.global.useUTC,v,z=new B(n-Math.max(l(n),
l(b))),H=B.hcMakeTime,q=a.unitRange,G=a.count,C;if(p(n)){z[B.hcSetMilliseconds](q>=c.second?0:G*Math.floor(z.getMilliseconds()/G));if(q>=c.second)z[B.hcSetSeconds](q>=c.minute?0:G*Math.floor(z.getSeconds()/G));if(q>=c.minute)z[B.hcSetMinutes](q>=c.hour?0:G*Math.floor(z[B.hcGetMinutes]()/G));if(q>=c.hour)z[B.hcSetHours](q>=c.day?0:G*Math.floor(z[B.hcGetHours]()/G));if(q>=c.day)z[B.hcSetDate](q>=c.month?1:G*Math.floor(z[B.hcGetDate]()/G));q>=c.month&&(z[B.hcSetMonth](q>=c.year?0:G*Math.floor(z[B.hcGetMonth]()/
G)),v=z[B.hcGetFullYear]());if(q>=c.year)z[B.hcSetFullYear](v-v%G);if(q===c.week)z[B.hcSetDate](z[B.hcGetDate]()-z[B.hcGetDay]()+h(f,1));v=z[B.hcGetFullYear]();f=z[B.hcGetMonth]();var A=z[B.hcGetDate](),y=z[B.hcGetHours]();if(B.hcTimezoneOffset||B.hcGetTimezoneOffset)C=(!u||!!B.hcGetTimezoneOffset)&&(b-n>4*c.month||l(n)!==l(b)),z=z.getTime(),z=new B(z+l(z));u=z.getTime();for(n=1;u<b;)k.push(u),u=q===c.year?H(v+n*G,0):q===c.month?H(v,f+n*G):!C||q!==c.day&&q!==c.week?C&&q===c.hour?H(v,f,A,y+n*G):u+
q*G:H(v,f,A+n*G*(q===c.day?1:7)),n++;k.push(u);q<=c.hour&&1E4>k.length&&e(k,function(a){0===a%18E5&&"000000000"===D("%H%M%S%L",a)&&(m[a]="day")})}k.info=d(a,{higherRanks:m,totalRange:q*G});return k};x.prototype.normalizeTimeTickInterval=function(a,d){var b=d||[["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=b[b.length-1];var f=c[d[0]],k=d[1],m;for(m=
0;m<b.length&&!(d=b[m],f=c[d[0]],k=d[1],b[m+1]&&a<=(f*k[k.length-1]+c[b[m+1][0]])/2);m++);f===c.year&&a<5*f&&(k=[1,2,5]);a=n(a/f,k,"year"===d[0]?Math.max(r(a/f),1):1);return{unitRange:f,count:a,unitName:d[0]}}})(K);(function(a){var x=a.Axis,B=a.getMagnitude,D=a.map,E=a.normalizeTickInterval,p=a.pick;x.prototype.getLogTickPositions=function(a,d,r,l){var e=this.options,h=this.len,c=this.lin2log,u=this.log2lin,v=[];l||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),v=this.getLinearTickPositions(a,
d,r);else if(.08<=a)for(var h=Math.floor(d),b,f,k,m,F,e=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];h<r+1&&!F;h++)for(f=e.length,b=0;b<f&&!F;b++)k=u(c(h)*e[b]),k>d&&(!l||m<=r)&&void 0!==m&&v.push(m),m>r&&(F=!0),m=k;else d=c(d),r=c(r),a=e[l?"minorTickInterval":"tickInterval"],a=p("auto"===a?null:a,this._minorAutoInterval,e.tickPixelInterval/(l?5:1)*(r-d)/((l?h/this.tickPositions.length:h)||1)),a=E(a,null,B(a)),v=D(this.getLinearTickPositions(a,d,r),u),l||(this._minorAutoInterval=a/5);l||(this.tickInterval=
a);return v};x.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};x.prototype.lin2log=function(a){return Math.pow(10,a)}})(K);(function(a,x){var B=a.arrayMax,D=a.arrayMin,E=a.defined,p=a.destroyObjectProperties,e=a.each,d=a.erase,r=a.merge,l=a.pick;a.PlotLineOrBand=function(a,d){this.axis=a;d&&(this.options=d,this.id=d.id)};a.PlotLineOrBand.prototype={render:function(){var d=this,e=d.axis,c=e.horiz,u=d.options,v=u.label,b=d.label,f=u.to,k=u.from,m=u.value,F=E(k)&&E(f),p=E(m),z=d.svgElem,
H=!z,q=[],G=l(u.zIndex,0),C=u.events,q={"class":"highcharts-plot-"+(F?"band ":"line ")+(u.className||"")},A={},y=e.chart.renderer,L=F?"bands":"lines",g;g=e.log2lin;e.isLog&&(k=g(k),f=g(f),m=g(m));A.zIndex=G;L+="-"+G;(g=e.plotLinesAndBandsGroups[L])||(e.plotLinesAndBandsGroups[L]=g=y.g("plot-"+L).attr(A).add());H&&(d.svgElem=z=y.path().attr(q).add(g));if(p)q=e.getPlotLinePath(m,z.strokeWidth());else if(F)q=e.getPlotBandPath(k,f,u);else return;H&&q&&q.length?(z.attr({d:q}),C&&a.objectEach(C,function(a,
b){z.on(b,function(a){C[b].apply(d,[a])})})):z&&(q?(z.show(),z.animate({d:q})):(z.hide(),b&&(d.label=b=b.destroy())));v&&E(v.text)&&q&&q.length&&0<e.width&&0<e.height&&!q.flat?(v=r({align:c&&F&&"center",x:c?!F&&4:10,verticalAlign:!c&&F&&"middle",y:c?F?16:10:F?6:-4,rotation:c&&!F&&90},v),this.renderLabel(v,q,F,G)):b&&b.hide();return d},renderLabel:function(a,d,c,e){var h=this.label,b=this.axis.chart.renderer;h||(h={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(c?"band":
"line")+"-label "+(a.className||"")},h.zIndex=e,this.label=h=b.text(a.text,0,0,a.useHTML).attr(h).add());e=[d[1],d[4],c?d[6]:d[1]];d=[d[2],d[5],c?d[7]:d[2]];c=D(e);b=D(d);h.align(a,!1,{x:c,y:b,width:B(e)-c,height:B(d)-b});h.show()},destroy:function(){d(this.axis.plotLinesAndBands,this);delete this.axis;p(this)}};a.extend(x.prototype,{getPlotBandPath:function(a,d){var c=this.getPlotLinePath(d,null,null,!0),e=this.getPlotLinePath(a,null,null,!0),h=this.horiz,b=1;a=a<this.min&&d<this.min||a>this.max&&
d>this.max;e&&c?(a&&(e.flat=e.toString()===c.toString(),b=0),e.push(h&&c[4]===e[4]?c[4]+b:c[4],h||c[5]!==e[5]?c[5]:c[5]+b,h&&c[1]===e[1]?c[1]+b:c[1],h||c[2]!==e[2]?c[2]:c[2]+b)):e=null;return e},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(d,e){var c=(new a.PlotLineOrBand(this,d)).render(),h=this.userOptions;c&&(e&&(h[e]=h[e]||[],h[e].push(d)),this.plotLinesAndBands.push(c));return c},
removePlotBandOrLine:function(a){for(var h=this.plotLinesAndBands,c=this.options,u=this.userOptions,n=h.length;n--;)h[n].id===a&&h[n].destroy();e([c.plotLines||[],u.plotLines||[],c.plotBands||[],u.plotBands||[]],function(b){for(n=b.length;n--;)b[n].id===a&&d(b,b[n])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(K,T);(function(a){var x=a.dateFormat,B=a.each,D=a.extend,E=a.format,p=a.isNumber,e=a.map,d=a.merge,r=a.pick,l=a.splat,
n=a.syncTimeout,h=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype={init:function(a,d){this.chart=a;this.options=d;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=d.split&&!a.inverted;this.shared=d.shared||this.split},cleanSplit:function(a){B(this.chart.series,function(c){var d=c&&c.tt;d&&(!d.isActive||a?c.tt=d.destroy():d.isActive=!1)})},applyFilter:function(){var a=this.chart;a.renderer.definition({tagName:"filter",id:"drop-shadow-"+a.index,
opacity:.5,children:[{tagName:"feGaussianBlur",in:"SourceAlpha",stdDeviation:1},{tagName:"feOffset",dx:1,dy:1},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",type:"linear",slope:.3}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",in:"SourceGraphic"}]}]});a.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+a.index+"{filter:url(#drop-shadow-"+a.index+")}"})},getLabel:function(){var a=this.chart.renderer,d=this.options;this.label||(this.label=
this.split?a.g("tooltip"):a.label("",0,0,d.shape||"callout",null,null,d.useHTML,null,"tooltip").attr({padding:d.padding,r:d.borderRadius}),this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();d(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,d(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,
!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,d,e,b){var f=this,c=f.now,m=!1!==f.options.animation&&!f.isHidden&&(1<Math.abs(a-c.x)||1<Math.abs(d-c.y)),h=f.followPointer||1<f.len;D(c,{x:m?(2*c.x+a)/3:a,y:m?(c.y+d)/2:d,anchorX:h?void 0:m?(2*c.anchorX+e)/3:e,anchorY:h?void 0:m?(c.anchorY+b)/2:b});f.getLabel().attr(c);m&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){f&&f.move(a,d,e,b)},32))},hide:function(a){var c=
this;clearTimeout(this.hideTimer);a=r(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=n(function(){c.getLabel()[a?"fadeOut":"hide"]();c.isHidden=!0},a))},getAnchor:function(a,d){var c,b=this.chart,f=b.inverted,k=b.plotTop,m=b.plotLeft,h=0,n=0,z,u;a=l(a);c=a[0].tooltipPos;this.followPointer&&d&&(void 0===d.chartX&&(d=b.pointer.normalize(d)),c=[d.chartX-b.plotLeft,d.chartY-k]);c||(B(a,function(a){z=a.series.yAxis;u=a.series.xAxis;h+=a.plotX+(!f&&u?u.left-m:0);n+=(a.plotLow?(a.plotLow+a.plotHigh)/
2:a.plotY)+(!f&&z?z.top-k:0)}),h/=a.length,n/=a.length,c=[f?b.plotWidth-n:h,this.shared&&!f&&1<a.length&&d?d.chartY-k:f?b.plotHeight-h:n]);return e(c,Math.round)},getPosition:function(a,d,e){var b=this.chart,f=this.distance,c={},m=e.h||0,h,n=["y",b.chartHeight,d,e.plotY+b.plotTop,b.plotTop,b.plotTop+b.plotHeight],z=["x",b.chartWidth,a,e.plotX+b.plotLeft,b.plotLeft,b.plotLeft+b.plotWidth],l=!this.followPointer&&r(e.ttBelow,!b.inverted===!!e.negative),q=function(a,b,g,d,k,e){var h=g<d-f,q=d+f+g<b,C=
d-f-g;d+=f;if(l&&q)c[a]=d;else if(!l&&h)c[a]=C;else if(h)c[a]=Math.min(e-g,0>C-m?C:C-m);else if(q)c[a]=Math.max(k,d+m+g>b?d:d+m);else return!1},u=function(a,b,g,d){var k;d<f||d>b-f?k=!1:c[a]=d<g/2?1:d>b-g/2?b-g-2:d-g/2;return k},C=function(a){var b=n;n=z;z=b;h=a},A=function(){!1!==q.apply(0,n)?!1!==u.apply(0,z)||h||(C(!0),A()):h?c.x=c.y=0:(C(!0),A())};(b.inverted||1<this.len)&&C();A();return c},defaultFormatter:function(a){var c=this.points||l(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,d){var c,b,f=a,k,m={},e=[];c=this.options.formatter||this.defaultFormatter;var m=this.shared,h;clearTimeout(this.hideTimer);this.followPointer=l(f)[0].series.tooltipOptions.followPointer;k=this.getAnchor(f,d);d=k[0];b=k[1];!m||f.series&&f.series.noSharedTooltip?m=f.getLabelConfig():(B(f,function(a){a.setState("hover");e.push(a.getLabelConfig())}),m={x:f[0].category,y:f[0].y},m.points=e,f=f[0]);this.len=e.length;m=c.call(m,
this);h=f.series;this.distance=r(h.tooltipOptions.distance,16);!1===m?this.hide():(c=this.getLabel(),this.isHidden&&c.attr({opacity:1}).show(),this.split?this.renderSplit(m,a):(c.attr({text:m&&m.join?m.join(""):m}),c.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+r(f.colorIndex,h.colorIndex)),this.updatePosition({plotX:d,plotY:b,negative:f.negative,ttBelow:f.ttBelow,h:k[2]||0})),this.isHidden=!1)},renderSplit:function(c,d){var e=this,b=[],f=this.chart,k=f.renderer,m=!0,h=this.options,
n,z=this.getLabel();B(c.slice(0,d.length+1),function(a,c){c=d[c-1]||{isHeader:!0,plotX:d[0].plotX};var q=c.series||e,C=q.tt,A="highcharts-color-"+r(c.colorIndex,(c.series||{}).colorIndex,"none");C||(q.tt=C=k.label(null,null,null,"callout").addClass("highcharts-tooltip-box "+A).attr({padding:h.padding,r:h.borderRadius}).add(z));C.isActive=!0;C.attr({text:a});a=C.getBBox();A=a.width+C.strokeWidth();c.isHeader?(n=a.height,A=Math.max(0,Math.min(c.plotX+f.plotLeft-A/2,f.chartWidth-A))):A=c.plotX+f.plotLeft-
r(h.distance,16)-A;0>A&&(m=!1);a=(c.series&&c.series.yAxis&&c.series.yAxis.pos)+(c.plotY||0);a-=f.plotTop;b.push({target:c.isHeader?f.plotHeight+n:a,rank:c.isHeader?1:0,size:q.tt.getBBox().height+1,point:c,x:A,tt:C})});this.cleanSplit();a.distribute(b,f.plotHeight+n);B(b,function(a){var b=a.point,c=b.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:m||b.isHeader?a.x:b.plotX+f.plotLeft+r(h.distance,16),y:a.pos+f.plotTop,anchorX:b.isHeader?b.plotX+f.plotLeft:b.plotX+c.xAxis.pos,anchorY:b.isHeader?
a.pos+f.plotTop-15:b.plotY+c.yAxis.pos})})},updatePosition:function(a){var c=this.chart,d=this.getLabel(),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)},getDateFormat:function(a,d,e,b){var f=x("%m-%d %H:%M:%S.%L",d),c,m,n={millisecond:15,second:12,minute:9,hour:6,day:3},l="millisecond";for(m in h){if(a===h.week&&+x("%w",d)===e&&"00:00:00.000"===f.substr(6)){m="week";break}if(h[m]>a){m=
l;break}if(n[m]&&f.substr(n[m])!=="01-01 00:00:00.000".substr(n[m]))break;"week"!==m&&(l=m)}m&&(c=b[m]);return c},getXDateFormat:function(a,d,e){d=d.dateTimeLabelFormats;var b=e&&e.closestPointRange;return(b?this.getDateFormat(b,a.x,e.options.startOfWeek,d):d.day)||d.year},tooltipFooterHeaderFormatter:function(a,d){var c=d?"footer":"header";d=a.series;var b=d.tooltipOptions,f=b.xDateFormat,k=d.xAxis,m=k&&"datetime"===k.options.type&&p(a.key),c=b[c+"Format"];m&&!f&&(f=this.getXDateFormat(a,b,k));m&&
f&&(c=c.replace("{point.key}","{point.key:"+f+"}"));return E(c,{point:a,series:d})},bodyFormatter:function(a){return e(a,function(a){var c=a.series.tooltipOptions;return(c.pointFormatter||a.point.tooltipFormatter).call(a.point,c.pointFormat)})}}})(K);(function(a){var x=a.addEvent,B=a.attr,D=a.charts,E=a.css,p=a.defined,e=a.doc,d=a.each,r=a.extend,l=a.fireEvent,n=a.offset,h=a.pick,c=a.removeEvent,u=a.splat,v=a.Tooltip,b=a.win;a.Pointer=function(a,b){this.init(a,b)};a.Pointer.prototype={init:function(a,
b){this.options=b;this.chart=a;this.runChartClick=b.chart.events&&!!b.chart.events.click;this.pinchDown=[];this.lastValidTouch={};v&&b.tooltip.enabled&&(a.tooltip=new v(a,b.tooltip),this.followTouchMove=h(b.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,f=b.options.chart,c=f.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(c=h(f.pinchType,c));this.zoomX=a=/x/.test(c);this.zoomY=c=/y/.test(c);this.zoomHor=a&&!b||c&&b;this.zoomVert=c&&!b||a&&b;this.hasZoom=
a||c},normalize:function(a,c){var f,d;a=a||b.event;a.target||(a.target=a.srcElement);d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;c||(this.chartPosition=c=n(this.chart.container));void 0===d.pageX?(f=Math.max(a.x,a.clientX-c.left),c=a.y):(f=d.pageX-c.left,c=d.pageY-c.top);return r(a,{chartX:Math.round(f),chartY:Math.round(c)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};d(this.chart.axes,function(f){b[f.isXAxis?"xAxis":"yAxis"].push({axis:f,value:f.toValue(a[f.horiz?
"chartX":"chartY"])})});return b},getKDPoints:function(a,b,c){var f=[],k,e,m;d(a,function(a){k=a.noSharedTooltip&&b;e=!b&&a.directTouch;a.visible&&!e&&h(a.options.enableMouseTracking,!0)&&(m=a.searchPoint(c,!k&&0>a.options.findNearestPointBy.indexOf("y")))&&m.series&&f.push(m)});f.sort(function(a,f){var c=a.distX-f.distX,d=a.dist-f.dist,k=(f.series.group&&f.series.group.zIndex)-(a.series.group&&a.series.group.zIndex);return 0!==c&&b?c:0!==d?d:0!==k?k:a.series.index>f.series.index?-1:1});if(b&&f[0]&&
!f[0].series.noSharedTooltip)for(a=f.length;a--;)(f[a].x!==f[0].x||f[a].series.noSharedTooltip)&&f.splice(a,1);return f},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getHoverData:function(b,c,e,n,l,z){var f=b,k=c,m;n?l?(m=[],d(e,function(a){var b=a.noSharedTooltip&&l,c=!l&&a.directTouch;a.visible&&!b&&!c&&h(a.options.enableMouseTracking,!0)&&(a=a.searchKDTree({clientX:f.clientX,plotY:f.plotY},!b&&1===a.kdDimensions))&&a.series&&m.push(a)}),0===m.length&&
(m=[f])):m=[f]:k&&!k.stickyTracking?(l||(e=[k]),m=this.getKDPoints(e,l,z),f=a.find(m,function(a){return a.series===k})):(b=a.grep(e,function(a){return a.stickyTracking}),m=this.getKDPoints(b,l,z),k=(f=m[0])&&f.series,l&&(m=this.getKDPoints(e,l,z)));m.sort(function(a,b){return a.series.index-b.series.index});return{hoverPoint:f,hoverSeries:k,hoverPoints:m}},runPointActions:function(b,c){var f=this.chart,k=f.tooltip,n=k?k.shared:!1,l=c||f.hoverPoint,p=l&&l.series||f.hoverSeries;c=this.getHoverData(l,
p,f.series,!!c||p&&p.directTouch,n,b);var q,u,l=c.hoverPoint;q=(p=c.hoverSeries)&&p.tooltipOptions.followPointer;u=(n=n&&l&&!l.series.noSharedTooltip)?c.hoverPoints:l?[l]:[];if(l&&(l!==f.hoverPoint||k&&k.isHidden)){d(f.hoverPoints||[],function(b){-1===a.inArray(b,u)&&b.setState()});d(u||[],function(a){a.setState("hover")});if(f.hoverSeries!==p)p.onMouseOver();p&&!p.directTouch&&(f.hoverPoint&&f.hoverPoint.firePointEvent("mouseOut"),l.firePointEvent("mouseOver"));f.hoverPoints=u;f.hoverPoint=l;k&&
k.refresh(n?u:l,b)}else q&&k&&!k.isHidden&&(p=k.getAnchor([{}],b),k.updatePosition({plotX:p[0],plotY:p[1]}));this.unDocMouseMove||(this.unDocMouseMove=x(e,"mousemove",function(b){var f=D[a.hoverChartIndex];if(f)f.pointer.onDocumentMouseMove(b)}));d(f.axes,function(f){h(f.crosshair.snap,!0)?a.find(u,function(a){return a.series[f.coll]===f})?f.drawCrosshair(b,l):f.hideCrosshair():f.drawCrosshair(b)})},reset:function(a,b){var f=this.chart,c=f.hoverSeries,k=f.hoverPoint,e=f.hoverPoints,h=f.tooltip,q=
h&&h.shared?e:k;a&&q&&d(u(q),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)h&&q&&(h.refresh(q),k&&(k.setState(k.state,!0),d(f.axes,function(a){a.crosshair&&a.drawCrosshair(null,k)})));else{if(k)k.onMouseOut();e&&d(e,function(a){a.setState()});if(c)c.onMouseOut();h&&h.hide(b);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());d(f.axes,function(a){a.hideCrosshair()});this.hoverX=f.hoverPoints=f.hoverPoint=null}},scaleGroups:function(a,b){var f=this.chart,c;d(f.series,
function(d){c=a||d.getPlotBox();d.xAxis&&d.xAxis.zoomEnabled&&d.group&&(d.group.attr(c),d.markerGroup&&(d.markerGroup.attr(c),d.markerGroup.clip(b?f.clipRect:null)),d.dataLabelsGroup&&d.dataLabelsGroup.attr(c))});f.clipRect.attr(b||f.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,f=b.options.chart,c=a.chartX,d=a.chartY,e=this.zoomHor,h=this.zoomVert,
q=b.plotLeft,n=b.plotTop,C=b.plotWidth,A=b.plotHeight,y,l=this.selectionMarker,g=this.mouseDownX,t=this.mouseDownY,p=f.panKey&&a[f.panKey+"Key"];l&&l.touch||(c<q?c=q:c>q+C&&(c=q+C),d<n?d=n:d>n+A&&(d=n+A),this.hasDragged=Math.sqrt(Math.pow(g-c,2)+Math.pow(t-d,2)),10<this.hasDragged&&(y=b.isInsidePlot(g-q,t-n),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&y&&!p&&!l&&(this.selectionMarker=l=b.renderer.rect(q,n,e?1:C,h?1:A,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add()),l&&e&&(c-=g,
l.attr({width:Math.abs(c),x:(0<c?0:c)+g})),l&&h&&(c=d-t,l.attr({height:Math.abs(c),y:(0<c?0:c)+t})),y&&!l&&f.panning&&b.pan(a,f.panning)))},drop:function(a){var b=this,f=this.chart,c=this.hasPinched;if(this.selectionMarker){var e={originalEvent:a,xAxis:[],yAxis:[]},h=this.selectionMarker,n=h.attr?h.attr("x"):h.x,q=h.attr?h.attr("y"):h.y,u=h.attr?h.attr("width"):h.width,C=h.attr?h.attr("height"):h.height,A;if(this.hasDragged||c)d(f.axes,function(f){if(f.zoomEnabled&&p(f.min)&&(c||b[{xAxis:"zoomX",
yAxis:"zoomY"}[f.coll]])){var d=f.horiz,g="touchend"===a.type?f.minPixelPadding:0,k=f.toValue((d?n:q)+g),d=f.toValue((d?n+u:q+C)-g);e[f.coll].push({axis:f,min:Math.min(k,d),max:Math.max(k,d)});A=!0}}),A&&l(f,"selection",e,function(a){f.zoom(r(a,c?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();c&&this.scaleGroups()}f&&(E(f.container,{cursor:f._cursor}),f.cancelClick=10<this.hasDragged,f.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=
this.normalize(a);this.zoomOption(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(b){D[a.hoverChartIndex]&&D[a.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(a){var b=this.chart,f=this.chartPosition;a=this.normalize(a,f);!f||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var f=D[a.hoverChartIndex];f&&(b.relatedTarget||b.toElement)&&(f.pointer.reset(),
f.pointer.chartPosition=null)},onContainerMouseMove:function(b){var f=this.chart;p(a.hoverChartIndex)&&D[a.hoverChartIndex]&&D[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex=f.index);b=this.normalize(b);b.returnValue=!1;"mousedown"===f.mouseIsDown&&this.drag(b);!this.inClass(b.target,"highcharts-tracker")&&!f.isInsidePlot(b.chartX-f.plotLeft,b.chartY-f.plotTop)||f.openMenu||this.runPointActions(b)},inClass:function(a,b){for(var f;a;){if(f=B(a,"class")){if(-1!==f.indexOf(b))return!0;if(-1!==f.indexOf("highcharts-container"))return!1}a=
a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;if(!(!b||!a||b.stickyTracking||this.inClass(a,"highcharts-tooltip")||this.inClass(a,"highcharts-series-"+b.index)&&this.inClass(a,"highcharts-tracker")))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,f=b.plotLeft,d=b.plotTop;a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(l(c.series,"click",r(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",
a)):(r(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-f,a.chartY-d)&&l(b,"click",a)))},setDOMEvents:function(){var b=this,c=b.chart.container;c.onmousedown=function(a){b.onContainerMouseDown(a)};c.onmousemove=function(a){b.onContainerMouseMove(a)};c.onclick=function(a){b.onContainerClick(a)};x(c,"mouseleave",b.onContainerMouseLeave);1===a.chartCount&&x(e,"mouseup",b.onDocumentMouseUp);a.hasTouch&&(c.ontouchstart=function(a){b.onContainerTouchStart(a)},c.ontouchmove=function(a){b.onContainerTouchMove(a)},
1===a.chartCount&&x(e,"touchend",b.onDocumentTouchEnd))},destroy:function(){var b=this;b.unDocMouseMove&&b.unDocMouseMove();c(b.chart.container,"mouseleave",b.onContainerMouseLeave);a.chartCount||(c(e,"mouseup",b.onDocumentMouseUp),c(e,"touchend",b.onDocumentTouchEnd));clearInterval(b.tooltipTimeout);a.objectEach(b,function(a,c){b[c]=null})}}})(K);(function(a){var x=a.charts,B=a.each,D=a.extend,E=a.map,p=a.noop,e=a.pick;D(a.Pointer.prototype,{pinchTranslate:function(a,e,l,n,h,c){this.zoomHor&&this.pinchTranslateDirection(!0,
a,e,l,n,h,c);this.zoomVert&&this.pinchTranslateDirection(!1,a,e,l,n,h,c)},pinchTranslateDirection:function(a,e,l,n,h,c,p,v){var b=this.chart,f=a?"x":"y",d=a?"X":"Y",m="chart"+d,u=a?"width":"height",r=b["plot"+(a?"Left":"Top")],z,H,q=v||1,G=b.inverted,C=b.bounds[a?"h":"v"],A=1===e.length,y=e[0][m],L=l[0][m],g=!A&&e[1][m],t=!A&&l[1][m],N;l=function(){!A&&20<Math.abs(y-g)&&(q=v||Math.abs(L-t)/Math.abs(y-g));H=(r-L)/q+y;z=b["plot"+(a?"Width":"Height")]/q};l();e=H;e<C.min?(e=C.min,N=!0):e+z>C.max&&(e=
C.max-z,N=!0);N?(L-=.8*(L-p[f][0]),A||(t-=.8*(t-p[f][1])),l()):p[f]=[L,t];G||(c[f]=H-r,c[u]=z);c=G?1/q:q;h[u]=z;h[f]=e;n[G?a?"scaleY":"scaleX":"scale"+d]=q;n["translate"+d]=c*r+(L-c*y)},pinch:function(a){var d=this,l=d.chart,n=d.pinchDown,h=a.touches,c=h.length,u=d.lastValidTouch,v=d.hasZoom,b=d.selectionMarker,f={},k=1===c&&(d.inClass(a.target,"highcharts-tracker")&&l.runTrackerClick||d.runChartClick),m={};1<c&&(d.initiated=!0);v&&d.initiated&&!k&&a.preventDefault();E(h,function(a){return d.normalize(a)});
"touchstart"===a.type?(B(h,function(a,b){n[b]={chartX:a.chartX,chartY:a.chartY}}),u.x=[n[0].chartX,n[1]&&n[1].chartX],u.y=[n[0].chartY,n[1]&&n[1].chartY],B(l.axes,function(a){if(a.zoomEnabled){var b=l.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,f=a.toPixels(e(a.options.min,a.dataMin)),d=a.toPixels(e(a.options.max,a.dataMax)),k=Math.max(f,d);b.min=Math.min(a.pos,Math.min(f,d)-c);b.max=Math.max(a.pos+a.len,k+c)}}),d.res=!0):d.followTouchMove&&1===c?this.runPointActions(d.normalize(a)):n.length&&(b||
(d.selectionMarker=b=D({destroy:p,touch:!0},l.plotBox)),d.pinchTranslate(n,h,f,b,m,u),d.hasPinched=v,d.scaleGroups(f,m),d.res&&(d.res=!1,this.reset(!1,0)))},touch:function(d,p){var l=this.chart,n,h;if(l.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});a.hoverChartIndex=l.index;1===d.touches.length?(d=this.normalize(d),(h=l.isInsidePlot(d.chartX-l.plotLeft,d.chartY-l.plotTop))&&!l.openMenu?(p&&this.runPointActions(d),"touchmove"===d.type&&(p=this.pinchDown,n=p[0]?4<=Math.sqrt(Math.pow(p[0].chartX-
d.chartX,2)+Math.pow(p[0].chartY-d.chartY,2)):!1),e(n,!0)&&this.pinch(d)):p&&this.reset()):2===d.touches.length&&this.pinch(d)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(d){x[a.hoverChartIndex]&&x[a.hoverChartIndex].pointer.drop(d)}})})(K);(function(a){var x=a.addEvent,B=a.charts,D=a.css,E=a.doc,p=a.extend,e=a.noop,d=a.Pointer,r=a.removeEvent,l=a.win,n=a.wrap;if(!a.hasTouch&&(l.PointerEvent||l.MSPointerEvent)){var h=
{},c=!!l.PointerEvent,u=function(){var b=[];b.item=function(a){return this[a]};a.objectEach(h,function(a){b.push({pageX:a.pageX,pageY:a.pageY,target:a.target})});return b},v=function(b,c,d,h){"touch"!==b.pointerType&&b.pointerType!==b.MSPOINTER_TYPE_TOUCH||!B[a.hoverChartIndex]||(h(b),h=B[a.hoverChartIndex].pointer,h[c]({type:d,target:b.currentTarget,preventDefault:e,touches:u()}))};p(d.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(E,c?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});n(d.prototype,"init",function(a,c,d){a.call(this,c,d);this.hasZoom&&D(c.container,{"-ms-touch-action":"none","touch-action":"none"})});n(d.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(x)});n(d.prototype,"destroy",function(a){this.batchMSEvents(r);a.call(this)})}})(K);(function(a){var x,B=a.addEvent,D=a.css,E=a.discardElement,p=a.defined,
e=a.each,d=a.isFirefox,r=a.marginNames,l=a.merge,n=a.pick,h=a.setAnimation,c=a.stableSort,u=a.win,v=a.wrap;x=a.Legend=function(a,c){this.init(a,c)};x.prototype={init:function(a,c){this.chart=a;this.setOptions(c);c.enabled&&(this.render(),B(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(a){var b=n(a.padding,8);this.options=a;this.itemMarginTop=a.itemMarginTop||0;this.padding=b;this.initialItemY=b-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=n(a.symbolWidth,
16);this.pages=[]},update:function(a,c){var b=this.chart;this.setOptions(l(!0,this.options,a));this.destroy();b.isDirtyLegend=b.isDirtyBox=!0;n(c,!0)&&b.redraw()},colorizeItem:function(a,c){a.legendGroup[c?"removeClass":"addClass"]("highcharts-legend-item-hidden")},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],h=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(b?e:this.legendWidth-e-2*c-4,d);h&&(h.x=e,h.y=d)},destroyItem:function(a){var b=
a.checkbox;e(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&E(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}e(this.getAllItems(),function(b){e(["legendItem","legendGroup"],a,b)});e("clipRect up down pager nav box title group".split(" "),a,this);this.display=null},positionCheckboxes:function(a){var b=this.group&&this.group.alignAttr,c,d=this.clipHeight||this.legendHeight,h=this.titleHeight;b&&(c=b.translateY,
e(this.allItems,function(f){var e=f.checkbox,k;e&&(k=c+h+e.y+(a||0)+3,D(e,{left:b.translateX+f.checkboxOffset+e.x-20+"px",top:k+"px",display:k>c-6&&k<c+d-6?"":"none"}))}))},renderTitle:function(){var a=this.options,c=this.padding,d=a.title,e=0;d.text&&(this.title||(this.title=this.chart.renderer.label(d.text,c-3,c-4,null,null,null,a.useHTML,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(b){var c=this.options;b.legendItem.attr({text:c.labelFormat?a.format(c.labelFormat,b):c.labelFormatter.call(b)})},renderItem:function(a){var b=this.chart,c=b.renderer,d=this.options,e="horizontal"===d.layout,h=this.symbolWidth,l=d.symbolPadding,p=this.padding,q=e?n(d.itemDistance,20):0,u=!d.rtl,C=d.width,A=d.itemMarginBottom||0,y=this.itemMarginTop,v=a.legendItem,g=!a.series,t=!g&&a.series.drawLegendSymbol?a.series:a,r=t.options,r=this.createCheckboxForItem&&r&&r.showCheckbox,
J=d.useHTML,x=a.options.className;v||(a.legendGroup=c.g("legend-item").addClass("highcharts-"+t.type+"-series highcharts-color-"+a.colorIndex+(x?" "+x:"")+(g?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=v=c.text("",u?h+l:-l,this.baseline||0,J).attr({align:u?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=c.fontMetrics(12,v),this.baseline=this.fontMetrics.f+3+y,v.attr("y",this.baseline)),this.symbolHeight=d.symbolHeight||this.fontMetrics.f,
t.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,v,J),r&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);this.setText(a);c=v.getBBox();h=a.checkboxOffset=d.itemWidth||a.legendItemWidth||h+l+c.width+q+(r?20:0);this.itemHeight=l=Math.round(a.legendItemHeight||c.height||this.symbolHeight);e&&this.itemX-p+h>(C||b.spacingBox.width-2*p-d.x)&&(this.itemX=p,this.itemY+=y+this.lastLineHeight+A,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,h);this.lastItemY=
y+this.itemY+A;this.lastLineHeight=Math.max(l,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];e?this.itemX+=h:(this.itemY+=y+l+A,this.lastLineHeight=l);this.offsetWidth=C||Math.max((e?this.itemX-p-q:h)+p,this.offsetWidth)},getAllItems:function(){var a=[];e(this.chart.series,function(b){var c=b&&b.options;b&&n(c.showInLegend,p(c.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))});return a},adjustMargins:function(a,c){var b=this.chart,d=this.options,
f=d.align.charAt(0)+d.verticalAlign.charAt(0)+d.layout.charAt(0);d.floating||e([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(e,h){e.test(f)&&!p(a[h])&&(b[r[h]]=Math.max(b[r[h]],b.legend[(h+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][h]*d[h%2?"x":"y"]+n(d.margin,12)+c[h]))})},render:function(){var a=this,d=a.chart,h=d.renderer,m=a.group,n,p,u,v,q=a.box,r=a.options,C=a.padding;a.itemX=C;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;m||(a.group=m=h.g("legend").attr({zIndex:7}).add(),
a.contentGroup=h.g().attr({zIndex:1}).add(m),a.scrollGroup=h.g().add(a.contentGroup));a.renderTitle();n=a.getAllItems();c(n,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});r.reversed&&n.reverse();a.allItems=n;a.display=p=!!n.length;a.lastLineHeight=0;e(n,function(b){a.renderItem(b)});u=(r.width||a.offsetWidth)+C;v=a.lastItemY+a.lastLineHeight+a.titleHeight;v=a.handleOverflow(v);v+=C;q||(a.box=q=h.rect().addClass("highcharts-legend-box").attr({r:r.borderRadius}).add(m),
q.isNew=!0);0<u&&0<v&&(q[q.isNew?"attr":"animate"](q.crisp({x:0,y:0,width:u,height:v},q.strokeWidth())),q.isNew=!1);q[p?"show":"hide"]();"none"===m.getStyle("display")&&(u=v=0);a.legendWidth=u;a.legendHeight=v;e(n,function(b){a.positionItem(b)});p&&m.align(l(r,{width:u,height:v}),!0,"spacingBox");d.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,h=this.options,l=h.y,p=this.padding,c=c.spacingBox.height+("top"===h.verticalAlign?-l:l)-p,l=h.maxHeight,
u,q=this.clipRect,v=h.navigation,C=n(v.animation,!0),A=v.arrowSize||12,y=this.nav,r=this.pages,g,t=this.allItems,N=function(a){"number"===typeof a?q.attr({height:a}):q&&(b.clipRect=q.destroy(),b.contentGroup.clip());b.contentGroup.div&&(b.contentGroup.div.style.clip=a?"rect("+p+"px,9999px,"+(p+a)+"px,0)":"auto")};"horizontal"!==h.layout||"middle"===h.verticalAlign||h.floating||(c/=2);l&&(c=Math.min(c,l));r.length=0;a>c&&!1!==v.enabled?(this.clipHeight=u=Math.max(c-20-this.titleHeight-p,0),this.currentPage=
n(this.currentPage,1),this.fullHeight=a,e(t,function(a,b){var c=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var d=r.length;if(!d||c-r[d-1]>u&&(g||c)!==r[d-1])r.push(g||c),d++;b===t.length-1&&c+a-r[d-1]>u&&r.push(c);c!==g&&(g=c)}),q||(q=b.clipRect=d.clipRect(0,p,9999,0),b.contentGroup.clip(q)),N(u),y||(this.nav=y=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,A,A).on("click",function(){b.scroll(-1,C)}).add(y),this.pager=d.text("",15,10).addClass("highcharts-legend-navigation").add(y),
this.down=d.symbol("triangle-down",0,0,A,A).on("click",function(){b.scroll(1,C)}).add(y)),b.scroll(0),a=c):y&&(N(),this.nav=y.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,c){var b=this.pages,d=b.length;a=this.currentPage+a;var f=this.clipHeight,e=this.pager,n=this.padding;a>d&&(a=d);0<a&&(void 0!==c&&h(c,this.chart),this.nav.attr({translateX:n,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":
"highcharts-legend-nav-active"}),e.attr({text:a+"/"+d}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===d?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),c=-b[a-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=a,this.positionCheckboxes(c))}};a.LegendSymbolMixin={drawRectangle:function(a,c){var b=a.symbolHeight,d=a.options.squareSymbol;c.legendSymbol=this.chart.renderer.rect(d?(a.symbolWidth-b)/2:0,a.baseline-b+1,d?b:a.symbolWidth,b,n(a.options.symbolRadius,
b/2)).addClass("highcharts-point").attr({zIndex:3}).add(c.legendGroup)},drawLineMarker:function(a){var b=this.options.marker,c,d=a.symbolWidth,e=a.symbolHeight;c=e/2;var h=this.chart.renderer,p=this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);this.legendLine=h.path(["M",0,a,"L",d,a]).addClass("highcharts-graph").attr({}).add(p);b&&!1!==b.enabled&&(c=Math.min(n(b.radius,c),c),0===this.symbol.indexOf("url")&&(b=l(b,{width:e,height:e}),c=0),this.legendSymbol=b=h.symbol(this.symbol,d/2-c,
a-c,2*c,2*c,b).addClass("highcharts-point").add(p),b.isMarker=!0)}};(/Trident\/7\.0/.test(u.navigator.userAgent)||d)&&v(x.prototype,"positionItem",function(a,c){var b=this,d=function(){c._legendItemPos&&a.call(b,c)};d();setTimeout(d)})})(K);(function(a){var x=a.addEvent,B=a.animObject,D=a.attr,E=a.doc,p=a.Axis,e=a.createElement,d=a.defaultOptions,r=a.discardElement,l=a.charts,n=a.defined,h=a.each,c=a.extend,u=a.find,v=a.fireEvent,b=a.getStyle,f=a.grep,k=a.isNumber,m=a.isObject,F=a.isString,I=a.Legend,
z=a.marginNames,H=a.merge,q=a.objectEach,G=a.Pointer,C=a.pick,A=a.pInt,y=a.removeEvent,L=a.seriesTypes,g=a.splat,t=a.svg,N=a.syncTimeout,J=a.win,S=a.Renderer,M=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,b,c){return new M(a,b,c)};c(M.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(F(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(b,c){var g,f,e=b.series,h=b.plotOptions||{};b.series=null;g=H(d,b);for(f in g.plotOptions)g.plotOptions[f].tooltip=
h[f]&&H(h[f].tooltip)||void 0;g.tooltip.userOptions=b.chart&&b.chart.forExport&&b.tooltip.userOptions||b.tooltip;g.series=b.series=e;this.userOptions=b;b=g.chart;f=b.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.callback=c;this.isResizing=0;this.options=g;this.axes=[];this.series=[];this.hasCartesianSeries=b.showAxes;var k=this;k.index=l.length;l.push(k);a.chartCount++;f&&q(f,function(a,b){x(k,b,a)});k.xAxis=[];k.yAxis=[];k.pointCount=k.colorCounter=k.symbolCounter=0;k.firstRender()},
initSeries:function(b){var c=this.options.chart;(c=L[b.type||c.type||c.defaultSeriesType])||a.error(17,!0);c=new c;c.init(this,b);return c},orderSeries:function(a){var b=this.series;for(a=a||0;a<b.length;a++)b[a]&&(b[a].index=a,b[a].name=b[a].name||"Series "+(b[a].index+1))},isInsidePlot:function(a,b,c){var d=c?b:a;a=c?a:b;return 0<=d&&d<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(b){var d=this.axes,g=this.series,f=this.pointer,e=this.legend,k=this.isDirtyLegend,m,t,q=this.hasCartesianSeries,
y=this.isDirtyBox,C,A=this.renderer,n=A.isHidden(),l=[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(b,this);n&&this.temporaryDisplay();this.layOutTitles();for(b=g.length;b--;)if(C=g[b],C.options.stacking&&(m=!0,C.isDirty)){t=!0;break}if(t)for(b=g.length;b--;)C=g[b],C.options.stacking&&(C.isDirty=!0);h(g,function(a){a.isDirty&&"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),k=!0);a.isDirtyData&&v(a,"updatedData")});k&&e.options.enabled&&(e.render(),this.isDirtyLegend=
!1);m&&this.getStacks();q&&h(d,function(a){a.updateNames();a.setScale()});this.getMargins();q&&(h(d,function(a){a.isDirty&&(y=!0)}),h(d,function(a){var b=a.min+","+a.max;a.extKey!==b&&(a.extKey=b,l.push(function(){v(a,"afterSetExtremes",c(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(y||m)&&a.redraw()}));y&&this.drawChartBox();v(this,"predraw");h(g,function(a){(y||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});f&&f.reset(!0);A.draw();v(this,"redraw");v(this,"render");n&&this.temporaryDisplay(!0);
h(l,function(a){a.call()})},get:function(a){function b(b){return b.id===a||b.options&&b.options.id===a}var c,d=this.series,g;c=u(this.axes,b)||u(this.series,b);for(g=0;!c&&g<d.length;g++)c=u(d[g].points||[],b);return c},getAxes:function(){var a=this,b=this.options,c=b.xAxis=g(b.xAxis||{}),b=b.yAxis=g(b.yAxis||{});h(c,function(a,b){a.index=b;a.isX=!0});h(b,function(a,b){a.index=b});c=c.concat(b);h(c,function(b){new p(a,b)})},getSelectedPoints:function(){var a=[];h(this.series,function(b){a=a.concat(f(b.data||
[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return f(this.series,function(a){return a.selected})},setTitle:function(a,b,c){var d=this,g=d.options,f;f=g.title=H(g.title,a);g=g.subtitle=H(g.subtitle,b);h([["title",a,f],["subtitle",b,g]],function(a,b){var c=a[0],g=d[c],f=a[1];a=a[2];g&&f&&(d[c]=g=g.destroy());a&&a.text&&!g&&(d[c]=d.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+c,zIndex:a.zIndex||4}).add(),d[c].update=function(a){d.setTitle(!b&&
a,b&&a)})});d.layOutTitles(c)},layOutTitles:function(a){var b=0,d,g=this.renderer,f=this.spacingBox;h(["title","subtitle"],function(a){var d=this[a],e=this.options[a];a="title"===a?-3:e.verticalAlign?0:b+2;var h;d&&(h=g.fontMetrics(h,d).b,d.css({width:(e.width||f.width+e.widthAdjust)+"px"}).align(c({y:a+h},e),!1,"spacingBox"),e.floating||e.verticalAlign||(b=Math.ceil(b+d.getBBox(e.useHTML).height)))},this);d=this.titleOffset!==b;this.titleOffset=b;!this.isDirtyBox&&d&&(this.isDirtyBox=d,this.hasRendered&&
C(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var c=this.options.chart,d=c.width,c=c.height,g=this.renderTo;n(d)||(this.containerWidth=b(g,"width"));n(c)||(this.containerHeight=b(g,"height"));this.chartWidth=Math.max(0,d||this.containerWidth||600);this.chartHeight=Math.max(0,a.relativeLength(c,this.chartWidth)||this.containerHeight||400)},temporaryDisplay:function(c){var d=this.renderTo;if(c)for(;d&&d.style;)d.hcOrigStyle&&(a.css(d,d.hcOrigStyle),delete d.hcOrigStyle),d=d.parentNode;
else for(;d&&d.style;)"none"===b(d,"display",!1)&&(d.hcOrigStyle={display:d.style.display,height:d.style.height,overflow:d.style.overflow},a.css(d,{display:"block",height:0,overflow:"hidden"}),d.style.setProperty&&d.style.setProperty("display","block","important")),d=d.parentNode},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var b,c=this.options,d=c.chart,g,f;b=this.renderTo;var h=a.uniqueKey(),m;b||(this.renderTo=b=d.renderTo);F(b)&&(this.renderTo=
b=E.getElementById(b));b||a.error(13,!0);g=A(D(b,"data-highcharts-chart"));k(g)&&l[g]&&l[g].hasRendered&&l[g].destroy();D(b,"data-highcharts-chart",this.index);b.innerHTML="";d.skipClone||b.offsetWidth||this.temporaryDisplay();this.getChartSize();g=this.chartWidth;f=this.chartHeight;this.container=b=e("div",{id:h},void 0,b);this._cursor=b.style.cursor;this.renderer=new (a[d.renderer]||S)(b,g,f,null,d.forExport,c.exporting&&c.exporting.allowHTML);this.setClassName(d.className);for(m in c.defs)this.renderer.definition(c.defs[m]);
this.renderer.chartIndex=this.index},getMargins:function(a){var b=this.spacing,c=this.margin,d=this.titleOffset;this.resetMargins();d&&!n(c[0])&&(this.plotTop=Math.max(this.plotTop,d+this.options.title.margin+b[0]));this.legend.display&&this.legend.adjustMargins(c,b);this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||0)+this.extraMargin.value);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=
[0,0,0,0],c=a.margin;a.hasCartesianSeries&&h(a.axes,function(a){a.visible&&a.getOffset()});h(z,function(d,g){n(c[g])||(a[d]+=b[g])});a.setChartSize()},reflow:function(a){var c=this,d=c.options.chart,g=c.renderTo,f=n(d.width),e=d.width||b(g,"width"),d=d.height||b(g,"height"),g=a?a.target:J;if(!f&&!c.isPrinting&&e&&d&&(g===J||g===E)){if(e!==c.containerWidth||d!==c.containerHeight)clearTimeout(c.reflowTimeout),c.reflowTimeout=N(function(){c.container&&c.setSize(void 0,void 0,!1)},a?100:0);c.containerWidth=
e;c.containerHeight=d}},initReflow:function(){var a=this,b;b=x(J,"resize",function(b){a.reflow(b)});x(a,"destroy",b)},setSize:function(b,c,d){var g=this,f=g.renderer;g.isResizing+=1;a.setAnimation(d,g);g.oldChartHeight=g.chartHeight;g.oldChartWidth=g.chartWidth;void 0!==b&&(g.options.chart.width=b);void 0!==c&&(g.options.chart.height=c);g.getChartSize();g.setChartSize(!0);f.setSize(g.chartWidth,g.chartHeight,d);h(g.axes,function(a){a.isDirty=!0;a.setScale()});g.isDirtyLegend=!0;g.isDirtyBox=!0;g.layOutTitles();
g.getMargins();g.redraw(d);g.oldChartHeight=null;v(g,"resize");N(function(){g&&v(g,"endResize",null,function(){--g.isResizing})},B(void 0).duration)},setChartSize:function(a){var b=this.inverted,c=this.renderer,d=this.chartWidth,g=this.chartHeight,f=this.options.chart,e=this.spacing,k=this.clipOffset,m,t,q,y;this.plotLeft=m=Math.round(this.plotLeft);this.plotTop=t=Math.round(this.plotTop);this.plotWidth=q=Math.max(0,Math.round(d-m-this.marginRight));this.plotHeight=y=Math.max(0,Math.round(g-t-this.marginBottom));
this.plotSizeX=b?y:q;this.plotSizeY=b?q:y;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:e[3],y:e[0],width:d-e[3]-e[1],height:g-e[0]-e[2]};this.plotBox=c.plotBox={x:m,y:t,width:q,height:y};d=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(Math.max(d,k[3])/2);c=Math.ceil(Math.max(d,k[0])/2);this.clipBox={x:b,y:c,width:Math.floor(this.plotSizeX-Math.max(d,k[1])/2-b),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(d,k[2])/2-c))};a||h(this.axes,function(a){a.setAxisSize();
a.setAxisTranslation()})},resetMargins:function(){var a=this,b=a.options.chart;h(["margin","spacing"],function(c){var d=b[c],g=m(d)?d:[d,d,d,d];h(["Top","Right","Bottom","Left"],function(d,f){a[c][f]=C(b[c+d],g[f])})});h(z,function(b,c){a[b]=C(a.margin[c],a.spacing[c])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,g=this.chartBackground,f=this.plotBackground,e=this.plotBorder,h,k,m=this.plotLeft,
q=this.plotTop,t=this.plotWidth,y=this.plotHeight,C=this.plotBox,A=this.clipRect,n=this.clipBox,l="animate";g||(this.chartBackground=g=b.rect().addClass("highcharts-background").add(),l="attr");h=k=g.strokeWidth();g[l]({x:k/2,y:k/2,width:c-k-h%2,height:d-k-h%2,r:a.borderRadius});l="animate";f||(l="attr",this.plotBackground=f=b.rect().addClass("highcharts-plot-background").add());f[l](C);A?A.animate({width:n.width,height:n.height}):this.clipRect=b.clipRect(n);l="animate";e||(l="attr",this.plotBorder=
e=b.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());e[l](e.crisp({x:m,y:q,width:t,height:y},-e.strokeWidth()));this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,g,f;h(["inverted","angular","polar"],function(e){c=L[b.type||b.defaultSeriesType];f=b[e]||c&&c.prototype[e];for(g=d&&d.length;!f&&g--;)(c=L[d[g].type])&&c.prototype[e]&&(f=!0);a[e]=f})},linkSeries:function(){var a=this,b=a.series;h(b,function(a){a.linkedSeries.length=0});h(b,
function(b){var c=b.options.linkedTo;F(c)&&(c=":previous"===c?a.series[b.index-1]:a.get(c))&&c.linkedParent!==b&&(c.linkedSeries.push(b),b.linkedParent=c,b.visible=C(b.options.visible,c.options.visible,b.visible))})},renderSeries:function(){h(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&h(b.items,function(d){var g=c(b.style,d.style),f=A(g.left)+a.plotLeft,e=A(g.top)+a.plotTop+12;delete g.left;delete g.top;a.renderer.text(d.html,
f,e).attr({zIndex:2}).css(g).add()})},render:function(){var a=this.axes,b=this.renderer,c=this.options,d,g,f;this.setTitle();this.legend=new I(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();c=this.plotWidth;d=this.plotHeight-=21;h(a,function(a){a.setScale()});this.getAxisMargins();g=1.1<c/this.plotWidth;f=1.05<d/this.plotHeight;if(g||f)h(a,function(a){(a.horiz&&g||!a.horiz&&f)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&
h(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=H(!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&&(J.location.href=a.href)}).attr({align:a.position.align,
zIndex:8}).add().align(a.position),this.credits.update=function(a){b.credits=b.credits.destroy();b.addCredits(a)})},destroy:function(){var b=this,c=b.axes,d=b.series,g=b.container,f,e=g&&g.parentNode;v(b,"destroy");b.renderer.forExport?a.erase(l,b):l[b.index]=void 0;a.chartCount--;b.renderTo.removeAttribute("data-highcharts-chart");y(b);for(f=c.length;f--;)c[f]=c[f].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(f=d.length;f--;)d[f]=d[f].destroy();h("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),
function(a){var c=b[a];c&&c.destroy&&(b[a]=c.destroy())});g&&(g.innerHTML="",y(g),e&&r(g));q(b,function(a,c){delete b[c]})},isReadyToRender:function(){var a=this;return t||J!=J.top||"complete"===E.readyState?!0:(E.attachEvent("onreadystatechange",function(){E.detachEvent("onreadystatechange",a.firstRender);"complete"===E.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,b=a.options;if(a.isReadyToRender()){a.getContainer();v(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();
a.getAxes();h(b.series||[],function(b){a.initSeries(b)});a.linkSeries();v(a,"beforeRender");G&&(a.pointer=new G(a,b));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){h([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);v(this,"load");v(this,"render");n(this.index)&&!1!==this.options.chart.reflow&&this.initReflow();this.onload=null}})})(K);(function(a){var x,B=a.each,D=a.extend,E=a.erase,p=a.fireEvent,
e=a.format,d=a.isArray,r=a.isNumber,l=a.pick,n=a.removeEvent;x=a.Point=function(){};x.prototype={init:function(a,c,d){var e=a.chart.options.chart.colorCount;this.series=a;this.applyOptions(c,d);a.options.colorByPoint?(c=a.colorCounter,a.colorCounter++,a.colorCounter===e&&(a.colorCounter=0)):c=a.colorIndex;this.colorIndex=l(this.colorIndex,c);a.chart.pointCount++;return this},applyOptions:function(a,c){var d=this.series,e=d.options.pointValKey||d.pointValKey;a=x.prototype.optionsToObject.call(this,
a);D(this,a);this.options=this.options?D(this.options,a):a;a.group&&delete this.group;e&&(this.y=this[e]);this.isNull=l(this.isValid&&!this.isValid(),null===this.x||!r(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===c&&d.xAxis&&d.xAxis.hasNames&&(this.x=d.xAxis.nameToX(this));void 0===this.x&&d&&(this.x=void 0===c?d.autoIncrement(this):c);return this},optionsToObject:function(a){var c={},e=this.series,h=e.options.keys,b=h||e.pointArrayMap||["y"],f=b.length,k=0,m=0;if(r(a)||
null===a)c[b[0]]=a;else if(d(a))for(!h&&a.length>f&&(e=typeof a[0],"string"===e?c.name=a[0]:"number"===e&&(c.x=a[0]),k++);m<f;)h&&void 0===a[k]||(c[b[m]]=a[k]),k++,m++;else"object"===typeof a&&(c=a,a.dataLabels&&(e._hasPointLabels=!0),a.marker&&(e._hasPointMarkers=!0));return c},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+
this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var a=this.series,c=a.zones,a=a.zoneAxis||"y",d=0,e;for(e=c[d];this[a]>=e.value;)e=c[++d];e&&e.color&&!this.options.color&&(this.color=e.color);return e},destroy:function(){var a=this.series.chart,c=a.hoverPoints,d;a.pointCount--;c&&(this.setState(),E(c,this),c.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();
if(this.graphic||this.dataLabel)n(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(d in this)this[d]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],c,d=6;d--;)c=a[d],this[c]&&(this[c]=this[c].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||
this.stackTotal}},tooltipFormatter:function(a){var c=this.series,d=c.tooltipOptions,h=l(d.valueDecimals,""),b=d.valuePrefix||"",f=d.valueSuffix||"";B(c.pointArrayMap||["y"],function(c){c="{point."+c;if(b||f)a=a.replace(c+"}",b+c+"}"+f);a=a.replace(c+"}",c+":,."+h+"f}")});return e(a,{point:this,series:this.series})},firePointEvent:function(a,c,d){var e=this,b=this.series.options;(b.point.events[a]||e.options&&e.options.events&&e.options.events[a])&&this.importEvents();"click"===a&&b.allowPointSelect&&
(d=function(a){e.select&&e.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});p(this,a,c,d)},visible:!0}})(K);(function(a){var x=a.addEvent,B=a.animObject,D=a.arrayMax,E=a.arrayMin,p=a.correctFloat,e=a.Date,d=a.defaultOptions,r=a.defined,l=a.each,n=a.erase,h=a.extend,c=a.fireEvent,u=a.grep,v=a.isArray,b=a.isNumber,f=a.isString,k=a.merge,m=a.objectEach,F=a.pick,I=a.removeEvent,z=a.splat,H=a.SVGElement,q=a.syncTimeout,G=a.win;a.Series=a.seriesType("line",null,{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},
events:{},marker:{radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:a.Point,sorted:!0,
requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var c=this,d,g=a.series,f;c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();h(c,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});d=b.events;m(d,function(a,b){x(c,b,a)});if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();l(c.parallelArrays,function(a){c[a+
"Data"]=[]});c.setData(b.data,!1);c.isCartesian&&(a.hasCartesianSeries=!0);g.length&&(f=g[g.length-1]);c._i=F(f&&f._i,-1)+1;a.orderSeries(this.insert(g))},insert:function(a){var c=this.options.index,d;if(b(c)){for(d=a.length;d--;)if(c>=F(a[d].options.index,a[d]._i)){a.splice(d+1,0,this);break}-1===d&&a.unshift(this);d+=1}else a.push(this);return F(d,a.length-1)},bindAxes:function(){var b=this,c=b.options,d=b.chart,f;l(b.axisTypes||[],function(g){l(d[g],function(a){f=a.options;if(c[g]===f.index||void 0!==
c[g]&&c[g]===f.id||void 0===c[g]&&0===f.index)b.insert(a.series),b[g]=a,a.isDirty=!0});b[g]||b.optionalAxis===g||a.error(18,!0)})},updateParallelArrays:function(a,c){var d=a.series,f=arguments,g=b(c)?function(b){var g="y"===b&&d.toYData?d.toYData(a):a[b];d[b+"Data"][c]=g}:function(a){Array.prototype[c].apply(d[a+"Data"],Array.prototype.slice.call(f,2))};l(d.parallelArrays,g)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,d=a.pointIntervalUnit,b=F(b,a.pointStart,0);this.pointInterval=
c=F(this.pointInterval,a.pointInterval,1);d&&(a=new e(b),"day"===d?a=+a[e.hcSetDate](a[e.hcGetDate]()+c):"month"===d?a=+a[e.hcSetMonth](a[e.hcGetMonth]()+c):"year"===d&&(a=+a[e.hcSetFullYear](a[e.hcGetFullYear]()+c)),c=a-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,c=b.options,f=c.plotOptions,g=(b.userOptions||{}).plotOptions||{},e=f[this.type];this.userOptions=a;b=k(e,f.series,a);this.tooltipOptions=k(d.tooltip,d.plotOptions.series&&d.plotOptions.series.tooltip,d.plotOptions[this.type].tooltip,
c.tooltip.userOptions,f.series&&f.series.tooltip,f[this.type].tooltip,a.tooltip);this.stickyTracking=F(a.stickyTracking,g[this.type]&&g[this.type].stickyTracking,g.series&&g.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:b.stickyTracking);null===e.marker&&delete b.marker;this.zoneAxis=b.zoneAxis;a=this.zones=(b.zones||[]).slice();!b.negativeColor&&!b.negativeFillColor||b.zones||a.push({value:b[this.zoneAxis+"Threshold"]||b.threshold||0,className:"highcharts-negative"});
a.length&&r(a[a.length-1].value)&&a.push({});return b},getCyclic:function(a,b,c){var d,g=this.chart,f=this.userOptions,e=a+"Index",h=a+"Counter",k=c?c.length:F(g.options.chart[a+"Count"],g[a+"Count"]);b||(d=F(f[e],f["_"+e]),r(d)||(g.series.length||(g[h]=0),f["_"+e]=d=g[h]%k,g[h]+=1),c&&(b=c[d]));void 0!==d&&(this[e]=d);this[a]=b},getColor:function(){this.getCyclic("color")},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,
setData:function(c,d,e,h){var g=this,k=g.points,m=k&&k.length||0,q,n=g.options,C=g.chart,A=null,y=g.xAxis,p=n.turboThreshold,u=this.xData,z=this.yData,r=(q=g.pointArrayMap)&&q.length;c=c||[];q=c.length;d=F(d,!0);if(!1!==h&&q&&m===q&&!g.cropped&&!g.hasGroupedData&&g.visible)l(c,function(a,b){k[b].update&&a!==n.data[b]&&k[b].update(a,!1,null,!1)});else{g.xIncrement=null;g.colorCounter=0;l(this.parallelArrays,function(a){g[a+"Data"].length=0});if(p&&q>p){for(e=0;null===A&&e<q;)A=c[e],e++;if(b(A))for(e=
0;e<q;e++)u[e]=this.autoIncrement(),z[e]=c[e];else if(v(A))if(r)for(e=0;e<q;e++)A=c[e],u[e]=A[0],z[e]=A.slice(1,r+1);else for(e=0;e<q;e++)A=c[e],u[e]=A[0],z[e]=A[1];else a.error(12)}else for(e=0;e<q;e++)void 0!==c[e]&&(A={series:g},g.pointClass.prototype.applyOptions.apply(A,[c[e]]),g.updateParallelArrays(A,e));f(z[0])&&a.error(14,!0);g.data=[];g.options.data=g.userOptions.data=c;for(e=m;e--;)k[e]&&k[e].destroy&&k[e].destroy();y&&(y.minRange=y.userMinRange);g.isDirty=C.isDirtyBox=!0;g.isDirtyData=
!!k;e=!1}"point"===n.legendType&&(this.processData(),this.generatePoints());d&&C.redraw(e)},processData:function(b){var c=this.xData,d=this.yData,f=c.length,g;g=0;var e,h,k=this.xAxis,m,q=this.options;m=q.cropThreshold;var n=this.getExtremesFromAll||q.getExtremesFromAll,l=this.isCartesian,q=k&&k.val2lin,C=k&&k.isLog,p,u;if(l&&!this.isDirty&&!k.isDirty&&!this.yAxis.isDirty&&!b)return!1;k&&(b=k.getExtremes(),p=b.min,u=b.max);if(l&&this.sorted&&!n&&(!m||f>m||this.forceCrop))if(c[f-1]<p||c[0]>u)c=[],
d=[];else if(c[0]<p||c[f-1]>u)g=this.cropData(this.xData,this.yData,p,u),c=g.xData,d=g.yData,g=g.start,e=!0;for(m=c.length||1;--m;)f=C?q(c[m])-q(c[m-1]):c[m]-c[m-1],0<f&&(void 0===h||f<h)?h=f:0>f&&this.requireSorting&&a.error(15);this.cropped=e;this.cropStart=g;this.processedXData=c;this.processedYData=d;this.closestPointRange=h},cropData:function(a,b,c,d){var g=a.length,f=0,e=g,h=F(this.cropShoulder,1),k;for(k=0;k<g;k++)if(a[k]>=c){f=Math.max(0,k-h);break}for(c=k;c<g;c++)if(a[c]>d){e=c+h;break}return{xData:a.slice(f,
e),yData:b.slice(f,e),start:f,end:e}},generatePoints:function(){var a=this.options,b=a.data,c=this.data,d,g=this.processedXData,f=this.processedYData,e=this.pointClass,h=g.length,k=this.cropStart||0,m,q=this.hasGroupedData,a=a.keys,n,l=[],p;c||q||(c=[],c.length=b.length,c=this.data=c);a&&q&&(this.options.keys=!1);for(p=0;p<h;p++)m=k+p,q?(n=(new e).init(this,[g[p]].concat(z(f[p]))),n.dataGroup=this.groupMap[p]):(n=c[m])||void 0===b[m]||(c[m]=n=(new e).init(this,b[m],g[p])),n&&(n.index=m,l[p]=n);this.options.keys=
a;if(c&&(h!==(d=c.length)||q))for(p=0;p<d;p++)p!==k||q||(p+=h),c[p]&&(c[p].destroyElements(),c[p].plotX=void 0);this.data=c;this.points=l},getExtremes:function(a){var c=this.yAxis,d=this.processedXData,f,g=[],e=0;f=this.xAxis.getExtremes();var h=f.min,k=f.max,m,q,n,l;a=a||this.stackedYData||this.processedYData||[];f=a.length;for(l=0;l<f;l++)if(q=d[l],n=a[l],m=(b(n,!0)||v(n))&&(!c.positiveValuesOnly||n.length||0<n),q=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(d[l]||q)>=
h&&(d[l]||q)<=k,m&&q)if(m=n.length)for(;m--;)null!==n[m]&&(g[e++]=n[m]);else g[e++]=n;this.dataMin=E(g);this.dataMax=D(g)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,c=a.stacking,d=this.xAxis,f=d.categories,g=this.yAxis,e=this.points,h=e.length,k=!!this.modifyValue,m=a.pointPlacement,q="between"===m||b(m),n=a.threshold,l=a.startFromThreshold?n:0,u,z,v,G,H=Number.MAX_VALUE;"between"===m&&(m=.5);b(m)&&(m*=F(a.pointRange||d.pointRange));for(a=
0;a<h;a++){var x=e[a],B=x.x,I=x.y;z=x.low;var E=c&&g.stacks[(this.negStacks&&I<(l?0:n)?"-":"")+this.stackKey],D;g.positiveValuesOnly&&null!==I&&0>=I&&(x.isNull=!0);x.plotX=u=p(Math.min(Math.max(-1E5,d.translate(B,0,0,0,1,m,"flags"===this.type)),1E5));c&&this.visible&&!x.isNull&&E&&E[B]&&(G=this.getStackIndicator(G,B,this.index),D=E[B],I=D.points[G.key],z=I[0],I=I[1],z===l&&G.key===E[B].base&&(z=F(n,g.min)),g.positiveValuesOnly&&0>=z&&(z=null),x.total=x.stackTotal=D.total,x.percentage=D.total&&x.y/
D.total*100,x.stackY=I,D.setOffset(this.pointXOffset||0,this.barW||0));x.yBottom=r(z)?g.translate(z,0,1,0,1):null;k&&(I=this.modifyValue(I,x));x.plotY=z="number"===typeof I&&Infinity!==I?Math.min(Math.max(-1E5,g.translate(I,0,1,0,1)),1E5):void 0;x.isInside=void 0!==z&&0<=z&&z<=g.len&&0<=u&&u<=d.len;x.clientX=q?p(d.translate(B,0,0,0,1,m)):u;x.negative=x.y<(n||0);x.category=f&&void 0!==f[x.x]?f[x.x]:x.x;x.isNull||(void 0!==v&&(H=Math.min(H,Math.abs(u-v))),v=u);x.zone=this.zones.length&&x.getZone()}this.closestPointRangePx=
H},getValidPoints:function(a,b){var c=this.chart;return u(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,d=b.renderer,g=b.inverted,f=this.clipBox,e=f||b.clipBox,h=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,e.height,c.xAxis,c.yAxis].join(),k=b[h],m=b[h+"m"];k||(a&&(e.width=0,b[h+"m"]=m=d.clipRect(-99,g?-b.plotLeft:-b.plotTop,99,g?b.chartWidth:b.chartHeight)),b[h]=k=d.clipRect(e),
k.count={length:0});a&&!k.count[this.index]&&(k.count[this.index]=!0,k.count.length+=1);!1!==c.clip&&(this.group.clip(a||f?k:b.clipRect),this.markerGroup.clip(m),this.sharedClipKey=h);a||(k.count[this.index]&&(delete k.count[this.index],--k.count.length),0===k.count.length&&h&&b[h]&&(f||(b[h]=b[h].destroy()),b[h+"m"]&&(b[h+"m"]=b[h+"m"].destroy())))},animate:function(a){var b=this.chart,c=B(this.options.animation),d;a?this.setClip(c):(d=this.sharedClipKey,(a=b[d])&&a.animate({width:b.plotSizeX},c),
b[d+"m"]&&b[d+"m"].animate({width:b.plotSizeX+99},c),this.animate=null)},afterAnimate:function(){this.setClip();c(this,"afterAnimate")},drawPoints:function(){var a=this.points,c=this.chart,d,f,g,e,h=this.options.marker,k,m,q,n,l=this[this.specialGroup]||this.markerGroup,p=F(h.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*h.radius);if(!1!==h.enabled||this._hasPointMarkers)for(f=0;f<a.length;f++)g=a[f],d=g.plotY,e=g.graphic,k=g.marker||{},m=!!g.marker,q=p&&void 0===k.enabled||k.enabled,
n=g.isInside,q&&b(d)&&null!==g.y?(d=F(k.symbol,this.symbol),g.hasImage=0===d.indexOf("url"),q=this.markerAttribs(g,g.selected&&"select"),e?e[n?"show":"hide"](!0).animate(q):n&&(0<q.width||g.hasImage)&&(g.graphic=e=c.renderer.symbol(d,q.x,q.y,q.width,q.height,m?k:h).add(l)),e&&e.addClass(g.getClassName(),!0)):e&&(g.graphic=e.destroy())},markerAttribs:function(a,b){var c=this.options.marker,d=a.marker||{},g=F(d.radius,c.radius);b&&(c=c.states[b],b=d.states&&d.states[b],g=F(b&&b.radius,c&&c.radius,g+
(c&&c.radiusPlus||0)));a.hasImage&&(g=0);a={x:Math.floor(a.plotX)-g,y:a.plotY-g};g&&(a.width=a.height=2*g);return a},destroy:function(){var a=this,b=a.chart,d=/AppleWebKit\/533/.test(G.navigator.userAgent),f,g,e=a.data||[],h,k;c(a,"destroy");I(a);l(a.axisTypes||[],function(b){(k=a[b])&&k.series&&(n(k.series,a),k.isDirty=k.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(g=e.length;g--;)(h=e[g])&&h.destroy&&h.destroy();a.points=null;clearTimeout(a.animationTimeout);m(a,function(a,
b){a instanceof H&&!a.survive&&(f=d&&"group"===b?"hide":"destroy",a[f]())});b.hoverSeries===a&&(b.hoverSeries=null);n(b.series,a);b.orderSeries();m(a,function(b,c){delete a[c]})},getGraphPath:function(a,b,c){var d=this,g=d.options,f=g.step,e,h=[],k=[],m;a=a||d.points;(e=a.reversed)&&a.reverse();(f={right:1,center:2}[f]||f&&3)&&e&&(f=4-f);!g.connectNulls||b||c||(a=this.getValidPoints(a));l(a,function(e,q){var n=e.plotX,l=e.plotY,p=a[q-1];(e.leftCliff||p&&p.rightCliff)&&!c&&(m=!0);e.isNull&&!r(b)&&
0<q?m=!g.connectNulls:e.isNull&&!b?m=!0:(0===q||m?q=["M",e.plotX,e.plotY]:d.getPointSpline?q=d.getPointSpline(a,e,q):f?(q=1===f?["L",p.plotX,l]:2===f?["L",(p.plotX+n)/2,p.plotY,"L",(p.plotX+n)/2,l]:["L",n,p.plotY],q.push("L",n,l)):q=["L",n,l],k.push(e.x),f&&k.push(e.x),h.push.apply(h,q),m=!1)});h.xMap=k;return d.graphPath=h},drawGraph:function(){var a=this,b=(this.gappedPath||this.getGraphPath).call(this),c=[["graph","highcharts-graph"]];l(this.zones,function(a,b){c.push(["zone-graph-"+b,"highcharts-graph highcharts-zone-graph-"+
b+" "+(a.className||"")])});l(c,function(c,d){d=c[0];var g=a[d];g?(g.endX=b.xMap,g.animate({d:b})):b.length&&(a[d]=a.chart.renderer.path(b).addClass(c[1]).attr({zIndex:1}).add(a.group));g&&(g.startX=b.xMap,g.isArea=b.isArea)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,d=this.zones,g,f,e=this.clips||[],h,k=this.graph,m=this.area,q=Math.max(b.chartWidth,b.chartHeight),n=this[(this.zoneAxis||"y")+"Axis"],p,u,z=b.inverted,r,v,G,H,x=!1;d.length&&(k||m)&&n&&void 0!==n.min&&(u=n.reversed,
r=n.horiz,k&&k.hide(),m&&m.hide(),p=n.getExtremes(),l(d,function(d,l){g=u?r?b.plotWidth:0:r?0:n.toPixels(p.min);g=Math.min(Math.max(F(f,g),0),q);f=Math.min(Math.max(Math.round(n.toPixels(F(d.value,p.max),!0)),0),q);x&&(g=f=n.toPixels(p.max));v=Math.abs(g-f);G=Math.min(g,f);H=Math.max(g,f);n.isXAxis?(h={x:z?H:G,y:0,width:v,height:q},r||(h.x=b.plotHeight-h.x)):(h={x:0,y:z?H:G,width:q,height:v},r&&(h.y=b.plotWidth-h.y));e[l]?e[l].animate(h):(e[l]=c.clipRect(h),k&&a["zone-graph-"+l].clip(e[l]),m&&a["zone-area-"+
l].clip(e[l]));x=d.value>p.max}),this.clips=e)},invertGroups:function(a){function b(){l(["group","markerGroup"],function(b){c[b]&&(d.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(a))})}var c=this,d=c.chart,g;c.xAxis&&(g=x(d,"resize",b),x(c,"destroy",g),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,d,g){var f=this[a],e=!f;e&&(this[a]=f=this.chart.renderer.g().attr({zIndex:d||.1}).add(g));f.addClass("highcharts-"+b+" highcharts-series-"+
this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||""),!0);f.attr({visibility:c})[e?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,d=a.options,g=!!a.animate&&b.renderer.isSVG&&B(d.animation).duration,f=a.visible?"inherit":
"hidden",e=d.zIndex,h=a.hasRendered,k=b.seriesGroup,m=b.inverted;c=a.plotGroup("group","series",f,e,k);a.markerGroup=a.plotGroup("markerGroup","markers",f,e,k);g&&a.animate(!0);c.inverted=a.isCartesian?m:!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(m);!1===d.clip||a.sharedClipKey||h||c.clip(b.clipRect);g&&a.animate();h||(a.animationTimeout=q(function(){a.afterAnimate()},
g));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,c=this.group,d=this.xAxis,g=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:F(d&&d.left,a.plotLeft),translateY:F(g&&g.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,d=this.yAxis,g=this.chart.inverted;return this.searchKDTree({clientX:g?c.len-a.chartY+
c.pos:a.chartX-c.pos,plotY:g?d.len-a.chartX+d.pos:a.chartY-d.pos},b)},buildKDTree:function(){function a(c,d,f){var g,e;if(e=c&&c.length)return g=b.kdAxisArray[d%f],c.sort(function(a,b){return a[g]-b[g]}),e=Math.floor(e/2),{point:c[e],left:a(c.slice(0,e),d+1,f),right:a(c.slice(e+1),d+1,f)}}this.buildingKdTree=!0;var b=this,c=-1<b.options.findNearestPointBy.indexOf("y")?2:1;delete b.kdTree;q(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),c,c);b.buildingKdTree=!1},b.options.kdNow?0:1)},
searchKDTree:function(a,b){function c(a,b,h,k){var m=b.point,q=d.kdAxisArray[h%k],n,l,p=m;l=r(a[g])&&r(m[g])?Math.pow(a[g]-m[g],2):null;n=r(a[f])&&r(m[f])?Math.pow(a[f]-m[f],2):null;n=(l||0)+(n||0);m.dist=r(n)?Math.sqrt(n):Number.MAX_VALUE;m.distX=r(l)?Math.sqrt(l):Number.MAX_VALUE;q=a[q]-m[q];n=0>q?"left":"right";l=0>q?"right":"left";b[n]&&(n=c(a,b[n],h+1,k),p=n[e]<p[e]?n:m);b[l]&&Math.sqrt(q*q)<p[e]&&(a=c(a,b[l],h+1,k),p=a[e]<p[e]?a:p);return p}var d=this,g=this.kdAxisArray[0],f=this.kdAxisArray[1],
e=b?"distX":"dist";b=-1<d.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||this.buildKDTree();if(this.kdTree)return c(a,this.kdTree,b,b)}})})(K);(function(a){function x(a,c,d,e,b){var f=a.chart.inverted;this.axis=a;this.isNegative=d;this.options=c;this.x=e;this.total=null;this.points={};this.stack=b;this.rightCliff=this.leftCliff=0;this.alignOptions={align:c.align||(f?d?"left":"right":"center"),verticalAlign:c.verticalAlign||(f?"middle":d?"bottom":"top"),y:n(c.y,f?4:d?
14:-6),x:n(c.x,f?d?-6:6:0)};this.textAlign=c.textAlign||(f?d?"right":"left":"center")}var B=a.Axis,D=a.Chart,E=a.correctFloat,p=a.defined,e=a.destroyObjectProperties,d=a.each,r=a.format,l=a.objectEach,n=a.pick;a=a.Series;x.prototype={destroy:function(){e(this,this.axis)},render:function(a){var c=this.options,d=c.format,d=d?r(d,this):c.formatter.call(this);this.label?this.label.attr({text:d,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(d,null,null,c.useHTML).css(c.style).attr({align:this.textAlign,
rotation:c.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,c){var d=this.axis,e=d.chart,b=e.inverted,f=d.reversed,f=this.isNegative&&!f||!this.isNegative&&f,k=d.translate(d.usePercentage?100:this.total,0,0,0,1),d=d.translate(0),d=Math.abs(k-d);a=e.xAxis[0].translate(this.x)+a;var h=e.plotHeight,b={x:b?f?k:k-d:a,y:b?h-a-c:f?h-k-d:h-k,width:b?d:c,height:b?c:d};if(c=this.label)c.align(this.alignOptions,null,b),b=c.alignAttr,c[!1===this.options.crop||e.isInsidePlot(b.x,b.y)?"show":"hide"](!0)}};
D.prototype.getStacks=function(){var a=this;d(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});d(a.series,function(c){!c.options.stacking||!0!==c.visible&&!1!==a.options.chart.ignoreHiddenSeries||(c.stackKey=c.type+n(c.options.stack,""))})};B.prototype.buildStacks=function(){var a=this.series,c,d=n(this.options.reversedStacks,!0),e=a.length,b;if(!this.isXAxis){this.usePercentage=!1;for(b=e;b--;)a[d?b:e-b-1].setStackedPoints();for(b=e;b--;)c=a[d?b:e-b-1],c.setStackCliffs&&
c.setStackCliffs();if(this.usePercentage)for(b=0;b<e;b++)a[b].setPercentStacks()}};B.prototype.renderStackTotals=function(){var a=this.chart,c=a.renderer,d=this.stacks,e=this.stackTotalGroup;e||(this.stackTotalGroup=e=c.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());e.translate(a.plotLeft,a.plotTop);l(d,function(a){l(a,function(a){a.render(e)})})};B.prototype.resetStacks=function(){var a=this,c=a.stacks;a.isXAxis||l(c,function(c){l(c,function(d,b){d.touched<a.stacksTouched?(d.destroy(),
delete c[b]):(d.total=null,d.cum=null)})})};B.prototype.cleanStacks=function(){var a;this.isXAxis||(this.oldStacks&&(a=this.stacks=this.oldStacks),l(a,function(a){l(a,function(a){a.cum=a.total})}))};a.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a=this.processedXData,c=this.processedYData,d=[],e=c.length,b=this.options,f=b.threshold,k=b.startFromThreshold?f:0,m=b.stack,b=b.stacking,l=this.stackKey,r="-"+
l,z=this.negStacks,H=this.yAxis,q=H.stacks,G=H.oldStacks,C,A,y,B,g,t,D;H.stacksTouched+=1;for(g=0;g<e;g++)t=a[g],D=c[g],C=this.getStackIndicator(C,t,this.index),B=C.key,y=(A=z&&D<(k?0:f))?r:l,q[y]||(q[y]={}),q[y][t]||(G[y]&&G[y][t]?(q[y][t]=G[y][t],q[y][t].total=null):q[y][t]=new x(H,H.options.stackLabels,A,t,m)),y=q[y][t],null!==D&&(y.points[B]=y.points[this.index]=[n(y.cum,k)],p(y.cum)||(y.base=B),y.touched=H.stacksTouched,0<C.index&&!1===this.singleStacks&&(y.points[B][0]=y.points[this.index+","+
t+",0"][0])),"percent"===b?(A=A?l:r,z&&q[A]&&q[A][t]?(A=q[A][t],y.total=A.total=Math.max(A.total,y.total)+Math.abs(D)||0):y.total=E(y.total+(Math.abs(D)||0))):y.total=E(y.total+(D||0)),y.cum=n(y.cum,k)+(D||0),null!==D&&(y.points[B].push(y.cum),d[g]=y.cum);"percent"===b&&(H.usePercentage=!0);this.stackedYData=d;H.oldStacks={}}};a.prototype.setPercentStacks=function(){var a=this,c=a.stackKey,e=a.yAxis.stacks,n=a.processedXData,b;d([c,"-"+c],function(c){for(var d=n.length,f,h;d--;)if(f=n[d],b=a.getStackIndicator(b,
f,a.index,c),f=(h=e[c]&&e[c][f])&&h.points[b.key])h=h.total?100/h.total:0,f[0]=E(f[0]*h),f[1]=E(f[1]*h),a.stackedYData[d]=f[1]})};a.prototype.getStackIndicator=function(a,c,d,e){!p(a)||a.x!==c||e&&a.key!==e?a={x:c,index:0,key:e}:a.index++;a.key=[d,c,a.index].join();return a}})(K);(function(a){var x=a.addEvent,B=a.Axis,D=a.createElement,E=a.css,p=a.defined,e=a.each,d=a.erase,r=a.extend,l=a.fireEvent,n=a.inArray,h=a.isNumber,c=a.isObject,u=a.isArray,v=a.merge,b=a.objectEach,f=a.pick,k=a.Point,m=a.Series,
F=a.seriesTypes,I=a.setAnimation,z=a.splat;r(a.Chart.prototype,{addSeries:function(a,b,c){var d,e=this;a&&(b=f(b,!0),l(e,"addSeries",{options:a},function(){d=e.initSeries(a);e.isDirtyLegend=!0;e.linkSeries();b&&e.redraw(c)}));return d},addAxis:function(a,b,c,d){var e=b?"xAxis":"yAxis",k=this.options;a=v(a,{index:this[e].length,isX:b});new B(this,a);k[e]=z(k[e]||{});k[e].push(a);f(c,!0)&&this.redraw(d)},showLoading:function(a){var b=this,c=b.options,d=b.loadingDiv,f=function(){d&&E(d,{left:b.plotLeft+
"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};d||(b.loadingDiv=d=D("div",{className:"highcharts-loading highcharts-loading-hidden"},null,b.container),b.loadingSpan=D("span",{className:"highcharts-loading-inner"},null,d),x(b,"redraw",f));d.className="highcharts-loading";b.loadingSpan.innerHTML=a||c.lang.loading;b.loadingShown=!0;f()},hideLoading:function(){var a=this.loadingDiv;a&&(a.className="highcharts-loading highcharts-loading-hidden");this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions tooltip".split(" "),update:function(a,c){var d=this,k={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},m=a.chart,q,l;if(m){v(!0,d.options.chart,m);"className"in m&&d.setClassName(m.className);if("inverted"in m||"polar"in m)d.propFromSeries(),q=!0;"alignTicks"in m&&(q=!0);b(m,function(a,b){-1!==n("chart."+b,d.propsRequireUpdateSeries)&&(l=!0);-1!==n(b,d.propsRequireDirtyBox)&&(d.isDirtyBox=
!0)})}a.plotOptions&&v(!0,this.options.plotOptions,a.plotOptions);b(a,function(a,b){if(d[b]&&"function"===typeof d[b].update)d[b].update(a,!1);else if("function"===typeof d[k[b]])d[k[b]](a);"chart"!==b&&-1!==n(b,d.propsRequireUpdateSeries)&&(l=!0)});e("xAxis yAxis zAxis series colorAxis pane".split(" "),function(b){a[b]&&e(z(a[b]),function(a,c){(c=p(a.id)&&d.get(a.id)||d[b][c])&&c.coll===b&&c.update(a,!1)})});q&&e(d.axes,function(a){a.update({},!1)});l&&e(d.series,function(a){a.update({},!1)});a.loading&&
v(!0,d.options.loading,a.loading);q=m&&m.width;m=m&&m.height;h(q)&&q!==d.chartWidth||h(m)&&m!==d.chartHeight?d.setSize(q,m):f(c,!0)&&d.redraw()},setSubtitle:function(a){this.setTitle(void 0,a)}});r(k.prototype,{update:function(a,b,d,e){function k(){h.applyOptions(a);null===h.y&&g&&(h.graphic=g.destroy());c(a,!0)&&(g&&g.element&&a&&a.marker&&a.marker.symbol&&(h.graphic=g.destroy()),a&&a.dataLabels&&h.dataLabel&&(h.dataLabel=h.dataLabel.destroy()));q=h.index;m.updateParallelArrays(h,q);l.data[q]=c(l.data[q],
!0)||c(a,!0)?h.options:a;m.isDirty=m.isDirtyData=!0;!m.fixedBox&&m.hasCartesianSeries&&(n.isDirtyBox=!0);"point"===l.legendType&&(n.isDirtyLegend=!0);b&&n.redraw(d)}var h=this,m=h.series,g=h.graphic,q,n=m.chart,l=m.options;b=f(b,!0);!1===e?k():h.firePointEvent("update",{options:a},k)},remove:function(a,b){this.series.removePoint(n(this,this.series.data),a,b)}});r(m.prototype,{addPoint:function(a,b,c,d){var e=this.options,k=this.data,h=this.chart,g=this.xAxis,g=g&&g.hasNames&&g.names,m=e.data,q,n,
l=this.xData,p,z;b=f(b,!0);q={series:this};this.pointClass.prototype.applyOptions.apply(q,[a]);z=q.x;p=l.length;if(this.requireSorting&&z<l[p-1])for(n=!0;p&&l[p-1]>z;)p--;this.updateParallelArrays(q,"splice",p,0,0);this.updateParallelArrays(q,p);g&&q.name&&(g[z]=q.name);m.splice(p,0,a);n&&(this.data.splice(p,0,null),this.processData());"point"===e.legendType&&this.generatePoints();c&&(k[0]&&k[0].remove?k[0].remove(!1):(k.shift(),this.updateParallelArrays(q,"shift"),m.shift()));this.isDirtyData=this.isDirty=
!0;b&&h.redraw(d)},removePoint:function(a,b,c){var d=this,e=d.data,k=e[a],h=d.points,g=d.chart,m=function(){h&&h.length===e.length&&h.splice(a,1);e.splice(a,1);d.options.data.splice(a,1);d.updateParallelArrays(k||{series:d},"splice",a,1);k&&k.destroy();d.isDirty=!0;d.isDirtyData=!0;b&&g.redraw()};I(c,g);b=f(b,!0);k?k.firePointEvent("remove",null,m):m()},remove:function(a,b,c){function d(){e.destroy();k.isDirtyLegend=k.isDirtyBox=!0;k.linkSeries();f(a,!0)&&k.redraw(b)}var e=this,k=e.chart;!1!==c?l(e,
"remove",null,d):d()},update:function(a,b){var c=this,d=c.chart,k=c.userOptions,h=c.oldType||c.type,m=a.type||k.type||d.options.chart.type,g=F[h].prototype,q=["group","markerGroup","dataLabelsGroup"],n;if(m&&m!==h||void 0!==a.zIndex)q.length=0;e(q,function(a){q[a]=c[a];delete c[a]});a=v(k,{animation:!1,index:c.index,pointStart:c.xData[0]},{data:c.options.data},a);c.remove(!1,null,!1);for(n in g)c[n]=void 0;r(c,F[m||h].prototype);e(q,function(a){c[a]=q[a]});c.init(d,a);c.oldType=h;d.linkSeries();f(b,
!0)&&d.redraw(!1)}});r(B.prototype,{update:function(a,b){var c=this.chart;a=c.options[this.coll][this.options.index]=v(this.userOptions,a);this.destroy(!0);this.init(c,r(a,{events:void 0}));c.isDirtyBox=!0;f(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,k=this.series,h=k.length;h--;)k[h]&&k[h].remove(!1);d(b.axes,this);d(b[c],this);u(b.options[c])?b.options[c].splice(this.options.index,1):delete b.options[c];e(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=
!0;f(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(K);(function(a){var x=a.each,B=a.map,D=a.pick,E=a.Series,p=a.seriesType;p("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var e=[],d=[],p=this.xAxis,l=this.yAxis,n=l.stacks[this.stackKey],h={},c=this.points,u=this.index,v=l.series,b=v.length,f,k=D(l.options.reversedStacks,!0)?1:-1,m;if(this.options.stacking){for(m=0;m<c.length;m++)h[c[m].x]=
c[m];a.objectEach(n,function(a,b){null!==a.total&&d.push(b)});d.sort(function(a,b){return a-b});f=B(v,function(){return this.visible});x(d,function(a,c){var z=0,r,q;if(h[a]&&!h[a].isNull)e.push(h[a]),x([-1,1],function(e){var l=1===e?"rightNull":"leftNull",p=0,z=n[d[c+e]];if(z)for(m=u;0<=m&&m<b;)r=z.points[m],r||(m===u?h[a][l]=!0:f[m]&&(q=n[a].points[m])&&(p-=q[1]-q[0])),m+=k;h[a][1===e?"rightCliff":"leftCliff"]=p});else{for(m=u;0<=m&&m<b;){if(r=n[a].points[m]){z=r[1];break}m+=k}z=l.translate(z,0,
1,0,1);e.push({isNull:!0,plotX:p.translate(a,0,0,0,1),x:a,plotY:z,yBottom:z})}})}return e},getGraphPath:function(a){var d=E.prototype.getGraphPath,e=this.options,l=e.stacking,n=this.yAxis,h,c,p=[],v=[],b=this.index,f,k=n.stacks[this.stackKey],m=e.threshold,x=n.getThreshold(e.threshold),B,e=e.connectNulls||"percent"===l,z=function(c,d,e){var h=a[c];c=l&&k[h.x].points[b];var q=h[e+"Null"]||0;e=h[e+"Cliff"]||0;var z,r,h=!0;e||q?(z=(q?c[0]:c[1])+e,r=c[0]+e,h=!!q):!l&&a[d]&&a[d].isNull&&(z=r=m);void 0!==
z&&(v.push({plotX:f,plotY:null===z?x:n.getThreshold(z),isNull:h,isCliff:!0}),p.push({plotX:f,plotY:null===r?x:n.getThreshold(r),doCurve:!1}))};a=a||this.points;l&&(a=this.getStackPoints());for(h=0;h<a.length;h++)if(c=a[h].isNull,f=D(a[h].rectPlotX,a[h].plotX),B=D(a[h].yBottom,x),!c||e)e||z(h,h-1,"left"),c&&!l&&e||(v.push(a[h]),p.push({x:h,plotX:f,plotY:B})),e||z(h,h+1,"right");h=d.call(this,v,!0,!0);p.reversed=!0;c=d.call(this,p,!0,!0);c.length&&(c[0]="L");c=h.concat(c);d=d.call(this,v,!1,e);c.xMap=
h.xMap;this.areaPath=c;return d},drawGraph:function(){this.areaPath=[];E.prototype.drawGraph.apply(this);var a=this,d=this.areaPath,p=this.options,l=[["area","highcharts-area"]];x(this.zones,function(a,d){l.push(["zone-area-"+d,"highcharts-area highcharts-zone-area-"+d+" "+a.className])});x(l,function(e){var h=e[0],c=a[h];c?(c.endX=d.xMap,c.animate({d:d})):(c=a[h]=a.chart.renderer.path(d).addClass(e[1]).attr({zIndex:0}).add(a.group),c.isArea=!0);c.startX=d.xMap;c.shiftUnit=p.step?2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);
(function(a){var x=a.pick;a=a.seriesType;a("spline","line",{},{getPointSpline:function(a,D,E){var p=D.plotX,e=D.plotY,d=a[E-1];E=a[E+1];var r,l,n,h;if(d&&!d.isNull&&!1!==d.doCurve&&!D.isCliff&&E&&!E.isNull&&!1!==E.doCurve&&!D.isCliff){a=d.plotY;n=E.plotX;E=E.plotY;var c=0;r=(1.5*p+d.plotX)/2.5;l=(1.5*e+a)/2.5;n=(1.5*p+n)/2.5;h=(1.5*e+E)/2.5;n!==r&&(c=(h-l)*(n-p)/(n-r)+e-h);l+=c;h+=c;l>a&&l>e?(l=Math.max(a,e),h=2*e-l):l<a&&l<e&&(l=Math.min(a,e),h=2*e-l);h>E&&h>e?(h=Math.max(E,e),l=2*e-h):h<E&&h<e&&
(h=Math.min(E,e),l=2*e-h);D.rightContX=n;D.rightContY=h}D=["C",x(d.rightContX,d.plotX),x(d.rightContY,d.plotY),x(r,p),x(l,e),p,e];d.rightContX=d.rightContY=null;return D}})})(K);(function(a){var x=a.seriesTypes.area.prototype,B=a.seriesType;B("areaspline","spline",a.defaultPlotOptions.area,{getStackPoints:x.getStackPoints,getGraphPath:x.getGraphPath,setStackCliffs:x.setStackCliffs,drawGraph:x.drawGraph,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);(function(a){var x=a.animObject,B=a.each,
D=a.extend,E=a.isNumber,p=a.merge,e=a.pick,d=a.Series,r=a.seriesType,l=a.svg;r("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){d.prototype.init.apply(this,
arguments);var a=this,e=a.chart;e.hasRendered&&B(e.series,function(c){c.type===a.type&&(c.isDirty=!0)})},getColumnMetrics:function(){var a=this,d=a.options,c=a.xAxis,l=a.yAxis,p=c.reversed,b,f={},k=0;!1===d.grouping?k=1:B(a.chart.series,function(c){var d=c.options,e=c.yAxis,h;c.type===a.type&&c.visible&&l.len===e.len&&l.pos===e.pos&&(d.stacking?(b=c.stackKey,void 0===f[b]&&(f[b]=k++),h=f[b]):!1!==d.grouping&&(h=k++),c.columnIndex=h)});var m=Math.min(Math.abs(c.transA)*(c.ordinalSlope||d.pointRange||
c.closestPointRange||c.tickInterval||1),c.len),r=m*d.groupPadding,x=(m-2*r)/(k||1),d=Math.min(d.maxPointWidth||c.len,e(d.pointWidth,x*(1-2*d.pointPadding)));a.columnMetrics={width:d,offset:(x-d)/2+(r+((a.columnIndex||0)+(p?1:0))*x-m/2)*(p?-1:1)};return a.columnMetrics},crispCol:function(a,d,c,e){var h=this.chart,b=this.borderWidth,f=-(b%2?.5:0),b=b%2?.5:1;h.inverted&&h.renderer.isVML&&(b+=1);this.options.crisp&&(c=Math.round(a+c)+f,a=Math.round(a)+f,c-=a);e=Math.round(d+e)+b;f=.5>=Math.abs(d)&&.5<
e;d=Math.round(d)+b;e-=d;f&&e&&(--d,e+=1);return{x:a,y:d,width:c,height:e}},translate:function(){var a=this,h=a.chart,c=a.options,l=a.dense=2>a.closestPointRange*a.xAxis.transA,l=a.borderWidth=e(c.borderWidth,l?0:1),p=a.yAxis,b=a.translatedThreshold=p.getThreshold(c.threshold),f=e(c.minPointLength,5),k=a.getColumnMetrics(),m=k.width,r=a.barW=Math.max(m,1+2*l),x=a.pointXOffset=k.offset;h.inverted&&(b-=.5);c.pointPadding&&(r=Math.ceil(r));d.prototype.translate.apply(a);B(a.points,function(c){var d=
e(c.yBottom,b),k=999+Math.abs(d),k=Math.min(Math.max(-k,c.plotY),p.len+k),l=c.plotX+x,n=r,z=Math.min(k,d),u,v=Math.max(k,d)-z;Math.abs(v)<f&&f&&(v=f,u=!p.reversed&&!c.negative||p.reversed&&c.negative,z=Math.abs(z-b)>f?d-f:b-(u?f:0));c.barX=l;c.pointWidth=m;c.tooltipPos=h.inverted?[p.len+p.pos-h.plotLeft-k,a.xAxis.len-l-n/2,v]:[l+n/2,k+p.pos-h.plotTop,v];c.shapeType="rect";c.shapeArgs=a.crispCol.apply(a,c.isNull?[l,b,n,0]:[l,z,n,v])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,
drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},drawPoints:function(){var a=this,d=this.chart,c=d.renderer,e=a.options.animationLimit||250,l;B(a.points,function(b){var f=b.graphic;if(E(b.plotY)&&null!==b.y){l=b.shapeArgs;if(f)f[d.pointCount<e?"animate":"attr"](p(l));else b.graphic=f=c[b.shapeType](l).add(b.group||a.group);f.addClass(b.getClassName(),!0)}else f&&(b.graphic=f.destroy())})},animate:function(a){var d=this,c=this.yAxis,e=d.options,n=this.chart.inverted,
b={};l&&(a?(b.scaleY=.001,a=Math.min(c.pos+c.len,Math.max(c.pos,c.toPixels(e.threshold))),n?b.translateX=a-c.len:b.translateY=a,d.group.attr(b)):(b[n?"translateX":"translateY"]=c.pos,d.group.animate(b,D(x(d.options.animation),{step:function(a,b){d.group.attr({scaleY:Math.max(.001,b.pos)})}})),d.animate=null))},remove:function(){var a=this,e=a.chart;e.hasRendered&&B(e.series,function(c){c.type===a.type&&(c.isDirty=!0)});d.prototype.remove.apply(a,arguments)}})})(K);(function(a){a=a.seriesType;a("bar",
"column",null,{inverted:!0})})(K);(function(a){var x=a.Series;a=a.seriesType;a("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e \x3cspan class\x3d"highcharts-header"\x3e {series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group",
"markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&x.prototype.drawGraph.call(this)}})})(K);(function(a){var x=a.pick,B=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,E=this.chart,p=2*(a.slicedOffset||0),e=E.plotWidth-2*p,E=E.plotHeight-2*p,d=a.center,d=[x(d[0],"50%"),x(d[1],"50%"),a.size||"100%",a.innerSize||0],r=Math.min(e,E),l,n;for(l=0;4>l;++l)n=d[l],a=2>l||2===l&&/%$/.test(n),d[l]=B(n,[e,E,r,d[2]][l])+(a?p:0);
d[3]>d[2]&&(d[3]=d[2]);return d}}})(K);(function(a){var x=a.addEvent,B=a.defined,D=a.each,E=a.extend,p=a.inArray,e=a.noop,d=a.pick,r=a.Point,l=a.Series,n=a.seriesType,h=a.setAnimation;n("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0}},{isCartesian:!1,
requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var c=this,d=c.points,b=c.startAngleRad;a||(D(d,function(a){var d=a.graphic,e=a.shapeArgs;d&&(d.attr({r:a.startR||c.center[3]/2,start:b,end:b}),d.animate({r:e.r,start:e.start,end:e.end},c.options.animation))}),c.animate=null)},updateTotals:function(){var a,d=0,e=this.points,b=e.length,f,k=this.options.ignoreHiddenPoint;
for(a=0;a<b;a++)f=e[a],d+=k&&!f.visible?0:f.isNull?0:f.y;this.total=d;for(a=0;a<b;a++)f=e[a],f.percentage=0<d&&(f.visible||!k)?f.y/d*100:0,f.total=d},generatePoints:function(){l.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var c=0,e=this.options,b=e.slicedOffset,f=b+(e.borderWidth||0),k,h,l,n=e.startAngle||0,p=this.startAngleRad=Math.PI/180*(n-90),n=(this.endAngleRad=Math.PI/180*(d(e.endAngle,n+360)-90))-p,r=this.points,q,G=e.dataLabels.distance,
e=e.ignoreHiddenPoint,C,A=r.length,y;a||(this.center=a=this.getCenter());this.getX=function(b,c,d){l=Math.asin(Math.min((b-a[1])/(a[2]/2+d.labelDistance),1));return a[0]+(c?-1:1)*Math.cos(l)*(a[2]/2+d.labelDistance)};for(C=0;C<A;C++){y=r[C];y.labelDistance=d(y.options.dataLabels&&y.options.dataLabels.distance,G);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,y.labelDistance);k=p+c*n;if(!e||y.visible)c+=y.percentage/100;h=p+c*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*h)/1E3};l=(h+k)/2;l>1.5*Math.PI?l-=2*Math.PI:l<-Math.PI/2&&(l+=2*Math.PI);y.slicedTranslation={translateX:Math.round(Math.cos(l)*b),translateY:Math.round(Math.sin(l)*b)};h=Math.cos(l)*a[2]/2;q=Math.sin(l)*a[2]/2;y.tooltipPos=[a[0]+.7*h,a[1]+.7*q];y.half=l<-Math.PI/2||l>Math.PI/2?1:0;y.angle=l;k=Math.min(f,y.labelDistance/5);y.labelPos=[a[0]+h+Math.cos(l)*y.labelDistance,a[1]+q+Math.sin(l)*y.labelDistance,a[0]+h+Math.cos(l)*k,a[1]+q+Math.sin(l)*k,a[0]+
h,a[1]+q,0>y.labelDistance?"center":y.half?"right":"left",l]}},drawGraph:null,drawPoints:function(){var a=this,d=a.chart.renderer,e,b,f;D(a.points,function(c){c.isNull||(b=c.graphic,f=c.shapeArgs,e=c.getTranslate(),b?b.setRadialReference(a.center).animate(E(f,e)):(c.graphic=b=d[c.shapeType](f).setRadialReference(a.center).attr(e).add(a.group),c.visible||b.attr({visibility:"hidden"})),b.addClass(c.getClassName()))})},searchPoint:e,sortByAngle:function(a,d){a.sort(function(a,b){return void 0!==a.angle&&
(b.angle-a.angle)*d})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:e},{init:function(){r.prototype.init.apply(this,arguments);var a=this,e;a.name=d(a.name,"Slice");e=function(c){a.slice("select"===c.type)};x(a,"select",e);x(a,"unselect",e);return a},isValid:function(){return a.isNumber(this.y,!0)&&0<=this.y},setVisible:function(a,e){var c=this,b=c.series,f=b.chart,k=b.options.ignoreHiddenPoint;e=d(e,k);a!==c.visible&&(c.visible=c.options.visible=
a=void 0===a?!c.visible:a,b.options.data[p(c,b.data)]=c.options,D(["graphic","dataLabel","connector","shadowGroup"],function(b){if(c[b])c[b][a?"show":"hide"](!0)}),c.legendItem&&f.legend.colorizeItem(c,a),a||"hover"!==c.state||c.setState(""),k&&(b.isDirty=!0),e&&f.redraw())},slice:function(a,e,l){var b=this.series;h(l,b.chart);d(e,!0);this.sliced=this.options.sliced=B(a)?a:!this.sliced;b.options.data[p(this,b.data)]=this.options;this.graphic.animate(this.getTranslate())},getTranslate:function(){return this.sliced?
this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var c=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.x,c.y,c.r+a,c.r+a,{innerR:this.shapeArgs.r,start:c.start,end:c.end})}})})(K);(function(a){var x=a.addEvent,B=a.arrayMax,D=a.defined,E=a.each,p=a.extend,e=a.format,d=a.map,r=a.merge,l=a.noop,n=a.pick,h=a.relativeLength,c=a.Series,u=a.seriesTypes,v=a.stableSort;a.distribute=function(a,c){function b(a,b){return a.target-b.target}var e,
f=!0,h=a,l=[],n;n=0;for(e=a.length;e--;)n+=a[e].size;if(n>c){v(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(n=e=0;n<=c;)n+=a[e].size,e++;l=a.splice(e-1,a.length)}v(a,b);for(a=d(a,function(a){return{size:a.size,targets:[a.target]}});f;){for(e=a.length;e--;)f=a[e],n=(Math.min.apply(0,f.targets)+Math.max.apply(0,f.targets))/2,f.pos=Math.min(Math.max(0,n-f.size/2),c-f.size);e=a.length;for(f=!1;e--;)0<e&&a[e-1].pos+a[e-1].size>a[e].pos&&(a[e-1].size+=a[e].size,a[e-1].targets=a[e-1].targets.concat(a[e].targets),
a[e-1].pos+a[e-1].size>c&&(a[e-1].pos=c-a[e-1].size),a.splice(e,1),f=!0)}e=0;E(a,function(a){var b=0;E(a.targets,function(){h[e].pos=a.pos+b;b+=h[e].size;e++})});h.push.apply(h,l);v(h,b)};c.prototype.drawDataLabels=function(){var b=this,c=b.options,d=c.dataLabels,h=b.points,l,p,z=b.hasRendered||0,u,q,v=n(d.defer,!0),C=b.chart.renderer;if(d.enabled||b._hasPointLabels)b.dlProcessOptions&&b.dlProcessOptions(d),q=b.plotGroup("dataLabelsGroup","data-labels",v&&!z?"hidden":"visible",d.zIndex||6),v&&(q.attr({opacity:+z}),
z||x(b,"afterAnimate",function(){b.visible&&q.show(!0);q[c.animation?"animate":"attr"]({opacity:1},{duration:200})})),p=d,E(h,function(c){var f,k=c.dataLabel,g,h,m=c.connector,z=!k;l=c.dlOptions||c.options&&c.options.dataLabels;if(f=n(l&&l.enabled,p.enabled)&&null!==c.y)d=r(p,l),g=c.getLabelConfig(),u=d.format?e(d.format,g):d.formatter.call(g,d),g=d.rotation,h={r:d.borderRadius||0,rotation:g,padding:d.padding,zIndex:1},a.objectEach(h,function(a,b){void 0===a&&delete h[b]});!k||f&&D(u)?f&&D(u)&&(k?
h.text=u:(k=c.dataLabel=C[g?"text":"label"](u,0,-9999,d.shape,null,null,d.useHTML,null,"data-label"),k.addClass("highcharts-data-label-color-"+c.colorIndex+" "+(d.className||"")+(d.useHTML?"highcharts-tracker":""))),k.attr(h),k.added||k.add(q),b.alignDataLabel(c,k,d,null,z)):(c.dataLabel=k=k.destroy(),m&&(c.connector=m.destroy()))})};c.prototype.alignDataLabel=function(a,c,d,e,h){var b=this.chart,f=b.inverted,k=n(a.plotX,-9999),l=n(a.plotY,-9999),m=c.getBBox(),r,u=d.rotation,y=d.align,v=this.visible&&
(a.series.forceDL||b.isInsidePlot(k,Math.round(l),f)||e&&b.isInsidePlot(k,f?e.x+1:e.y+e.height-1,f)),g="justify"===n(d.overflow,"justify");if(v&&(r=b.renderer.fontMetrics(void 0,c).b,e=p({x:f?b.plotWidth-l:k,y:Math.round(f?b.plotHeight-k:l),width:0,height:0},e),p(d,{width:m.width,height:m.height}),u?(g=!1,k=b.renderer.rotCorr(r,u),k={x:e.x+d.x+e.width/2+k.x,y:e.y+d.y+{top:0,middle:.5,bottom:1}[d.verticalAlign]*e.height},c[h?"attr":"animate"](k).attr({align:y}),l=(u+720)%360,l=180<l&&360>l,"left"===
y?k.y-=l?m.height:0:"center"===y?(k.x-=m.width/2,k.y-=m.height/2):"right"===y&&(k.x-=m.width,k.y-=l?0:m.height)):(c.align(d,null,e),k=c.alignAttr),g?a.isLabelJustified=this.justifyDataLabel(c,d,k,m,e,h):n(d.crop,!0)&&(v=b.isInsidePlot(k.x,k.y)&&b.isInsidePlot(k.x+m.width,k.y+m.height)),d.shape&&!u))c[h?"attr":"animate"]({anchorX:f?b.plotWidth-a.plotY:a.plotX,anchorY:f?b.plotHeight-a.plotX:a.plotY});v||(c.attr({y:-9999}),c.placed=!1)};c.prototype.justifyDataLabel=function(a,c,d,e,h,l){var b=this.chart,
f=c.align,k=c.verticalAlign,m,n,p=a.box?0:a.padding||0;m=d.x+p;0>m&&("right"===f?c.align="left":c.x=-m,n=!0);m=d.x+e.width-p;m>b.plotWidth&&("left"===f?c.align="right":c.x=b.plotWidth-m,n=!0);m=d.y+p;0>m&&("bottom"===k?c.verticalAlign="top":c.y=-m,n=!0);m=d.y+e.height-p;m>b.plotHeight&&("top"===k?c.verticalAlign="bottom":c.y=b.plotHeight-m,n=!0);n&&(a.placed=!l,a.align(c,null,h));return n};u.pie&&(u.pie.prototype.drawDataLabels=function(){var b=this,d=b.data,e,h=b.chart,l=b.options.dataLabels,p=n(l.connectorPadding,
10),r=n(l.connectorWidth,1),u=h.plotWidth,q=h.plotHeight,v,C=b.center,A=C[2]/2,y=C[1],x,g,t,N,J=[[],[]],K,M,P,Q,O=[0,0,0,0];b.visible&&(l.enabled||b._hasPointLabels)&&(E(d,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),c.prototype.drawDataLabels.apply(b),E(d,function(a){a.dataLabel&&a.visible&&(J[a.half].push(a),a.dataLabel._pos=null)}),E(J,function(c,d){var f,k,m=c.length,n=[],r;if(m)for(b.sortByAngle(c,
d-.5),0<b.maxLabelDistance&&(f=Math.max(0,y-A-b.maxLabelDistance),k=Math.min(y+A+b.maxLabelDistance,h.plotHeight),E(c,function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,y-A-a.labelDistance),a.bottom=Math.min(y+A+a.labelDistance,h.plotHeight),r=a.dataLabel.getBBox().height||21,a.positionsIndex=n.push({target:a.labelPos[1]-a.top+r/2,size:r,rank:a.y})-1)}),a.distribute(n,k+r-f)),Q=0;Q<m;Q++)e=c[Q],k=e.positionsIndex,t=e.labelPos,x=e.dataLabel,P=!1===e.visible?"hidden":"inherit",f=t[1],n&&
D(n[k])?void 0===n[k].pos?P="hidden":(N=n[k].size,M=e.top+n[k].pos):M=f,delete e.positionIndex,K=l.justify?C[0]+(d?-1:1)*(A+e.labelDistance):b.getX(M<e.top+2||M>e.bottom-2?f:M,d,e),x._attr={visibility:P,align:t[6]},x._pos={x:K+l.x+({left:p,right:-p}[t[6]]||0),y:M+l.y-10},t.x=K,t.y=M,null===b.options.size&&(g=x.getBBox().width,f=null,K-g<p?(f=Math.round(g-K+p),O[3]=Math.max(f,O[3])):K+g>u-p&&(f=Math.round(K+g-u+p),O[1]=Math.max(f,O[1])),0>M-N/2?O[0]=Math.max(Math.round(-M+N/2),O[0]):M+N/2>q&&(O[2]=
Math.max(Math.round(M+N/2-q),O[2])),x.sideOverflow=f)}),0===B(O)||this.verifyDataLabelOverflow(O))&&(this.placeDataLabels(),r&&E(this.points,function(a){var c;v=a.connector;if((x=a.dataLabel)&&x._pos&&a.visible&&0<a.labelDistance){P=x._attr.visibility;if(c=!v)a.connector=v=h.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex).add(b.dataLabelsGroup);v[c?"attr":"animate"]({d:b.connectorPath(a.labelPos)});v.attr("visibility",P)}else v&&(a.connector=v.destroy())}))},
u.pie.prototype.connectorPath=function(a){var b=a.x,c=a.y;return n(this.options.dataLabels.softConnector,!0)?["M",b+("left"===a[6]?5:-5),c,"C",b,c,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],"L",a[4],a[5]]:["M",b+("left"===a[6]?5:-5),c,"L",a[2],a[3],"L",a[4],a[5]]},u.pie.prototype.placeDataLabels=function(){E(this.points,function(a){var b=a.dataLabel;b&&a.visible&&((a=b._pos)?(b.sideOverflow&&(b._attr.width=b.getBBox().width-b.sideOverflow,b.css({width:b._attr.width+"px",textOverflow:"ellipsis"}),b.shortened=
!0),b.attr(b._attr),b[b.moved?"animate":"attr"](a),b.moved=!0):b&&b.attr({y:-9999}))},this)},u.pie.prototype.alignDataLabel=l,u.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,d=c.center,e=c.minSize||80,l,n;null!==d[0]?l=Math.max(b[2]-Math.max(a[1],a[3]),e):(l=Math.max(b[2]-a[1]-a[3],e),b[0]+=(a[3]-a[1])/2);null!==d[1]?l=Math.max(Math.min(l,b[2]-Math.max(a[0],a[2])),e):(l=Math.max(Math.min(l,b[2]-a[0]-a[2]),e),b[1]+=(a[0]-a[2])/2);l<b[2]?(b[2]=l,b[3]=Math.min(h(c.innerSize||
0,l),l),this.translate(b),this.drawDataLabels&&this.drawDataLabels()):n=!0;return n});u.column&&(u.column.prototype.alignDataLabel=function(a,d,e,h,l){var b=this.chart.inverted,f=a.series,k=a.dlBox||a.shapeArgs,m=n(a.below,a.plotY>n(this.translatedThreshold,f.yAxis.len)),p=n(e.inside,!!this.options.stacking);k&&(h=r(k),0>h.y&&(h.height+=h.y,h.y=0),k=h.y+h.height-f.yAxis.len,0<k&&(h.height-=k),b&&(h={x:f.yAxis.len-h.y-h.height,y:f.xAxis.len-h.x-h.width,width:h.height,height:h.width}),p||(b?(h.x+=m?
0:h.width,h.width=0):(h.y+=m?h.height:0,h.height=0)));e.align=n(e.align,!b||p?"center":m?"right":"left");e.verticalAlign=n(e.verticalAlign,b||p?"middle":m?"top":"bottom");c.prototype.alignDataLabel.call(this,a,d,e,h,l);a.isLabelJustified&&a.contrastColor&&a.dataLabel.css({color:a.contrastColor})})})(K);(function(a){var x=a.Chart,B=a.each,D=a.pick,E=a.addEvent;x.prototype.callbacks.push(function(a){function e(){var d=[];B(a.series||[],function(a){var e=a.options.dataLabels,n=a.dataLabelCollections||
["dataLabel"];(e.enabled||a._hasPointLabels)&&!e.allowOverlap&&a.visible&&B(n,function(e){B(a.points,function(a){a[e]&&(a[e].labelrank=D(a.labelrank,a.shapeArgs&&a.shapeArgs.height),d.push(a[e]))})})});a.hideOverlappingLabels(d)}e();E(a,"redraw",e)});x.prototype.hideOverlappingLabels=function(a){var e=a.length,d,p,l,n,h,c,u,v,b,f=function(a,b,c,d,e,f,h,l){return!(e>a+c||e+h<a||f>b+d||f+l<b)};for(p=0;p<e;p++)if(d=a[p])d.oldOpacity=d.opacity,d.newOpacity=1;a.sort(function(a,b){return(b.labelrank||0)-
(a.labelrank||0)});for(p=0;p<e;p++)for(l=a[p],d=p+1;d<e;++d)if(n=a[d],l&&n&&l!==n&&l.placed&&n.placed&&0!==l.newOpacity&&0!==n.newOpacity&&(h=l.alignAttr,c=n.alignAttr,u=l.parentGroup,v=n.parentGroup,b=2*(l.box?0:l.padding),h=f(h.x+u.translateX,h.y+u.translateY,l.width-b,l.height-b,c.x+v.translateX,c.y+v.translateY,n.width-b,n.height-b)))(l.labelrank<n.labelrank?l:n).newOpacity=0;B(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==c&&a.placed&&(c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=
c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)),a.isOld=!0)})}})(K);(function(a){var x=a.addEvent,B=a.Chart,D=a.createElement,E=a.css,p=a.defaultOptions,e=a.defaultPlotOptions,d=a.each,r=a.extend,l=a.fireEvent,n=a.hasTouch,h=a.inArray,c=a.isObject,u=a.Legend,v=a.merge,b=a.pick,f=a.Point,k=a.Series,m=a.seriesTypes,F=a.svg,I;I=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart.pointer,c=function(a){var c=b.getPointFromEvent(a);if(void 0!==c)c.onMouseOver(a)};d(a.points,function(a){a.graphic&&
(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.div?a.dataLabel.div.point=a:a.dataLabel.element.point=a)});a._hasTracking||(d(a.trackerGroups,function(d){if(a[d]&&(a[d].addClass("highcharts-tracker").on("mouseover",c).on("mouseout",function(a){b.onTrackerMouseOut(a)}),n))a[d].on("touchstart",c)}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options.trackByArea,c=[].concat(b?a.areaPath:a.graphPath),e=c.length,f=a.chart,h=f.pointer,k=f.renderer,l=f.options.tooltip.snap,g=a.tracker,
m,p=function(){if(f.hoverSeries!==a)a.onMouseOver()},r="rgba(192,192,192,"+(F?.0001:.002)+")";if(e&&!b)for(m=e+1;m--;)"M"===c[m]&&c.splice(m+1,0,c[m+1]-l,c[m+2],"L"),(m&&"M"===c[m]||m===e)&&c.splice(m,0,"L",c[m-2]+l,c[m-1]);g?g.attr({d:c}):a.graph&&(a.tracker=k.path(c).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:r,fill:b?r:"none","stroke-width":a.graph.strokeWidth()+(b?0:2*l),zIndex:2}).add(a.group),d([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",
p).on("mouseout",function(a){h.onTrackerMouseOut(a)});if(n)a.on("touchstart",p)}))}};m.column&&(m.column.prototype.drawTracker=I.drawTrackerPoint);m.pie&&(m.pie.prototype.drawTracker=I.drawTrackerPoint);m.scatter&&(m.scatter.prototype.drawTracker=I.drawTrackerPoint);r(u.prototype,{setItemEvents:function(a,b,c){var d=this.chart.renderer.boxWrapper,e="highcharts-legend-"+(a.series?"point":"series")+"-active";(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");d.addClass(e)}).on("mouseout",
function(){d.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):l(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=D("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);x(a.checkbox,"click",function(b){l(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});
r(B.prototype,{showResetZoom:function(){var a=this,b=p.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;l(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var e,f=this.pointer,h=
!1,k;!a||a.resetSelection?d(this.axes,function(a){e=a.zoom()}):d(a.xAxis.concat(a.yAxis),function(a){var b=a.axis;f[b.isXAxis?"zoomX":"zoomY"]&&(e=b.zoom(a.min,a.max),b.displayBtn&&(h=!0))});k=this.resetZoomButton;h&&!k?this.showResetZoom():!h&&c(k)&&(this.resetZoomButton=k.destroy());e&&this.redraw(b(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,e=c.hoverPoints,f;e&&d(e,function(a){a.setState()});d("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];
var d=b.horiz,e=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",g=c[d],h=(b.pointRange||0)/2,k=b.getExtremes(),l=b.toValue(g-e,!0)+h,h=b.toValue(g+b.len-e,!0)-h,m=h<l,g=m?h:l,l=m?l:h,h=Math.min(k.dataMin,b.toValue(b.toPixels(k.min)-b.minPixelPadding)),m=Math.max(k.dataMax,b.toValue(b.toPixels(k.max)+b.minPixelPadding)),n;n=h-g;0<n&&(l+=n,g=h);n=l-m;0<n&&(l=m,g-=n);b.series.length&&g!==k.min&&l!==k.max&&(b.setExtremes(g,l,!1,!1,{trigger:"pan"}),f=!0);c[d]=e});f&&c.redraw(!1);E(c.container,{cursor:"move"})}});
r(f.prototype,{select:function(a,c){var e=this,f=e.series,k=f.chart;a=b(a,!e.selected);e.firePointEvent(a?"select":"unselect",{accumulate:c},function(){e.selected=e.options.selected=a;f.options.data[h(e,f.data)]=e.options;e.setState(a&&"select");c||d(k.getSelectedPoints(),function(a){a.selected&&a!==e&&(a.selected=a.options.selected=!1,f.options.data[h(a,f.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a){var b=this.series.chart.pointer;this.firePointEvent("mouseOver");
b.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart;this.firePointEvent("mouseOut");d(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var b=this,c=v(b.series.options.point,b.options).events;b.events=c;a.objectEach(c,function(a,c){x(b,c,a)});this.hasImportedEvents=!0}},setState:function(a,c){var d=Math.floor(this.plotX),f=this.plotY,h=this.series,k=h.options.states[a]||{},l=e[h.type].marker&&h.options.marker,
m=l&&!1===l.enabled,g=l&&l.states&&l.states[a]||{},n=!1===g.enabled,p=h.stateMarkerGraphic,r=this.marker||{},u=h.chart,v=h.halo,z,x=l&&h.markerAttribs;a=a||"";if(!(a===this.state&&!c||this.selected&&"select"!==a||!1===k.enabled||a&&(n||m&&!1===g.enabled)||a&&r.states&&r.states[a]&&!1===r.states[a].enabled)){x&&(z=h.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+this.state),a&&this.graphic.addClass("highcharts-point-"+a),z&&this.graphic.animate(z,b(u.options.chart.animation,
g.animation,l.animation)),p&&p.hide();else{if(a&&g)if(l=r.symbol||h.symbol,p&&p.currentSymbol!==l&&(p=p.destroy()),p)p[c?"animate":"attr"]({x:z.x,y:z.y});else l&&(h.stateMarkerGraphic=p=u.renderer.symbol(l,z.x,z.y,z.width,z.height).add(h.markerGroup),p.currentSymbol=l);p&&(p[a&&u.isInsidePlot(d,f,u.inverted)?"show":"hide"](),p.element.point=this)}(d=k.halo)&&d.size?(v||(h.halo=v=u.renderer.path().add(x?h.markerGroup:h.group)),v[c?"animate":"attr"]({d:this.haloPath(d.size)}),v.attr({"class":"highcharts-halo highcharts-color-"+
b(this.colorIndex,h.colorIndex)}),v.point=this):v&&v.point&&v.point.haloPath&&v.animate({d:v.point.haloPath(0)});this.state=a}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)}});r(k.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&l(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&&l(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this;a=a||"";b.state!==a&&(d([b.group,b.markerGroup,b.dataLabelsGroup],function(c){c&&(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a)},setVisible:function(a,b){var c=this,e=c.chart,f=c.legendItem,h,k=e.options.chart.ignoreHiddenSeries,
m=c.visible;h=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!m:a)?"show":"hide";d(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][h]()});if(e.hoverSeries===c||(e.hoverPoint&&e.hoverPoint.series)===c)c.onMouseOut();f&&e.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&d(e.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});d(c.linkedSeries,function(b){b.setVisible(a,!1)});k&&(e.isDirtyBox=!0);!1!==b&&e.redraw();l(c,h)},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);l(this,a?"select":"unselect")},drawTracker:I.drawTrackerGraph})})(K);(function(a){var x=a.Chart,B=a.each,D=a.inArray,E=a.isArray,p=a.isObject,e=a.pick,d=a.splat;x.prototype.setResponsive=function(d){var e=this.options.responsive,n=[],h=this.currentResponsive;e&&e.rules&&B(e.rules,function(c){void 0===c._id&&(c._id=a.uniqueKey());this.matchResponsiveRule(c,n,
d)},this);var c=a.merge.apply(0,a.map(n,function(c){return a.find(e.rules,function(a){return a._id===c}).chartOptions})),n=n.toString()||void 0;n!==(h&&h.ruleIds)&&(h&&this.update(h.undoOptions,d),n?(this.currentResponsive={ruleIds:n,mergedOptions:c,undoOptions:this.currentOptions(c)},this.update(c,d)):this.currentResponsive=void 0)};x.prototype.matchResponsiveRule=function(a,d){var l=a.condition;(l.callback||function(){return this.chartWidth<=e(l.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=e(l.maxHeight,
Number.MAX_VALUE)&&this.chartWidth>=e(l.minWidth,0)&&this.chartHeight>=e(l.minHeight,0)}).call(this)&&d.push(a._id)};x.prototype.currentOptions=function(e){function l(e,c,n,r){var b;a.objectEach(e,function(a,h){if(!r&&-1<D(h,["series","xAxis","yAxis"]))for(e[h]=d(e[h]),n[h]=[],b=0;b<e[h].length;b++)c[h][b]&&(n[h][b]={},l(a[b],c[h][b],n[h][b],r+1));else p(a)?(n[h]=E(a)?[]:{},l(a,c[h]||{},n[h],r+1)):n[h]=c[h]||null})}var n={};l(e,this.options,n,0);return n}})(K);return K});
