highcharts
Version:
JavaScript charting framework
105 lines (103 loc) • 242 kB
JavaScript
/*
Highcharts JS v6.2.0 (2018-10-17)
(c) 2017 Lars Cabrera, Torstein Honsi, Jon Arild Nygard & Oystein Moseng
License: www.highcharts.com/license
*/
(function(T,I){"object"===typeof module&&module.exports?module.exports=T.document?I(T):I:"function"===typeof define&&define.amd?define(function(){return I(T)}):T.Highcharts=I(T)})("undefined"!==typeof window?window:this,function(T){var I=function(){var a="undefined"===typeof T?window:T,z=a.document,C=a.navigator&&a.navigator.userAgent||"",B=z&&z.createElementNS&&!!z.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,r=/(edge|msie|trident)/i.test(C)&&!a.opera,l=-1!==C.indexOf("Firefox"),
n=-1!==C.indexOf("Chrome"),t=l&&4>parseInt(C.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highcharts",version:"6.2.0",deg2rad:2*Math.PI/360,doc:z,hasBidiBug:t,hasTouch:z&&void 0!==z.documentElement.ontouchstart,isMS:r,isWebKit:-1!==C.indexOf("AppleWebKit"),isFirefox:l,isChrome:n,isSafari:!n&&-1!==C.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(C),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:B,win:a,marginNames:["plotTop",
"marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){a.timers=[];var z=a.charts,C=a.doc,B=a.win;a.error=function(r,l){r=a.isNumber(r)?"Highcharts error #"+r+": www.highcharts.com/errors/"+r:r;if(l)throw Error(r);B.console&&console.log(r)};a.Fx=function(a,l,n){this.options=l;this.elem=a;this.prop=n};a.Fx.prototype={dSetter:function(){var a=this.paths[0],l=this.paths[1],n=[],t=this.now,u=a.length,m;if(1===t)n=this.toD;else if(u===l.length&&1>t)for(;u--;)m=parseFloat(a[u]),
n[u]=isNaN(m)?l[u]:t*parseFloat(l[u]-m)+m;else n=l;this.elem.attr("d",n,null,!0)},update:function(){var a=this.elem,l=this.prop,n=this.now,t=this.options.step;if(this[l+"Setter"])this[l+"Setter"]();else a.attr?a.element&&a.attr(l,n,null,!0):a.style[l]=n+this.unit;t&&t.call(a,n,this)},run:function(r,l,n){var t=this,u=t.options,m=function(a){return m.stopped?!1:t.step(a)},q=B.requestAnimationFrame||function(a){setTimeout(a,13)},d=function(){for(var f=0;f<a.timers.length;f++)a.timers[f]()||a.timers.splice(f--,
1);a.timers.length&&q(d)};r!==l||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=r,this.end=l,this.unit=n,this.now=this.start,this.pos=0,m.elem=this.elem,m.prop=this.prop,m()&&1===a.timers.push(m)&&q(d)):(delete u.curAnim[this.prop],u.complete&&0===a.keys(u.curAnim).length&&u.complete.call(this.elem))},step:function(r){var l=+new Date,n,t=this.options,u=this.elem,m=t.complete,q=t.duration,d=t.curAnim;u.attr&&!u.element?r=!1:r||l>=q+this.startTime?(this.now=this.end,this.pos=
1,this.update(),n=d[this.prop]=!0,a.objectEach(d,function(a){!0!==a&&(n=!1)}),n&&m&&m.call(u),r=!1):(this.pos=t.easing((l-this.startTime)/q),this.now=this.start+(this.end-this.start)*this.pos,this.update(),r=!0);return r},initPath:function(r,l,n){function t(b){var a,c;for(h=b.length;h--;)a="M"===b[h]||"L"===b[h],c=/[a-zA-Z]/.test(b[h+3]),a&&c&&b.splice(h+1,0,b[h+1],b[h+2],b[h+1],b[h+2])}function u(b,a){for(;b.length<c;){b[0]=a[c-b.length];var f=b.slice(0,g);[].splice.apply(b,[0,0].concat(f));e&&(f=
b.slice(b.length-g),[].splice.apply(b,[b.length,0].concat(f)),h--)}b[0]="M"}function m(a,h){for(var f=(c-a.length)/g;0<f&&f--;)b=a.slice().splice(a.length/v-g,g*v),b[0]=h[c-g-f*g],k&&(b[g-6]=b[g-2],b[g-5]=b[g-1]),[].splice.apply(a,[a.length/v,0].concat(b)),e&&f--}l=l||"";var q,d=r.startX,f=r.endX,k=-1<l.indexOf("C"),g=k?7:3,c,b,h;l=l.split(" ");n=n.slice();var e=r.isArea,v=e?2:1,w;k&&(t(l),t(n));if(d&&f){for(h=0;h<d.length;h++)if(d[h]===f[0]){q=h;break}else if(d[0]===f[f.length-d.length+h]){q=h;w=
!0;break}void 0===q&&(l=[])}l.length&&a.isNumber(q)&&(c=n.length+q*v*g,w?(u(l,n),m(n,l)):(u(n,l),m(l,n)));return[l,n]},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 r,l=arguments,n,t={},u=function(m,q){"object"!==typeof m&&(m={});a.objectEach(q,function(d,f){!a.isObject(d,!0)||a.isClass(d)||a.isDOMElement(d)?m[f]=q[f]:m[f]=u(m[f]||{},
d)});return m};!0===l[0]&&(t=l[1],l=Array.prototype.slice.call(l,2));n=l.length;for(r=0;r<n;r++)t=u(t,l[r]);return t};a.pInt=function(a,l){return parseInt(a,l||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(r,l){return!!r&&"object"===typeof r&&(!l||!a.isArray(r))};a.isDOMElement=function(r){return a.isObject(r)&&"number"===typeof r.nodeType};a.isClass=function(r){var l=
r&&r.constructor;return!(!a.isObject(r,!0)||a.isDOMElement(r)||!l||!l.name||"Object"===l.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a};a.erase=function(a,l){for(var n=a.length;n--;)if(a[n]===l){a.splice(n,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(r,l,n){var t;a.isString(l)?a.defined(n)?r.setAttribute(l,n):r&&r.getAttribute&&((t=r.getAttribute(l))||"class"!==l||(t=r.getAttribute(l+"Name"))):a.defined(l)&&a.isObject(l)&&
a.objectEach(l,function(a,m){r.setAttribute(m,a)});return t};a.splat=function(r){return a.isArray(r)?r:[r]};a.syncTimeout=function(a,l,n){if(l)return setTimeout(a,l,n);a.call(0,n)};a.clearTimeout=function(r){a.defined(r)&&clearTimeout(r)};a.extend=function(a,l){var n;a||(a={});for(n in l)a[n]=l[n];return a};a.pick=function(){var a=arguments,l,n,t=a.length;for(l=0;l<t;l++)if(n=a[l],void 0!==n&&null!==n)return n};a.css=function(r,l){a.isMS&&!a.svg&&l&&void 0!==l.opacity&&(l.filter="alpha(opacity\x3d"+
100*l.opacity+")");a.extend(r.style,l)};a.createElement=function(r,l,n,t,u){r=C.createElement(r);var m=a.css;l&&a.extend(r,l);u&&m(r,{padding:0,border:"none",margin:0});n&&m(r,n);t&&t.appendChild(r);return r};a.extendClass=function(r,l){var n=function(){};n.prototype=new r;a.extend(n.prototype,l);return n};a.pad=function(a,l,n){return Array((l||2)+1-String(a).replace("-","").length).join(n||0)+a};a.relativeLength=function(a,l,n){return/%$/.test(a)?l*parseFloat(a)/100+(n||0):parseFloat(a)};a.wrap=
function(a,l,n){var t=a[l];a[l]=function(){var a=Array.prototype.slice.call(arguments),m=arguments,q=this;q.proceed=function(){t.apply(q,arguments.length?arguments:m)};a.unshift(t);a=n.apply(this,a);q.proceed=null;return a}};a.datePropsToTimestamps=function(r){a.objectEach(r,function(l,n){a.isObject(l)&&"function"===typeof l.getTime?r[n]=l.getTime():(a.isObject(l)||a.isArray(l))&&a.datePropsToTimestamps(l)})};a.formatSingle=function(r,l,n){var t=/\.([0-9])/,u=a.defaultOptions.lang;/f$/.test(r)?(n=
(n=r.match(t))?n[1]:-1,null!==l&&(l=a.numberFormat(l,n,u.decimalPoint,-1<r.indexOf(",")?u.thousandsSep:""))):l=(n||a.time).dateFormat(r,l);return l};a.format=function(r,l,n){for(var t="{",u=!1,m,q,d,f,k=[],g;r;){t=r.indexOf(t);if(-1===t)break;m=r.slice(0,t);if(u){m=m.split(":");q=m.shift().split(".");f=q.length;g=l;for(d=0;d<f;d++)g&&(g=g[q[d]]);m.length&&(g=a.formatSingle(m.join(":"),g,n));k.push(g)}else k.push(m);r=r.slice(t+1);t=(u=!u)?"}":"{"}k.push(r);return k.join("")};a.getMagnitude=function(a){return Math.pow(10,
Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(r,l,n,t,u){var m,q=r;n=a.pick(n,1);m=r/n;l||(l=u?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===t&&(1===n?l=a.grep(l,function(a){return 0===a%1}):.1>=n&&(l=[1/n])));for(t=0;t<l.length&&!(q=l[t],u&&q*n>=r||!u&&m<=(l[t]+(l[t+1]||l[t]))/2);t++);return q=a.correctFloat(q*n,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,l){var n=a.length,t,u;for(u=0;u<n;u++)a[u].safeI=u;a.sort(function(a,q){t=l(a,q);return 0===t?
a.safeI-q.safeI:t});for(u=0;u<n;u++)delete a[u].safeI};a.arrayMin=function(a){for(var l=a.length,n=a[0];l--;)a[l]<n&&(n=a[l]);return n};a.arrayMax=function(a){for(var l=a.length,n=a[0];l--;)a[l]>n&&(n=a[l]);return n};a.destroyObjectProperties=function(r,l){a.objectEach(r,function(a,t){a&&a!==l&&a.destroy&&a.destroy();delete r[t]})};a.discardElement=function(r){var l=a.garbageBin;l||(l=a.createElement("div"));r&&l.appendChild(r);l.innerHTML=""};a.correctFloat=function(a,l){return parseFloat(a.toPrecision(l||
14))};a.setAnimation=function(r,l){l.renderer.globalAnimation=a.pick(r,l.options.chart.animation,!0)};a.animObject=function(r){return a.isObject(r)?a.merge(r):{duration:r?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(r,l,n,t){r=+r||0;l=+l;var u=a.defaultOptions.lang,m=(r.toString().split(".")[1]||"").split("e")[0].length,q,d,f=r.toString().split("e");-1===l?l=Math.min(m,20):a.isNumber(l)?l&&f[1]&&0>f[1]&&
(q=l+ +f[1],0<=q?(f[0]=(+f[0]).toExponential(q).split("e")[0],l=q):(f[0]=f[0].split(".")[0]||0,r=20>l?(f[0]*Math.pow(10,f[1])).toFixed(l):0,f[1]=0)):l=2;d=(Math.abs(f[1]?f[0]:r)+Math.pow(10,-Math.max(l,m)-1)).toFixed(l);m=String(a.pInt(d));q=3<m.length?m.length%3:0;n=a.pick(n,u.decimalPoint);t=a.pick(t,u.thousandsSep);r=(0>r?"-":"")+(q?m.substr(0,q)+t:"");r+=m.substr(q).replace(/(\d{3})(?=\d)/g,"$1"+t);l&&(r+=n+d.slice(-l));f[1]&&0!==+r&&(r+="e"+f[1]);return r};Math.easeInOutSine=function(a){return-.5*
(Math.cos(Math.PI*a)-1)};a.getStyle=function(r,l,n){if("width"===l)return Math.max(0,Math.min(r.offsetWidth,r.scrollWidth)-a.getStyle(r,"padding-left")-a.getStyle(r,"padding-right"));if("height"===l)return Math.max(0,Math.min(r.offsetHeight,r.scrollHeight)-a.getStyle(r,"padding-top")-a.getStyle(r,"padding-bottom"));B.getComputedStyle||a.error(27,!0);if(r=B.getComputedStyle(r,void 0))r=r.getPropertyValue(l),a.pick(n,"opacity"!==l)&&(r=a.pInt(r));return r};a.inArray=function(r,l,n){return(a.indexOfPolyfill||
Array.prototype.indexOf).call(l,r,n)};a.grep=function(r,l){return(a.filterPolyfill||Array.prototype.filter).call(r,l)};a.find=Array.prototype.find?function(a,l){return a.find(l)}:function(a,l){var n,t=a.length;for(n=0;n<t;n++)if(l(a[n],n))return a[n]};a.some=function(r,l,n){return(a.somePolyfill||Array.prototype.some).call(r,l,n)};a.map=function(a,l){for(var n=[],t=0,u=a.length;t<u;t++)n[t]=l.call(a[t],a[t],t,a);return n};a.keys=function(r){return(a.keysPolyfill||Object.keys).call(void 0,r)};a.reduce=
function(r,l,n){return(a.reducePolyfill||Array.prototype.reduce).apply(r,2<arguments.length?[l,n]:[l])};a.offset=function(a){var l=C.documentElement;a=a.parentElement||a.parentNode?a.getBoundingClientRect():{top:0,left:0};return{top:a.top+(B.pageYOffset||l.scrollTop)-(l.clientTop||0),left:a.left+(B.pageXOffset||l.scrollLeft)-(l.clientLeft||0)}};a.stop=function(r,l){for(var n=a.timers.length;n--;)a.timers[n].elem!==r||l&&l!==a.timers[n].prop||(a.timers[n].stopped=!0)};a.each=function(r,l,n){return(a.forEachPolyfill||
Array.prototype.forEach).call(r,l,n)};a.objectEach=function(a,l,n){for(var t in a)a.hasOwnProperty(t)&&l.call(n||a[t],a[t],t,a)};a.addEvent=function(r,l,n,t){var u,m=r.addEventListener||a.addEventListenerPolyfill;u="function"===typeof r&&r.prototype?r.prototype.protoEvents=r.prototype.protoEvents||{}:r.hcEvents=r.hcEvents||{};a.Point&&r instanceof a.Point&&r.series&&r.series.chart&&(r.series.chart.runTrackerClick=!0);m&&m.call(r,l,n,!1);u[l]||(u[l]=[]);u[l].push(n);t&&a.isNumber(t.order)&&(n.order=
t.order,u[l].sort(function(a,d){return a.order-d.order}));return function(){a.removeEvent(r,l,n)}};a.removeEvent=function(r,l,n){function t(d,f){var k=r.removeEventListener||a.removeEventListenerPolyfill;k&&k.call(r,d,f,!1)}function u(d){var f,k;r.nodeName&&(l?(f={},f[l]=!0):f=d,a.objectEach(f,function(a,c){if(d[c])for(k=d[c].length;k--;)t(c,d[c][k])}))}var m,q;a.each(["protoEvents","hcEvents"],function(d){var f=r[d];f&&(l?(m=f[l]||[],n?(q=a.inArray(n,m),-1<q&&(m.splice(q,1),f[l]=m),t(l,n)):(u(f),
f[l]=[])):(u(f),r[d]={}))})};a.fireEvent=function(r,l,n,t){var u,m,q,d,f;n=n||{};C.createEvent&&(r.dispatchEvent||r.fireEvent)?(u=C.createEvent("Events"),u.initEvent(l,!0,!0),a.extend(u,n),r.dispatchEvent?r.dispatchEvent(u):r.fireEvent(l,u)):a.each(["protoEvents","hcEvents"],function(k){if(r[k])for(m=r[k][l]||[],q=m.length,n.target||a.extend(n,{preventDefault:function(){n.defaultPrevented=!0},target:r,type:l}),d=0;d<q;d++)(f=m[d])&&!1===f.call(r,n)&&n.preventDefault()});t&&!n.defaultPrevented&&t.call(r,
n)};a.animate=function(r,l,n){var t,u="",m,q,d;a.isObject(n)||(d=arguments,n={duration:d[2],easing:d[3],complete:d[4]});a.isNumber(n.duration)||(n.duration=400);n.easing="function"===typeof n.easing?n.easing:Math[n.easing]||Math.easeInOutSine;n.curAnim=a.merge(l);a.objectEach(l,function(f,k){a.stop(r,k);q=new a.Fx(r,n,k);m=null;"d"===k?(q.paths=q.initPath(r,r.d,l.d),q.toD=l.d,t=0,m=1):r.attr?t=r.attr(k):(t=parseFloat(a.getStyle(r,k))||0,"opacity"!==k&&(u="px"));m||(m=f);m&&m.match&&m.match("px")&&
(m=m.replace(/px/g,""));q.run(t,m,u)})};a.seriesType=function(r,l,n,t,u){var m=a.getOptions(),q=a.seriesTypes;m.plotOptions[r]=a.merge(m.plotOptions[l],n);q[r]=a.extendClass(q[l]||function(){},t);q[r].prototype.type=r;u&&(q[r].prototype.pointClass=a.extendClass(a.Point,u));return q[r]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),l=0;return function(){return"highcharts-"+a+"-"+l++}}();B.jQuery&&(B.jQuery.fn.highcharts=function(){var r=[].slice.call(arguments);if(this[0])return r[0]?
(new (a[a.isString(r[0])?r.shift():"Chart"])(this[0],r[0],r[1]),this):z[a.attr(this[0],"data-highcharts-chart")]})})(I);(function(a){var z=a.each,C=a.isNumber,B=a.map,r=a.merge,l=a.pInt;a.Color=function(n){if(!(this instanceof a.Color))return new a.Color(n);this.init(n)};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[l(a[1]),l(a[2]),l(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[l(a[1]),l(a[2]),l(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(n){var l,u,m,q;if((this.input=n=this.names[n&&n.toLowerCase?n.toLowerCase():""]||n)&&n.stops)this.stops=B(n.stops,function(d){return new a.Color(d[1])});else if(n&&n.charAt&&"#"===n.charAt()&&(l=n.length,n=parseInt(n.substr(1),16),7===l?u=[(n&16711680)>>16,(n&65280)>>8,n&255,1]:4===l&&(u=[(n&3840)>>4|(n&3840)>>8,(n&240)>>4|n&240,(n&15)<<4|n&15,1])),!u)for(m=this.parsers.length;m--&&!u;)q=this.parsers[m],
(l=q.regex.exec(n))&&(u=q.parse(l));this.rgba=u||[]},get:function(a){var n=this.input,l=this.rgba,m;this.stops?(m=r(n),m.stops=[].concat(m.stops),z(this.stops,function(q,d){m.stops[d]=[m.stops[d][0],q.get(a)]})):m=l&&C(l[0])?"rgb"===a||!a&&1===l[3]?"rgb("+l[0]+","+l[1]+","+l[2]+")":"a"===a?l[3]:"rgba("+l.join(",")+")":n;return m},brighten:function(a){var n,u=this.rgba;if(this.stops)z(this.stops,function(m){m.brighten(a)});else if(C(a)&&0!==a)for(n=0;3>n;n++)u[n]+=l(255*a),0>u[n]&&(u[n]=0),255<u[n]&&
(u[n]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,l){var n=this.rgba,m=a.rgba;m.length&&n&&n.length?(a=1!==m[3]||1!==n[3],l=(a?"rgba(":"rgb(")+Math.round(m[0]+(n[0]-m[0])*(1-l))+","+Math.round(m[1]+(n[1]-m[1])*(1-l))+","+Math.round(m[2]+(n[2]-m[2])*(1-l))+(a?","+(m[3]+(n[3]-m[3])*(1-l)):"")+")"):l=a.input||"none";return l}};a.color=function(n){return new a.Color(n)}})(I);(function(a){var z,C,B=a.addEvent,r=a.animate,l=a.attr,n=a.charts,t=a.color,u=a.css,
m=a.createElement,q=a.defined,d=a.deg2rad,f=a.destroyObjectProperties,k=a.doc,g=a.each,c=a.extend,b=a.erase,h=a.grep,e=a.hasTouch,v=a.inArray,w=a.isArray,J=a.isFirefox,D=a.isMS,E=a.isObject,x=a.isString,G=a.isWebKit,M=a.merge,F=a.noop,H=a.objectEach,A=a.pick,y=a.pInt,K=a.removeEvent,p=a.splat,L=a.stop,O=a.svg,P=a.SVG_NS,Q=a.symbolSizes,R=a.win;z=a.SVGElement=function(){return this};c(z.prototype,{opacity:1,SVG_NS:P,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),
init:function(a,b){this.element="span"===b?m(b):k.createElementNS(this.SVG_NS,b);this.renderer=a},animate:function(b,p,c){p=a.animObject(A(p,this.renderer.globalAnimation,!0));0!==p.duration?(c&&(p.complete=c),r(this,b,p)):(this.attr(b,null,c),p.step&&p.step.call(this));return this},complexColor:function(b,p,c){var e=this.renderer,y,A,h,f,k,d,N,x,v,K,L,m=[],D;a.fireEvent(this.renderer,"complexColor",{args:arguments},function(){b.radialGradient?A="radialGradient":b.linearGradient&&(A="linearGradient");
A&&(h=b[A],k=e.gradients,N=b.stops,K=c.radialReference,w(h)&&(b[A]=h={x1:h[0],y1:h[1],x2:h[2],y2:h[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===A&&K&&!q(h.gradientUnits)&&(f=h,h=M(h,e.getRadialAttr(K,f),{gradientUnits:"userSpaceOnUse"})),H(h,function(a,b){"id"!==b&&m.push(b,a)}),H(N,function(a){m.push(a)}),m=m.join(","),k[m]?L=k[m].attr("id"):(h.id=L=a.uniqueKey(),k[m]=d=e.createElement(A).attr(h).add(e.defs),d.radAttr=f,d.stops=[],g(N,function(b){0===b[1].indexOf("rgba")?(y=a.color(b[1]),
x=y.get("rgb"),v=y.get("a")):(x=b[1],v=1);b=e.createElement("stop").attr({offset:b[0],"stop-color":x,"stop-opacity":v}).add(d);d.stops.push(b)})),D="url("+e.url+"#"+L+")",c.setAttribute(p,D),c.gradient=m,b.toString=function(){return D})})},applyTextOutline:function(p){var c=this.element,e,y,A,h,f;-1!==p.indexOf("contrast")&&(p=p.replace(/contrast/g,this.renderer.getContrast(c.style.fill)));p=p.split(" ");y=p[p.length-1];if((A=p[0])&&"none"!==A&&a.svg){this.fakeTS=!0;p=[].slice.call(c.getElementsByTagName("tspan"));
this.ySetter=this.xSetter;A=A.replace(/(^[\d\.]+)(.*?)$/g,function(a,b,p){return 2*b+p});for(f=p.length;f--;)e=p[f],"highcharts-text-outline"===e.getAttribute("class")&&b(p,c.removeChild(e));h=c.firstChild;g(p,function(a,b){0===b&&(a.setAttribute("x",c.getAttribute("x")),b=c.getAttribute("y"),a.setAttribute("y",b||0),null===b&&c.setAttribute("y",0));a=a.cloneNode(1);l(a,{"class":"highcharts-text-outline",fill:y,stroke:y,"stroke-width":A,"stroke-linejoin":"round"});c.insertBefore(a,h)})}},attr:function(a,
b,p,c){var e,A=this.element,y,g=this,h,f;"string"===typeof a&&void 0!==b&&(e=a,a={},a[e]=b);"string"===typeof a?g=(this[a+"Getter"]||this._defaultGetter).call(this,a,A):(H(a,function(b,p){h=!1;c||L(this,p);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(p)&&(y||(this.symbolAttr(a),y=!0),h=!0);!this.rotation||"x"!==p&&"y"!==p||(this.doTransform=!0);h||(f=this[p+"Setter"]||this._defaultSetter,f.call(this,b,p,A))},this),this.afterSetters());p&&p.call(this);return g},afterSetters:function(){this.doTransform&&
(this.updateTransform(),this.doTransform=!1)},addClass:function(a,b){var p=this.attr("class")||"";-1===p.indexOf(a)&&(b||(a=(p+(p?" ":"")+a).replace(" "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==v(a,(this.attr("class")||"").split(" "))},removeClass:function(a){return this.attr("class",(this.attr("class")||"").replace(a,""))},symbolAttr:function(a){var b=this;g("x y r start end width height innerR anchorX anchorY".split(" "),function(p){b[p]=A(a[p],b[p])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,
b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,b){var p;b=b||a.strokeWidth||0;p=Math.round(b)%2/2;a.x=Math.floor(a.x||this.x||0)+p;a.y=Math.floor(a.y||this.y||0)+p;a.width=Math.floor((a.width||this.width||0)-2*p);a.height=Math.floor((a.height||this.height||0)-2*p);q(a.strokeWidth)&&(a.strokeWidth=b);return a},css:function(a){var b=this.styles,p={},e=this.element,A,g="",h,f=!b,k=["textOutline","textOverflow",
"width"];a&&a.color&&(a.fill=a.color);b&&H(a,function(a,c){a!==b[c]&&(p[c]=a,f=!0)});f&&(b&&(a=c(b,p)),a&&(null===a.width||"auto"===a.width?delete this.textWidth:"text"===e.nodeName.toLowerCase()&&a.width&&(A=this.textWidth=y(a.width))),this.styles=a,A&&!O&&this.renderer.forExport&&delete a.width,e.namespaceURI===this.SVG_NS?(h=function(a,b){return"-"+b.toLowerCase()},H(a,function(a,b){-1===v(b,k)&&(g+=b.replace(/([A-Z])/g,h)+":"+a+";")}),g&&l(e,"style",g)):u(e,a),this.added&&("text"===this.element.nodeName&&
this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},getStyle:function(a){return R.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){var a=this.getStyle("stroke-width"),b;a.indexOf("px")===a.length-2?a=y(a):(b=k.createElementNS(P,"rect"),l(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 p=this,c=p.element;e&&"click"===
a?(c.ontouchstart=function(a){p.touchEventFired=Date.now();a.preventDefault();b.call(c,a)},c.onclick=function(a){(-1===R.navigator.userAgent.indexOf("Android")||1100<Date.now()-(p.touchEventFired||0))&&b.call(c,a)}):c["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,p=this.scaleX,c=this.scaleY,e=this.inverted,y=this.rotation,g=this.matrix,h=this.element;e&&(a+=this.width,b+=this.height);a=["translate("+a+","+b+")"];q(g)&&a.push("matrix("+g.join(",")+")");e?a.push("rotate(90) scale(-1,1)"):y&&a.push("rotate("+y+" "+A(this.rotationOriginX,h.getAttribute("x"),0)+" "+A(this.rotationOriginY,h.getAttribute("y")||0)+")");(q(p)||
q(c))&&a.push("scale("+A(p,1)+" "+A(c,1)+")");a.length&&h.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,p,c){var e,y,g,h,f={};y=this.renderer;g=y.alignedObjects;var k,d;if(a){if(this.alignOptions=a,this.alignByTranslate=p,!c||x(c))this.alignTo=e=c||"renderer",b(g,this),g.push(this),c=null}else a=this.alignOptions,p=this.alignByTranslate,e=this.alignTo;c=A(c,y[e],y);e=a.align;y=a.verticalAlign;g=(c.x||0)+(a.x||
0);h=(c.y||0)+(a.y||0);"right"===e?k=1:"center"===e&&(k=2);k&&(g+=(c.width-(a.width||0))/k);f[p?"translateX":"x"]=Math.round(g);"bottom"===y?d=1:"middle"===y&&(d=2);d&&(h+=(c.height-(a.height||0))/d);f[p?"translateY":"y"]=Math.round(h);this[this.placed?"animate":"attr"](f);this.placed=!0;this.alignAttr=f;return this},getBBox:function(a,b){var p,e=this.renderer,y,h=this.element,f=this.styles,k,x=this.textStr,v,w=e.cache,K=e.cacheKeys,L=h.namespaceURI===this.SVG_NS,m;b=A(b,this.rotation);y=b*d;k=h&&
z.prototype.getStyle.call(h,"font-size");q(x)&&(m=x.toString(),-1===m.indexOf("\x3c")&&(m=m.replace(/[0-9]/g,"0")),m+=["",b||0,k,this.textWidth,f&&f.textOverflow].join());m&&!a&&(p=w[m]);if(!p){if(L||e.forExport){try{(v=this.fakeTS&&function(a){g(h.querySelectorAll(".highcharts-text-outline"),function(b){b.style.display=a})})&&v("none"),p=h.getBBox?c({},h.getBBox()):{width:h.offsetWidth,height:h.offsetHeight},v&&v("")}catch(Z){}if(!p||0>p.width)p={width:0,height:0}}else p=this.htmlGetBBox();e.isSVG&&
(a=p.width,e=p.height,L&&(p.height=e={"11px,17":14,"13px,20":16}[f&&f.fontSize+","+Math.round(e)]||e),b&&(p.width=Math.abs(e*Math.sin(y))+Math.abs(a*Math.cos(y)),p.height=Math.abs(e*Math.cos(y))+Math.abs(a*Math.sin(y))));if(m&&0<p.height){for(;250<K.length;)delete w[K.shift()];w[m]||K.push(m);w[m]=p}}return p},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,p=this.element,c;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)c=this.zIndexSetter();c||(a?a.element:b.box).appendChild(p);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,p=a.element||{},c=a.renderer.isSVG&&"SPAN"===p.nodeName&&a.parentGroup,
e=p.ownerSVGElement,y=a.clipPath;p.onclick=p.onmouseout=p.onmouseover=p.onmousemove=p.point=null;L(a);y&&e&&(g(e.querySelectorAll("[clip-path],[CLIP-PATH]"),function(a){var b=a.getAttribute("clip-path"),p=y.element.id;(-1<b.indexOf("(#"+p+")")||-1<b.indexOf('("#'+p+'")'))&&a.removeAttribute("clip-path")}),a.clipPath=y.destroy());if(a.stops){for(e=0;e<a.stops.length;e++)a.stops[e]=a.stops[e].destroy();a.stops=null}for(a.safeRemoveChild(p);c&&c.div&&0===c.div.childNodes.length;)p=c.parentGroup,a.safeRemoveChild(c.div),
delete c.div,c=p;a.alignTo&&b(a.renderer.alignedObjects,a);H(a,function(b,p){delete a[p]});return null},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=A(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,p){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[b]!==a&&(p.setAttribute(b,a),
this[b]=a)},alignSetter:function(a){this.alignValue=a;this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,b,p){this[b]=a;p.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=k.createElementNS(this.SVG_NS,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(k.createTextNode(String(A(a),"").replace(/<[^>]*>/g,"").replace(/</g,"\x3c").replace(/>/g,
"\x3e")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,b,p){"string"===typeof a?p.setAttribute(b,a):a&&this.complexColor(a,b,p)},visibilitySetter:function(a,b,p){"inherit"===a?p.removeAttribute(b):this[b]!==a&&p.setAttribute(b,a);this[b]=a},zIndexSetter:function(a,b){var p=this.renderer,c=this.parentGroup,e=(c||p).element||p.box,A,g=this.element,h,f,p=e===p.box;A=this.added;var k;q(a)?(g.setAttribute("data-z-index",
a),a=+a,this[b]===a&&(A=!1)):q(this[b])&&g.removeAttribute("data-z-index");this[b]=a;if(A){(a=this.zIndex)&&c&&(c.handleZ=!0);b=e.childNodes;for(k=b.length-1;0<=k&&!h;k--)if(c=b[k],A=c.getAttribute("data-z-index"),f=!q(A),c!==g)if(0>a&&f&&!p&&!k)e.insertBefore(g,b[k]),h=!0;else if(y(A)<=a||f&&(!q(a)||0<=a))e.insertBefore(g,b[k+1]||null),h=!0;h||(e.insertBefore(g,b[p?3:0]||null),h=!0)}return h},_defaultSetter:function(a,b,p){p.setAttribute(b,a)}});z.prototype.yGetter=z.prototype.xGetter;z.prototype.translateXSetter=
z.prototype.translateYSetter=z.prototype.rotationSetter=z.prototype.verticalAlignSetter=z.prototype.rotationOriginXSetter=z.prototype.rotationOriginYSetter=z.prototype.scaleXSetter=z.prototype.scaleYSetter=z.prototype.matrixSetter=function(a,b){this[b]=a;this.doTransform=!0};C=a.SVGRenderer=function(){this.init.apply(this,arguments)};c(C.prototype,{Element:z,SVG_NS:P,init:function(a,b,p,c,e,y){var A;c=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});A=c.element;a.appendChild(A);
l(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&l(A,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=A;this.boxWrapper=c;this.alignedObjects=[];this.url=(J||G)&&k.getElementsByTagName("base").length?R.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(k.createTextNode("Created with Highcharts 6.2.0"));this.defs=this.createElement("defs").add();this.allowHTML=y;this.forExport=e;this.gradients={};
this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(b,p,!1);var g;J&&a.getBoundingClientRect&&(b=function(){u(a,{left:0,top:0});g=a.getBoundingClientRect();u(a,{left:Math.ceil(g.left)-g.left+"px",top:Math.ceil(g.top)-g.top+"px"})},b(),this.unSubPixelFix=B(R,"resize",b))},definition:function(a){function b(a,e){var y;g(p(a),function(a){var p=c.createElement(a.tagName),A={};H(a,function(a,b){"tagName"!==b&&"children"!==b&&"textContent"!==b&&(A[b]=a)});p.attr(A);p.add(e||c.defs);a.textContent&&
p.element.appendChild(k.createTextNode(a.textContent));b(a.children||[],p);y=p});return y}var c=this;return b(a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();f(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:F,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,p,c,e,y,A){var g=this,h=a.rotation,f,d=c?1:0,v=(p||c).length,x=v,w=[],K=function(a){b.firstChild&&b.removeChild(b.firstChild);a&&b.appendChild(k.createTextNode(a))},m=function(y,h){h=h||y;if(void 0===w[h])if(b.getSubStringLength)try{w[h]=e+b.getSubStringLength(0,c?h+1:h)}catch(aa){}else g.getSpanWidth&&(K(A(p||c,y)),w[h]=e+g.getSpanWidth(a,b));return w[h]},L,q;a.rotation=0;L=m(b.textContent.length);if(q=
e+L>y){for(;d<=v;)x=Math.ceil((d+v)/2),c&&(f=A(c,x)),L=m(x,f&&f.length-1),d===v?d=v+1:L>y?v=x-1:d=x;0===v?K(""):p&&v===p.length-1||K(f||A(p||c,x))}c&&c.splice(0,x);a.actualWidth=L;a.rotation=h;return q},escapes:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;","'":"\x26#39;",'"':"\x26quot;"},buildText:function(a){var b=a.element,p=this,c=p.forExport,e=A(a.textStr,"").toString(),f=-1!==e.indexOf("\x3c"),d=b.childNodes,x,w=l(b,"x"),K=a.styles,m=a.textWidth,L=K&&K.lineHeight,q=K&&K.textOutline,D=
K&&"ellipsis"===K.textOverflow,G=K&&"nowrap"===K.whiteSpace,n=K&&K.fontSize,E,M,J=d.length,K=m&&!a.added&&this.box,F=function(a){return L?y(L):p.fontMetrics(void 0,a.getAttribute("style")?a:b).h},t=function(a,b){H(p.escapes,function(p,c){b&&-1!==v(p,b)||(a=a.toString().replace(new RegExp(p,"g"),c))});return a},r=function(a,b){var p;p=a.indexOf("\x3c");a=a.substring(p,a.indexOf("\x3e")-p);p=a.indexOf(b+"\x3d");if(-1!==p&&(p=p+b.length+1,b=a.charAt(p),'"'===b||"'"===b))return a=a.substring(p+1),a.substring(0,
a.indexOf(b))};E=[e,D,G,L,q,n,m].join();if(E!==a.textCache){for(a.textCache=E;J--;)b.removeChild(d[J]);f||q||D||m||-1!==e.indexOf(" ")?(K&&K.appendChild(b),e=f?e.replace(/<(b|strong)>/g,'\x3cspan class\x3d"highcharts-strong"\x3e').replace(/<(i|em)>/g,'\x3cspan class\x3d"highcharts-emphasized"\x3e').replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g):[e],e=h(e,function(a){return""!==a}),g(e,function(e,y){var A,h=0,f=0;e=e.replace(/^\s+|\s+$/g,"").replace(/<span/g,
"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");A=e.split("|||");g(A,function(e){if(""!==e||1===A.length){var g={},d=k.createElementNS(p.SVG_NS,"tspan"),v,K;(v=r(e,"class"))&&l(d,"class",v);if(v=r(e,"style"))v=v.replace(/(;| |^)color([ :])/,"$1fill$2"),l(d,"style",v);(K=r(e,"href"))&&!c&&(l(d,"onclick",'location.href\x3d"'+K+'"'),l(d,"class","highcharts-anchor"));e=t(e.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==e){d.appendChild(k.createTextNode(e));h?g.dx=0:y&&null!==w&&(g.x=w);l(d,
g);b.appendChild(d);!h&&M&&(!O&&c&&u(d,{display:"block"}),l(d,"dy",F(d)));if(m){var L=e.replace(/([^\^])-/g,"$1- ").split(" "),g=!G&&(1<A.length||y||1<L.length);K=0;var q=F(d);if(D)x=p.truncate(a,d,e,void 0,0,Math.max(0,m-parseInt(n||12,10)),function(a,b){return a.substring(0,b)+"\u2026"});else if(g)for(;L.length;)L.length&&!G&&0<K&&(d=k.createElementNS(P,"tspan"),l(d,{dy:q,x:w}),v&&l(d,"style",v),d.appendChild(k.createTextNode(L.join(" ").replace(/- /g,"-"))),b.appendChild(d)),p.truncate(a,d,null,
L,0===K?f:0,m,function(a,b){return L.slice(0,b).join(" ").replace(/- /g,"-")}),f=a.actualWidth,K++}h++}}});M=M||b.childNodes.length}),D&&x&&a.attr("title",t(a.textStr,["\x26lt;","\x26gt;"])),K&&K.removeChild(b),q&&a.applyTextOutline&&a.applyTextOutline(q)):b.appendChild(k.createTextNode(t(e)))}},getContrast:function(a){a=t(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,p,c,e,y,A,g,h){var f=this.label(a,b,p,h,null,null,null,null,"button"),d=0;
f.attr(M({padding:8,r:2},e));B(f.element,D?"mouseover":"mouseenter",function(){3!==d&&f.setState(1)});B(f.element,D?"mouseout":"mouseleave",function(){3!==d&&f.setState(d)});f.setState=function(a){1!==a&&(f.state=d=a);f.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0])};return f.on("click",function(a){3!==d&&c.call(f,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 b={};w(a)?b.d=a:E(a)&&c(b,a);return this.createElement("path").attr(b)},circle:function(a,b,p){a=E(a)?a:{x:a,y:b,r:p};b=this.createElement("circle");b.xSetter=b.ySetter=function(a,b,p){p.setAttribute("c"+b,a)};return b.attr(a)},arc:function(a,b,p,c,e,y){E(a)?(c=a,b=c.y,p=c.r,a=c.x):c={innerR:c,start:e,end:y};a=this.symbol("arc",a,b,p,p,c);a.r=p;return a},rect:function(a,b,p,c,e,y){e=E(a)?a.r:e;y=this.createElement("rect");a=E(a)?a:
void 0===a?{}:{x:a,y:b,width:Math.max(p,0),height:Math.max(c,0)};e&&(a.r=e);y.rSetter=function(a,b,p){l(p,{rx:a,ry:a})};return y.attr(a)},setSize:function(a,b,p){var c=this.alignedObjects,e=c.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:A(p,!0)?void 0:0});e--;)c[e].align()},g:function(a){var b=this.createElement("g");return a?b.attr({"class":"highcharts-"+a}):b},image:function(a,
b,p,e,y,A){var g={preserveAspectRatio:"none"},h,f=function(a,b){a.setAttributeNS?a.setAttributeNS("http://www.w3.org/1999/xlink","href",b):a.setAttribute("hc-svg-href",b)},d=function(b){f(h.element,a);A.call(h,b)};1<arguments.length&&c(g,{x:b,y:p,width:e,height:y});h=this.createElement("image").attr(g);A?(f(h.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw\x3d\x3d"),g=new R.Image,B(g,"load",d),g.src=a,g.complete&&d({})):f(h.element,a);return h},symbol:function(a,
b,p,e,y,h){var f=this,d,v=/^url\((.*?)\)$/,x=v.test(a),K=!x&&(this.symbols[a]?a:"circle"),w=K&&this.symbols[K],L=q(b)&&w&&w.call(this.symbols,Math.round(b),Math.round(p),e,y,h),D,G;w?(d=this.path(L),c(d,{symbolName:K,x:b,y:p,width:e,height:y}),h&&c(d,h)):x&&(D=a.match(v)[1],d=this.image(D),d.imgwidth=A(Q[D]&&Q[D].width,h&&h.width),d.imgheight=A(Q[D]&&Q[D].height,h&&h.height),G=function(){d.attr({width:d.width,height:d.height})},g(["width","height"],function(a){d[a+"Setter"]=function(a,b){var p={},
c=this["img"+b],e="width"===b?"translateX":"translateY";this[b]=a;q(c)&&(this.element&&this.element.setAttribute(b,c),this.alignByTranslate||(p[e]=((this[b]||0)-c)/2,this.attr(p)))}}),q(b)&&d.attr({x:b,y:p}),d.isImg=!0,q(d.imgwidth)&&q(d.imgheight)?G():(d.attr({width:0,height:0}),m("img",{onload:function(){var a=n[f.chartIndex];0===this.width&&(u(this,{position:"absolute",top:"-999em"}),k.body.appendChild(this));Q[D]={width:this.width,height:this.height};d.imgwidth=this.width;d.imgheight=this.height;
d.element&&G();this.parentNode&&this.parentNode.removeChild(this);f.imgCount--;if(!f.imgCount&&a&&a.onload)a.onload()},src:D}),this.imgCount++));return d},symbols:{circle:function(a,b,p,c){return this.arc(a+p/2,b+c/2,p/2,c/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,b,p,c){return["M",a,b,"L",a+p,b,a+p,b+c,a,b+c,"Z"]},triangle:function(a,b,p,c){return["M",a+p/2,b,"L",a+p,b+c,a,b+c,"Z"]},"triangle-down":function(a,b,p,c){return["M",a,b,"L",a+p,b,a+p/2,b+c,"Z"]},diamond:function(a,b,p,c){return["M",
a+p/2,b,"L",a+p,b+c/2,a+p/2,b+c,a,b+c/2,"Z"]},arc:function(a,b,p,c,e){var y=e.start,h=e.r||p,g=e.r||c||p,f=e.end-.001;p=e.innerR;c=A(e.open,.001>Math.abs(e.end-e.start-2*Math.PI));var d=Math.cos(y),k=Math.sin(y),v=Math.cos(f),f=Math.sin(f);e=.001>e.end-y-Math.PI?0:1;h=["M",a+h*d,b+g*k,"A",h,g,0,e,1,a+h*v,b+g*f];q(p)&&h.push(c?"M":"L",a+p*v,b+p*f,"A",p,p,0,e,0,a+p*d,b+p*k);h.push(c?"":"Z");return h},callout:function(a,b,p,c,e){var y=Math.min(e&&e.r||0,p,c),A=y+6,h=e&&e.anchorX;e=e&&e.anchorY;var g;
g=["M",a+y,b,"L",a+p-y,b,"C",a+p,b,a+p,b,a+p,b+y,"L",a+p,b+c-y,"C",a+p,b+c,a+p,b+c,a+p-y,b+c,"L",a+y,b+c,"C",a,b+c,a,b+c,a,b+c-y,"L",a,b+y,"C",a,b,a,b,a+y,b];h&&h>p?e>b+A&&e<b+c-A?g.splice(13,3,"L",a+p,e-6,a+p+6,e,a+p,e+6,a+p,b+c-y):g.splice(13,3,"L",a+p,c/2,h,e,a+p,c/2,a+p,b+c-y):h&&0>h?e>b+A&&e<b+c-A?g.splice(33,3,"L",a,e+6,a-6,e,a,e-6,a,b+y):g.splice(33,3,"L",a,c/2,h,e,a,c/2,a,b+y):e&&e>c&&h>a+A&&h<a+p-A?g.splice(23,3,"L",h+6,b+c,h,b+c+6,h-6,b+c,a+y,b+c):e&&0>e&&h>a+A&&h<a+p-A&&g.splice(3,3,"L",
h-6,b,h,b-6,h+6,b,p-y,b);return g}},clipRect:function(b,p,c,e){var y=a.uniqueKey(),A=this.createElement("clipPath").attr({id:y}).add(this.defs);b=this.rect(b,p,c,e,0).add(A);b.id=y;b.clipPath=A;b.count=0;return b},text:function(a,b,p,c){var e={};if(c&&(this.allowHTML||!this.forExport))return this.html(a,b,p);e.x=Math.round(b||0);p&&(e.y=Math.round(p));q(a)&&(e.text=a);a=this.createElement("text").attr(e);c||(a.xSetter=function(a,b,p){var c=p.getElementsByTagName("tspan"),e,y=p.getAttribute(b),A;for(A=
0;A<c.length;A++)e=c[A],e.getAttribute(b)===y&&e.setAttribute(b,a);p.setAttribute(b,a)});return a},fontMetrics:function(a,b){a=b&&z.prototype.getStyle.call(b,"font-size");a=/px/.test(a)?y(a):/em/.test(a)?parseFloat(a)*(b?this.fontMetrics(null,b.parentNode).f:16):12;b=24>a?a+3:Math.round(1.2*a);return{h:b,b:Math.round(.8*b),f:a}},rotCorr:function(a,b,p){var c=a;b&&p&&(c=Math.max(c*Math.cos(b*d),4));return{x:-a/3*Math.sin(b*d),y:c}},label:function(b,p,e,y,A,h,f,d,k){var v=this,x=v.g("button"!==k&&"label"),
w=x.text=v.text("",0,0,f).attr({zIndex:1}),L,m,D=0,G=3,n=0,E,l,J,F,O,P={},H,u=/^url\((.*?)\)$/.test(y),t=u,r,Q,R,N;k&&x.addClass("highcharts-"+k);t=!0;r=function(){return L.strokeWidth()%2/2};Q=function(){var a=w.element.style,b={};m=(void 0===E||void 0===l||O)&&q(w.textStr)&&w.getBBox();x.width=(E||m.width||0)+2*G+n;x.height=(l||m.height||0)+2*G;H=G+v.fontMetrics(a&&a.fontSize,w).b;t&&(L||(x.box=L=v.symbols[y]||u?v.symbol(y):v.rect(),L.addClass(("button"===k?"":"highcharts-label-box")+(k?" highcharts-"+
k+"-box":"")),L.add(x),a=r(),b.x=a,b.y=(d?-H:0)+a),b.width=Math.round(x.width),b.height=Math.round(x.height),L.attr(c(b,P)),P={})};R=function(){var a=n+G,b;b=d?0:H;q(E)&&m&&("center"===O||"right"===O)&&(a+={center:.5,right:1}[O]*(E-m.width));if(a!==w.x||b!==w.y)w.attr("x",a),w.hasBoxWidthChanged&&(m=w.getBBox(!0),Q()),void 0!==b&&w.attr("y",b);w.x=a;w.y=b};N=function(a,b){L?L.attr(a,b):P[a]=b};x.onAdd=function(){w.add(x);x.attr({text:b||0===b?b:"",x:p,y:e});L&&q(A)&&x.attr({anchorX:A,anchorY:h})};
x.widthSetter=function(b){E=a.isNumber(b)?b:null};x.heightSetter=function(a){l=a};x["text-alignSetter"]=function(a){O=a};x.paddingSetter=function(a){q(a)&&a!==G&&(G=x.padding=a,R())};x.paddingLeftSetter=function(a){q(a)&&a!==n&&(n=a,R())};x.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==D&&(D=a,m&&x.attr({x:J}))};x.textSetter=function(a){void 0!==a&&w.textSetter(a);Q();R()};x["stroke-widthSetter"]=function(a,b){a&&(t=!0);this["stroke-width"]=a;N(b,a)};x.rSetter=function(a,b){N(b,a)};
x.anchorXSetter=function(a,b){A=x.anchorX=a;N(b,Math.round(a)-r()-J)};x.anchorYSetter=function(a,b){h=x.anchorY=a;N(b,a-F)};x.xSetter=function(a){x.x=a;D&&(a-=D*((E||m.width)+2*G),x["forceAnimate:x"]=!0);J=Math.round(a);x.attr("translateX",J)};x.ySetter=function(a){F=x.y=Math.round(a);x.attr("translateY",F)};var C=x.css;return c(x,{css:function(a){if(a){var b={};a=M(a);g(x.textProps,function(p){void 0!==a[p]&&(b[p]=a[p],delete a[p])});w.css(b);"width"in b&&Q()}return C.call(x,a)},getBBox:function(){return{width:m.width+
2*G,height:m.height+2*G,x:m.x-G,y:m.y-G}},destroy:function(){K(x.element,"mouseenter");K(x.element,"mouseleave");w&&(w=w.destroy());L&&(L=L.destroy());z.prototype.destroy.call(x);x=v=Q=R=N=null}})}});a.Renderer=C})(I);(function(a){var z=a.attr,C=a.createElement,B=a.css,r=a.defined,l=a.each,n=a.extend,t=a.isFirefox,u=a.isMS,m=a.isWebKit,q=a.pick,d=a.pInt,f=a.SVGRenderer,k=a.win,g=a.wrap;n(a.SVGElement.prototype,{htmlCss:function(a){var b="SPAN"===this.element.tagName&&a&&"width"in a,c=q(b&&a.width,
void 0);b&&(delete a.width,this.textWidth=c,this.htmlUpdateTransform());a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=n(this.styles,a);B(this.element,a);return this},htmlGetBBox:function(){var a=this.element;return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,h=this.x||0,e=this.y||0,g=this.textAlign||"left",f={left:0,center:.5,right:1}[g],k=this.styles,
m=k&&k.whiteSpace;B(b,{marginLeft:this.translateX||0,marginTop:this.translateY||0});this.inverted&&l(b.childNodes,function(e){a.invertChild(e,b)});if("SPAN"===b.tagName){var k=this.rotation,q=this.textWidth&&d(this.textWidth),x=[k,g,b.innerHTML,this.textWidth,this.textAlign].join(),G;(G=q!==this.oldTextWidth)&&!(G=q>this.oldTextWidth)&&((G=this.textPxLength)||(B(b,{width:"",whiteSpace:m||"nowrap"}),G=b.offsetWidth),G=G>q);G&&/[ \-]/.test(b.textContent||b.innerText)?(B(b,{width:q+"px",display:"block",
whiteSpace:m||"normal"}),this.oldTextWidth=q,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1;x!==this.cTT&&(m=a.fontMetrics(b.style.fontSize).b,!r(k)||k===(this.oldRotation||0)&&g===this.oldAlign||this.setSpanRotation(k,f,m),this.getSpanCorrection(!r(k)&&this.textPxLength||b.offsetWidth,m,f,k,g));B(b,{left:h+(this.xCorr||0)+"px",top:e+(this.yCorr||0)+"px"});this.cTT=x;this.oldRotation=k;this.oldAlign=g}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,h){var e={},c=this.renderer.getTransformKey();
e[c]=e.transform="rotate("+a+"deg)";e[c+(t?"Origin":"-origin")]=e.transformOrigin=100*b+"% "+h+"px";B(this.element,e)},getSpanCorrection:function(a,b,h){this.xCorr=-a*h;this.yCorr=-b}});n(f.prototype,{getTransformKey:function(){return u&&!/Edge/.test(k.navigator.userAgent)?"-ms-transform":m?"-webkit-transform":t?"MozTransform":k.opera?"-o-transform":""},html:function(a,b,h){var e=this.createElement("span"),c=e.element,f=e.renderer,d=f.isSVG,k=function(a,b){l(["opacity","visibility"],function(e){g(a,
e+"Setter",function(a,e,c,A){a.call(this,e,c,A);b[c]=e})});a.addedSetters=!0};e.textSetter=function(a){a!==c.innerHTML&&delete this.bBox;this.textStr=a;c.innerHTML=q(a,"");e.doTransform=!0};d&&k(e,e.element.style);e.xSetter=e.ySetter=e.alignSetter=e.rotationSetter=function(a,b){"align"===b&&(b="textAlign");e[b]=a;e.doTransform=!0};e.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};e.attr({text:a,x:Math.round(b),y:Math.round(h)}).css({position:"absolute"});
c.style.whiteSpace="nowrap";e.css=e.htmlCss;d&&(e.add=function(a){var b,h=f.box.parentNode,g=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)g.push(a),a=a.parentGroup;l(g.reverse(),function(a){function c(b,p){a[p]=b;"translateX"===p?A.left=b+"px":A.top=b+"px";a.doTransform=!0}var A,y=z(a.element,"class");y&&(y={className:y});b=a.div=a.div||C("div",y,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},
b||h);A=b.style;n(a,{classSetter:function(a){return function(b){this.element.setAttribute("class",b);a.className=b}}(b),on:function(){g[0].div&&e.on.apply({element:g[0].div},arguments);return a},translateXSetter:c,translateYSetter:c});a.addedSetters||k(a,A)})}}else b=h;b.appendChild(c);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e});return e}})})(I);(function(a){var z=a.defined,C=a.each,B=a.extend,r=a.merge,l=a.pick,n=a.timeUnits,t=a.win;a.Time=function(a){this.update(a,!1)};a.Time.prototype=
{defaultOptions:{},update:function(a){var m=l(a&&a.useUTC,!0),q=this;this.options=a=r(!0,this.options||{},a);this.Date=a.Date||t.Date;this.timezoneOffset=(this.useUTC=m)&&a.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(m&&!a.getTimezoneOffset&&!a.timezone))||this.timezoneOffset?(this.get=function(a,f){var d=f.getTime(),g=d-q.getTimezoneOffset(f);f.setTime(g);a=f["getUTC"+a]();f.setTime(d);return a},this.set=function(a,f,k){var g;if("Milliseconds"===a||
"Seconds"===a||"Minutes"===a&&0===f.getTimezoneOffset()%60)f["set"+a](k);else g=q.getTimezoneOffset(f),g=f.getTime()-g,f.setTime(g),f["setUTC"+a](k),a=q.getTimezoneOffset(f),g=f.getTime()+a,f.setTime(g)}):m?(this.get=function(a,f){return f["getUTC"+a]()},this.set=function(a,f,k){return f["setUTC"+a](k)}):(this.get=function(a,f){return f["get"+a]()},this.set=function(a,f,k){return f["set"+a](k)})},makeTime:function(n,m,q,d,f,k){var g,c,b;this.useUTC?(g=this.Date.UTC.apply(0,arguments),c=this.getTimezoneOffset(g),
g+=c,b=this.getTimezoneOffset(g),c!==b?g+=b-c:c-36E5!==this.getTimezoneOffset(g-36E5)||a.isSafari||(g-=36E5)):g=(new this.Date(n,m,l(q,1),l(d,0),l(f,0),l(k,0))).getTime();return g},timezoneOffsetFunction:function(){var n=this,m=this.options,q=t.moment;if(!this.useUTC)return function(a){return 6E4*(new Date(a)).getTimezoneOffset()};if(m.timezone){if(q)return function(a){return 6E4*-q.tz(a,m.timezone).utcOffset()};a.error(25)}return this.useUTC&&m.getTimezoneOffset?function(a){return 6E4*m.getTimezoneOffset(a)}:
function(){return 6E4*(n.timezoneOffset||0)}},dateFormat:function(n,m,q){if(!a.defined(m)||isNaN(m))return a.defaultOptions.lang.invalidDate||"";n=a.pick(n,"%Y-%m-%d %H:%M:%S");var d=this,f=new this.Date(m),k=this.get("Hours",f),g=this.get("Day",f),c=this.get("Date",f),b=this.get("Month",f),h=this.get("FullYear",f),e=a.defaultOptions.lang,v=e.weekdays,w=e.shortWeekdays,l=a.pad,f=a.extend({a:w?w[g]:v[g].substr(0,3),A:v[g],d:l(c),e:l(c,2," "),w:g,b:e.shortMonths[b],B:e.months[b],m:l(b+1),o:b+1,y:h.toString().substr(2,
2),Y:h,H:l(k),k:k,I:l(k%12||12),l:k%12||12,M:l(d.get("Minutes",f)),p:12>k?"AM":"PM",P:12>k?"am":"pm",S:l(f.getSeconds()),L:l(Math.floor(m%1E3),3)},a.dateFormats);a.objectEach(f,function(a,b){for(;-1!==n.indexOf("%"+b);)n=n.replace("%"+b,"function"===typeof a?a.call(d,m):a)});return q?n.substr(0,1).toUpperCase()+n.substr(1):n},resolveDTLFormat:function(n){return a.isObject(n,!0)?n:(n=a.splat(n),{main:n[0],from:n[1],to:n[2]})},getTimeTicks:function(a,m,q,d){var f=this,k=[],g,c={},b;g=new f.Date(m);
var h=a.unitRange,e=a.count||1,v;d=l(d,1);if(z(m)){f.set("Milliseconds",g,h>=n.second?0:e*Math.floor(f.get("Milliseconds",g)/e));h>=n.second&&f.set("Seconds",g,h>=n.minute?0:e*Math.floor(f.get("Seconds",g)/e));h>=n.minute&&f.set("Minutes",g,h>=n.hour?0:e*Math.floor(f.get("Minutes",g)/e));h>=n.hour&&f.set("Hours",g,h>=n.day?0:e*Math.floor(f.get("Hours",g)/e));h>=n.day&&f.set("Date",g,h>=n.month?1:e*Math.floor(f.get("Date",g)/e));h>=n.month&&(f.set("Month",g,h>=n.year?0:e*Math.floor(f.get("Month",g)/
e)),b=f.get("FullYear",g));h>=n.year&&f.set("FullYear",g,b-b%e);h===n.week&&(b=f.get("Day",g),f.set("Date",g,f.get("Date",g)-b+d+(b<d?-7:0)));b=f.get("FullYear",g);d=f.get("Month",g);var w=f.get("Date",g),J=f.get("Hours",g);m=g.getTime();f.variableTimezone&&(v=q-m>4*n.month||f.getTimezoneOffset(m)!==f.getTimezoneOffset(q));m=g.getTime();for(g=1;m<q;)k.push(m),m=h===n.year?f.makeTime(b+g*e,0):h===n.month?f.makeTime(b,d+g*e):!v||h!==n.day&&h!==n.week?v&&h===n.hour&&1<e?f.makeTime(b,d,w,J+g*e):m+h*e:
f.makeTime(b,d,w+g*e*(h===n.day?1:7)),g++;k.push(m);h<=n.hour&&1E4>k.length&&C(k,function(a){0===a%18E5&&"000000000"===f.dateFormat("%H%M%S%L",a)&&(c[a]="day")})}k.info=B(a,{higherRanks:c,totalRange:h*e});return k}}})(I);(function(a){var z=a.merge;a.defaultOptions={symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:a.Time.prototype.defaultOptions,chart:{borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null},title:{text:"Chart title",align:"center",margin:15,
widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{}},loading:{},tooltip:{enabled:!0,animation:a.svg,borderRadius:3,
dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,headerFormat:'\x3cspan class\x3d"highcharts-header"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cspan class\x3d"highcharts-strong"\x3e{point.y}\x3c/span\x3e\x3cbr/\x3e'},
credits:{enabled:!0,href:"https://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},text:"Highcharts.com"}};a.setOptions=function(C){a.defaultOptions=z(!0,a.defaultOptions,C);a.time.update(z(a.defaultOptions.global,a.defaultOptions.time),!1);return a.defaultOptions};a.g