UNPKG

highcharts

Version:
105 lines (103 loc) 255 kB
/* Highcharts JS v7.1.2 (2019-06-03) (c) 2011-2018 Torstein Honsi License: www.highcharts.com/license */ (function(P,K){"object"===typeof module&&module.exports?(K["default"]=K,module.exports=P.document?K(P):K):"function"===typeof define&&define.amd?define("highcharts/highmaps",function(){return K(P)}):(P.Highcharts&&P.Highcharts.error(16,!0),P.Highcharts=K(P))})("undefined"!==typeof window?window:this,function(P){function K(a,B,E,D){a.hasOwnProperty(B)||(a[B]=D.apply(null,E))}var I={};K(I,"parts/Globals.js",[],function(){var a="undefined"===typeof P?"undefined"!==typeof window?window:{}:P,B=a.document, E=a.navigator&&a.navigator.userAgent||"",D=B&&B.createElementNS&&!!B.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,h=/(edge|msie|trident)/i.test(E)&&!a.opera,d=-1!==E.indexOf("Firefox"),u=-1!==E.indexOf("Chrome"),v=d&&4>parseInt(E.split("Firefox/")[1],10);return{product:"Highcharts",version:"7.1.2",deg2rad:2*Math.PI/360,doc:B,hasBidiBug:v,hasTouch:B&&"undefined"!==typeof B.documentElement.ontouchstart,isMS:h,isWebKit:-1!==E.indexOf("AppleWebKit"),isFirefox:d,isChrome:u,isSafari:!u&& -1!==E.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(E),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:D,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}});K(I,"parts/Utilities.js",[I["parts/Globals.js"]],function(a){a.timers=[];var B=a.charts,E=a.doc,D=a.win;a.error=function(h,d,u){var v=a.isNumber(h)?"Highcharts error #"+h+": www.highcharts.com/errors/"+h:h,t=function(){if(d)throw Error(v); D.console&&console.log(v)};u?a.fireEvent(u,"displayError",{code:h,message:v},t):t()};a.Fx=function(a,d,u){this.options=d;this.elem=a;this.prop=u};a.Fx.prototype={dSetter:function(){var a=this.paths[0],d=this.paths[1],u=[],v=this.now,t=a.length,r;if(1===v)u=this.toD;else if(t===d.length&&1>v)for(;t--;)r=parseFloat(a[t]),u[t]=isNaN(r)?d[t]:v*parseFloat(d[t]-r)+r;else u=d;this.elem.attr("d",u,null,!0)},update:function(){var a=this.elem,d=this.prop,u=this.now,v=this.options.step;if(this[d+"Setter"])this[d+ "Setter"]();else a.attr?a.element&&a.attr(d,u,null,!0):a.style[d]=u+this.unit;v&&v.call(a,u,this)},run:function(h,d,u){var v=this,t=v.options,r=function(a){return r.stopped?!1:v.step(a)},n=D.requestAnimationFrame||function(a){setTimeout(a,13)},k=function(){for(var l=0;l<a.timers.length;l++)a.timers[l]()||a.timers.splice(l--,1);a.timers.length&&n(k)};h!==d||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=h,this.end=d,this.unit=u,this.now=this.start,this.pos=0,r.elem=this.elem, r.prop=this.prop,r()&&1===a.timers.push(r)&&n(k)):(delete t.curAnim[this.prop],t.complete&&0===Object.keys(t.curAnim).length&&t.complete.call(this.elem))},step:function(h){var d=+new Date,u,v=this.options,t=this.elem,r=v.complete,n=v.duration,k=v.curAnim;t.attr&&!t.element?h=!1:h||d>=n+this.startTime?(this.now=this.end,this.pos=1,this.update(),u=k[this.prop]=!0,a.objectEach(k,function(a){!0!==a&&(u=!1)}),u&&r&&r.call(t),h=!1):(this.pos=v.easing((d-this.startTime)/n),this.now=this.start+(this.end- this.start)*this.pos,this.update(),h=!0);return h},initPath:function(h,d,u){function v(a){var e,c;for(b=a.length;b--;)e="M"===a[b]||"L"===a[b],c=/[a-zA-Z]/.test(a[b+3]),e&&c&&a.splice(b+1,0,a[b+1],a[b+2],a[b+1],a[b+2])}function t(a,g){for(;a.length<c;){a[0]=g[c-a.length];var q=a.slice(0,e);[].splice.apply(a,[0,0].concat(q));p&&(q=a.slice(a.length-e),[].splice.apply(a,[a.length,0].concat(q)),b--)}a[0]="M"}function r(a,b){for(var q=(c-a.length)/e;0<q&&q--;)g=a.slice().splice(a.length/H-e,e*H),g[0]= b[c-e-q*e],f&&(g[e-6]=g[e-2],g[e-5]=g[e-1]),[].splice.apply(a,[a.length/H,0].concat(g)),p&&q--}d=d||"";var n,k=h.startX,l=h.endX,f=-1<d.indexOf("C"),e=f?7:3,c,g,b;d=d.split(" ");u=u.slice();var p=h.isArea,H=p?2:1,w;f&&(v(d),v(u));if(k&&l){for(b=0;b<k.length;b++)if(k[b]===l[0]){n=b;break}else if(k[0]===l[l.length-k.length+b]){n=b;w=!0;break}else if(k[k.length-1]===l[l.length-k.length+b]){n=k.length-b;break}"undefined"===typeof n&&(d=[])}d.length&&a.isNumber(n)&&(c=u.length+n*H*e,w?(t(d,u),r(u,d)): (t(u,d),r(d,u)));return[d,u]},fillSetter:function(){a.Fx.prototype.strokeSetter.apply(this,arguments)},strokeSetter:function(){this.elem.attr(this.prop,a.color(this.start).tweenTo(a.color(this.end),this.pos),null,!0)}};a.merge=function(){var h,d=arguments,u,v={},t=function(h,n){"object"!==typeof h&&(h={});a.objectEach(n,function(k,l){!a.isObject(k,!0)||a.isClass(k)||a.isDOMElement(k)?h[l]=n[l]:h[l]=t(h[l]||{},k)});return h};!0===d[0]&&(v=d[1],d=Array.prototype.slice.call(d,2));u=d.length;for(h=0;h< u;h++)v=t(v,d[h]);return v};a.pInt=function(a,d){return parseInt(a,d||10)};a.isString=function(a){return"string"===typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a};a.isObject=function(h,d){return!!h&&"object"===typeof h&&(!d||!a.isArray(h))};a.isDOMElement=function(h){return a.isObject(h)&&"number"===typeof h.nodeType};a.isClass=function(h){var d=h&&h.constructor;return!(!a.isObject(h,!0)||a.isDOMElement(h)||!d||!d.name|| "Object"===d.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a};a.erase=function(a,d){for(var h=a.length;h--;)if(a[h]===d){a.splice(h,1);break}};a.defined=function(a){return"undefined"!==typeof a&&null!==a};a.attr=function(h,d,u){var v;a.isString(d)?a.defined(u)?h.setAttribute(d,u):h&&h.getAttribute&&((v=h.getAttribute(d))||"class"!==d||(v=h.getAttribute(d+"Name"))):a.defined(d)&&a.isObject(d)&&a.objectEach(d,function(a,d){h.setAttribute(d,a)});return v}; a.splat=function(h){return a.isArray(h)?h:[h]};a.syncTimeout=function(a,d,u){if(d)return setTimeout(a,d,u);a.call(0,u)};a.clearTimeout=function(h){a.defined(h)&&clearTimeout(h)};a.extend=function(a,d){var h;a||(a={});for(h in d)a[h]=d[h];return a};a.pick=function(){var a=arguments,d,u,v=a.length;for(d=0;d<v;d++)if(u=a[d],"undefined"!==typeof u&&null!==u)return u};a.css=function(h,d){a.isMS&&!a.svg&&d&&"undefined"!==typeof d.opacity&&(d.filter="alpha(opacity\x3d"+100*d.opacity+")");a.extend(h.style, d)};a.createElement=function(h,d,u,v,t){h=E.createElement(h);var r=a.css;d&&a.extend(h,d);t&&r(h,{padding:"0",border:"none",margin:"0"});u&&r(h,u);v&&v.appendChild(h);return h};a.extendClass=function(h,d){var u=function(){};u.prototype=new h;a.extend(u.prototype,d);return u};a.pad=function(a,d,u){return Array((d||2)+1-String(a).replace("-","").length).join(u||"0")+a};a.relativeLength=function(a,d,u){return/%$/.test(a)?d*parseFloat(a)/100+(u||0):parseFloat(a)};a.wrap=function(a,d,u){var h=a[d];a[d]= function(){var a=Array.prototype.slice.call(arguments),d=arguments,n=this;n.proceed=function(){h.apply(n,arguments.length?arguments:d)};a.unshift(h);a=u.apply(this,a);n.proceed=null;return a}};a.datePropsToTimestamps=function(h){a.objectEach(h,function(d,u){a.isObject(d)&&"function"===typeof d.getTime?h[u]=d.getTime():(a.isObject(d)||a.isArray(d))&&a.datePropsToTimestamps(d)})};a.formatSingle=function(h,d,u){var v=/\.([0-9])/,t=a.defaultOptions.lang;/f$/.test(h)?(u=(u=h.match(v))?u[1]:-1,null!==d&& (d=a.numberFormat(d,u,t.decimalPoint,-1<h.indexOf(",")?t.thousandsSep:""))):d=(u||a.time).dateFormat(h,d);return d};a.format=function(h,d,u){for(var v="{",t=!1,r,n,k,l,f=[],e;h;){v=h.indexOf(v);if(-1===v)break;r=h.slice(0,v);if(t){r=r.split(":");n=r.shift().split(".");l=n.length;e=d;for(k=0;k<l;k++)e&&(e=e[n[k]]);r.length&&(e=a.formatSingle(r.join(":"),e,u));f.push(e)}else f.push(r);h=h.slice(v+1);v=(t=!t)?"}":"{"}f.push(h);return f.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/ Math.LN10))};a.normalizeTickInterval=function(h,d,u,v,t){var r,n=h;u=a.pick(u,1);r=h/u;d||(d=t?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===v&&(1===u?d=d.filter(function(a){return 0===a%1}):.1>=u&&(d=[1/u])));for(v=0;v<d.length&&!(n=d[v],t&&n*u>=h||!t&&r<=(d[v]+(d[v+1]||d[v]))/2);v++);return n=a.correctFloat(n*u,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,d){var h=a.length,v,t;for(t=0;t<h;t++)a[t].safeI=t;a.sort(function(a,n){v=d(a,n);return 0===v?a.safeI-n.safeI:v});for(t= 0;t<h;t++)delete a[t].safeI};a.arrayMin=function(a){for(var d=a.length,h=a[0];d--;)a[d]<h&&(h=a[d]);return h};a.arrayMax=function(a){for(var d=a.length,h=a[0];d--;)a[d]>h&&(h=a[d]);return h};a.destroyObjectProperties=function(h,d){a.objectEach(h,function(a,v){a&&a!==d&&a.destroy&&a.destroy();delete h[v]})};a.discardElement=function(h){var d=a.garbageBin;d||(d=a.createElement("div"));h&&d.appendChild(h);d.innerHTML=""};a.correctFloat=function(a,d){return parseFloat(a.toPrecision(d||14))};a.setAnimation= function(h,d){d.renderer.globalAnimation=a.pick(h,d.options.chart.animation,!0)};a.animObject=function(h){return a.isObject(h)?a.merge(h):{duration:h?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(h,d,u,v){h=+h||0;d=+d;var t=a.defaultOptions.lang,r=(h.toString().split(".")[1]||"").split("e")[0].length,n,k,l=h.toString().split("e");-1===d?d=Math.min(r,20):a.isNumber(d)?d&&l[1]&&0>l[1]&&(n=d+ +l[1],0<=n?(l[0]= (+l[0]).toExponential(n).split("e")[0],d=n):(l[0]=l[0].split(".")[0]||0,h=20>d?(l[0]*Math.pow(10,l[1])).toFixed(d):0,l[1]=0)):d=2;k=(Math.abs(l[1]?l[0]:h)+Math.pow(10,-Math.max(d,r)-1)).toFixed(d);r=String(a.pInt(k));n=3<r.length?r.length%3:0;u=a.pick(u,t.decimalPoint);v=a.pick(v,t.thousandsSep);h=(0>h?"-":"")+(n?r.substr(0,n)+v:"");h+=r.substr(n).replace(/(\d{3})(?=\d)/g,"$1"+v);d&&(h+=u+k.slice(-d));l[1]&&0!==+h&&(h+="e"+l[1]);return h};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI* a)-1)};a.getStyle=function(h,d,u){if("width"===d)return Math.max(0,Math.min(h.offsetWidth,h.scrollWidth,h.getBoundingClientRect&&"none"===a.getStyle(h,"transform",!1)?Math.floor(h.getBoundingClientRect().width):Infinity)-a.getStyle(h,"padding-left")-a.getStyle(h,"padding-right"));if("height"===d)return Math.max(0,Math.min(h.offsetHeight,h.scrollHeight)-a.getStyle(h,"padding-top")-a.getStyle(h,"padding-bottom"));D.getComputedStyle||a.error(27,!0);if(h=D.getComputedStyle(h,void 0))h=h.getPropertyValue(d), a.pick(u,"opacity"!==d)&&(h=a.pInt(h));return h};a.inArray=function(a,d,u){return d.indexOf(a,u)};a.find=Array.prototype.find?function(a,d){return a.find(d)}:function(a,d){var h,v=a.length;for(h=0;h<v;h++)if(d(a[h],h))return a[h]};a.keys=Object.keys;a.offset=function(a){var d=E.documentElement;a=a.parentElement||a.parentNode?a.getBoundingClientRect():{top:0,left:0};return{top:a.top+(D.pageYOffset||d.scrollTop)-(d.clientTop||0),left:a.left+(D.pageXOffset||d.scrollLeft)-(d.clientLeft||0)}};a.stop=function(h, d){for(var u=a.timers.length;u--;)a.timers[u].elem!==h||d&&d!==a.timers[u].prop||(a.timers[u].stopped=!0)};a.objectEach=function(a,d,u){for(var h in a)a.hasOwnProperty(h)&&d.call(u||a[h],a[h],h,a)};a.objectEach({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(h,d){a[d]=function(a){return Array.prototype[h].apply(a,[].slice.call(arguments,1))}});a.addEvent=function(h,d,u,v){void 0===v&&(v={});var t,r=h.addEventListener||a.addEventListenerPolyfill;t="function"===typeof h&& h.prototype?h.prototype.protoEvents=h.prototype.protoEvents||{}:h.hcEvents=h.hcEvents||{};a.Point&&h instanceof a.Point&&h.series&&h.series.chart&&(h.series.chart.runTrackerClick=!0);r&&r.call(h,d,u,!1);t[d]||(t[d]=[]);t[d].push({fn:u,order:"number"===typeof v.order?v.order:Infinity});t[d].sort(function(a,k){return a.order-k.order});return function(){a.removeEvent(h,d,u)}};a.removeEvent=function(h,d,u){function v(n,k){var l=h.removeEventListener||a.removeEventListenerPolyfill;l&&l.call(h,n,k,!1)} function t(n){var k,l;h.nodeName&&(d?(k={},k[d]=!0):k=n,a.objectEach(k,function(a,e){if(n[e])for(l=n[e].length;l--;)v(e,n[e][l].fn)}))}var r;["protoEvents","hcEvents"].forEach(function(a){var k=h[a];k&&(d?(r=k[d]||[],u?(k[d]=r.filter(function(a){return u!==a.fn}),v(d,u)):(t(k),k[d]=[])):(t(k),h[a]={}))})};a.fireEvent=function(h,d,u,v){var t,r;u=u||{};E.createEvent&&(h.dispatchEvent||h.fireEvent)?(t=E.createEvent("Events"),t.initEvent(d,!0,!0),a.extend(t,u),h.dispatchEvent?h.dispatchEvent(t):h.fireEvent(d, t)):(u.target||a.extend(u,{preventDefault:function(){u.defaultPrevented=!0},target:h,type:d}),function(a,k){void 0===a&&(a=[]);void 0===k&&(k=[]);var l=0,f=0,e=a.length+k.length;for(r=0;r<e;r++)!1===(a[l]?k[f]?a[l].order<=k[f].order?a[l++]:k[f++]:a[l++]:k[f++]).fn.call(h,u)&&u.preventDefault()}(h.protoEvents&&h.protoEvents[d],h.hcEvents&&h.hcEvents[d]));v&&!u.defaultPrevented&&v.call(h,u)};a.animate=function(h,d,u){var v,t="",r,n,k;a.isObject(u)||(k=arguments,u={duration:k[2],easing:k[3],complete:k[4]}); a.isNumber(u.duration)||(u.duration=400);u.easing="function"===typeof u.easing?u.easing:Math[u.easing]||Math.easeInOutSine;u.curAnim=a.merge(d);a.objectEach(d,function(k,f){a.stop(h,f);n=new a.Fx(h,u,f);r=null;"d"===f?(n.paths=n.initPath(h,h.d,d.d),n.toD=d.d,v=0,r=1):h.attr?v=h.attr(f):(v=parseFloat(a.getStyle(h,f))||0,"opacity"!==f&&(t="px"));r||(r=k);r&&r.match&&r.match("px")&&(r=r.replace(/px/g,""));n.run(v,r,t)})};a.seriesType=function(h,d,u,v,t){var r=a.getOptions(),n=a.seriesTypes;r.plotOptions[h]= a.merge(r.plotOptions[d],u);n[h]=a.extendClass(n[d]||function(){},v);n[h].prototype.type=h;t&&(n[h].prototype.pointClass=a.extendClass(a.Point,t));return n[h]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),d=0;return function(){return"highcharts-"+a+"-"+d++}}();a.isFunction=function(a){return"function"===typeof a};D.jQuery&&(D.jQuery.fn.highcharts=function(){var h=[].slice.call(arguments);if(this[0])return h[0]?(new (a[a.isString(h[0])?h.shift():"Chart"])(this[0],h[0],h[1]), this):B[a.attr(this[0],"data-highcharts-chart")]})});K(I,"parts/Color.js",[I["parts/Globals.js"]],function(a){var B=a.isNumber,E=a.merge,D=a.pInt;a.Color=function(h){if(!(this instanceof a.Color))return new a.Color(h);this.init(h)};a.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(a){return[D(a[1]),D(a[2]),D(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse:function(a){return[D(a[1]),D(a[2]),D(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(h){var d,u,v,t;if((this.input=h=this.names[h&&h.toLowerCase?h.toLowerCase():""]||h)&&h.stops)this.stops=h.stops.map(function(d){return new a.Color(d[1])});else if(h&&h.charAt&&"#"===h.charAt()&&(d=h.length,h=parseInt(h.substr(1),16),7===d?u=[(h&16711680)>>16,(h&65280)>>8,h&255,1]:4===d&&(u=[(h&3840)>>4|(h&3840)>>8,(h&240)>>4|h&240,(h&15)<<4|h&15,1])),!u)for(v=this.parsers.length;v--&&!u;)t= this.parsers[v],(d=t.regex.exec(h))&&(u=t.parse(d));this.rgba=u||[]},get:function(a){var d=this.input,h=this.rgba,v;this.stops?(v=E(d),v.stops=[].concat(v.stops),this.stops.forEach(function(d,r){v.stops[r]=[v.stops[r][0],d.get(a)]})):v=h&&B(h[0])?"rgb"===a||!a&&1===h[3]?"rgb("+h[0]+","+h[1]+","+h[2]+")":"a"===a?h[3]:"rgba("+h.join(",")+")":d;return v},brighten:function(a){var d,h=this.rgba;if(this.stops)this.stops.forEach(function(d){d.brighten(a)});else if(B(a)&&0!==a)for(d=0;3>d;d++)h[d]+=D(255* a),0>h[d]&&(h[d]=0),255<h[d]&&(h[d]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,d){var h=this.rgba,v=a.rgba;v.length&&h&&h.length?(a=1!==v[3]||1!==h[3],d=(a?"rgba(":"rgb(")+Math.round(v[0]+(h[0]-v[0])*(1-d))+","+Math.round(v[1]+(h[1]-v[1])*(1-d))+","+Math.round(v[2]+(h[2]-v[2])*(1-d))+(a?","+(v[3]+(h[3]-v[3])*(1-d)):"")+")"):d=a.input||"none";return d}};a.color=function(h){return new a.Color(h)}});K(I,"parts/Time.js",[I["parts/Globals.js"]],function(a){var B= a.defined,E=a.extend,D=a.merge,h=a.pick,d=a.timeUnits,u=a.win;a.Time=function(a){this.update(a,!1)};a.Time.prototype={defaultOptions:{},update:function(a){var d=h(a&&a.useUTC,!0),r=this;this.options=a=D(!0,this.options||{},a);this.Date=a.Date||u.Date||Date;this.timezoneOffset=(this.useUTC=d)&&a.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(d&&!a.getTimezoneOffset&&!a.timezone))||this.timezoneOffset?(this.get=function(a,k){var l=k.getTime(),f=l-r.getTimezoneOffset(k); k.setTime(f);a=k["getUTC"+a]();k.setTime(l);return a},this.set=function(a,k,l){var f;if("Milliseconds"===a||"Seconds"===a||"Minutes"===a&&0===k.getTimezoneOffset()%60)k["set"+a](l);else f=r.getTimezoneOffset(k),f=k.getTime()-f,k.setTime(f),k["setUTC"+a](l),a=r.getTimezoneOffset(k),f=k.getTime()+a,k.setTime(f)}):d?(this.get=function(a,k){return k["getUTC"+a]()},this.set=function(a,k,l){return k["setUTC"+a](l)}):(this.get=function(a,k){return k["get"+a]()},this.set=function(a,k,l){return k["set"+a](l)})}, makeTime:function(d,t,r,n,k,l){var f,e,c;this.useUTC?(f=this.Date.UTC.apply(0,arguments),e=this.getTimezoneOffset(f),f+=e,c=this.getTimezoneOffset(f),e!==c?f+=c-e:e-36E5!==this.getTimezoneOffset(f-36E5)||a.isSafari||(f-=36E5)):f=(new this.Date(d,t,h(r,1),h(n,0),h(k,0),h(l,0))).getTime();return f},timezoneOffsetFunction:function(){var d=this,h=this.options,r=u.moment;if(!this.useUTC)return function(a){return 6E4*(new Date(a)).getTimezoneOffset()};if(h.timezone){if(r)return function(a){return 6E4*-r.tz(a, h.timezone).utcOffset()};a.error(25)}return this.useUTC&&h.getTimezoneOffset?function(a){return 6E4*h.getTimezoneOffset(a)}:function(){return 6E4*(d.timezoneOffset||0)}},dateFormat:function(d,h,r){if(!a.defined(h)||isNaN(h))return a.defaultOptions.lang.invalidDate||"";d=a.pick(d,"%Y-%m-%d %H:%M:%S");var n=this,k=new this.Date(h),l=this.get("Hours",k),f=this.get("Day",k),e=this.get("Date",k),c=this.get("Month",k),g=this.get("FullYear",k),b=a.defaultOptions.lang,p=b.weekdays,H=b.shortWeekdays,w=a.pad, k=a.extend({a:H?H[f]:p[f].substr(0,3),A:p[f],d:w(e),e:w(e,2," "),w:f,b:b.shortMonths[c],B:b.months[c],m:w(c+1),o:c+1,y:g.toString().substr(2,2),Y:g,H:w(l),k:l,I:w(l%12||12),l:l%12||12,M:w(n.get("Minutes",k)),p:12>l?"AM":"PM",P:12>l?"am":"pm",S:w(k.getSeconds()),L:w(Math.floor(h%1E3),3)},a.dateFormats);a.objectEach(k,function(a,b){for(;-1!==d.indexOf("%"+b);)d=d.replace("%"+b,"function"===typeof a?a.call(n,h):a)});return r?d.substr(0,1).toUpperCase()+d.substr(1):d},resolveDTLFormat:function(d){return a.isObject(d, !0)?d:(d=a.splat(d),{main:d[0],from:d[1],to:d[2]})},getTimeTicks:function(a,t,r,n){var k=this,l=[],f,e={},c;f=new k.Date(t);var g=a.unitRange,b=a.count||1,p;n=h(n,1);if(B(t)){k.set("Milliseconds",f,g>=d.second?0:b*Math.floor(k.get("Milliseconds",f)/b));g>=d.second&&k.set("Seconds",f,g>=d.minute?0:b*Math.floor(k.get("Seconds",f)/b));g>=d.minute&&k.set("Minutes",f,g>=d.hour?0:b*Math.floor(k.get("Minutes",f)/b));g>=d.hour&&k.set("Hours",f,g>=d.day?0:b*Math.floor(k.get("Hours",f)/b));g>=d.day&&k.set("Date", f,g>=d.month?1:Math.max(1,b*Math.floor(k.get("Date",f)/b)));g>=d.month&&(k.set("Month",f,g>=d.year?0:b*Math.floor(k.get("Month",f)/b)),c=k.get("FullYear",f));g>=d.year&&k.set("FullYear",f,c-c%b);g===d.week&&(c=k.get("Day",f),k.set("Date",f,k.get("Date",f)-c+n+(c<n?-7:0)));c=k.get("FullYear",f);n=k.get("Month",f);var H=k.get("Date",f),w=k.get("Hours",f);t=f.getTime();k.variableTimezone&&(p=r-t>4*d.month||k.getTimezoneOffset(t)!==k.getTimezoneOffset(r));t=f.getTime();for(f=1;t<r;)l.push(t),t=g===d.year? k.makeTime(c+f*b,0):g===d.month?k.makeTime(c,n+f*b):!p||g!==d.day&&g!==d.week?p&&g===d.hour&&1<b?k.makeTime(c,n,H,w+f*b):t+g*b:k.makeTime(c,n,H+f*b*(g===d.day?1:7)),f++;l.push(t);g<=d.hour&&1E4>l.length&&l.forEach(function(a){0===a%18E5&&"000000000"===k.dateFormat("%H%M%S%L",a)&&(e[a]="day")})}l.info=E(a,{higherRanks:e,totalRange:g*b});return l}}});K(I,"parts/Options.js",[I["parts/Globals.js"]],function(a){var B=a.color,E=a.merge;a.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:a.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},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:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e', pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e',backgroundColor:B("#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"}}; a.setOptions=function(B){a.defaultOptions=E(!0,a.defaultOptions,B);a.time.update(E(a.defaultOptions.global,a.defaultOptions.time),!1);return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;a.time=new a.Time(E(a.defaultOptions.global,a.defaultOptions.time));a.dateFormat=function(B,h,d){return a.time.dateFormat(B,h,d)};""});K(I,"parts/SvgRenderer.js",[I["parts/Globals.js"]],function(a){var B,E,D=a.addEvent,h=a.animate,d=a.attr,u=a.charts, v=a.color,t=a.css,r=a.createElement,n=a.defined,k=a.deg2rad,l=a.destroyObjectProperties,f=a.doc,e=a.extend,c=a.erase,g=a.hasTouch,b=a.isArray,p=a.isFirefox,H=a.isMS,w=a.isObject,F=a.isString,y=a.isWebKit,q=a.merge,C=a.noop,A=a.objectEach,G=a.pick,L=a.pInt,m=a.removeEvent,z=a.splat,M=a.stop,N=a.svg,J=a.SVG_NS,R=a.symbolSizes,O=a.win;B=a.SVGElement=function(){return this};e(B.prototype,{opacity:1,SVG_NS:J,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "), init:function(x,b){this.element="span"===b?r(b):f.createElementNS(this.SVG_NS,b);this.renderer=x;a.fireEvent(this,"afterInit")},animate:function(x,b,e){var m=a.animObject(G(b,this.renderer.globalAnimation,!0));G(f.hidden,f.msHidden,f.webkitHidden,!1)&&(m.duration=0);0!==m.duration?(e&&(m.complete=e),h(this,x,m)):(this.attr(x,void 0,e),a.objectEach(x,function(a,x){m.step&&m.step.call(this,a,{prop:x,pos:1})},this));return this},complexColor:function(x,e,m){var c=this.renderer,g,z,f,p,w,k,T,J,d,l,C, y=[],N;a.fireEvent(this.renderer,"complexColor",{args:arguments},function(){x.radialGradient?z="radialGradient":x.linearGradient&&(z="linearGradient");z&&(f=x[z],w=c.gradients,T=x.stops,l=m.radialReference,b(f)&&(x[z]=f={x1:f[0],y1:f[1],x2:f[2],y2:f[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===z&&l&&!n(f.gradientUnits)&&(p=f,f=q(f,c.getRadialAttr(l,p),{gradientUnits:"userSpaceOnUse"})),A(f,function(a,x){"id"!==x&&y.push(x,a)}),A(T,function(a){y.push(a)}),y=y.join(","),w[y]?C=w[y].attr("id"): (f.id=C=a.uniqueKey(),w[y]=k=c.createElement(z).attr(f).add(c.defs),k.radAttr=p,k.stops=[],T.forEach(function(x){0===x[1].indexOf("rgba")?(g=a.color(x[1]),J=g.get("rgb"),d=g.get("a")):(J=x[1],d=1);x=c.createElement("stop").attr({offset:x[0],"stop-color":J,"stop-opacity":d}).add(k);k.stops.push(x)})),N="url("+c.url+"#"+C+")",m.setAttribute(e,N),m.gradient=y,x.toString=function(){return N})})},applyTextOutline:function(x){var b=this.element,e,m,c;-1!==x.indexOf("contrast")&&(x=x.replace(/contrast/g, this.renderer.getContrast(b.style.fill)));x=x.split(" ");e=x[x.length-1];(m=x[0])&&"none"!==m&&a.svg&&(this.fakeTS=!0,x=[].slice.call(b.getElementsByTagName("tspan")),this.ySetter=this.xSetter,m=m.replace(/(^[\d\.]+)(.*?)$/g,function(a,x,b){return 2*x+b}),this.removeTextOutline(x),c=b.firstChild,x.forEach(function(a,x){0===x&&(a.setAttribute("x",b.getAttribute("x")),x=b.getAttribute("y"),a.setAttribute("y",x||0),null===x&&b.setAttribute("y",0));a=a.cloneNode(1);d(a,{"class":"highcharts-text-outline", fill:e,stroke:e,"stroke-width":m,"stroke-linejoin":"round"});b.insertBefore(a,c)}))},removeTextOutline:function(a){for(var x=a.length,b;x--;)b=a[x],"highcharts-text-outline"===b.getAttribute("class")&&c(a,this.element.removeChild(b))},symbolCustomAttribs:"x y width height r start end innerR anchorX anchorY rounded".split(" "),attr:function(x,b,m,e){var c,g=this.element,z,q=this,f,p,w=this.symbolCustomAttribs;"string"===typeof x&&void 0!==b&&(c=x,x={},x[c]=b);"string"===typeof x?q=(this[x+"Getter"]|| this._defaultGetter).call(this,x,g):(A(x,function(b,m){f=!1;e||M(this,m);this.symbolName&&-1!==a.inArray(m,w)&&(z||(this.symbolAttr(x),z=!0),f=!0);!this.rotation||"x"!==m&&"y"!==m||(this.doTransform=!0);f||(p=this[m+"Setter"]||this._defaultSetter,p.call(this,b,m,g),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(m)&&this.updateShadows(m,b,p))},this),this.afterSetters());m&&m.call(this);return q},afterSetters:function(){this.doTransform&&(this.updateTransform(), this.doTransform=!1)},updateShadows:function(a,b,m){for(var x=this.shadows,e=x.length;e--;)m.call(x[e],"height"===a?Math.max(b-(x[e].cutHeight||0),0):"d"===a?this.d:b,a,x[e])},addClass:function(a,b){var x=this.attr("class")||"";b||(a=(a||"").split(/ /g).reduce(function(a,b){-1===x.indexOf(b)&&a.push(b);return a},x?[x]:[]).join(" "));a!==x&&this.attr("class",a);return this},hasClass:function(a){return-1!==(this.attr("class")||"").split(" ").indexOf(a)},removeClass:function(a){return this.attr("class", (this.attr("class")||"").replace(a,""))},symbolAttr:function(a){var x=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(b){x[b]=G(a[b],x[b])});x.attr({d:x.renderer.symbols[x.symbolName](x.x,x.y,x.width,x.height,x)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,b){var x;b=b||a.strokeWidth||0;x=Math.round(b)%2/2;a.x=Math.floor(a.x||this.x||0)+x;a.y=Math.floor(a.y||this.y||0)+x;a.width= Math.floor((a.width||this.width||0)-2*x);a.height=Math.floor((a.height||this.height||0)-2*x);n(a.strokeWidth)&&(a.strokeWidth=b);return a},css:function(a){var b=this.styles,x={},m=this.element,c,g="",z,q=!b,f=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);b&&A(a,function(a,m){a!==b[m]&&(x[m]=a,q=!0)});q&&(b&&(a=e(b,x)),a&&(null===a.width||"auto"===a.width?delete this.textWidth:"text"===m.nodeName.toLowerCase()&&a.width&&(c=this.textWidth=L(a.width))),this.styles=a,c&&!N&&this.renderer.forExport&& delete a.width,m.namespaceURI===this.SVG_NS?(z=function(a,b){return"-"+b.toLowerCase()},A(a,function(a,b){-1===f.indexOf(b)&&(g+=b.replace(/([A-Z])/g,z)+":"+a+";")}),g&&d(m,"style",g)):t(m,a),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},getStyle:function(a){return O.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){if(!this.renderer.styledMode)return this["stroke-width"]|| 0;var a=this.getStyle("stroke-width"),b;a.indexOf("px")===a.length-2?a=L(a):(b=f.createElementNS(J,"rect"),d(b,{width:a,"stroke-width":0}),this.element.parentNode.appendChild(b),a=b.getBBox().width,b.parentNode.removeChild(b));return a},on:function(a,b){var m=this,x=m.element;g&&"click"===a?(x.ontouchstart=function(a){m.touchEventFired=Date.now();a.preventDefault();b.call(x,a)},x.onclick=function(a){(-1===O.navigator.userAgent.indexOf("Android")||1100<Date.now()-(m.touchEventFired||0))&&b.call(x, a)}):x["on"+a]=b;return this},setRadialReference:function(a){var b=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;b&&b.radAttr&&b.animate(this.renderer.getRadialAttr(a,b.radAttr));return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,m=this.scaleX,e=this.scaleY,c=this.inverted,g=this.rotation,z= this.matrix,q=this.element;c&&(a+=this.width,b+=this.height);a=["translate("+a+","+b+")"];n(z)&&a.push("matrix("+z.join(",")+")");c?a.push("rotate(90) scale(-1,1)"):g&&a.push("rotate("+g+" "+G(this.rotationOriginX,q.getAttribute("x"),0)+" "+G(this.rotationOriginY,q.getAttribute("y")||0)+")");(n(m)||n(e))&&a.push("scale("+G(m,1)+" "+G(e,1)+")");a.length&&q.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,m){var e, x,g,z,q={};x=this.renderer;g=x.alignedObjects;var f,p;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!m||F(m))this.alignTo=e=m||"renderer",c(g,this),g.push(this),m=null}else a=this.alignOptions,b=this.alignByTranslate,e=this.alignTo;m=G(m,x[e],x);e=a.align;x=a.verticalAlign;g=(m.x||0)+(a.x||0);z=(m.y||0)+(a.y||0);"right"===e?f=1:"center"===e&&(f=2);f&&(g+=(m.width-(a.width||0))/f);q[b?"translateX":"x"]=Math.round(g);"bottom"===x?p=1:"middle"===x&&(p=2);p&&(z+=(m.height-(a.height||0))/p);q[b? "translateY":"y"]=Math.round(z);this[this.placed?"animate":"attr"](q);this.placed=!0;this.alignAttr=q;return this},getBBox:function(a,b){var m,x=this.renderer,c,g=this.element,z=this.styles,q,f=this.textStr,p,A=x.cache,w=x.cacheKeys,J=g.namespaceURI===this.SVG_NS,d;b=G(b,this.rotation);c=b*k;q=x.styledMode?g&&B.prototype.getStyle.call(g,"font-size"):z&&z.fontSize;n(f)&&(d=f.toString(),-1===d.indexOf("\x3c")&&(d=d.replace(/[0-9]/g,"0")),d+=["",b||0,q,this.textWidth,z&&z.textOverflow].join());d&&!a&& (m=A[d]);if(!m){if(J||x.forExport){try{(p=this.fakeTS&&function(a){[].forEach.call(g.querySelectorAll(".highcharts-text-outline"),function(b){b.style.display=a})})&&p("none"),m=g.getBBox?e({},g.getBBox()):{width:g.offsetWidth,height:g.offsetHeight},p&&p("")}catch(Z){""}if(!m||0>m.width)m={width:0,height:0}}else m=this.htmlGetBBox();x.isSVG&&(a=m.width,x=m.height,J&&(m.height=x={"11px,17":14,"13px,20":16}[z&&z.fontSize+","+Math.round(x)]||x),b&&(m.width=Math.abs(x*Math.sin(c))+Math.abs(a*Math.cos(c)), m.height=Math.abs(x*Math.cos(c))+Math.abs(a*Math.sin(c))));if(d&&0<m.height){for(;250<w.length;)delete A[w.shift()];A[d]||w.push(d);A[d]=m}}return m},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.attr({y:-9999})}})},add:function(a){var b=this.renderer,m=this.element,e;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted; void 0!==this.textStr&&b.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)e=this.zIndexSetter();e||(a?a.element:b.box).appendChild(m);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},m=a.renderer,e=m.isSVG&&"SPAN"===b.nodeName&&a.parentGroup,g=b.ownerSVGElement,z=a.clipPath;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;M(a);z&&g&&([].forEach.call(g.querySelectorAll("[clip-path],[CLIP-PATH]"), function(a){-1<a.getAttribute("clip-path").indexOf(z.element.id)&&a.removeAttribute("clip-path")}),a.clipPath=z.destroy());if(a.stops){for(g=0;g<a.stops.length;g++)a.stops[g]=a.stops[g].destroy();a.stops=null}a.safeRemoveChild(b);for(m.styledMode||a.destroyShadows();e&&e.div&&0===e.div.childNodes.length;)b=e.parentGroup,a.safeRemoveChild(e.div),delete e.div,e=b;a.alignTo&&c(m.alignedObjects,a);A(a,function(b,m){delete a[m]})},shadow:function(a,b,m){var e=[],x,c,g=this.element,z,q,f,p;if(!a)this.destroyShadows(); else if(!this.shadows){q=G(a.width,3);f=(a.opacity||.15)/q;p=this.parentInverted?"(-1,-1)":"("+G(a.offsetX,1)+", "+G(a.offsetY,1)+")";for(x=1;x<=q;x++)c=g.cloneNode(0),z=2*q+1-2*x,d(c,{stroke:a.color||"#000000","stroke-opacity":f*x,"stroke-width":z,transform:"translate"+p,fill:"none"}),c.setAttribute("class",(c.getAttribute("class")||"")+" highcharts-shadow"),m&&(d(c,"height",Math.max(d(c,"height")-z,0)),c.cutHeight=z),b?b.element.appendChild(c):g.parentNode&&g.parentNode.insertBefore(c,g),e.push(c); this.shadows=e}return this},destroyShadows:function(){(this.shadows||[]).forEach(function(a){this.safeRemoveChild(a)},this);this.shadows=void 0},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=G(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,b,m){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a= "M 0 0");this[b]!==a&&(m.setAttribute(b,a),this[b]=a)},dashstyleSetter:function(a){var b,m=this["stroke-width"];"inherit"===m&&(m=1);if(a=a&&a.toLowerCase()){a=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(b=a.length;b--;)a[b]=L(a[b])*m;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray", a)}},alignSetter:function(a){var b={left:"start",center:"middle",right:"end"};b[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",b[a]))},opacitySetter:function(a,b,m){this[b]=a;m.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=f.createElementNS(this.SVG_NS,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(f.createTextNode(String(G(a,"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"\x3c").replace(/&gt;/g, "\x3e")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))},setTextPath:function(b,m){var e=this.element,c={textAnchor:"text-anchor"},g,x=!1,z,f=this.textPathWrapper,p=!f;m=q(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},m);g=m.attributes;if(b&&m&&m.enabled){this.options&&this.options.padding&&(g.dx=-this.options.padding);f||(this.textPathWrapper=f=this.renderer.createElement("textPath"), x=!0);z=f.element;(m=b.element.getAttribute("id"))||b.element.setAttribute("id",m=a.uniqueKey());if(p)for(b=e.getElementsByTagName("tspan");b.length;)b[0].setAttribute("y",0),z.appendChild(b[0]);x&&f.add({element:this.text?this.text.element:e});z.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+m);n(g.dy)&&(z.parentNode.setAttribute("dy",g.dy),delete g.dy);n(g.dx)&&(z.parentNode.setAttribute("dx",g.dx),delete g.dx);a.objectEach(g,function(a,b){z.setAttribute(c[b]||b,a)}); e.removeAttribute("transform");this.removeTextOutline.call(f,[].slice.call(e.getElementsByTagName("tspan")));this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=this.updateTransform=C}else f&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(e,b));return this},destroyTextPath:function(a,b){var m;b.element.setAttribute("id","");for(m=this.textPathWrapper.element.childNodes;m.length;)a.firstChild.appendChild(m[0]);a.firstChild.removeChild(this.textPathWrapper.element); delete b.textPathWrapper},fillSetter:function(a,b,m){"string"===typeof a?m.setAttribute(b,a):a&&this.complexColor(a,b,m)},visibilitySetter:function(a,b,m){"inherit"===a?m.removeAttribute(b):this[b]!==a&&m.setAttribute(b,a);this[b]=a},zIndexSetter:function(a,b){var m=this.renderer,e=this.parentGroup,c=(e||m).element||m.box,g,z=this.element,x=!1,q,m=c===m.box;g=this.added;var f;n(a)?(z.setAttribute("data-z-index",a),a=+a,this[b]===a&&(g=!1)):n(this[b])&&z.removeAttribute("data-z-index");this[b]=a;if(g){(a= this.zIndex)&&e&&(e.handleZ=!0);b=c.childNodes;for(f=b.length-1;0<=f&&!x;f--)if(e=b[f],g=e.getAttribute("data-z-index"),q=!n(g),e!==z)if(0>a&&q&&!m&&!f)c.insertBefore(z,b[f]),x=!0;else if(L(g)<=a||q&&(!n(a)||0<=a))c.insertBefore(z,b[f+1]||null),x=!0;x||(c.insertBefore(z,b[m?3:0]||null),x=!0)}return x},_defaultSetter:function(a,b,m){m.setAttribute(b,a)}});B.prototype.yGetter=B.prototype.xGetter;B.prototype.translateXSetter=B.prototype.translateYSetter=B.prototype.rotationSetter=B.prototype.verticalAlignSetter= B.prototype.rotationOriginXSetter=B.prototype.rotationOriginYSetter=B.prototype.scaleXSetter=B.prototype.scaleYSetter=B.prototype.matrixSetter=function(a,b){this[b]=a;this.doTransform=!0};B.prototype["stroke-widthSetter"]=B.prototype.strokeSetter=function(a,b,m){this[b]=a;this.stroke&&this["stroke-width"]?(B.prototype.fillSetter.call(this,this.stroke,"stroke",m),m.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===b&&0===a&&this.hasStroke&&(m.removeAttribute("stroke"), this.hasStroke=!1)};E=a.SVGRenderer=function(){this.init.apply(this,arguments)};e(E.prototype,{Element:B,SVG_NS:J,init:function(a,b,m,e,c,g,z){var q;q=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});z||q.css(this.getStyle(e));e=q.element;a.appendChild(e);d(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&d(e,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=e;this.boxWrapper=q;this.alignedObjects=[];this.url=(p||y)&&f.getElementsByTagName("base").length?O.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(f.createTextNode("Created with Highcharts 7.1.2"));this.defs=this.createElement("defs").add();this.allowHTML=g;this.forExport=c;this.styledMode=z;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(b,m,!1);var x;p&&a.getBoundingClientRect&&(b=function(){t(a,{left:0,top:0});x=a.getBoundingClientRect();t(a,{left:Math.ceil(x.left)-x.left+"px",top:Math.ceil(x.top)-x.top+ "px"})},b(),this.unSubPixelFix=D(O,"resize",b))},definition:function(a){function b(a,e){var c;z(a).forEach(function(a){var g=m.createElement(a.tagName),z={};A(a,function(a,b){"tagName"!==b&&"children"!==b&&"textContent"!==b&&(z[b]=a)});g.attr(z);g.add(e||m.defs);a.textContent&&g.element.appendChild(f.createTextNode(a.textContent));b(a.children||[],g);c=g});return c}var m=this;return b(a)},getStyle:function(a){return this.style=e({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();l(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:C,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,m,e,c,g,z){var q=this,x=a.rotation,p,A=e?1:0,w=(m||e).length,k=w,d=[],J=function(a){b.firstChild&&b.removeChild(b.firstChild);a&&b.appendChild(f.createTextNode(a))},l=function(g,f){f=f||g;if(void 0===d[f])if(b.getSubStringLength)try{d[f]=c+b.getSubStringLength(0,e?f+1:f)}catch(aa){""}else q.getSpanWidth&&(J(z(m||e,g)),d[f]=c+q.getSpanWidth(a,b));return d[f]},C,n;a.rotation=0;C=l(b.textContent.length);if(n=c+C>g){for(;A<=w;)k= Math.ceil((A+w)/2),e&&(p=z(e,k)),C=l(k,p&&p.length-1),A===w?A=w+1:C>g?w=k-1:A=k;0===w?J(""):m&&w===m.length-1||J(p||z(m||e,k))}e&&e.splice(0,k);a.actualWidth=C;a.rotation=x;return n},escapes:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;","'":"\x26#39;",'"':"\x26quot;"},buildText:function(a){var b=a.element,m=this,e=m.forExport,c=G(a.textStr,"").toString(),g=-1!==c.indexOf("\x3c"),z=b.childNodes,q,p=d(b,"x"),x=a.styles,w=a.textWidth,k=x&&x.lineHeight,l=x&&x.textOutline,C=x&&"ellipsis"===x.textOverflow, n=x&&"nowrap"===x.whiteSpace,y=x&&x.fontSize,r,M,h=z.length,x=w&&!a.added&&this.box,H=function(a){var e;m.styledMode||(e=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:y||m.style.fontSize||12);return k?L(k):m.fontMetrics(e,a.getAttribute("style")?a:b).h},F=function(a,b){A(m.escapes,function(m,e){b&&-1!==b.indexOf(m)||(a=a.toString().replace(new RegExp(m,"g"),e))});return a},R=function(a,b){var m;m=a.indexOf("\x3c");a=a.substring(m,a.indexOf("\x3e")-m);m=a.indexOf(b+"\x3d");if(-1!==m&&(m=m+ b.length+1,b=a.charAt(m),'"'===b||"'"===b))return a=a.substring(m+1),a.substring(0,a.indexOf(b))};r=[c,C,n,k,l,y,w].join();if(r!==a.textCache){for(a.textCache=r;h--;)b.removeChild(z[h]);g||l||C||w||-1!==c.indexOf(" ")?(x&&x.appendChild(b),g?(c=m.styledMode?c.replace(/<(b|strong)>/g,'\x3cspan class\x3d"highcharts-strong"\x3e').replace(/<(i|em)>/g,'\x3cspan class\x3d"highcharts-emphasized"\x3e'):c.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g,'\x3cspan style\x3d"font-style:italic"\x3e'), c=c.replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g)):c=[c],c=c.filter(function(a){return""!==a}),c.forEach(function(c,g){var z,x=0,A=0;c=c.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");z=c.split("|||");z.forEach(function(c){if(""!==c||1===z.length){var k={},l=f.createElementNS(m.SVG_NS,"tspan"),r,h;(r=R(c,"class"))&&d(l,"class",r);if(r=R(c,"style"))r=r.replace(/(;| |^)color([ :])/,"$1fill$2"),d(l,"style", r);(h=R(c,"href"))&&!e&&(d(l,"onclick",'location.href\x3d"'+h+'"'),d(l,"class","highcharts-anchor"),m.styledMode||t(l,{cursor:"pointer"}));c=F(c.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==c){l.appendChild(f.createTextNode(c));x?k.dx=0:g&&null!==p&&(k.x=p);d(l,k);b.appendChild(l);!x&&M&&(!N&&e&&t(l,{display:"block"}),d(l,"dy",H(l)));if(w){var G=c.replace(/([^\^])-/g,"$1- ").split(" "),k=!n&&(1<z.length||g||1<G.length);h=0;var L=H(l);if(C)q=m.truncate(a,l,c,void 0,0,Math.max(0,w-parseInt(y|| 12,10)),function(a,b){return a.substring(0,b)+"\u2026"});else if(k)for(;G.length;)G.length&&!n&&0<h&&(l=f.createElementNS(J,"tspan"),d(l,{dy:L,x:p}),r&&d(l,"style",r),l.appendChild(f.createTextNode(G.join(" ").replace(/- /g,"-"))),b.appendChild(l)),m.truncate(a,l,null,G,0===h?A:0,w,function(a,b){return G.slice(0,b).join(" ").replace(/- /g,"-")}),A=a.actualWidth,h++}x++}}});M=M||b.childNodes.length}),C&&q&&a.attr("title",F(a.textStr,["\x26lt;","\x26gt;"])),x&&x.removeChild(b),l&&a.applyTextOutline&& a.applyTextOutline(l)):b.appendChild(f.createTextNode(F(c)))}},getContrast:function(a){a=v(a).rgba;a[0]*=1;a[1]*=1.2;a[2]*=.5;return 459<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,b,m,c,g,z,f,p,w,A){var x=this.label(a,b,m,w,null,null,A,null,"button"),k=0,l=this.styledMode;x.attr(q({padding:8,r:2},g));if(!l){var d,J,C,n;g=q({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},g);d=g.style;delete g.style;z=q(g,{fill:"#e6e6e6"},z); J=z.style;delete z.style;f=q(g,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},f);C=f.style;delete f.style;p=q(g,{style:{color:"#cccccc"}},p);n=p.style;delete p.style}D(x.element,H?"mouseover":"mouseenter",function(){3!==k&&x.setState(1)});D(x.element,H?"mouseout":"mouseleave",function(){3!==k&&x.setState(k)});x.setState=function(a){1!==a&&(x.state=k=a);x.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a|| 0]);l||x.attr([g,z,f,p][a||0]).css([d,J,C,n][a||0])};l||x.attr(g).css(e({cursor:"default"},d));return x.on("click",function(a){3!==k&&c.call(x,a)})},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+b%2/2);return a},path:function(a){var m=this.styledMode?{}:{fill:"none"};b(a)?m.d=a:w(a)&&e(m,a);return this.createElement("path").attr(m)},circle:function(a,b,m){a=w(a)?a:void 0===a?{}:{x:a,y:b,r:m};b=this.createElement("circle");b.xSetter= b.ySetter=function(a,b,m){m.setAttribute("c"+b,a)};return b.attr(a)},arc:function(a,b,m,e,c,g){w(a)?(e=a,b=e.y,m=e.r,a=e.x):e={innerR:e,start:c,end:g};a=this.symbol("arc",a,b,m,m,e);a.r=m;return a},rect:function(a,b,m,e,c,g){c=w(a)?a.r:c;var z=this.createElement("rect");a=w(a)?a:void 0===a?{}:{x:a,y:b,width:Math.max(m,0),height:Math.max(e,0)};this.styledMode||(void 0!==g&&(a.strokeWidth=g,a=z.crisp(a)),a.fill="none");c&&(a.r=c);z.rSetter=function(a,b,m){z.r=a;d(m,{rx:a,ry:a})};z.rGetter=function(){return z.r}; return z.attr(a)},setSize:function(a,b,m){var e=this.alignedObjects,c=e.length;this.width=a;this.height=b;for(this.boxWrapper.animate({width:a,height:b},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:G(m,!0)?void 0:0});c--;)e[c].align()},g:function(a){var b=this.createElement("g");return a?b.attr({"class":"highcharts-"+a}):b},image:function(a,b,m,c,g,z){var f={preserveAspectRatio:"none"},q,p=function(a,b){a.setAttributeNS?a.setAttributeNS("http://www.w3.org/1999/xlink", "href",b):a.setAttribute("hc-svg-href",b)},x=function(b){p(q.element,a);z.call(q,b)};1<arguments.length&&e(f,{x:b,y:m,width:c,height:g});q=this.createElement("image").attr(f);z?(p(q.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw\x3d\x3d"),f=new O.Image,D(f,"load",x),f.src=a,f.complete&&x({})):p(q.element,a);return q},symbol:function(a,b,m,c,g,z){var q=this,p,x=/^url\((.*?)\)$/,w=x.test(a),A=!w&&(this.symbols[a]?a:"circle"),k=A&&this.symbols[A],l=n(b)&&k&&k.call(this.symbols, Math.round(b),Math.round(m),c,g,z),d,J;k?(p=this.path(l),q.styledMode||p.attr("fill","none"),e(p,{symbolName:A,x:b,y:m,width:c,height:g}),z&&e(p,z)):w&&(d=a.match(x)[1],p=this.image(d),p.imgwidth=G(R[d]&&R[d].width,z&&z.width),p.imgheight=G(R[d]&&R[d].height,z&&z.height),J=function(){p.attr({width:p.width,height:p.height})},["width","height"].forEach(function(a){p[a+"Setter"]=function(a,b){var m={},e=this["img"+b],c="width"===b?"translateX":"translateY";this[b]=a;n(e)&&(z&&"within"===z.backgroundSize&& this.width&&this.height&&(e=Math.round(e*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(b,e),this.alignByTranslate||(m[c]=((this[b]||0)-e)/2,this.attr(m)))}}),n(b)&&p.attr({x:b,y:m}),p.isImg=!0,n(p.imgwidth)&&n(p.imgheight)?J():(p.attr({width:0,height:0}),r("img",{onload:function(){var a=u[q.chartIndex];0===this.width&&(t(this,{position:"absolute",top:"-999em"}),f.body.appendChild(this));R[d]={width:this.width,height:this.height};p.imgwidth= this.width;p.imgheight=this.height;p.element&&J();this.parentNode&&this.parentNode.removeChild(this);q.imgCount--;if(!q.imgCount&&a&&a.onload)a.onload()},src:d}),this.imgCount++));return p},symbols:{circle:function(a,b,m,e){return this.arc(a+m/2,b+e/2,m/2,e/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},square:function(a,b,m,e){return["M",a,b,"L",a+m,b,a+m,b+e,a,b+e,"Z"]},triangle:function(a,b,m,e){return["M",a+m/2,b,"L",a+m,b+e,a,b+e,"Z"]},"triangle-down":function(a,b,m,e){return["M",a,b,"L",a+m, b,a+m/2,b+e,"Z"]},diamond:function(a,b,m,e){return["M",a+m/2,b,"L",a+m,b+e/2,a+m/2,b+e,a,b+e/2,"Z"]},arc:function(a,b,m,e,c){var g=c.start,z=c.r||m,q=c.r||e||m,f=c.end-.001;m=c.innerR;e=G(c.open,.001>Math.abs(c.end-c.start-2*Math.PI));var p=Math.cos(g),x=Math.sin(g),A=Math.cos(f),f=Math.sin(f),g=.001>c.end-g-Math.PI?0:1;c=["M",a+z*p,b+q*x,"A",z,q,0,g,G(c.clockwise,1),a+z*A,b+q*f];n(m)&&c.push(e?"M":"L",a+m*A,b+m*f,"A",m,m,0,g,0,a+m*p,b+m*x);c.push(e?"":"Z");return c},callout:function(a,b,m,e,c){var g= Math.min(c&&c.r||0,m,e),z=g+6,f=c&&c.anchorX;c=c&&c.anchorY;var q;q=["M",a+g,b,"L",a+m-g,b,"C",a+m,b,a+m,b,a+m,b+g,"L",a+m,b+e-g,"C",a+m,b+e,a+m,b+e,a+m-g,b+e,"L",a+g,b+e,"C",a,b+e,a,b+e,a,b+e-g,"L",a,b+g,"C",a,b,a,b,a+g,b];f&&f>m?c>b+z&&c<b+e-z?q.splice(13,3,"L",a+m,c-6,a+m+6,c,a+m,c+6,a+m,b+e-g):q.splice(13,3,"L",a+m,e/2,f,c,a+m,e/2,a+m,b+e-g):f&&0>f?c>b+z&&c<b+e-z?q.splice(33,3,"L",a,c+6,a-6,c,a,c-6,a,b+g):q.splice(33,3,"L",a,e/2,f,c,a,e/2,a,b+g):c&&c>e&&f>a+z&&f<a+m-z?q.splice(23,3,"L",f+6,b+ e,f,b+e+6,f-6,b+e,a+g,b+e):c&&0>c&&f>a+z&&f<a+m-z&&q.splice(3,3,"L",f-6,b,f,b-6,f+6,b,m-g,b);return q}},clipRect:function(b,m,e,c){var g=a.uniqueKey()+"-",z=this.createElement("clipPath").attr({id:g}).add(this.defs);b=this.rect(b,m,e,c,0).add(z);b.id=g;b.clipPath=z;b.count=0;return b},text:function(a,b,m,e){var c={};if(e&&(this.allowHTML||!this.forExport)