UNPKG

highcharts

Version:
105 lines (103 loc) 352 kB
/* Highstock JS v8.2.0 (2020-08-20) (c) 2009-2018 Torstein Honsi License: www.highcharts.com/license */ (function(S,N){"object"===typeof module&&module.exports?(N["default"]=N,module.exports=S.document?N(S):N):"function"===typeof define&&define.amd?define("highcharts/highstock",function(){return N(S)}):(S.Highcharts&&S.Highcharts.error(16,!0),S.Highcharts=N(S))})("undefined"!==typeof window?window:this,function(S){function N(q,f,r,C){q.hasOwnProperty(f)||(q[f]=C.apply(null,r))}var r={};N(r,"Core/Globals.js",[],function(){var q="undefined"!==typeof S?S:"undefined"!==typeof window?window:{},f=q.document, r=q.navigator&&q.navigator.userAgent||"",C=f&&f.createElementNS&&!!f.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,G=/(edge|msie|trident)/i.test(r)&&!q.opera,B=-1!==r.indexOf("Firefox"),H=-1!==r.indexOf("Chrome"),D=B&&4>parseInt(r.split("Firefox/")[1],10);return{product:"Highcharts",version:"8.2.0",deg2rad:2*Math.PI/360,doc:f,hasBidiBug:D,hasTouch:!!q.TouchEvent,isMS:G,isWebKit:-1!==r.indexOf("AppleWebKit"),isFirefox:B,isChrome:H,isSafari:!H&&-1!==r.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(r), SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:C,win:q,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}});N(r,"Core/Utilities.js",[r["Core/Globals.js"]],function(q){function f(b,m,d,a){var J=m?"Highcharts error":"Highcharts warning";32===b&&(b=J+": Deprecated member");var e=x(b),k=e?J+" #"+b+": www.highcharts.com/errors/"+b+"/":b.toString();J=function(){if(m)throw Error(k);I.console&&-1===f.messages.indexOf(k)&& console.log(k)};if("undefined"!==typeof a){var P="";e&&(k+="?");U(a,function(b,m){P+="\n - "+m+": "+b;e&&(k+=encodeURI(m)+"="+encodeURI(b))});k+=P}d?ea(d,"displayError",{code:b,message:k,params:a},J):J();f.messages.push(k)}function r(){var b,m=arguments,d={},a=function(b,m){"object"!==typeof b&&(b={});U(m,function(d,J){!C(d,!0)||v(d)||l(d)?b[J]=m[J]:b[J]=a(b[J]||{},d)});return b};!0===m[0]&&(d=m[1],m=Array.prototype.slice.call(m,2));var J=m.length;for(b=0;b<J;b++)d=a(d,m[b]);return d}function C(b, m){return!!b&&"object"===typeof b&&(!m||!E(b))}function G(b,m,d){var a;L(m)?g(d)?b.setAttribute(m,d):b&&b.getAttribute&&((a=b.getAttribute(m))||"class"!==m||(a=b.getAttribute(m+"Name"))):U(m,function(m,d){b.setAttribute(d,m)});return a}function B(){for(var b=arguments,m=b.length,d=0;d<m;d++){var a=b[d];if("undefined"!==typeof a&&null!==a)return a}}function H(b,m){if(!b)return m;var d=b.split(".").reverse();if(1===d.length)return m[b];for(b=d.pop();"undefined"!==typeof b&&"undefined"!==typeof m&&null!== m;)m=m[b],b=d.pop();return m}q.timers=[];var D=q.charts,n=q.doc,I=q.win;(f||(f={})).messages=[];q.error=f;var M=function(){function b(b,m,d){this.options=m;this.elem=b;this.prop=d}b.prototype.dSetter=function(){var b=this.paths,m=b&&b[0];b=b&&b[1];var d=[],a=this.now||0;if(1!==a&&m&&b)if(m.length===b.length&&1>a)for(var J=0;J<b.length;J++){for(var e=m[J],k=b[J],P=[],c=0;c<k.length;c++){var h=e[c],g=k[c];P[c]="number"===typeof h&&"number"===typeof g&&("A"!==k[0]||4!==c&&5!==c)?h+a*(g-h):g}d.push(P)}else d= b;else d=this.toD||[];this.elem.attr("d",d,void 0,!0)};b.prototype.update=function(){var b=this.elem,m=this.prop,d=this.now,a=this.options.step;if(this[m+"Setter"])this[m+"Setter"]();else b.attr?b.element&&b.attr(m,d,null,!0):b.style[m]=d+this.unit;a&&a.call(b,d,this)};b.prototype.run=function(b,m,d){var a=this,J=a.options,e=function(b){return e.stopped?!1:a.step(b)},k=I.requestAnimationFrame||function(b){setTimeout(b,13)},P=function(){for(var b=0;b<q.timers.length;b++)q.timers[b]()||q.timers.splice(b--, 1);q.timers.length&&k(P)};b!==m||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=b,this.end=m,this.unit=d,this.now=this.start,this.pos=0,e.elem=this.elem,e.prop=this.prop,e()&&1===q.timers.push(e)&&k(P)):(delete J.curAnim[this.prop],J.complete&&0===Object.keys(J.curAnim).length&&J.complete.call(this.elem))};b.prototype.step=function(b){var m=+new Date,d=this.options,a=this.elem,J=d.complete,e=d.duration,k=d.curAnim;if(a.attr&&!a.element)b=!1;else if(b||m>=e+this.startTime){this.now= this.end;this.pos=1;this.update();var P=k[this.prop]=!0;U(k,function(b){!0!==b&&(P=!1)});P&&J&&J.call(a);b=!1}else this.pos=d.easing((m-this.startTime)/e),this.now=this.start+(this.end-this.start)*this.pos,this.update(),b=!0;return b};b.prototype.initPath=function(b,m,d){function a(b,m){for(;b.length<u;){var d=b[0],a=m[u-b.length];a&&"M"===d[0]&&(b[0]="C"===a[0]?["C",d[1],d[2],d[1],d[2],d[1],d[2]]:["L",d[1],d[2]]);b.unshift(d);P&&b.push(b[b.length-1])}}function J(b,m){for(;b.length<u;)if(m=b[b.length/ c-1].slice(),"C"===m[0]&&(m[1]=m[5],m[2]=m[6]),P){var d=b[b.length/c].slice();b.splice(b.length/2,0,m,d)}else b.push(m)}var e=b.startX,k=b.endX;m=m&&m.slice();d=d.slice();var P=b.isArea,c=P?2:1;if(!m)return[d,d];if(e&&k){for(b=0;b<e.length;b++)if(e[b]===k[0]){var h=b;break}else if(e[0]===k[k.length-e.length+b]){h=b;var g=!0;break}else if(e[e.length-1]===k[k.length-e.length+b]){h=e.length-b;break}"undefined"===typeof h&&(m=[])}if(m.length&&x(h)){var u=d.length+h*c;g?(a(m,d),J(d,m)):(a(d,m),J(m,d))}return[m, d]};b.prototype.fillSetter=function(){b.prototype.strokeSetter.apply(this,arguments)};b.prototype.strokeSetter=function(){this.elem.attr(this.prop,q.color(this.start).tweenTo(q.color(this.end),this.pos),null,!0)};return b}();q.Fx=M;q.merge=r;var A=q.pInt=function(b,m){return parseInt(b,m||10)},L=q.isString=function(b){return"string"===typeof b},E=q.isArray=function(b){b=Object.prototype.toString.call(b);return"[object Array]"===b||"[object Array Iterator]"===b};q.isObject=C;var l=q.isDOMElement=function(b){return C(b)&& "number"===typeof b.nodeType},v=q.isClass=function(b){var m=b&&b.constructor;return!(!C(b,!0)||l(b)||!m||!m.name||"Object"===m.name)},x=q.isNumber=function(b){return"number"===typeof b&&!isNaN(b)&&Infinity>b&&-Infinity<b},t=q.erase=function(b,m){for(var d=b.length;d--;)if(b[d]===m){b.splice(d,1);break}},g=q.defined=function(b){return"undefined"!==typeof b&&null!==b};q.attr=G;var c=q.splat=function(b){return E(b)?b:[b]},p=q.syncTimeout=function(b,m,d){if(0<m)return setTimeout(b,m,d);b.call(0,d);return-1}, h=q.clearTimeout=function(b){g(b)&&clearTimeout(b)},e=q.extend=function(b,m){var d;b||(b={});for(d in m)b[d]=m[d];return b};q.pick=B;var a=q.css=function(b,m){q.isMS&&!q.svg&&m&&"undefined"!==typeof m.opacity&&(m.filter="alpha(opacity="+100*m.opacity+")");e(b.style,m)},u=q.createElement=function(b,m,d,J,k){b=n.createElement(b);m&&e(b,m);k&&a(b,{padding:"0",border:"none",margin:"0"});d&&a(b,d);J&&J.appendChild(b);return b},w=q.extendClass=function(b,m){var d=function(){};d.prototype=new b;e(d.prototype, m);return d},F=q.pad=function(b,m,d){return Array((m||2)+1-String(b).replace("-","").length).join(d||"0")+b},y=q.relativeLength=function(b,m,d){return/%$/.test(b)?m*parseFloat(b)/100+(d||0):parseFloat(b)},k=q.wrap=function(b,m,d){var a=b[m];b[m]=function(){var b=Array.prototype.slice.call(arguments),m=arguments,J=this;J.proceed=function(){a.apply(J,arguments.length?arguments:m)};b.unshift(a);b=d.apply(this,b);J.proceed=null;return b}},z=q.format=function(b,m,d){var a="{",J=!1,e=[],k=/f$/,P=/\.([0-9])/, c=q.defaultOptions.lang,h=d&&d.time||q.time;for(d=d&&d.numberFormatter||W;b;){var g=b.indexOf(a);if(-1===g)break;var u=b.slice(0,g);if(J){u=u.split(":");a=H(u.shift()||"",m);if(u.length&&"number"===typeof a)if(u=u.join(":"),k.test(u)){var w=parseInt((u.match(P)||["","-1"])[1],10);null!==a&&(a=d(a,w,c.decimalPoint,-1<u.indexOf(",")?c.thousandsSep:""))}else a=h.dateFormat(u,a);e.push(a)}else e.push(u);b=b.slice(g+1);a=(J=!J)?"}":"{"}e.push(b);return e.join("")},O=q.getMagnitude=function(b){return Math.pow(10, Math.floor(Math.log(b)/Math.LN10))},K=q.normalizeTickInterval=function(b,m,d,a,J){var e=b;d=B(d,1);var k=b/d;m||(m=J?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===a&&(1===d?m=m.filter(function(b){return 0===b%1}):.1>=d&&(m=[1/d])));for(a=0;a<m.length&&!(e=m[a],J&&e*d>=b||!J&&k<=(m[a]+(m[a+1]||m[a]))/2);a++);return e=Q(e*d,-Math.round(Math.log(.001)/Math.LN10))},d=q.stableSort=function(b,m){var d=b.length,a,J;for(J=0;J<d;J++)b[J].safeI=J;b.sort(function(b,d){a=m(b,d);return 0===a?b.safeI-d.safeI: a});for(J=0;J<d;J++)delete b[J].safeI},b=q.arrayMin=function(b){for(var m=b.length,d=b[0];m--;)b[m]<d&&(d=b[m]);return d},m=q.arrayMax=function(b){for(var m=b.length,d=b[0];m--;)b[m]>d&&(d=b[m]);return d},J=q.destroyObjectProperties=function(b,m){U(b,function(d,a){d&&d!==m&&d.destroy&&d.destroy();delete b[a]})},P=q.discardElement=function(b){var m=q.garbageBin;m||(m=u("div"));b&&m.appendChild(b);m.innerHTML=""},Q=q.correctFloat=function(b,m){return parseFloat(b.toPrecision(m||14))},Y=q.setAnimation= function(b,m){m.renderer.globalAnimation=B(b,m.options.chart.animation,!0)},V=q.animObject=function(b){return C(b)?q.merge({duration:500,defer:0},b):{duration:b?500:0,defer:0}},Z=q.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5},W=q.numberFormat=function(b,m,d,a){b=+b||0;m=+m;var J=q.defaultOptions.lang,e=(b.toString().split(".")[1]||"").split("e")[0].length,k=b.toString().split("e");if(-1===m)m=Math.min(e,20);else if(!x(m))m=2;else if(m&& k[1]&&0>k[1]){var P=m+ +k[1];0<=P?(k[0]=(+k[0]).toExponential(P).split("e")[0],m=P):(k[0]=k[0].split(".")[0]||0,b=20>m?(k[0]*Math.pow(10,k[1])).toFixed(m):0,k[1]=0)}var c=(Math.abs(k[1]?k[0]:b)+Math.pow(10,-Math.max(m,e)-1)).toFixed(m);e=String(A(c));P=3<e.length?e.length%3:0;d=B(d,J.decimalPoint);a=B(a,J.thousandsSep);b=(0>b?"-":"")+(P?e.substr(0,P)+a:"");b+=e.substr(P).replace(/(\d{3})(?=\d)/g,"$1"+a);m&&(b+=d+c.slice(-m));k[1]&&0!==+b&&(b+="e"+k[1]);return b};Math.easeInOutSine=function(b){return-.5* (Math.cos(Math.PI*b)-1)};var aa=q.getStyle=function(b,m,d){if("width"===m)return m=Math.min(b.offsetWidth,b.scrollWidth),d=b.getBoundingClientRect&&b.getBoundingClientRect().width,d<m&&d>=m-1&&(m=Math.floor(d)),Math.max(0,m-q.getStyle(b,"padding-left")-q.getStyle(b,"padding-right"));if("height"===m)return Math.max(0,Math.min(b.offsetHeight,b.scrollHeight)-q.getStyle(b,"padding-top")-q.getStyle(b,"padding-bottom"));I.getComputedStyle||f(27,!0);if(b=I.getComputedStyle(b,void 0))b=b.getPropertyValue(m), B(d,"opacity"!==m)&&(b=A(b));return b},ba=q.getDeferredAnimation=function(b,m,d){var a=V(m),J=0,e=0;(d?[d]:b.series).forEach(function(b){b=V(b.options.animation);J=m&&g(m.defer)?a.defer:Math.max(J,b.duration+b.defer);e=Math.min(a.duration,b.duration)});b.renderer.forExport&&(J=0);return{defer:Math.max(0,J-e),duration:Math.min(J,e)}},X=q.inArray=function(b,m,d){f(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"});return m.indexOf(b,d)},fa=q.find=Array.prototype.find?function(b,m){return b.find(m)}: function(b,m){var d,a=b.length;for(d=0;d<a;d++)if(m(b[d],d))return b[d]};q.keys=function(b){f(32,!1,void 0,{"Highcharts.keys":"use Object.keys"});return Object.keys(b)};var ka=q.offset=function(b){var m=n.documentElement;b=b.parentElement||b.parentNode?b.getBoundingClientRect():{top:0,left:0};return{top:b.top+(I.pageYOffset||m.scrollTop)-(m.clientTop||0),left:b.left+(I.pageXOffset||m.scrollLeft)-(m.clientLeft||0)}},ha=q.stop=function(b,m){for(var d=q.timers.length;d--;)q.timers[d].elem!==b||m&&m!== q.timers[d].prop||(q.timers[d].stopped=!0)},U=q.objectEach=function(b,m,d){for(var a in b)Object.hasOwnProperty.call(b,a)&&m.call(d||b[a],b[a],a,b)};U({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(b,m){q[m]=function(d){var a;f(32,!1,void 0,(a={},a["Highcharts."+m]="use Array."+b,a));return Array.prototype[b].apply(d,[].slice.call(arguments,1))}});var la=q.addEvent=function(b,m,d,a){void 0===a&&(a={});var J=b.addEventListener||q.addEventListenerPolyfill;var e="function"=== typeof b&&b.prototype?b.prototype.protoEvents=b.prototype.protoEvents||{}:b.hcEvents=b.hcEvents||{};q.Point&&b instanceof q.Point&&b.series&&b.series.chart&&(b.series.chart.runTrackerClick=!0);J&&J.call(b,m,d,!1);e[m]||(e[m]=[]);e[m].push({fn:d,order:"number"===typeof a.order?a.order:Infinity});e[m].sort(function(b,m){return b.order-m.order});return function(){ia(b,m,d)}},ia=q.removeEvent=function(b,m,d){function a(m,d){var a=b.removeEventListener||q.removeEventListenerPolyfill;a&&a.call(b,m,d,!1)} function J(d){var J;if(b.nodeName){if(m){var e={};e[m]=!0}else e=d;U(e,function(b,m){if(d[m])for(J=d[m].length;J--;)a(m,d[m][J].fn)})}}var e;["protoEvents","hcEvents"].forEach(function(k,P){var c=(P=P?b:b.prototype)&&P[k];c&&(m?(e=c[m]||[],d?(c[m]=e.filter(function(b){return d!==b.fn}),a(m,d)):(J(c),c[m]=[])):(J(c),P[k]={}))})},ea=q.fireEvent=function(b,m,d,a){var J;d=d||{};if(n.createEvent&&(b.dispatchEvent||b.fireEvent)){var k=n.createEvent("Events");k.initEvent(m,!0,!0);e(k,d);b.dispatchEvent? b.dispatchEvent(k):b.fireEvent(m,k)}else d.target||e(d,{preventDefault:function(){d.defaultPrevented=!0},target:b,type:m}),function(m,a){void 0===m&&(m=[]);void 0===a&&(a=[]);var e=0,k=0,P=m.length+a.length;for(J=0;J<P;J++)!1===(m[e]?a[k]?m[e].order<=a[k].order?m[e++]:a[k++]:m[e++]:a[k++]).fn.call(b,d)&&d.preventDefault()}(b.protoEvents&&b.protoEvents[m],b.hcEvents&&b.hcEvents[m]);a&&!d.defaultPrevented&&a.call(b,d)},T=q.animate=function(b,m,d){var a,J="",e,k;if(!C(d)){var P=arguments;d={duration:P[2], easing:P[3],complete:P[4]}}x(d.duration)||(d.duration=400);d.easing="function"===typeof d.easing?d.easing:Math[d.easing]||Math.easeInOutSine;d.curAnim=r(m);U(m,function(P,c){ha(b,c);k=new M(b,d,c);e=null;"d"===c&&E(m.d)?(k.paths=k.initPath(b,b.pathArray,m.d),k.toD=m.d,a=0,e=1):b.attr?a=b.attr(c):(a=parseFloat(aa(b,c))||0,"opacity"!==c&&(J="px"));e||(e=P);e&&e.match&&e.match("px")&&(e=e.replace(/px/g,""));k.run(a,e,J)})},ca=q.seriesType=function(b,m,d,a,J){var e=ja(),k=q.seriesTypes;e.plotOptions[b]= r(e.plotOptions[m],d);k[b]=w(k[m]||function(){},a);k[b].prototype.type=b;J&&(k[b].prototype.pointClass=w(q.Point,J));return k[b]},da,ma=q.uniqueKey=function(){var b=Math.random().toString(36).substring(2,9)+"-",m=0;return function(){return"highcharts-"+(da?"":b)+m++}}(),N=q.useSerialIds=function(b){return da=B(b,da)},na=q.isFunction=function(b){return"function"===typeof b},ja=q.getOptions=function(){return q.defaultOptions},oa=q.setOptions=function(b){q.defaultOptions=r(!0,q.defaultOptions,b);(b.time|| b.global)&&q.time.update(r(q.defaultOptions.global,q.defaultOptions.time,b.global,b.time));return q.defaultOptions};I.jQuery&&(I.jQuery.fn.highcharts=function(){var b=[].slice.call(arguments);if(this[0])return b[0]?(new (q[L(b[0])?b.shift():"Chart"])(this[0],b[0],b[1]),this):D[G(this[0],"data-highcharts-chart")]});return{Fx:q.Fx,addEvent:la,animate:T,animObject:V,arrayMax:m,arrayMin:b,attr:G,clamp:function(b,m,d){return b>m?b<d?b:d:m},clearTimeout:h,correctFloat:Q,createElement:u,css:a,defined:g, destroyObjectProperties:J,discardElement:P,erase:t,error:f,extend:e,extendClass:w,find:fa,fireEvent:ea,format:z,getDeferredAnimation:ba,getMagnitude:O,getNestedProperty:H,getOptions:ja,getStyle:aa,inArray:X,isArray:E,isClass:v,isDOMElement:l,isFunction:na,isNumber:x,isObject:C,isString:L,merge:r,normalizeTickInterval:K,numberFormat:W,objectEach:U,offset:ka,pad:F,pick:B,pInt:A,relativeLength:y,removeEvent:ia,seriesType:ca,setAnimation:Y,setOptions:oa,splat:c,stableSort:d,stop:ha,syncTimeout:p,timeUnits:Z, uniqueKey:ma,useSerialIds:N,wrap:k}});N(r,"Core/Color.js",[r["Core/Globals.js"],r["Core/Utilities.js"]],function(q,f){var r=f.isNumber,C=f.merge,G=f.pInt;f=function(){function f(q){this.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(f){return[G(f[1]),G(f[2]),G(f[3]),parseFloat(f[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(f){return[G(f[1]),G(f[2]),G(f[3]),1]}}];this.rgba= [];if(!(this instanceof f))return new f(q);this.init(q)}f.parse=function(q){return new f(q)};f.prototype.init=function(q){var D,n;if((this.input=q=f.names[q&&q.toLowerCase?q.toLowerCase():""]||q)&&q.stops)this.stops=q.stops.map(function(A){return new f(A[1])});else{if(q&&q.charAt&&"#"===q.charAt()){var I=q.length;q=parseInt(q.substr(1),16);7===I?D=[(q&16711680)>>16,(q&65280)>>8,q&255,1]:4===I&&(D=[(q&3840)>>4|(q&3840)>>8,(q&240)>>4|q&240,(q&15)<<4|q&15,1])}if(!D)for(n=this.parsers.length;n--&&!D;){var M= this.parsers[n];(I=M.regex.exec(q))&&(D=M.parse(I))}}this.rgba=D||[]};f.prototype.get=function(f){var q=this.input,n=this.rgba;if("undefined"!==typeof this.stops){var I=C(q);I.stops=[].concat(I.stops);this.stops.forEach(function(n,A){I.stops[A]=[I.stops[A][0],n.get(f)]})}else I=n&&r(n[0])?"rgb"===f||!f&&1===n[3]?"rgb("+n[0]+","+n[1]+","+n[2]+")":"a"===f?n[3]:"rgba("+n.join(",")+")":q;return I};f.prototype.brighten=function(f){var q,n=this.rgba;if(this.stops)this.stops.forEach(function(n){n.brighten(f)}); else if(r(f)&&0!==f)for(q=0;3>q;q++)n[q]+=G(255*f),0>n[q]&&(n[q]=0),255<n[q]&&(n[q]=255);return this};f.prototype.setOpacity=function(f){this.rgba[3]=f;return this};f.prototype.tweenTo=function(f,q){var n=this.rgba,I=f.rgba;I.length&&n&&n.length?(f=1!==I[3]||1!==n[3],q=(f?"rgba(":"rgb(")+Math.round(I[0]+(n[0]-I[0])*(1-q))+","+Math.round(I[1]+(n[1]-I[1])*(1-q))+","+Math.round(I[2]+(n[2]-I[2])*(1-q))+(f?","+(I[3]+(n[3]-I[3])*(1-q)):"")+")"):q=f.input||"none";return q};f.names={white:"#ffffff",black:"#000000"}; return f}();q.Color=f;q.color=f.parse;return q.Color});N(r,"Core/Renderer/SVG/SVGElement.js",[r["Core/Color.js"],r["Core/Globals.js"],r["Core/Utilities.js"]],function(q,f,r){var C=f.deg2rad,G=f.doc,B=f.hasTouch,H=f.isFirefox,D=f.noop,n=f.svg,I=f.SVG_NS,M=f.win,A=r.animate,L=r.animObject,E=r.attr,l=r.createElement,v=r.css,x=r.defined,t=r.erase,g=r.extend,c=r.fireEvent,p=r.isArray,h=r.isFunction,e=r.isNumber,a=r.isString,u=r.merge,w=r.objectEach,F=r.pick,y=r.pInt,k=r.stop,z=r.syncTimeout,O=r.uniqueKey; "";r=function(){function K(){this.height=this.element=void 0;this.opacity=1;this.renderer=void 0;this.SVG_NS=I;this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ");this.width=void 0}K.prototype._defaultGetter=function(d){d=F(this[d+"Value"],this[d],this.element?this.element.getAttribute(d):null,0);/^[\-0-9\.]+$/.test(d)&&(d=parseFloat(d));return d};K.prototype._defaultSetter=function(d,b,m){m.setAttribute(b,d)};K.prototype.add=function(d){var b=this.renderer, m=this.element;d&&(this.parentGroup=d);this.parentInverted=d&&d.inverted;"undefined"!==typeof this.textStr&&"text"===this.element.nodeName&&b.buildText(this);this.added=!0;if(!d||d.handleZ||this.zIndex)var a=this.zIndexSetter();a||(d?d.element:b.box).appendChild(m);if(this.onAdd)this.onAdd();return this};K.prototype.addClass=function(d,b){var m=b?"":this.attr("class")||"";d=(d||"").split(/ /g).reduce(function(b,d){-1===m.indexOf(d)&&b.push(d);return b},m?[m]:[]).join(" ");d!==m&&this.attr("class", d);return this};K.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)};K.prototype.align=function(d,b,m){var J,e={};var k=this.renderer;var c=k.alignedObjects;var h,u;if(d){if(this.alignOptions=d,this.alignByTranslate=b,!m||a(m))this.alignTo=J=m||"renderer",t(c,this),c.push(this),m=void 0}else d=this.alignOptions,b=this.alignByTranslate,J=this.alignTo;m=F(m,k[J],k);J=d.align;k=d.verticalAlign;c=(m.x||0)+(d.x||0);var g=(m.y||0)+(d.y||0);"right"===J?h=1: "center"===J&&(h=2);h&&(c+=(m.width-(d.width||0))/h);e[b?"translateX":"x"]=Math.round(c);"bottom"===k?u=1:"middle"===k&&(u=2);u&&(g+=(m.height-(d.height||0))/u);e[b?"translateY":"y"]=Math.round(g);this[this.placed?"animate":"attr"](e);this.placed=!0;this.alignAttr=e;return this};K.prototype.alignSetter=function(d){var b={left:"start",center:"middle",right:"end"};b[d]&&(this.alignValue=d,this.element.setAttribute("text-anchor",b[d]))};K.prototype.animate=function(d,b,m){var a=this,e=L(F(b,this.renderer.globalAnimation, !0));b=e.defer;F(G.hidden,G.msHidden,G.webkitHidden,!1)&&(e.duration=0);0!==e.duration?(m&&(e.complete=m),z(function(){a.element&&A(a,d,e)},b)):(this.attr(d,void 0,m),w(d,function(b,m){e.step&&e.step.call(this,b,{prop:m,pos:1})},this));return this};K.prototype.applyTextOutline=function(d){var b=this.element,m;-1!==d.indexOf("contrast")&&(d=d.replace(/contrast/g,this.renderer.getContrast(b.style.fill)));d=d.split(" ");var a=d[d.length-1];if((m=d[0])&&"none"!==m&&f.svg){this.fakeTS=!0;d=[].slice.call(b.getElementsByTagName("tspan")); this.ySetter=this.xSetter;m=m.replace(/(^[\d\.]+)(.*?)$/g,function(b,m,d){return 2*m+d});this.removeTextOutline(d);var e=b.textContent?/^[\u0591-\u065F\u066A-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(b.textContent):!1;var k=b.firstChild;d.forEach(function(d,J){0===J&&(d.setAttribute("x",b.getAttribute("x")),J=b.getAttribute("y"),d.setAttribute("y",J||0),null===J&&b.setAttribute("y",0));J=d.cloneNode(!0);E(e&&!H?d:J,{"class":"highcharts-text-outline",fill:a,stroke:a,"stroke-width":m,"stroke-linejoin":"round"}); b.insertBefore(J,k)});e&&H&&d[0]&&(d=d[0].cloneNode(!0),d.textContent=" ",b.insertBefore(d,k))}};K.prototype.attr=function(d,b,m,a){var e=this.element,J,c=this,h,u,g=this.symbolCustomAttribs;if("string"===typeof d&&"undefined"!==typeof b){var z=d;d={};d[z]=b}"string"===typeof d?c=(this[d+"Getter"]||this._defaultGetter).call(this,d,e):(w(d,function(b,m){h=!1;a||k(this,m);this.symbolName&&-1!==g.indexOf(m)&&(J||(this.symbolAttr(d),J=!0),h=!0);!this.rotation||"x"!==m&&"y"!==m||(this.doTransform=!0); h||(u=this[m+"Setter"]||this._defaultSetter,u.call(this,b,m,e),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(m)&&this.updateShadows(m,b,u))},this),this.afterSetters());m&&m.call(this);return c};K.prototype.clip=function(d){return this.attr("clip-path",d?"url("+this.renderer.url+"#"+d.id+")":"none")};K.prototype.crisp=function(d,b){b=b||d.strokeWidth||0;var m=Math.round(b)%2/2;d.x=Math.floor(d.x||this.x||0)+m;d.y=Math.floor(d.y||this.y||0)+m;d.width=Math.floor((d.width|| this.width||0)-2*m);d.height=Math.floor((d.height||this.height||0)-2*m);x(d.strokeWidth)&&(d.strokeWidth=b);return d};K.prototype.complexColor=function(d,b,m){var a=this.renderer,e,k,h,g,z,y,F,t,v,K,l=[],E;c(this.renderer,"complexColor",{args:arguments},function(){d.radialGradient?k="radialGradient":d.linearGradient&&(k="linearGradient");if(k){h=d[k];z=a.gradients;y=d.stops;v=m.radialReference;p(h)&&(d[k]=h={x1:h[0],y1:h[1],x2:h[2],y2:h[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===k&&v&& !x(h.gradientUnits)&&(g=h,h=u(h,a.getRadialAttr(v,g),{gradientUnits:"userSpaceOnUse"}));w(h,function(b,m){"id"!==m&&l.push(m,b)});w(y,function(b){l.push(b)});l=l.join(",");if(z[l])K=z[l].attr("id");else{h.id=K=O();var J=z[l]=a.createElement(k).attr(h).add(a.defs);J.radAttr=g;J.stops=[];y.forEach(function(b){0===b[1].indexOf("rgba")?(e=q.parse(b[1]),F=e.get("rgb"),t=e.get("a")):(F=b[1],t=1);b=a.createElement("stop").attr({offset:b[0],"stop-color":F,"stop-opacity":t}).add(J);J.stops.push(b)})}E="url("+ a.url+"#"+K+")";m.setAttribute(b,E);m.gradient=l;d.toString=function(){return E}}})};K.prototype.css=function(d){var b=this.styles,m={},a=this.element,e="",k=!b,c=["textOutline","textOverflow","width"];d&&d.color&&(d.fill=d.color);b&&w(d,function(d,a){b&&b[a]!==d&&(m[a]=d,k=!0)});if(k){b&&(d=g(b,m));if(d)if(null===d.width||"auto"===d.width)delete this.textWidth;else if("text"===a.nodeName.toLowerCase()&&d.width)var h=this.textWidth=y(d.width);this.styles=d;h&&!n&&this.renderer.forExport&&delete d.width; if(a.namespaceURI===this.SVG_NS){var u=function(b,m){return"-"+m.toLowerCase()};w(d,function(b,m){-1===c.indexOf(m)&&(e+=m.replace(/([A-Z])/g,u)+":"+b+";")});e&&E(a,"style",e)}else v(a,d);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),d&&d.textOutline&&this.applyTextOutline(d.textOutline))}return this};K.prototype.dashstyleSetter=function(d){var b=this["stroke-width"];"inherit"===b&&(b=1);if(d=d&&d.toLowerCase()){var m=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(d=m.length;d--;)m[d]=""+y(m[d])*F(b,NaN);d=m.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",d)}};K.prototype.destroy=function(){var d=this,b=d.element||{},m=d.renderer,a=m.isSVG&&"SPAN"===b.nodeName&&d.parentGroup||void 0,e=b.ownerSVGElement;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point= null;k(d);if(d.clipPath&&e){var c=d.clipPath;[].forEach.call(e.querySelectorAll("[clip-path],[CLIP-PATH]"),function(b){-1<b.getAttribute("clip-path").indexOf(c.element.id)&&b.removeAttribute("clip-path")});d.clipPath=c.destroy()}if(d.stops){for(e=0;e<d.stops.length;e++)d.stops[e].destroy();d.stops.length=0;d.stops=void 0}d.safeRemoveChild(b);for(m.styledMode||d.destroyShadows();a&&a.div&&0===a.div.childNodes.length;)b=a.parentGroup,d.safeRemoveChild(a.div),delete a.div,a=b;d.alignTo&&t(m.alignedObjects, d);w(d,function(b,m){d[m]&&d[m].parentGroup===d&&d[m].destroy&&d[m].destroy();delete d[m]})};K.prototype.destroyShadows=function(){(this.shadows||[]).forEach(function(d){this.safeRemoveChild(d)},this);this.shadows=void 0};K.prototype.destroyTextPath=function(d,b){var m=d.getElementsByTagName("text")[0];if(m){if(m.removeAttribute("dx"),m.removeAttribute("dy"),b.element.setAttribute("id",""),this.textPathWrapper&&m.getElementsByTagName("textPath").length){for(d=this.textPathWrapper.element.childNodes;d.length;)m.appendChild(d[0]); m.removeChild(this.textPathWrapper.element)}}else if(d.getAttribute("dx")||d.getAttribute("dy"))d.removeAttribute("dx"),d.removeAttribute("dy");this.textPathWrapper&&(this.textPathWrapper=this.textPathWrapper.destroy())};K.prototype.dSetter=function(d,b,m){p(d)&&("string"===typeof d[0]&&(d=this.renderer.pathToSegments(d)),this.pathArray=d,d=d.reduce(function(b,m,d){return m&&m.join?(d?b+" ":"")+m.join(" "):(m||"").toString()},""));/(NaN| {2}|^$)/.test(d)&&(d="M 0 0");this[b]!==d&&(m.setAttribute(b, d),this[b]=d)};K.prototype.fadeOut=function(d){var b=this;b.animate({opacity:0},{duration:F(d,150),complete:function(){b.attr({y:-9999}).hide()}})};K.prototype.fillSetter=function(d,b,m){"string"===typeof d?m.setAttribute(b,d):d&&this.complexColor(d,b,m)};K.prototype.getBBox=function(d,b){var m,a=this.renderer,e=this.element,k=this.styles,c=this.textStr,u=a.cache,w=a.cacheKeys,z=e.namespaceURI===this.SVG_NS;b=F(b,this.rotation,0);var p=a.styledMode?e&&K.prototype.getStyle.call(e,"font-size"):k&&k.fontSize; if(x(c)){var y=c.toString();-1===y.indexOf("<")&&(y=y.replace(/[0-9]/g,"0"));y+=["",b,p,this.textWidth,k&&k.textOverflow,k&&k.fontWeight].join()}y&&!d&&(m=u[y]);if(!m){if(z||a.forExport){try{var t=this.fakeTS&&function(b){[].forEach.call(e.querySelectorAll(".highcharts-text-outline"),function(m){m.style.display=b})};h(t)&&t("none");m=e.getBBox?g({},e.getBBox()):{width:e.offsetWidth,height:e.offsetHeight};h(t)&&t("")}catch(fa){""}if(!m||0>m.width)m={width:0,height:0}}else m=this.htmlGetBBox();a.isSVG&& (d=m.width,a=m.height,z&&(m.height=a={"11px,17":14,"13px,20":16}[k&&k.fontSize+","+Math.round(a)]||a),b&&(k=b*C,m.width=Math.abs(a*Math.sin(k))+Math.abs(d*Math.cos(k)),m.height=Math.abs(a*Math.cos(k))+Math.abs(d*Math.sin(k))));if(y&&0<m.height){for(;250<w.length;)delete u[w.shift()];u[y]||w.push(y);u[y]=m}}return m};K.prototype.getStyle=function(d){return M.getComputedStyle(this.element||this,"").getPropertyValue(d)};K.prototype.hasClass=function(d){return-1!==(""+this.attr("class")).split(" ").indexOf(d)}; K.prototype.hide=function(d){d?this.attr({y:-9999}):this.attr({visibility:"hidden"});return this};K.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}};K.prototype.init=function(d,b){this.element="span"===b?l(b):G.createElementNS(this.SVG_NS,b);this.renderer=d;c(this,"afterInit")};K.prototype.invert=function(d){this.inverted=d;this.updateTransform();return this};K.prototype.on=function(d,b){var m,a,e=this.element,k;B&&"click"===d?(e.ontouchstart=function(b){m=b.touches[0].clientX;a= b.touches[0].clientY},e.ontouchend=function(d){m&&4<=Math.sqrt(Math.pow(m-d.changedTouches[0].clientX,2)+Math.pow(a-d.changedTouches[0].clientY,2))||b.call(e,d);k=!0;d.preventDefault()},e.onclick=function(m){k||b.call(e,m)}):e["on"+d]=b;return this};K.prototype.opacitySetter=function(d,b,m){this[b]=d;m.setAttribute(b,d)};K.prototype.removeClass=function(d){return this.attr("class",(""+this.attr("class")).replace(a(d)?new RegExp("(^| )"+d+"( |$)"):d," ").replace(/ +/g," ").trim())};K.prototype.removeTextOutline= function(d){for(var b=d.length,m;b--;)m=d[b],"highcharts-text-outline"===m.getAttribute("class")&&t(d,this.element.removeChild(m))};K.prototype.safeRemoveChild=function(d){var b=d.parentNode;b&&b.removeChild(d)};K.prototype.setRadialReference=function(d){var b=this.element.gradient&&this.renderer.gradients[this.element.gradient];this.element.radialReference=d;b&&b.radAttr&&b.animate(this.renderer.getRadialAttr(d,b.radAttr));return this};K.prototype.setTextPath=function(d,b){var m=this.element,a={textAnchor:"text-anchor"}, k=!1,c=this.textPathWrapper,h=!c;b=u(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},b);var g=b.attributes;if(d&&b&&b.enabled){c&&null===c.element.parentNode?(h=!0,c=c.destroy()):c&&this.removeTextOutline.call(c.parentGroup,[].slice.call(m.getElementsByTagName("tspan")));this.options&&this.options.padding&&(g.dx=-this.options.padding);c||(this.textPathWrapper=c=this.renderer.createElement("textPath"),k=!0);var z=c.element;(b=d.element.getAttribute("id"))||d.element.setAttribute("id", b=O());if(h)for(d=m.getElementsByTagName("tspan");d.length;)d[0].setAttribute("y",0),e(g.dx)&&d[0].setAttribute("x",-g.dx),z.appendChild(d[0]);k&&c&&c.add({element:this.text?this.text.element:m});z.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+b);x(g.dy)&&(z.parentNode.setAttribute("dy",g.dy),delete g.dy);x(g.dx)&&(z.parentNode.setAttribute("dx",g.dx),delete g.dx);w(g,function(b,m){z.setAttribute(a[m]||m,b)});m.removeAttribute("transform");this.removeTextOutline.call(c, [].slice.call(m.getElementsByTagName("tspan")));this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=this.updateTransform=D}else c&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(m,d),this.updateTransform(),this.options&&this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this};K.prototype.shadow=function(d,b,m){var a=[],e=this.element,k=!1,c=this.oldShadowOptions;var h={color:"#000000", offsetX:1,offsetY:1,opacity:.15,width:3};var u;!0===d?u=h:"object"===typeof d&&(u=g(h,d));u&&(u&&c&&w(u,function(b,m){b!==c[m]&&(k=!0)}),k&&this.destroyShadows(),this.oldShadowOptions=u);if(!u)this.destroyShadows();else if(!this.shadows){var z=u.opacity/u.width;var p=this.parentInverted?"translate(-1,-1)":"translate("+u.offsetX+", "+u.offsetY+")";for(h=1;h<=u.width;h++){var y=e.cloneNode(!1);var F=2*u.width+1-2*h;E(y,{stroke:d.color||"#000000","stroke-opacity":z*h,"stroke-width":F,transform:p,fill:"none"}); y.setAttribute("class",(y.getAttribute("class")||"")+" highcharts-shadow");m&&(E(y,"height",Math.max(E(y,"height")-F,0)),y.cutHeight=F);b?b.element.appendChild(y):e.parentNode&&e.parentNode.insertBefore(y,e);a.push(y)}this.shadows=a}return this};K.prototype.show=function(d){return this.attr({visibility:d?"inherit":"visible"})};K.prototype.strokeSetter=function(d,b,m){this[b]=d;this.stroke&&this["stroke-width"]?(K.prototype.fillSetter.call(this,this.stroke,"stroke",m),m.setAttribute("stroke-width", this["stroke-width"]),this.hasStroke=!0):"stroke-width"===b&&0===d&&this.hasStroke?(m.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(m.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};K.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var d=this.getStyle("stroke-width"),b=0;if(d.indexOf("px")===d.length-2)b=y(d);else if(""!==d){var m=G.createElementNS(I,"rect");E(m,{width:d,"stroke-width":0}); this.element.parentNode.appendChild(m);b=m.getBBox().width;m.parentNode.removeChild(m)}return b};K.prototype.symbolAttr=function(d){var b=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(m){b[m]=F(d[m],b[m])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})};K.prototype.textSetter=function(d){d!==this.textStr&&(delete this.textPxLength,this.textStr=d,this.added&&this.renderer.buildText(this))};K.prototype.titleSetter=function(d){var b= this.element.getElementsByTagName("title")[0];b||(b=G.createElementNS(this.SVG_NS,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(G.createTextNode(String(F(d,"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")))};K.prototype.toFront=function(){var d=this.element;d.parentNode.appendChild(d);return this};K.prototype.translate=function(d,b){return this.attr({translateX:d,translateY:b})};K.prototype.updateShadows=function(d,b,m){var a=this.shadows; if(a)for(var e=a.length;e--;)m.call(a[e],"height"===d?Math.max(b-(a[e].cutHeight||0),0):"d"===d?this.d:b,d,a[e])};K.prototype.updateTransform=function(){var d=this.translateX||0,b=this.translateY||0,m=this.scaleX,a=this.scaleY,e=this.inverted,k=this.rotation,c=this.matrix,h=this.element;e&&(d+=this.width,b+=this.height);d=["translate("+d+","+b+")"];x(c)&&d.push("matrix("+c.join(",")+")");e?d.push("rotate(90) scale(-1,1)"):k&&d.push("rotate("+k+" "+F(this.rotationOriginX,h.getAttribute("x"),0)+" "+ F(this.rotationOriginY,h.getAttribute("y")||0)+")");(x(m)||x(a))&&d.push("scale("+F(m,1)+" "+F(a,1)+")");d.length&&h.setAttribute("transform",d.join(" "))};K.prototype.visibilitySetter=function(d,b,m){"inherit"===d?m.removeAttribute(b):this[b]!==d&&m.setAttribute(b,d);this[b]=d};K.prototype.xGetter=function(d){"circle"===this.element.nodeName&&("x"===d?d="cx":"y"===d&&(d="cy"));return this._defaultGetter(d)};K.prototype.zIndexSetter=function(d,b){var m=this.renderer,a=this.parentGroup,e=(a||m).element|| m.box,k=this.element,c=!1;m=e===m.box;var h=this.added;var u;x(d)?(k.setAttribute("data-z-index",d),d=+d,this[b]===d&&(h=!1)):x(this[b])&&k.removeAttribute("data-z-index");this[b]=d;if(h){(d=this.zIndex)&&a&&(a.handleZ=!0);b=e.childNodes;for(u=b.length-1;0<=u&&!c;u--){a=b[u];h=a.getAttribute("data-z-index");var g=!x(h);if(a!==k)if(0>d&&g&&!m&&!u)e.insertBefore(k,b[u]),c=!0;else if(y(h)<=d||g&&(!x(d)||0<=d))e.insertBefore(k,b[u+1]||null),c=!0}c||(e.insertBefore(k,b[m?3:0]||null),c=!0)}return c};return K}(); r.prototype["stroke-widthSetter"]=r.prototype.strokeSetter;r.prototype.yGetter=r.prototype.xGetter;r.prototype.matrixSetter=r.prototype.rotationOriginXSetter=r.prototype.rotationOriginYSetter=r.prototype.rotationSetter=r.prototype.scaleXSetter=r.prototype.scaleYSetter=r.prototype.translateXSetter=r.prototype.translateYSetter=r.prototype.verticalAlignSetter=function(a,d){this[d]=a;this.doTransform=!0};f.SVGElement=r;return f.SVGElement});N(r,"Core/Renderer/SVG/SVGLabel.js",[r["Core/Renderer/SVG/SVGElement.js"], r["Core/Utilities.js"]],function(q,f){var r=this&&this.__extends||function(){var f=function(n,M){f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,n){f.__proto__=n}||function(f,n){for(var E in n)n.hasOwnProperty(E)&&(f[E]=n[E])};return f(n,M)};return function(n,M){function A(){this.constructor=n}f(n,M);n.prototype=null===M?Object.create(M):(A.prototype=M.prototype,new A)}}(),C=f.defined,G=f.extend,B=f.isNumber,H=f.merge,D=f.removeEvent;return function(f){function n(M,A,q,E,l,v,x, t,g,c){var p=f.call(this)||this;p.init(M,"g");p.textStr=A;p.x=q;p.y=E;p.anchorX=v;p.anchorY=x;p.baseline=g;p.className=c;"button"!==c&&p.addClass("highcharts-label");c&&p.addClass("highcharts-"+c);p.text=M.text("",0,0,t).attr({zIndex:1});if("string"===typeof l){var h=/^url\((.*?)\)$/.test(l);if(p.renderer.symbols[l]||h)p.symbolKey=l}p.bBox=n.emptyBBox;p.padding=3;p.paddingLeft=0;p.baselineOffset=0;p.needsBox=M.styledMode||h;p.deferredAttr={};p.alignFactor=0;return p}r(n,f);n.prototype.alignSetter= function(n){n={left:0,center:.5,right:1}[n];n!==this.alignFactor&&(this.alignFactor=n,this.bBox&&B(this.xSetting)&&this.attr({x:this.xSetting}))};n.prototype.anchorXSetter=function(n,f){this.anchorX=n;this.boxAttr(f,Math.round(n)-this.getCrispAdjust()-this.xSetting)};n.prototype.anchorYSetter=function(n,f){this.anchorY=n;this.boxAttr(f,n-this.ySetting)};n.prototype.boxAttr=function(n,f){this.box?this.box.attr(n,f):this.deferredAttr[n]=f};n.prototype.css=function(f){if(f){var A={};f=H(f);n.textProps.forEach(function(n){"undefined"!== typeof f[n]&&(A[n]=f[n],delete f[n])});this.text.css(A);var M="fontSize"in A||"fontWeight"in A;if("width"in A||M)this.updateBoxSize(),M&&this.updateTextPadding()}return q.prototype.css.call(this,f)};n.prototype.destroy=function(){D(this.element,"mouseenter");D(this.element,"mouseleave");this.text&&this.text.destroy();this.box&&(this.box=this.box.destroy());q.prototype.destroy.call(this)};n.prototype.fillSetter=function(n,f){n&&(this.needsBox=!0);this.fill=n;this.boxAttr(f,n)};n.prototype.getBBox= function(){var n=this.bBox,f=this.padding;return{width:n.width+2*f,height:n.height+2*f,x:n.x-f,y:n.y-f}};n.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2};n.prototype.heightSetter=function(n){this.heightSetting=n};n.prototype.on=function(n,f){var A=this,E=A.text,l=E&&"SPAN"===E.element.tagName?E:void 0;if(l){var v=function(v){("mouseenter"===n||"mouseleave"===n)&&v.relatedTarget instanceof Element&&(A.element.contains(v.relatedTarget)||l.element.contains(v.relatedTarget))||f.call(A.element,v)};l.on(n,v)}q.prototype.on.call(A,n,v||f);return A};n.prototype.onAdd=function(){var n=this.textStr;this.text.add(this);this.attr({text:C(n)?n:"",x:this.x,y:this.y});this.box&&C(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})};n.prototype.paddingSetter=function(n){C(n)&&n!==this.padding&&(this.padding=n,this.updateTextPadding())};n.prototype.paddingLeftSetter=function(n){C(n)&& n!==this.paddingLeft&&(this.paddingLeft=n,this.updateTextPadding())};n.prototype.rSetter=function(n,f){this.boxAttr(f,n)};n.prototype.shadow=function(n){n&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(n));return this};n.prototype.strokeSetter=function(n,f){this.stroke=n;this.boxAttr(f,n)};n.prototype["stroke-widthSetter"]=function(n,f){n&&(this.needsBox=!0);this["stroke-width"]=n;this.boxAttr(f,n)};n.prototype["text-alignSetter"]=function(n){this.textAlign=n};n.prototype.textSetter= function(n){"undefined"!==typeof n&&this.text.attr({text:n});this.updateBoxSize();this.updateTextPadding()};n.prototype.updateBoxSize=function(){var f=this.text.element.style,A={},q=this.padding,E=this.paddingLeft,l=B(this.widthSetting)&&B(this.heightSetting)&&!this.textAlign||!C(this.text.textStr)?n.emptyBBox:this.text.getBBox();this.width=(this.widthSetting||l.width||0)+2*q+E;this.height=(this.heightSetting||l.height||0)+2*q;this.baselineOffset=q+Math.min(this.renderer.fontMetrics(f&&f.fontSize, this.text).b,l.height||Infinity);this.needsBox&&(this.box||(f=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect(),f.addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),f.add(this),f=this.getCrispAdjust(),A.x=f,A.y=(this.baseline?-this.baselineOffset:0)+f),A.width=Math.round(this.width),A.height=Math.round(this.height),this.box.attr(G(A,this.deferredAttr)),this.deferredAttr={});this.bBox=l};n.prototype.updateTextPadding= function(){var n=this.text,f=this.baseline?0:this.baselineOffset,q=this.paddingLeft+this.padding;C(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(q+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width));if(q!==n.x||f!==n.y)n.attr("x",q),n.hasBoxWidthChanged&&(this.bBox=n.getBBox(!0),this.updateBoxSize()),"undefined"!==typeof f&&n.attr("y",f);n.x=q;n.y=f};n.prototype.widthSetter=function(n){this.widthSetting=B(n)?n:void 0};n.prototype.xSetter= function(n){this.x=n;this.alignFactor&&(n-=this.alignFactor*((this.widthSetting||this.bBox.width)+2*this.padding),this["forceAnimate:x"]=!0);this.xSetting=Math.round(n);this.attr("translateX",this.xSetting)};n.prototype.ySetter=function(n){this.ySetting=this.y=Math.round(n);this.attr("translateY",this.ySetting)};n.emptyBBox={width:0,height:0,x:0,y:0};n.textProps="color cursor direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "); return n}(q)});N(r,"Core/Renderer/SVG/SVGRenderer.js",[r["Core/Color.js"],r["Core/Globals.js"],r["Core/Renderer/SVG/SVGElement.js"],r["Core/Renderer/SVG/SVGLabel.js"],r["Core/Utilities.js"]],function(q,f,r,C,G){var B=G.addEvent,H=G.attr,D=G.createElement,n=G.css,I=G.defined,M=G.destroyObjectProperties,A=G.extend,L=G.isArray,E=G.isNumber,l=G.isObject,v=G.isString,x=G.merge,t=G.objectEach,g=G.pick,c=G.pInt,p=G.splat,h=G.uniqueKey,e=f.charts,a=f.deg2rad,u=f.doc,w=f.isFirefox,F=f.isMS,y=f.isWebKit;G= f.noop;var k=f.svg,z=f.SVG_NS,O=f.symbolSizes,K=f.win,d=function(){function b(b,d,a,e,k,c,h){this.width=this.url=this.style=this.isSVG=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=this.box=this.alignedObjects=void 0;this.init(b,d,a,e,k,c,h)}b.prototype.init=function(b,d,a,e,k,c,h){var m=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});h||m.css(this.getStyle(e));e=m.element;b.appendChild(e); H(b,"dir","ltr");-1===b.innerHTML.indexOf("xmlns")&&H(e,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=e;this.boxWrapper=m;this.alignedObjects=[];this.url=(w||y)&&u.getElementsByTagName("base").length?K.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highcharts 8.2.0"));this.defs=this.createElement("defs").add();this.allowHTML=c;this.forExport=k;this.styledMode=h; this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(d,a,!1);var J;w&&b.getBoundingClientRect&&(d=function(){n(b,{left:0,top:0});J=b.getBoundingClientRect();n(b,{left:Math.ceil(J.left)-J.left+"px",top:Math.ceil(J.top)-J.top+"px"})},d(),this.unSubPixelFix=B(K,"resize",d))};b.prototype.definition=function(b){function m(b,a){var e;p(b).forEach(function(b){var k=d.createElement(b.tagName),J={};t(b,function(b,m){"tagName"!==m&&"children"!==m&&"textContent"!==m&&(J[m]=b)});k.attr(J); k.add(a||d.defs);b.textContent&&k.element.appendChild(u.createTextNode(b.textContent));m(b.children||[],k);e=k});return e}var d=this;return m(b)};b.prototype.getStyle=function(b){return this.style=A({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},b)};b.prototype.setStyle=function(b){this.boxWrapper.css(this.getStyle(b))};b.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width};b.prototype.destroy=function(){var b=this.defs;this.box= null;this.boxWrapper=this.boxWrapper.destroy();M(this.gradients||{});this.gradients=null;b&&(this.defs=b.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null};b.prototype.createElement=function(b){var m=new this.Element;m.init(this,b);return m};b.prototype.getRadialAttr=function(b,d){return{cx:b[0]-b[2]/2+d.cx*b[2],cy:b[1]-b[2]/2+d.cy*b[2],r:d.r*b[2]}};b.prototype.truncate=function(b,d,a,e,k,c,h){var m=this,J=b.rotation,P,g=e?1:0,w=(a||e).length,z=w,p=[],y=function(b){d.firstChild&& d.removeChild(d.firstChild);b&&d.appendChild(u.createTextNode(b))},Q=function(c,J){J=J||c;if("undefined"===typeof p[J])if(d.getSubStringLength)try{p[J]=k+d.getSubStringLength(0,e?J+1:J)}catch(da){""}else m.getSpanWidth&&(y(h(a||e,c)),p[J]=k+m.getSpanWidth(b,d));return p[J]},F;b.rotation=0;var t=Q(d.textContent.length);if(F=k+t>c){for(;g<=w;)z=Math.ceil((g+w)/2),e&&(P=h(e,z)),t=Q(z,P&&P.length-1),g===w?g=w+1:t>c?w=z-1:g=z;0===w?y(""):a&&w===a.length-1||y(P||h(a||e,z))}e&&e.splice(0,z);b.actualWidth= t;b.rotation=J;return F};b.prototype.buildText=function(b){var m=b.element,d=this,a=d.forExport,e=g(b.textStr,"").toString(),h=-1!==e.indexOf("<"),w=m.childNodes,p,y=H(m,"x"),F=b.styles,l=b.textWidth,K=F&&F.lineHeight,x=F&&F.textOutline,O=F&&"ellipsis"===F.textOverflow,f=F&&"nowrap"===F.whiteSpace,E=F&&F.fontSize,A,q=w.length;F=l&&!b.added&&this.box;var I=function(b){var a;d.styledMode||(a=/(px|em)$/.test(b&&b.style.fontSize)?b.style.fontSize:E||d.style.fontSize||12);return K?c(K):d.fontMetrics(a, b.getAttribute("style")?b:m).h},L=function(b,m){t(d.escapes,function(d,a){m&&-1!==m.indexOf(d)||(b=b.toString().replace(new RegExp(d,"g"),a))});return b},D=function(b,m){var d=b.indexOf("<");b=b.substring(d,b.indexOf(">")-d);d=b.indexOf(m+"=");if(-1!==d&&(d=d+m.length+1,m=b.charAt(d),'"'===m||"'"===m))return b=b.substring(d+1),b.substring(0,b.indexOf(m))},r=/<br.*?>/g;var B=[e,O,f,K,x,E,l].join();if(B!==b.textCache){for(b.textCache=B;q--;)m.removeChild(w[q]);h||x||O||l||-1!==e.indexOf(" ")&&(!f|| r.test(e))?(F&&F.appendChild(m),h?(e=d.styledMode?e.replace(/<(b|strong)>/g,'<span class="highcharts-strong">').replace(/<(i|em)>/g,'<span class="highcharts-emphasized">'):e.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">'),e=e.replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(r)):e=[e],e=e.filter(function(b){return""!==b}),e.forEach(function(e,c){var J=0,h=0;e=e.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g, "</span>|||");var g=e.split("|||");g.forEach(function(e){if(""!==e||1===g.length){var P={},w=u.createElementNS(d.SVG_NS,"tspan"),F,Q;(F=D(e,"class"))&&H(w,"class",F);if(F=D(e,"style"))F=F.replace(/(;| |^)color([ :])/,"$1fill$2"),H(w,"style",F);if((Q=D(e,"href"))&&!a&&-1===Q.split(":")[0].toLowerCase().indexOf("javascript")){var t=u.createElementNS(d.SVG_NS,"a");H(t,"href",Q);H(w,"class","highcharts-anchor");t.appendChild(w);d.styledMode||n(w,{cursor:"pointer"})}e=L(e.replace(/<[a-zA-Z\/](.|\n)*?>/g, "")||" ");if(" "!==e){w.appendChild(u.createTextNode(e));J?P.dx=0:c&&null!==y&&(P.x=y);H(w,P);m.appendChild(t||w);!J&&A&&(!k&&a&&n(w,{display:"block"}),H(w,"dy",I(w)));if(l){var v=e.replace(/([^\^])-/g,"$1- ").split(" ");P=!f&&(1<g.length||c||1<v.length);t=0;Q=I(w);if(O)p=d.truncate(b,w,e,void 0,0,Math.max(0,l-parseInt(E||12,10)),function(b,m){return b.substring(0,m)+"\u2026"});else if(P)for(;v.length;)v.length&&!f&&0<t&&(w=u.createElementNS(z,"tspan"),H(w,{dy:Q,x:y}),F&&H(w,"style",F),w.appendChild(u.createTextNode(v.join(" ").replace(/- /g, "-"))),m.appendChild(w)),d.truncate(b,w,null,v,0===t?h:0,l,function(b,m){return v.slice(0,m).join(" ").replace(/- /g,"-")}),h=b.actualWidth,t++}J++}}});A=A||m.childNodes.length}),O&&p&&b.attr("title",L(b.textStr||"",["&lt;","&gt;"])),F&&F.removeChild(m),v(x)&&b.applyTextOutline&&b.applyTextOutline(x)):m.appendChild(u.createTextNode(L(e)))}};b.prototype.getContrast=function(b){b=q.parse(b).rgba;b[0]*=1;b[1]*=1.2;b[2]*=.5;return 459<b[0]+b[1]+b[2]?"#000000":"#FFFFFF"};b.prototype.button=function(b, d,a,e,k,c,h,u,g,w){var m=this.label(b,d,a,g,void 0,void 0,w,void 0,"button"),J=0,P=this.styledMode;b=(k=k?x(k):k)&&k.style||{};k&&k.style&&delete k.style;m.attr(x({padding:8,r:2},k));if(!P){k=x({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},{style:b},k);var z=k.style;delete k.style;c=x(k,{fill:"#e6e6e6"},c);var p=c.style;delete c.style;h=x(k,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},h);var y=h.style;delete h.style;u= x(k,{style:{color:"#cccccc"}},u);var Q=u.style;delete u.style}B(m.element,F?"mouseover":"mouseenter",function(){3!==J&&m.setState(1)});B(m.element,F?"mouseout":"mouseleave",function(){3!==J&&m.setState(J)});m.setState=function(b){1!==b&&(m.state=J=b);m.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][b||0]);P||m.attr([k,c,h,u][b||0]).css([z,p,y,Q][b||0])};P||m.attr(k).css(A({cursor:"default"},z));return m.on("click", function(b){3!==J&&e.call(m,b)})};b.prototype.crispLine=function(b,d,a){void 0===a&&(a="round");var m=b[0],e=b[1];m[1]===e[1]&&(m[1]=e[1]=Math[a](m[1])-d%2/2);m[2]===e[2]&&(m[2]=e[2]=Math[a](m[2])+d%2/2);return b};b.prototype.path=function(b){var m=this.styledMode?{}:{fill:"none"};L(b)?m.d=b:l(b)&&A(m,b);return this.createElement("path").attr(m)};b.prototype.circle=function(b,d,a){b=l(b)?b:"undefined"===typeof b?{}:{x:b,y:d,r:a};d=this.createElement("circle");d.xSetter=d.ySetter=function(b,m,d){d.setAttribute("c"+ m,b)};return d.attr(b)};b.prototype.arc=function(b,d,a,e,k,c){l(b)?(e=b,d=e.y,a=e.r,b=e.x):e={innerR:e,start:k,end:c};b=this.symbol("arc",b,d,a,a,e);b.r=a;return b};b.prototype.rect=function(b,d,a,e,k,c){k=l(b)?b.r:k;var m=this.createElement("rect");b=l(b)?b:"undefined"===typeof b?{}:{x:b,y:d,width:Math.max(a,0),height:Math.max(e,0)};this.styledMode||("undefined"!==typeof c&&(b.strokeWidth=c,b=m.crisp(b)),b.fill="none");k&&(b.r=k);m.rSetter=function(b,d,a){m.r=b;H(a,{rx:b,ry:b})};m.rGetter=function(){return m.r}; return m.attr(b)};b.prototype.setSize=function(b,d,a){var m=this.alignedObjects,e=m.length;this.width=b;this.height=d;for(this.boxWrapper.animate({width:b,height:d},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:g(a,!0)?void 0:0});e--;)m[e].align()};b.prototype.g=function(b){var m=this.createElemen