Updated Charts JavaScript

This commit is contained in:
iobridge 2011-09-02 01:37:55 -04:00
parent 8c04542876
commit 7125313289

View File

@ -1,162 +1,172 @@
/*
Highcharts JS v2.1.3 (2011-02-07)
Highcharts JS v2.1.6 (2011-07-08)
(c) 2009-2010 Torstein H?nsi
(c) 2009-2011 Torstein H?nsi
License: www.highcharts.com/license
*/
(function(){function oa(a,b){a||(a={});for(var c in b)a[c]=b[c];return a}function pa(a,b){return parseInt(a,b||10)}function Jb(a){return typeof a=="string"}function Db(a){return typeof a=="object"}function ac(a){return typeof a=="number"}function mc(a,b){for(var c=a.length;c--;)if(a[c]==b){a.splice(c,1);break}}function I(a){return a!==Ra&&a!==null}function ya(a,b,c){var d,e;if(Jb(b))if(I(c))a.setAttribute(b,c);else{if(a&&a.getAttribute)e=a.getAttribute(b)}else if(I(b)&&Db(b))for(d in b)a.setAttribute(d,
b[d]);return e}function nc(a){if(!a||a.constructor!=Array)a=[a];return a}function y(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++){c=a[b];if(typeof c!=="undefined"&&c!==null)return c}}function Wd(a){var b="",c;for(c in a)b+=Ad(c)+":"+a[c]+";";return b}function Ia(a,b){if(Ac)if(b&&b.opacity!==Ra)b.filter="alpha(opacity="+b.opacity*100+")";oa(a.style,b)}function fb(a,b,c,d,e){a=za.createElement(a);b&&oa(a,b);e&&Ia(a,{padding:0,border:mb,margin:0});c&&Ia(a,c);d&&d.appendChild(a);return a}function bc(a,
b){Bc=y(a,b.animation)}function Bd(){var a=Sa.global.useUTC;Cc=a?Date.UTC:function(b,c,d,e,f,g){return(new Date(b,c,y(d,1),y(e,0),y(f,0),y(g,0))).getTime()};$c=a?"getUTCMinutes":"getMinutes";ad=a?"getUTCHours":"getHours";bd=a?"getUTCDay":"getDay";oc=a?"getUTCDate":"getDate";Dc=a?"getUTCMonth":"getMonth";Ec=a?"getUTCFullYear":"getFullYear";Cd=a?"setUTCMinutes":"setMinutes";Dd=a?"setUTCHours":"setHours";cd=a?"setUTCDate":"setDate";Ed=a?"setUTCMonth":"setMonth";Fd=a?"setUTCFullYear":"setFullYear"}function Fc(a){Gc||
(Gc=fb(Kb));a&&Gc.appendChild(a);Gc.innerHTML=""}function wb(a,b){var c=function(){};c.prototype=new a;oa(c.prototype,b);return c}function Gd(a,b,c,d){var e=Sa.lang;a=a;var f=isNaN(b=cb(b))?2:b;b=c===undefined?e.decimalPoint:c;d=d===undefined?e.thousandsSep:d;e=a<0?"-":"";c=pa(a=cb(+a||0).toFixed(f))+"";var g=(g=c.length)>3?g%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+cb(a-c).toFixed(f).slice(2):"")}function Hc(){}function Hd(a,b){function c(m,h){function x(k,
p){this.pos=k;this.minor=p;this.isNew=true;p||this.addLabel()}function w(k){if(k){this.options=k;this.id=k.id}return this}function O(){var k=[],p=[],r;Ta=u=null;$=[];t(Ba,function(o){r=false;t(["xAxis","yAxis"],function(la){if(o.isCartesian&&(la=="xAxis"&&ma||la=="yAxis"&&!ma)&&(o.options[la]==h.index||o.options[la]===Ra&&h.index===0)){o[la]=s;$.push(o);r=true}});if(!o.visible&&v.ignoreHiddenSeries)r=false;if(r){var T,Z,G,B,ha;if(!ma){T=o.options.stacking;Ic=T=="percent";if(T){B=o.type+y(o.options.stack,
"");ha="-"+B;o.stackKey=B;Z=k[B]||[];k[B]=Z;G=p[ha]||[];p[ha]=G}if(Ic){Ta=0;u=99}}if(o.isCartesian){t(o.data,function(la){var C=la.x,na=la.y,S=na<0,aa=S?G:Z;S=S?ha:B;if(Ta===null)Ta=u=la[H];if(ma)if(C>u)u=C;else{if(C<Ta)Ta=C}else if(I(na)){if(T)aa[C]=I(aa[C])?aa[C]+na:na;na=aa?aa[C]:na;la=y(la.low,na);if(!Ic)if(na>u)u=na;else if(la<Ta)Ta=la;if(T){fa[S]||(fa[S]={});fa[S][C]={total:na,cum:na}}}});if(/(area|column|bar)/.test(o.type)&&!ma)if(Ta>=0){Ta=0;Id=true}else if(u<0){u=0;Jd=true}}}})}function ia(k,
p){var r;Eb=p?1:Ua.pow(10,Lb(Ua.log(k)/Ua.LN10));r=k/Eb;if(!p){p=[1,2,2.5,5,10];if(h.allowDecimals===false)if(Eb==1)p=[1,2,5,10];else if(Eb<=0.1)p=[1/Eb]}for(var o=0;o<p.length;o++){k=p[o];if(r<=(p[o]+(p[o+1]||p[o]))/2)break}k*=Eb;return k}function L(k){var p;p=k;if(I(Eb)){p=(Eb<1?U(1/Eb):1)*10;p=U(k*p)/p}return p}function ga(){var k,p,r,o,T=h.tickInterval,Z=h.tickPixelInterval;k=h.maxZoom||(ma?nb(m.smallestInterval*5,u-Ta):null);A=M?Aa:ta;if(Mb){r=m[ma?"xAxis":"yAxis"][h.linkedTo];o=r.getExtremes();
K=y(o.min,o.dataMin);P=y(o.max,o.dataMax)}else{K=y(qa,h.min,Ta);P=y(Na,h.max,u)}if(P-K<k){o=(k-P+K)/2;K=Da(K-o,y(h.min,K-o),Ta);P=nb(K+k,y(h.max,K+k),u)}if(!Va&&!Ic&&!Mb&&I(K)&&I(P)){k=P-K||1;if(!I(h.min)&&!I(qa)&&Vb&&(Ta<0||!Id))K-=k*Vb;if(!I(h.max)&&!I(Na)&&Kd&&(u>0||!Jd))P+=k*Kd}Wa=K==P?1:Mb&&!T&&Z==r.options.tickPixelInterval?r.tickInterval:y(T,Va?1:(P-K)*Z/A);if(!N&&!I(h.tickInterval))Wa=ia(Wa);s.tickInterval=Wa;Jc=h.minorTickInterval==="auto"&&Wa?Wa/5:h.minorTickInterval;if(N){ra=[];T=Sa.global.useUTC;
var G=1E3/ob,B=6E4/ob,ha=36E5/ob;Z=864E5/ob;k=6048E5/ob;o=2592E6/ob;var la=31556952E3/ob,C=[["second",G,[1,2,5,10,15,30]],["minute",B,[1,2,5,10,15,30]],["hour",ha,[1,2,3,4,6,8,12]],["day",Z,[1,2]],["week",k,[1,2]],["month",o,[1,2,3,4,6]],["year",la,null]],na=C[6],S=na[1],aa=na[2];for(r=0;r<C.length;r++){na=C[r];S=na[1];aa=na[2];if(C[r+1])if(Wa<=(S*aa[aa.length-1]+C[r+1][1])/2)break}if(S==la&&Wa<5*S)aa=[1,2,5];C=ia(Wa/S,aa);aa=new Date(K*ob);aa.setMilliseconds(0);if(S>=G)aa.setSeconds(S>=B?0:C*Lb(aa.getSeconds()/
C));if(S>=B)aa[Cd](S>=ha?0:C*Lb(aa[$c]()/C));if(S>=ha)aa[Dd](S>=Z?0:C*Lb(aa[ad]()/C));if(S>=Z)aa[cd](S>=o?1:C*Lb(aa[oc]()/C));if(S>=o){aa[Ed](S>=la?0:C*Lb(aa[Dc]()/C));p=aa[Ec]()}if(S>=la){p-=p%C;aa[Fd](p)}S==k&&aa[cd](aa[oc]()-aa[bd]()+h.startOfWeek);r=1;p=aa[Ec]();G=aa.getTime()/ob;B=aa[Dc]();for(ha=aa[oc]();G<P&&r<Aa;){ra.push(G);if(S==la)G=Cc(p+r*C,0)/ob;else if(S==o)G=Cc(p,B+r*C)/ob;else if(!T&&(S==Z||S==k))G=Cc(p,B,ha+r*C*(S==Z?1:7));else G+=S*C;r++}ra.push(G);Kc=h.dateTimeLabelFormats[na[0]]}else{r=
Lb(K/Wa)*Wa;p=dd(P/Wa)*Wa;ra=[];for(r=L(r);r<=p;){ra.push(r);r=L(r+Wa)}}if(!Mb){if(Va||ma&&m.hasColumn){p=(Va?1:Wa)*0.5;if(Va||!I(y(h.min,qa)))K-=p;if(Va||!I(y(h.max,Na)))P+=p}p=ra[0];r=ra[ra.length-1];if(h.startOnTick)K=p;else K>p&&ra.shift();if(h.endOnTick)P=r;else P<r&&ra.pop();Fb||(Fb={x:0,y:0});if(!N&&ra.length>Fb[H])Fb[H]=ra.length}}function Ea(){var k,p;gb=K;cc=P;O();ga();ja=D;D=A/(P-K||1);if(!ma)for(k in fa)for(p in fa[k])fa[k][p].cum=fa[k][p].total;if(!s.isDirty)s.isDirty=K!=gb||P!=cc}function ua(k){k=
(new w(k)).render();Nb.push(k);return k}function bb(){var k=h.title,p=h.alternateGridColor,r=h.lineWidth,o,T,Z=m.hasRendered,G=Z&&I(gb)&&!isNaN(gb);o=$.length&&I(K)&&I(P);A=M?Aa:ta;D=A/(P-K||1);wa=M?X:pb;if(o||Mb){if(Jc&&!Va)for(o=K+(ra[0]-K)%Jc;o<=P;o+=Jc){Wb[o]||(Wb[o]=new x(o,true));G&&Wb[o].isNew&&Wb[o].render(null,true);Wb[o].isActive=true;Wb[o].render()}t(ra,function(B,ha){if(!Mb||B>=K&&B<=P){G&&qb[B].isNew&&qb[B].render(ha,true);qb[B].isActive=true;qb[B].render(ha)}});p&&t(ra,function(B,ha){if(ha%
2===0&&B<P){dc[B]||(dc[B]=new w);dc[B].options={from:B,to:ra[ha+1]!==Ra?ra[ha+1]:P,color:p};dc[B].render();dc[B].isActive=true}});Z||t((h.plotLines||[]).concat(h.plotBands||[]),function(B){Nb.push((new w(B)).render())})}t([qb,Wb,dc],function(B){for(var ha in B)if(B[ha].isActive)B[ha].isActive=false;else{B[ha].destroy();delete B[ha]}});if(r){o=X+(Oa?Aa:0)+Q;T=Pa-pb-(Oa?ta:0)+Q;o=ca.crispLine([Za,M?X:o,M?T:da,Ca,M?Xa-zb:o,M?T:Pa-pb],r);if(Fa)Fa.animate({d:o});else Fa=ca.path(o).attr({stroke:h.lineColor,
"stroke-width":r,zIndex:7}).add()}if(s.axisTitle){o=M?X:da;r=pa(k.style.fontSize||12);o={low:o+(M?0:A),middle:o+A/2,high:o+(M?A:0)}[k.align];r=(M?da+ta:X)+(M?1:-1)*(Oa?-1:1)*ed+(E==2?r:0);s.axisTitle[Z?"animate":"attr"]({x:M?o:r+(Oa?Aa:0)+Q+(k.x||0),y:M?r-(Oa?ta:0)+Q:o+(k.y||0)})}s.isDirty=false}function Ja(k){for(var p=0;p<Nb.length;p++)Nb[p].id==k&&Nb[p].destroy()}var ma=h.isX,Oa=h.opposite,M=Ga?!ma:ma,E=M?Oa?0:2:Oa?1:3,fa={};h=xa(ma?Lc:fd,[Xd,Yd,Ld,Zd][E],h);var s=this,N=h.type=="datetime",Q=h.offset||
0,H=ma?"x":"y",A,D,ja,wa=M?X:pb,va,Ka,rb,Gb,Fa,Ta,u,$,qa,Na,P=null,K=null,gb,cc,Vb=h.minPadding,Kd=h.maxPadding,Mb=I(h.linkedTo),Id,Jd,Ic,Md=h.events,gd,Nb=[],Wa,Jc,Eb,ra,qb={},Wb={},dc={},ec,fc,ed,Kc,Va=h.categories,$d=h.labels.formatter||function(){var k=this.value;return Kc?Mc(Kc,k):Wa%1E6===0?k/1E6+"M":Wa%1E3===0?k/1E3+"k":!Va&&k>=1E3?Gd(k,0):k},Nc=M&&h.labels.staggerLines,Xb=h.reversed,Yb=Va&&h.tickmarkPlacement=="between"?0.5:0;x.prototype={addLabel:function(){var k=this.pos,p=h.labels,r=!(k==
K&&!y(h.showFirstLabel,1)||k==P&&!y(h.showLastLabel,0)),o=Va&&M&&Va.length&&!p.step&&!p.staggerLines&&!p.rotation&&Aa/Va.length||!M&&Aa/2,T=this.label;k=$d.call({isFirst:k==ra[0],isLast:k==ra[ra.length-1],dateTimeLabelFormat:Kc,value:Va&&Va[k]?Va[k]:k});o=o&&{width:o-2*(p.padding||10)+$a};o=oa(o,p.style);if(T===Ra)this.label=I(k)&&r&&p.enabled?ca.text(k,0,0).attr({align:p.align,rotation:p.rotation}).css(o).add(rb):null;else T&&T.attr({text:k}).css(o)},getLabelSize:function(){var k=this.label;return k?
(this.labelBBox=k.getBBox())[M?"height":"width"]:0},render:function(k,p){var r=!this.minor,o=this.label,T=this.pos,Z=h.labels,G=this.gridLine,B=r?h.gridLineWidth:h.minorGridLineWidth,ha=r?h.gridLineColor:h.minorGridLineColor,la=r?h.gridLineDashStyle:h.minorGridLineDashStyle,C=this.mark,na=r?h.tickLength:h.minorTickLength,S=r?h.tickWidth:h.minorTickWidth||0,aa=r?h.tickColor:h.minorTickColor,pc=r?h.tickPosition:h.minorTickPosition;r=Z.step;var hb=p&&Oc||Pa,Ob;Ob=M?va(T+Yb,null,null,p)+wa:X+Q+(Oa?(p&&
hd||Xa)-zb-X:0);hb=M?hb-pb+Q-(Oa?ta:0):hb-va(T+Yb,null,null,p)-wa;if(B){T=Ka(T+Yb,B,p);if(G===Ra){G={stroke:ha,"stroke-width":B};if(la)G.dashstyle=la;this.gridLine=G=B?ca.path(T).attr(G).add(Gb):null}G&&T&&G.animate({d:T})}if(S){if(pc=="inside")na=-na;if(Oa)na=-na;B=ca.crispLine([Za,Ob,hb,Ca,Ob+(M?0:-na),hb+(M?na:0)],S);if(C)C.animate({d:B});else this.mark=ca.path(B).attr({stroke:aa,"stroke-width":S}).add(rb)}if(o){Ob=Ob+Z.x-(Yb&&M?Yb*D*(Xb?-1:1):0);hb=hb+Z.y-(Yb&&!M?Yb*D*(Xb?1:-1):0);I(Z.y)||(hb+=
parseInt(o.styles.lineHeight)*0.9-o.getBBox().height/2);if(Nc)hb+=k%Nc*16;if(r)o[k%r?"hide":"show"]();o[this.isNew?"attr":"animate"]({x:Ob,y:hb})}this.isNew=false},destroy:function(){for(var k in this)this[k]&&this[k].destroy&&this[k].destroy()}};w.prototype={render:function(){var k=this,p=k.options,r=p.label,o=k.label,T=p.width,Z=p.to,G,B=p.from,ha=p.dashStyle,la=k.svgElem,C=[],na,S,aa=p.color;S=p.zIndex;var pc=p.events;if(T){C=Ka(p.value,T);p={stroke:aa,"stroke-width":T};if(ha)p.dashstyle=ha}else if(I(B)&&
I(Z)){B=Da(B,K);Z=nb(Z,P);G=Ka(Z);if((C=Ka(B))&&G)C.push(G[4],G[5],G[1],G[2]);else C=null;p={fill:aa}}else return;if(I(S))p.zIndex=S;if(la)if(C)la.animate({d:C},null,la.onGetPath);else{la.hide();la.onGetPath=function(){la.show()}}else if(C&&C.length){k.svgElem=la=ca.path(C).attr(p).add();if(pc){ha=function(hb){la.on(hb,function(Ob){pc[hb].apply(k,[Ob])})};for(na in pc)ha(na)}}if(r&&I(r.text)&&C&&C.length&&Aa>0&&ta>0){r=xa({align:M&&G&&"center",x:M?!G&&4:10,verticalAlign:!M&&G&&"middle",y:M?G?16:10:
G?6:-4,rotation:M&&!G&&90},r);if(!o)k.label=o=ca.text(r.text,0,0).attr({align:r.textAlign||r.align,rotation:r.rotation,zIndex:S}).css(r.style).add();G=[C[1],C[4],C[6]||C[1]];C=[C[2],C[5],C[7]||C[2]];na=nb.apply(Ua,G);S=nb.apply(Ua,C);o.align(r,false,{x:na,y:S,width:Da.apply(Ua,G)-na,height:Da.apply(Ua,C)-S});o.show()}else o&&o.hide();return k},destroy:function(){for(var k in this){this[k]&&this[k].destroy&&this[k].destroy();delete this[k]}mc(Nb,this)}};va=function(k,p,r,o){var T=1,Z=0,G=o?ja:D;o=
o?gb:K;G||(G=D);if(r){T*=-1;Z=A}if(Xb){T*=-1;Z-=T*A}if(p){if(Xb)k=A-k;k=k/G+o}else k=T*(k-o)*G+Z;return k};Ka=function(k,p,r){var o,T,Z;k=va(k,null,null,r);var G=r&&Oc||Pa,B=r&&hd||Xa,ha;r=T=U(k+wa);o=Z=U(G-k-wa);if(isNaN(k))ha=true;else if(M){o=da;Z=G-pb;if(r<X||r>X+Aa)ha=true}else{r=X;T=B-zb;if(o<da||o>da+ta)ha=true}return ha?null:ca.crispLine([Za,r,o,Ca,T,Z],p||0)};if(Ga&&ma&&Xb===Ra)Xb=true;oa(s,{addPlotBand:ua,addPlotLine:ua,adjustTickAmount:function(){if(Fb&&!N&&!Va&&!Mb){var k=ec,p=ra.length;
ec=Fb[H];if(p<ec){for(;ra.length<ec;)ra.push(L(ra[ra.length-1]+Wa));D*=(p-1)/(ec-1);P=ra[ra.length-1]}if(I(k)&&ec!=k)s.isDirty=true}},categories:Va,getExtremes:function(){return{min:K,max:P,dataMin:Ta,dataMax:u}},getPlotLinePath:Ka,getThreshold:function(k){if(K>k)k=K;else if(P<k)k=P;return va(k,0,1)},isXAxis:ma,options:h,plotLinesAndBands:Nb,getOffset:function(){var k=$.length&&I(K)&&I(P),p=0,r=0,o=h.title,T=h.labels,Z=[-1,1,1,-1][E];if(!rb){rb=ca.g("axis").attr({zIndex:7}).add();Gb=ca.g("grid").attr({zIndex:1}).add()}fc=
0;if(k||Mb){t(ra,function(B){if(qb[B])qb[B].addLabel();else qb[B]=new x(B);if(E===0||E==2||{1:"left",3:"right"}[E]==T.align)fc=Da(qb[B].getLabelSize(),fc)});if(Nc)fc+=(Nc-1)*16}else for(var G in qb){qb[G].destroy();delete qb[G]}if(o&&o.text){if(!s.axisTitle)s.axisTitle=ca.text(o.text,0,0).attr({zIndex:7,rotation:o.rotation||0,align:o.textAlign||{low:"left",middle:"center",high:"right"}[o.align]}).css(o.style).add();p=s.axisTitle.getBBox()[M?"height":"width"];r=y(o.margin,M?5:10)}Q=Z*(h.offset||Pb[E]);
ed=fc+(E!=2&&fc&&Z*h.labels[M?"y":"x"])+r;Pb[E]=Da(Pb[E],ed+p+Z*Q)},render:bb,setCategories:function(k,p){s.categories=Va=k;t($,function(r){r.translate();r.setTooltipPoints(true)});s.isDirty=true;y(p,true)&&m.redraw()},setExtremes:function(k,p,r,o){r=y(r,true);La(s,"setExtremes",{min:k,max:p},function(){qa=k;Na=p;r&&m.redraw(o)})},setScale:Ea,setTickPositions:ga,translate:va,redraw:function(){gc.resetTracker&&gc.resetTracker();bb();t(Nb,function(k){k.render()});t($,function(k){k.isDirty=true})},removePlotBand:Ja,
removePlotLine:Ja,reversed:Xb,stacks:fa});for(gd in Md)Qa(s,gd,Md[gd]);Ea()}function d(){var m={};return{add:function(h,x,w,O){if(!m[h]){x=ca.text(x,0,0).css(a.toolbar.itemStyle).align({align:"right",x:-zb-20,y:da+30}).on("click",O).attr({align:"right",zIndex:20}).add();m[h]=x}},remove:function(h){Fc(m[h].element);m[h]=null}}}function e(m){function h(){var H=this.points||nc(this),A=H[0].series.xAxis,D=this.x;A=A&&A.options.type=="datetime";var ja=Jb(D)||A,wa;wa=ja?['<span style="font-size: 10px">',
A?Mc("%A, %b %e, %Y",D):D,"</span><br/>"]:[];t(H,function(va){wa.push(va.point.tooltipFormatter(ja))});return wa.join("")}function x(H,A){E=ma?H:(2*E+H)/3;fa=ma?A:(fa+A)/2;s.translate(E,fa);id=cb(H-E)>1||cb(A-fa)>1?function(){x(H,A)}:null}function w(){if(!ma){var H=q.hoverPoints;s.hide();t(ga,function(A){A&&A.hide()});H&&t(H,function(A){A.setState()});q.hoverPoints=null;ma=true}}var O,ia=m.borderWidth,L=m.crosshairs,ga=[],Ea=m.style,ua=m.shared,bb=pa(Ea.padding),Ja=ia+bb,ma=true,Oa,M,E=0,fa=0;Ea.padding=
0;var s=ca.g("tooltip").attr({zIndex:8}).add(),N=ca.rect(Ja,Ja,0,0,m.borderRadius,ia).attr({fill:m.backgroundColor,"stroke-width":ia}).add(s).shadow(m.shadow),Q=ca.text("",bb+Ja,pa(Ea.fontSize)+bb+Ja).attr({zIndex:1}).css(Ea).add(s);s.hide();return{shared:ua,refresh:function(H){var A,D,ja,wa=0,va={},Ka=[];ja=H.tooltipPos;A=m.formatter||h;va=q.hoverPoints;var rb=function(Fa){return{series:Fa.series,point:Fa,x:Fa.category,y:Fa.y,percentage:Fa.percentage,total:Fa.total||Fa.stackTotal}};if(ua){va&&t(va,
function(Fa){Fa.setState()});q.hoverPoints=H;t(H,function(Fa){Fa.setState(xb);wa+=Fa.plotY;Ka.push(rb(Fa))});D=H[0].plotX;wa=U(wa)/H.length;va={x:H[0].category};va.points=Ka;H=H[0]}else va=rb(H);va=A.call(va);O=H.series;D=ua?D:H.plotX;wa=ua?wa:H.plotY;A=U(ja?ja[0]:Ga?Aa-wa:D);D=U(ja?ja[1]:Ga?ta-D:wa);ja=ua||!H.series.isCartesian||hc(A,D);if(va===false||!ja)w();else{if(ma){s.show();ma=false}Q.attr({text:va});ja=Q.getBBox();Oa=ja.width+2*bb;M=ja.height+2*bb;N.attr({width:Oa,height:M,stroke:m.borderColor||
H.color||O.color||"#606060"});A=A-Oa+X-25;D=D-M+da+10;if(A<7){A=7;D-=30}if(D<5)D=5;else if(D+M>Pa)D=Pa-M-5;x(U(A-Ja),U(D-Ja))}if(L){L=nc(L);D=L.length;for(var Gb;D--;)if(L[D]&&(Gb=H.series[D?"yAxis":"xAxis"])){A=Gb.getPlotLinePath(H[D?"y":"x"],1);if(ga[D])ga[D].attr({d:A,visibility:Ab});else{ja={"stroke-width":L[D].width||1,stroke:L[D].color||"#C0C0C0",zIndex:2};if(L[D].dashStyle)ja.dashstyle=L[D].dashStyle;ga[D]=ca.path(A).attr(ja).add()}}}},hide:w}}function f(m,h){function x(E){var fa;E=E||sb.event;
if(!E.target)E.target=E.srcElement;fa=E.touches?E.touches.item(0):E;if(E.type!="mousemove"||sb.opera){for(var s=sa,N={left:s.offsetLeft,top:s.offsetTop};s=s.offsetParent;){N.left+=s.offsetLeft;N.top+=s.offsetTop;if(s!=za.body&&s!=za.documentElement){N.left-=s.scrollLeft;N.top-=s.scrollTop}}qc=N}if(Ac){E.chartX=E.x;E.chartY=E.y}else if(fa.layerX===Ra){E.chartX=fa.pageX-qc.left;E.chartY=fa.pageY-qc.top}else{E.chartX=E.layerX;E.chartY=E.layerY}return E}function w(E){var fa={xAxis:[],yAxis:[]};t(ab,function(s){var N=
s.translate,Q=s.isXAxis;fa[Q?"xAxis":"yAxis"].push({axis:s,value:N((Ga?!Q:Q)?E.chartX-X:ta-E.chartY+da,true)})});return fa}function O(){var E=m.hoverSeries,fa=m.hoverPoint;fa&&fa.onMouseOut();E&&E.onMouseOut();rc&&rc.hide();jd=null}function ia(){if(ua){var E={xAxis:[],yAxis:[]},fa=ua.getBBox(),s=fa.x-X,N=fa.y-da;if(Ea){t(ab,function(Q){var H=Q.translate,A=Q.isXAxis,D=Ga?!A:A,ja=H(D?s:ta-N-fa.height,true);H=H(D?s+fa.width:ta-N,true);E[A?"xAxis":"yAxis"].push({axis:Q,min:nb(ja,H),max:Da(ja,H)})});La(m,
"selection",E,kd)}ua=ua.destroy()}m.mouseIsDown=ld=Ea=false;Bb(za,Hb?"touchend":"mouseup",ia)}var L,ga,Ea,ua,bb=v.zoomType,Ja=/x/.test(bb),ma=/y/.test(bb),Oa=Ja&&!Ga||ma&&Ga,M=ma&&!Ga||Ja&&Ga;Pc=function(){if(Qc){Qc.translate(X,da);Ga&&Qc.attr({width:m.plotWidth,height:m.plotHeight}).invert()}else m.trackerGroup=Qc=ca.g("tracker").attr({zIndex:9}).add()};Pc();if(h.enabled)m.tooltip=rc=e(h);(function(){var E=true;sa.onmousedown=function(s){s=x(s);m.mouseIsDown=ld=true;L=s.chartX;ga=s.chartY;Qa(za,
Hb?"touchend":"mouseup",ia)};var fa=function(s){if(!(s&&s.touches&&s.touches.length>1)){s=x(s);if(!Hb)s.returnValue=false;var N=s.chartX,Q=s.chartY,H=!hc(N-X,Q-da);if(Hb&&s.type=="touchstart")if(ya(s.target,"isTracker"))m.runTrackerClick||s.preventDefault();else!ae&&!H&&s.preventDefault();if(H){E||O();if(N<X)N=X;else if(N>X+Aa)N=X+Aa;if(Q<da)Q=da;else if(Q>da+ta)Q=da+ta}if(ld&&s.type!="touchstart"){if(Ea=Math.sqrt(Math.pow(L-N,2)+Math.pow(ga-Q,2))>10){if(ic&&(Ja||ma)&&hc(L-X,ga-da))ua||(ua=ca.rect(X,
da,Oa?1:Aa,M?1:ta,0).attr({fill:"rgba(69,114,167,0.25)",zIndex:7}).add());if(ua&&Oa){N=N-L;ua.attr({width:cb(N),x:(N>0?0:N)+L})}if(ua&&M){Q=Q-ga;ua.attr({height:cb(Q),y:(Q>0?0:Q)+ga})}}}else if(!H){var A;Q=m.hoverPoint;N=m.hoverSeries;var D,ja,wa=Xa,va=Ga?s.chartY:s.chartX-X;if(rc&&h.shared){A=[];D=Ba.length;for(ja=0;ja<D;ja++)if(Ba[ja].visible&&Ba[ja].tooltipPoints.length){s=Ba[ja].tooltipPoints[va];s._dist=cb(va-s.plotX);wa=nb(wa,s._dist);A.push(s)}for(D=A.length;D--;)A[D]._dist>wa&&A.splice(D,
1);if(A.length&&A[0].plotX!=jd){rc.refresh(A);jd=A[0].plotX}}if(N&&N.tracker)(s=N.tooltipPoints[va])&&s!=Q&&s.onMouseOver()}return(E=H)||!ic}};sa.onmousemove=fa;Qa(sa,"mouseleave",O);sa.ontouchstart=function(s){if(Ja||ma)sa.onmousedown(s);fa(s)};sa.ontouchmove=fa;sa.ontouchend=function(){Ea&&O()};sa.onclick=function(s){var N=m.hoverPoint;s=x(s);s.cancelBubble=true;if(!Ea)if(N&&ya(s.target,"isTracker")){var Q=N.plotX,H=N.plotY;oa(N,{pageX:qc.left+X+(Ga?Aa-H:Q),pageY:qc.top+da+(Ga?ta-Q:H)});La(N.series,
"click",oa(s,{point:N}));N.firePointEvent("click",s)}else{oa(s,w(s));hc(s.chartX-X,s.chartY-da)&&La(m,"click",s)}Ea=false}})();Nd=setInterval(function(){id&&id()},32);oa(this,{zoomX:Ja,zoomY:ma,resetTracker:O})}function g(m){var h=m.type||v.type||v.defaultSeriesType,x=tb[h],w=q.hasRendered;if(w)if(Ga&&h=="column")x=tb.bar;else if(!Ga&&h=="bar")x=tb.column;h=new x;h.init(q,m);if(!w&&h.inverted)Ga=true;if(h.isCartesian)ic=h.isCartesian;Ba.push(h);return h}function i(){v.alignTicks!==false&&t(ab,function(m){m.adjustTickAmount()});
Fb=null}function l(m){var h=q.isDirtyLegend,x,w=q.isDirtyBox,O=Ba.length,ia=O,L=q.clipRect;for(bc(m,q);ia--;){m=Ba[ia];if(m.isDirty&&m.options.stacking){x=true;break}}if(x)for(ia=O;ia--;){m=Ba[ia];if(m.options.stacking)m.isDirty=true}t(Ba,function(ga){if(ga.isDirty){ga.cleanData();ga.getSegments();if(ga.options.legendType=="point")h=true}});if(h&&md.renderLegend){md.renderLegend();q.isDirtyLegend=false}if(ic){if(!Rc){Fb=null;t(ab,function(ga){ga.setScale()})}i();sc();t(ab,function(ga){if(ga.isDirty||
w){ga.redraw();w=true}})}if(w){nd();Pc();if(L){Sc(L);L.animate({width:q.plotSizeX,height:q.plotSizeY})}}t(Ba,function(ga){if(ga.isDirty&&ga.visible&&(!ga.isCartesian||ga.xAxis))ga.redraw()});gc&&gc.resetTracker&&gc.resetTracker();La(q,"redraw")}function j(){var m=a.xAxis||{},h=a.yAxis||{},x;m=nc(m);t(m,function(w,O){w.index=O;w.isX=true});h=nc(h);t(h,function(w,O){w.index=O});ab=m.concat(h);q.xAxis=[];q.yAxis=[];ab=jc(ab,function(w){x=new c(q,w);q[x.isXAxis?"xAxis":"yAxis"].push(x);return x});i()}
function n(m,h){kc=xa(a.title,m);tc=xa(a.subtitle,h);t([["title",m,kc],["subtitle",h,tc]],function(x){var w=x[0],O=q[w],ia=x[1];x=x[2];if(O&&ia){O.destroy();O=null}if(x&&x.text&&!O)q[w]=ca.text(x.text,0,0).attr({align:x.align,"class":"highcharts-"+w,zIndex:1}).css(x.style).add().align(x,false,uc)})}function z(){ib=v.renderTo;Od=Zb+od++;if(Jb(ib))ib=za.getElementById(ib);ib.innerHTML="";if(!ib.offsetWidth){Qb=ib.cloneNode(0);Ia(Qb,{position:lc,top:"-9999px",display:""});za.body.appendChild(Qb)}Tc=
(Qb||ib).offsetWidth;vc=(Qb||ib).offsetHeight;q.chartWidth=Xa=v.width||Tc||600;q.chartHeight=Pa=v.height||(vc>19?vc:400);q.container=sa=fb(Kb,{className:"highcharts-container"+(v.className?" "+v.className:""),id:Od},oa({position:Pd,overflow:ub,width:Xa+$a,height:Pa+$a,textAlign:"left"},v.style),Qb||ib);q.renderer=ca=v.forExport?new Uc(sa,Xa,Pa,true):new Qd(sa,Xa,Pa);var m,h;if(Rd&&sa.getBoundingClientRect){m=function(){Ia(sa,{left:0,top:0});h=sa.getBoundingClientRect();Ia(sa,{left:-h.left%1+$a,top:-h.top%
1+$a})};m();Qa(sb,"resize",m);Qa(q,"destroy",function(){Bb(sb,"resize",m)})}}function F(){function m(){var x=v.width||ib.offsetWidth,w=v.height||ib.offsetHeight;if(x&&w){if(x!=Tc||w!=vc){clearTimeout(h);h=setTimeout(function(){pd(x,w,false)},100)}Tc=x;vc=w}}var h;Qa(window,"resize",m);Qa(q,"destroy",function(){Bb(window,"resize",m)})}function W(){var m=a.labels,h=a.credits,x;n();md=q.legend=new be(q);sc();t(ab,function(w){w.setTickPositions(true)});i();sc();nd();ic&&t(ab,function(w){w.render()});
if(!q.seriesGroup)q.seriesGroup=ca.g("series-group").attr({zIndex:3}).add();t(Ba,function(w){w.translate();w.setTooltipPoints();w.render()});m.items&&t(m.items,function(){var w=oa(m.style,this.style),O=pa(w.left)+X,ia=pa(w.top)+da+12;delete w.left;delete w.top;ca.text(this.html,O,ia).attr({zIndex:2}).css(w).add()});if(!q.toolbar)q.toolbar=d(q);if(h.enabled&&!q.credits){x=h.href;ca.text(h.text,0,0).on("click",function(){if(x)parent.location.href=x}).attr({align:h.position.align,zIndex:8}).css(h.style).add().align(h.position)}Pc();
q.hasRendered=true;if(Qb){ib.appendChild(sa);Fc(Qb)}}function ba(){var m=Ba.length,h=sa&&sa.parentNode;La(q,"destroy");Bb(sb,"unload",ba);Bb(q);for(t(ab,function(x){Bb(x)});m--;)Ba[m].destroy();if(I(sa)){sa.innerHTML="";Bb(sa);h&&h.removeChild(sa)}sa=null;ca.alignedObjects=null;clearInterval(Nd);for(m in q)delete q[m]}function ka(){if(!wc&&!sb.parent&&za.readyState!="complete")za.attachEvent("onreadystatechange",function(){za.detachEvent("onreadystatechange",ka);ka()});else{z();qd();rd();t(a.series||
[],function(m){g(m)});q.inverted=Ga=y(Ga,a.chart.inverted);j();q.render=W;q.tracker=gc=new f(q,a.tooltip);W();La(q,"load");b&&b.apply(q,[q]);t(q.callbacks,function(m){m.apply(q,[q])})}}Lc=xa(Lc,Sa.xAxis);fd=xa(fd,Sa.yAxis);Sa.xAxis=Sa.yAxis=null;a=xa(Sa,a);var v=a.chart,J=v.margin;J=Db(J)?J:[J,J,J,J];var ea=y(v.marginTop,J[0]),Y=y(v.marginRight,J[1]),V=y(v.marginBottom,J[2]),R=y(v.marginLeft,J[3]),Ha=v.spacingTop,Ya=v.spacingRight,sd=v.spacingBottom,Vc=v.spacingLeft,uc,kc,tc,da,zb,pb,X,Pb,ib,Qb,sa,
Od,Tc,vc,Xa,Pa,hd,Oc,td,ud,vd,wd,q=this,ae=(J=v.events)&&!!J.click,xd,hc,rc,ld,$b,Sd,yd,ta,Aa,gc,Qc,Pc,md,Rb,Sb,qc,ic=v.showAxes,Rc=0,ab=[],Fb,Ba=[],Ga,ca,id,Nd,jd,nd,sc,qd,rd,pd,kd,Td,be=function(m){function h(u,$){var qa=u.legendItem,Na=u.legendLine,P=u.legendSymbol,K=M.color,gb=$?L.itemStyle.color:K;K=$?u.color:K;qa&&qa.css({fill:gb});Na&&Na.attr({stroke:K});P&&P.attr({stroke:K,fill:K})}function x(u,$,qa){var Na=u.legendItem,P=u.legendLine,K=u.legendSymbol;u=u.checkbox;Na&&Na.attr({x:$,y:qa});
P&&P.translate($,qa-4);K&&K.attr({x:$+K.xOff,y:qa+K.yOff});if(u){u.x=$;u.y=qa}}function w(){t(bb,function(u){var $=u.checkbox;$&&Ia($,{left:Ka.attr("translateX")+u.legendItemWidth+$.x-40+$a,top:Ka.attr("translateY")+$.y-11+$a})})}function O(u){var $,qa,Na,P,K,gb=u.legendItem;P=u.series||u;if(!gb){K=/^(bar|pie|area|column)$/.test(P.type);u.legendItem=gb=ca.text(L.labelFormatter.call(u),0,0).css(u.visible?ma:M).on("mouseover",function(){u.setState(xb);gb.css(Oa)}).on("mouseout",function(){gb.css(u.visible?
ma:M);u.setState()}).on("click",function(){var Vb=function(){u.setVisible()};u.firePointEvent?u.firePointEvent("legendItemClick",null,Vb):La(u,"legendItemClick",null,Vb)}).attr({zIndex:2}).add(Ka);if(!K&&u.options&&u.options.lineWidth){var cc=u.options;P={"stroke-width":cc.lineWidth,zIndex:2};if(cc.dashStyle)P.dashstyle=cc.dashStyle;u.legendLine=ca.path([Za,-Ea-ua,0,Ca,-ua,0]).attr(P).add(Ka)}if(K)$=ca.rect(qa=-Ea-ua,Na=-11,Ea,12,2).attr({"stroke-width":0,zIndex:3}).add(Ka);else if(u.options&&u.options.marker&&
u.options.marker.enabled)$=ca.symbol(u.symbol,qa=-Ea/2-ua,Na=-4,u.options.marker.radius).attr(u.pointAttr[db]).attr({zIndex:3}).add(Ka);if($){$.xOff=qa;$.yOff=Na}u.legendSymbol=$;h(u,u.visible);if(u.options&&u.options.showCheckbox){u.checkbox=fb("input",{type:"checkbox",checked:u.selected,defaultChecked:u.selected},L.itemCheckboxStyle,sa);Qa(u.checkbox,"click",function(Vb){La(u,"checkboxClick",{checked:Vb.target.checked},function(){u.select()})})}}$=gb.getBBox();qa=u.legendItemWidth=L.itemWidth||
Ea+ua+$.width+fa;D=$.height;if(ga&&Q-N+qa>(Gb||Xa-2*E-N)){Q=N;H+=D}A=H;x(u,Q,H);if(ga)Q+=qa;else H+=D;rb=Gb||Da(ga?Q-N:qa,rb);bb.push(u)}function ia(){Q=N;H=s;A=rb=0;bb=[];Ka||(Ka=ca.g("legend").attr({zIndex:7}).add());Ta&&Fa.reverse();t(Fa,function(Na){if(Na.options.showInLegend)t(Na.options.legendType=="point"?Na.data:[Na],O)});Ta&&Fa.reverse();Rb=Gb||rb;Sb=A-s+D;if(wa||va){Rb+=2*E;Sb+=2*E;if(ja)Rb>0&&Sb>0&&ja.animate({width:Rb,height:Sb});else ja=ca.rect(0,0,Rb,Sb,L.borderRadius,wa||0).attr({stroke:L.borderColor,
"stroke-width":wa||0,fill:va||mb}).add(Ka).shadow(L.shadow);ja[bb.length?"show":"hide"]()}for(var u=["left","right","top","bottom"],$,qa=4;qa--;){$=u[qa];if(Ja[$]&&Ja[$]!="auto"){L[qa<2?"align":"verticalAlign"]=$;L[qa<2?"x":"y"]=pa(Ja[$])*(qa%2?-1:1)}}Ka.align(oa(L,{width:Rb,height:Sb}),true,uc);Rc||w()}var L=m.options.legend;if(L.enabled){var ga=L.layout=="horizontal",Ea=L.symbolWidth,ua=L.symbolPadding,bb,Ja=L.style,ma=L.itemStyle,Oa=L.itemHoverStyle,M=L.itemHiddenStyle,E=pa(Ja.padding),fa=20,s=
18,N=4+E+Ea+ua,Q,H,A,D=0,ja,wa=L.borderWidth,va=L.backgroundColor,Ka,rb,Gb=L.width,Fa=m.series,Ta=L.reversed;ia();Qa(m,"endResize",w);return{colorizeItem:h,destroyItem:function(u){var $=u.checkbox;t(["legendItem","legendLine","legendSymbol"],function(qa){u[qa]&&u[qa].destroy()});$&&Fc(u.checkbox)},renderLegend:ia}}};hc=function(m,h){return m>=0&&m<=Aa&&h>=0&&h<=ta};Td=function(){La(q,"selection",{resetSelection:true},kd);q.toolbar.remove("zoom")};kd=function(m){var h=Sa.lang,x=q.pointCount<100;q.toolbar.add("zoom",
h.resetZoom,h.resetZoomTitle,Td);!m||m.resetSelection?t(ab,function(w){w.setExtremes(null,null,false,x)}):t(m.xAxis.concat(m.yAxis),function(w){var O=w.axis;if(q.tracker[O.isXAxis?"zoomX":"zoomY"])O.setExtremes(w.min,w.max,false,x)});l()};sc=function(){var m=a.legend,h=y(m.margin,10),x=m.x,w=m.y,O=m.align,ia=m.verticalAlign,L;qd();if((q.title||q.subtitle)&&!I(ea))if(L=Da(q.title&&!kc.floating&&!kc.verticalAlign&&kc.y||0,q.subtitle&&!tc.floating&&!tc.verticalAlign&&tc.y||0))da=Da(da,L+y(kc.margin,
15)+Ha);if(m.enabled&&!m.floating)if(O=="right")I(Y)||(zb=Da(zb,Rb-x+h+Ya));else if(O=="left")I(R)||(X=Da(X,Rb+x+h+Vc));else if(ia=="top")I(ea)||(da=Da(da,Sb+w+h+Ha));else if(ia=="bottom")I(V)||(pb=Da(pb,Sb-w+h+sd));ic&&t(ab,function(ga){ga.getOffset()});I(R)||(X+=Pb[3]);I(ea)||(da+=Pb[0]);I(V)||(pb+=Pb[2]);I(Y)||(zb+=Pb[1]);rd()};pd=function(m,h,x){var w=q.title,O=q.subtitle;Rc+=1;bc(x,q);Oc=Pa;hd=Xa;Xa=U(m);Pa=U(h);Ia(sa,{width:Xa+$a,height:Pa+$a});ca.setSize(Xa,Pa,x);Aa=Xa-X-zb;ta=Pa-da-pb;Fb=
null;t(ab,function(ia){ia.isDirty=true;ia.setScale()});t(Ba,function(ia){ia.isDirty=true});q.isDirtyLegend=true;q.isDirtyBox=true;sc();w&&w.align(null,null,uc);O&&O.align(null,null,uc);l(x);Oc=null;La(q,"resize");setTimeout(function(){La(q,"endResize",null,function(){Rc-=1})},Bc&&Bc.duration||500)};rd=function(){q.plotLeft=X=U(X);q.plotTop=da=U(da);q.plotWidth=Aa=U(Xa-X-zb);q.plotHeight=ta=U(Pa-da-pb);q.plotSizeX=Ga?ta:Aa;q.plotSizeY=Ga?Aa:ta;uc={x:Vc,y:Ha,width:Xa-Vc-Ya,height:Pa-Ha-sd}};qd=function(){da=
y(ea,Ha);zb=y(Y,Ya);pb=y(V,sd);X=y(R,Vc);Pb=[0,0,0,0]};nd=function(){var m=v.borderWidth||0,h=v.backgroundColor,x=v.plotBackgroundColor,w=v.plotBackgroundImage,O,ia={x:X,y:da,width:Aa,height:ta};O=m+(v.shadow?8:0);if(m||h)if(td)td.animate({width:Xa-O,height:Pa-O});else td=ca.rect(O/2,O/2,Xa-O,Pa-O,v.borderRadius,m).attr({stroke:v.borderColor,"stroke-width":m,fill:h||mb}).add().shadow(v.shadow);if(x)if(ud)ud.animate(ia);else ud=ca.rect(X,da,Aa,ta,0).attr({fill:x}).add().shadow(v.plotShadow);if(w)if(vd)vd.animate(ia);
else vd=ca.image(w,X,da,Aa,ta).add();if(v.plotBorderWidth)if(wd)wd.animate(ia);else wd=ca.rect(X,da,Aa,ta,0,v.plotBorderWidth).attr({stroke:v.plotBorderColor,"stroke-width":v.plotBorderWidth,zIndex:4}).add();q.isDirtyBox=false};Wc=Ib=0;Qa(sb,"unload",ba);v.reflow!==false&&Qa(q,"load",F);if(J)for(xd in J)Qa(q,xd,J[xd]);q.options=a;q.series=Ba;q.addSeries=function(m,h,x){var w;if(m){bc(x,q);h=y(h,true);La(q,"addSeries",{options:m},function(){w=g(m);w.isDirty=true;q.isDirtyLegend=true;h&&q.redraw()})}return w};
q.animation=y(v.animation,true);q.destroy=ba;q.get=function(m){var h,x,w;for(h=0;h<ab.length;h++)if(ab[h].options.id==m)return ab[h];for(h=0;h<Ba.length;h++)if(Ba[h].options.id==m)return Ba[h];for(h=0;h<Ba.length;h++){w=Ba[h].data;for(x=0;x<w.length;x++)if(w[x].id==m)return w[x]}return null};q.getSelectedPoints=function(){var m=[];t(Ba,function(h){m=m.concat(zd(h.data,function(x){return x.selected}))});return m};q.getSelectedSeries=function(){return zd(Ba,function(m){return m.selected})};q.hideLoading=
function(){Xc($b,{opacity:0},{duration:a.loading.hideDuration,complete:function(){Ia($b,{display:mb})}});yd=false};q.isInsidePlot=hc;q.redraw=l;q.setSize=pd;q.setTitle=n;q.showLoading=function(m){var h=a.loading;if(!$b){$b=fb(Kb,{className:"highcharts-loading"},oa(h.style,{left:X+$a,top:da+$a,width:Aa+$a,height:ta+$a,zIndex:10,display:mb}),sa);Sd=fb("span",null,h.labelStyle,$b)}Sd.innerHTML=m||a.lang.loading;if(!yd){Ia($b,{opacity:0,display:""});Xc($b,{opacity:h.style.opacity},{duration:h.showDuration});
yd=true}};q.pointCount=0;ka()}var za=document,sb=window,Ua=Math,U=Ua.round,Lb=Ua.floor,dd=Ua.ceil,Da=Ua.max,nb=Ua.min,cb=Ua.abs,jb=Ua.cos,yb=Ua.sin,Tb=Ua.PI,Ud=Tb*2/360,xc=navigator.userAgent,Ac=/msie/i.test(xc)&&!sb.opera,yc=za.documentMode==8,ce=/AppleWebKit/.test(xc),Rd=/Firefox/.test(xc),wc=!!za.createElementNS&&!!za.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,Hb="ontouchstart"in za.documentElement,Ib,Wc,de={},od=0,ob=1,Gc,Sa,Mc,Bc,Yc,Ra,Kb="div",lc="absolute",Pd="relative",
ub="hidden",Zb="highcharts-",Ab="visible",$a="px",mb="none",Za="M",Ca="L",Vd="rgba(192,192,192,"+(wc?1.0E-6:0.0020)+")",db="",xb="hover",Cc,$c,ad,bd,oc,Dc,Ec,Cd,Dd,cd,Ed,Fd,eb=sb.HighchartsAdapter,Cb=eb||{},t=Cb.each,zd=Cb.grep,jc=Cb.map,xa=Cb.merge,Ad=Cb.hyphenate,Qa=Cb.addEvent,Bb=Cb.removeEvent,La=Cb.fireEvent,Xc=Cb.animate,Sc=Cb.stop,tb={};eb&&eb.init&&eb.init();if(!eb&&sb.jQuery){var kb=jQuery;t=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===false)return c};zd=kb.grep;
jc=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c};xa=function(){var a=arguments;return kb.extend(true,null,a[0],a[1],a[2],a[3])};Ad=function(a){return a.replace(/([A-Z])/g,function(b,c){return"-"+c.toLowerCase()})};Qa=function(a,b,c){kb(a).bind(b,c)};Bb=function(a,b,c){var d=za.removeEventListener?"removeEventListener":"detachEvent";if(za[d]&&!a[d])a[d]=function(){};kb(a).unbind(b,c)};La=function(a,b,c,d){var e=kb.Event(b),f="detached"+b;oa(e,c);if(a[b]){a[f]=
a[b];a[b]=null}kb(a).trigger(e);if(a[f]){a[b]=a[f];a[f]=null}d&&!e.isDefaultPrevented()&&d(e)};Xc=function(a,b,c){var d=kb(a);if(b.d){a.toD=b.d;b.d=1}d.stop();d.animate(b,c)};Sc=function(a){kb(a).stop()};kb.extend(kb.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var ee=jQuery.fx.step._default,fe=jQuery.fx.prototype.cur;kb.fx.step._default=function(a){var b=a.elem;b.attr?b.attr(a.prop,a.now):ee.apply(this,arguments)};kb.fx.step.d=function(a){var b=a.elem;if(!a.started){var c=Yc.init(b,
b.d,b.toD);a.start=c[0];a.end=c[1];a.started=true}b.attr("d",Yc.step(a.start,a.end,a.pos,b.toD))};kb.fx.prototype.cur=function(){var a=this.elem;return a.attr?a.attr(this.prop):fe.apply(this,arguments)}}Yc={init:function(a,b,c){b=b||"";var d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g;b=b.split(" ");c=[].concat(c);var i,l,j=function(n){for(g=n.length;g--;)n[g]==Za&&n.splice(g+1,0,n[g+1],n[g+2],n[g+1],n[g+2])};if(e){j(b);j(c)}if(a.isArea){i=b.splice(b.length-6,6);l=c.splice(c.length-6,6)}if(d){c=[].concat(c).splice(0,
f).concat(c);a.shift=false}if(b.length)for(a=c.length;b.length<a;){d=[].concat(b).splice(b.length-f,f);if(e){d[f-6]=d[f-2];d[f-5]=d[f-1]}b=b.concat(d)}if(i){b=b.concat(i);c=c.concat(l)}return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c==1)e=d;else if(f==b.length&&c<1)for(;f--;){d=parseFloat(a[f]);e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d}else e=b;return e}};eb={enabled:true,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};Sa={colors:["#4572A7","#AA4643","#89A54E",
"#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:true},chart:{borderColor:"#4572A7",borderRadius:5,
defaultSeriesType:"line",ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0"},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,animation:{duration:1E3},
events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:xa(eb,{enabled:false,y:-6,formatter:function(){return this.y}}),showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:lc,color:"#3E576F"}},legend:{enabled:true,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,
borderColor:"#909090",borderRadius:5,shadow:false,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{cursor:"pointer",color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},itemCheckboxStyle:{position:lc,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:"bold",position:Pd,top:"1em"},showDuration:100,style:{position:lc,backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:true,
backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,shadow:true,snap:Hb?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},toolbar:{itemStyle:{color:"#4572A7",cursor:"pointer"}},credits:{enabled:true,text:"ThingSpeak.com",href:"http://www.thingspeak.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var Lc={dateTimeLabelFormats:{second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",
week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:false,gridLineColor:"#C0C0C0",labels:eb,lineColor:"#C0D0E0",lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:false,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},
type:"linear"},fd=xa(Lc,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,title:{rotation:270,text:"Y-values"}}),Zd={labels:{align:"right",x:-8,y:null},title:{rotation:270}},Yd={labels:{align:"left",x:8,y:null},title:{rotation:90}},Ld={labels:{align:"center",x:0,y:14},title:{rotation:0}},Xd=xa(Ld,{labels:{y:-5}}),vb=Sa.plotOptions;eb=vb.line;vb.spline=xa(eb);vb.scatter=xa(eb,
{lineWidth:0,states:{hover:{lineWidth:0}}});vb.area=xa(eb,{});vb.areaspline=xa(vb.area);vb.column=xa(eb,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,shadow:false},select:{color:"#C0C0C0",borderColor:"#000000",shadow:false}}});vb.bar=xa(vb.column,{dataLabels:{align:"left",x:5,y:0}});vb.pie=xa(eb,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:true,dataLabels:{distance:30,enabled:true,
formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,size:"75%",showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});Bd();var Ub=function(a){var b=[],c;(function(d){if(c=/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*\)/.exec(d))b=[pa(c[1]),pa(c[2]),pa(c[3]),parseFloat(c[4],10)];else if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(d))b=[pa(c[1],16),pa(c[2],16),pa(c[3],16),1]})(a);return{get:function(d){return b&&
!isNaN(b[0])?d=="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":d=="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(d){if(ac(d)&&d!==0){var e;for(e=0;e<3;e++){b[e]+=pa(d*255);if(b[e]<0)b[e]=0;if(b[e]>255)b[e]=255}}return this},setOpacity:function(d){b[3]=d;return this}}};Mc=function(a,b,c){function d(F){return F.toString().replace(/^([0-9])$/,"0$1")}if(!I(b)||isNaN(b))return"Invalid date";a=y(a,"%Y-%m-%d %H:%M:%S");b=new Date(b*ob);var e=b[ad](),f=b[bd](),g=b[oc](),i=b[Dc](),l=b[Ec](),j=Sa.lang,n=j.weekdays;
j=j.months;b={a:n[f].substr(0,3),A:n[f],d:d(g),e:g,b:j[i].substr(0,3),B:j[i],m:d(i+1),y:l.toString().substr(2,2),Y:l,H:d(e),I:d(e%12||12),l:e%12||12,M:d(b[$c]()),p:e<12?"AM":"PM",P:e<12?"am":"pm",S:d(b.getSeconds())};for(var z in b)a=a.replace("%"+z,b[z]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Hc.prototype={init:function(a,b){this.element=za.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a},animate:function(a,b,c){if(b=y(b,Bc,true)){b=xa(b);if(c)b.complete=c;Xc(this,a,
b)}else{this.attr(a);c&&c()}},attr:function(a,b){var c,d,e,f,g=this.element,i=g.nodeName,l=this.renderer,j,n=this.shadows,z,F=this;if(Jb(a)&&I(b)){c=a;a={};a[c]=b}if(Jb(a)){c=a;if(i=="circle")c={x:"cx",y:"cy"}[c]||c;else if(c=="strokeWidth")c="stroke-width";F=ya(g,c)||this[c]||0;if(c!="d"&&c!="visibility")F=parseFloat(F)}else for(c in a){j=false;d=a[c];if(c=="d"){if(d&&d.join)d=d.join(" ");if(/(NaN| {2}|^$)/.test(d))d="M 0 0";this.d=d}else if(c=="x"&&i=="text"){for(e=0;e<g.childNodes.length;e++){f=
g.childNodes[e];ya(f,"x")==ya(g,"x")&&ya(f,"x",d)}if(this.rotation)ya(g,"transform","rotate("+this.rotation+" "+d+" "+pa(a.y||ya(g,"y"))+")")}else if(c=="fill")d=l.color(d,g,c);else if(i=="circle"&&(c=="x"||c=="y"))c={x:"cx",y:"cy"}[c]||c;else if(c=="translateX"||c=="translateY"||c=="rotation"||c=="verticalAlign"){this[c]=d;this.updateTransform();j=true}else if(c=="stroke")d=l.color(d,g,c);else if(c=="dashstyle"){c="stroke-dasharray";if(d){d=d.toLowerCase().replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot",
"3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=d.length;e--;)d[e]=pa(d[e])*a["stroke-width"];d=d.join(",")}}else if(c=="isTracker")this[c]=d;else if(c=="width")d=pa(d);else if(c=="align"){c="text-anchor";d={left:"start",center:"middle",right:"end"}[d]}if(c=="strokeWidth")c="stroke-width";if(ce&&c=="stroke-width"&&d===0)d=1.0E-6;if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(c)){if(!z){this.symbolAttr(a);
z=true}j=true}if(n&&/^(width|height|visibility|x|y|d)$/.test(c))for(e=n.length;e--;)ya(n[e],c,d);if(c=="text"){this.textStr=d;this.added&&l.buildText(this)}else j||ya(g,c,d)}return F},symbolAttr:function(a){this.x=y(a.x,this.x);this.y=y(a.y,this.y);this.r=y(a.r,this.r);this.start=y(a.start,this.start);this.end=y(a.end,this.end);this.width=y(a.width,this.width);this.height=y(a.height,this.height);this.innerR=y(a.innerR,this.innerR);this.attr({d:this.renderer.symbols[this.symbolName](this.x,this.y,
this.r,{start:this.start,end:this.end,width:this.width,height:this.height,innerR:this.innerR})})},clip:function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},css:function(a){var b=this.element;b=a&&a.width&&b.nodeName=="text";if(a&&a.color)a.fill=a.color;this.styles=a=oa(this.styles,a);if(Ac&&!wc){b&&delete a.width;Ia(this.element,a)}else this.attr({style:Wd(a)});b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=b;if(Hb&&a=="click"){a="touchstart";
c=function(d){d.preventDefault();b()}}this.element["on"+a]=c;return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=true;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];if(c){a+=this.attr("width");b+=this.attr("height")}if(a||b)e.push("translate("+a+","+b+")");if(c)e.push("rotate(90) scale(-1,1)");else d&&e.push("rotate("+d+" "+this.x+" "+this.y+
")");e.length&&ya(this.element,"transform",e.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){if(a){this.alignOptions=a;this.alignByTranslate=b;c||this.renderer.alignedObjects.push(this)}else{a=this.alignOptions;b=this.alignByTranslate}c=y(c,this.renderer);var d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),i={};if(/^(right|center)$/.test(d))f+=(c.width-(a.width||0))/{right:1,center:2}[d];i[b?"translateX":"x"]=f;if(/^(bottom|middle)$/.test(e))g+=
(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);i[b?"translateY":"y"]=g;this[this.placed?"animate":"attr"](i);this.placed=true;return this},getBBox:function(){var a,b,c,d=this.rotation,e=d*Ud;try{a=oa({},this.element.getBBox())}catch(f){a={width:0,height:0}}b=a.width;c=a.height;if(d){a.width=cb(c*yb(e))+cb(b*jb(e));a.height=cb(c*jb(e))+cb(b*yb(e))}return a},show:function(){return this.attr({visibility:Ab})},hide:function(){return this.attr({visibility:ub})},add:function(a){var b=this.renderer,
c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=ya(f,"zIndex");this.parentInverted=a&&a.inverted;this.textStr!==undefined&&b.buildText(this);if(g){c.handleZ=true;g=pa(g)}if(c.handleZ)for(c=0;c<e.length;c++){a=e[c];b=ya(a,"zIndex");if(a!=f&&(pa(b)>g||!I(g)&&I(b))){d.insertBefore(f,a);return this}}d.appendChild(f);this.added=true;return this},destroy:function(){var a=this.element||{},b=this.shadows,c=a.parentNode,d;a.onclick=a.onmouseout=a.onmouseover=a.onmousemove=null;Sc(this);c&&c.removeChild(a);
b&&t(b,function(e){(c=e.parentNode)&&c.removeChild(e)});mc(this.renderer.alignedObjects,this);for(d in this)delete this[d];return null},empty:function(){for(var a=this.element,b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])},shadow:function(a){var b=[],c,d=this.element,e=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(a=1;a<=3;a++){c=d.cloneNode(0);ya(c,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*a,"stroke-width":7-2*a,transform:"translate"+e,fill:mb});d.parentNode.insertBefore(c,
d);b.push(c)}this.shadows=b}return this}};var Uc=function(){this.init.apply(this,arguments)};Uc.prototype={init:function(a,b,c,d){var e=location,f;this.Element=Hc;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element);this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Ac?"":e.href.replace(/#.*?$/,"");this.defs=this.createElement("defs").add();this.forExport=d;this.setSize(b,c,false)},createElement:function(a){var b=new this.Element;
b.init(this,a);return b},buildText:function(a){for(var b=a.element,c=y(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br[^>]?>/g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=ya(b,"x"),i=a.styles,l=Rd&&i&&i.HcDirection=="rtl"&&!this.forExport,j,n=i&&pa(i.width),z=i&&i.lineHeight,F,W=d.length;W--;)b.removeChild(d[W]);n&&!a.added&&
this.box.appendChild(b);t(c,function(ba,ka){var v,J=0,ea;ba=ba.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");v=ba.split("|||");t(v,function(Y){if(Y!==""||v.length==1){var V={},R=za.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(Y)&&ya(R,"style",Y.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(f.test(Y)){ya(R,"onclick",'location.href="'+Y.match(f)[1]+'"');Ia(R,{cursor:"pointer"})}Y=Y.replace(/<(.|\n)*?>/g,"")||" ";if(l){j=[];for(W=Y.length;W--;)j.push(Y.charAt(W));
Y=j.join("")}R.appendChild(za.createTextNode(Y));if(J)V.dx=3;else V.x=g;if(!J){if(ka){ea=pa(window.getComputedStyle(F,null).getPropertyValue("line-height"));if(isNaN(ea))ea=z||F.offsetHeight||18;ya(R,"dy",ea)}F=R}ya(R,V);b.appendChild(R);J++;if(n){Y=Y.replace(/-/g,"- ").split(" ");for(var Ha,Ya=[];Y.length||Ya.length;){Ha=b.getBBox().width;V=Ha>n;if(!V||Y.length==1){Y=Ya;Ya=[];if(Y.length){R=za.createElementNS("http://www.w3.org/2000/svg","tspan");ya(R,{x:g,dy:z||16});b.appendChild(R);if(Ha>n)n=Ha}}else{R.removeChild(R.firstChild);
Ya.unshift(Y.pop())}R.appendChild(za.createTextNode(Y.join(" ").replace(/- /g,"-")))}}}})})},crispLine:function(a,b){if(a[1]==a[4])a[1]=a[4]=U(a[1])+b%2/2;if(a[2]==a[5])a[2]=a[5]=U(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:mb})},circle:function(a,b,c){a=Db(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(Db(a)){b=a.y;c=a.r;d=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc",a||0,b||0,c||0,{innerR:d||
0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(arguments.length>1){var g=(f||0)%2/2;a=U(a||0)+g;b=U(b||0)+g;c=U((c||0)-2*g);d=U((d||0)-2*g)}g=Db(a)?a:{x:a,y:b,width:Da(c,0),height:Da(d,0)};return this.createElement("rect").attr(oa(g,{rx:e||g.r,ry:e||g.r,fill:mb}))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[y(c,true)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){return this.createElement("g").attr(I(a)&&
{"class":Zb+a})},image:function(a,b,c,d,e){var f={preserveAspectRatio:mb};arguments.length>1&&oa(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a);return f},symbol:function(a,b,c,d,e){var f,g=this.symbols[a];g=g&&g(b,c,d,e);var i=/^url\((.*?)\)$/;if(g){f=this.path(g);oa(f,{symbolName:a,x:b,y:c,r:d});e&&oa(f,e)}else if(i.test(a)){a=a.match(i)[1];f=this.image(a).attr({x:b,y:c});fb("img",{onload:function(){var l=de[this.src]||
[this.width,this.height];f.attr({width:l[0],height:l[1]}).translate(-U(l[0]/2),-U(l[1]/2))},src:a})}else f=this.circle(b,c,d);return f},symbols:{square:function(a,b,c){c=0.707*c;return[Za,a-c,b-c,Ca,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},triangle:function(a,b,c){return[Za,a,b-1.33*c,Ca,a+c,b+0.67*c,a-c,b+0.67*c,"Z"]},"triangle-down":function(a,b,c){return[Za,a,b+1.33*c,Ca,a-c,b-0.67*c,a+c,b-0.67*c,"Z"]},diamond:function(a,b,c){return[Za,a,b-c,Ca,a+c,b,a,b+c,a-c,b,"Z"]},arc:function(a,b,c,d){var e=d.start,
f=d.end-1.0E-6,g=d.innerR,i=jb(e),l=yb(e),j=jb(f);f=yb(f);d=d.end-e<Tb?0:1;return[Za,a+c*i,b+c*l,"A",c,c,0,d,1,a+c*j,b+c*f,Ca,a+g*j,b+g*f,"A",g,g,0,d,0,a+g*i,b+g*l,"Z"]}},clipRect:function(a,b,c,d){var e=Zb+od++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient;c=Zb+od++;var g,i,l;g=f.createElement("linearGradient").attr({id:c,gradientUnits:"userSpaceOnUse",
x1:b[0],y1:b[1],x2:b[2],y2:b[3]}).add(f.defs);t(a.stops,function(j){if(e.test(j[1])){d=Ub(j[1]);i=d.get("rgb");l=d.get("a")}else{i=j[1];l=1}f.createElement("stop").attr({offset:j[0],"stop-color":i,"stop-opacity":l}).add(g)});return"url("+this.url+"#"+c+")"}else if(e.test(a)){d=Ub(a);ya(b,c+"-opacity",d.get("a"));return d.get("rgb")}else return a},text:function(a,b,c){var d=Sa.chart.style;b=U(y(b,0));c=U(y(c,0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({"font-family":d.fontFamily,"font-size":d.fontSize});
a.x=b;a.y=c;return a}};var Ma;if(!wc){var ge=wb(Hc,{init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",lc,";"];if(b=="shape"||b==Kb)d.push("left:0;top:0;width:10px;height:10px;");if(yc)d.push("visibility: ",b==Kb?ub:Ab);c.push(' style="',d.join(""),'"/>');if(b){c=b==Kb||b=="span"||b=="img"?c.join(""):a.prepVML(c);this.element=fb(c)}this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box;d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);yc&&d.gVis==ub&&
Ia(c,{visibility:ub});d.appendChild(c);this.added=true;this.alignOnAdd&&this.updateTransform();return this},attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,i=f.nodeName,l=this.renderer,j=this.symbolName,n,z,F=this.shadows,W=this;if(Jb(a)&&I(b)){c=a;a={};a[c]=b}if(Jb(a)){c=a;W=c=="strokeWidth"||c=="stroke-width"?this.strokeweight:this[c]}else for(c in a){d=a[c];n=false;if(j&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!z){this.symbolAttr(a);z=true}n=true}else if(c=="d"){d=d||[];
this.d=d.join(" ");e=d.length;for(n=[];e--;)n[e]=ac(d[e])?U(d[e]*10)-5:d[e]=="Z"?"x":d[e];d=n.join(" ")||"x";f.path=d;if(F)for(e=F.length;e--;)F[e].path=d;n=true}else if(c=="zIndex"||c=="visibility"){if(yc&&c=="visibility"&&i=="DIV"){f.gVis=d;n=f.childNodes;for(e=n.length;e--;)Ia(n[e],{visibility:d});if(d==Ab)d=null}if(d)g[c]=d;n=true}else if(/^(width|height)$/.test(c)){if(this.updateClipping){this[c]=d;this.updateClipping()}else g[c]=d;n=true}else if(/^(x|y)$/.test(c)){this[c]=d;if(f.tagName=="SPAN")this.updateTransform();
else g[{x:"left",y:"top"}[c]]=d}else if(c=="class")f.className=d;else if(c=="stroke"){d=l.color(d,f,c);c="strokecolor"}else if(c=="stroke-width"||c=="strokeWidth"){f.stroked=d?true:false;c="strokeweight";this[c]=d;if(ac(d))d+=$a}else if(c=="dashstyle"){(f.getElementsByTagName("stroke")[0]||fb(l.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid";this.dashstyle=d;n=true}else if(c=="fill")if(i=="SPAN")g.color=d;else{f.filled=d!=mb?true:false;d=l.color(d,f,c);c="fillcolor"}else if(c=="translateX"||c==
"translateY"||c=="rotation"||c=="align"){if(c=="align")c="textAlign";this[c]=d;this.updateTransform();n=true}else if(c=="text"){f.innerHTML=d;n=true}if(F&&c=="visibility")for(e=F.length;e--;)F[e].style[c]=d;if(!n)if(yc)f[c]=d;else ya(f,c,d)}return W},clip:function(a){var b=this,c=a.members;c.push(b);b.destroyClip=function(){mc(c,b)};return b.css(a.getCSS(b.inverted))},css:function(a){var b=this.element;if(b=a&&b.tagName=="SPAN"&&a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=
oa(this.styles,a);Ia(this.element,a);return this},destroy:function(){this.destroyClip&&this.destroyClip();Hc.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;){c=a[b];c.parentNode.removeChild(c)}},getBBox:function(){var a=this.element;if(a.nodeName=="text")a.style.position=lc;return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},on:function(a,b){this.element["on"+a]=function(){var c=sb.event;c.target=c.srcElement;b(c)};return this},
updateTransform:function(){if(this.added){var a=this,b=a.element,c=a.translateX||0,d=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||"left",i={left:0,center:0.5,right:1}[g],l=g&&g!="left";if(c||d)a.css({marginLeft:c,marginTop:d});a.inverted&&t(b.childNodes,function(J){a.renderer.invertChild(J,b)});if(b.tagName=="SPAN"){var j,n;c=a.rotation;var z;j=0;d=1;var F=0,W;z=pa(a.textWidth);var ba=a.xCorr||0,ka=a.yCorr||0,v=[c,g,b.innerHTML,a.textWidth].join(",");if(v!=a.cTT){if(I(c)){j=c*Ud;d=jb(j);F=yb(j);
Ia(b,{filter:c?["progid:DXImageTransform.Microsoft.Matrix(M11=",d,", M12=",-F,", M21=",F,", M22=",d,", sizingMethod='auto expand')"].join(""):mb})}j=b.offsetWidth;n=b.offsetHeight;if(j>z){Ia(b,{width:z+$a,display:"block",whiteSpace:"normal"});j=z}z=U(pa(b.style.fontSize||12)*1.2);ba=d<0&&-j;ka=F<0&&-n;W=d*F<0;ba+=F*z*(W?1-i:i);ka-=d*z*(c?W?i:1-i:1);if(l){ba-=j*i*(d<0?-1:1);if(c)ka-=n*i*(F<0?-1:1);Ia(b,{textAlign:g})}a.xCorr=ba;a.yCorr=ka}Ia(b,{left:e+ba,top:f+ka});a.cTT=v}}else this.alignOnAdd=true},
shadow:function(a){var b=[],c=this.element,d=this.renderer,e,f=c.style,g,i=c.path;if(""+c.path==="")i="x";if(a){for(a=1;a<=3;a++){g=['<shape isShadow="true" strokeweight="',7-2*a,'" filled="false" path="',i,'" coordsize="100,100" style="',c.style.cssText,'" />'];e=fb(d.prepVML(g),null,{left:pa(f.left)+1,top:pa(f.top)+1});g=['<stroke color="black" opacity="',0.05*a,'"/>'];fb(d.prepVML(g),null,null,e);c.parentNode.insertBefore(e,c);b.push(e)}this.shadows=b}return this}});Ma=function(){this.init.apply(this,
arguments)};Ma.prototype=xa(Uc.prototype,{isIE8:xc.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d;this.Element=ge;this.alignedObjects=[];d=this.createElement(Kb);a.appendChild(d.element);this.box=d.element;this.boxWrapper=d;this.setSize(b,c,false);if(!za.namespaces.hcv){za.namespaces.add("hcv","urn:schemas-microsoft-com:vml");za.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}},clipRect:function(a,b,c,d){var e=
this.createElement();return oa(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(f){var g=this.top,i=this.left,l=i+this.width,j=g+this.height;g={clip:"rect("+U(f?i:g)+"px,"+U(f?j:l)+"px,"+U(f?l:j)+"px,"+U(f?g:i)+"px)"};!f&&yc&&oa(g,{width:l+$a,height:j+$a});return g},updateClipping:function(){t(e.members,function(f){f.css(e.getCSS(f.inverted))})}})},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,i=a.linearGradient,l,j,n,z;t(a.stops,function(F,W){if(e.test(F[1])){d=
Ub(F[1]);f=d.get("rgb");g=d.get("a")}else{f=F[1];g=1}if(W){n=f;z=g}else{l=f;j=g}});a=90-Ua.atan((i[3]-i[1])/(i[2]-i[0]))*180/Tb;c=["<",c,' colors="0% ',l,",100% ",n,'" angle="',a,'" opacity="',z,'" o:opacity2="',j,'" type="gradient" focus="100%" />'];fb(this.prepVML(c),null,null,b)}else if(e.test(a)&&b.tagName!="IMG"){d=Ub(a);c=["<",c,' opacity="',d.get("a"),'"/>'];fb(this.prepVML(c),null,null,b);return d.get("rgb")}else return a},prepVML:function(a){var b=this.isIE8;a=a.join("");if(b){a=a.replace("/>",
' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')==-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')}else a=a.replace("<","<hcv:");return a},text:function(a,b,c){var d=Sa.chart.style;return this.createElement("span").attr({text:a,x:U(b),y:U(c)}).css({whiteSpace:"nowrap",fontFamily:d.fontFamily,fontSize:d.fontSize})},path:function(a){return this.createElement("shape").attr({coordsize:"100 100",
d:a})},circle:function(a,b,c){return this.path(this.symbols.circle(a,b,c))},g:function(a){var b;if(a)b={className:Zb+a,"class":Zb+a};return this.createElement(Kb).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b,c,d,e,f){if(arguments.length>1){var g=(f||0)%2/2;a=U(a||0)+g;b=U(b||0)+g;c=U((c||0)-2*g);d=U((d||0)-2*g)}if(Db(a)){b=a.y;c=a.width;d=a.height;e=a.r;a=a.x}return this.symbol("rect",
a||0,b||0,e||0,{width:c||0,height:d||0})},invertChild:function(a,b){var c=b.style;Ia(a,{flip:"x",left:pa(c.width)-10,top:pa(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d){var e=d.start,f=d.end,g=jb(e),i=yb(e),l=jb(f),j=yb(f);d=d.innerR;var n=0.07/c,z=d&&0.1/d||0;if(f-e===0)return["x"];else if(2*Tb-f+e<n)l=-n;else if(f-e<z)l=jb(e+z);return["wa",a-c,b-c,a+c,b+c,a+c*g,b+c*i,a+c*l,b+c*j,"at",a-d,b-d,a+d,b+d,a+d*l,b+d*j,a+d*g,b+d*i,"x","e"]},circle:function(a,b,c){return["wa",a-c,b-c,a+c,
b+c,a+c,b,a+c,b,"e"]},rect:function(a,b,c,d){var e=d.width;d=d.height;var f=a+e,g=b+d;c=nb(c,e,d);return[Za,a+c,b,Ca,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,Ca,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,Ca,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,Ca,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}})}var Qd=wc?Uc:Ma;Hd.prototype.callbacks=[];var zc=function(){};zc.prototype={init:function(a,b){var c;this.series=a;this.applyOptions(b);this.pointAttr={};if(a.options.colorByPoint){c=a.chart.options.colors;
if(!this.options)this.options={};this.color=this.options.color=this.color||c[Ib++];if(Ib>=c.length)Ib=0}a.chart.pointCount++;return this},applyOptions:function(a){var b=this.series;this.config=a;if(ac(a)||a===null)this.y=a;else if(Db(a)&&!ac(a.length)){oa(this,a);this.options=a}else if(Jb(a[0])){this.name=a[0];this.y=a[1]}else if(ac(a[0])){this.x=a[0];this.y=a[1]}if(this.x===Ra)this.x=b.autoIncrement()},destroy:function(){var a=this,b=a.series,c;b.chart.pointCount--;a==b.chart.hoverPoint&&a.onMouseOut();
b.chart.hoverPoints=null;Bb(a);t(["graphic","tracker","group","dataLabel","connector"],function(d){a[d]&&a[d].destroy()});a.legendItem&&a.series.chart.legend.destroyItem(a);for(c in a)a[c]=null},select:function(a,b){var c=this,d=c.series.chart;c.selected=a=y(a,!c.selected);c.firePointEvent(a?"select":"unselect");c.setState(a&&"select");b||t(d.getSelectedPoints(),function(e){if(e.selected&&e!=c){e.selected=false;e.setState(db);e.firePointEvent("unselect")}})},onMouseOver:function(){var a=this.series.chart,
b=a.tooltip,c=a.hoverPoint;c&&c!=this&&c.onMouseOut();this.firePointEvent("mouseOver");b&&!b.shared&&b.refresh(this);this.setState(xb);a.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut");this.setState();this.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series;return['<span style="color:'+b.color+'">',this.name||b.name,"</span>: ",!a?"<b>x = "+(this.name||this.x)+",</b> ":"","<b>",!a?"y = ":"",this.y,"</b><br/>"].join("")},getDataLabelText:function(){return this.series.options.dataLabels.formatter.call({x:this.x,
y:this.y,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal})},update:function(a,b,c){var d=this,e=d.series,f=d.dataLabel,g=e.chart;b=y(b,true);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);f&&f.attr({text:d.getDataLabelText()});if(Db(a)){e.getAttribs();d.graphic.attr(d.pointAttr[e.state])}e.isDirty=true;b&&g.redraw(c)})},remove:function(a,b){var c=this,d=c.series,e=d.chart,f=d.data;bc(b,e);a=y(a,true);c.firePointEvent("remove",null,function(){mc(f,
c);c.destroy();d.isDirty=true;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;if(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])this.importEvents();if(a=="click"&&e.allowPointSelect)c=function(f){d.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};La(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=xa(this.series.options.point,this.options).events,b;this.events=a;for(b in a)Qa(this,b,a[b]);this.hasImportedEvents=true}},setState:function(a){var b=
this.series,c=b.options.states,d=vb[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===false,g=b.stateMarkerGraphic,i=b.chart,l=this.pointAttr;a||(a=db);if(!(a==this.state||this.selected&&a!="select"||c[a]&&c[a].enabled===false||a&&(f||e&&!d.enabled))){if(this.graphic)this.graphic.attr(l[a]);else{if(a){if(!g)b.stateMarkerGraphic=g=i.renderer.circle(0,0,l[a].r).attr(l[a]).add(b.group);g.translate(this.plotX,this.plotY)}if(g)g[a?"show":"hide"]()}this.state=a}}};var lb=
function(){};lb.prototype={isCartesian:true,type:"line",pointClass:zc,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var c,d;d=a.series.length;this.chart=a;b=this.setOptions(b);oa(this,{index:d,options:b,name:b.name||"Series "+(d+1),state:db,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});d=b.events;for(c in d)Qa(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=
true;this.getColor();this.getSymbol();this.setData(b.data,false)},autoIncrement:function(){var a=this.options,b=this.xIncrement;b=y(b,a.pointStart,0);this.pointInterval=y(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},cleanData:function(){var a=this.chart,b=this.data,c,d,e=a.smallestInterval,f,g;b.sort(function(i,l){return i.x-l.x});for(g=b.length-1;g>=0;g--)b[g-1]&&b[g-1].x==b[g].x&&b.splice(g-1,1);for(g=b.length-1;g>=0;g--)if(b[g-1]){f=b[g].x-b[g-1].x;if(d===
Ra||f<d){d=f;c=g}}if(e===Ra||d<e)a.smallestInterval=d;this.closestPoints=c},getSegments:function(){var a=-1,b=[],c=this.data;t(c,function(d,e){if(d.y===null){e>a+1&&b.push(c.slice(a+1,e));a=e}else e==c.length-1&&b.push(c.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions;return xa(b[this.type],b.series,a)},getColor:function(){var a=this.chart.options.colors;this.color=this.options.color||a[Ib++]||"#0000ff";if(Ib>=a.length)Ib=0},getSymbol:function(){var a=
this.chart.options.symbols;this.symbol=this.options.marker.symbol||a[Wc++];if(Wc>=a.length)Wc=0},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,i=this.chart;a=(new this.pointClass).init(this,a);bc(d,i);if(f&&c)f.shift=c;if(g){g.shift=c;g.isArea=true}b=y(b,true);e.push(a);c&&e[0].remove(false);this.isDirty=true;b&&i.redraw()},setData:function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;c.xIncrement=null;if(I(e))Ib=e;for(a=jc(nc(a||[]),function(i){return(new c.pointClass).init(c,
i)});g--;)d[g].destroy();c.data=a;c.cleanData();c.getSegments();c.isDirty=true;f.isDirtyBox=true;y(b,true)&&f.redraw(false)},remove:function(a,b){var c=this,d=c.chart;a=y(a,true);if(!c.isRemoving){c.isRemoving=true;La(c,"remove",null,function(){c.destroy();d.isDirtyLegend=d.isDirtyBox=true;a&&d.redraw(b)})}c.isRemoving=false},translate:function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],i=g.x,l=g.y,j=g.low,n=d.stacks[(l<
0?"-":"")+this.stackKey];g.plotX=this.xAxis.translate(i);if(b&&this.visible&&n[i]){j=n[i];i=j.total;j.cum=j=j.cum-l;l=j+l;if(b=="percent"){j=i?j*100/i:0;l=i?l*100/i:0}g.percentage=i?g.y*100/i:0;g.stackTotal=i}if(I(j))g.yBottom=d.translate(j,0,1);if(l!==null)g.plotY=d.translate(l,0,1);g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX;g.category=c&&c[g.x]!==Ra?c[g.x]:g.x}},setTooltipPoints:function(a){var b=this.chart,c=b.inverted,d=[],e=U((c?b.plotTop:b.plotLeft)+b.plotSizeX),f,g,i=[];if(a)this.tooltipPoints=
null;t(this.segments,function(l){d=d.concat(l)});if(this.xAxis&&this.xAxis.reversed)d=d.reverse();t(d,function(l,j){f=d[j-1]?d[j-1].high+1:0;for(g=l.high=d[j+1]?Lb((l.plotX+(d[j+1]?d[j+1].plotX:e))/2):e;f<=g;)i[c?e-f++:f++]=l});this.tooltipPoints=i},onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(!(!Hb&&a.mouseIsDown)){b&&b!=this&&b.onMouseOut();this.options.events.mouseOver&&La(this,"mouseOver");this.tracker&&this.tracker.toFront();this.setState(xb);a.hoverSeries=this}},onMouseOut:function(){var a=
this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut();this&&a.events.mouseOut&&La(this,"mouseOut");c&&!a.stickyTracking&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect,d=this.options.animation;if(d&&!Db(d))d={};if(a){if(!c.isAnimating){c.attr("width",0);c.isAnimating=true}}else{c.animate({width:b.plotSizeX},d);this.animate=null}},drawPoints:function(){var a,b=this.data,c=this.chart,d,e,f,g,i,l;if(this.options.marker.enabled)for(f=
b.length;f--;){g=b[f];d=g.plotX;e=g.plotY;l=g.graphic;if(e!==Ra&&!isNaN(e)){a=g.pointAttr[g.selected?"select":db];i=a.r;if(l)l.animate({x:d,y:e,r:i});else g.graphic=c.renderer.symbol(y(g.marker&&g.marker.symbol,this.symbol),d,e,i).attr(a).add(this.group)}}},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,i={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e){g=e[f];i[f]=y(a[g],b[f],c[f],d[f])}return i},getAttribs:function(){var a=this,b=vb[a.type].marker?a.options.marker:a.options,c=
b.states,d=c[xb],e,f=a.color,g={stroke:f,fill:f},i=a.data,l=[],j,n=a.pointAttrToOptions;if(a.options.marker){d.radius=d.radius||b.radius+2;d.lineWidth=d.lineWidth||b.lineWidth+1}else d.color=d.color||Ub(d.color||f).brighten(d.brightness).get();l[db]=a.convertAttribs(b,g);t([xb,"select"],function(F){l[F]=a.convertAttribs(c[F],l[db])});a.pointAttr=l;for(f=i.length;f--;){g=i[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===false)b.radius=0;e=false;if(g.options)for(var z in n)if(I(b[n[z]]))e=
true;if(e){j=[];c=b.states||{};e=c[xb]=c[xb]||{};if(!a.options.marker)e.color=Ub(e.color||g.options.color).brighten(e.brightness||d.brightness).get();j[db]=a.convertAttribs(b,l[db]);j[xb]=a.convertAttribs(c[xb],l[xb],j[db]);j.select=a.convertAttribs(c.select,l.select,j[db])}else j=l;g.pointAttr=j}},destroy:function(){var a=this,b=a.chart,c=/\/5[0-9\.]+ Safari\//.test(xc),d,e;Bb(a);a.legendItem&&a.chart.legend.destroyItem(a);t(a.data,function(f){f.destroy()});t(["area","graph","dataLabelsGroup","group",
"tracker"],function(f){if(a[f]){d=c&&f=="group"?"hide":"destroy";a[f][d]()}});if(b.hoverSeries==a)b.hoverSeries=null;mc(b.series,a);for(e in a)delete a[e]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a,b,c=this.data,d=this.options.dataLabels,e,f=this.dataLabelsGroup,g=this.chart,i=g.inverted,l=this.type,j;if(!f)f=this.dataLabelsGroup=g.renderer.g(Zb+"data-labels").attr({visibility:this.visible?Ab:ub,zIndex:5}).translate(g.plotLeft,g.plotTop).add();j=d.color;if(j=="auto")j=null;
d.style.color=y(j,this.color);t(c,function(n){var z=n.barX;z=z&&z+n.barW/2||n.plotX||-999;var F=y(n.plotY,-999),W=n.dataLabel,ba=d.align;e=n.getDataLabelText();a=(i?g.plotWidth-F:z)+d.x;b=(i?g.plotHeight-z:F)+d.y;if(l=="column")a+={left:-1,right:1}[ba]*n.barW/2||0;if(W)W.animate({x:a,y:b});else if(I(e))W=n.dataLabel=g.renderer.text(e,a,b).attr({align:ba,rotation:d.rotation,zIndex:1}).css(d.style).add(f);i&&!d.y&&W.attr({y:b+parseInt(W.styles.lineHeight)*0.9-W.getBBox().height/2})})}},drawGraph:function(){var a=
this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,i=b.lineColor||a.color,l=b.lineWidth,j=b.dashStyle,n,z=a.chart.renderer,F=a.yAxis.getThreshold(b.threshold||0),W=/^area/.test(a.type),ba=[],ka=[];t(a.segments,function(v){n=[];t(v,function(V,R){if(a.getPointSpline)n.push.apply(n,a.getPointSpline(v,V,R));else{n.push(R?Ca:Za);R&&b.step&&n.push(V.plotX,v[R-1].plotY);n.push(V.plotX,V.plotY)}});if(v.length>1)d=d.concat(n);else ba.push(v[0]);if(W){var J=[],ea,Y=n.length;for(ea=0;ea<Y;ea++)J.push(n[ea]);
Y==3&&J.push(Ca,n[1],n[2]);if(b.stacking&&a.type!="areaspline")for(ea=v.length-1;ea>=0;ea--)J.push(v[ea].plotX,v[ea].yBottom);else J.push(Ca,v[v.length-1].plotX,F,Ca,v[0].plotX,F);ka=ka.concat(J)}});a.graphPath=d;a.singlePoints=ba;if(W){e=y(b.fillColor,Ub(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:ka});else a.area=a.chart.renderer.path(ka).attr({fill:e}).add(g)}if(c)c.animate({d:d});else if(l){c={stroke:i,"stroke-width":l};if(j)c.dashstyle=j;a.graph=z.path(d).attr(c).add(g).shadow(b.shadow)}},
render:function(){var a=this,b=a.chart,c,d,e=a.options,f=e.animation,g=f&&a.animate;f=g?f&&f.duration||500:0;var i=a.clipRect;d=b.renderer;if(!i){i=a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:d.clipRect(0,0,b.plotSizeX,b.plotSizeY);if(!b.clipRect)b.clipRect=i}if(!a.group){c=a.group=d.g("series");if(b.inverted){d=function(){c.attr({width:b.plotWidth,height:b.plotHeight}).invert()};d();Qa(b,"resize",d)}c.clip(a.clipRect).attr({visibility:a.visible?Ab:ub,zIndex:e.zIndex}).translate(b.plotLeft,b.plotTop).add(b.seriesGroup)}a.drawDataLabels();
g&&a.animate(true);a.getAttribs();a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==false&&a.drawTracker();g&&a.animate();setTimeout(function(){i.isAnimating=false;if((c=a.group)&&i!=b.clipRect&&i.renderer){c.clip(a.clipRect=b.clipRect);i.destroy()}},f);a.isDirty=false},redraw:function(){var a=this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:a.plotLeft,translateY:a.plotTop})}this.translate();this.setTooltipPoints(true);
this.render()},setState:function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth;a=a||db;if(this.state!=a){this.state=a;if(!(d[a]&&d[a].enabled===false)){if(a)b=d[a].lineWidth||b+1;if(c&&!c.dashstyle)c.attr({"stroke-width":b},a?0:500)}}},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,i,l=this.data,j=c.options.chart.ignoreHiddenSeries;i=this.visible;i=(this.visible=a=a===Ra?!i:a)?"show":"hide";e&&e[i]();if(f)f[i]();else for(e=
l.length;e--;){f=l[e];f.tracker&&f.tracker[i]()}g&&g[i]();d&&c.legend.colorizeItem(this,a);this.isDirty=true;this.options.stacking&&t(c.series,function(n){if(n.options.stacking&&n.visible)n.isDirty=true});if(j)c.isDirtyBox=true;b!==false&&c.redraw();La(this,i)},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===Ra?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;La(this,a?"select":"unselect")},drawTracker:function(){var a=
this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,i=b.cursor;i=i&&{cursor:i};var l=a.singlePoints,j;if(d)for(j=d+1;j--;){c[j]==Za&&c.splice(j+1,0,c[j+1]-f,c[j+2],Ca);if(j&&c[j]==Za||j==d)c.splice(j,0,Ca,c[j-2]+f,c[j-1])}for(j=0;j<l.length;j++){d=l[j];c.push(Za,d.plotX-f,d.plotY,Ca,d.plotX+f,d.plotY)}if(g)g.attr({d:c});else a.tracker=e.renderer.path(c).attr({isTracker:true,stroke:Vd,fill:mb,"stroke-width":b.lineWidth+2*f,visibility:a.visible?Ab:ub,
zIndex:1}).on(Hb?"touchstart":"mouseover",function(){e.hoverSeries!=a&&a.onMouseOver()}).on("mouseout",function(){b.stickyTracking||a.onMouseOut()}).css(i).add(e.trackerGroup)}};Ma=wb(lb);tb.line=Ma;Ma=wb(lb,{type:"area"});tb.area=Ma;Ma=wb(lb,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],i,l,j,n;if(c&&c<a.length-1){a=f.plotY;j=g.plotX;g=g.plotY;var z;i=(1.5*d+f.plotX)/2.5;l=(1.5*e+a)/2.5;j=(1.5*d+j)/2.5;n=(1.5*e+g)/2.5;z=(n-l)*(j-d)/(j-i)+e-n;l+=z;n+=z;if(l>
a&&l>e){l=Da(a,e);n=2*e-l}else if(l<a&&l<e){l=nb(a,e);n=2*e-l}if(n>g&&n>e){n=Da(g,e);l=2*e-n}else if(n<g&&n<e){n=nb(g,e);l=2*e-n}b.rightContX=j;b.rightContY=n}if(c){b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,i||d,l||e,d,e];f.rightContX=f.rightContY=null}else b=[Za,d,e];return b}});tb.spline=Ma;Ma=wb(Ma,{type:"areaspline"});tb.areaspline=Ma;var Zc=wb(lb,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){lb.prototype.init.apply(this,
arguments);var a=this,b=a.chart;b.hasColumn=true;b.hasRendered&&t(b.series,function(c){if(c.type==a.type)c.isDirty=true})},translate:function(){var a=this,b=a.chart,c=0,d=a.xAxis.reversed,e=a.xAxis.categories,f={},g,i;lb.prototype.translate.apply(a);t(b.series,function(J){if(J.type==a.type){if(J.options.stacking){g=J.stackKey;if(f[g]===Ra)f[g]=c++;i=f[g]}else i=c++;J.columnIndex=i}});var l=a.options,j=a.data,n=a.closestPoints;b=cb(j[1]?j[n].plotX-j[n-1].plotX:b.plotSizeX/(e?e.length:1));e=b*l.groupPadding;
n=(b-2*e)/c;var z=l.pointWidth,F=I(z)?(n-z)/2:n*l.pointPadding,W=Da(y(z,n-2*F),1),ba=F+(e+((d?c-a.columnIndex:a.columnIndex)||0)*n-b/2)*(d?-1:1),ka=a.yAxis.getThreshold(l.threshold||0),v=y(l.minPointLength,5);t(j,function(J){var ea=J.plotY,Y=J.yBottom||ka,V=J.plotX+ba,R=dd(nb(ea,Y)),Ha=dd(Da(ea,Y)-R),Ya;if(cb(Ha)<v){if(v){Ha=v;R=cb(R-ka)>v?Y-v:ka-(ea<=ka?v:0)}Ya=R-3}oa(J,{barX:V,barY:R,barW:W,barH:Ha});J.shapeType="rect";J.shapeArgs={x:V,y:R,width:W,height:Ha,r:l.borderRadius};J.trackerArgs=I(Ya)&&
xa(J.shapeArgs,{height:Da(6,Ha+3),y:Ya})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;t(a.data,function(f){var g=f.plotY;if(g!==Ra&&!isNaN(g)){d=f.graphic;e=f.shapeArgs;if(d){Sc(d);d.animate(e)}else f.graphic=c[f.shapeType](e).attr(f.pointAttr[f.selected?"select":db]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=this,b=a.chart,c=b.renderer,d,e,f=+new Date,g=a.options.cursor,i=g&&{cursor:g},l;t(a.data,function(j){e=
j.tracker;d=j.trackerArgs||j.shapeArgs;if(j.y!==null)if(e)e.attr(d);else j.tracker=c[j.shapeType](d).attr({isTracker:f,fill:Vd,visibility:a.visible?Ab:ub,zIndex:1}).on(Hb?"touchstart":"mouseover",function(n){l=n.relatedTarget||n.fromElement;b.hoverSeries!=a&&ya(l,"isTracker")!=f&&a.onMouseOver();j.onMouseOver()}).on("mouseout",function(n){if(!a.options.stickyTracking){l=n.relatedTarget||n.toElement;ya(l,"isTracker")!=f&&a.onMouseOut()}}).css(i).add(b.trackerGroup)})},animate:function(a){var b=this,
c=b.data;if(!a){t(c,function(d){var e=d.graphic;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:d.barH,y:d.barY},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&t(b.series,function(c){if(c.type==a.type)c.isDirty=true});lb.prototype.remove.apply(a,arguments)}});tb.column=Zc;Ma=wb(Zc,{type:"bar",init:function(a){a.inverted=this.inverted=true;Zc.prototype.init.apply(this,arguments)}});tb.bar=Ma;Ma=wb(lb,{type:"scatter",translate:function(){var a=
this;lb.prototype.translate.apply(a);t(a.data,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,c=b&&{cursor:b},d;t(a.data,function(e){(d=e.graphic)&&d.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();e.onMouseOver()}).on("mouseout",function(){a.options.stickyTracking||a.onMouseOut()}).css(c)})},cleanData:function(){}});tb.scatter=Ma;Ma=wb(zc,{init:function(){zc.prototype.init.apply(this,
arguments);var a=this,b;oa(a,{visible:a.visible!==false,name:y(a.name,"Slice")});b=function(){a.slice()};Qa(a,"select",b);Qa(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel,e=this.connector,f;f=(this.visible=a=a===Ra?!this.visible:a)?"show":"hide";this.group[f]();c&&c[f]();d&&d[f]();e&&e[f]();this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;bc(c,d);y(b,true);a=this.sliced=
I(a)?a:!this.sliced;this.group.animate({translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop})}});Ma=wb(lb,{type:"pie",isCartesian:false,pointClass:Ma,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=Ib},animate:function(){var a=this;t(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-Tb/2;if(c){c.attr({r:0,start:d,end:d});c.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate=null},translate:function(){var a=
0,b=-0.25,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f=c.center,g=this.chart,i=g.plotWidth,l=g.plotHeight,j,n,z,F=this.data,W=2*Tb,ba,ka=nb(i,l),v,J,ea,Y=c.dataLabels.distance;f.push(c.size,c.innerSize||0);f=jc(f,function(V,R){return(v=/%$/.test(V))?[i,l,ka,ka][R]*pa(V)/100:V});this.getX=function(V,R){z=Ua.asin((V-f[1])/(f[2]/2+Y));return f[0]+(R?-1:1)*jb(z)*(f[2]/2+Y)};this.center=f;t(F,function(V){a+=V.y});t(F,function(V){ba=a?V.y/a:0;j=U(b*W*1E3)/1E3;b+=ba;n=U(b*W*1E3)/1E3;V.shapeType="arc";
V.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:j,end:n};z=(n+j)/2;V.slicedTranslation=jc([jb(z)*d+g.plotLeft,yb(z)*d+g.plotTop],U);J=jb(z)*f[2]/2;ea=yb(z)*f[2]/2;V.tooltipPos=[f[0]+J*0.7,f[1]+ea*0.7];V.labelPos=[f[0]+J+jb(z)*Y,f[1]+ea+yb(z)*Y,f[0]+J+jb(z)*e,f[1]+ea+yb(z)*e,f[0]+J,f[1]+ea,Y<0?"center":z<W/4?"left":"right",z];V.percentage=ba*100;V.total=a});this.setTooltipPoints()},render:function(){this.getAttribs();this.drawPoints();this.options.enableMouseTracking!==false&&this.drawTracker();
this.drawDataLabels();this.options.animation&&this.animate&&this.animate();this.isDirty=false},drawPoints:function(){var a=this.chart,b=a.renderer,c,d,e,f;t(this.data,function(g){d=g.graphic;f=g.shapeArgs;e=g.group;if(!e)e=g.group=b.g("point").attr({zIndex:5}).add();c=g.sliced?g.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(c[0],c[1]);if(d)d.animate(f);else g.graphic=b.arc(f).attr(oa(g.pointAttr[db],{"stroke-linejoin":"round"})).add(g.group);g.visible===false&&g.setVisible(false)})},drawDataLabels:function(){var a=
this.data,b,c=this.chart,d=this.options.dataLabels,e=y(d.connectorPadding,10),f=y(d.connectorWidth,1),g,i,l=d.distance>0,j,n,z=this.center[1],F=[[],[],[],[]],W,ba,ka,v,J,ea,Y,V=4,R;lb.prototype.drawDataLabels.apply(this);t(a,function(Ha){var Ya=Ha.labelPos[7];F[Ya<0?0:Ya<Tb/2?1:Ya<Tb?2:3].push(Ha)});F[1].reverse();F[3].reverse();for(Y=function(Ha,Ya){return Ha.y>Ya.y};V--;){a=0;b=[].concat(F[V]);b.sort(Y);for(R=b.length;R--;)b[R].rank=R;for(v=0;v<2;v++){n=(ea=V%3)?9999:-9999;J=ea?-1:1;for(R=0;R<F[V].length;R++){b=
F[V][R];if(g=b.dataLabel){i=b.labelPos;ka=Ab;W=i[0];ba=i[1];j||(j=g&&g.getBBox().height);if(l)if(v&&b.rank<a)ka=ub;else if(!ea&&ba<n+j||ea&&ba>n-j){ba=n+J*j;W=this.getX(ba,V>1);if(!ea&&ba+j>z||ea&&ba-j<z)if(v)ka=ub;else a++}if(b.visible===false)ka=ub;if(ka==Ab)n=ba;if(v){g.attr({visibility:ka,align:i[6]})[g.moved?"animate":"attr"]({x:W+d.x+({left:e,right:-e}[i[6]]||0),y:ba+d.y});g.moved=true;if(l&&f){g=b.connector;i=[Za,W+(i[6]=="left"?5:-5),ba,Ca,W,ba,Ca,i[2],i[3],Ca,i[4],i[5]];if(g){g.animate({d:i});
g.attr("visibility",ka)}else b.connector=g=this.chart.renderer.path(i).attr({"stroke-width":f,stroke:d.connectorColor||"#606060",visibility:ka,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}}}}},drawTracker:Zc.prototype.drawTracker,getSymbol:function(){}});tb.pie=Ma;sb.Highcharts={Chart:Hd,dateFormat:Mc,pathAnim:Yc,getOptions:function(){return Sa},numberFormat:Gd,Point:zc,Color:Ub,Renderer:Qd,seriesTypes:tb,setOptions:function(a){Sa=xa(Sa,a);Bd();return Sa},Series:lb,addEvent:Qa,createElement:fb,
discardElement:Fc,css:Ia,each:t,extend:oa,map:jc,merge:xa,pick:y,extendClass:wb,version:"2.1.3"}})();
(function(){function pa(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function ja(a,b){return parseInt(a,b||10)}function Pb(a){return typeof a==="string"}function Lb(a){return typeof a==="object"}function dc(a){return typeof a==="number"}function qc(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function M(a){return a!==Va&&a!==null}function Ea(a,b,c){var d,e;if(Pb(b))if(M(c))a.setAttribute(b,c);else{if(a&&a.getAttribute)e=a.getAttribute(b)}else if(M(b)&&Lb(b))for(d in b)a.setAttribute(d,
b[d]);return e}function rc(a){if(!a||a.constructor!==Array)a=[a];return a}function C(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++){c=a[b];if(typeof c!=="undefined"&&c!==null)return c}}function Na(a,b){if(Bc)if(b&&b.opacity!==Va)b.filter="alpha(opacity="+b.opacity*100+")";pa(a.style,b)}function ib(a,b,c,d,e){a=wa.createElement(a);b&&pa(a,b);e&&Na(a,{padding:0,border:jb,margin:0});c&&Na(a,c);d&&d.appendChild(a);return a}function yb(a,b){var c=function(){};c.prototype=new a;pa(c.prototype,b);return c}
function zd(a,b,c,d){var e=Wa.lang;a=a;var f=isNaN(b=$a(b))?2:b;b=c===undefined?e.decimalPoint:c;d=d===undefined?e.thousandsSep:d;e=a<0?"-":"";c=String(ja(a=$a(+a||0).toFixed(f)));var g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+$a(a-c).toFixed(f).slice(2):"")}function Ad(){this.symbol=this.color=0}function ec(a,b){Cc=C(a,b.animation)}function Bd(){var a=Wa.global.useUTC;Dc=a?Date.UTC:function(b,c,d,e,f,g){return(new Date(b,c,C(d,1),C(e,
0),C(f,0),C(g,0))).getTime()};bd=a?"getUTCMinutes":"getMinutes";cd=a?"getUTCHours":"getHours";dd=a?"getUTCDay":"getDay";sc=a?"getUTCDate":"getDate";Ec=a?"getUTCMonth":"getMonth";Fc=a?"getUTCFullYear":"getFullYear";Cd=a?"setUTCMinutes":"setMinutes";Dd=a?"setUTCHours":"setHours";ed=a?"setUTCDate":"setDate";Ed=a?"setUTCMonth":"setMonth";Fd=a?"setUTCFullYear":"setFullYear"}function Gc(a){Hc||(Hc=ib(Qb));a&&Hc.appendChild(a);Hc.innerHTML=""}function Ic(){}function Gd(a,b){function c(m,i){function y(k,
o){this.pos=k;this.minor=o;this.isNew=true;o||this.addLabel()}function x(k){if(k){this.options=k;this.id=k.id}return this}function Q(k,o,r){this.isNegative=o;this.options=k;this.x=r;this.alignOptions={align:k.align||(qa?o?"left":"right":"center"),verticalAlign:k.verticalAlign||(qa?"middle":o?"bottom":"top"),y:C(k.y,qa?4:o?14:-6),x:C(k.x,qa?o?-6:6:0)};this.textAlign=k.textAlign||(qa?o?"right":"left":"center")}function na(){var k=[],o=[],r;T=ra=null;Fa=[];u(Ia,function(q){r=false;u(["xAxis","yAxis"],
function(ma){if(q.isCartesian&&(ma==="xAxis"&&Ga||ma==="yAxis"&&!Ga)&&(q.options[ma]===i.index||q.options[ma]===Va&&i.index===0)){q[ma]=v;Fa.push(q);r=true}});if(!q.visible&&w.ignoreHiddenSeries)r=false;if(r){var A,U,G,V,Ba;if(!Ga){A=q.options.stacking;Jc=A==="percent";if(A){V=q.type+C(q.options.stack,"");Ba="-"+V;q.stackKey=V;U=k[V]||[];k[V]=U;G=o[Ba]||[];o[Ba]=G}if(Jc){T=0;ra=99}}if(q.isCartesian){u(q.data,function(ma){var s=ma.x,W=ma.y,ba=W<0,ia=ba?G:U,zb=ba?Ba:V;if(T===null)T=ra=ma[$];if(Ga)if(s>
ra)ra=s;else{if(s<T)T=s}else if(M(W)){if(A)ia[s]=M(ia[s])?ia[s]+W:W;W=ia?ia[s]:W;ma=C(ma.low,W);if(!Jc)if(W>ra)ra=W;else if(ma<T)T=ma;if(A){t[zb]||(t[zb]={});t[zb][s]||(t[zb][s]=new Q(i.stackLabels,ba,s));t[zb][s].setTotal(W)}}});if(/(area|column|bar)/.test(q.type)&&!Ga)if(T>=0){T=0;Hd=true}else if(ra<0){ra=0;Id=true}}}})}function O(k,o){var r,q;Fb=o?1:sa.pow(10,kb(sa.log(k)/sa.LN10));r=k/Fb;if(!o){o=[1,2,2.5,5,10];if(i.allowDecimals===false||H)if(Fb===1)o=[1,2,5,10];else if(Fb<=0.1)o=[1/Fb]}for(q=
0;q<o.length;q++){k=o[q];if(r<=(o[q]+(o[q+1]||o[q]))/2)break}k*=Fb;return k}function ea(k){var o;o=k;Fb=C(Fb,sa.pow(10,kb(sa.log(Ta)/sa.LN10)));if(Fb<1){o=X(1/Fb)*10;o=X(k*o)/o}return o}function Ma(){var k,o,r,q,A=i.tickInterval,U=i.tickPixelInterval;k=i.maxZoom||(Ga&&!M(i.min)&&!M(i.max)?qb(m.smallestInterval*5,ra-T):null);oa=z?Ca:xa;if(Rb){r=m[Ga?"xAxis":"yAxis"][i.linkedTo];q=r.getExtremes();ca=C(q.min,q.dataMin);fa=C(q.max,q.dataMax)}else{ca=C(Ja,i.min,T);fa=C(Oa,i.max,ra)}if(H){ca=sa.log(ca)/
sa.LN10;fa=sa.log(fa)/sa.LN10}if(fa-ca<k){q=(k-fa+ca)/2;ca=Ha(ca-q,C(i.min,ca-q),T);fa=qb(ca+k,C(i.max,ca+k),ra)}if(!Xa&&!Jc&&!Rb&&M(ca)&&M(fa)){k=fa-ca||1;if(!M(i.min)&&!M(Ja)&&Jd&&(T<0||!Hd))ca-=k*Jd;if(!M(i.max)&&!M(Oa)&&Kd&&(ra>0||!Id))fa+=k*Kd}Ta=ca===fa?1:Rb&&!A&&U===r.options.tickPixelInterval?r.tickInterval:C(A,Xa?1:(fa-ca)*U/oa);if(!F&&!M(i.tickInterval))Ta=O(Ta);v.tickInterval=Ta;Kc=i.minorTickInterval==="auto"&&Ta?Ta/5:i.minorTickInterval;if(F){ta=[];A=Wa.global.useUTC;var G=1E3/rb,V=6E4/
rb,Ba=36E5/rb;U=864E5/rb;k=6048E5/rb;q=2592E6/rb;var ma=31556952E3/rb,s=[["second",G,[1,2,5,10,15,30]],["minute",V,[1,2,5,10,15,30]],["hour",Ba,[1,2,3,4,6,8,12]],["day",U,[1,2]],["week",k,[1,2]],["month",q,[1,2,3,4,6]],["year",ma,null]],W=s[6],ba=W[1],ia=W[2];for(r=0;r<s.length;r++){W=s[r];ba=W[1];ia=W[2];if(s[r+1])if(Ta<=(ba*ia[ia.length-1]+s[r+1][1])/2)break}if(ba===ma&&Ta<5*ba)ia=[1,2,5];s=O(Ta/ba,ia);ia=new Date(ca*rb);ia.setMilliseconds(0);if(ba>=G)ia.setSeconds(ba>=V?0:s*kb(ia.getSeconds()/
s));if(ba>=V)ia[Cd](ba>=Ba?0:s*kb(ia[bd]()/s));if(ba>=Ba)ia[Dd](ba>=U?0:s*kb(ia[cd]()/s));if(ba>=U)ia[ed](ba>=q?1:s*kb(ia[sc]()/s));if(ba>=q){ia[Ed](ba>=ma?0:s*kb(ia[Ec]()/s));o=ia[Fc]()}if(ba>=ma){o-=o%s;ia[Fd](o)}ba===k&&ia[ed](ia[sc]()-ia[dd]()+i.startOfWeek);r=1;o=ia[Fc]();G=ia.getTime()/rb;V=ia[Ec]();for(Ba=ia[sc]();G<fa&&r<Ca;){ta.push(G);if(ba===ma)G=Dc(o+r*s,0)/rb;else if(ba===q)G=Dc(o,V+r*s)/rb;else if(!A&&(ba===U||ba===k))G=Dc(o,V,Ba+r*s*(ba===U?1:7));else G+=ba*s;r++}ta.push(G);Lc=i.dateTimeLabelFormats[W[0]]}else{r=
ea(kb(ca/Ta)*Ta);o=ea(fd(fa/Ta)*Ta);ta=[];for(r=ea(r);r<=o;){ta.push(r);r=ea(r+Ta)}}if(!Rb){if(Xa||Ga&&m.hasColumn){o=(Xa?1:Ta)*0.5;if(Xa||!M(C(i.min,Ja)))ca-=o;if(Xa||!M(C(i.max,Oa)))fa+=o}o=ta[0];r=ta[ta.length-1];if(i.startOnTick)ca=o;else ca>o&&ta.shift();if(i.endOnTick)fa=r;else fa<r&&ta.pop();Mb||(Mb={x:0,y:0});if(!F&&ta.length>Mb[$])Mb[$]=ta.length}}function Aa(){var k,o;Gb=ca;Ld=fa;na();Ma();fb=ua;ua=oa/(fa-ca||1);if(!Ga)for(k in t)for(o in t[k])t[k][o].cum=t[k][o].total;if(!v.isDirty)v.isDirty=
ca!==Gb||fa!==Ld}function Qa(k){k=(new x(k)).render();Sb.push(k);return k}function Ra(){var k=i.title,o=i.stackLabels,r=i.alternateGridColor,q=i.lineWidth,A,U,G=m.hasRendered,V=G&&M(Gb)&&!isNaN(Gb);A=Fa.length&&M(ca)&&M(fa);oa=z?Ca:xa;ua=oa/(fa-ca||1);eb=z?Y:sb;if(A||Rb){if(Kc&&!Xa)for(A=ca+(ta[0]-ca)%Kc;A<=fa;A+=Kc){Zb[A]||(Zb[A]=new y(A,true));V&&Zb[A].isNew&&Zb[A].render(null,true);Zb[A].isActive=true;Zb[A].render()}u(ta,function(s,W){if(!Rb||s>=ca&&s<=fa){V&&tb[s].isNew&&tb[s].render(W,true);
tb[s].isActive=true;tb[s].render(W)}});r&&u(ta,function(s,W){if(W%2===0&&s<fa){fc[s]||(fc[s]=new x);fc[s].options={from:s,to:ta[W+1]!==Va?ta[W+1]:fa,color:r};fc[s].render();fc[s].isActive=true}});G||u((i.plotLines||[]).concat(i.plotBands||[]),function(s){Sb.push((new x(s)).render())})}u([tb,Zb,fc],function(s){for(var W in s)if(s[W].isActive)s[W].isActive=false;else{s[W].destroy();delete s[W]}});if(q){A=Y+(Ka?Ca:0)+P;U=Ua-sb-(Ka?xa:0)+P;A=ga.crispLine([ab,z?Y:A,z?U:ha,La,z?Ya-Hb:A,z?U:Ua-sb],q);if(ka)ka.animate({d:A});
else ka=ga.path(A).attr({stroke:i.lineColor,"stroke-width":q,zIndex:7}).add()}if(v.axisTitle){A=z?Y:ha;q=ja(k.style.fontSize||12);A={low:A+(z?0:oa),middle:A+oa/2,high:A+(z?oa:0)}[k.align];q=(z?ha+xa:Y)+(z?1:-1)*(Ka?-1:1)*gd+(Z===2?q:0);v.axisTitle[G?"animate":"attr"]({x:z?A:q+(Ka?Ca:0)+P+(k.x||0),y:z?q-(Ka?xa:0)+P:A+(k.y||0)})}if(o&&o.enabled){var Ba,ma;o=v.stackTotalGroup;if(!o)v.stackTotalGroup=o=ga.g("stack-labels").attr({visibility:Ab,zIndex:6}).translate(Y,ha).add();for(Ba in t){k=t[Ba];for(ma in k)k[ma].render(o)}}v.isDirty=
false}function Za(k){for(var o=Sb.length;o--;)Sb[o].id===k&&Sb[o].destroy()}var Ga=i.isX,Ka=i.opposite,z=qa?!Ga:Ga,Z=z?Ka?0:2:Ka?1:3,t={};i=va(Ga?Mc:hd,[Xd,Yd,Md,Zd][Z],i);var v=this,N=i.type,F=N==="datetime",H=N==="logarithmic",P=i.offset||0,$=Ga?"x":"y",oa,ua,fb,eb=z?Y:sb,Ib,Tb,gc,L,ka,T,ra,Fa,Ja,Oa,fa=null,ca=null,Gb,Ld,Jd=i.minPadding,Kd=i.maxPadding,Rb=M(i.linkedTo),Hd,Id,Jc;N=i.events;var id,Sb=[],Ta,Kc,Fb,ta,tb={},Zb={},fc={},hc,ic,gd,Lc,Xa=i.categories,$d=i.labels.formatter||function(){var k=
this.value;return Lc?Nc(Lc,k):Ta%1E6===0?k/1E6+"M":Ta%1E3===0?k/1E3+"k":!Xa&&k>=1E3?zd(k,0):k},Oc=z&&i.labels.staggerLines,$b=i.reversed,ac=Xa&&i.tickmarkPlacement==="between"?0.5:0;y.prototype={addLabel:function(){var k=this.pos,o=i.labels,r=!(k===ca&&!C(i.showFirstLabel,1)||k===fa&&!C(i.showLastLabel,0)),q=Xa&&z&&Xa.length&&!o.step&&!o.staggerLines&&!o.rotation&&Ca/Xa.length||!z&&Ca/2,A=this.label;k=$d.call({isFirst:k===ta[0],isLast:k===ta[ta.length-1],dateTimeLabelFormat:Lc,value:Xa&&Xa[k]?Xa[k]:
k});q=q&&{width:Ha(1,X(q-2*(o.padding||10)))+bb};q=pa(q,o.style);if(A===Va)this.label=M(k)&&r&&o.enabled?ga.text(k,0,0).attr({align:o.align,rotation:o.rotation}).css(q).add(gc):null;else A&&A.attr({text:k}).css(q)},getLabelSize:function(){var k=this.label;return k?(this.labelBBox=k.getBBox())[z?"height":"width"]:0},render:function(k,o){var r=!this.minor,q=this.label,A=this.pos,U=i.labels,G=this.gridLine,V=r?i.gridLineWidth:i.minorGridLineWidth,Ba=r?i.gridLineColor:i.minorGridLineColor,ma=r?i.gridLineDashStyle:
i.minorGridLineDashStyle,s=this.mark,W=r?i.tickLength:i.minorTickLength,ba=r?i.tickWidth:i.minorTickWidth||0,ia=r?i.tickColor:i.minorTickColor,zb=r?i.tickPosition:i.minorTickPosition;r=U.step;var lb=o&&Pc||Ua,Nb;Nb=z?Ib(A+ac,null,null,o)+eb:Y+P+(Ka?(o&&jd||Ya)-Hb-Y:0);lb=z?lb-sb+P-(Ka?xa:0):lb-Ib(A+ac,null,null,o)-eb;if(V){A=Tb(A+ac,V,o);if(G===Va){G={stroke:Ba,"stroke-width":V};if(ma)G.dashstyle=ma;this.gridLine=G=V?ga.path(A).attr(G).add(L):null}G&&A&&G.animate({d:A})}if(ba){if(zb==="inside")W=
-W;if(Ka)W=-W;V=ga.crispLine([ab,Nb,lb,La,Nb+(z?0:-W),lb+(z?W:0)],ba);if(s)s.animate({d:V});else this.mark=ga.path(V).attr({stroke:ia,"stroke-width":ba}).add(gc)}if(q&&!isNaN(Nb)){Nb=Nb+U.x-(ac&&z?ac*ua*($b?-1:1):0);lb=lb+U.y-(ac&&!z?ac*ua*($b?1:-1):0);M(U.y)||(lb+=ja(q.styles.lineHeight)*0.9-q.getBBox().height/2);if(Oc)lb+=k/(r||1)%Oc*16;if(r)q[k%r?"hide":"show"]();q[this.isNew?"attr":"animate"]({x:Nb,y:lb})}this.isNew=false},destroy:function(){for(var k in this)this[k]&&this[k].destroy&&this[k].destroy()}};
x.prototype={render:function(){var k=this,o=k.options,r=o.label,q=k.label,A=o.width,U=o.to,G,V=o.from,Ba=o.dashStyle,ma=k.svgElem,s=[],W,ba,ia=o.color;ba=o.zIndex;var zb=o.events;if(A){s=Tb(o.value,A);o={stroke:ia,"stroke-width":A};if(Ba)o.dashstyle=Ba}else if(M(V)&&M(U)){V=Ha(V,ca);U=qb(U,fa);G=Tb(U);if((s=Tb(V))&&G)s.push(G[4],G[5],G[1],G[2]);else s=null;o={fill:ia}}else return;if(M(ba))o.zIndex=ba;if(ma)if(s)ma.animate({d:s},null,ma.onGetPath);else{ma.hide();ma.onGetPath=function(){ma.show()}}else if(s&&
s.length){k.svgElem=ma=ga.path(s).attr(o).add();if(zb){Ba=function(lb){ma.on(lb,function(Nb){zb[lb].apply(k,[Nb])})};for(W in zb)Ba(W)}}if(r&&M(r.text)&&s&&s.length&&Ca>0&&xa>0){r=va({align:z&&G&&"center",x:z?!G&&4:10,verticalAlign:!z&&G&&"middle",y:z?G?16:10:G?6:-4,rotation:z&&!G&&90},r);if(!q)k.label=q=ga.text(r.text,0,0).attr({align:r.textAlign||r.align,rotation:r.rotation,zIndex:ba}).css(r.style).add();G=[s[1],s[4],C(s[6],s[1])];s=[s[2],s[5],C(s[7],s[2])];W=qb.apply(sa,G);ba=qb.apply(sa,s);q.align(r,
false,{x:W,y:ba,width:Ha.apply(sa,G)-W,height:Ha.apply(sa,s)-ba});q.show()}else q&&q.hide();return k},destroy:function(){for(var k in this){this[k]&&this[k].destroy&&this[k].destroy();delete this[k]}qc(Sb,this)}};Q.prototype={setTotal:function(k){this.cum=this.total=k},render:function(k){var o=this.options.formatter.call(this);if(this.label)this.label.attr({text:o,visibility:ub});else this.label=m.renderer.text(o,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,
visibility:ub}).add(k)},setOffset:function(k,o){var r=this.isNegative,q=v.translate(this.total),A=v.translate(0);A=$a(q-A);var U=m.xAxis[0].translate(this.x)+k,G=m.plotHeight;r={x:qa?r?q:q-A:U,y:qa?G-U-o:r?G-q-A:G-q,width:qa?A:o,height:qa?o:A};this.label&&this.label.align(this.alignOptions,null,r).attr({visibility:Ab})}};Ib=function(k,o,r,q,A){var U=1,G=0,V=q?fb:ua;q=q?Gb:ca;V||(V=ua);if(r){U*=-1;G=oa}if($b){U*=-1;G-=U*oa}if(o){if($b)k=oa-k;k=k/V+q;if(H&&A)k=sa.pow(10,k)}else{if(H&&A)k=sa.log(k)/
sa.LN10;k=U*(k-q)*V+G}return k};Tb=function(k,o,r){var q,A,U;k=Ib(k,null,null,r);var G=r&&Pc||Ua,V=r&&jd||Ya,Ba;r=A=X(k+eb);q=U=X(G-k-eb);if(isNaN(k))Ba=true;else if(z){q=ha;U=G-sb;if(r<Y||r>Y+Ca)Ba=true}else{r=Y;A=V-Hb;if(q<ha||q>ha+xa)Ba=true}return Ba?null:ga.crispLine([ab,r,q,La,A,U],o||0)};if(qa&&Ga&&$b===Va)$b=true;pa(v,{addPlotBand:Qa,addPlotLine:Qa,adjustTickAmount:function(){if(Mb&&!F&&!Xa&&!Rb){var k=hc,o=ta.length;hc=Mb[$];if(o<hc){for(;ta.length<hc;)ta.push(ea(ta[ta.length-1]+Ta));ua*=
(o-1)/(hc-1);fa=ta[ta.length-1]}if(M(k)&&hc!==k)v.isDirty=true}},categories:Xa,getExtremes:function(){return{min:ca,max:fa,dataMin:T,dataMax:ra,userMin:Ja,userMax:Oa}},getPlotLinePath:Tb,getThreshold:function(k){if(ca>k)k=ca;else if(fa<k)k=fa;return Ib(k,0,1)},isXAxis:Ga,options:i,plotLinesAndBands:Sb,getOffset:function(){var k=Fa.length&&M(ca)&&M(fa),o=0,r=0,q=i.title,A=i.labels,U=[-1,1,1,-1][Z],G;if(!gc){gc=ga.g("axis").attr({zIndex:7}).add();L=ga.g("grid").attr({zIndex:1}).add()}ic=0;if(k||Rb){u(ta,
function(V){if(tb[V])tb[V].addLabel();else tb[V]=new y(V);if(Z===0||Z===2||{1:"left",3:"right"}[Z]===A.align)ic=Ha(tb[V].getLabelSize(),ic)});if(Oc)ic+=(Oc-1)*16}else for(G in tb){tb[G].destroy();delete tb[G]}if(q&&q.text){if(!v.axisTitle)v.axisTitle=ga.text(q.text,0,0).attr({zIndex:7,rotation:q.rotation||0,align:q.textAlign||{low:"left",middle:"center",high:"right"}[q.align]}).css(q.style).add();o=v.axisTitle.getBBox()[z?"height":"width"];r=C(q.margin,z?5:10)}P=U*(i.offset||Ub[Z]);gd=ic+(Z!==2&&
ic&&U*i.labels[z?"y":"x"])+r;Ub[Z]=Ha(Ub[Z],gd+o+U*P)},render:Ra,setCategories:function(k,o){v.categories=Xa=k;u(Fa,function(r){r.translate();r.setTooltipPoints(true)});v.isDirty=true;C(o,true)&&m.redraw()},setExtremes:function(k,o,r,q){r=C(r,true);Pa(v,"setExtremes",{min:k,max:o},function(){Ja=k;Oa=o;r&&m.redraw(q)})},setScale:Aa,setTickPositions:Ma,translate:Ib,redraw:function(){jc.resetTracker&&jc.resetTracker();Ra();u(Sb,function(k){k.render()});u(Fa,function(k){k.isDirty=true})},removePlotBand:Za,
removePlotLine:Za,reversed:$b,stacks:t});for(id in N)Sa(v,id,N[id]);Aa()}function d(){var m={};return{add:function(i,y,x,Q){if(!m[i]){y=ga.text(y,0,0).css(a.toolbar.itemStyle).align({align:"right",x:-Hb-20,y:ha+30}).on("click",Q).attr({align:"right",zIndex:20}).add();m[i]=y}},remove:function(i){Gc(m[i].element);m[i]=null}}}function e(m){function i(){var F=this.points||rc(this),H=F[0].series.xAxis,P=this.x;H=H&&H.options.type==="datetime";var $=Pb(P)||H,oa;oa=$?['<span style="font-size: 10px">'+(H?
Nc("%A, %b %e, %Y",P):P)+"</span>"]:[];u(F,function(ua){oa.push(ua.point.tooltipFormatter($))});return oa.join("<br/>")}function y(F,H){z=Za?F:(2*z+F)/3;Z=Za?H:(Z+H)/2;t.translate(z,Z);kd=$a(F-z)>1||$a(H-Z)>1?function(){y(F,H)}:null}function x(){if(!Za){var F=p.hoverPoints;t.hide();u(ea,function(H){H&&H.hide()});F&&u(F,function(H){H.setState()});p.hoverPoints=null;Za=true}}var Q,na=m.borderWidth,O=m.crosshairs,ea=[],Ma=m.style,Aa=m.shared,Qa=ja(Ma.padding),Ra=na+Qa,Za=true,Ga,Ka,z=0,Z=0;Ma.padding=
0;var t=ga.g("tooltip").attr({zIndex:8}).add(),v=ga.rect(Ra,Ra,0,0,m.borderRadius,na).attr({fill:m.backgroundColor,"stroke-width":na}).add(t).shadow(m.shadow),N=ga.text("",Qa+Ra,ja(Ma.fontSize)+Qa+Ra).attr({zIndex:1}).css(Ma).add(t);t.hide();return{shared:Aa,refresh:function(F){var H,P,$,oa=0,ua={},fb=[];$=F.tooltipPos;H=m.formatter||i;ua=p.hoverPoints;if(Aa){ua&&u(ua,function(eb){eb.setState()});p.hoverPoints=F;u(F,function(eb){eb.setState(Bb);oa+=eb.plotY;fb.push(eb.getLabelConfig())});P=F[0].plotX;
oa=X(oa)/F.length;ua={x:F[0].category};ua.points=fb;F=F[0]}else ua=F.getLabelConfig();ua=H.call(ua);Q=F.series;P=Aa?P:F.plotX;oa=Aa?oa:F.plotY;H=X($?$[0]:qa?Ca-oa:P);P=X($?$[1]:qa?xa-P:oa);$=Aa||!F.series.isCartesian||kc(H,P);if(ua===false||!$)x();else{if(Za){t.show();Za=false}N.attr({text:ua});$=N.getBBox();Ga=$.width+2*Qa;Ka=$.height+2*Qa;v.attr({width:Ga,height:Ka,stroke:m.borderColor||F.color||Q.color||"#606060"});$=H-Ga+Y-25;P=P-Ka+ha+10;if($<7)$=Y+H+15;if(P<5)P=5;else if(P+Ka>Ua)P=Ua-Ka-5;y(X($-
Ra),X(P-Ra))}if(O){O=rc(O);for(H=O.length;H--;){P=F.series[H?"yAxis":"xAxis"];if(O[H]&&P){P=P.getPlotLinePath(F[H?"y":"x"],1);if(ea[H])ea[H].attr({d:P,visibility:Ab});else{$={"stroke-width":O[H].width||1,stroke:O[H].color||"#C0C0C0",zIndex:2};if(O[H].dashStyle)$.dashstyle=O[H].dashStyle;ea[H]=ga.path(P).attr($).add()}}}}},hide:x}}function f(m,i){function y(z){var Z,t=Nd&&wa.width/wa.documentElement.clientWidth-1,v,N,F;z=z||cb.event;if(!z.target)z.target=z.srcElement;Z=z.touches?z.touches.item(0):
z;if(z.type!=="mousemove"||cb.opera||t){v=ya;N={left:v.offsetLeft,top:v.offsetTop};for(v=v.offsetParent;v;){N.left+=v.offsetLeft;N.top+=v.offsetTop;if(v!==wa.body&&v!==wa.documentElement){N.left-=v.scrollLeft;N.top-=v.scrollTop}v=v.offsetParent}tc=N;v=tc.left;N=tc.top}if(Bc){F=z.x;Z=z.y}else if(Z.layerX===Va){F=Z.pageX-v;Z=Z.pageY-N}else{F=z.layerX;Z=z.layerY}if(t){F+=X((t+1)*v-v);Z+=X((t+1)*N-N)}return pa(z,{chartX:F,chartY:Z})}function x(z){var Z={xAxis:[],yAxis:[]};u(db,function(t){var v=t.translate,
N=t.isXAxis;Z[N?"xAxis":"yAxis"].push({axis:t,value:v((qa?!N:N)?z.chartX-Y:xa-z.chartY+ha,true)})});return Z}function Q(){var z=m.hoverSeries,Z=m.hoverPoint;Z&&Z.onMouseOut();z&&z.onMouseOut();uc&&uc.hide();ld=null}function na(){if(Aa){var z={xAxis:[],yAxis:[]},Z=Aa.getBBox(),t=Z.x-Y,v=Z.y-ha;if(Ma){u(db,function(N){var F=N.translate,H=N.isXAxis,P=qa?!H:H,$=F(P?t:xa-v-Z.height,true,0,0,1);F=F(P?t+Z.width:xa-v,true,0,0,1);z[H?"xAxis":"yAxis"].push({axis:N,min:qb($,F),max:Ha($,F)})});Pa(m,"selection",
z,md)}Aa=Aa.destroy()}m.mouseIsDown=nd=Ma=false;Cb(wa,Jb?"touchend":"mouseup",na)}var O,ea,Ma,Aa,Qa=w.zoomType,Ra=/x/.test(Qa),Za=/y/.test(Qa),Ga=Ra&&!qa||Za&&qa,Ka=Za&&!qa||Ra&&qa;Qc=function(){if(Rc){Rc.translate(Y,ha);qa&&Rc.attr({width:m.plotWidth,height:m.plotHeight}).invert()}else m.trackerGroup=Rc=ga.g("tracker").attr({zIndex:9}).add()};Qc();if(i.enabled)m.tooltip=uc=e(i);(function(){var z=true;ya.onmousedown=function(t){t=y(t);!Jb&&t.preventDefault&&t.preventDefault();m.mouseIsDown=nd=true;
O=t.chartX;ea=t.chartY;Sa(wa,Jb?"touchend":"mouseup",na)};var Z=function(t){if(!(t&&t.touches&&t.touches.length>1)){t=y(t);if(!Jb)t.returnValue=false;var v=t.chartX,N=t.chartY,F=!kc(v-Y,N-ha);if(Jb&&t.type==="touchstart")if(Ea(t.target,"isTracker"))m.runTrackerClick||t.preventDefault();else!ae&&!F&&t.preventDefault();if(F){z||Q();if(v<Y)v=Y;else if(v>Y+Ca)v=Y+Ca;if(N<ha)N=ha;else if(N>ha+xa)N=ha+xa}if(nd&&t.type!=="touchstart"){Ma=Math.sqrt(Math.pow(O-v,2)+Math.pow(ea-N,2));if(Ma>10){if(lc&&(Ra||
Za)&&kc(O-Y,ea-ha))Aa||(Aa=ga.rect(Y,ha,Ga?1:Ca,Ka?1:xa,0).attr({fill:"rgba(69,114,167,0.25)",zIndex:7}).add());if(Aa&&Ga){v=v-O;Aa.attr({width:$a(v),x:(v>0?0:v)+O})}if(Aa&&Ka){N=N-ea;Aa.attr({height:$a(N),y:(N>0?0:N)+ea})}}}else if(!F){var H;N=m.hoverPoint;v=m.hoverSeries;var P,$,oa=Ya,ua=qa?t.chartY:t.chartX-Y;if(uc&&i.shared){H=[];P=Ia.length;for($=0;$<P;$++)if(Ia[$].visible&&Ia[$].tooltipPoints.length){t=Ia[$].tooltipPoints[ua];t._dist=$a(ua-t.plotX);oa=qb(oa,t._dist);H.push(t)}for(P=H.length;P--;)H[P]._dist>
oa&&H.splice(P,1);if(H.length&&H[0].plotX!==ld){uc.refresh(H);ld=H[0].plotX}}if(v&&v.tracker)(t=v.tooltipPoints[ua])&&t!==N&&t.onMouseOver()}return(z=F)||!lc}};ya.onmousemove=Z;Sa(ya,"mouseleave",Q);ya.ontouchstart=function(t){if(Ra||Za)ya.onmousedown(t);Z(t)};ya.ontouchmove=Z;ya.ontouchend=function(){Ma&&Q()};ya.onclick=function(t){var v=m.hoverPoint;t=y(t);t.cancelBubble=true;if(!Ma)if(v&&Ea(t.target,"isTracker")){var N=v.plotX,F=v.plotY;pa(v,{pageX:tc.left+Y+(qa?Ca-F:N),pageY:tc.top+ha+(qa?xa-
N:F)});Pa(v.series,"click",pa(t,{point:v}));v.firePointEvent("click",t)}else{pa(t,x(t));kc(t.chartX-Y,t.chartY-ha)&&Pa(m,"click",t)}Ma=false}})();Od=setInterval(function(){kd&&kd()},32);pa(this,{zoomX:Ra,zoomY:Za,resetTracker:Q})}function g(m){var i=m.type||w.type||w.defaultSeriesType,y=vb[i],x=p.hasRendered;if(x)if(qa&&i==="column")y=vb.bar;else if(!qa&&i==="bar")y=vb.column;i=new y;i.init(p,m);if(!x&&i.inverted)qa=true;if(i.isCartesian)lc=i.isCartesian;Ia.push(i);return i}function h(){w.alignTicks!==
false&&u(db,function(m){m.adjustTickAmount()});Mb=null}function j(m){var i=p.isDirtyLegend,y,x=p.isDirtyBox,Q=Ia.length,na=Q,O=p.clipRect;for(ec(m,p);na--;){m=Ia[na];if(m.isDirty&&m.options.stacking){y=true;break}}if(y)for(na=Q;na--;){m=Ia[na];if(m.options.stacking)m.isDirty=true}u(Ia,function(ea){if(ea.isDirty){ea.cleanData();ea.getSegments();if(ea.options.legendType==="point")i=true}});if(i&&od.renderLegend){od.renderLegend();p.isDirtyLegend=false}if(lc){if(!Sc){Mb=null;u(db,function(ea){ea.setScale()})}h();
vc();u(db,function(ea){if(ea.isDirty||x){ea.redraw();x=true}})}if(x){pd();Qc();if(O){Tc(O);O.animate({width:p.plotSizeX,height:p.plotSizeY})}}u(Ia,function(ea){if(ea.isDirty&&ea.visible&&(!ea.isCartesian||ea.xAxis))ea.redraw()});jc&&jc.resetTracker&&jc.resetTracker();Pa(p,"redraw")}function l(){var m=a.xAxis||{},i=a.yAxis||{},y;m=rc(m);u(m,function(x,Q){x.index=Q;x.isX=true});i=rc(i);u(i,function(x,Q){x.index=Q});db=m.concat(i);p.xAxis=[];p.yAxis=[];db=mc(db,function(x){y=new c(p,x);p[y.isXAxis?"xAxis":
"yAxis"].push(y);return y});h()}function n(m,i){Kb=va(a.title,m);wc=va(a.subtitle,i);u([["title",m,Kb],["subtitle",i,wc]],function(y){var x=y[0],Q=p[x],na=y[1];y=y[2];if(Q&&na){Q.destroy();Q=null}if(y&&y.text&&!Q)p[x]=ga.text(y.text,0,0).attr({align:y.align,"class":"highcharts-"+x,zIndex:1}).css(y.style).add().align(y,false,Ob)})}function J(){mb=w.renderTo;Pd=nc+qd++;if(Pb(mb))mb=wa.getElementById(mb);mb.innerHTML="";if(!mb.offsetWidth){Vb=mb.cloneNode(0);Na(Vb,{position:oc,top:"-9999px",display:""});
wa.body.appendChild(Vb)}Uc=(Vb||mb).offsetWidth;xc=(Vb||mb).offsetHeight;p.chartWidth=Ya=w.width||Uc||600;p.chartHeight=Ua=w.height||(xc>19?xc:400);p.container=ya=ib(Qb,{className:"highcharts-container"+(w.className?" "+w.className:""),id:Pd},pa({position:Qd,overflow:ub,width:Ya+bb,height:Ua+bb,textAlign:"left"},w.style),Vb||mb);p.renderer=ga=w.forExport?new Vc(ya,Ya,Ua,true):new Wc(ya,Ya,Ua);var m,i;if(Rd&&ya.getBoundingClientRect){m=function(){Na(ya,{left:0,top:0});i=ya.getBoundingClientRect();
Na(ya,{left:-(i.left-ja(i.left))+bb,top:-(i.top-ja(i.top))+bb})};m();Sa(cb,"resize",m);Sa(p,"destroy",function(){Cb(cb,"resize",m)})}}function D(){function m(){var y=w.width||mb.offsetWidth,x=w.height||mb.offsetHeight;if(y&&x){if(y!==Uc||x!==xc){clearTimeout(i);i=setTimeout(function(){rd(y,x,false)},100)}Uc=y;xc=x}}var i;Sa(cb,"resize",m);Sa(p,"destroy",function(){Cb(cb,"resize",m)})}function aa(){var m=a.labels,i=a.credits,y;n();od=p.legend=new be(p);vc();u(db,function(x){x.setTickPositions(true)});
h();vc();pd();lc&&u(db,function(x){x.render()});if(!p.seriesGroup)p.seriesGroup=ga.g("series-group").attr({zIndex:3}).add();u(Ia,function(x){x.translate();x.setTooltipPoints();x.render()});m.items&&u(m.items,function(){var x=pa(m.style,this.style),Q=ja(x.left)+Y,na=ja(x.top)+ha+12;delete x.left;delete x.top;ga.text(this.html,Q,na).attr({zIndex:2}).css(x).add()});if(!p.toolbar)p.toolbar=d(p);if(i.enabled&&!p.credits){y=i.href;ga.text(i.text,0,0).on("click",function(){if(y)parent.location.href=y}).attr({align:i.position.align,
zIndex:8}).css(i.style).add().align(i.position)}Qc();p.hasRendered=true;if(Vb){mb.appendChild(ya);Gc(Vb)}}function E(){var m=Ia.length,i=ya&&ya.parentNode;Pa(p,"destroy");Cb(cb,"unload",E);Cb(p);for(u(db,function(y){Cb(y)});m--;)Ia[m].destroy();if(ya){ya.innerHTML="";Cb(ya);i&&i.removeChild(ya);ya=null}if(ga)ga.alignedObjects=null;clearInterval(Od);for(m in p)delete p[m]}function da(){if(!yc&&cb==cb.top&&wa.readyState!=="complete")wa.attachEvent("onreadystatechange",function(){wa.detachEvent("onreadystatechange",
da);wa.readyState==="complete"&&da()});else{J();sd();td();u(a.series||[],function(m){g(m)});p.inverted=qa=C(qa,a.chart.inverted);l();p.render=aa;p.tracker=jc=new f(p,a.tooltip);aa();Pa(p,"load");b&&b.apply(p,[p]);u(p.callbacks,function(m){m.apply(p,[p])})}}Mc=va(Mc,Wa.xAxis);hd=va(hd,Wa.yAxis);Wa.xAxis=Wa.yAxis=null;a=va(Wa,a);var w=a.chart,R=w.margin;R=Lb(R)?R:[R,R,R,R];var B=C(w.marginTop,R[0]),K=C(w.marginRight,R[1]),S=C(w.marginBottom,R[2]),I=C(w.marginLeft,R[3]),za=w.spacingTop,Da=w.spacingRight,
gb=w.spacingBottom,wb=w.spacingLeft,Ob,Kb,wc,ha,Hb,sb,Y,Ub,mb,Vb,ya,Pd,Uc,xc,Ya,Ua,jd,Pc,Xc,ud,vd,Yc,p=this,ae=(R=w.events)&&!!R.click,wd,kc,uc,nd,bc,Sd,xd,xa,Ca,jc,Rc,Qc,od,Wb,Xb,tc,lc=w.showAxes,Sc=0,db=[],Mb,Ia=[],qa,ga,kd,Od,ld,pd,vc,sd,td,rd,md,Td,be=function(m){function i(L,ka){var T=L.legendItem,ra=L.legendLine,Fa=L.legendSymbol,Ja=Ka.color,Oa=ka?O.itemStyle.color:Ja,fa=ka?L.color:Ja;Ja=ka?L.pointAttr[hb]:{stroke:Ja,fill:Ja};T&&T.css({fill:Oa});ra&&ra.attr({stroke:fa});Fa&&Fa.attr(Ja)}function y(L,
ka,T){var ra=L.legendItem,Fa=L.legendLine,Ja=L.legendSymbol;L=L.checkbox;ra&&ra.attr({x:ka,y:T});Fa&&Fa.translate(ka,T-4);Ja&&Ja.attr({x:ka+Ja.xOff,y:T+Ja.yOff});if(L){L.x=ka;L.y=T}}function x(){u(Qa,function(L){var ka=L.checkbox,T=fb.alignAttr;ka&&Na(ka,{left:T.translateX+L.legendItemWidth+ka.x-40+bb,top:T.translateY+ka.y-11+bb})})}function Q(L){var ka,T,ra,Fa,Ja=L.legendItem;Fa=L.series||L;var Oa=Fa.options,fa=Oa&&Oa.borderWidth||0;if(!Ja){Fa=/^(bar|pie|area|column)$/.test(Fa.type);L.legendItem=
Ja=ga.text(O.labelFormatter.call(L),0,0).css(L.visible?Za:Ka).on("mouseover",function(){L.setState(Bb);Ja.css(Ga)}).on("mouseout",function(){Ja.css(L.visible?Za:Ka);L.setState()}).on("click",function(){var Gb=function(){L.setVisible()};L.firePointEvent?L.firePointEvent("legendItemClick",null,Gb):Pa(L,"legendItemClick",null,Gb)}).attr({zIndex:2}).add(fb);if(!Fa&&Oa&&Oa.lineWidth){var ca={"stroke-width":Oa.lineWidth,zIndex:2};if(Oa.dashStyle)ca.dashstyle=Oa.dashStyle;L.legendLine=ga.path([ab,-Ma-Aa,
0,La,-Aa,0]).attr(ca).add(fb)}if(Fa)ka=ga.rect(T=-Ma-Aa,ra=-11,Ma,12,2).attr({zIndex:3}).add(fb);else if(Oa&&Oa.marker&&Oa.marker.enabled)ka=ga.symbol(L.symbol,T=-Ma/2-Aa,ra=-4,Oa.marker.radius).attr({zIndex:3}).add(fb);if(ka){ka.xOff=T+fa%2/2;ka.yOff=ra+fa%2/2}L.legendSymbol=ka;i(L,L.visible);if(Oa&&Oa.showCheckbox){L.checkbox=ib("input",{type:"checkbox",checked:L.selected,defaultChecked:L.selected},O.itemCheckboxStyle,ya);Sa(L.checkbox,"click",function(Gb){Pa(L,"checkboxClick",{checked:Gb.target.checked},
function(){L.select()})})}}ka=Ja.getBBox();T=L.legendItemWidth=O.itemWidth||Ma+Aa+ka.width+Z;P=ka.height;if(ea&&N-v+T>(Ib||Ya-2*z-v)){N=v;F+=P}H=F;y(L,N,F);if(ea)N+=T;else F+=P;eb=Ib||Ha(ea?N-v:T,eb)}function na(){N=v;F=t;H=eb=0;fb||(fb=ga.g("legend").attr({zIndex:7}).add());Qa=[];u(Tb,function(ra){var Fa=ra.options;if(Fa.showInLegend)Qa=Qa.concat(Fa.legendType==="point"?ra.data:ra)});Qa.sort(function(ra,Fa){return(ra.options.legendIndex||0)-(Fa.options.legendIndex||0)});gc&&Qa.reverse();u(Qa,Q);
Wb=Ib||eb;Xb=H-t+P;if(oa||ua){Wb+=2*z;Xb+=2*z;if($)Wb>0&&Xb>0&&$.animate($.crisp(null,null,null,Wb,Xb));else $=ga.rect(0,0,Wb,Xb,O.borderRadius,oa||0).attr({stroke:O.borderColor,"stroke-width":oa||0,fill:ua||jb}).add(fb).shadow(O.shadow);$[Qa.length?"show":"hide"]()}for(var L=["left","right","top","bottom"],ka,T=4;T--;){ka=L[T];if(Ra[ka]&&Ra[ka]!=="auto"){O[T<2?"align":"verticalAlign"]=ka;O[T<2?"x":"y"]=ja(Ra[ka])*(T%2?-1:1)}}fb.align(pa(O,{width:Wb,height:Xb}),true,Ob);Sc||x()}var O=m.options.legend;
if(O.enabled){var ea=O.layout==="horizontal",Ma=O.symbolWidth,Aa=O.symbolPadding,Qa,Ra=O.style,Za=O.itemStyle,Ga=O.itemHoverStyle,Ka=O.itemHiddenStyle,z=ja(Ra.padding),Z=20,t=18,v=4+z+Ma+Aa,N,F,H,P=0,$,oa=O.borderWidth,ua=O.backgroundColor,fb,eb,Ib=O.width,Tb=m.series,gc=O.reversed;na();Sa(m,"endResize",x);return{colorizeItem:i,destroyItem:function(L){var ka=L.checkbox;u(["legendItem","legendLine","legendSymbol"],function(T){L[T]&&L[T].destroy()});ka&&Gc(L.checkbox)},renderLegend:na}}};kc=function(m,
i){return m>=0&&m<=Ca&&i>=0&&i<=xa};Td=function(){Pa(p,"selection",{resetSelection:true},md);p.toolbar.remove("zoom")};md=function(m){var i=Wa.lang,y=p.pointCount<100;p.toolbar.add("zoom",i.resetZoom,i.resetZoomTitle,Td);!m||m.resetSelection?u(db,function(x){x.setExtremes(null,null,false,y)}):u(m.xAxis.concat(m.yAxis),function(x){var Q=x.axis;if(p.tracker[Q.isXAxis?"zoomX":"zoomY"])Q.setExtremes(x.min,x.max,false,y)});j()};vc=function(){var m=a.legend,i=C(m.margin,10),y=m.x,x=m.y,Q=m.align,na=m.verticalAlign,
O;sd();if((p.title||p.subtitle)&&!M(B))if(O=Ha(p.title&&!Kb.floating&&!Kb.verticalAlign&&Kb.y||0,p.subtitle&&!wc.floating&&!wc.verticalAlign&&wc.y||0))ha=Ha(ha,O+C(Kb.margin,15)+za);if(m.enabled&&!m.floating)if(Q==="right")M(K)||(Hb=Ha(Hb,Wb-y+i+Da));else if(Q==="left")M(I)||(Y=Ha(Y,Wb+y+i+wb));else if(na==="top")M(B)||(ha=Ha(ha,Xb+x+i+za));else if(na==="bottom")M(S)||(sb=Ha(sb,Xb-x+i+gb));lc&&u(db,function(ea){ea.getOffset()});M(I)||(Y+=Ub[3]);M(B)||(ha+=Ub[0]);M(S)||(sb+=Ub[2]);M(K)||(Hb+=Ub[1]);
td()};rd=function(m,i,y){var x=p.title,Q=p.subtitle;Sc+=1;ec(y,p);Pc=Ua;jd=Ya;p.chartWidth=Ya=X(m);p.chartHeight=Ua=X(i);Na(ya,{width:Ya+bb,height:Ua+bb});ga.setSize(Ya,Ua,y);Ca=Ya-Y-Hb;xa=Ua-ha-sb;Mb=null;u(db,function(na){na.isDirty=true;na.setScale()});u(Ia,function(na){na.isDirty=true});p.isDirtyLegend=true;p.isDirtyBox=true;vc();x&&x.align(null,null,Ob);Q&&Q.align(null,null,Ob);j(y);Pc=null;Pa(p,"resize");setTimeout(function(){Pa(p,"endResize",null,function(){Sc-=1})},Cc&&Cc.duration||500)};
td=function(){p.plotLeft=Y=X(Y);p.plotTop=ha=X(ha);p.plotWidth=Ca=X(Ya-Y-Hb);p.plotHeight=xa=X(Ua-ha-sb);p.plotSizeX=qa?xa:Ca;p.plotSizeY=qa?Ca:xa;Ob={x:wb,y:za,width:Ya-wb-Da,height:Ua-za-gb}};sd=function(){ha=C(B,za);Hb=C(K,Da);sb=C(S,gb);Y=C(I,wb);Ub=[0,0,0,0]};pd=function(){var m=w.borderWidth||0,i=w.backgroundColor,y=w.plotBackgroundColor,x=w.plotBackgroundImage,Q,na={x:Y,y:ha,width:Ca,height:xa};Q=m+(w.shadow?8:0);if(m||i)if(Xc)Xc.animate(Xc.crisp(null,null,null,Ya-Q,Ua-Q));else Xc=ga.rect(Q/
2,Q/2,Ya-Q,Ua-Q,w.borderRadius,m).attr({stroke:w.borderColor,"stroke-width":m,fill:i||jb}).add().shadow(w.shadow);if(y)if(ud)ud.animate(na);else ud=ga.rect(Y,ha,Ca,xa,0).attr({fill:y}).add().shadow(w.plotShadow);if(x)if(vd)vd.animate(na);else vd=ga.image(x,Y,ha,Ca,xa).add();if(w.plotBorderWidth)if(Yc)Yc.animate(Yc.crisp(null,Y,ha,Ca,xa));else Yc=ga.rect(Y,ha,Ca,xa,0,w.plotBorderWidth).attr({stroke:w.plotBorderColor,"stroke-width":w.plotBorderWidth,zIndex:4}).add();p.isDirtyBox=false};Sa(cb,"unload",
E);w.reflow!==false&&Sa(p,"load",D);if(R)for(wd in R)Sa(p,wd,R[wd]);p.options=a;p.series=Ia;p.addSeries=function(m,i,y){var x;if(m){ec(y,p);i=C(i,true);Pa(p,"addSeries",{options:m},function(){x=g(m);x.isDirty=true;p.isDirtyLegend=true;i&&p.redraw()})}return x};p.animation=C(w.animation,true);p.destroy=E;p.get=function(m){var i,y,x;for(i=0;i<db.length;i++)if(db[i].options.id===m)return db[i];for(i=0;i<Ia.length;i++)if(Ia[i].options.id===m)return Ia[i];for(i=0;i<Ia.length;i++){x=Ia[i].data;for(y=0;y<
x.length;y++)if(x[y].id===m)return x[y]}return null};p.getSelectedPoints=function(){var m=[];u(Ia,function(i){m=m.concat(yd(i.data,function(y){return y.selected}))});return m};p.getSelectedSeries=function(){return yd(Ia,function(m){return m.selected})};p.hideLoading=function(){Zc(bc,{opacity:0},{duration:a.loading.hideDuration,complete:function(){Na(bc,{display:jb})}});xd=false};p.isInsidePlot=kc;p.redraw=j;p.setSize=rd;p.setTitle=n;p.showLoading=function(m){var i=a.loading;if(!bc){bc=ib(Qb,{className:"highcharts-loading"},
pa(i.style,{left:Y+bb,top:ha+bb,width:Ca+bb,height:xa+bb,zIndex:10,display:jb}),ya);Sd=ib("span",null,i.labelStyle,bc)}Sd.innerHTML=m||a.lang.loading;if(!xd){Na(bc,{opacity:0,display:""});Zc(bc,{opacity:i.style.opacity},{duration:i.showDuration});xd=true}};p.pointCount=0;p.counters=new Ad;da()}var wa=document,cb=window,sa=Math,X=sa.round,kb=sa.floor,fd=sa.ceil,Ha=sa.max,qb=sa.min,$a=sa.abs,nb=sa.cos,Db=sa.sin,cc=sa.PI,Ud=cc*2/360,pc=navigator.userAgent,Bc=/msie/i.test(pc)&&!cb.opera,zc=wa.documentMode===
8,Nd=/AppleWebKit/.test(pc),Rd=/Firefox/.test(pc),yc=!!wa.createElementNS&&!!wa.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,Wc,Jb=wa.documentElement.ontouchstart!==undefined,Vd={},qd=0,rb=1,Hc,Wa,Nc,Cc,$c,Va,Qb="div",oc="absolute",Qd="relative",ub="hidden",nc="highcharts-",Ab="visible",bb="px",jb="none",ab="M",La="L",Wd="rgba(192,192,192,"+(yc?1.0E-6:0.0020)+")",hb="",Bb="hover",Dc,bd,cd,dd,sc,Ec,Fc,Cd,Dd,ed,Ed,Fd,la=cb.HighchartsAdapter,Eb=la||{},u=Eb.each,yd=Eb.grep,mc=Eb.map,
va=Eb.merge,Sa=Eb.addEvent,Cb=Eb.removeEvent,Pa=Eb.fireEvent,Zc=Eb.animate,Tc=Eb.stop,vb={};Nc=function(a,b,c){function d(D){return D.toString().replace(/^([0-9])$/,"0$1")}if(!M(b)||isNaN(b))return"Invalid date";a=C(a,"%Y-%m-%d %H:%M:%S");b=new Date(b*rb);var e,f=b[cd](),g=b[dd](),h=b[sc](),j=b[Ec](),l=b[Fc](),n=Wa.lang,J=n.weekdays;n=n.months;b={a:J[g].substr(0,3),A:J[g],d:d(h),e:h,b:n[j].substr(0,3),B:n[j],m:d(j+1),y:l.toString().substr(2,2),Y:l,H:d(f),I:d(f%12||12),l:f%12||12,M:d(b[bd]()),p:f<
12?"AM":"PM",P:f<12?"am":"pm",S:d(b.getSeconds())};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Ad.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};la&&la.init&&la.init();if(!la&&cb.jQuery){var ob=jQuery;u=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===false)return c};yd=ob.grep;mc=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c};
va=function(){var a=arguments;return ob.extend(true,null,a[0],a[1],a[2],a[3])};Sa=function(a,b,c){ob(a).bind(b,c)};Cb=function(a,b,c){var d=wa.removeEventListener?"removeEventListener":"detachEvent";if(wa[d]&&!a[d])a[d]=function(){};ob(a).unbind(b,c)};Pa=function(a,b,c,d){var e=ob.Event(b),f="detached"+b;pa(e,c);if(a[b]){a[f]=a[b];a[b]=null}ob(a).trigger(e);if(a[f]){a[b]=a[f];a[f]=null}d&&!e.isDefaultPrevented()&&d(e)};Zc=function(a,b,c){var d=ob(a);if(b.d){a.toD=b.d;b.d=1}d.stop();d.animate(b,c)};
Tc=function(a){ob(a).stop()};ob.extend(ob.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var ce=jQuery.fx.step._default,de=jQuery.fx.prototype.cur;ob.fx.step._default=function(a){var b=a.elem;b.attr?b.attr(a.prop,a.now):ce.apply(this,arguments)};ob.fx.step.d=function(a){var b=a.elem;if(!a.started){var c=$c.init(b,b.d,b.toD);a.start=c[0];a.end=c[1];a.started=true}b.attr("d",$c.step(a.start,a.end,a.pos,b.toD))};ob.fx.prototype.cur=function(){var a=this.elem;return a.attr?a.attr(this.prop):
de.apply(this,arguments)}}$c={init:function(a,b,c){b=b||"";var d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g;b=b.split(" ");c=[].concat(c);var h,j,l=function(n){for(g=n.length;g--;)n[g]===ab&&n.splice(g+1,0,n[g+1],n[g+2],n[g+1],n[g+2])};if(e){l(b);l(c)}if(a.isArea){h=b.splice(b.length-6,6);j=c.splice(c.length-6,6)}if(d){c=[].concat(c).splice(0,f).concat(c);a.shift=false}if(b.length)for(a=c.length;b.length<a;){d=[].concat(b).splice(b.length-f,f);if(e){d[f-6]=d[f-2];d[f-5]=d[f-1]}b=b.concat(d)}if(h){b=b.concat(h);
c=c.concat(j)}return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f===b.length&&c<1)for(;f--;){d=parseFloat(a[f]);e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d}else e=b;return e}};la={enabled:true,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};Wa={colors:["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January",
"February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:true},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',
fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0"},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,animation:{duration:1E3},events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:va(la,
{enabled:false,y:-6,formatter:function(){return this.y}}),showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:oc,color:"#3E576F"}},legend:{enabled:true,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:false,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{cursor:"pointer",color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},
itemCheckboxStyle:{position:oc,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:"bold",position:Qd,top:"1em"},showDuration:100,style:{position:oc,backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:true,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,shadow:true,snap:Jb?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},toolbar:{itemStyle:{color:"#4572A7",
cursor:"pointer"}},credits:{enabled:true,text:"ThingSpeak.com",href:"http://www.thingspeak.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-3},style:{cursor:"pointer",color:"#D62020",fontSize:"10px"}}};var Mc={dateTimeLabelFormats:{second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:false,gridLineColor:"#C0C0C0",labels:la,lineColor:"#C0D0E0",lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",
minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:false,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},hd=va(Mc,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,
title:{rotation:270,text:"Y-values"},stackLabels:{enabled:false,formatter:function(){return this.total},style:la.style}}),Zd={labels:{align:"right",x:-8,y:null},title:{rotation:270}},Yd={labels:{align:"left",x:8,y:null},title:{rotation:90}},Md={labels:{align:"center",x:0,y:14},title:{rotation:0}},Xd=va(Md,{labels:{y:-5}}),xb=Wa.plotOptions;la=xb.line;xb.spline=va(la);xb.scatter=va(la,{lineWidth:0,states:{hover:{lineWidth:0}}});xb.area=va(la,{});xb.areaspline=va(xb.area);xb.column=va(la,{borderColor:"#FFFFFF",
borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,shadow:false},select:{color:"#C0C0C0",borderColor:"#000000",shadow:false}},dataLabels:{y:null,verticalAlign:null}});xb.bar=va(xb.column,{dataLabels:{align:"left",x:5,y:0}});xb.pie=va(la,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:true,dataLabels:{distance:30,enabled:true,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,
size:"75%",showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});Bd();var Yb=function(a){var b=[],c;(function(d){if(c=/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*\)/.exec(d))b=[ja(c[1]),ja(c[2]),ja(c[3]),parseFloat(c[4],10)];else if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(d))b=[ja(c[1],16),ja(c[2],16),ja(c[3],16),1]})(a);return{get:function(d){return b&&!isNaN(b[0])?d==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+
")":d==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(d){if(dc(d)&&d!==0){var e;for(e=0;e<3;e++){b[e]+=ja(d*255);if(b[e]<0)b[e]=0;if(b[e]>255)b[e]=255}}return this},setOpacity:function(d){b[3]=d;return this}}};Ic.prototype={init:function(a,b){this.element=wa.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a},animate:function(a,b,c){if(b=C(b,Cc,true)){b=va(b);if(c)b.complete=c;Zc(this,a,b)}else{this.attr(a);c&&c()}},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName,j=
this.renderer,l,n=this.shadows,J,D=this;if(Pb(a)&&M(b)){c=a;a={};a[c]=b}if(Pb(a)){c=a;if(h==="circle")c={x:"cx",y:"cy"}[c]||c;else if(c==="strokeWidth")c="stroke-width";D=Ea(g,c)||this[c]||0;if(c!=="d"&&c!=="visibility")D=parseFloat(D)}else for(c in a){l=false;d=a[c];if(c==="d"){if(d&&d.join)d=d.join(" ");if(/(NaN| {2}|^$)/.test(d))d="M 0 0";this.d=d}else if(c==="x"&&h==="text"){for(e=0;e<g.childNodes.length;e++){f=g.childNodes[e];Ea(f,"x")===Ea(g,"x")&&Ea(f,"x",d)}if(this.rotation)Ea(g,"transform",
"rotate("+this.rotation+" "+d+" "+ja(a.y||Ea(g,"y"))+")")}else if(c==="fill")d=j.color(d,g,c);else if(h==="circle"&&(c==="x"||c==="y"))c={x:"cx",y:"cy"}[c]||c;else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="verticalAlign"){this[c]=d;this.updateTransform();l=true}else if(c==="stroke")d=j.color(d,g,c);else if(c==="dashstyle"){c="stroke-dasharray";d=d&&d.toLowerCase();if(d==="solid")d=jb;else if(d){d=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot",
"1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=d.length;e--;)d[e]=ja(d[e])*a["stroke-width"];d=d.join(",")}}else if(c==="isTracker")this[c]=d;else if(c==="width")d=ja(d);else if(c==="align"){c="text-anchor";d={left:"start",center:"middle",right:"end"}[d]}if(c==="strokeWidth")c="stroke-width";if(Nd&&c==="stroke-width"&&d===0)d=1.0E-6;if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(c)){if(!J){this.symbolAttr(a);
J=true}l=true}if(n&&/^(width|height|visibility|x|y|d)$/.test(c))for(e=n.length;e--;)Ea(n[e],c,d);if((c==="width"||c==="height")&&h==="rect"&&d<0)d=0;if(c==="text"){this.textStr=d;this.added&&j.buildText(this)}else l||Ea(g,c,d)}return D},symbolAttr:function(a){var b=this;u(["x","y","r","start","end","width","height","innerR"],function(c){b[c]=C(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](X(b.x*2)/2,X(b.y*2)/2,b.r,{start:b.start,end:b.end,width:b.width,height:b.height,innerR:b.innerR})})},
clip:function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},crisp:function(a,b,c,d,e){var f,g={},h={},j;a=a||this.strokeWidth||0;j=a%2/2;h.x=kb(b||this.x||0)+j;h.y=kb(c||this.y||0)+j;h.width=kb((d||this.width||0)-2*j);h.height=kb((e||this.height||0)-2*j);h.strokeWidth=a;for(f in h)if(this[f]!==h[f])this[f]=g[f]=h[f];return g},css:function(a){var b=this.element;b=a&&a.width&&b.nodeName==="text";var c,d="",e=function(f,g){return"-"+g.toLowerCase()};if(a&&a.color)a.fill=a.color;
this.styles=a=pa(this.styles,a);if(Bc&&!yc){b&&delete a.width;Na(this.element,a)}else{for(c in a)d+=c.replace(/([A-Z])/g,e)+":"+a[c]+";";this.attr({style:d})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=b;if(Jb&&a==="click"){a="touchstart";c=function(d){d.preventDefault();b()}}this.element["on"+a]=c;return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=true;this.updateTransform();return this},updateTransform:function(){var a=
this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];if(c){a+=this.attr("width");b+=this.attr("height")}if(a||b)e.push("translate("+a+","+b+")");if(c)e.push("rotate(90) scale(-1,1)");else d&&e.push("rotate("+d+" "+this.x+" "+this.y+")");e.length&&Ea(this.element,"transform",e.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){if(a){this.alignOptions=a;this.alignByTranslate=b;c||this.renderer.alignedObjects.push(this)}else{a=
this.alignOptions;b=this.alignByTranslate}c=C(c,this.renderer);var d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};if(/^(right|center)$/.test(d))f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=X(f);if(/^(bottom|middle)$/.test(e))g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=X(g);this[this.placed?"animate":"attr"](h);this.placed=true;this.alignAttr=h;return this},getBBox:function(){var a,b,c,d=this.rotation,e=d*Ud;try{a=
pa({},this.element.getBBox())}catch(f){a={width:0,height:0}}b=a.width;c=a.height;if(d){a.width=$a(c*Db(e))+$a(b*nb(e));a.height=$a(c*nb(e))+$a(b*Db(e))}return a},show:function(){return this.attr({visibility:Ab})},hide:function(){return this.attr({visibility:ub})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=Ea(f,"zIndex");this.parentInverted=a&&a.inverted;this.textStr!==undefined&&b.buildText(this);if(g){c.handleZ=true;g=ja(g)}if(c.handleZ)for(c=0;c<
e.length;c++){a=e[c];b=Ea(a,"zIndex");if(a!==f&&(ja(b)>g||!M(g)&&M(b))){d.insertBefore(f,a);return this}}d.appendChild(f);this.added=true;return this},destroy:function(){var a=this.element||{},b=this.shadows,c=a.parentNode,d;a.onclick=a.onmouseout=a.onmouseover=a.onmousemove=null;Tc(this);c&&c.removeChild(a);b&&u(b,function(e){(c=e.parentNode)&&c.removeChild(e)});qc(this.renderer.alignedObjects,this);for(d in this)delete this[d];return null},empty:function(){for(var a=this.element,b=a.childNodes,
c=b.length;c--;)a.removeChild(b[c])},shadow:function(a,b){var c=[],d,e,f=this.element,g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(d=1;d<=3;d++){e=f.cloneNode(0);Ea(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*d,"stroke-width":7-2*d,transform:"translate"+g,fill:jb});b?b.element.appendChild(e):f.parentNode.insertBefore(e,f);c.push(e)}this.shadows=c}return this}};var Vc=function(){this.init.apply(this,arguments)};Vc.prototype={Element:Ic,init:function(a,b,c,d){var e=location,
f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element);this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Bc?"":e.href.replace(/#.*?$/,"");this.defs=this.createElement("defs").add();this.forExport=d;this.setSize(b,c,false)},createElement:function(a){var b=new this.Element;b.init(this,a);return b},buildText:function(a){for(var b=a.element,c=C(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,
'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=Ea(b,"x"),h=a.styles,j=Rd&&h&&h.HcDirection==="rtl"&&!this.forExport&&ja(pc.split("Firefox/")[1])<4,l,n=h&&ja(h.width),J=h&&h.lineHeight,D,aa=d.length;aa--;)b.removeChild(d[aa]);n&&!a.added&&this.box.appendChild(b);u(c,function(E,da){var w,R=0,B;E=E.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");w=E.split("|||");
u(w,function(K){if(K!==""||w.length===1){var S={},I=wa.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(K)&&Ea(I,"style",K.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(f.test(K)){Ea(I,"onclick",'location.href="'+K.match(f)[1]+'"');Na(I,{cursor:"pointer"})}K=(K.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">");if(j){l=[];for(aa=K.length;aa--;)l.push(K.charAt(aa));K=l.join("")}I.appendChild(wa.createTextNode(K));if(R)S.dx=3;else S.x=g;if(!R){if(da){!yc&&
a.renderer.forExport&&Na(I,{display:"block"});B=cb.getComputedStyle&&ja(cb.getComputedStyle(D,null).getPropertyValue("line-height"));if(!B||isNaN(B))B=J||D.offsetHeight||18;Ea(I,"dy",B)}D=I}Ea(I,S);b.appendChild(I);R++;if(n){K=K.replace(/-/g,"- ").split(" ");for(var za,Da=[];K.length||Da.length;){za=b.getBBox().width;S=za>n;if(!S||K.length===1){K=Da;Da=[];if(K.length){I=wa.createElementNS("http://www.w3.org/2000/svg","tspan");Ea(I,{dy:J||16,x:g});b.appendChild(I);if(za>n)n=za}}else{I.removeChild(I.firstChild);
Da.unshift(K.pop())}K.length&&I.appendChild(wa.createTextNode(K.join(" ").replace(/- /g,"-")))}}}})})},crispLine:function(a,b){if(a[1]===a[4])a[1]=a[4]=X(a[1])+b%2/2;if(a[2]===a[5])a[2]=a[5]=X(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:jb})},circle:function(a,b,c){a=Lb(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(Lb(a)){b=a.y;c=a.r;d=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc",a||0,b||0,c||0,
{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(Lb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}e=this.createElement("rect").attr({rx:e,ry:e,fill:jb});return e.attr(e.crisp(f,a,b,Ha(c,0),Ha(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[C(c,true)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){return this.createElement("g").attr(M(a)&&{"class":nc+a})},image:function(a,b,c,d,
e){var f={preserveAspectRatio:jb};arguments.length>1&&pa(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e){var f,g=this.symbols[a];g=g&&g(X(b),X(c),d,e);var h=/^url\((.*?)\)$/,j;if(g){f=this.path(g);pa(f,{symbolName:a,x:b,y:c,r:d});e&&pa(f,e)}else if(h.test(a)){var l=function(n,J){n.attr({width:J[0],height:J[1]}).translate(-X(J[0]/
2),-X(J[1]/2))};j=a.match(h)[1];a=Vd[j];f=this.image(j).attr({x:b,y:c});if(a)l(f,a);else{f.attr({width:0,height:0});ib("img",{onload:function(){l(f,Vd[j]=[this.width,this.height])},src:j})}}else f=this.circle(b,c,d);return f},symbols:{square:function(a,b,c){c=0.707*c;return[ab,a-c,b-c,La,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},triangle:function(a,b,c){return[ab,a,b-1.33*c,La,a+c,b+0.67*c,a-c,b+0.67*c,"Z"]},"triangle-down":function(a,b,c){return[ab,a,b+1.33*c,La,a-c,b-0.67*c,a+c,b-0.67*c,"Z"]},diamond:function(a,
b,c){return[ab,a,b-c,La,a+c,b,a,b+c,a-c,b,"Z"]},arc:function(a,b,c,d){var e=d.start,f=d.end-1.0E-6,g=d.innerR,h=nb(e),j=Db(e),l=nb(f);f=Db(f);d=d.end-e<cc?0:1;return[ab,a+c*h,b+c*j,"A",c,c,0,d,1,a+c*l,b+c*f,La,a+g*l,b+g*f,"A",g,g,0,d,0,a+g*h,b+g*j,"Z"]}},clipRect:function(a,b,c,d){var e=nc+qd++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient;c=nc+
qd++;var g,h,j;g=f.createElement("linearGradient").attr({id:c,gradientUnits:"userSpaceOnUse",x1:b[0],y1:b[1],x2:b[2],y2:b[3]}).add(f.defs);u(a.stops,function(l){if(e.test(l[1])){d=Yb(l[1]);h=d.get("rgb");j=d.get("a")}else{h=l[1];j=1}f.createElement("stop").attr({offset:l[0],"stop-color":h,"stop-opacity":j}).add(g)});return"url("+this.url+"#"+c+")"}else if(e.test(a)){d=Yb(a);Ea(b,c+"-opacity",d.get("a"));return d.get("rgb")}else return a},text:function(a,b,c){var d=Wa.chart.style;b=X(C(b,0));c=X(C(c,
0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({fontFamily:d.fontFamily,fontSize:d.fontSize});a.x=b;a.y=c;return a}};Wc=Vc;if(!yc){Eb=yb(Ic,{init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",oc,";"];if(b==="shape"||b===Qb)d.push("left:0;top:0;width:10px;height:10px;");if(zc)d.push("visibility: ",b===Qb?ub:Ab);c.push(' style="',d.join(""),'"/>');if(b){c=b===Qb||b==="span"||b==="img"?c.join(""):a.prepVML(c);this.element=ib(c)}this.renderer=a},add:function(a){var b=
this.renderer,c=this.element,d=b.box;d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);zc&&d.gVis===ub&&Na(c,{visibility:ub});d.appendChild(c);this.added=true;this.alignOnAdd&&this.updateTransform();return this},attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,j=this.renderer,l=this.symbolName,n,J,D=this.shadows,aa=this;if(Pb(a)&&M(b)){c=a;a={};a[c]=b}if(Pb(a)){c=a;aa=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c]}else for(c in a){d=a[c];n=false;if(l&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!J){this.symbolAttr(a);
J=true}n=true}else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(n=[];e--;)n[e]=dc(d[e])?X(d[e]*10)-5:d[e]==="Z"?"x":d[e];d=n.join(" ")||"x";f.path=d;if(D)for(e=D.length;e--;)D[e].path=d;n=true}else if(c==="zIndex"||c==="visibility"){if(zc&&c==="visibility"&&h==="DIV"){f.gVis=d;n=f.childNodes;for(e=n.length;e--;)Na(n[e],{visibility:d});if(d===Ab)d=null}if(d)g[c]=d;n=true}else if(/^(width|height)$/.test(c)){if(this.updateClipping){this[c]=d;this.updateClipping()}else g[c]=d;n=true}else if(/^(x|y)$/.test(c)){this[c]=
d;if(f.tagName==="SPAN")this.updateTransform();else g[{x:"left",y:"top"}[c]]=d}else if(c==="class")f.className=d;else if(c==="stroke"){d=j.color(d,f,c);c="strokecolor"}else if(c==="stroke-width"||c==="strokeWidth"){f.stroked=d?true:false;c="strokeweight";this[c]=d;if(dc(d))d+=bb}else if(c==="dashstyle"){(f.getElementsByTagName("stroke")[0]||ib(j.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid";this.dashstyle=d;n=true}else if(c==="fill")if(h==="SPAN")g.color=d;else{f.filled=d!==jb?true:false;d=j.color(d,
f,c);c="fillcolor"}else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="align"){if(c==="align")c="textAlign";this[c]=d;this.updateTransform();n=true}else if(c==="text"){this.bBox=null;f.innerHTML=d;n=true}if(D&&c==="visibility")for(e=D.length;e--;)D[e].style[c]=d;if(!n)if(zc)f[c]=d;else Ea(f,c,d)}return aa},clip:function(a){var b=this,c=a.members;c.push(b);b.destroyClip=function(){qc(c,b)};return b.css(a.getCSS(b.inverted))},css:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&
a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=pa(this.styles,a);Na(this.element,a);return this},destroy:function(){this.destroyClip&&this.destroyClip();Ic.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;){c=a[b];c.parentNode.removeChild(c)}},getBBox:function(){var a=this.element,b=this.bBox;if(!b){if(a.nodeName==="text")a.style.position=oc;b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}return b},
on:function(a,b){this.element["on"+a]=function(){var c=cb.event;c.target=c.srcElement;b(c)};return this},updateTransform:function(){if(this.added){var a=this,b=a.element,c=a.translateX||0,d=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||"left",h={left:0,center:0.5,right:1}[g],j=g&&g!=="left";if(c||d)a.css({marginLeft:c,marginTop:d});a.inverted&&u(b.childNodes,function(R){a.renderer.invertChild(R,b)});if(b.tagName==="SPAN"){var l,n;c=a.rotation;var J;l=0;d=1;var D=0,aa;J=ja(a.textWidth);var E=a.xCorr||
0,da=a.yCorr||0,w=[c,g,b.innerHTML,a.textWidth].join(",");if(w!==a.cTT){if(M(c)){l=c*Ud;d=nb(l);D=Db(l);Na(b,{filter:c?["progid:DXImageTransform.Microsoft.Matrix(M11=",d,", M12=",-D,", M21=",D,", M22=",d,", sizingMethod='auto expand')"].join(""):jb})}l=b.offsetWidth;n=b.offsetHeight;if(l>J){Na(b,{width:J+bb,display:"block",whiteSpace:"normal"});l=J}J=X((ja(b.style.fontSize)||12)*1.2);E=d<0&&-l;da=D<0&&-n;aa=d*D<0;E+=D*J*(aa?1-h:h);da-=d*J*(c?aa?h:1-h:1);if(j){E-=l*h*(d<0?-1:1);if(c)da-=n*h*(D<0?-1:
1);Na(b,{textAlign:g})}a.xCorr=E;a.yCorr=da}Na(b,{left:e+E,top:f+da});a.cTT=w}}else this.alignOnAdd=true},shadow:function(a,b){var c=[],d,e=this.element,f=this.renderer,g,h=e.style,j,l=e.path;if(l&&typeof l.value!=="string")l="x";if(a){for(d=1;d<=3;d++){j=['<shape isShadow="true" strokeweight="',7-2*d,'" filled="false" path="',l,'" coordsize="100,100" style="',e.style.cssText,'" />'];g=ib(f.prepVML(j),null,{left:ja(h.left)+1,top:ja(h.top)+1});j=['<stroke color="black" opacity="',0.05*d,'"/>'];ib(f.prepVML(j),
null,null,g);b?b.element.appendChild(g):e.parentNode.insertBefore(g,e);c.push(g)}this.shadows=c}return this}});la=function(){this.init.apply(this,arguments)};la.prototype=va(Vc.prototype,{Element:Eb,isIE8:pc.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d;this.alignedObjects=[];d=this.createElement(Qb);a.appendChild(d.element);this.box=d.element;this.boxWrapper=d;this.setSize(b,c,false);if(!wa.namespaces.hcv){wa.namespaces.add("hcv","urn:schemas-microsoft-com:vml");wa.createStyleSheet().cssText=
"hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}},clipRect:function(a,b,c,d){var e=this.createElement();return pa(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(f){var g=this.top,h=this.left,j=h+this.width,l=g+this.height;g={clip:"rect("+X(f?h:g)+"px,"+X(f?l:j)+"px,"+X(f?j:l)+"px,"+X(f?g:h)+"px)"};!f&&zc&&pa(g,{width:j+bb,height:l+bb});return g},updateClipping:function(){u(e.members,function(f){f.css(e.getCSS(f.inverted))})}})},
color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,j,l,n,J;u(a.stops,function(D,aa){if(e.test(D[1])){d=Yb(D[1]);f=d.get("rgb");g=d.get("a")}else{f=D[1];g=1}if(aa){n=f;J=g}else{j=f;l=g}});a=90-sa.atan((h[3]-h[1])/(h[2]-h[0]))*180/cc;c=["<",c,' colors="0% ',j,",100% ",n,'" angle="',a,'" opacity="',J,'" o:opacity2="',l,'" type="gradient" focus="100%" />'];ib(this.prepVML(c),null,null,b)}else if(e.test(a)&&b.tagName!=="IMG"){d=Yb(a);c=["<",c,' opacity="',d.get("a"),
'"/>'];ib(this.prepVML(c),null,null,b);return d.get("rgb")}else return a},prepVML:function(a){var b=this.isIE8;a=a.join("");if(b){a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')}else a=a.replace("<","<hcv:");return a},text:function(a,b,c){var d=Wa.chart.style;return this.createElement("span").attr({text:a,
x:X(b),y:X(c)}).css({whiteSpace:"nowrap",fontFamily:d.fontFamily,fontSize:d.fontSize})},path:function(a){return this.createElement("shape").attr({coordsize:"100 100",d:a})},circle:function(a,b,c){return this.symbol("circle").attr({x:a,y:b,r:c})},g:function(a){var b;if(a)b={className:nc+a,"class":nc+a};return this.createElement(Qb).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b,
c,d,e,f){if(Lb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,Ha(c,0),Ha(d,0)))},invertChild:function(a,b){var c=b.style;Na(a,{flip:"x",left:ja(c.width)-10,top:ja(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d){var e=d.start,f=d.end,g=nb(e),h=Db(e),j=nb(f),l=Db(f);d=d.innerR;var n=0.07/c,J=d&&0.1/d||0;if(f-e===0)return["x"];else if(2*cc-f+e<n)j=-n;else if(f-e<J)j=nb(e+J);return["wa",a-c,b-c,a+c,b+c,a+c*g,b+c*h,a+c*
j,b+c*l,"at",a-d,b-d,a+d,b+d,a+d*j,b+d*l,a+d*g,b+d*h,"x","e"]},circle:function(a,b,c){return["wa",a-c,b-c,a+c,b+c,a+c,b,a+c,b,"e"]},rect:function(a,b,c,d){if(!M(d))return[];var e=d.width;d=d.height;var f=a+e,g=b+d;c=qb(c,e,d);return[ab,a+c,b,La,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,La,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,La,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,La,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}});Wc=la}Gd.prototype.callbacks=[];var Ac=function(){};Ac.prototype={init:function(a,
b){var c=a.chart.counters,d;this.series=a;this.applyOptions(b);this.pointAttr={};if(a.options.colorByPoint){d=a.chart.options.colors;if(!this.options)this.options={};this.color=this.options.color=this.color||d[c.color++];c.wrapColor(d.length)}a.chart.pointCount++;return this},applyOptions:function(a){var b=this.series;this.config=a;if(dc(a)||a===null)this.y=a;else if(Lb(a)&&!dc(a.length)){pa(this,a);this.options=a}else if(Pb(a[0])){this.name=a[0];this.y=a[1]}else if(dc(a[0])){this.x=a[0];this.y=a[1]}if(this.x===
Va)this.x=b.autoIncrement()},destroy:function(){var a=this,b=a.series,c;b.chart.pointCount--;a===b.chart.hoverPoint&&a.onMouseOut();b.chart.hoverPoints=null;Cb(a);u(["graphic","tracker","group","dataLabel","connector"],function(d){a[d]&&a[d].destroy()});a.legendItem&&a.series.chart.legend.destroyItem(a);for(c in a)a[c]=null},getLabelConfig:function(){return{x:this.category,y:this.y,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var c=
this,d=c.series.chart;c.selected=a=C(a,!c.selected);c.firePointEvent(a?"select":"unselect");c.setState(a&&"select");b||u(d.getSelectedPoints(),function(e){if(e.selected&&e!==c){e.selected=false;e.setState(hb);e.firePointEvent("unselect")}})},onMouseOver:function(){var a=this.series.chart,b=a.tooltip,c=a.hoverPoint;c&&c!==this&&c.onMouseOut();this.firePointEvent("mouseOver");b&&!b.shared&&b.refresh(this);this.setState(Bb);a.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut");this.setState();
this.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series;return['<span style="color:'+b.color+'">',this.name||b.name,"</span>: ",!a?"<b>x = "+(this.name||this.x)+",</b> ":"","<b>",!a?"y = ":"",this.y,"</b>"].join("")},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g=e.chart;b=C(b,true);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);if(Lb(a)){e.getAttribs();f&&f.attr(d.pointAttr[e.state])}e.isDirty=true;b&&g.redraw(c)})},remove:function(a,b){var c=
this,d=c.series,e=d.chart,f=d.data;ec(b,e);a=C(a,true);c.firePointEvent("remove",null,function(){qc(f,c);c.destroy();d.isDirty=true;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;if(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])this.importEvents();if(a==="click"&&e.allowPointSelect)c=function(f){d.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};Pa(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=va(this.series.options.point,
this.options).events,b;this.events=a;for(b in a)Sa(this,b,a[b]);this.hasImportedEvents=true}},setState:function(a){var b=this.series,c=b.options.states,d=xb[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===false,g=b.stateMarkerGraphic,h=b.chart,j=this.pointAttr;a=a||hb;if(!(a===this.state||this.selected&&a!=="select"||c[a]&&c[a].enabled===false||a&&(f||e&&!d.enabled))){if(this.graphic)this.graphic.attr(j[a]);else{if(a){if(!g)b.stateMarkerGraphic=g=h.renderer.circle(0,
0,j[a].r).attr(j[a]).add(b.group);g.translate(this.plotX,this.plotY)}if(g)g[a?"show":"hide"]()}this.state=a}}};var pb=function(){};pb.prototype={isCartesian:true,type:"line",pointClass:Ac,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var c,d;d=a.series.length;this.chart=a;b=this.setOptions(b);pa(this,{index:d,options:b,name:b.name||"Series "+(d+1),state:hb,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});d=b.events;
for(c in d)Sa(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=true;this.getColor();this.getSymbol();this.setData(b.data,false)},autoIncrement:function(){var a=this.options,b=this.xIncrement;b=C(b,a.pointStart,0);this.pointInterval=C(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},cleanData:function(){var a=this.chart,b=this.data,c,d,e=a.smallestInterval,f,g;b.sort(function(h,j){return h.x-j.x});if(this.options.connectNulls)for(g=
b.length-1;g>=0;g--)b[g].y===null&&b[g-1]&&b[g+1]&&b.splice(g,1);for(g=b.length-1;g>=0;g--)if(b[g-1]){f=b[g].x-b[g-1].x;if(f>0&&(d===Va||f<d)){d=f;c=g}}if(e===Va||d<e)a.smallestInterval=d;this.closestPoints=c},getSegments:function(){var a=-1,b=[],c=this.data;u(c,function(d,e){if(d.y===null){e>a+1&&b.push(c.slice(a+1,e));a=e}else e===c.length-1&&b.push(c.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions;return va(b[this.type],b.series,a)},getColor:function(){var a=
this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++];b.wrapSymbol(a.length)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart;a=(new this.pointClass).init(this,a);ec(d,h);if(f&&c)f.shift=c;if(g){g.shift=c;g.isArea=true}b=C(b,true);e.push(a);c&&e[0].remove(false);this.getAttribs();
this.isDirty=true;b&&h.redraw()},setData:function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;c.xIncrement=null;if(M(e))f.counters.color=e;for(a=mc(rc(a||[]),function(h){return(new c.pointClass).init(c,h)});g--;)d[g].destroy();c.data=a;c.cleanData();c.getSegments();c.getAttribs();c.isDirty=true;f.isDirtyBox=true;C(b,true)&&f.redraw(false)},remove:function(a,b){var c=this,d=c.chart;a=C(a,true);if(!c.isRemoving){c.isRemoving=true;Pa(c,"remove",null,function(){c.destroy();d.isDirtyLegend=
d.isDirtyBox=true;a&&d.redraw(b)})}c.isRemoving=false},translate:function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],h=g.x,j=g.y,l=g.low,n=d.stacks[(j<0?"-":"")+this.stackKey];g.plotX=this.xAxis.translate(h);if(b&&this.visible&&n&&n[h]){l=n[h];h=l.total;l.cum=l=l.cum-j;j=l+j;if(b==="percent"){l=h?l*100/h:0;j=h?j*100/h:0}g.percentage=h?g.y*100/h:0;g.stackTotal=h}if(M(l))g.yBottom=d.translate(l,0,1,0,1);if(j!==null)g.plotY=
d.translate(j,0,1,0,1);g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX;g.category=c&&c[g.x]!==Va?c[g.x]:g.x}},setTooltipPoints:function(a){var b=this.chart,c=b.inverted,d=[],e=X((c?b.plotTop:b.plotLeft)+b.plotSizeX),f,g,h=[];if(a)this.tooltipPoints=null;u(this.segments,function(j){d=d.concat(j)});if(this.xAxis&&this.xAxis.reversed)d=d.reverse();u(d,function(j,l){f=d[l-1]?d[l-1]._high+1:0;for(g=j._high=d[l+1]?kb((j.plotX+(d[l+1]?d[l+1].plotX:e))/2):e;f<=g;)h[c?e-f++:f++]=j});this.tooltipPoints=h},
onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(!(!Jb&&a.mouseIsDown)){b&&b!==this&&b.onMouseOut();this.options.events.mouseOver&&Pa(this,"mouseOver");this.tracker&&this.tracker.toFront();this.setState(Bb);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut();this&&a.events.mouseOut&&Pa(this,"mouseOut");c&&!a.stickyTracking&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect,
d=this.options.animation;if(d&&!Lb(d))d={};if(a){if(!c.isAnimating){c.attr("width",0);c.isAnimating=true}}else{c.animate({width:b.plotSizeX},d);this.animate=null}},drawPoints:function(){var a,b=this.data,c=this.chart,d,e,f,g,h,j;if(this.options.marker.enabled)for(f=b.length;f--;){g=b[f];d=g.plotX;e=g.plotY;j=g.graphic;if(e!==Va&&!isNaN(e)){a=g.pointAttr[g.selected?"select":hb];h=a.r;if(j)j.animate({x:d,y:e,r:h});else g.graphic=c.renderer.symbol(C(g.marker&&g.marker.symbol,this.symbol),d,e,h).attr(a).add(this.group)}}},
convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e){g=e[f];h[f]=C(a[g],b[f],c[f],d[f])}return h},getAttribs:function(){var a=this,b=xb[a.type].marker?a.options.marker:a.options,c=b.states,d=c[Bb],e,f=a.color,g={stroke:f,fill:f},h=a.data,j=[],l,n=a.pointAttrToOptions,J;if(a.options.marker){d.radius=d.radius||b.radius+2;d.lineWidth=d.lineWidth||b.lineWidth+1}else d.color=d.color||Yb(d.color||f).brighten(d.brightness).get();j[hb]=a.convertAttribs(b,
g);u([Bb,"select"],function(D){j[D]=a.convertAttribs(c[D],j[hb])});a.pointAttr=j;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===false)b.radius=0;e=false;if(g.options)for(J in n)if(M(b[n[J]]))e=true;if(e){l=[];c=b.states||{};e=c[Bb]=c[Bb]||{};if(!a.options.marker)e.color=Yb(e.color||g.options.color).brighten(e.brightness||d.brightness).get();l[hb]=a.convertAttribs(b,j[hb]);l[Bb]=a.convertAttribs(c[Bb],j[Bb],l[hb]);l.select=a.convertAttribs(c.select,j.select,
l[hb])}else l=j;g.pointAttr=l}},destroy:function(){var a=this,b=a.chart,c=/\/5[0-9\.]+ (Safari|Mobile)\//.test(pc),d,e;Pa(a,"destroy");Cb(a);a.legendItem&&a.chart.legend.destroyItem(a);u(a.data,function(f){f.destroy()});u(["area","graph","dataLabelsGroup","group","tracker"],function(f){if(a[f]){d=c&&f==="group"?"hide":"destroy";a[f][d]()}});if(b.hoverSeries===a)b.hoverSeries=null;qc(b.series,a);for(e in a)delete a[e]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a=this,b,c,d=
a.data,e=a.options.dataLabels,f,g=a.dataLabelsGroup,h=a.chart,j=h.inverted,l=a.type,n;n=a.options.stacking;var J=l==="column"||l==="bar",D=e.verticalAlign===null,aa=e.y===null;if(J)if(n){if(D)e=va(e,{verticalAlign:"middle"});if(aa)e=va(e,{y:{top:14,middle:4,bottom:-6}[e.verticalAlign]})}else if(D)e=va(e,{verticalAlign:"top"});if(!g)g=a.dataLabelsGroup=h.renderer.g("data-labels").attr({visibility:a.visible?Ab:ub,zIndex:6}).translate(h.plotLeft,h.plotTop).add();n=e.color;if(n==="auto")n=null;e.style.color=
C(n,a.color);u(d,function(E){var da=E.barX,w=da&&da+E.barW/2||E.plotX||-999,R=C(E.plotY,-999),B=E.dataLabel,K=e.align,S=aa?E.y>0?-6:12:e.y;f=e.formatter.call(E.getLabelConfig());b=(j?h.plotWidth-R:w)+e.x;c=(j?h.plotHeight-w:R)+S;if(l==="column")b+={left:-1,right:1}[K]*E.barW/2||0;if(j&&E.y<0){K="right";b-=10}if(B){if(j&&!e.y)c=c+ja(B.styles.lineHeight)*0.9-B.getBBox().height/2;B.attr({text:f}).animate({x:b,y:c})}else if(M(f)){B=E.dataLabel=h.renderer.text(f,b,c).attr({align:K,rotation:e.rotation,
zIndex:1}).css(e.style).add(g);j&&!e.y&&B.attr({y:c+ja(B.styles.lineHeight)*0.9-B.getBBox().height/2})}if(J&&a.options.stacking){w=E.barY;R=E.barW;E=E.barH;B.align(e,null,{x:j?h.plotWidth-w-E:da,y:j?h.plotHeight-da-R:w,width:j?E:R,height:j?R:E})}})}},drawGraph:function(){var a=this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,j=b.lineWidth,l=b.dashStyle,n,J=a.chart.renderer,D=a.yAxis.getThreshold(b.threshold||0),aa=/^area/.test(a.type),E=[],da=[];u(a.segments,function(w){n=
[];u(w,function(S,I){if(a.getPointSpline)n.push.apply(n,a.getPointSpline(w,S,I));else{n.push(I?La:ab);I&&b.step&&n.push(S.plotX,w[I-1].plotY);n.push(S.plotX,S.plotY)}});if(w.length>1)d=d.concat(n);else E.push(w[0]);if(aa){var R=[],B,K=n.length;for(B=0;B<K;B++)R.push(n[B]);K===3&&R.push(La,n[1],n[2]);if(b.stacking&&a.type!=="areaspline")for(B=w.length-1;B>=0;B--)R.push(w[B].plotX,w[B].yBottom);else R.push(La,w[w.length-1].plotX,D,La,w[0].plotX,D);da=da.concat(R)}});a.graphPath=d;a.singlePoints=E;if(aa){e=
C(b.fillColor,Yb(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:da});else a.area=a.chart.renderer.path(da).attr({fill:e}).add(g)}if(c)c.animate({d:d});else if(j){c={stroke:h,"stroke-width":j};if(l)c.dashstyle=l;a.graph=J.path(d).attr(c).add(g).shadow(b.shadow)}},render:function(){var a=this,b=a.chart,c,d,e=a.options,f=e.animation,g=f&&a.animate;f=g?f&&f.duration||500:0;var h=a.clipRect,j=b.renderer;if(!h){h=a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:j.clipRect(0,0,b.plotSizeX,
b.plotSizeY);if(!b.clipRect)b.clipRect=h}if(!a.group){c=a.group=j.g("series");if(b.inverted){d=function(){c.attr({width:b.plotWidth,height:b.plotHeight}).invert()};d();Sa(b,"resize",d);Sa(a,"destroy",function(){Cb(b,"resize",d)})}c.clip(a.clipRect).attr({visibility:a.visible?Ab:ub,zIndex:e.zIndex}).translate(b.plotLeft,b.plotTop).add(b.seriesGroup)}a.drawDataLabels();g&&a.animate(true);a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==false&&a.drawTracker();g&&a.animate();
setTimeout(function(){h.isAnimating=false;if((c=a.group)&&h!==b.clipRect&&h.renderer){c.clip(a.clipRect=b.clipRect);h.destroy()}},f);a.isDirty=false},redraw:function(){var a=this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:a.plotLeft,translateY:a.plotTop})}this.translate();this.setTooltipPoints(true);this.render()},setState:function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth;a=a||hb;if(this.state!==a){this.state=a;if(!(d[a]&&
d[a].enabled===false)){if(a)b=d[a].lineWidth||b+1;if(c&&!c.dashstyle)c.attr({"stroke-width":b},a?0:500)}}},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,j=this.data,l=c.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===Va?!h:a)?"show":"hide";e&&e[h]();if(f)f[h]();else for(e=j.length;e--;){f=j[e];f.tracker&&f.tracker[h]()}g&&g[h]();d&&c.legend.colorizeItem(this,a);this.isDirty=true;this.options.stacking&&u(c.series,
function(n){if(n.options.stacking&&n.visible)n.isDirty=true});if(l)c.isDirtyBox=true;b!==false&&c.redraw();Pa(this,h)},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===Va?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;Pa(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;h=h&&{cursor:h};var j=a.singlePoints,
l;if(d)for(l=d+1;l--;){c[l]===ab&&c.splice(l+1,0,c[l+1]-f,c[l+2],La);if(l&&c[l]===ab||l===d)c.splice(l,0,La,c[l-2]+f,c[l-1])}for(l=0;l<j.length;l++){d=j[l];c.push(ab,d.plotX-f,d.plotY,La,d.plotX+f,d.plotY)}if(g)g.attr({d:c});else a.tracker=e.renderer.path(c).attr({isTracker:true,stroke:Wd,fill:jb,"stroke-width":b.lineWidth+2*f,visibility:a.visible?Ab:ub,zIndex:1}).on(Jb?"touchstart":"mouseover",function(){e.hoverSeries!==a&&a.onMouseOver()}).on("mouseout",function(){b.stickyTracking||a.onMouseOut()}).css(h).add(e.trackerGroup)}};
la=yb(pb);vb.line=la;la=yb(pb,{type:"area"});vb.area=la;la=yb(pb,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,j,l,n;if(c&&c<a.length-1){a=f.plotY;l=g.plotX;g=g.plotY;var J;h=(1.5*d+f.plotX)/2.5;j=(1.5*e+a)/2.5;l=(1.5*d+l)/2.5;n=(1.5*e+g)/2.5;J=(n-j)*(l-d)/(l-h)+e-n;j+=J;n+=J;if(j>a&&j>e){j=Ha(a,e);n=2*e-j}else if(j<a&&j<e){j=qb(a,e);n=2*e-j}if(n>g&&n>e){n=Ha(g,e);j=2*e-n}else if(n<g&&n<e){n=qb(g,e);j=2*e-n}b.rightContX=l;b.rightContY=n}if(c){b=["C",f.rightContX||
f.plotX,f.rightContY||f.plotY,h||d,j||e,d,e];f.rightContX=f.rightContY=null}else b=[ab,d,e];return b}});vb.spline=la;la=yb(la,{type:"areaspline"});vb.areaspline=la;var ad=yb(pb,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){pb.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasColumn=true;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true})},translate:function(){var a=this,b=a.chart,
c=a.options,d=c.stacking,e=c.borderWidth,f=0,g=a.xAxis.reversed,h=a.xAxis.categories,j={},l,n;pb.prototype.translate.apply(a);u(b.series,function(S){if(S.type===a.type&&S.visible){if(S.options.stacking){l=S.stackKey;if(j[l]===Va)j[l]=f++;n=j[l]}else n=f++;S.columnIndex=n}});var J=a.data,D=a.closestPoints;h=$a(J[1]?J[D].plotX-J[D-1].plotX:b.plotSizeX/(h&&h.length||1));D=h*c.groupPadding;var aa=(h-2*D)/f,E=c.pointWidth,da=M(E)?(aa-E)/2:aa*c.pointPadding,w=Ha(C(E,aa-2*da),1),R=da+(D+((g?f-a.columnIndex:
a.columnIndex)||0)*aa-h/2)*(g?-1:1),B=a.yAxis.getThreshold(c.threshold||0),K=C(c.minPointLength,5);u(J,function(S){var I=S.plotY,za=S.yBottom||B,Da=S.plotX+R,gb=fd(qb(I,za)),wb=fd(Ha(I,za)-gb),Ob=a.yAxis.stacks[(S.y<0?"-":"")+a.stackKey],Kb;d&&a.visible&&Ob&&Ob[S.x]&&Ob[S.x].setOffset(R,w);if($a(wb)<K){if(K){wb=K;gb=$a(gb-B)>K?za-K:B-(I<=B?K:0)}Kb=gb-3}pa(S,{barX:Da,barY:gb,barW:w,barH:wb});S.shapeType="rect";I=pa(b.renderer.Element.prototype.crisp.apply({},[e,Da,gb,w,wb]),{r:c.borderRadius});if(e%
2){I.y-=1;I.height+=1}S.shapeArgs=I;S.trackerArgs=M(Kb)&&va(S.shapeArgs,{height:Ha(6,wb+3),y:Kb})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;u(a.data,function(f){var g=f.plotY;if(g!==Va&&!isNaN(g)&&f.y!==null){d=f.graphic;e=f.shapeArgs;if(d){Tc(d);d.animate(e)}else f.graphic=c[f.shapeType](e).attr(f.pointAttr[f.selected?"select":hb]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=this,b=a.chart,c=b.renderer,
d,e,f=+new Date,g=a.options.cursor,h=g&&{cursor:g},j;u(a.data,function(l){e=l.tracker;d=l.trackerArgs||l.shapeArgs;delete d.strokeWidth;if(l.y!==null)if(e)e.attr(d);else l.tracker=c[l.shapeType](d).attr({isTracker:f,fill:Wd,visibility:a.visible?Ab:ub,zIndex:1}).on(Jb?"touchstart":"mouseover",function(n){j=n.relatedTarget||n.fromElement;b.hoverSeries!==a&&Ea(j,"isTracker")!==f&&a.onMouseOver();l.onMouseOver()}).on("mouseout",function(n){if(!a.options.stickyTracking){j=n.relatedTarget||n.toElement;
Ea(j,"isTracker")!==f&&a.onMouseOut()}}).css(h).add(l.group||b.trackerGroup)})},animate:function(a){var b=this,c=b.data;if(!a){u(c,function(d){var e=d.graphic;d=d.shapeArgs;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:d.height,y:d.y},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true});pb.prototype.remove.apply(a,arguments)}});vb.column=ad;la=yb(ad,{type:"bar",init:function(a){a.inverted=
this.inverted=true;ad.prototype.init.apply(this,arguments)}});vb.bar=la;la=yb(pb,{type:"scatter",translate:function(){var a=this;pb.prototype.translate.apply(a);u(a.data,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,c=b&&{cursor:b},d;u(a.data,function(e){(d=e.graphic)&&d.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();e.onMouseOver()}).on("mouseout",function(){a.options.stickyTracking||
a.onMouseOut()}).css(c)})},cleanData:function(){}});vb.scatter=la;la=yb(Ac,{init:function(){Ac.prototype.init.apply(this,arguments);var a=this,b;pa(a,{visible:a.visible!==false,name:C(a.name,"Slice")});b=function(){a.slice()};Sa(a,"select",b);Sa(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel,e=this.connector,f=this.shadowGroup,g;g=(this.visible=a=a===Va?!this.visible:a)?"show":"hide";this.group[g]();c&&c[g]();d&&d[g]();e&&e[g]();f&&f[g]();
this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;ec(c,d);C(b,true);a=this.sliced=M(a)?a:!this.sliced;a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});la=yb(pb,{type:"pie",isCartesian:false,pointClass:la,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},
animate:function(){var a=this;u(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-cc/2;if(c){c.attr({r:0,start:d,end:d});c.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate=null},translate:function(){var a=0,b=this,c=-0.25,d=b.options,e=d.slicedOffset,f=e+d.borderWidth,g=d.center.concat([d.size,d.innerSize||0]),h=b.chart,j=h.plotWidth,l=h.plotHeight,n,J,D,aa=b.data,E=2*cc,da,w=qb(j,l),R,B,K,S=d.dataLabels.distance;g=mc(g,function(I,za){return(R=/%$/.test(I))?[j,l,w,w][za]*
ja(I)/100:I});b.getX=function(I,za){D=sa.asin((I-g[1])/(g[2]/2+S));return g[0]+(za?-1:1)*nb(D)*(g[2]/2+S)};b.center=g;u(aa,function(I){a+=I.y});u(aa,function(I){da=a?I.y/a:0;n=X(c*E*1E3)/1E3;c+=da;J=X(c*E*1E3)/1E3;I.shapeType="arc";I.shapeArgs={x:g[0],y:g[1],r:g[2]/2,innerR:g[3]/2,start:n,end:J};D=(J+n)/2;I.slicedTranslation=mc([nb(D)*e+h.plotLeft,Db(D)*e+h.plotTop],X);B=nb(D)*g[2]/2;b.radiusY=K=Db(D)*g[2]/2;I.tooltipPos=[g[0]+B*0.7,g[1]+K*0.7];I.labelPos=[g[0]+B+nb(D)*S,g[1]+K+Db(D)*S,g[0]+B+nb(D)*
f,g[1]+K+Db(D)*f,g[0]+B,g[1]+K,S<0?"center":D<E/4?"left":"right",D];I.percentage=da*100;I.total=a});this.setTooltipPoints()},render:function(){this.drawPoints();this.options.enableMouseTracking!==false&&this.drawTracker();this.drawDataLabels();this.options.animation&&this.animate&&this.animate();this.isDirty=false},drawPoints:function(){var a=this.chart,b=a.renderer,c,d,e,f=this.options.shadow,g,h;u(this.data,function(j){d=j.graphic;h=j.shapeArgs;e=j.group;g=j.shadowGroup;if(f&&!g)g=j.shadowGroup=
b.g("shadow").attr({zIndex:4}).add();if(!e)e=j.group=b.g("point").attr({zIndex:5}).add();c=j.sliced?j.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(c[0],c[1]);g&&g.translate(c[0],c[1]);if(d)d.animate(h);else j.graphic=b.arc(h).attr(pa(j.pointAttr[hb],{"stroke-linejoin":"round"})).add(j.group).shadow(f,g);j.visible===false&&j.setVisible(false)})},drawDataLabels:function(){var a=this.data,b,c=this.chart,d=this.options.dataLabels,e=C(d.connectorPadding,10),f=C(d.connectorWidth,1),g,h,j=d.distance,
l=this.radiusY,n=j>0,J=this.center[1],D=[[],[]],aa,E,da,w,R=2,B;if(d.enabled){pb.prototype.drawDataLabels.apply(this);u(a,function(gb){D[gb.labelPos[7]<cc/2?0:1].push(gb)});D[1].reverse();w=function(gb,wb){return wb.y-gb.y};for(a=D[0][0]&&D[0][0].dataLabel&&ja(D[0][0].dataLabel.styles.lineHeight);R--;){var K=[],S=[],I=D[R],za=I.length,Da;for(B=J+l-j;B<=J-l+j;B+=a)K.push(B);da=K.length;if(za>da){h=[].concat(I);h.sort(w);for(B=za;B--;)h[B].rank=B;for(B=za;B--;)I[B].rank>=da&&I.splice(B,1);za=I.length}for(B=
0;B<za;B++){b=I[B];h=b.labelPos;b=9999;for(E=0;E<da;E++){g=$a(K[E]-h[1]);if(g<b){b=g;Da=E}}if(Da<B&&K[B]!==null)Da=B;else if(da<za-B+Da&&K[B]!==null)Da=da-za+B;else for(;K[Da]===null;)Da++;S.push({i:Da,y:K[Da]});K[Da]=null}S.sort(w);for(B=0;B<za;B++){b=I[B];h=b.labelPos;g=b.dataLabel;E=S.pop();aa=h[1];da=b.visible===false?ub:Ab;Da=E.i;E=E.y;if(aa>E&&K[Da+1]!==null||aa<E&&K[Da-1]!==null)E=aa;aa=this.getX(E,R);g.attr({visibility:da,align:h[6]})[g.moved?"animate":"attr"]({x:aa+d.x+({left:e,right:-e}[h[6]]||
0),y:E+d.y});g.moved=true;if(n&&f){g=b.connector;h=[ab,aa+(h[6]==="left"?5:-5),E,La,aa,E,La,h[2],h[3],La,h[4],h[5]];if(g){g.animate({d:h});g.attr("visibility",da)}else b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f,stroke:d.connectorColor||"#606060",visibility:da,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}}},drawTracker:ad.prototype.drawTracker,getSymbol:function(){}});vb.pie=la;cb.Highcharts={Chart:Gd,dateFormat:Nc,pathAnim:$c,getOptions:function(){return Wa},numberFormat:zd,
Point:Ac,Color:Yb,Renderer:Wc,seriesTypes:vb,setOptions:function(a){Wa=va(Wa,a);Bd();return Wa},Series:pb,addEvent:Sa,createElement:ib,discardElement:Gc,css:Na,each:u,extend:pa,map:mc,merge:va,pick:C,extendClass:yb,product:"Highcharts",version:"2.1.6"}})();