/* Highstock JS v7.2.1 (2019-10-31) (c) 2009-2018 Torstein Honsi License: www.highcharts.com/license */ (function(R,K){"object"===typeof module&&module.exports?(K["default"]=K,module.exports=R.document?K(R):K):"function"===typeof define&&define.amd?define("highcharts/highstock",function(){return K(R)}):(R.Highcharts&&R.Highcharts.error(16,!0),R.Highcharts=K(R))})("undefined"!==typeof window?window:this,function(R){function K(c,g,I,G){c.hasOwnProperty(g)||(c[g]=G.apply(null,I))}var D={};K(D,"parts/Globals.js",[],function(){var c="undefined"!==typeof R?R:"undefined"!==typeof window?window:{},g=c.document, I=c.navigator&&c.navigator.userAgent||"",G=g&&g.createElementNS&&!!g.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,H=/(edge|msie|trident)/i.test(I)&&!c.opera,y=-1!==I.indexOf("Firefox"),w=-1!==I.indexOf("Chrome"),x=y&&4>parseInt(I.split("Firefox/")[1],10);return{product:"Highcharts",version:"7.2.1",deg2rad:2*Math.PI/360,doc:g,hasBidiBug:x,hasTouch:!!c.TouchEvent,isMS:H,isWebKit:-1!==I.indexOf("AppleWebKit"),isFirefox:y,isChrome:w,isSafari:!w&&-1!==I.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(I), SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:G,win:c,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}});K(D,"parts/Utilities.js",[D["parts/Globals.js"]],function(c){function g(b,a){return parseInt(b,a||10)}function I(b){return"string"===typeof b}function G(b){b=Object.prototype.toString.call(b);return"[object Array]"===b||"[object Array Iterator]"===b}function H(b,a){return!!b&&"object"===typeof b&&(!a|| !G(b))}function y(b){return H(b)&&"number"===typeof b.nodeType}function w(b){var a=b&&b.constructor;return!(!H(b,!0)||y(b)||!a||!a.name||"Object"===a.name)}function x(b){return"number"===typeof b&&!isNaN(b)&&Infinity>b&&-Infinityk)for(;C--;){var h=parseFloat(b[C]);e[C]=isNaN(h)||"A"===a[C-4]||"A"===a[C-5]?a[C]:k*parseFloat(""+(a[C]-h))+h}else e=a;this.elem.attr("d",e, null,!0)},update:function(){var b=this.elem,a=this.prop,e=this.now,k=this.options.step;if(this[a+"Setter"])this[a+"Setter"]();else b.attr?b.element&&b.attr(a,e,null,!0):b.style[a]=e+this.unit;k&&k.call(b,e,this)},run:function(b,d,e){var k=this,C=k.options,h=function(b){return h.stopped?!1:k.step(b)},r=a.requestAnimationFrame||function(b){setTimeout(b,13)},n=function(){for(var b=0;b=c+this.startTime){this.now=this.end;this.pos=1;this.update();var n=r[this.prop]=!0;p(r,function(b){!0!== b&&(n=!1)});n&&h&&h.call(k);b=!1}else this.pos=e.easing((a-this.startTime)/c),this.now=this.start+(this.end-this.start)*this.pos,this.update(),b=!0;return b},initPath:function(b,a,e){function d(b){for(B=b.length;B--;){var a="M"===b[B]||"L"===b[B];var l=/[a-zA-Z]/.test(b[B+3]);a&&l&&b.splice(B+1,0,b[B+1],b[B+2],b[B+1],b[B+2])}}function h(b,a){for(;b.length=e&&(a=[1/e])));for(k=0;k=b||!h&&r<=(a[k]+ (a[k+1]||a[k]))/2);k++);return d=c.correctFloat(d*e,-Math.round(Math.log(.001)/Math.LN10))};c.stableSort=function(b,a){var d=b.length,k,h;for(h=0;hr[1]){var n=a+ +r[1];0<=n?(r[0]=(+r[0]).toExponential(n).split("e")[0],a=n):(r[0]=r[0].split(".")[0]||0,b=20>a?(r[0]*Math.pow(10,r[1])).toFixed(a):0,r[1]=0)}var f=(Math.abs(r[1]?r[0]:b)+Math.pow(10,-Math.max(a,h)-1)).toFixed(a);h=String(g(f));n=3b?"-":"")+(n?h.substr(0,n)+k:"");b+=h.substr(n).replace(/(\d{3})(?=\d)/g,"$1"+k);a&&(b+=e+f.slice(-a));r[1]&&0!==+b&&(b+="e"+r[1]);return b};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};c.getStyle=function(b,d,e){if("width"===d)return d=Math.min(b.offsetWidth,b.scrollWidth),e=b.getBoundingClientRect&&b.getBoundingClientRect().width,e=d-1&&(d=Math.floor(e)),Math.max(0,d-c.getStyle(b,"padding-left")-c.getStyle(b,"padding-right"));if("height"===d)return Math.max(0, Math.min(b.offsetHeight,b.scrollHeight)-c.getStyle(b,"padding-top")-c.getStyle(b,"padding-bottom"));a.getComputedStyle||c.error(27,!0);if(b=a.getComputedStyle(b,void 0))b=b.getPropertyValue(d),m(e,"opacity"!==d)&&(b=g(b));return b};c.inArray=function(a,d,e){return d.indexOf(a,e)};c.find=Array.prototype.find?function(a,d){return a.find(d)}:function(a,d){var b,k=a.length;for(b=0;be&&(e=a[b]);return e},arrayMin:function(a){for(var b=a.length,e=a[0];b--;)a[b]>16,(g&65280)>>8,g&255,1]:4===E&&(w=[(g&3840)>>4|(g&3840)>>8,(g&240)>>4|g&240,(g&15)<<4|g&15,1])}if(!w)for(x=this.parsers.length;x--&&!w;){var y=this.parsers[x];(E=y.regex.exec(g))&&(w=y.parse(E))}}this.rgba=w||[]},get:function(c){var g=this.input,x=this.rgba;if(this.stops){var E=H(g);E.stops= [].concat(E.stops);this.stops.forEach(function(g,t){E.stops[t]=[E.stops[t][0],g.get(c)]})}else E=x&&I(x[0])?"rgb"===c||!c&&1===x[3]?"rgb("+x[0]+","+x[1]+","+x[2]+")":"a"===c?x[3]:"rgba("+x.join(",")+")":g;return E},brighten:function(c){var g,x=this.rgba;if(this.stops)this.stops.forEach(function(g){g.brighten(c)});else if(I(c)&&0!==c)for(g=0;3>g;g++)x[g]+=G(255*c),0>x[g]&&(x[g]=0),255f.width)f={width:0,height:0}}else f=this.htmlGetBBox();l.isSVG&&(a=f.width,l=f.height,N&&(f.height=l={"11px,17":14,"13px,20":16}[A&&A.fontSize+","+Math.round(l)]||l),b&&(A=b*z,f.width=Math.abs(l*Math.sin(A))+Math.abs(a*Math.cos(A)), f.height=Math.abs(l*Math.cos(A))+Math.abs(a*Math.sin(A))));if(B&&0]*>/g,"").replace(/</g,"<").replace(/>/g,">")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))},setTextPath:function(a,b){var f=this.element,l={textAnchor:"text-anchor"},u=!1,d=this.textPathWrapper,k=!d;b=B(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},b);var e=b.attributes;if(a&&b&&b.enabled){this.options&&this.options.padding&&(e.dx=-this.options.padding); d||(this.textPathWrapper=d=this.renderer.createElement("textPath"),u=!0);var n=d.element;(b=a.element.getAttribute("id"))||a.element.setAttribute("id",b=c.uniqueKey());if(k)for(a=f.getElementsByTagName("tspan");a.length;)a[0].setAttribute("y",0),n.appendChild(a[0]);u&&d.add({element:this.text?this.text.element:f});n.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+b);G(e.dy)&&(n.parentNode.setAttribute("dy",e.dy),delete e.dy);G(e.dx)&&(n.parentNode.setAttribute("dx",e.dx), delete e.dx);m(e,function(a,b){n.setAttribute(l[b]||b,a)});f.removeAttribute("transform");this.removeTextOutline.call(d,[].slice.call(f.getElementsByTagName("tspan")));this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=this.updateTransform=A}else d&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(f,a));return this},destroyTextPath:function(a,b){var f;b.element.setAttribute("id","");for(f=this.textPathWrapper.element.childNodes;f.length;)a.firstChild.appendChild(f[0]); a.firstChild.removeChild(this.textPathWrapper.element);delete b.textPathWrapper},fillSetter:function(a,b,f){"string"===typeof a?f.setAttribute(b,a):a&&this.complexColor(a,b,f)},visibilitySetter:function(a,b,f){"inherit"===a?f.removeAttribute(b):this[b]!==a&&f.setAttribute(b,a);this[b]=a},zIndexSetter:function(a,b){var f=this.renderer,l=this.parentGroup,u=(l||f).element||f.box,A=this.element,d=!1;f=u===f.box;var k=this.added;var e;G(a)?(A.setAttribute("data-z-index",a),a=+a,this[b]===a&&(k=!1)):G(this[b])&& A.removeAttribute("data-z-index");this[b]=a;if(k){(a=this.zIndex)&&l&&(l.handleZ=!0);b=u.childNodes;for(e=b.length-1;0<=e&&!d;e--){l=b[e];k=l.getAttribute("data-z-index");var n=!G(k);if(l!==A)if(0>a&&n&&!f&&!e)u.insertBefore(A,b[e]),d=!0;else if(q(k)<=a||n&&(!G(a)||0<=a))u.insertBefore(A,b[e+1]||null),d=!0}d||(u.insertBefore(A,b[f?3:0]||null),d=!0)}return d},_defaultSetter:function(a,b,f){f.setAttribute(b,a)}});M.prototype.yGetter=M.prototype.xGetter;M.prototype.translateXSetter=M.prototype.translateYSetter= M.prototype.rotationSetter=M.prototype.verticalAlignSetter=M.prototype.rotationOriginXSetter=M.prototype.rotationOriginYSetter=M.prototype.scaleXSetter=M.prototype.scaleYSetter=M.prototype.matrixSetter=function(a,b){this[b]=a;this.doTransform=!0};M.prototype["stroke-widthSetter"]=M.prototype.strokeSetter=function(a,b,f){this[b]=a;this.stroke&&this["stroke-width"]?(M.prototype.fillSetter.call(this,this.stroke,"stroke",f),f.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"=== b&&0===a&&this.hasStroke?(f.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(f.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};g=c.SVGRenderer=function(){this.init.apply(this,arguments)};w(g.prototype,{Element:M,SVG_NS:U,init:function(b,l,u,A,d,e,n){var B=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});n||B.css(this.getStyle(A));A=B.element;b.appendChild(A);I(b,"dir","ltr");-1===b.innerHTML.indexOf("xmlns")&& I(A,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=A;this.boxWrapper=B;this.alignedObjects=[];this.url=(f||v)&&r.getElementsByTagName("base").length?P.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(r.createTextNode("Created with Highcharts 7.2.1"));this.defs=this.createElement("defs").add();this.allowHTML=e;this.forExport=d;this.styledMode=n;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount= 0;this.setSize(l,u,!1);var h;f&&b.getBoundingClientRect&&(l=function(){k(b,{left:0,top:0});h=b.getBoundingClientRect();k(b,{left:Math.ceil(h.left)-h.left+"px",top:Math.ceil(h.top)-h.top+"px"})},l(),this.unSubPixelFix=a(P,"resize",l))},definition:function(a){function b(a,l){var u;h(a).forEach(function(a){var A=f.createElement(a.tagName),d={};m(a,function(a,b){"tagName"!==b&&"children"!==b&&"textContent"!==b&&(d[b]=a)});A.attr(d);A.add(l||f.defs);a.textContent&&A.element.appendChild(r.createTextNode(a.textContent)); b(a.children||[],A);u=A});return u}var f=this;return b(a)},getStyle:function(a){return this.style=w({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();H(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&& this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a);return b},draw:A,getRadialAttr:function(a,b){return{cx:a[0]-a[2]/2+b.cx*a[2],cy:a[1]-a[2]/2+b.cy*a[2],r:b.r*a[2]}},truncate:function(a,b,f,l,u,A,d){var e=this,k=a.rotation,n,v=l?1:0,B=(f||l).length,h=B,c=[],J=function(a){b.firstChild&&b.removeChild(b.firstChild);a&&b.appendChild(r.createTextNode(a))},C=function(A,k){k=k||A;if(void 0===c[k])if(b.getSubStringLength)try{c[k]=u+b.getSubStringLength(0, l?k+1:k)}catch(fa){""}else e.getSpanWidth&&(J(d(f||l,A)),c[k]=u+e.getSpanWidth(a,b));return c[k]},m;a.rotation=0;var L=C(b.textContent.length);if(m=u+L>A){for(;v<=B;)h=Math.ceil((v+B)/2),l&&(n=d(l,h)),L=C(h,n&&n.length-1),v===B?v=B+1:L>A?B=h-1:v=h;0===B?J(""):f&&B===f.length-1||J(n||d(f||l,h))}l&&l.splice(0,h);a.actualWidth=L;a.rotation=k;return m},escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},buildText:function(a){var b=a.element,f=this,l=f.forExport,u=p(a.textStr,"").toString(), A=-1!==u.indexOf("<"),d=b.childNodes,e,n=I(b,"x"),v=a.styles,B=a.textWidth,h=v&&v.lineHeight,c=v&&v.textOutline,J=v&&"ellipsis"===v.textOverflow,C=v&&"nowrap"===v.whiteSpace,N=v&&v.fontSize,z,g=d.length;v=B&&!a.added&&this.box;var t=function(a){var l;f.styledMode||(l=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:N||f.style.fontSize||12);return h?q(h):f.fontMetrics(l,a.getAttribute("style")?a:b).h},Q=function(a,b){m(f.escapes,function(f,l){b&&-1!==b.indexOf(f)||(a=a.toString().replace(new RegExp(f, "g"),l))});return a},P=function(a,b){var f=a.indexOf("<");a=a.substring(f,a.indexOf(">")-f);f=a.indexOf(b+"=");if(-1!==f&&(f=f+b.length+1,b=a.charAt(f),'"'===b||"'"===b))return a=a.substring(f+1),a.substring(0,a.indexOf(b))},x=//g;var M=[u,J,C,h,c,N,B].join();if(M!==a.textCache){for(a.textCache=M;g--;)b.removeChild(d[g]);A||c||J||B||-1!==u.indexOf(" ")&&(!C||x.test(u))?(v&&v.appendChild(b),A?(u=f.styledMode?u.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,''): u.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,''),u=u.replace(//g,"").split(x)):u=[u],u=u.filter(function(a){return""!==a}),u.forEach(function(u,A){var d=0,v=0;u=u.replace(/^\s+|\s+$/g,"").replace(//g,"|||");var h=u.split("|||");h.forEach(function(u){if(""!==u||1===h.length){var c={},m=r.createElementNS(f.SVG_NS,"tspan"),p,O;(p=P(u,"class"))&& I(m,"class",p);if(p=P(u,"style"))p=p.replace(/(;| |^)color([ :])/,"$1fill$2"),I(m,"style",p);(O=P(u,"href"))&&!l&&(I(m,"onclick",'location.href="'+O+'"'),I(m,"class","highcharts-anchor"),f.styledMode||k(m,{cursor:"pointer"}));u=Q(u.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==u){m.appendChild(r.createTextNode(u));d?c.dx=0:A&&null!==n&&(c.x=n);I(m,c);b.appendChild(m);!d&&z&&(!L&&l&&k(m,{display:"block"}),I(m,"dy",t(m)));if(B){var q=u.replace(/([^\^])-/g,"$1- ").split(" ");c=!C&&(1Math.abs(u.end-u.start-2*Math.PI));var n=Math.cos(A),v=Math.sin(A),B=Math.cos(e);e=Math.sin(e);A=.001>u.end-A-Math.PI?0:1;u=["M",a+d*n,b+k*v,"A",d,k,0,A,p(u.clockwise,1),a+d*B,b+k*e];G(f)&&u.push(l?"M":"L",a+f*B,b+f*e,"A",f, f,0,A,0,a+f*n,b+f*v);u.push(l?"":"Z");return u},callout:function(a,b,f,l,u){var A=Math.min(u&&u.r||0,f,l),d=A+6,e=u&&u.anchorX;u=u&&u.anchorY;var k=["M",a+A,b,"L",a+f-A,b,"C",a+f,b,a+f,b,a+f,b+A,"L",a+f,b+l-A,"C",a+f,b+l,a+f,b+l,a+f-A,b+l,"L",a+A,b+l,"C",a,b+l,a,b+l,a,b+l-A,"L",a,b+A,"C",a,b,a,b,a+A,b];e&&e>f?u>b+d&&ue?u>b+d&&ul&&e>a+d&&eu&&e>a+d&&ea?a+3:Math.round(1.2*a);return{h:b, b:Math.round(.8*b),f:a}},rotCorr:function(a,b,f){var l=a;b&&f&&(l=Math.max(l*Math.cos(b*z),4));return{x:-a/3*Math.sin(b*z),y:l}},label:function(a,b,f,l,A,d,e,k,n){var v=this,h=v.styledMode,c=v.g("button"!==n&&"label"),J=c.text=v.text("",0,0,e).attr({zIndex:1}),r,m,C=0,L=3,p=0,z,U,q,g,N,O={},t,Q,P=/^url\((.*?)\)$/.test(l),x=h||P,da=function(){return h?r.strokeWidth()%2/2:(t?parseInt(t,10):0)%2/2};n&&c.addClass("highcharts-"+n);var y=function(){var a=J.element.style,b={};m=(void 0===z||void 0===U|| N)&&G(J.textStr)&&J.getBBox();c.width=(z||m.width||0)+2*L+p;c.height=(U||m.height||0)+2*L;Q=L+Math.min(v.fontMetrics(a&&a.fontSize,J).b,m?m.height:Infinity);x&&(r||(c.box=r=v.symbols[l]||P?v.symbol(l):v.rect(),r.addClass(("button"===n?"":"highcharts-label-box")+(n?" highcharts-"+n+"-box":"")),r.add(c),a=da(),b.x=a,b.y=(k?-Q:0)+a),b.width=Math.round(c.width),b.height=Math.round(c.height),r.attr(w(b,O)),O={})};var S=function(){var a=p+L;var b=k?0:Q;G(z)&&m&&("center"===N||"right"===N)&&(a+={center:.5, right:1}[N]*(z-m.width));if(a!==J.x||b!==J.y)J.attr("x",a),J.hasBoxWidthChanged&&(m=J.getBBox(!0),y()),void 0!==b&&J.attr("y",b);J.x=a;J.y=b};var F=function(a,b){r?r.attr(a,b):O[a]=b};c.onAdd=function(){J.add(c);c.attr({text:a||0===a?a:"",x:b,y:f});r&&G(A)&&c.attr({anchorX:A,anchorY:d})};c.widthSetter=function(a){z=E(a)?a:null};c.heightSetter=function(a){U=a};c["text-alignSetter"]=function(a){N=a};c.paddingSetter=function(a){G(a)&&a!==L&&(L=c.padding=a,S())};c.paddingLeftSetter=function(a){G(a)&& a!==p&&(p=a,S())};c.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==C&&(C=a,m&&c.attr({x:q}))};c.textSetter=function(a){void 0!==a&&J.attr({text:a});y();S()};c["stroke-widthSetter"]=function(a,b){a&&(x=!0);t=this["stroke-width"]=a;F(b,a)};h?c.rSetter=function(a,b){F(b,a)}:c.strokeSetter=c.fillSetter=c.rSetter=function(a,b){"r"!==b&&("fill"===b&&a&&(x=!0),c[b]=a);F(b,a)};c.anchorXSetter=function(a,b){A=c.anchorX=a;F(b,Math.round(a)-da()-q)};c.anchorYSetter=function(a,b){d=c.anchorY=a;F(b, a-g)};c.xSetter=function(a){c.x=a;C&&(a-=C*((z||m.width)+2*L),c["forceAnimate:x"]=!0);q=Math.round(a);c.attr("translateX",q)};c.ySetter=function(a){g=c.y=Math.round(a);c.attr("translateY",g)};var H=c.css;e={css:function(a){if(a){var b={};a=B(a);c.textProps.forEach(function(f){void 0!==a[f]&&(b[f]=a[f],delete a[f])});J.css(b);"width"in b&&y();"fontSize"in b&&(y(),S())}return H.call(c,a)},getBBox:function(){return{width:m.width+2*L,height:m.height+2*L,x:m.x-L,y:m.y-L}},destroy:function(){u(c.element, "mouseenter");u(c.element,"mouseleave");J&&(J=J.destroy());r&&(r=r.destroy());M.prototype.destroy.call(c);c=v=y=S=F=null}};h||(e.shadow=function(a){a&&(y(),r&&r.shadow(a));return c});return w(c,e)}});c.Renderer=g});K(D,"parts/Html.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.attr,G=g.defined,H=g.extend,y=g.pick,w=g.pInt,x=c.createElement,E=c.css,F=c.isFirefox,t=c.isMS,m=c.isWebKit,p=c.SVGElement;g=c.SVGRenderer;var q=c.win;H(p.prototype,{htmlCss:function(c){var a="SPAN"=== this.element.tagName&&c&&"width"in c,b=y(a&&c.width,void 0);if(a){delete c.width;this.textWidth=b;var d=!0}c&&"ellipsis"===c.textOverflow&&(c.whiteSpace="nowrap",c.overflow="hidden");this.styles=H(this.styles,c);E(this.element,c);d&&this.htmlUpdateTransform();return this},htmlGetBBox:function(){var c=this.element;return{x:c.offsetLeft,y:c.offsetTop,width:c.offsetWidth,height:c.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var c=this.renderer,a=this.element,b=this.translateX||0,d=this.translateY|| 0,e=this.x||0,k=this.y||0,m=this.textAlign||"left",p={left:0,center:.5,right:1}[m],r=this.styles,n=r&&r.whiteSpace;E(a,{marginLeft:b,marginTop:d});!c.styledMode&&this.shadows&&this.shadows.forEach(function(a){E(a,{marginLeft:b+1,marginTop:d+1})});this.inverted&&[].forEach.call(a.childNodes,function(b){c.invertChild(b,a)});if("SPAN"===a.tagName){r=this.rotation;var f=this.textWidth&&w(this.textWidth),l=[r,m,a.innerHTML,this.textWidth,this.textAlign].join(),v;(v=f!==this.oldTextWidth)&&!(v=f>this.oldTextWidth)&& ((v=this.textPxLength)||(E(a,{width:"",whiteSpace:n||"nowrap"}),v=a.offsetWidth),v=v>f);v&&(/[ \-]/.test(a.textContent||a.innerText)||"ellipsis"===a.style.textOverflow)?(E(a,{width:f+"px",display:"block",whiteSpace:n||"normal"}),this.oldTextWidth=f,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1;l!==this.cTT&&(n=c.fontMetrics(a.style.fontSize,a).b,!G(r)||r===(this.oldRotation||0)&&m===this.oldAlign||this.setSpanRotation(r,p,n),this.getSpanCorrection(!G(r)&&this.textPxLength||a.offsetWidth, n,p,r,m));E(a,{left:e+(this.xCorr||0)+"px",top:k+(this.yCorr||0)+"px"});this.cTT=l;this.oldRotation=r;this.oldAlign=m}}else this.alignOnAdd=!0},setSpanRotation:function(c,a,b){var d={},e=this.renderer.getTransformKey();d[e]=d.transform="rotate("+c+"deg)";d[e+(F?"Origin":"-origin")]=d.transformOrigin=100*a+"% "+b+"px";E(this.element,d)},getSpanCorrection:function(c,a,b){this.xCorr=-c*b;this.yCorr=-a}});H(g.prototype,{getTransformKey:function(){return t&&!/Edge/.test(q.navigator.userAgent)?"-ms-transform": m?"-webkit-transform":F?"MozTransform":q.opera?"-o-transform":""},html:function(c,a,b){var d=this.createElement("span"),e=d.element,k=d.renderer,h=k.isSVG,m=function(a,b){["opacity","visibility"].forEach(function(f){a[f+"Setter"]=function(l,d,e){var A=a.div?a.div.style:b;p.prototype[f+"Setter"].call(this,l,d,e);A&&(A[d]=l)}});a.addedSetters=!0};d.textSetter=function(a){a!==e.innerHTML&&(delete this.bBox,delete this.oldTextWidth);this.textStr=a;e.innerHTML=y(a,"");d.doTransform=!0};h&&m(d,d.element.style); d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,b){"align"===b&&(b="textAlign");d[b]=a;d.doTransform=!0};d.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};d.attr({text:c,x:Math.round(a),y:Math.round(b)}).css({position:"absolute"});k.styledMode||d.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});e.style.whiteSpace="nowrap";d.css=d.htmlCss;h&&(d.add=function(a){var b=k.box.parentNode,f=[];if(this.parentGroup=a){var l=a.div; if(!l){for(;a;)f.push(a),a=a.parentGroup;f.reverse().forEach(function(a){function e(b,f){a[f]=b;"translateX"===f?u.left=b+"px":u.top=b+"px";a.doTransform=!0}var A=I(a.element,"class");l=a.div=a.div||x("div",A?{className:A}:void 0,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},l||b);var u=l.style;H(a,{classSetter:function(a){return function(b){this.element.setAttribute("class",b);a.className= b}}(l),on:function(){f[0].div&&d.on.apply({element:f[0].div},arguments);return a},translateXSetter:e,translateYSetter:e});a.addedSetters||m(a)})}}else l=b;l.appendChild(e);d.added=!0;d.alignOnAdd&&d.htmlUpdateTransform();return d});return d}})});K(D,"parts/Time.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.extend,H=g.isObject,y=g.objectEach,w=g.pick,x=g.splat,E=c.merge,F=c.timeUnits,t=c.win;c.Time=function(c){this.update(c,!1)};c.Time.prototype={defaultOptions:{Date:void 0, getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},update:function(c){var m=w(c&&c.useUTC,!0),q=this;this.options=c=E(!0,this.options||{},c);this.Date=c.Date||t.Date||Date;this.timezoneOffset=(this.useUTC=m)&&c.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(m&&!c.getTimezoneOffset&&!c.timezone))||this.timezoneOffset?(this.get=function(c,a){var b=a.getTime(),d=b-q.getTimezoneOffset(a);a.setTime(d);c=a["getUTC"+c]();a.setTime(b);return c}, this.set=function(c,a,b){if("Milliseconds"===c||"Seconds"===c||"Minutes"===c&&0===a.getTimezoneOffset()%60)a["set"+c](b);else{var d=q.getTimezoneOffset(a);d=a.getTime()-d;a.setTime(d);a["setUTC"+c](b);c=q.getTimezoneOffset(a);d=a.getTime()+c;a.setTime(d)}}):m?(this.get=function(c,a){return a["getUTC"+c]()},this.set=function(c,a,b){return a["setUTC"+c](b)}):(this.get=function(c,a){return a["get"+c]()},this.set=function(c,a,b){return a["set"+c](b)})},makeTime:function(m,p,q,h,a,b){if(this.useUTC){var d= this.Date.UTC.apply(0,arguments);var e=this.getTimezoneOffset(d);d+=e;var k=this.getTimezoneOffset(d);e!==k?d+=k-e:e-36E5!==this.getTimezoneOffset(d-36E5)||c.isSafari||(d-=36E5)}else d=(new this.Date(m,p,w(q,1),w(h,0),w(a,0),w(b,0))).getTime();return d},timezoneOffsetFunction:function(){var m=this,p=this.options,q=t.moment;if(!this.useUTC)return function(c){return 6E4*(new Date(c)).getTimezoneOffset()};if(p.timezone){if(q)return function(c){return 6E4*-q.tz(c,p.timezone).utcOffset()};c.error(25)}return this.useUTC&& p.getTimezoneOffset?function(c){return 6E4*p.getTimezoneOffset(c)}:function(){return 6E4*(m.timezoneOffset||0)}},dateFormat:function(m,p,q){if(!I(p)||isNaN(p))return c.defaultOptions.lang.invalidDate||"";m=w(m,"%Y-%m-%d %H:%M:%S");var h=this,a=new this.Date(p),b=this.get("Hours",a),d=this.get("Day",a),e=this.get("Date",a),k=this.get("Month",a),C=this.get("FullYear",a),z=c.defaultOptions.lang,r=z.weekdays,n=z.shortWeekdays,f=c.pad;a=G({a:n?n[d]:r[d].substr(0,3),A:r[d],d:f(e),e:f(e,2," "),w:d,b:z.shortMonths[k], B:z.months[k],m:f(k+1),o:k+1,y:C.toString().substr(2,2),Y:C,H:f(b),k:b,I:f(b%12||12),l:b%12||12,M:f(h.get("Minutes",a)),p:12>b?"AM":"PM",P:12>b?"am":"pm",S:f(a.getSeconds()),L:f(Math.floor(p%1E3),3)},c.dateFormats);y(a,function(a,b){for(;-1!==m.indexOf("%"+b);)m=m.replace("%"+b,"function"===typeof a?a.call(h,p):a)});return q?m.substr(0,1).toUpperCase()+m.substr(1):m},resolveDTLFormat:function(c){return H(c,!0)?c:(c=x(c),{main:c[0],from:c[1],to:c[2]})},getTimeTicks:function(c,p,q,h){var a=this,b=[], d={};var e=new a.Date(p);var k=c.unitRange,m=c.count||1,z;h=w(h,1);if(I(p)){a.set("Milliseconds",e,k>=F.second?0:m*Math.floor(a.get("Milliseconds",e)/m));k>=F.second&&a.set("Seconds",e,k>=F.minute?0:m*Math.floor(a.get("Seconds",e)/m));k>=F.minute&&a.set("Minutes",e,k>=F.hour?0:m*Math.floor(a.get("Minutes",e)/m));k>=F.hour&&a.set("Hours",e,k>=F.day?0:m*Math.floor(a.get("Hours",e)/m));k>=F.day&&a.set("Date",e,k>=F.month?1:Math.max(1,m*Math.floor(a.get("Date",e)/m)));if(k>=F.month){a.set("Month",e,k>= F.year?0:m*Math.floor(a.get("Month",e)/m));var r=a.get("FullYear",e)}k>=F.year&&a.set("FullYear",e,r-r%m);k===F.week&&(r=a.get("Day",e),a.set("Date",e,a.get("Date",e)-r+h+(r4*F.month||a.getTimezoneOffset(p)!==a.getTimezoneOffset(q));p=e.getTime();for(e=1;pb.length&&b.forEach(function(b){0===b%18E5&&"000000000"===a.dateFormat("%H%M%S%L",b)&&(d[b]="day")})}b.info=G(c,{higherRanks:d,totalRange:k*m});return b}}});K(D,"parts/Options.js",[D["parts/Globals.js"]],function(c){var g=c.color,I=c.merge;c.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square", "triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:c.Time.prototype.defaultOptions,chart:{styledMode:!1, borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}}, legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom", x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:c.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:c.isTouchDevice? 25:10,headerFormat:'{point.key}
',pointFormat:'\u25cf {series.name}: {point.y}
',backgroundColor:g("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999", fontSize:"9px"},text:"Highcharts.com"}};c.setOptions=function(g){c.defaultOptions=I(!0,c.defaultOptions,g);(g.time||g.global)&&c.time.update(I(c.defaultOptions.global,c.defaultOptions.time,g.global,g.time));return c.defaultOptions};c.getOptions=function(){return c.defaultOptions};c.defaultPlotOptions=c.defaultOptions.plotOptions;c.time=new c.Time(I(c.defaultOptions.global,c.defaultOptions.time));c.dateFormat=function(g,H,y){return c.time.dateFormat(g,H,y)};""});K(D,"parts/Tick.js",[D["parts/Globals.js"], D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.destroyObjectProperties,H=g.extend,y=g.isNumber,w=g.pick,x=c.correctFloat,E=c.fireEvent,F=c.merge,t=c.deg2rad;c.Tick=function(c,p,q,h,a){this.axis=c;this.pos=p;this.type=q||"";this.isNewLabel=this.isNew=!0;this.parameters=a||{};this.tickmarkOffset=this.parameters.tickmarkOffset;this.options=this.parameters.options;q||h||this.addLabel()};c.Tick.prototype={addLabel:function(){var c=this,p=c.axis,q=p.options,h=p.chart,a=p.categories,b=p.names, d=c.pos,e=w(c.options&&c.options.labels,q.labels),k=p.tickPositions,C=d===k[0],z=d===k[k.length-1];a=this.parameters.category||(a?w(a[d],b[d],d):d);var r=c.label;k=k.info;var n,f;if(p.isDatetimeAxis&&k){var l=h.time.resolveDTLFormat(q.dateTimeLabelFormats[!q.grid&&k.higherRanks[d]||k.unitName]);var v=l.main}c.isFirst=C;c.isLast=z;c.formatCtx={axis:p,chart:h,isFirst:C,isLast:z,dateTimeLabelFormat:v,tickPositionInfo:k,value:p.isLog?x(p.lin2log(a)):a,pos:d};q=p.labelFormatter.call(c.formatCtx,this.formatCtx); if(f=l&&l.list)c.shortenLabel=function(){for(n=0;nk&&h-C*zb&&(l=Math.round((a-h)/Math.cos(k*t)));else if(a=h+(1-C)*z,h-C*zb&&(n=b-c.x+n*C,f=-1),n=Math.min(r,n),nn||m.autoRotation&&(e.styles||{}).width)l=n;l&&(this.shortenLabel?this.shortenLabel():(v.width=Math.floor(l),(q.style||{}).textOverflow||(v.textOverflow="ellipsis"),e.css(v)))},getPosition:function(m,p,q,h){var a=this.axis,b=a.chart, d=h&&b.oldChartHeight||b.chartHeight;m={x:m?c.correctFloat(a.translate(p+q,null,null,h)+a.transB):a.left+a.offset+(a.opposite?(h&&b.oldChartWidth||b.chartWidth)-a.right-a.left:0),y:m?d-a.bottom+a.offset-(a.opposite?a.height:0):c.correctFloat(d-a.translate(p+q,null,null,h)-a.transB)};m.y=Math.max(Math.min(m.y,1E5),-1E5);E(this,"afterGetPosition",{pos:m});return m},getLabelPosition:function(c,p,q,h,a,b,d,e){var k=this.axis,m=k.transA,z=k.isLinked&&k.linkedParent?k.linkedParent.reversed:k.reversed,r= k.staggerLines,n=k.tickRotCorr||{x:0,y:0},f=a.y,l=h||k.reserveSpaceDefault?0:-k.labelOffset*("center"===k.labelAlign?.5:1),v={};I(f)||(f=0===k.side?q.rotation?-8:-q.getBBox().height:2===k.side?n.y+8:Math.cos(q.rotation*t)*(n.y-q.getBBox(!1,0).height/2));c=c+a.x+l+n.x-(b&&h?b*m*(z?-1:1):0);p=p+f-(b&&!h?b*m*(z?1:-1):0);r&&(q=d/(e||1)%r,k.opposite&&(q=r-q-1),p+=k.labelOffset/r*q);v.x=c;v.y=Math.round(p);E(this,"afterGetLabelPosition",{pos:v,tickmarkOffset:b,index:d});return v},getMarkPath:function(c, p,q,h,a,b){return b.crispLine(["M",c,p,"L",c+(a?0:-q),p+(a?q:0)],h)},renderGridLine:function(c,p,q){var h=this.axis,a=h.options,b=this.gridLine,d={},e=this.pos,k=this.type,m=w(this.tickmarkOffset,h.tickmarkOffset),z=h.chart.renderer,r=k?k+"Grid":"grid",n=a[r+"LineWidth"],f=a[r+"LineColor"];a=a[r+"LineDashStyle"];b||(h.chart.styledMode||(d.stroke=f,d["stroke-width"]=n,a&&(d.dashstyle=a)),k||(d.zIndex=1),c&&(p=0),this.gridLine=b=z.path().attr(d).addClass("highcharts-"+(k?k+"-":"")+"grid-line").add(h.gridGroup)); if(b&&(q=h.getPlotLinePath({value:e+m,lineWidth:b.strokeWidth()*q,force:"pass",old:c})))b[c||this.isNew?"attr":"animate"]({d:q,opacity:p})},renderMark:function(c,p,q){var h=this.axis,a=h.options,b=h.chart.renderer,d=this.type,e=d?d+"Tick":"tick",k=h.tickSize(e),m=this.mark,z=!m,r=c.x;c=c.y;var n=w(a[e+"Width"],!d&&h.isXAxis?1:0);a=a[e+"Color"];k&&(h.opposite&&(k[0]=-k[0]),z&&(this.mark=m=b.path().addClass("highcharts-"+(d?d+"-":"")+"tick").add(h.axisGroup),h.chart.styledMode||m.attr({stroke:a,"stroke-width":n})), m[z?"attr":"animate"]({d:this.getMarkPath(r,c,k[0],m.strokeWidth()*q,h.horiz,b),opacity:p}))},renderLabel:function(c,p,q,h){var a=this.axis,b=a.horiz,d=a.options,e=this.label,k=d.labels,m=k.step;a=w(this.tickmarkOffset,a.tickmarkOffset);var z=!0,r=c.x;c=c.y;e&&y(r)&&(e.xy=c=this.getLabelPosition(r,c,e,b,k,a,h,m),this.isFirst&&!this.isLast&&!w(d.showFirstLabel,1)||this.isLast&&!this.isFirst&&!w(d.showLastLabel,1)?z=!1:!b||k.step||k.rotation||p||0===q||this.handleOverflow(c),m&&h%m&&(z=!1),z&&y(c.y)? (c.opacity=q,e[this.isNewLabel?"attr":"animate"](c),this.isNewLabel=!1):(e.attr("y",-9999),this.isNewLabel=!0))},render:function(m,p,q){var h=this.axis,a=h.horiz,b=this.pos,d=w(this.tickmarkOffset,h.tickmarkOffset);b=this.getPosition(a,b,d,p);d=b.x;var e=b.y;h=a&&d===h.pos+h.len||!a&&e===h.pos?-1:1;q=w(q,1);this.isActive=!0;this.renderGridLine(p,q,h);this.renderMark(b,q,h);this.renderLabel(b,p,q,m);this.isNew=!1;c.fireEvent(this,"afterRender")},destroy:function(){G(this,this.axis)}}});K(D,"parts/Axis.js", [D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.arrayMax,G=g.arrayMin,H=g.defined,y=g.destroyObjectProperties,w=g.extend,x=g.isArray,E=g.isNumber,F=g.isString,t=g.objectEach,m=g.pick,p=g.splat,q=g.syncTimeout,h=c.addEvent,a=c.animObject,b=c.color,d=c.correctFloat,e=c.defaultOptions,k=c.deg2rad,C=c.fireEvent,z=c.format,r=c.getMagnitude,n=c.merge,f=c.normalizeTickInterval,l=c.removeEvent,v=c.seriesTypes,B=c.Tick;g=function(){this.init.apply(this,arguments)};w(g.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L", range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,showEmpty:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle", style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){return c.numberFormat(this.total,-1)},style:{color:"#000000", fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},init:function(a,b){var f=b.isX,l=this;l.chart=a;l.horiz=a.inverted&&!l.isZAxis?!f:f;l.isXAxis=f;l.coll=l.coll||(f?"xAxis": "yAxis");C(this,"init",{userOptions:b});l.opposite=b.opposite;l.side=b.side||(l.horiz?l.opposite?0:2:l.opposite?1:3);l.setOptions(b);var u=this.options,A=u.type;l.labelFormatter=u.labels.formatter||l.defaultLabelFormatter;l.userOptions=b;l.minPixelPadding=0;l.reversed=u.reversed;l.visible=!1!==u.visible;l.zoomEnabled=!1!==u.zoomEnabled;l.hasNames="category"===A||!0===u.categories;l.categories=u.categories||l.hasNames;l.names||(l.names=[],l.names.keys={});l.plotLinesAndBandsGroups={};l.isLog="logarithmic"=== A;l.isDatetimeAxis="datetime"===A;l.positiveValuesOnly=l.isLog&&!l.allowNegativeLog;l.isLinked=H(u.linkedTo);l.ticks={};l.labelEdge=[];l.minorTicks={};l.plotLinesAndBands=[];l.alternateBands={};l.len=0;l.minRange=l.userMinRange=u.minRange||u.maxZoom;l.range=u.range;l.offset=u.offset||0;l.stacks={};l.oldStacks={};l.stacksTouched=0;l.max=null;l.min=null;l.crosshair=m(u.crosshair,p(a.options.tooltip.crosshairs)[f?0:1],!1);b=l.options.events;-1===a.axes.indexOf(l)&&(f?a.axes.splice(a.xAxis.length,0,l): a.axes.push(l),a[l.coll].push(l));l.series=l.series||[];a.inverted&&!l.isZAxis&&f&&void 0===l.reversed&&(l.reversed=!0);t(b,function(a,b){c.isFunction(a)&&h(l,b,a)});l.lin2log=u.linearToLogConverter||l.lin2log;l.isLog&&(l.val2lin=l.log2lin,l.lin2val=l.lin2log);C(this,"afterInit")},setOptions:function(a){this.options=n(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side], n(e[this.coll],a));C(this,"afterSetOptions",{userOptions:a})},defaultLabelFormatter:function(){var a=this.axis,b=this.value,f=a.chart.time,l=a.categories,d=this.dateTimeLabelFormat,k=e.lang,n=k.numericSymbols;k=k.numericSymbolMagnitude||1E3;var v=n&&n.length,B=a.options.labels.format;a=a.isLog?Math.abs(b):a.tickInterval;if(B)var h=z(B,this,f);else if(l)h=b;else if(d)h=f.dateFormat(d,b);else if(v&&1E3<=a)for(;v--&&void 0===h;)f=Math.pow(k,v+1),a>=f&&0===10*b%f&&null!==n[v]&&0!==b&&(h=c.numberFormat(b/ f,-1)+n[v]);void 0===h&&(h=1E4<=Math.abs(b)?c.numberFormat(b,-1):c.numberFormat(b,-1,void 0,""));return h},getSeriesExtremes:function(){var a=this,b=a.chart,f;C(this,"getSeriesExtremes",null,function(){a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();a.series.forEach(function(l){if(l.visible||!b.options.chart.ignoreHiddenSeries){var u=l.options,A=u.threshold;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=A&&(A=null);if(a.isXAxis){if(u= l.xData,u.length){f=l.getXExtremes(u);var d=f.min;var e=f.max;E(d)||d instanceof Date||(u=u.filter(E),f=l.getXExtremes(u),d=f.min,e=f.max);u.length&&(a.dataMin=Math.min(m(a.dataMin,d),d),a.dataMax=Math.max(m(a.dataMax,e),e))}}else if(l.getExtremes(),e=l.dataMax,d=l.dataMin,H(d)&&H(e)&&(a.dataMin=Math.min(m(a.dataMin,d),d),a.dataMax=Math.max(m(a.dataMax,e),e)),H(A)&&(a.threshold=A),!u.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})});C(this,"afterGetSeriesExtremes")},translate:function(a, b,f,l,d,e){var u=this.linkedParent||this,A=1,k=0,n=l?u.oldTransA:u.transA;l=l?u.oldMin:u.min;var c=u.minPixelPadding;d=(u.isOrdinal||u.isBroken||u.isLog&&d)&&u.lin2val;n||(n=u.transA);f&&(A*=-1,k=u.len);u.reversed&&(A*=-1,k-=A*(u.sector||u.len));b?(a=(a*A+k-c)/n+l,d&&(a=u.lin2val(a))):(d&&(a=u.val2lin(a)),a=E(l)?A*(a-l)*n+k+A*c+(E(e)?n*e:0):void 0);return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos), !0,!this.horiz,null,!0)},getPlotLinePath:function(a){var b=this,f=b.chart,l=b.left,d=b.top,A=a.old,e=a.value,k=a.translatedValue,n=a.lineWidth,c=a.force,v,B,h,r,z=A&&f.oldChartHeight||f.chartHeight,p=A&&f.oldChartWidth||f.chartWidth,q,g=b.transB,t=function(a,b,f){if("pass"!==c&&af)c?a=Math.min(Math.max(b,a),f):q=!0;return a};a={value:e,lineWidth:n,old:A,force:c,acrossPanes:a.acrossPanes,translatedValue:k};C(this,"getPlotLinePath",a,function(a){k=m(k,b.translate(e,null,null,A));k=Math.min(Math.max(-1E5, k),1E5);v=h=Math.round(k+g);B=r=Math.round(z-k-g);E(k)?b.horiz?(B=d,r=z-b.bottom,v=h=t(v,l,l+b.width)):(v=l,h=p-b.right,B=r=t(B,d,d+b.height)):(q=!0,c=!1);a.path=q&&!c?null:f.renderer.crispLine(["M",v,B,"L",h,r],n||1)});return a.path},getLinearTickPositions:function(a,b,f){var l=d(Math.floor(b/a)*a);f=d(Math.ceil(f/a)*a);var u=[],A;d(l+a)===l&&(A=20);if(this.single)return[b];for(b=l;b<=f;){u.push(b);b=d(b+a,A);if(b===e)break;var e=b}return u},getMinorTickInterval:function(){var a=this.options;return!0=== a.minorTicks?m(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval},getMinorTickPositions:function(){var a=this,b=a.options,f=a.tickPositions,l=a.minorTickInterval,d=[],e=a.pointRangePadding||0,k=a.min-e;e=a.max+e;var n=e-k;if(n&&n/l=this.minRange; var v=this.minRange;var B=(v-f+b)/2;B=[b-B,m(a.min,b-B)];c&&(B[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin);b=I(B);f=[b+v,m(a.max,b+v)];c&&(f[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax);f=G(f);f-b=g)y=g,h=0;else if(b.dataMax<=g){var F=g;B=0}b.min=m(x,y,b.dataMin);b.max=m(w,F,b.dataMax)}k&&(b.positiveValuesOnly&&!a&&0>=Math.min(b.min,m(b.dataMin,b.min))&&c.error(10,1,l),b.min=d(b.log2lin(b.min),16),b.max=d(b.log2lin(b.max),16));b.range&&H(b.max)&&(b.userMin=b.min=x=Math.max(b.dataMin,b.minFromRange()),b.userMax=w=b.max,b.range=null);C(b,"foundExtremes");b.beforePadding&&b.beforePadding(); b.adjustForMinRange();!(q||b.axisPointRange||b.usePercentage||v)&&H(b.min)&&H(b.max)&&(l=b.max-b.min)&&(!H(x)&&h&&(b.min-=l*h),!H(w)&&B&&(b.max+=l*B));E(e.softMin)&&!E(b.userMin)&&e.softMinb.max&&(b.max=w=e.softMax);E(e.floor)&&(b.min=Math.min(Math.max(b.min,e.floor),Number.MAX_VALUE));E(e.ceiling)&&(b.max=Math.max(Math.min(b.max,e.ceiling),m(b.userMax,-Number.MAX_VALUE)));t&&H(b.dataMin)&&(g=g||0,!H(x)&&b.min=g?b.min= b.options.minRange?Math.min(g,b.max-b.minRange):g:!H(w)&&b.max>g&&b.dataMax<=g&&(b.max=b.options.minRange?Math.max(g,b.min+b.minRange):g));b.tickInterval=b.min===b.max||void 0===b.min||void 0===b.max?1:v&&!z&&p===b.linkedParent.options.tickPixelInterval?z=b.linkedParent.tickInterval:m(z,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,q?1:(b.max-b.min)*p/Math.max(b.len,p));n&&!a&&b.series.forEach(function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0); b.beforeSetTickPositions&&b.beforeSetTickPositions();b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval));b.pointRange&&!z&&(b.tickInterval=Math.max(b.pointRange,b.tickInterval));a=m(e.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!z&&b.tickIntervalb.tickInterval&&1E3b.max)),!!this.tickAmount));this.tickAmount||(b.tickInterval= b.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,b=a.tickPositions;var f=this.getMinorTickInterval();var l=a.tickPositioner,d=a.startOnTick,e=a.endOnTick;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===f&&this.tickInterval?this.tickInterval/5:f;this.single=this.min===this.max&&H(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions= f=b&&b.slice();!f&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(f=[this.min,this.max],c.error(19,!1,this.chart)):f=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),f.length>this.len&&(f=[f[0], f.pop()],f[0]===f[1]&&(f.length=1)),this.tickPositions=f,l&&(l=l.apply(this,[this.min,this.max])))&&(this.tickPositions=f=l);this.paddedTicks=f.slice(0);this.trimTicks(f,d,e);this.isLinked||(this.single&&2>f.length&&!this.categories&&(this.min-=.5,this.max+=.5),b||l||this.adjustTickAmount());C(this,"afterSetTickPositions")},trimTicks:function(a,b,f){var l=a[0],d=a[a.length-1],e=this.minPointOffset||0;C(this,"trimTicks");if(!this.isLinked){if(b&&-Infinity!==l)this.min=l;else for(;this.min-e>a[0];)a.shift(); if(f)this.max=d;else for(;this.max+eb&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.options,b=this.tickInterval,f=this.tickPositions,l=this.tickAmount,e=this.finalTickAmt,k=f&&f.length,n=m(this.threshold,this.softThreshold?0:null),c;if(this.hasData()){if(kl&&(this.tickInterval*=2,this.setTickPositions());if(H(e)){for(b=a=f.length;b--;)(3===e&&1===b%2||2>=e&&0k&&(b=k)),H(l)&&(dk&&(d=k))), this.displayBtn=void 0!==b||void 0!==d,this.setExtremes(b,d,!1,void 0,{trigger:"zoom"});a.zoomed=!0});return a.zoomed},setAxisSize:function(){var a=this.chart,b=this.options,f=b.offsets||[0,0,0,0],l=this.horiz,d=this.width=Math.round(c.relativeLength(m(b.width,a.plotWidth-f[3]+f[1]),a.plotWidth)),e=this.height=Math.round(c.relativeLength(m(b.height,a.plotHeight-f[0]+f[2]),a.plotHeight)),k=this.top=Math.round(c.relativeLength(m(b.top,a.plotTop+f[0]),a.plotHeight,a.plotTop));b=this.left=Math.round(c.relativeLength(m(b.left, a.plotLeft+f[3]),a.plotWidth,a.plotLeft));this.bottom=a.chartHeight-e-k;this.right=a.chartWidth-d-b;this.len=Math.max(l?d:e,0);this.pos=l?b:k},getExtremes:function(){var a=this.isLog;return{min:a?d(this.lin2log(this.min)):this.min,max:a?d(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,f=b?this.lin2log(this.min):this.min;b=b?this.lin2log(this.max):this.max;null===a||-Infinity===a?a=f:Infinity=== a?a=b:f>a?a=f:bb?a.align="right":195b&&(a.align="left")});return a.align},tickSize:function(a){var b=this.options,f=b[a+"Length"],l=m(b[a+"Width"],"tick"===a&&this.isXAxis&&!this.categories?1:0);if(l&&f){"inside"===b[a+"Position"]&&(f=-f);var d=[f,l]}a={tickSize:d};C(this,"afterTickSize",a);return a.tickSize},labelMetrics:function(){var a= this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,f=this.tickInterval,l=f,e=this.len/(((this.categories?1:0)+this.max-this.min)/f),n,c=a.rotation,v=this.labelMetrics(),B,h=Number.MAX_VALUE,r,C=this.max-this.min,z=function(a){var b=a/(e||1);b=1C&&Infinity!==a&&Infinity!==e&&C&&(b=Math.ceil(C/ f));return d(b*f)};b?(r=!a.staggerLines&&!a.step&&(H(c)?[c]:e=a){B=z(Math.abs(v.h/Math.sin(k*a)));var b=B+Math.abs(a/360);b(l.step|| 0)&&!l.rotation&&(this.staggerLines||1)*this.len/d||!f&&(l.style&&parseInt(l.style.width,10)||e&&e-b.spacing[3]||.33*b.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,f=this.tickPositions,l=this.ticks,d=this.options.labels,e=d&&d.style||{},k=this.horiz,n=this.getSlotWidth(),c=Math.max(1,Math.round(n-2*(d.padding||5))),v={},B=this.labelMetrics(),h=d.style&&d.style.textOverflow,r=0;F(d.rotation)||(v.rotation=d.rotation||0);f.forEach(function(a){(a=l[a])&&a.label&&a.label.textPxLength> r&&(r=a.label.textPxLength)});this.maxLabelLength=r;if(this.autoRotation)r>c&&r>B.h?v.rotation=this.labelRotation:this.labelRotation=0;else if(n){var m=c;if(!h){var C="clip";for(c=f.length;!k&&c--;){var z=f[c];if(z=l[z].label)z.styles&&"ellipsis"===z.styles.textOverflow?z.css({textOverflow:"clip"}):z.textPxLength>n&&z.css({width:n+"px"}),z.getBBox().height>this.len/f.length-(B.h-B.f)&&(z.specificTextOverflow="ellipsis")}}}v.rotation&&(m=r>.5*a.chartHeight?.33*a.chartHeight:r,h||(C="ellipsis"));if(this.labelAlign= d.align||this.autoLabelAlign(this.labelRotation))v.align=this.labelAlign;f.forEach(function(a){var b=(a=l[a])&&a.label,f=e.width,d={};b&&(b.attr(v),a.shortenLabel?a.shortenLabel():m&&!f&&"nowrap"!==e.whiteSpace&&(m=this.min&&a<=this.max)l[a]||(l[a]=new B(this,a)),d&&l[a].isNew&& l[a].render(b,!0,-1),l[a].render(b)},render:function(){var b=this,f=b.chart,l=b.options,d=b.isLog,e=b.isLinked,k=b.tickPositions,n=b.axisTitle,v=b.ticks,h=b.minorTicks,r=b.alternateBands,m=l.stackLabels,z=l.alternateGridColor,p=b.tickmarkOffset,g=b.axisLine,x=b.showAxis,w=a(f.renderer.globalAnimation),y,F;b.labelEdge.length=0;b.overlap=!1;[v,h,r].forEach(function(a){t(a,function(a){a.isActive=!1})});if(b.hasData()||e)b.minorTickInterval&&!b.categories&&b.getMinorTickPositions().forEach(function(a){b.renderMinorTick(a)}), k.length&&(k.forEach(function(a,f){b.renderTick(a,f)}),p&&(0===b.min||b.single)&&(v[-1]||(v[-1]=new B(b,-1,null,!0)),v[-1].render(-1))),z&&k.forEach(function(a,l){F=void 0!==k[l+1]?k[l+1]+p:b.max-p;0===l%2&&ag&&(!E||b<=x)&&void 0!==b&&m.push(b);b>x&&(q=!0);var b=a}}}else g=this.lin2log(g),x=this.lin2log(x),c=E?this.getMinorTickInterval():w.tickInterval,c=I("auto"===c?null:c,this._minorAutoInterval,w.tickPixelInterval/(E?5:1)*(x-g)/((E?t/this.tickPositions.length:t)||1)),c=H(c,null,G(c)),m=this.getLinearTickPositions(c, g,x).map(this.log2lin),E||(this._minorAutoInterval=c/5);E||(this.tickInterval=c);return m};g.prototype.log2lin=function(c){return Math.log(c)/Math.LN10};g.prototype.lin2log=function(c){return Math.pow(10,c)}});K(D,"parts/PlotLineOrBand.js",[D["parts/Globals.js"],D["parts/Axis.js"],D["parts/Utilities.js"]],function(c,g,I){var G=I.arrayMax,H=I.arrayMin,y=I.defined,w=I.destroyObjectProperties,x=I.erase,E=I.extend,F=I.objectEach,t=I.pick,m=c.merge;c.PlotLineOrBand=function(c,m){this.axis=c;m&&(this.options= m,this.id=m.id)};c.PlotLineOrBand.prototype={render:function(){c.fireEvent(this,"render");var p=this,g=p.axis,h=g.horiz,a=p.options,b=a.label,d=p.label,e=a.to,k=a.from,C=a.value,z=y(k)&&y(e),r=y(C),n=p.svgElem,f=!n,l=[],v=a.color,B=t(a.zIndex,0),A=a.events;l={"class":"highcharts-plot-"+(z?"band ":"line ")+(a.className||"")};var u={},J=g.chart.renderer,L=z?"bands":"lines";g.isLog&&(k=g.log2lin(k),e=g.log2lin(e),C=g.log2lin(C));g.chart.styledMode||(r?(l.stroke=v||"#999999",l["stroke-width"]=t(a.width, 1),a.dashStyle&&(l.dashstyle=a.dashStyle)):z&&(l.fill=v||"#e6ebf5",a.borderWidth&&(l.stroke=a.borderColor,l["stroke-width"]=a.borderWidth)));u.zIndex=B;L+="-"+B;(v=g.plotLinesAndBandsGroups[L])||(g.plotLinesAndBandsGroups[L]=v=J.g("plot-"+L).attr(u).add());f&&(p.svgElem=n=J.path().attr(l).add(v));if(r)l=g.getPlotLinePath({value:C,lineWidth:n.strokeWidth(),acrossPanes:a.acrossPanes});else if(z)l=g.getPlotBandPath(k,e,a);else return;(f||!n.d)&&l&&l.length?(n.attr({d:l}),A&&F(A,function(a,b){n.on(b, function(a){A[b].apply(p,[a])})})):n&&(l?(n.show(!0),n.animate({d:l})):n.d&&(n.hide(),d&&(p.label=d=d.destroy())));b&&(y(b.text)||y(b.formatter))&&l&&l.length&&0this.max&&m>this.max;if(a&&h){if(c){var k=a.toString()===h.toString();e=0}for(c=0;cC-h?C:C-h);else if(m)k[a]=Math.max(c,d+h+f>b?d:d+h);else return!1},E=function(a, b,f,l,d){var c;db-e?c=!1:k[a]=db-l/2?b-l-2:d-f/2;return c},M=function(a){var b=g;g=p;p=b;m=a},N=function(){!1!==w.apply(0,g)?!1!==E.apply(0,p)||m||(M(!0),N()):m?k.x=k.y=0:(M(!0),N())};(d.inverted||1c&&(m=!1);v.isHeader?h=n?-r:e.plotHeight+r:(h=h.yAxis,h=h.pos-l+Math.max(0,Math.min(v.plotY||0,h.len)));d.push({target:h,rank:v.isHeader?1:0,size:B.tt.getBBox().height+1,point:v,x:c,tt:u})}});this.cleanSplit();z.positioner&&d.forEach(function(a){var f=z.positioner.call(b,a.tt.getBBox().width,a.size,a.point);a.x=f.x;a.align=0;a.target=f.y;a.rank=x(f.rank,a.rank)});c.distribute(d,e.plotHeight+r);d.forEach(function(a){var f= a.point,d=f.series,c=d&&d.yAxis;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:m||f.isHeader||z.positioner?a.x:f.plotX+e.plotLeft+b.distance,y:a.pos+l,anchorX:f.isHeader?f.plotX+e.plotLeft:f.plotX+d.xAxis.pos,anchorY:f.isHeader?e.plotTop+e.plotHeight/2:c.pos+Math.max(0,Math.min(f.plotY,c.len))})});var v=b.container;h=b.renderer;if(b.outside&&v&&h){var B=e.pointer.getChartPosition();v.style.left=B.left+"px";v.style.top=B.top+"px";v=f.getBBox();h.setSize(v.width+v.x,v.height+v.y,!1)}},updatePosition:function(h){var a= this.chart,b=a.pointer,d=this.getLabel(),e=h.plotX+a.plotLeft,k=h.plotY+a.plotTop;b=b.getChartPosition();h=(this.options.positioner||this.getPosition).call(this,d.width,d.height,h);if(this.outside){var m=(this.options.borderWidth||0)+2*this.distance;this.renderer.setSize(d.width+m,d.height+m,!1);if(a=a.containerScaling)c.css(this.container,{transform:"scale("+a.scaleX+", "+a.scaleY+")"}),e*=a.scaleX,k*=a.scaleY;e+=b.left-h.x;k+=b.top-h.y}this.move(Math.round(h.x),Math.round(h.y||0),e,k)},getDateFormat:function(c, a,b,d){var e=this.chart.time,k=e.dateFormat("%m-%d %H:%M:%S.%L",a),h={millisecond:15,second:12,minute:9,hour:6,day:3},m="millisecond";for(r in q){if(c===q.week&&+e.dateFormat("%w",a)===b&&"00:00:00.000"===k.substr(6)){var r="week";break}if(q[r]>c){r=m;break}if(h[r]&&k.substr(h[r])!=="01-01 00:00:00.000".substr(h[r]))break;"week"!==r&&(m=r)}if(r)var n=e.resolveDTLFormat(d[r]).main;return n},getXDateFormat:function(c,a,b){a=a.dateTimeLabelFormats;var d=b&&b.closestPointRange;return(d?this.getDateFormat(d, c.x,b.options.startOfWeek,a):a.day)||a.year},tooltipFooterHeaderFormatter:function(h,a){var b=a?"footer":"header",d=h.series,e=d.tooltipOptions,k=e.xDateFormat,C=d.xAxis,z=C&&"datetime"===C.options.type&&y(h.key),r=e[b+"Format"];a={isFooter:a,labelConfig:h};c.fireEvent(this,"headerFormatter",a,function(a){z&&!k&&(k=this.getXDateFormat(h,e,C));z&&k&&(h.point&&h.point.tooltipDateKeys||["key"]).forEach(function(a){r=r.replace("{point."+a+"}","{point."+a+":"+k+"}")});d.chart.styledMode&&(r=this.styledModeFormat(r)); a.text=m(r,{point:h,series:d},this.chart.time)});return a.text},bodyFormatter:function(c){return c.map(function(a){var b=a.series.tooltipOptions;return(b[(a.point.formatPrefix||"point")+"Formatter"]||a.point.tooltipFormatter).call(a.point,b[(a.point.formatPrefix||"point")+"Format"]||"")})},styledModeFormat:function(c){return c.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')}}});K(D,"parts/Pointer.js", [D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.attr,G=g.defined,H=g.extend,y=g.isNumber,w=g.isObject,x=g.objectEach,E=g.pick,F=g.splat,t=c.addEvent,m=c.charts,p=c.color,q=c.css,h=c.find,a=c.fireEvent,b=c.offset,d=c.Tooltip;c.Pointer=function(a,b){this.init(a,b)};c.Pointer.prototype={init:function(a,b){this.options=b;this.chart=a;this.runChartClick=b.chart.events&&!!b.chart.events.click;this.pinchDown=[];this.lastValidTouch={};d&&(a.tooltip=new d(a,b.tooltip),this.followTouchMove= E(b.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,d=b.options.chart,e=d.zoomType||"";b=b.inverted;/touch/.test(a.type)&&(e=E(d.pinchType,e));this.zoomX=a=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=a&&!b||e&&b;this.zoomVert=e&&!b||a&&b;this.hasZoom=a||e},getChartPosition:function(){return this.chartPosition||(this.chartPosition=b(this.chart.container))},normalize:function(a,b){var d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]: a;b||(b=this.getChartPosition());var e=d.pageX-b.left;b=d.pageY-b.top;if(d=this.chart.containerScaling)e/=d.scaleX,b/=d.scaleY;return H(a,{chartX:Math.round(e),chartY:Math.round(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};this.chart.axes.forEach(function(d){b[d.isXAxis?"xAxis":"yAxis"].push({axis:d,value:d.toValue(a[d.horiz?"chartX":"chartY"])})});return b},findNearestKDPoint:function(a,b,d){var e;a.forEach(function(a){var c=!(a.noSharedTooltip&&b)&&0>a.options.findNearestPointBy.indexOf("y"); a=a.searchPoint(d,c);if((c=w(a,!0))&&!(c=!w(e,!0))){c=e.distX-a.distX;var f=e.dist-a.dist,l=(a.series.group&&a.series.group.zIndex)-(e.series.group&&e.series.group.zIndex);c=0<(0!==c&&b?c:0!==f?f:0!==l?l:e.series.index>a.series.index?-1:1)}c&&(e=a)});return e},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,b){var d=a.series,e=d.xAxis;d=d.yAxis;var c=E(a.clientX,a.plotX),k=a.shapeArgs;if(e&&d)return b?{chartX:e.len+ e.pos-c,chartY:d.len+d.pos-a.plotY}:{chartX:c+e.pos,chartY:a.plotY+d.pos};if(k&&k.x&&k.y)return{chartX:k.x,chartY:k.y}},getHoverData:function(a,b,d,c,m,n){var f,l=[];c=!(!c||!a);var e=b&&!b.stickyTracking?[b]:d.filter(function(a){return a.visible&&!(!m&&a.directTouch)&&E(a.options.enableMouseTracking,!0)&&a.stickyTracking});b=(f=c||!n?a:this.findNearestKDPoint(e,m,n))&&f.series;f&&(m&&!b.noSharedTooltip?(e=d.filter(function(a){return a.visible&&!(!m&&a.directTouch)&&E(a.options.enableMouseTracking, !0)&&!a.noSharedTooltip}),e.forEach(function(a){var b=h(a.points,function(a){return a.x===f.x&&!a.isNull});w(b)&&(a.chart.isBoosting&&(b=a.getPoint(b)),l.push(b))})):l.push(f));return{hoverPoint:f,hoverSeries:b,hoverPoints:l}},runPointActions:function(a,b){var d=this.chart,e=d.tooltip&&d.tooltip.options.enabled?d.tooltip:void 0,k=e?e.shared:!1,n=b||d.hoverPoint,f=n&&n.series||d.hoverSeries;f=this.getHoverData(n,f,d.series,(!a||"touchmove"!==a.type)&&(!!b||f&&f.directTouch&&this.isDirectTouch),k,a); n=f.hoverPoint;var l=f.hoverPoints;b=(f=f.hoverSeries)&&f.tooltipOptions.followPointer;k=k&&f&&!f.noSharedTooltip;if(n&&(n!==d.hoverPoint||e&&e.isHidden)){(d.hoverPoints||[]).forEach(function(a){-1===l.indexOf(a)&&a.setState()});if(d.hoverSeries!==f)f.onMouseOver();this.applyInactiveState(l);(l||[]).forEach(function(a){a.setState("hover")});d.hoverPoint&&d.hoverPoint.firePointEvent("mouseOut");if(!n.series)return;n.firePointEvent("mouseOver");d.hoverPoints=l;d.hoverPoint=n;e&&e.refresh(k?l:n,a)}else b&& e&&!e.isHidden&&(n=e.getAnchor([{}],a),e.updatePosition({plotX:n[0],plotY:n[1]}));this.unDocMouseMove||(this.unDocMouseMove=t(d.container.ownerDocument,"mousemove",function(a){var b=m[c.hoverChartIndex];if(b)b.pointer.onDocumentMouseMove(a)}));d.axes.forEach(function(b){var f=E(b.crosshair.snap,!0),d=f?c.find(l,function(a){return a.series[b.coll]===b}):void 0;d||!f?b.drawCrosshair(a,d):b.hideCrosshair()})},applyInactiveState:function(a){var b=[],d;(a||[]).forEach(function(a){d=a.series;b.push(d); d.linkedParent&&b.push(d.linkedParent);d.linkedSeries&&(b=b.concat(d.linkedSeries));d.navigatorSeries&&b.push(d.navigatorSeries)});this.chart.series.forEach(function(a){-1===b.indexOf(a)?a.setState("inactive",!0):a.options.inactiveOtherPoints&&a.setAllPointsToState("inactive")})},reset:function(a,b){var d=this.chart,c=d.hoverSeries,e=d.hoverPoint,k=d.hoverPoints,f=d.tooltip,l=f&&f.shared?k:e;a&&l&&F(l).forEach(function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)f&&l&&F(l).length&&(f.refresh(l), f.shared&&k?k.forEach(function(a){a.setState(a.state,!0);a.series.isCartesian&&(a.series.xAxis.crosshair&&a.series.xAxis.drawCrosshair(null,a),a.series.yAxis.crosshair&&a.series.yAxis.drawCrosshair(null,a))}):e&&(e.setState(e.state,!0),d.axes.forEach(function(a){a.crosshair&&a.drawCrosshair(null,e)})));else{if(e)e.onMouseOut();k&&k.forEach(function(a){a.setState()});if(c)c.onMouseOut();f&&f.hide(b);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());d.axes.forEach(function(a){a.hideCrosshair()}); this.hoverX=d.hoverPoints=d.hoverPoint=null}},scaleGroups:function(a,b){var d=this.chart,e;d.series.forEach(function(c){e=a||c.getPlotBox();c.xAxis&&c.xAxis.zoomEnabled&&c.group&&(c.group.attr(e),c.markerGroup&&(c.markerGroup.attr(e),c.markerGroup.clip(b?d.clipRect:null)),c.dataLabelsGroup&&c.dataLabelsGroup.attr(e))});d.clipRect.attr(b||d.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY}, drag:function(a){var b=this.chart,d=b.options.chart,c=a.chartX,e=a.chartY,n=this.zoomHor,f=this.zoomVert,l=b.plotLeft,v=b.plotTop,B=b.plotWidth,h=b.plotHeight,u=this.selectionMarker,m=this.mouseDownX,g=this.mouseDownY,q=d.panKey&&a[d.panKey+"Key"];if(!u||!u.touch)if(cl+B&&(c=l+B),ev+h&&(e=v+h),this.hasDragged=Math.sqrt(Math.pow(m-c,2)+Math.pow(g-e,2)),10f.max&&(g=f.max-C,J=!0);J?(B-=.8*(B-p[a][0]),l||(u-=.8*(u-p[a][1])),E()):p[a]=[B,u];n||(m[a]=z-k,m[e]=C);m=n?1/r:r;t[e]=C;t[a]=g;y[n?c?"scaleY":"scaleX":"scale"+b]=r;y["translate"+b]=m*k+(B-m*v)},pinch:function(c){var g=this,w=g.chart,F=g.pinchDown,t=c.touches,m=t.length,p=g.lastValidTouch,q=g.hasZoom,h=g.selectionMarker,a={},b=1===m&&(g.inClass(c.target,"highcharts-tracker")&&w.runTrackerClick||g.runChartClick),d={}; 1c-6&&hn?this.maxItemWidth:a.itemWidth;c&&this.itemX-d+b>n&&(this.itemX=d,this.lastLineHeight&&(this.itemY+=m+this.lastLineHeight+h),this.lastLineHeight=0);this.lastItemY=m+this.itemY+h;this.lastLineHeight=Math.max(k,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];c?this.itemX+=b:(this.itemY+=m+k+h,this.lastLineHeight=k);this.offsetWidth=this.widthOption||Math.max((c? this.itemX-d-(a.checkbox?0:r):b)+d,this.offsetWidth)},getAllItems:function(){var a=[];this.chart.series.forEach(function(b){var d=b&&b.options;b&&y(d.showInLegend,I(d.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===d.legendType?b.data:b)))});F(this,"afterGetAllItems",{allItems:a});return a},getAlignment:function(){var a=this.options;return this.proximate?a.align.charAt(0)+"tv":a.floating?"":a.align.charAt(0)+a.verticalAlign.charAt(0)+a.layout.charAt(0)},adjustMargins:function(a,b){var d= this.chart,c=this.options,k=this.getAlignment();k&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(e,h){e.test(k)&&!I(a[h])&&(d[t[h]]=Math.max(d[t[h]],d.legend[(h+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][h]*c[h%2?"x":"y"]+y(c.margin,12)+b[h]+(d.titleOffset[h]||0)))})},proximatePositions:function(){var a=this.chart,b=[],d="left"===this.options.align;this.allItems.forEach(function(e){var k=d;if(e.yAxis&&e.points){e.xAxis.options.reversed&&(k=!k);var h=c.find(k?e.points: e.points.slice(0).reverse(),function(a){return H(a.plotY)});k=this.itemMarginTop+e.legendItem.getBBox().height+this.itemMarginBottom;var m=e.yAxis.top-a.plotTop;e.visible?(h=h?h.plotY:e.yAxis.height,h+=m-.3*k):h=m+e.yAxis.height;b.push({target:h,size:k,item:e})}},this);c.distribute(b,a.plotHeight);b.forEach(function(b){b.item._legendItemPos[1]=a.plotTop-a.spacing[0]+b.pos})},render:function(){var a=this.chart,b=a.renderer,d=this.group,e,k=this.box,h=this.options,g=this.padding;this.itemX=g;this.itemY= this.initialItemY;this.lastItemY=this.offsetWidth=0;this.widthOption=c.relativeLength(h.width,a.spacingBox.width-g);var r=a.spacingBox.width-2*g-h.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(r/=2);this.maxLegendWidth=this.widthOption||r;d||(this.group=d=b.g("legend").attr({zIndex:7}).add(),this.contentGroup=b.g().attr({zIndex:1}).add(d),this.scrollGroup=b.g().add(this.contentGroup));this.renderTitle();r=this.getAllItems();p(r,function(a,b){return(a.options&&a.options.legendIndex|| 0)-(b.options&&b.options.legendIndex||0)});h.reversed&&r.reverse();this.allItems=r;this.display=e=!!r.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;r.forEach(this.renderItem,this);r.forEach(this.layoutItem,this);r=(this.widthOption||this.offsetWidth)+g;var n=this.lastItemY+this.lastLineHeight+this.titleHeight;n=this.handleOverflow(n);n+=g;k||(this.box=k=b.rect().addClass("highcharts-legend-box").attr({r:h.borderRadius}).add(d),k.isNew=!0);a.styledMode||k.attr({stroke:h.borderColor, "stroke-width":h.borderWidth||0,fill:h.backgroundColor||"none"}).shadow(h.shadow);0h&&!1!==l.enabled?(this.clipHeight=n=Math.max(h-20-this.titleHeight-m,0),this.currentPage=y(this.currentPage,1),this.fullHeight= a,p.forEach(function(a,b){var f=a._legendItemPos[1],l=Math.round(a.legendItem.getBBox().height),d=u.length;if(!d||f-u[d-1]>n&&(g||f)!==u[d-1])u.push(g||f),d++;a.pageIx=d-1;g&&(p[b-1].pageIx=d-1);b===p.length-1&&f+l-u[d-1]>n&&f!==g&&(u.push(f),a.pageIx=d);f!==g&&(g=f)}),f||(f=b.clipRect=c.clipRect(0,m,9999,0),b.contentGroup.clip(f)),q(n),A||(this.nav=A=c.g().attr({zIndex:1}).add(this.group),this.up=c.symbol("triangle",0,0,B,B).add(A),t("upTracker").on("click",function(){b.scroll(-1,v)}),this.pager= c.text("",15,10).addClass("highcharts-legend-navigation"),d.styledMode||this.pager.css(l.style),this.pager.add(A),this.down=c.symbol("triangle-down",0,0,B,B).add(A),t("downTracker").on("click",function(){b.scroll(1,v)})),b.scroll(0),a=h):A&&(q(),this.nav=A.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,b){var d=this.pages,c=d.length,k=this.currentPage+a;a=this.clipHeight;var h=this.options.navigation,m=this.pager,r=this.padding;k>c&&(k=c);0k&&(b=typeof h[0],"string"===b?a.name=h[0]:"number"===b&&(a.x=h[0]),m++);g=d.value;)d=a[++b];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=d&&d.color&&!this.options.color?d.color:this.nonZonedColor;return d}, hasNewShapeType:function(){return this.graphic&&this.graphic.element.nodeName!==this.shapeType},destroy:function(){var c=this.series.chart,a=c.hoverPoints,b;c.pointCount--;a&&(this.setState(),G(a,this),a.length||(c.hoverPoints=null));if(this===c.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel||this.dataLabels)q(this),this.destroyElements();this.legendItem&&c.legend.destroyItem(this);for(b in this)this[b]=null},destroyElements:function(c){var a=this,b=[],d;c=c||{graphic:1,dataLabel:1}; c.graphic&&b.push("graphic","shadowGroup");c.dataLabel&&b.push("dataLabel","dataLabelUpper","connector");for(d=b.length;d--;){var e=b[d];a[e]&&(a[e]=a[e].destroy())}["dataLabel","connector"].forEach(function(b){var d=b+"s";c[b]&&a[d]&&(a[d].forEach(function(a){a.element&&a.destroy()}),delete a[d])})},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total|| this.stackTotal}},tooltipFormatter:function(c){var a=this.series,b=a.tooltipOptions,d=E(b.valueDecimals,""),e=b.valuePrefix||"",k=b.valueSuffix||"";a.chart.styledMode&&(c=a.chart.tooltip.styledModeFormat(c));(a.pointArrayMap||["y"]).forEach(function(a){a="{point."+a;if(e||k)c=c.replace(RegExp(a+"}","g"),e+a+"}"+k);c=c.replace(RegExp(a+"}","g"),a+":,."+d+"f}")});return m(c,{point:this,series:this.series},a.chart.time)},firePointEvent:function(c,a,b){var d=this,e=this.series.options;(e.point.events[c]|| d.options&&d.options.events&&d.options.events[c])&&this.importEvents();"click"===c&&e.allowPointSelect&&(b=function(a){d.select&&d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});t(this,c,a,b)},visible:!0}});K(D,"parts/Series.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.arrayMax,G=g.arrayMin,H=g.defined,y=g.erase,w=g.extend,x=g.isArray,E=g.isNumber,F=g.isString,t=g.objectEach,m=g.pick,p=g.splat,q=g.syncTimeout,h=c.addEvent,a=c.animObject,b=c.correctFloat,d=c.defaultOptions, e=c.defaultPlotOptions,k=c.fireEvent,C=c.merge,z=c.removeEvent,r=c.SVGElement,n=c.win;c.Series=c.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null=== this.y?"":c.numberFormat(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{axisTypes:["xAxis","yAxis"], coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,isCartesian:!0,parallelArrays:["x","y"],pointClass:c.Point,requireSorting:!0,sorted:!0,init:function(a,b){k(this,"init",{options:b});var f=this,l=a.series,d;this.eventOptions=this.eventOptions||{};f.chart=a;f.options=b=f.setOptions(b);f.linkedSeries=[];f.bindAxes();w(f,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});var e=b.events;t(e,function(a,b){c.isFunction(a)&&f.eventOptions[b]!==a&&(c.isFunction(f.eventOptions[b])&& z(f,b,f.eventOptions[b]),f.eventOptions[b]=a,h(f,b,a))});if(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;f.getColor();f.getSymbol();f.parallelArrays.forEach(function(a){f[a+"Data"]||(f[a+"Data"]=[])});f.points||f.data||f.setData(b.data,!1);f.isCartesian&&(a.hasCartesianSeries=!0);l.length&&(d=l[l.length-1]);f._i=m(d&&d._i,-1)+1;a.orderSeries(this.insert(l));k(this,"afterInit")},insert:function(a){var b=this.options.index,f;if(E(b)){for(f=a.length;f--;)if(b>= m(a[f].options.index,a[f]._i)){a.splice(f+1,0,this);break}-1===f&&a.unshift(this);f+=1}else a.push(this);return m(f,a.length-1)},bindAxes:function(){var a=this,b=a.options,d=a.chart,e;k(this,"bindAxes",null,function(){(a.axisTypes||[]).forEach(function(f){d[f].forEach(function(l){e=l.options;if(b[f]===e.index||void 0!==b[f]&&b[f]===e.id||void 0===b[f]&&0===e.index)a.insert(l.series),a[f]=l,l.isDirty=!0});a[f]||a.optionalAxis===f||c.error(18,!0,d)})})},updateParallelArrays:function(a,b){var f=a.series, l=arguments,c=E(b)?function(l){var c="y"===l&&f.toYData?f.toYData(a):a[l];f[l+"Data"][b]=c}:function(a){Array.prototype[b].apply(f[a+"Data"],Array.prototype.slice.call(l,2))};f.parallelArrays.forEach(c)},hasData:function(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&0=this.cropStart?d-this.cropStart:d);!c&&l[d]&&l[d].touched&&(d=void 0);return d},drawLegendSymbol:c.LegendSymbolMixin.drawLineMarker,updateData:function(a){var b=this.options,f=this.points,c=[],d,e,n,k=this.requireSorting,m=a.length===f.length,h=!0;this.xIncrement=null;a.forEach(function(a,l){var e=H(a)&&this.pointClass.prototype.optionsToObject.call({series:this}, a)||{};var v=e.x;if(e.id||E(v))if(v=this.findPointIndex(e,n),-1===v||void 0===v?c.push(a):f[v]&&a!==b.data[v]?(f[v].update(a,!1,null,!1),f[v].touched=!0,k&&(n=v+1)):f[v]&&(f[v].touched=!0),!m||l!==v||this.hasDerivedData)d=!0},this);if(d)for(a=f.length;a--;)(e=f[a])&&!e.touched&&e.remove(!1);else m?a.forEach(function(a,b){f[b].update&&a!==f[b].y&&f[b].update(a,!1,null,!1)}):h=!1;f.forEach(function(a){a&&(a.touched=!1)});if(!h)return!1;c.forEach(function(a){this.addPoint(a,!1,null,null,!1)},this);return!0}, setData:function(a,b,d,e){var f=this,l=f.points,n=l&&l.length||0,k,v=f.options,B=f.chart,h=null,r=f.xAxis;h=v.turboThreshold;var g=this.xData,p=this.yData,q=(k=f.pointArrayMap)&&k.length,t=v.keys,z=0,C=1,w;a=a||[];k=a.length;b=m(b,!0);!1!==e&&k&&n&&!f.cropped&&!f.hasGroupedData&&f.visible&&!f.isSeriesBoosting&&(w=this.updateData(a));if(!w){f.xIncrement=null;f.colorCounter=0;this.parallelArrays.forEach(function(a){f[a+"Data"].length=0});if(h&&k>h)if(h=f.getFirstValidPoint(a),E(h))for(d=0;dh||this.forceCrop))if(b[d-1]t)b=[],f=[];else if(this.yData&&(b[0]t)){e=this.cropData(this.xData,this.yData,q,t);b=e.xData;f=e.yData;e=e.start;var z=!0}for(h=b.length||1;--h;)if(d=g?n(b[h])-n(b[h-1]):b[h]-b[h-1],0d&&p&&(c.error(15,!1,this.chart),p=!1);this.cropped=z;this.cropStart=e;this.processedXData=b;this.processedYData=f;this.closestPointRange=this.basePointRange=C},cropData:function(a,b,d,c,e){var f= a.length,l=0,k=f,n;e=m(e,this.cropShoulder);for(n=0;n=d){l=Math.max(0,n-e);break}for(d=n;dc){k=d+e;break}return{xData:a.slice(l,k),yData:b.slice(l,k),start:l,end:k}},generatePoints:function(){var a=this.options,b=a.data,d=this.data,c,e=this.processedXData,n=this.processedYData,h=this.pointClass,m=e.length,r=this.cropStart||0,g=this.hasGroupedData;a=a.keys;var q=[],t;d||g||(d=[],d.length=b.length,d=this.data=d);a&&g&&(this.options.keys=!1);for(t=0;t=n&&(d[g-m]||p)<=h;if(q&&p)if(q=t.length)for(;q--;)E(t[q])&&(c[e++]=t[q]);else c[e++]= t}this.dataMin=G(c);this.dataMax=I(c);k(this,"afterGetExtremes")},getFirstValidPoint:function(a){for(var b=null,f=a.length,d=0;null===b&&d=D&&(G.isNull=!0);G.plotX=w=b(Math.min(Math.max(-1E5,c.translate(I,0,0,0,1,t,"flags"===this.type)),1E5));if(d&&this.visible&&K&&K[I]){var Z=this.getStackIndicator(Z,I,this.index);if(!G.isNull){var aa=K[I];var V=aa.points[Z.key]}}x(V)&&(T=V[0],D=V[1],T===z&&Z.key===K[I].base&&(T=m(E(C)&&C,n.min)),n.positiveValuesOnly&&0>=T&&(T=null),G.total=G.stackTotal=aa.total,G.percentage= aa.total&&G.y/aa.total*100,G.stackY=D,this.irregularWidths||aa.setOffset(this.pointXOffset||0,this.barW||0));G.yBottom=H(T)?Math.min(Math.max(-1E5,n.translate(T,0,1,0,1)),1E5):null;g&&(D=this.modifyValue(D,G));G.plotY=D="number"===typeof D&&Infinity!==D?Math.min(Math.max(-1E5,n.translate(D,0,1,0,1)),1E5):void 0;G.isInside=void 0!==D&&0<=D&&D<=n.len&&0<=w&&w<=c.len;G.clientX=q?b(c.translate(I,0,0,0,1,t)):w;G.negative=G[y]<(a[y+"Threshold"]||C||0);G.category=e&&void 0!==e[G.x]?e[G.x]:G.x;if(!G.isNull){void 0!== W&&(F=Math.min(F,Math.abs(w-W)));var W=w}G.zone=this.zones.length&&G.getZone()}this.closestPointRangePx=F;k(this,"afterTranslate")},getValidPoints:function(a,b,d){var f=this.chart;return(a||this.points||[]).filter(function(a){return b&&!f.isInsidePlot(a.plotX,a.plotY,f.inverted)?!1:d||!a.isNull})},getClipBox:function(a,b){var f=this.options,d=this.chart,l=d.inverted,c=this.xAxis,e=c&&this.yAxis;a&&!1===f.clip&&e?a=l?{y:-d.chartWidth+e.len+e.pos,height:d.chartWidth,width:d.chartHeight,x:-d.chartHeight+ c.len+c.pos}:{y:-e.pos,height:d.chartHeight,width:d.chartWidth,x:-c.pos}:(a=this.clipBox||d.clipBox,b&&(a.width=d.plotSizeX,a.x=0));return b?{width:a.width,x:a.x}:a},setClip:function(a){var b=this.chart,f=this.options,d=b.renderer,c=b.inverted,e=this.clipBox,n=this.getClipBox(a),k=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,n.height,f.xAxis,f.yAxis].join(),h=b[k],m=b[k+"m"];h||(a&&(n.width=0,c&&(n.x=b.plotSizeX+(!1!==f.clip?0:b.plotTop)),b[k+"m"]=m=d.clipRect(c?b.plotSizeX+99:-99, c?-b.plotLeft:-b.plotTop,99,c?b.chartWidth:b.chartHeight)),b[k]=h=d.clipRect(n),h.count={length:0});a&&!h.count[this.index]&&(h.count[this.index]=!0,h.count.length+=1);if(!1!==f.clip||a)this.group.clip(a||e?h:b.clipRect),this.markerGroup.clip(m),this.sharedClipKey=k;a||(h.count[this.index]&&(delete h.count[this.index],--h.count.length),0===h.count.length&&k&&b[k]&&(e||(b[k]=b[k].destroy()),b[k+"m"]&&(b[k+"m"]=b[k+"m"].destroy())))},animate:function(b){var f=this.chart,d=a(this.options.animation); if(b)this.setClip(d);else{var c=this.sharedClipKey;b=f[c];var e=this.getClipBox(d,!0);b&&b.animate(e,d);f[c+"m"]&&f[c+"m"].animate({width:e.width+99,x:e.x-(f.inverted?0:99)},d);this.animate=null}},afterAnimate:function(){this.setClip();k(this,"afterAnimate");this.finishedAnimating=!0},drawPoints:function(){var a=this.points,b=this.chart,d,c=this.options.marker,e=this[this.specialGroup]||this.markerGroup;var n=this.xAxis;var k=m(c.enabled,!n||n.isRadial?!0:null,this.closestPointRangePx>=c.enabledThreshold* c.radius);if(!1!==c.enabled||this._hasPointMarkers)for(n=0;nl&&b.shadow));n&&(n.startX=d.xMap,n.isArea=d.isArea)})},getZonesGraphs:function(a){this.zones.forEach(function(b,f){f=["zone-graph-"+f,"highcharts-graph highcharts-zone-graph-"+f+" "+(b.className|| "")];this.chart.styledMode||f.push(b.color||this.color,b.dashStyle||this.options.dashStyle);a.push(f)},this);return a},applyZones:function(){var a=this,b=this.chart,d=b.renderer,c=this.zones,e,n,k=this.clips||[],h,r=this.graph,g=this.area,p=Math.max(b.chartWidth,b.chartHeight),t=this[(this.zoneAxis||"y")+"Axis"],q=b.inverted,C,z,x,w=!1;if(c.length&&(r||g)&&t&&void 0!==t.min){var E=t.reversed;var y=t.horiz;r&&!this.showLine&&r.hide();g&&g.hide();var F=t.getExtremes();c.forEach(function(f,c){e=E?y? b.plotWidth:0:y?0:t.toPixels(F.min)||0;e=Math.min(Math.max(m(n,e),0),p);n=Math.min(Math.max(Math.round(t.toPixels(m(f.value,F.max),!0)||0),0),p);w&&(e=n=t.toPixels(F.max));C=Math.abs(e-n);z=Math.min(e,n);x=Math.max(e,n);t.isXAxis?(h={x:q?x:z,y:0,width:C,height:p},y||(h.x=b.plotHeight-h.x)):(h={x:0,y:q?x:z,width:p,height:C},y&&(h.y=b.plotWidth-h.y));q&&d.isVML&&(h=t.isXAxis?{x:0,y:E?z:x,height:h.width,width:b.chartWidth}:{x:h.y-b.plotLeft-b.spacingBox.x,y:0,width:h.height,height:b.chartHeight});k[c]? k[c].animate(h):k[c]=d.clipRect(h);r&&a["zone-graph-"+c].clip(k[c]);g&&a["zone-area-"+c].clip(k[c]);w=f.value>F.max;a.resetZones&&0===n&&(n=void 0)});this.clips=k}else a.visible&&(r&&r.show(!0),g&&g.show(!0))},invertGroups:function(a){function b(){["group","markerGroup"].forEach(function(b){f[b]&&(d.renderer.isVML&&f[b].attr({width:f.yAxis.len,height:f.xAxis.len}),f[b].width=f.yAxis.len,f[b].height=f.xAxis.len,f[b].invert(a))})}var f=this,d=f.chart;if(f.xAxis){var c=h(d,"resize",b);h(f,"destroy", c);b(a);f.invertGroups=b}},plotGroup:function(a,b,d,c,e){var f=this[a],l=!f;l&&(this[a]=f=this.chart.renderer.g().attr({zIndex:c||.1}).add(e));f.addClass("highcharts-"+b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(H(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(f.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);f.attr({visibility:d})[l?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart, b=this.xAxis,d=this.yAxis;a.inverted&&(b=d,d=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:d?d.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var b=this,d=b.chart,c=b.options,e=!!b.animate&&d.renderer.isSVG&&a(c.animation).duration,n=b.visible?"inherit":"hidden",h=c.zIndex,m=b.hasRendered,r=d.seriesGroup,g=d.inverted;k(this,"render");var p=b.plotGroup("group","series",n,h,r);b.markerGroup=b.plotGroup("markerGroup","markers",n,h,r);e&&b.animate(!0);p.inverted=b.isCartesian||b.invertable? g:!1;b.drawGraph&&(b.drawGraph(),b.applyZones());b.visible&&b.drawPoints();b.drawDataLabels&&b.drawDataLabels();b.redrawPoints&&b.redrawPoints();b.drawTracker&&!1!==b.options.enableMouseTracking&&b.drawTracker();b.invertGroups(g);!1===c.clip||b.sharedClipKey||m||p.clip(d.clipRect);e&&b.animate();m||(b.animationTimeout=q(function(){b.afterAnimate()},e||0));b.isDirty=!1;b.hasRendered=!0;k(b,"afterRender")},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,d=this.group,c=this.xAxis, e=this.yAxis;d&&(a.inverted&&d.attr({width:a.plotWidth,height:a.plotHeight}),d.animate({translateX:m(c&&c.left,a.plotLeft),translateY:m(e&&e.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var f=this.xAxis,d=this.yAxis,c=this.chart.inverted;return this.searchKDTree({clientX:c?f.len-a.chartY+f.pos:a.chartX-f.pos,plotY:c?d.len-a.chartX+d.pos:a.chartY-d.pos},b,a)},buildKDTree:function(a){function b(a,d,c){var l;if(l=a&& a.length){var e=f.kdAxisArray[d%c];a.sort(function(a,b){return a[e]-b[e]});l=Math.floor(l/2);return{point:a[l],left:b(a.slice(0,l),d+1,c),right:b(a.slice(l+1),d+1,c)}}}this.buildingKdTree=!0;var f=this,d=-1m?"left":"right";B=0>m?"right":"left";b[g]&&(g=f(a,b[g],d+1,k),r=g[n]v;)p--;this.updateParallelArrays(B,"splice",p,0,0);this.updateParallelArrays(B,p);h&&B.name&& (h[v]=B.name);m.splice(p,0,a);r&&(this.data.splice(p,0,null),this.processData());"point"===f.legendType&&this.generatePoints();d&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(B,"shift"),m.shift()));!1!==k&&e(this,"addPoint",{point:B});this.isDirtyData=this.isDirty=!0;b&&n.redraw(c)},removePoint:function(a,b,d){var f=this,c=f.data,l=c[a],e=f.points,k=f.chart,n=function(){e&&e.length===c.length&&e.splice(a,1);c.splice(a,1);f.options.data.splice(a,1);f.updateParallelArrays(l|| {series:f},"splice",a,1);l&&l.destroy();f.isDirty=!0;f.isDirtyData=!0;b&&k.redraw()};m(d,k);b=t(b,!0);l?l.firePointEvent("remove",null,n):n()},remove:function(a,b,d,c){function f(){l.destroy(c);l.remove=null;k.isDirtyLegend=k.isDirtyBox=!0;k.linkSeries();t(a,!0)&&k.redraw(b)}var l=this,k=l.chart;!1!==d?e(l,"remove",null,f):f()},update:function(a,b){a=c.cleanRecursively(a,this.userOptions);e(this,"update",{options:a});var f=this,d=f.chart,n=f.userOptions,h=f.initialType||f.type,m=a.type||n.type||d.options.chart.type, g=!(this.hasDerivedData||a.dataGrouping||m&&m!==this.type||void 0!==a.pointStart||a.pointInterval||a.pointIntervalUnit||a.keys),p=r[h].prototype,C,q=["group","markerGroup","dataLabelsGroup","transformGroup"],z=["eventOptions","navigatorSeries","baseSeries"],x=f.finishedAnimating&&{animation:!1},w={};g&&(z.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","_hasPointMarkers","_hasPointLabels","mapMap","mapData","minY","maxY","minX","maxX"),!1!==a.visible&&z.push("area", "graph"),f.parallelArrays.forEach(function(a){z.push(a+"Data")}),a.data&&this.setData(a.data,!1));a=k(n,x,{index:void 0===n.index?f.index:n.index,pointStart:t(n.pointStart,f.xData[0])},!g&&{data:f.options.data},a);g&&a.data&&(a.data=f.options.data);z=q.concat(z);z.forEach(function(a){z[a]=f[a];delete f[a]});f.remove(!1,null,!1,!0);for(C in p)f[C]=void 0;r[m||h]?H(f,r[m||h].prototype):c.error(17,!0,d,{missingModuleFor:m||h});z.forEach(function(a){f[a]=z[a]});f.init(d,a);if(g&&this.points){var E=f.options; !1===E.visible?(w.graphic=1,w.dataLabel=1):f._hasPointLabels||(m=E.marker,p=E.dataLabels,m&&(!1===m.enabled||"symbol"in m)&&(w.graphic=1),p&&!1===p.enabled&&(w.dataLabel=1));this.points.forEach(function(a){a&&a.series&&(a.resolveColor(),Object.keys(w).length&&a.destroyElements(w),!1===E.showInLegend&&a.legendItem&&d.legend.destroyItem(a))},this)}a.zIndex!==n.zIndex&&q.forEach(function(b){f[b]&&f[b].attr({zIndex:a.zIndex})});f.initialType=h;d.linkSeries();e(this,"afterUpdate");t(b,!0)&&d.redraw(g? void 0:!1)},setName:function(a){this.name=this.options.name=this.userOptions.name=a;this.chart.isDirtyLegend=!0}});H(a.prototype,{update:function(a,b){var f=this.chart,d=a&&a.events||{};a=k(this.userOptions,a);f.options[this.coll].indexOf&&(f.options[this.coll][f.options[this.coll].indexOf(this.userOptions)]=a);F(f.options[this.coll].events,function(a,b){"undefined"===typeof d[b]&&(d[b]=void 0)});this.destroy(!0);this.init(f,H(a,{events:d}));f.isDirtyBox=!0;t(b,!0)&&f.redraw()},remove:function(a){for(var b= this.chart,d=this.coll,c=this.series,e=c.length;e--;)c[e]&&c[e].remove(!1);G(b.axes,this);G(b[d],this);y(b.options[d])?b.options[d].splice(this.options.index,1):delete b.options[d];b[d].forEach(function(a,b){a.options.index=a.userOptions.index=b});this.destroy();b.isDirtyBox=!0;t(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})});K(D,"parts/AreaSeries.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I= g.objectEach,G=g.pick,H=c.color,y=c.Series;g=c.seriesType;g("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(c){var g=[],w=[],y=this.xAxis,t=this.yAxis,m=t.stacks[this.stackKey],p={},q=this.index,h=t.series,a=h.length,b=G(t.options.reversedStacks,!0)?1:-1,d;c=c||this.points;if(this.options.stacking){for(d=0;dc&&p>x?(p=Math.max(c,x),q=2*x-p):py&&q>x?(q=Math.max(y,x),p=2*x-q):q=Math.abs(g)&&.5c.closestPointRange*c.xAxis.transA;h=c.borderWidth=y(q.borderWidth,h?0:1);var a=c.yAxis,b=q.threshold,d=c.translatedThreshold=a.getThreshold(b),e=y(q.minPointLength,5),k=c.getColumnMetrics(),C=k.width,z=c.barW=Math.max(C,1+2*h),r=c.pointXOffset=k.offset,n=c.dataMin,f=c.dataMax; g.inverted&&(d-=.5);q.pointPadding&&(z=Math.ceil(z));F.prototype.translate.apply(c);c.points.forEach(function(l){var k=y(l.yBottom,d),h=999+Math.abs(k),m=C;h=Math.min(Math.max(-h,l.plotY),a.len+h);var u=l.plotX+r,p=z,q=Math.min(h,k),t=Math.max(h,k)-q;if(e&&Math.abs(t)e?k-e:d-(x?e:0)}I(l.options.pointWidth)&&(m=p=Math.ceil(l.options.pointWidth),u-=Math.round((m-C)/2));l.barX= u;l.pointWidth=m;l.tooltipPos=g.inverted?[a.len+a.pos-g.plotLeft-h,c.xAxis.len-u-p/2,t]:[u+p/2,h+a.pos-g.plotTop,t];l.shapeType=c.pointClass.prototype.shapeType||"rect";l.shapeArgs=c.crispCol.apply(c,l.isNull?[u,d,p,0]:[u,q,p,t])})},getSymbol:c.noop,drawLegendSymbol:c.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(c,g){var m=this.options,h=this.pointAttrToOptions||{};var a=h.stroke||"borderColor"; var b=h["stroke-width"]||"borderWidth",d=c&&c.color||this.color,e=c&&c[a]||m[a]||this.color||d,k=c&&c[b]||m[b]||this[b]||0;h=c&&c.options.dashStyle||m.dashStyle;var p=y(m.opacity,1);if(c&&this.zones.length){var z=c.getZone();d=c.options.color||z&&(z.color||c.nonZonedColor)||this.color;z&&(e=z.borderColor||e,h=z.dashStyle||h,k=z.borderWidth||k)}g&&(c=E(m.states[g],c.options.states&&c.options.states[g]||{}),g=c.brightness,d=c.color||void 0!==g&&x(d).brighten(c.brightness).get()||d,e=c[a]||e,k=c[b]|| k,h=c.dashStyle||h,p=y(c.opacity,p));a={fill:d,stroke:e,"stroke-width":k,opacity:p};h&&(a.dashstyle=h);return a},drawPoints:function(){var c=this,g=this.chart,q=c.options,h=g.renderer,a=q.animationLimit||250,b;c.points.forEach(function(d){var e=d.graphic,k=e&&g.pointCount\u25cf
{series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&g.prototype.drawGraph.call(this)},applyJitter:function(){var c=this,g=this.options.jitter, y=this.points.length;g&&this.points.forEach(function(w,x){["x","y"].forEach(function(E,F){var t="plot"+E.toUpperCase();if(g[E]&&!w.isNull){var m=c[E+"Axis"];var p=g[E]*m.transA;if(m&&!m.isLog){var q=Math.max(0,w[t]-p);m=Math.min(m.len,w[t]+p);F=1E4*Math.sin(x+F*y);w[t]=q+(m-q)*(F-Math.floor(F));"x"===E&&(w.clientX=w.plotX)}}})})}});c.addEvent(g,"afterTranslate",function(){this.applyJitter&&this.applyJitter()});""});K(D,"mixins/centered-series.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c, g){var I=g.isNumber,G=g.pick,H=c.deg2rad,y=c.relativeLength;c.CenteredSeriesMixin={getCenter:function(){var c=this.options,g=this.chart,E=2*(c.slicedOffset||0),F=g.plotWidth-2*E;g=g.plotHeight-2*E;var t=c.center;t=[G(t[0],"50%"),G(t[1],"50%"),c.size||"100%",c.innerSize||0];var m=Math.min(F,g),p;for(p=0;4>p;++p){var q=t[p];c=2>p||2===p&&/%$/.test(q);t[p]=y(q,[F,g,m,t[2]][p])+(c?E:0)}t[3]>t[2]&&(t[3]=t[2]);return t},getStartAndEndRadians:function(c,g){c=I(c)?c:0;g=I(g)&&g>c&&360>g-c?g:c+360;return{start:H* (c+-90),end:H*(g+-90)}}}});K(D,"parts/PieSeries.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.isNumber,H=g.pick,y=g.setAnimation,w=c.addEvent;g=c.CenteredSeriesMixin;var x=g.getStartAndEndRadians,E=c.merge,F=c.noop,t=c.Point,m=c.Series,p=c.seriesType,q=c.fireEvent;p("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name}, softConnector:!0,x:0,connectorShape:"fixedOffset",crookDistance:"70%"},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:c.seriesTypes.column.prototype.pointAttribs, animate:function(c){var a=this,b=a.points,d=a.startAngleRad;c||(b.forEach(function(b){var c=b.graphic,e=b.shapeArgs;c&&(c.attr({r:b.startR||a.center[3]/2,start:d,end:d}),c.animate({r:e.r,start:e.start,end:e.end},a.options.animation))}),a.animate=null)},hasData:function(){return!!this.processedXData.length},updateTotals:function(){var c,a=0,b=this.points,d=b.length,e=this.options.ignoreHiddenPoint;for(c=0;c1.5*Math.PI?B-=2*Math.PI:B<-Math.PI/2&&(B+=2*Math.PI);l.slicedTranslation={translateX:Math.round(Math.cos(B)*d),translateY:Math.round(Math.sin(B)*d)};var A=Math.cos(B)*h[2]/2;var u=Math.sin(B)*h[2]/2;l.tooltipPos=[h[0]+.7*A,h[1]+.7*u];l.half=B<-Math.PI/2||B>Math.PI/2?1:0;l.angle=B;v=Math.min(e,l.labelDistance/5);l.labelPosition={natural:{x:h[0]+A+Math.cos(B)*l.labelDistance,y:h[1]+u+Math.sin(B)*l.labelDistance}, "final":{},alignment:0>l.labelDistance?"center":l.half?"right":"left",connectorPosition:{breakAt:{x:h[0]+A+Math.cos(B)*v,y:h[1]+u+Math.sin(B)*v},touchingSliceAt:{x:h[0]+A,y:h[1]+u}}}}q(this,"afterTranslate")},drawEmpty:function(){var c=this.options;if(0===this.total){var a=this.center[0];var b=this.center[1];this.graph||(this.graph=this.chart.renderer.circle(a,b,0).addClass("highcharts-graph").add(this.group));this.graph.animate({"stroke-width":c.borderWidth,cx:a,cy:b,r:this.center[2]/2,fill:c.fillColor|| "none",stroke:c.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())},redrawPoints:function(){var c=this,a=c.chart,b=a.renderer,d,e,k,g,m=c.options.shadow;this.drawEmpty();!m||c.shadowGroup||a.styledMode||(c.shadowGroup=b.g("shadow").attr({zIndex:-1}).add(c.group));c.points.forEach(function(h){var n={};e=h.graphic;if(!h.isNull&&e){g=h.shapeArgs;d=h.getTranslate();if(!a.styledMode){var f=h.shadowGroup;m&&!f&&(f=h.shadowGroup=b.g("shadow").add(c.shadowGroup));f&&f.attr(d);k=c.pointAttribs(h, h.selected&&"select")}h.delayedRendering?(e.setRadialReference(c.center).attr(g).attr(d),a.styledMode||e.attr(k).attr({"stroke-linejoin":"round"}).shadow(m,f),h.delayedRendering=!1):(e.setRadialReference(c.center),a.styledMode||E(!0,n,k),E(!0,n,g,d),e.animate(n));e.attr({visibility:h.visible?"inherit":"hidden"});e.addClass(h.getClassName())}else e&&(h.graphic=e.destroy())})},drawPoints:function(){var c=this.chart.renderer;this.points.forEach(function(a){a.graphic||(a.graphic=c[a.shapeType](a.shapeArgs).add(a.series.group), a.delayedRendering=!0)})},searchPoint:F,sortByAngle:function(c,a){c.sort(function(b,c){return void 0!==b.angle&&(c.angle-b.angle)*a})},drawLegendSymbol:c.LegendSymbolMixin.drawRectangle,getCenter:g.getCenter,getSymbol:F,drawGraph:null},{init:function(){t.prototype.init.apply(this,arguments);var c=this;c.name=H(c.name,"Slice");var a=function(a){c.slice("select"===a.type)};w(c,"select",a);w(c,"unselect",a);return c},isValid:function(){return G(this.y)&&0<=this.y},setVisible:function(c,a){var b=this, d=b.series,e=d.chart,k=d.options.ignoreHiddenPoint;a=H(a,k);c!==b.visible&&(b.visible=b.options.visible=c=void 0===c?!b.visible:c,d.options.data[d.data.indexOf(b)]=b.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(a){if(b[a])b[a][c?"show":"hide"](!0)}),b.legendItem&&e.legend.colorizeItem(b,c),c||"hover"!==b.state||b.setState(""),k&&(d.isDirty=!0),a&&e.redraw())},slice:function(c,a,b){var d=this.series;y(b,d.chart);H(a,!0);this.sliced=this.options.sliced=I(c)?c:!this.sliced; d.options.data[d.data.indexOf(this)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(c){var a=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(a.x,a.y,a.r+c,a.r+c,{innerR:a.r-1,start:a.start,end:a.end})},connectorShapes:{fixedOffset:function(c,a,b){var d=a.breakAt;a=a.touchingSliceAt; return["M",c.x,c.y].concat(b.softConnector?["C",c.x+("left"===c.alignment?-5:5),c.y,2*d.x-a.x,2*d.y-a.y,d.x,d.y]:["L",d.x,d.y]).concat(["L",a.x,a.y])},straight:function(c,a){a=a.touchingSliceAt;return["M",c.x,c.y,"L",a.x,a.y]},crookedLine:function(g,a,b){a=a.touchingSliceAt;var d=this.series,e=d.center[0],k=d.chart.plotWidth,h=d.chart.plotLeft;d=g.alignment;var m=this.shapeArgs.r;b=c.relativeLength(b.crookDistance,1);b="left"===d?e+m+(k+h-e-m)*(1-b):h+(e-m)*b;e=["L",b,g.y];if("left"===d?b>g.x||b< a.x:ba.x)e=[];return["M",g.x,g.y].concat(e).concat(["L",a.x,a.y])}},getConnectorPath:function(){var c=this.labelPosition,a=this.series.options.dataLabels,b=a.connectorShape,d=this.connectorShapes;d[b]&&(b=d[b]);return b.call(this,{x:c.final.x,y:c.final.y,alignment:c.alignment},c.connectorPosition,a)}});""});K(D,"parts/DataLabels.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.arrayMax,G=g.defined,H=g.extend,y=g.isArray,w=g.objectEach,x=g.pick,E=g.splat,F=c.format, t=c.merge;g=c.noop;var m=c.relativeLength,p=c.Series,q=c.seriesTypes,h=c.stableSort;c.distribute=function(a,b,d){function e(a,b){return a.target-b.target}var k,g=!0,m=a,r=[];var n=0;var f=m.reducedLen||b;for(k=a.length;k--;)n+=a[k].size;if(n>f){h(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(n=k=0;n<=f;)n+=a[k].size,k++;r=a.splice(k-1,a.length)}h(a,e);for(a=a.map(function(a){return{size:a.size,targets:[a.target],align:x(a.align,.5)}});g;){for(k=a.length;k--;)g=a[k],n=(Math.min.apply(0,g.targets)+ Math.max.apply(0,g.targets))/2,g.pos=Math.min(Math.max(0,n-g.size*g.align),b-g.size);k=a.length;for(g=!1;k--;)0a[k].pos&&(a[k-1].size+=a[k].size,a[k-1].targets=a[k-1].targets.concat(a[k].targets),a[k-1].align=.5,a[k-1].pos+a[k-1].size>b&&(a[k-1].pos=b-a[k-1].size),a.splice(k,1),g=!0)}m.push.apply(m,r);k=0;a.some(function(a){var f=0;if(a.targets.some(function(){m[k].pos=a.pos+f;if(Math.abs(m[k].pos-m[k].target)>d)return m.slice(0,k+1).forEach(function(a){delete a.pos}),m.reducedLen= (m.reducedLen||b)-.1*b,m.reducedLen>.1*b&&c.distribute(m,b,d),!0;f+=m[k].size;k++}))return!0});h(m,e)};p.prototype.drawDataLabels=function(){function a(a,b){var c=b.filter;return c?(b=c.operator,a=a[c.property],c=c.value,">"===b&&a>c||"<"===b&&a="===b&&a>=c||"<="===b&&a<=c||"=="===b&&a==c||"==="===b&&a===c?!0:!1):!0}function b(a,b){var c=[],f;if(y(a)&&!y(b))c=a.map(function(a){return t(a,b)});else if(y(b)&&!y(a))c=b.map(function(b){return t(a,b)});else if(y(a)||y(b))for(f=Math.max(a.length, b.length);f--;)c[f]=t(a[f],b[f]);else c=t(a,b);return c}var d=this,e=d.chart,k=d.options,g=k.dataLabels,h=d.points,m,n=d.hasRendered||0,f=c.animObject(k.animation).duration,l=Math.min(f,200),v=!e.renderer.forExport&&x(g.defer,0h||k.stacking?c.contrastColor:"#000000"),k.cursor&&(v.cursor=k.cursor));var p={r:b.borderRadius||0,rotation:u,padding:b.padding,zIndex:1};e.styledMode|| (p.fill=b.backgroundColor,p.stroke=b.borderColor,p["stroke-width"]=b.borderWidth);w(p,function(a,b){void 0===a&&delete p[b]})}!n||l&&G(r)?l&&G(r)&&(n?p.text=r:(c.dataLabels=c.dataLabels||[],n=c.dataLabels[f]=u?B.text(r,0,-9999).addClass("highcharts-data-label"):B.label(r,0,-9999,b.shape,null,null,b.useHTML,null,"data-label"),f||(c.dataLabel=n),n.addClass(" highcharts-data-label-color-"+c.colorIndex+" "+(b.className||"")+(b.useHTML?" highcharts-tracker":""))),n.options=b,n.attr(p),e.styledMode||n.css(v).shadow(b.shadow), n.added||n.add(A),b.textPath&&!b.useHTML&&n.setTextPath(c.getDataLabelPath&&c.getDataLabelPath(n)||c.graphic,b.textPath),d.alignDataLabel(c,n,b,null,m)):(c.dataLabel=c.dataLabel&&c.dataLabel.destroy(),c.dataLabels&&(1===c.dataLabels.length?delete c.dataLabels:delete c.dataLabels[f]),f||delete c.dataLabel,g&&(c.connector=c.connector.destroy(),c.connectors&&(1===c.connectors.length?delete c.connectors:delete c.connectors[f])))})})}c.fireEvent(this,"afterDrawDataLabels")};p.prototype.alignDataLabel= function(a,b,c,e,k){var d=this.chart,g=this.isCartesian&&d.inverted,h=x(a.dlBox&&a.dlBox.centerX,a.plotX,-9999),n=x(a.plotY,-9999),f=b.getBBox(),l=c.rotation,m=c.align,B=this.visible&&(a.series.forceDL||d.isInsidePlot(h,Math.round(n),g)||e&&d.isInsidePlot(h,g?e.x+1:e.y+e.height-1,g)),A="justify"===x(c.overflow,"justify");if(B){var u=d.renderer.fontMetrics(d.styledMode?void 0:c.style.fontSize,b).b;e=H({x:g?this.yAxis.len-n:h,y:Math.round(g?this.xAxis.len-h:n),width:0,height:0},e);H(c,{width:f.width, height:f.height});l?(A=!1,h=d.renderer.rotCorr(u,l),h={x:e.x+c.x+e.width/2+h.x,y:e.y+c.y+{top:0,middle:.5,bottom:1}[c.verticalAlign]*e.height},b[k?"attr":"animate"](h).attr({align:m}),n=(l+720)%360,n=180n,"left"===m?h.y-=n?f.height:0:"center"===m?(h.x-=f.width/2,h.y-=f.height/2):"right"===m&&(h.x-=f.width,h.y-=n?0:f.height),b.placed=!0,b.alignAttr=h):(b.align(c,null,e),h=b.alignAttr);A&&0<=e.height?this.justifyDataLabel(b,c,h,f,e,k):x(c.crop,!0)&&(B=d.isInsidePlot(h.x,h.y)&&d.isInsidePlot(h.x+ f.width,h.y+f.height));if(c.shape&&!l)b[k?"attr":"animate"]({anchorX:g?d.plotWidth-a.plotY:a.plotX,anchorY:g?d.plotHeight-a.plotX:a.plotY})}B||(b.hide(!0),b.placed=!1)};p.prototype.justifyDataLabel=function(a,b,c,e,k,g){var d=this.chart,h=b.align,n=b.verticalAlign,f=a.box?0:a.padding||0;var l=c.x+f;if(0>l){"right"===h?(b.align="left",b.inside=!0):b.x=-l;var m=!0}l=c.x+e.width-f;l>d.plotWidth&&("left"===h?(b.align="right",b.inside=!0):b.x=d.plotWidth-l,m=!0);l=c.y+f;0>l&&("bottom"===n?(b.verticalAlign= "top",b.inside=!0):b.y=-l,m=!0);l=c.y+e.height-f;l>d.plotHeight&&("top"===n?(b.verticalAlign="bottom",b.inside=!0):b.y=d.plotHeight-l,m=!0);m&&(a.placed=!g,a.align(b,null,k));return m};q.pie&&(q.pie.prototype.dataLabelPositioners={radialDistributionY:function(a){return a.top+a.distributeBox.pos},radialDistributionX:function(a,b,c,e){return a.getX(cb.bottom-2?e:c,b.half,b)},justify:function(a,b,c){return c[0]+(a.half?-1:1)*(b+a.labelDistance)},alignToPlotEdges:function(a,b,c,e){a=a.getBBox().width; return b?a+e:c-a-e},alignToConnectors:function(a,b,c,e){var d=0,g;a.forEach(function(a){g=a.dataLabel.getBBox().width;g>d&&(d=g)});return b?d+e:c-d-e}},q.pie.prototype.drawDataLabels=function(){var a=this,b=a.data,d,e=a.chart,k=a.options.dataLabels,g=k.connectorPadding,h,m=e.plotWidth,n=e.plotHeight,f=e.plotLeft,l=Math.round(e.chartWidth/3),v,B=a.center,A=B[2]/2,u=B[1],q,w,E,y,F=[[],[]],H,D,O,K,S=[0,0,0,0],ca=a.dataLabelPositioners,X;a.visible&&(k.enabled||a._hasPointLabels)&&(b.forEach(function(a){a.dataLabel&& a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),p.prototype.drawDataLabels.apply(a),b.forEach(function(a){a.dataLabel&&(a.visible?(F[a.half].push(a),a.dataLabel._pos=null,!G(k.style.width)&&!G(a.options.dataLabels&&a.options.dataLabels.style&&a.options.dataLabels.style.width)&&a.dataLabel.getBBox().width>l&&(a.dataLabel.css({width:.7*l}),a.dataLabel.shortened=!0)):(a.dataLabel=a.dataLabel.destroy(),a.dataLabels&& 1===a.dataLabels.length&&delete a.dataLabels))}),F.forEach(function(b,l){var h=b.length,r=[],v;if(h){a.sortByAngle(b,l-.5);if(0m-g&&0===l&&(p=Math.round(H+w-m+g),S[1]=Math.max(p,S[1])),0>D-y/2?S[0]=Math.max(Math.round(-D+y/2),S[0]):D+y/2>n&&(S[2]=Math.max(Math.round(D+y/2-n),S[2])),q.sideOverflow=p)}}}),0===I(S)||this.verifyDataLabelOverflow(S))&&(this.placeDataLabels(),this.points.forEach(function(b){X=t(k,b.options.dataLabels); if(h=x(X.connectorWidth,1)){var c;v=b.connector;if((q=b.dataLabel)&&q._pos&&b.visible&&0x(this.translatedThreshold,g.yAxis.len)),f=x(c.inside,!!this.options.stacking);h&&(e=t(h),0>e.y&&(e.height+=e.y,e.y=0),h=e.y+e.height-g.yAxis.len,0a.x+a.width||b.x+b.widtha.y+a.height||b.y+b.height=l&&k<=n||g||!D(k))h=!0;d[g?"zoomX":"zoomY"]&&h&&(c=f.zoom(a.min,a.max),f.displayBtn&&(e=!0))});var g=b.resetZoomButton;e&&!g?b.showResetZoom():!e&&y(g)&&(b.resetZoomButton=g.destroy());c&&b.redraw(x(b.options.chart.animation, a&&a.animation,100>b.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,e;q(this,"pan",{originalEvent:a},function(){d&&d.forEach(function(a){a.setState()});("xy"===b?[1,0]:[1]).forEach(function(b){b=c[b?"xAxis":"yAxis"][0];var f=b.horiz,d=a[f?"chartX":"chartY"];f=f?"mouseDownX":"mouseDownY";var l=c[f],k=(b.pointRange||0)/2,n=b.reversed&&!c.inverted||!b.reversed&&c.inverted?-1:1,g=b.getExtremes(),h=b.toValue(l-d,!0)+k*n;n=b.toValue(l+b.len-d,!0)-k*n;var m=n=y(w.minWidth,0)&&this.chartHeight>=y(w.minHeight,0)}).call(this)&&g.push(c._id)};g.prototype.currentOptions=function(c){function g(c,p,q,h){var a;H(c,function(b,c){if(!h&&-1=h?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0);!1===c.showFull&&(0>=a&&1<=b?this.group.hide(): this.group.show());this.rendered=!0}},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var c=a.chart.pointer.normalize(b),e=a.options.vertical?"chartY":"chartX",k=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][e]||(c=a.cursorToScrollbarPosition(c)[e],e=a[e],e=c-e,a.hasDragged=!0,a.updatePosition(k[0]+e,k[1]+e),a.hasDragged&&F(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&F(a,"changed",{from:a.from, to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=function(b){b=a.chart.pointer.normalize(b);b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY;a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var c=x(a.to-a.from)*a.options.step;a.updatePosition(x(a.from-c),x(a.to-c));F(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var c= (a.to-a.from)*a.options.step;a.updatePosition(a.from+c,a.to+c);F(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var c=a.chart.pointer.normalize(b),e=a.to-a.from,k=a.y+a.scrollbarTop,g=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>k||!a.options.vertical&&c.chartX>g?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);F(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})}},cursorToScrollbarPosition:function(a){var b=this.options; b=b.minWidth>this.calculatedWidth?b.minWidth:0;return{chartX:(a.chartX-this.x-this.xOffset)/(this.barWidth-b),chartY:(a.chartY-this.y-this.yOffset)/(this.barWidth-b)}},updatePosition:function(a,b){1a&&(b=x(b-a),a=0);this.from=a;this.to=b},update:function(a){this.destroy();this.init(this.chart.renderer,m(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,c=this.scrollbarGroup.element,e=this.mouseDownHandler, k=this.mouseMoveHandler,g=this.mouseUpHandler;a=[[b[a[0]].element,"click",this.buttonToMinClick],[b[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[c,"mousedown",e],[c.ownerDocument,"mousemove",k],[c.ownerDocument,"mouseup",g]];t&&a.push([c,"touchstart",e],[c.ownerDocument,"touchmove",k],[c.ownerDocument,"touchend",g]);a.forEach(function(a){w.apply(null,a)});this._events=a},removeEvents:function(){this._events.forEach(function(a){p.apply(null,a)});this._events.length= 0},destroy:function(){var a=this.chart.scroller;this.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,H(a.scrollbarButtons))}};c.Scrollbar||(w(g,"afterInit",function(){var a=this;a.options&&a.options.scrollbar&&a.options.scrollbar.enabled&&(a.options.scrollbar.vertical=!a.horiz,a.options.startOnTick=a.options.endOnTick=!1,a.scrollbar=new D(a.chart.renderer, a.options.scrollbar,a.chart),w(a.scrollbar,"changed",function(b){var d=Math.min(y(a.options.min,a.min),a.min,a.dataMin),e=Math.max(y(a.options.max,a.max),a.max,a.dataMax)-d;if(a.horiz&&!a.reversed||!a.horiz&&a.reversed){var k=d+e*this.to;d+=e*this.from}else k=d+e*(1-this.from),d+=e*(1-this.to);y(this.options.liveRedraw,c.svg&&!c.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===b.DOMType||!G(b.DOMType)?a.setExtremes(d,k,!0,"mousemove"!==b.DOMType,b):this.setRange(this.from,this.to)}))}),w(g,"afterRender", function(){var a=Math.min(y(this.options.min,this.min),this.min,y(this.dataMin,this.min)),b=Math.max(y(this.options.max,this.max),this.max,y(this.dataMax,this.max)),c=this.scrollbar,e=this.axisTitleMargin+(this.titleOffset||0),k=this.chart.scrollbarsOffsets,g=this.options.margin||0;c&&(this.horiz?(this.opposite||(k[1]+=e),c.position(this.left,this.top+this.height+2+k[1]-(this.opposite?g:0),this.width,this.height),this.opposite||(k[1]+=g),e=1):(this.opposite&&(k[0]+=e),c.position(this.left+this.width+ 2+k[0]-(this.opposite?0:g),this.top,this.width,this.height),this.opposite&&(k[0]+=g),e=0),k[e]+=c.size+c.options.margin,isNaN(a)||isNaN(b)||!G(this.min)||!G(this.max)||this.min===this.max?c.setRange(0,1):(k=(this.min-a)/(b-a),a=(this.max-a)/(b-a),this.horiz&&!this.reversed||!this.horiz&&this.reversed?c.setRange(k,a):c.setRange(1-a,1-k)))}),w(g,"afterGetOffset",function(){var a=this.horiz?2:1,b=this.scrollbar;b&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[a]+=b.size+b.options.margin)}), c.Scrollbar=D)});K(D,"parts/Navigator.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){function D(a){this.init(a)}var G=g.defined,H=g.destroyObjectProperties,y=g.erase,w=g.extend,x=g.isArray,E=g.isNumber,F=g.pick,t=g.splat,m=c.addEvent,p=c.Axis;g=c.Chart;var q=c.color,h=c.defaultOptions,a=c.hasTouch,b=c.isTouchDevice,d=c.merge,e=c.removeEvent,k=c.Scrollbar,C=c.Series,z=function(a){for(var b=[],c=1;ck&&(e?a=b-f:b=a+f);E(a)&&E(b)||(a=b=void 0);return{min:a,max:b}};D.prototype={drawHandle:function(a,b,c,d){var f=this.navigatorOptions.handles.height;this.handles[b][d](c?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(a,10)+ .5-f)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-f/2-1)})},drawOutline:function(a,b,c,d){var f=this.navigatorOptions.maskInside,l=this.outline.strokeWidth(),e=l/2;l=l%2/2;var k=this.outlineHeight,g=this.scrollbarHeight,n=this.size,h=this.left-g,m=this.top;c?(h-=e,c=m+b+l,b=m+a+l,a=["M",h+k,m-g-l,"L",h+k,c,"L",h,c,"L",h,b,"L",h+k,b,"L",h+k,m+n+g].concat(f?["M",h+k,c-e,"L",h+k,b+e]:[])):(a+=h+g-l,b+=h+g-l,m+=e,a=["M",h,m,"L",a,m,"L",a,m+k,"L",b,m+ k,"L",b,m,"L",h+n+2*g,m].concat(f?["M",a-e,m,"L",b+e,m]:[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var f=this.left,l=this.top,e=this.height;if(c){var k=[f,f,f];var g=[l,l+a,l+b];var n=[e,e,e];var h=[a,b-a,this.size-b]}else k=[f,f+a,f+b],g=[l,l,l],n=[a,b-a,this.size-b],h=[e,e,e];this.shades.forEach(function(a,b){a[d]({x:k[b],y:g[b],width:n[b],height:h[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,e=d.renderer,k,g={cursor:d.inverted?"ns-resize": "ew-resize"};a.navigatorGroup=k=e.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();[!c,c,!c].forEach(function(c,f){a.shades[f]=e.rect().addClass("highcharts-navigator-mask"+(1===f?"-inside":"-outside")).add(k);d.styledMode||a.shades[f].attr({fill:c?b.maskFill:"rgba(0,0,0,0)"}).css(1===f&&g)});a.outline=e.path().addClass("highcharts-navigator-outline").add(k);d.styledMode||a.outline.attr({"stroke-width":b.outlineWidth,stroke:b.outlineColor});b.handles.enabled&&[0,1].forEach(function(c){b.handles.inverted= d.inverted;a.handles[c]=e.symbol(b.handles.symbols[c],-b.handles.width/2-1,0,b.handles.width,b.handles.height,b.handles);a.handles[c].attr({zIndex:7-c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(k);if(!d.styledMode){var f=b.handles;a.handles[c].attr({fill:f.backgroundColor,stroke:f.borderColor,"stroke-width":f.lineWidth}).css(g)}})},update:function(a){(this.series||[]).forEach(function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy(); d(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,b,d,e){var f=this.chart,l=this.scrollbarHeight,k,g=this.xAxis,h=g.pointRange||0;var n=g.fake?f.xAxis[0]:g;var m=this.navigatorEnabled,r,v=this.rendered;var p=f.inverted;var q=f.xAxis[0].minRange,t=f.xAxis[0].options.maxRange;if(!this.hasDragged||G(d)){a=c.correctFloat(a-h/2);b=c.correctFloat(b+h/2);if(!E(a)||!E(b))if(v)d=0,e=F(g.width,n.width);else return;this.left=F(g.left,f.plotLeft+l+(p?f.plotWidth:0));this.size= r=k=F(g.len,(p?f.plotHeight:f.plotWidth)-2*l);f=p?l:k+2*l;d=F(d,g.toPixels(a,!0));e=F(e,g.toPixels(b,!0));E(d)&&Infinity!==Math.abs(d)||(d=0,e=f);a=g.toValue(d,!0);b=g.toValue(e,!0);var z=Math.abs(c.correctFloat(b-a));c.correctFloat(z-h)t&&(this.grabbedLeft?d=g.toPixels(b-t-h,!0):this.grabbedRight&&(e=g.toPixels(a+t+h,!0)));this.zoomedMax=Math.min(Math.max(d,e,0),r);this.zoomedMin=Math.min(Math.max(this.fixedWidth? this.zoomedMax-this.fixedWidth:Math.min(d,e),0),r);this.range=this.zoomedMax-this.zoomedMin;r=Math.round(this.zoomedMax);d=Math.round(this.zoomedMin);m&&(this.navigatorGroup.attr({visibility:"visible"}),v=v&&!this.hasDragged?"animate":"attr",this.drawMasks(d,r,p,v),this.drawOutline(d,r,p,v),this.navigatorOptions.handles.enabled&&(this.drawHandle(d,0,p,v),this.drawHandle(r,1,p,v)));this.scrollbar&&(p?(p=this.top-l,n=this.left-l+(m||!n.opposite?0:(n.titleOffset||0)+n.axisTitleMargin),l=k+2*l):(p=this.top+ (m?this.height:-l),n=this.left-l),this.scrollbar.position(n,p,f,l),this.scrollbar.setRange(this.zoomedMin/(k||1),this.zoomedMax/(k||1)));this.rendered=!0}},addMouseEvents:function(){var b=this,c=b.chart,d=c.container,e=[],k,g;b.mouseMoveHandler=k=function(a){b.onMouseMove(a)};b.mouseUpHandler=g=function(a){b.onMouseUp(a)};e=b.getPartsEvents("mousedown");e.push(m(c.renderTo,"mousemove",k),m(d.ownerDocument,"mouseup",g));a&&(e.push(m(c.renderTo,"touchmove",k),m(d.ownerDocument,"touchend",g)),e.concat(b.getPartsEvents("touchstart"))); b.eventsToUnbind=e;b.series&&b.series[0]&&e.push(m(b.series[0].xAxis,"foundExtremes",function(){c.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,c=[];["shades","handles"].forEach(function(d){b[d].forEach(function(f,l){c.push(m(f.element,a,function(a){b[d+"Mousedown"](a,l)}))})});return c},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var c=this.chart,d=this.xAxis,f=this.zoomedMin,e=this.left,k=this.size,g=this.range,h=a.chartX;c.inverted&&(h=a.chartY, e=this.top);if(1===b)this.grabbedCenter=h,this.fixedWidth=g,this.dragOffset=h-f;else{a=h-e-g/2;if(0===b)a=Math.max(0,a);else if(2===b&&a+g>=k)if(a=k-g,this.reversedExtremes){a-=g;var n=this.getUnionExtremes().dataMin}else var m=this.getUnionExtremes().dataMax;a!==f&&(this.fixedWidth=g,b=d.toFixedRange(a,a+g,n,m),G(b.min)&&c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"}))}},handlesMousedown:function(a,b){this.chart.pointer.normalize(a);a=this.chart; var c=a.xAxis[0],d=this.reversedExtremes;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?c.min:c.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?c.max:c.min);a.fixedRange=null},onMouseMove:function(a){var d=this,e=d.chart,k=d.left,g=d.navigatorSize,h=d.range,m=d.dragOffset,n=e.inverted;a.touches&&0===a.touches[0].pageX||(a=e.pointer.normalize(a),e=a.chartX,n&&(k=d.top,e=a.chartY),d.grabbedLeft?(d.hasDragged=!0,d.render(0,0,e-k,d.otherHandlePos)): d.grabbedRight?(d.hasDragged=!0,d.render(0,0,d.otherHandlePos,e-k)):d.grabbedCenter&&(d.hasDragged=!0,eg+m-h&&(e=g+m-h),d.render(0,0,e-m,e-m+h)),d.hasDragged&&d.scrollbar&&F(d.scrollbar.options.liveRedraw,c.svg&&!b&&!this.chart.isBoosting)&&(a.DOMType=a.type,setTimeout(function(){d.onMouseUp(a)},0)))},onMouseUp:function(a){var b=this.chart,c=this.xAxis,d=this.scrollbar,e=a.DOMEvent||a;if(this.hasDragged&&(!d||!d.hasDragged)||"scrollbar"===a.trigger){d=this.getUnionExtremes();if(this.zoomedMin=== this.otherHandlePos)var k=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var g=this.fixedExtreme;this.zoomedMax===this.size&&(g=this.reversedExtremes?d.dataMin:d.dataMax);0===this.zoomedMin&&(k=this.reversedExtremes?d.dataMax:d.dataMin);c=c.toFixedRange(this.zoomedMin,this.zoomedMax,k,g);G(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:e})}"mousemove"!==a.DOMType&&"touchmove"!== a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&a.forEach(function(a){e(a,"updatedData",this.updatedDataHandler)}, this),a[0].xAxis&&e(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,c=b.navigator,e=c.enabled,g=b.scrollbar,h=g.enabled;b=e?c.height:0;var n=h?g.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=n;this.scrollbarEnabled=h;this.navigatorEnabled=e;this.navigatorOptions=c;this.scrollbarOptions=g;this.outlineHeight=b+n;this.opposite=F(c.opposite,!(e||!a.inverted));var r=this;e=r.baseSeries;g=a.xAxis.length; h=a.yAxis.length;var q=e&&e[0]&&e[0].xAxis||a.xAxis[0]||{options:{}};a.isDirtyBox=!0;r.navigatorEnabled?(r.xAxis=new p(a,d({breaks:q.options.breaks,ordinal:q.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:g,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[n,0,-n,0],width:b}:{offsets:[0,-n,0,n],height:b})),r.yAxis=new p(a,d(c.yAxis,{id:"navigator-y-axis",alignTicks:!1, offset:0,index:h,isInternal:!0,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||c.series.data?r.updateNavigatorSeries(!1):0===a.series.length&&(r.unbindRedraw=m(a,"beforeRedraw",function(){0k.indexOf(b)?(b&&(e(b,"updatedData",c.updatedDataHandler),delete b.navigatorSeries),a.chart&&a.destroy(),!1):!0});k&&k.length&&k.forEach(function(a){var e=a.navigatorSeries,l=w({color:a.color,visible:a.visible},x(n)?h.navigator.series:n);e&&!1===c.navigatorOptions.adaptToUpdatedData||(p.name="Navigator "+k.length,g=a.options||{}, r=g.navigatorOptions||{},m=d(g,p,l,r),m.pointRange=F(l.pointRange,r.pointRange,h.plotOptions[m.type||"line"].pointRange),l=r.data||l.data,c.hasNavigatorData=c.hasNavigatorData||!!l,m.data=l||g.data&&g.data.slice(0),e&&e.options?e.update(m,b):(a.navigatorSeries=f.initSeries(m),a.navigatorSeries.baseSeries=a,q.push(a.navigatorSeries)))});if(n.data&&(!k||!k.length)||x(n))c.hasNavigatorData=!1,n=t(n),n.forEach(function(a,b){p.name="Navigator "+(q.length+1);m=d(h.navigator.series,{color:f.series[b]&&!f.series[b].options.isInternal&& f.series[b].color||f.options.colors[b]||f.options.colors[0]},p,a);m.data=a.data;m.data&&(c.hasNavigatorData=!0,q.push(f.initSeries(m)))});a&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&m(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);b.forEach(function(b){m(b,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});m(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!== this.navigatorOptions.adaptToUpdatedData&&b.xAxis&&m(b,"updatedData",this.updatedDataHandler);m(b,"remove",function(){this.navigatorSeries&&(y(a.series,this.navigatorSeries),G(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(a){return this.baseSeries.reduce(function(a,b){return Math.min(a,b.xData?b.xData[0]:a)},a)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;"undefined"!==typeof a.getExtremes&&(!(b=this.getUnionExtremes(!0))|| b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,b=this.getExtremes(),c=b.dataMin,d=b.dataMax;b=b.max-b.min;var e=a.stickToMin,k=a.stickToMax,g=F(this.options.overscroll,0),h=a.series&&a.series[0],m=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(e){var r=c;var p=r+b}k&&(p=d+g,e||(r=Math.max(p-b,a.getBaseSeriesMin(h&&h.xData?h.xData[0]:-Number.MAX_VALUE))));m&&(e||k)&&E(r)&& (this.min=this.userMin=r,this.max=this.userMax=p)}a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries,c=a.getBaseSeriesMin(this.xData[0]);a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=E(this.xAxis.min)&&this.xAxis.min<=c&&(!this.chart.fixedRange||!a.stickToMax);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind|| (this.eventsToUnbind=[]);this.eventsToUnbind.push(m(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)}),m(this.chart,"getMargins",function(){var a=this.navigator,b=a.opposite?"plotTop":"marginBottom";this.inverted&&(b=a.opposite?"marginRight":"plotLeft");this[b]=(this[b]||0)+(a.navigatorEnabled||!this.inverted?a.outlineHeight:0)+a.navigatorOptions.margin}))},destroy:function(){this.removeEvents(); this.xAxis&&(y(this.chart.xAxis,this.xAxis),y(this.chart.axes,this.xAxis));this.yAxis&&(y(this.chart.yAxis,this.yAxis),y(this.chart.axes,this.yAxis));(this.series||[]).forEach(function(a){a.destroy&&a.destroy()});"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);[this.handles].forEach(function(a){H(a)},this)}};c.Navigator||(c.Navigator=D, m(p,"zoom",function(a){var c=this.chart.options,d=c.chart.zoomType,e=c.chart.pinchType,k=c.navigator;c=c.rangeSelector;this.isXAxis&&(k&&k.enabled||c&&c.enabled)&&("y"===d?a.zoomed=!1:(!b&&"xy"===d||b&&"xy"===e)&&this.options.range&&(d=this.previousZoom,G(a.newMin)?this.previousZoom=[this.min,this.max]:d&&(a.newMin=d[0],a.newMax=d[1],delete this.previousZoom)));void 0!==a.zoomed&&a.preventDefault()}),m(g,"beforeShowResetZoom",function(){var a=this.options,c=a.navigator,d=a.rangeSelector;if((c&&c.enabled|| d&&d.enabled)&&(!b&&"x"===a.chart.zoomType||b&&"x"===a.chart.pinchType))return!1}),m(g,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new D(this)}),m(g,"afterSetChartSize",function(){var a=this.legend,b=this.navigator;if(b){var c=a&&a.options;var d=b.xAxis;var e=b.yAxis;var k=b.scrollbarHeight;this.inverted?(b.left=b.opposite?this.chartWidth-k-b.height:this.spacing[3]+k,b.top=this.plotTop+k):(b.left=this.plotLeft+k,b.top=b.navigatorOptions.top|| this.chartHeight-b.height-k-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(c&&"bottom"===c.verticalAlign&&c.enabled&&!c.floating?a.legendHeight+F(c.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0));d&&e&&(this.inverted?d.options.left=e.options.left=b.left:d.options.top=e.options.top=b.top,d.setAxisSize(),e.setAxisSize())}}),m(g,"update",function(a){var b=a.options.navigator||{},c=a.options.scrollbar||{};this.navigator||this.scroller||!b.enabled&& !c.enabled||(d(!0,this.options.navigator,b),d(!0,this.options.scrollbar,c),delete a.options.navigator,delete a.options.scrollbar)}),m(g,"afterUpdate",function(a){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new D(this),F(a.redraw,!0)&&this.redraw(a.animation))}),m(g,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),m(C,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&& this.chart.navigator.setBaseSeries(null,!1)}),g.prototype.callbacks.push(function(a){var b=a.navigator;b&&a.xAxis[0]&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))}))});K(D,"parts/OrdinalAxis.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.defined,G=g.extend,H=g.pick;g=c.addEvent;var y=c.Axis,w=c.Chart,x=c.css,E=c.noop,F=c.timeUnits;g(c.Series,"updatedData",function(){var c=this.xAxis;c&&c.options.ordinal&&delete c.ordinalIndex});y.prototype.getTimeTicks=function(c, g,p,q,h,a,b){var d=0,e,k,m={},t=[],r=-Number.MAX_VALUE,n=this.options.tickPixelInterval,f=this.chart.time,l=[];if(!this.options.ordinal&&!this.options.breaks||!h||3>h.length||void 0===g)return f.getTimeTicks.apply(f,arguments);var v=h.length;for(e=0;ep;h[e]5*a||B){if(h[e]>r){for(k=f.getTimeTicks(c,h[d],h[e],q);k.length&&k[0]<=r;)k.shift();k.length&&(r=k[k.length-1]);l.push(t.length);t=t.concat(k)}d=e+1}if(B)break}k=k.info;if(b&&k.unitRange<= F.hour){e=t.length-1;for(d=1;dp?l-1:l;for(u=void 0;d--;)e=A[d],l=Math.abs(u-e),u&&l<.8*n&&(null===f||l<.8*f)?(m[t[d]]&&!m[t[d+1]]?(l=d+1,u=e):l=d,t.splice(l,1)):u=e}return t};G(y.prototype,{beforeSetTickPositions:function(){var c= [],g,p=!1,q=this.getExtremes(),h=q.min,a=q.max,b,d=this.isXAxis&&!!this.options.breaks;q=this.options.ordinal;var e=Number.MAX_VALUE,k=this.chart.options.chart.ignoreHiddenSeries,C;if(q||d){this.series.forEach(function(a,b){g=[];if(!(k&&!1===a.visible||!1===a.takeOrdinalPosition&&!d)&&(c=c.concat(a.processedXData),z=c.length,c.sort(function(a,b){return a-b}),e=Math.min(e,H(a.closestPointRange,e)),z)){for(b=0;br||a-c[c.length-1]>r)&&(p=!0)}else this.options.overscroll&&(2===z?e=c[1]-c[0]:1===z?(e=this.options.overscroll,c=[c[0],c[0]+e]):e=this.overscrollPointsRange);p?(this.options.overscroll&&(this.overscrollPointsRange=e,c=c.concat(this.getOverscrollPositions())),this.ordinalPositions=c,r=this.ordinal2lin(Math.max(h,c[0]),!0),b=Math.max(this.ordinal2lin(Math.min(a, c[c.length-1]),!0),1),this.ordinalSlope=a=(a-h)/(b-r),this.ordinalOffset=h-r*a):(this.overscrollPointsRange=H(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=q&&p;this.groupIntervalFactor=null},val2lin:function(c,g){var m=this.ordinalPositions;if(m){var q=m.length,h;for(h=q;h--;)if(m[h]===c){var a=h;break}for(h=q-1;h--;)if(c>m[h]||0===h){c=(c-m[h])/(m[h+1]-m[h]);a=h+c;break}g=g?a:this.ordinalSlope*(a||0)+this.ordinalOffset}else g= c;return g},lin2val:function(c,g){var m=this.ordinalPositions;if(m){var q=this.ordinalSlope,h=this.ordinalOffset,a=m.length-1;if(g)if(0>c)c=m[0];else if(c>a)c=m[a];else{a=Math.floor(c);var b=c-a}else for(;a--;)if(g=q*a+h,c>=g){q=q*(a+1)+h;b=(c-g)/(q-g);break}return void 0!==b&&void 0!==m[a]?m[a]+(b?b*(m[a+1]-m[a]):0):c}return c},getExtendedPositions:function(){var c=this,g=c.chart,p=c.series[0].currentDataGrouping,q=c.ordinalIndex,h=p?p.count+p.unitName:"raw",a=c.options.overscroll,b=c.getExtremes(), d;q||(q=c.ordinalIndex={});if(!q[h]){var e={series:[],chart:g,getExtremes:function(){return{min:b.dataMin,max:b.dataMax+a}},options:{ordinal:!0},val2lin:y.prototype.val2lin,ordinal2lin:y.prototype.ordinal2lin};c.series.forEach(function(a){d={xAxis:e,xData:a.xData.slice(),chart:g,destroyGroupedData:E};d.xData=d.xData.concat(c.getOverscrollPositions());d.options={dataGrouping:p?{enabled:!0,forced:!0,approximation:"open",units:[[p.unitName,[p.count]]]}:{enabled:!1}};a.processData.apply(d);e.series.push(d)}); c.beforeSetTickPositions.apply(e);q[h]=e.ordinalPositions}return q[h]},getOverscrollPositions:function(){var c=this.options.overscroll,g=this.overscrollPointsRange,p=[],q=this.dataMax;if(D(g))for(p.push(q);q<=this.dataMax+c;)q+=g,p.push(q);return p},getGroupIntervalFactor:function(c,g,p){p=p.processedXData;var m=p.length,h=[];var a=this.groupIntervalFactor;if(!a){for(a=0;aa){t=r;var f=g.ordinalPositions?g:r}else t=g.ordinalPositions?g:r,f=r;r=f.ordinalPositions;d>r[r.length-1]&&r.push(d);this.fixedRange=k-e;a=g.toFixedRange(null,null,z.apply(t,[n.apply(t,[e,!0])+a,!0]),z.apply(f,[n.apply(f,[k,!0])+a,!0]));a.min>=Math.min(b.dataMin,e)&&a.max<=Math.max(d,k)+p&&g.setExtremes(a.min, a.max,!0,!1,{trigger:"pan"});this.mouseDownX=q;x(this.container,{cursor:"move"})}}else h=!0;h?p&&(g.max=g.dataMax+p):c.preventDefault()});g(y,"foundExtremes",function(){this.isXAxis&&D(this.options.overscroll)&&this.max===this.dataMax&&(!this.chart.mouseIsDown||this.isInternal)&&(!this.eventArgs||this.eventArgs&&"navigator"!==this.eventArgs.trigger)&&(this.max+=this.options.overscroll,!this.isInternal&&D(this.userMin)&&(this.min+=this.options.overscroll))});g(y,"afterSetScale",function(){this.horiz&& !this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)})});K(D,"modules/broken-axis.src.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.extend,G=g.isArray,H=g.pick;g=c.addEvent;var y=c.find,w=c.fireEvent,x=c.Axis,E=c.Series,F=function(c,g){return y(g,function(g){return g.from=q?(g-q)%m:m-(q-g)%m;return c.inclusive? g<=h:g=a)break;else if(h.isInBreak(g,a)){b-=a-g.from;break}}return b}function q(a){var b;for(b=0;b=a)break;else c.top;)v-=m;for(;ve.to||a>e.from&&de.from&&de.from&&d>e.to&&dg&&m>=this.basePointRange&&(g=m);q--;)p[q+1].x-p[q].x>g&&(m=(p[q].x+p[q+1].x)/2,p.splice(q+1,0,{isNull:!0,x:m}),this.options.stacking&&(m=h.stacks[this.stackKey][m]=new c.StackItem(h,h.options.stackLabels,!1,m,this.stack),m.total=0));return this.getGraphPath(p)}});K(D,"masters/modules/broken-axis.src.js",[],function(){});K(D,"parts/DataGrouping.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.arrayMax,G=g.arrayMin,H=g.defined,y=g.extend,w=g.isNumber, x=g.pick;g=c.addEvent;var E=c.Axis,F=c.correctFloat,t=c.defaultPlotOptions,m=c.format,p=c.merge,q=c.Point,h=c.Series,a=c.Tooltip,b=c.approximations={sum:function(a){var b=a.length;if(!b&&a.hasNulls)var c=null;else if(b)for(c=0;b--;)c+=a[b];return c},average:function(a){var c=a.length;a=b.sum(a);w(a)&&c&&(a=F(a/c));return a},averages:function(){var a=[];[].forEach.call(arguments,function(c){a.push(b.average(c))});return void 0===a[0]?void 0:a},open:function(a){return a.length?a[0]:a.hasNulls?null: void 0},high:function(a){return a.length?D(a):a.hasNulls?null:void 0},low:function(a){return a.length?G(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,c,d,f){a=b.open(a);c=b.high(c);d=b.low(d);f=b.close(f);if(w(a)||w(c)||w(d)||w(f))return[a,c,d,f]},range:function(a,c){a=b.low(a);c=b.high(c);if(w(a)||w(c))return[a,c];if(null===a&&null===c)return null}},d=function(a,c,d,f){var e=this,g=e.data,l=e.options&&e.options.data,k=[],h=[],m= [],n=a.length,r=!!c,q=[],v=e.pointArrayMap,B=v&&v.length,z=["x"].concat(v||["y"]),t=0,A=0,C;f="function"===typeof f?f:b[f]?b[f]:b[e.getDGApproximation&&e.getDGApproximation()||"average"];B?v.forEach(function(){q.push([])}):q.push([]);var x=B||1;for(C=0;C<=n&&!(a[C]>=d[0]);C++);for(C;C<=n;C++){for(;void 0!==d[t+1]&&a[C]>=d[t+1]||C===n;){var y=d[t];e.dataGroupInfo={start:e.cropStart+A,length:q[0].length};var E=f.apply(e,q);e.pointClass&&!H(e.dataGroupInfo.options)&&(e.dataGroupInfo.options=p(e.pointClass.prototype.optionsToObject.call({series:e}, e.options.data[e.cropStart+A])),z.forEach(function(a){delete e.dataGroupInfo.options[a]}));void 0!==E&&(k.push(y),h.push(E),m.push(e.dataGroupInfo));A=C;for(y=0;ythis.chart.plotSizeX/d||b&&e.forced)&&(f=!0);return f?d:0};E.prototype.setDataGrouping=function(a,b){var c;b=x(b,!0);a||(a={forced:!1,units:null});if(this instanceof E)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else this.chart.options.series.forEach(function(b){b.dataGrouping=a},!1);this.ordinalSlope=null;b&&this.chart.redraw()};c.dataGrouping=e;"";return e});K(D,"parts/OHLCSeries.js",[D["parts/Globals.js"]], function(c){var g=c.Point,D=c.seriesType,G=c.seriesTypes;D("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\u25cf {series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(c){return[c.open,c.high,c.low,c.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color", "stroke-width":"lineWidth"},init:function(){G.column.prototype.init.apply(this,arguments);this.options.stacking=!1},pointAttribs:function(c,g){g=G.column.prototype.pointAttribs.call(this,c,g);var w=this.options;delete g.fill;!c.options.color&&w.upColor&&c.openF)break}}}E.forEach(function(g,f){g.plotX+=e;if(void 0===g.plotY||a)0<=g.plotX&&g.plotX<=b.len?a?(g.plotY=b.translate(g.x,0,1,0,1),g.plotX=D(g.y)?d.translate(g.y, 0,0,0,1):0):g.plotY=(b.opposite?0:c.yAxis.len)+b.offset:g.shapeArgs={};if((t=E[f-1])&&t.plotX===g.plotX){void 0===t.stackIndex&&(t.stackIndex=0);var k=t.stackIndex+1}g.stackIndex=k});this.onSeries=m}}});K(D,"parts/FlagsSeries.js",[D["parts/Globals.js"],D["parts/Utilities.js"],D["mixins/on-series.js"]],function(c,g,D){function G(a){h[a+"pin"]=function(b,c,e,g,m){var d=m&&m.anchorX;m=m&&m.anchorY;"circle"===a&&g>e&&(b-=Math.round((g-e)/2),e=g);var k=h[a](b,c,e,g);d&&m&&(k.push("M","circle"===a?b+e/ 2:k[1]+k[4]/2,c>m?c:c+g,"L",d,m),k=k.concat(h.circle(d-1,m-1,2,2)));return k}}var H=g.defined,y=g.isNumber,w=g.objectEach,x=c.addEvent,E=c.merge;g=c.noop;var F=c.Renderer,t=c.Series,m=c.seriesType,p=c.TrackerMixin,q=c.VMLRenderer,h=c.SVGRenderer.prototype.symbols;m("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}
"},threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}}, style:{fontSize:"11px",fontWeight:"bold"}},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:t.prototype.init,pointAttribs:function(a,b){var c=this.options,e=a&&a.color||this.color,g=c.lineColor,h=a&&a.lineWidth;a=a&&a.fillColor||c.fillColor;b&&(a=c.states[b].fillColor,g=c.states[b].lineColor,h=c.states[b].lineWidth);return{fill:a||e,stroke:g||e,"stroke-width":h||c.lineWidth||0}},translate:D.translate,getPlotBox:D.getPlotBox,drawPoints:function(){var a= this.points,b=this.chart,d=b.renderer,e=b.inverted,g=this.options,h=g.y,m,r=this.yAxis,n={},f=[];for(m=a.length;m--;){var l=a[m];var p=(e?l.plotY:l.plotX)>this.xAxis.len;var q=l.plotX;var t=l.stackIndex;var u=l.options.shape||g.shape;var x=l.plotY;void 0!==x&&(x=l.plotY+h-(void 0!==t&&t*g.stackDistance));l.anchorX=t?void 0:l.plotX;var y=t?void 0:l.plotY;var F="flag"!==u;t=l.graphic;void 0!==x&&0<=q&&!p?(t||(t=l.graphic=d.label("",null,null,u,null,null,g.useHTML),b.styledMode||t.attr(this.pointAttribs(l)).css(E(g.style, l.style)),t.attr({align:F?"center":"left",width:g.width,height:g.height,"text-align":g.textAlign}).addClass("highcharts-point").add(this.markerGroup),l.graphic.div&&(l.graphic.div.point=l),b.styledMode||t.shadow(g.shadow),t.isNew=!0),0h-g,B=k=864E5*{month:28,year:365}[l]*n-u&&d-36E5<=864E5*{month:31,year:366}[l]*n+u?k=!0:"ytd"===l?(k=p-m+u===d,x=!b):"all"===l&&(k=c.max-c.min>=h-g,C=!b&&t&&k);l=!w&&(z||B||C||e);n=b&&k||k&&!t&&!x||b&&a.frozenStates;l?v=3:n&&(t=!0,v=2);r.state!==v&&(r.setState(v),0===v&&q===f&&a.setSelected(null))})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4, hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c;a._offsetMin=F(a.offsetMin,0);a._offsetMax=F(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this.chart.time,e=this[a+"Input"];G(b)&&(e.previousValue=e.HCTime,e.HCTime=b);e.value=d.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",e.HCTime);this[a+"DateBox"].attr({text:d.dateFormat(c.inputDateFormat||"%b %e, %Y", e.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];h(this[a+"Input"],{left:b.translateX+c.x+"px",top:b.translateY+"px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})},hideInput:function(a){h(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(d){function g(){var a=A.value,b=(l.inputDateParser||Date.parse)(a),c=m.xAxis[0],d=m.scroller&&m.scroller.xAxis?m.scroller.xAxis:c,f=d.dataMin;d=d.dataMax;b!==A.previousValue&& (A.previousValue=b,x(b)||(b=a.split("-"),b=Date.UTC(t(b[0]),t(b[1])-1,t(b[2]))),x(b)&&(m.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),q?b>k.maxInput.HCTime?b=void 0:bd&&(b=d),void 0!==b&&c.setExtremes(q?b:c.min,q?c.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}var k=this,m=k.chart,n=m.renderer.style||{},f=m.renderer,l=m.options.rangeSelector,p=k.div,q="min"===d,A,u,y=this.inputGroup;this[d+"Label"]=u=f.label(b.lang[q?"rangeSelectorFrom":"rangeSelectorTo"], this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(y);y.offset+=u.width+5;this[d+"DateBox"]=f=f.label("",y.offset).addClass("highcharts-range-input").attr({padding:2,width:l.inputBoxWidth||90,height:l.inputBoxHeight||17,"text-align":"center"}).on("click",function(){k.showInput(d);k[d+"Input"].focus()});m.styledMode||f.attr({stroke:l.inputBoxBorderColor||"#cccccc","stroke-width":1});f.add(y);y.offset+=f.width+(q?10:0);this[d+"Input"]=A=a("input",{name:d,className:"highcharts-range-selector", type:"text"},{top:m.plotTop+"px"},p);m.styledMode||(u.css(e(n,l.labelStyle)),f.css(e({color:"#333333"},n,l.inputStyle)),h(A,w({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:n.fontSize,fontFamily:n.fontFamily,top:"-9999em"},l.inputStyle)));A.onfocus=function(){k.showInput(d)};A.onblur=function(){A===c.doc.activeElement&&g();k.hideInput(d);A.blur()};A.onchange=g;A.onkeypress=function(a){13===a.keyCode&&g()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector; a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}},getYTDExtremes:function(a,b,c){var d=this.chart.time,e=new d.Date(a),f=d.get("FullYear",e);c=c?d.Date.UTC(f,0,1):+new d.Date(f,0,1);b=Math.max(b||0,c);e=e.getTime();return{max:Math.min(a||e,e),min:b}},render:function(c,d){var e=this,g=e.chart,k=g.renderer,f=g.container,l=g.options,h=l.exporting&&!1!==l.exporting.enabled&&l.navigation&&l.navigation.buttonOptions,m=b.lang,p= e.div,q=l.rangeSelector,t=F(l.chart.style&&l.chart.style.zIndex,0)+1;l=q.floating;var w=e.buttons;p=e.inputGroup;var x=q.buttonTheme,y=q.buttonPosition,C=q.inputPosition,E=q.inputEnabled,D=x&&x.states,G=g.plotLeft,H=e.buttonGroup;var I=e.rendered;var K=e.options.verticalAlign,X=g.legend,R=X&&X.options,T=y.y,ba=C.y,Z=I||!1,aa=Z?"animate":"attr",V=0,W=0,Y;if(!1!==q.enabled){I||(e.group=I=k.g("range-selector-group").attr({zIndex:7}).add(),e.buttonGroup=H=k.g("range-selector-buttons").add(I),e.zoomText= k.text(m.rangeSelectorZoom,0,15).add(H),g.styledMode||(e.zoomText.css(q.labelStyle),x["stroke-width"]=F(x["stroke-width"],0)),e.buttonOptions.forEach(function(a,b){w[b]=k.button(a.text,0,0,function(c){var d=a.events&&a.events.click,f;d&&(f=d.call(a,c));!1!==f&&e.clickButton(b);e.isActive=!0},x,D&&D.hover,D&&D.select,D&&D.disabled).attr({"text-align":"center"}).add(H)}),!1!==E&&(e.div=p=a("div",null,{position:"relative",height:0,zIndex:t}),f.parentNode.insertBefore(p,f),e.inputGroup=p=k.g("input-group").add(I), p.offset=0,e.drawInput("min"),e.drawInput("max")));e.zoomText[aa]({x:F(G+y.x,G)});var ea=F(G+y.x,G)+e.zoomText.getBBox().width+5;e.buttonOptions.forEach(function(a,b){w[b][aa]({x:ea});ea+=w[b].width+F(q.buttonSpacing,5)});G=g.plotLeft-g.spacing[3];e.updateButtonStates();h&&this.titleCollision(g)&&"top"===K&&"right"===y.align&&y.y+H.getBBox().height-12<(h.y||0)+h.height&&(V=-40);"left"===y.align?Y=y.x-g.spacing[3]:"right"===y.align&&(Y=y.x+V-g.spacing[1]);H.align({y:y.y,width:H.getBBox().width,align:y.align, x:Y},!0,g.spacingBox);e.group.placed=Z;e.buttonGroup.placed=Z;!1!==E&&(V=h&&this.titleCollision(g)&&"top"===K&&"right"===C.align&&C.y-p.getBBox().height-12<(h.y||0)+h.height+g.spacing[0]?-40:0,"left"===C.align?Y=G:"right"===C.align&&(Y=-Math.max(g.axisOffset[1],-V)),p.align({y:C.y,width:p.getBBox().width,align:C.align,x:C.x+Y-2},!0,g.spacingBox),f=p.alignAttr.translateX+p.alignOptions.x-V+p.getBBox().x+2,h=p.alignOptions.width,m=H.alignAttr.translateX+H.getBBox().x,Y=H.getBBox().width+20,(C.align=== y.align||m+Y>f&&f+h>m&&T=-V?0:-V),translateY:p.alignAttr.translateY+H.getBBox().height+10}),e.setInputValue("min",c),e.setInputValue("max",d),e.inputGroup.placed=Z);e.group.align({verticalAlign:K},!0,g.spacingBox);c=e.group.getBBox().height+20;d=e.group.alignAttr.translateY;"bottom"===K&&(X=R&&"bottom"===R.verticalAlign&&R.enabled&&!R.floating?X.legendHeight+F(R.margin,10):0,c=c+X-20,W=d-c-(l?0:q.y)-(g.titleOffset? g.titleOffset[2]:0)-10);if("top"===K)l&&(W=0),g.titleOffset&&g.titleOffset[0]&&(W=g.titleOffset[0]),W+=g.margin[0]-g.spacing[0]||0;else if("middle"===K)if(ba===T)W=0>ba?d+void 0:d;else if(ba||T)W=0>ba||0>T?W-Math.min(ba,T):d-c+NaN;e.group.translate(q.x,q.y+Math.floor(W));!1!==E&&(e.minInput.style.marginTop=e.group.translateY+"px",e.maxInput.style.marginTop=e.group.translateY+"px");e.rendered=!0}},getHeight:function(){var a=this.options,b=this.group,c=a.y,d=a.buttonPosition.y,e=a.inputPosition.y;if(a.height)return a.height; a=b?b.getBBox(!0).height+13+c:0;b=Math.min(e,d);if(0>e&&0>d||0k+d.width)&&(D?n=q=Math.min(Math.max(k,n),k+d.width):b=!0);b||t.push("M",n,p,"L",q,r)}):G.forEach(function(a){var b;n=a.pos;q=n+a.len;p=r=Math.round(m+d.height- I);"pass"!==D&&(pm+d.height)&&(D?p=r=Math.min(Math.max(m,p),d.top+d.height):b=!0);b||t.push("M",n,p,"L",q,r)}));a.path=0F?"hidden":"visible"});e=n.getBBox();if(g){if(t&&!h||!t&&h)m=n.y-e.height}else m=n.y-e.height/2;g?(b=k-e.x,c=k+ this.width-e.x):(b="left"===this.labelAlign?k:0,c="right"===this.labelAlign?k+this.width:d.chartWidth);n.translateX=c&&(x=-(n.translateX+e.width-c));n.attr({x:D+x,y:m,anchorX:g?D:this.opposite?0:d.chartWidth,anchorY:g?this.opposite?d.chartHeight:0:m+e.height/2})}});k.init=function(){C.apply(this,arguments);this.setCompare(this.options.compare)};k.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var d=this.compareValue;return void 0!== b&&void 0!==d?(b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b):0}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};k.processData=function(a){var b,c=-1,d=!0===this.options.compareStart?0:1;z.apply(this,arguments);if(this.xAxis&&this.processedYData){var e=this.processedXData;var g=this.processedYData;var h=g.length;this.pointArrayMap&&(c=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y"));for(b=0;b=this.xAxis.min&&0!==k){this.compareValue=k;break}}}};g(b,"afterGetExtremes",function(){if(this.modifyValue){var a=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)];this.dataMin=G(a);this.dataMax=D(a)}});t.prototype.setCompare=function(a,b){this.isXAxis||(this.series.forEach(function(b){b.setCompare(a)}),E(b,!0)&&this.chart.redraw())};h.prototype.tooltipFormatter=function(a){a=a.replace("{point.change}",(0