/*
 Highcharts JS v6.0.4 (2017-12-15)

 (c) 2009-2016 Torstein Honsi

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