highcharts
Version:
JavaScript charting framework
105 lines (103 loc) • 290 kB
JavaScript
/*
Highcharts JS v9.0.1 (2021-02-15)
(c) 2009-2021 Torstein Honsi
License: www.highcharts.com/license
*/
(function(W,P){"object"===typeof module&&module.exports?(P["default"]=P,module.exports=W.document?P(W):P):"function"===typeof define&&define.amd?define("highcharts/highcharts",function(){return P(W)}):(W.Highcharts&&W.Highcharts.error(16,!0),W.Highcharts=P(W))})("undefined"!==typeof window?window:this,function(W){function P(f,d,k,x){f.hasOwnProperty(d)||(f[d]=x.apply(null,k))}var k={};P(k,"Core/Globals.js",[],function(){var f="undefined"!==typeof W?W:"undefined"!==typeof window?window:{},d=f.document,
k=f.navigator&&f.navigator.userAgent||"",x=d&&d.createElementNS&&!!d.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,B=/(edge|msie|trident)/i.test(k)&&!f.opera,G=-1!==k.indexOf("Firefox"),D=-1!==k.indexOf("Chrome"),H=G&&4>parseInt(k.split("Firefox/")[1],10),t=function(){};return{product:"Highcharts",version:"9.0.1",deg2rad:2*Math.PI/360,doc:d,hasBidiBug:H,hasTouch:!!f.TouchEvent,isMS:B,isWebKit:-1!==k.indexOf("AppleWebKit"),isFirefox:G,isChrome:D,isSafari:!D&&-1!==k.indexOf("Safari"),
isTouchDevice:/(Mobile|Android|Windows Phone)/.test(k),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},supportsPassiveEvents:function(){var C=!1;if(!B){var l=Object.defineProperty({},"passive",{get:function(){C=!0}});f.addEventListener&&f.removeEventListener&&(f.addEventListener("testPassive",t,l),f.removeEventListener("testPassive",t,l))}return C}(),symbolSizes:{},svg:x,win:f,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:t,charts:[],dateFormats:{}}});P(k,"Core/Utilities.js",
[k["Core/Globals.js"]],function(f){function d(a,c,v,L){var p=c?"Highcharts error":"Highcharts warning";32===a&&(a=p+": Deprecated member");var K=l(a),h=K?p+" #"+a+": www.highcharts.com/errors/"+a+"/":a.toString();p=function(){if(c)throw Error(h);b.console&&-1===d.messages.indexOf(h)&&console.warn(h)};if("undefined"!==typeof L){var g="";K&&(h+="?");m(L,function(p,a){g+="\n - "+a+": "+p;K&&(h+=encodeURI(a)+"="+encodeURI(p))});h+=g}v?e(v,"displayError",{code:a,message:h,params:L},p):p();d.messages.push(h)}
function k(){var a,b=arguments,v={},L=function(p,a){"object"!==typeof p&&(p={});m(a,function(b,u){"__proto__"!==u&&"constructor"!==u&&(!H(b,!0)||C(b)||t(b)?p[u]=a[u]:p[u]=L(p[u]||{},b))});return p};!0===b[0]&&(v=b[1],b=Array.prototype.slice.call(b,2));var p=b.length;for(a=0;a<p;a++)v=L(v,b[a]);return v}function x(a,b){var v={};m(a,function(L,p){if(H(a[p],!0)&&!a.nodeType&&b[p])L=x(a[p],b[p]),Object.keys(L).length&&(v[p]=L);else if(H(a[p])||a[p]!==b[p])v[p]=a[p]});return v}function B(a,b){return parseInt(a,
b||10)}function G(a){return"string"===typeof a}function D(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a}function H(a,b){return!!a&&"object"===typeof a&&(!b||!D(a))}function t(a){return H(a)&&"number"===typeof a.nodeType}function C(a){var b=a&&a.constructor;return!(!H(a,!0)||t(a)||!b||!b.name||"Object"===b.name)}function l(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a}function E(a){return"undefined"!==typeof a&&null!==a}function g(a,
b,v){var L;G(b)?E(v)?a.setAttribute(b,v):a&&a.getAttribute&&((L=a.getAttribute(b))||"class"!==b||(L=a.getAttribute(b+"Name"))):m(b,function(p,b){a.setAttribute(b,p)});return L}function y(a,b){var v;a||(a={});for(v in b)a[v]=b[v];return a}function c(){for(var a=arguments,b=a.length,v=0;v<b;v++){var L=a[v];if("undefined"!==typeof L&&null!==L)return L}}function q(a,b){f.isMS&&!f.svg&&b&&"undefined"!==typeof b.opacity&&(b.filter="alpha(opacity="+100*b.opacity+")");y(a.style,b)}function n(b,e,v,L,p){b=
a.createElement(b);e&&y(b,e);p&&q(b,{padding:"0",border:"none",margin:"0"});v&&q(b,v);L&&L.appendChild(b);return b}function A(a,b){return parseFloat(a.toPrecision(b||14))}function M(a,b,v,L){a=+a||0;b=+b;var p=f.defaultOptions.lang,K=(a.toString().split(".")[1]||"").split("e")[0].length,e=a.toString().split("e"),h=b;if(-1===b)b=Math.min(K,20);else if(!l(b))b=2;else if(b&&e[1]&&0>e[1]){var u=b+ +e[1];0<=u?(e[0]=(+e[0]).toExponential(u).split("e")[0],b=u):(e[0]=e[0].split(".")[0]||0,a=20>b?(e[0]*Math.pow(10,
e[1])).toFixed(b):0,e[1]=0)}var m=(Math.abs(e[1]?e[0]:a)+Math.pow(10,-Math.max(b,K)-1)).toFixed(b);K=String(B(m));u=3<K.length?K.length%3:0;v=c(v,p.decimalPoint);L=c(L,p.thousandsSep);a=(0>a?"-":"")+(u?K.substr(0,u)+L:"");a=0>+e[1]&&!h?"0":a+K.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+L);b&&(a+=v+m.slice(-b));e[1]&&0!==+a&&(a+="e"+e[1]);return a}function z(a,b){if(!a)return b;var v=a.split(".").reverse();if(1===v.length)return b[a];for(a=v.pop();"undefined"!==typeof a&&"undefined"!==typeof b&&null!==
b;)b=b[a],a=v.pop();return b}function m(a,b,v){for(var e in a)Object.hasOwnProperty.call(a,e)&&b.call(v||a[e],a[e],e,a)}function r(a,b,v){function e(p,b){var u=a.removeEventListener||f.removeEventListenerPolyfill;u&&u.call(a,p,b,!1)}function p(p){var u;if(a.nodeName){if(b){var v={};v[b]=!0}else v=p;m(v,function(a,b){if(p[b])for(u=p[b].length;u--;)e(b,p[b][u].fn)})}}var K="function"===typeof a&&a.prototype||a;if(Object.hasOwnProperty.call(K,"hcEvents")){var h=K.hcEvents;b?(K=h[b]||[],v?(h[b]=K.filter(function(a){return v!==
a.fn}),e(b,v)):(p(h),h[b]=[])):(p(h),delete K.hcEvents)}}function e(b,e,v,L){v=v||{};if(a.createEvent&&(b.dispatchEvent||b.fireEvent)){var p=a.createEvent("Events");p.initEvent(e,!0,!0);y(p,v);b.dispatchEvent?b.dispatchEvent(p):b.fireEvent(e,p)}else if(b.hcEvents){v.target||y(v,{preventDefault:function(){v.defaultPrevented=!0},target:b,type:e});p=[];for(var K=b,h=!1;K.hcEvents;)Object.hasOwnProperty.call(K,"hcEvents")&&K.hcEvents[e]&&(p.length&&(h=!0),p.unshift.apply(p,K.hcEvents[e])),K=Object.getPrototypeOf(K);
h&&p.sort(function(a,p){return a.order-p.order});p.forEach(function(a){!1===a.fn.call(b,v)&&v.preventDefault()})}L&&!v.defaultPrevented&&L.call(b,v)}var h=f.charts,a=f.doc,b=f.win;"";(d||(d={})).messages=[];var w;Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};var J=Array.prototype.find?function(a,b){return a.find(b)}:function(a,b){var v,e=a.length;for(v=0;v<e;v++)if(b(a[v],v))return a[v]};m({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(a,b){f[b]=
function(v){var e;d(32,!1,void 0,(e={},e["Highcharts."+b]="use Array."+a,e));return Array.prototype[a].apply(v,[].slice.call(arguments,1))}});var O,F=function(){var a=Math.random().toString(36).substring(2,9)+"-",b=0;return function(){return"highcharts-"+(O?"":a)+b++}}(),N=f.getOptions=function(){return f.defaultOptions},R=f.setOptions=function(a){f.defaultOptions=k(!0,f.defaultOptions,a);(a.time||a.global)&&f.time.update(k(f.defaultOptions.global,f.defaultOptions.time,a.global,a.time));return f.defaultOptions};
b.jQuery&&(b.jQuery.fn.highcharts=function(){var a=[].slice.call(arguments);if(this[0])return a[0]?(new (f[G(a[0])?a.shift():"Chart"])(this[0],a[0],a[1]),this):h[g(this[0],"data-highcharts-chart")]});return{addEvent:function(a,b,v,e){void 0===e&&(e={});var p="function"===typeof a&&a.prototype||a;Object.hasOwnProperty.call(p,"hcEvents")||(p.hcEvents={});p=p.hcEvents;f.Point&&a instanceof f.Point&&a.series&&a.series.chart&&(a.series.chart.runTrackerClick=!0);var K=a.addEventListener||f.addEventListenerPolyfill;
K&&K.call(a,b,v,f.supportsPassiveEvents?{passive:void 0===e.passive?-1!==b.indexOf("touch"):e.passive,capture:!1}:!1);p[b]||(p[b]=[]);p[b].push({fn:v,order:"number"===typeof e.order?e.order:Infinity});p[b].sort(function(a,b){return a.order-b.order});return function(){r(a,b,v)}},arrayMax:function(a){for(var b=a.length,v=a[0];b--;)a[b]>v&&(v=a[b]);return v},arrayMin:function(a){for(var b=a.length,v=a[0];b--;)a[b]<v&&(v=a[b]);return v},attr:g,clamp:function(a,b,v){return a>b?a<v?a:v:b},cleanRecursively:x,
clearTimeout:function(a){E(a)&&clearTimeout(a)},correctFloat:A,createElement:n,css:q,defined:E,destroyObjectProperties:function(a,b){m(a,function(v,e){v&&v!==b&&v.destroy&&v.destroy();delete a[e]})},discardElement:function(a){w||(w=n("div"));a&&w.appendChild(a);w.innerHTML=""},erase:function(a,b){for(var v=a.length;v--;)if(a[v]===b){a.splice(v,1);break}},error:d,extend:y,extendClass:function(a,b){var v=function(){};v.prototype=new a;y(v.prototype,b);return v},find:J,fireEvent:e,format:function(a,
b,v){var e="{",p=!1,K=[],h=/f$/,c=/\.([0-9])/,u=f.defaultOptions.lang,m=v&&v.time||f.time;for(v=v&&v.numberFormatter||M;a;){var I=a.indexOf(e);if(-1===I)break;var g=a.slice(0,I);if(p){g=g.split(":");e=z(g.shift()||"",b);if(g.length&&"number"===typeof e)if(g=g.join(":"),h.test(g)){var w=parseInt((g.match(c)||["","-1"])[1],10);null!==e&&(e=v(e,w,u.decimalPoint,-1<g.indexOf(",")?u.thousandsSep:""))}else e=m.dateFormat(g,e);K.push(e)}else K.push(g);a=a.slice(I+1);e=(p=!p)?"}":"{"}K.push(a);return K.join("")},
getMagnitude:function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))},getNestedProperty:z,getOptions:N,getStyle:function(a,e,v){if("width"===e)return e=Math.min(a.offsetWidth,a.scrollWidth),v=a.getBoundingClientRect&&a.getBoundingClientRect().width,v<e&&v>=e-1&&(e=Math.floor(v)),Math.max(0,e-f.getStyle(a,"padding-left")-f.getStyle(a,"padding-right"));if("height"===e)return Math.max(0,Math.min(a.offsetHeight,a.scrollHeight)-f.getStyle(a,"padding-top")-f.getStyle(a,"padding-bottom"));b.getComputedStyle||
d(27,!0);if(a=b.getComputedStyle(a,void 0))a=a.getPropertyValue(e),c(v,"opacity"!==e)&&(a=B(a));return a},inArray:function(a,b,v){d(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"});return b.indexOf(a,v)},isArray:D,isClass:C,isDOMElement:t,isFunction:function(a){return"function"===typeof a},isNumber:l,isObject:H,isString:G,keys:function(a){d(32,!1,void 0,{"Highcharts.keys":"use Object.keys"});return Object.keys(a)},merge:k,normalizeTickInterval:function(a,b,v,e,p){var K=a;v=c(v,1);var h=a/
v;b||(b=p?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===e&&(1===v?b=b.filter(function(a){return 0===a%1}):.1>=v&&(b=[1/v])));for(e=0;e<b.length&&!(K=b[e],p&&K*v>=a||!p&&h<=(b[e]+(b[e+1]||b[e]))/2);e++);return K=A(K*v,-Math.round(Math.log(.001)/Math.LN10))},numberFormat:M,objectEach:m,offset:function(e){var h=a.documentElement;e=e.parentElement||e.parentNode?e.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:e.top+(b.pageYOffset||h.scrollTop)-(h.clientTop||0),left:e.left+(b.pageXOffset||
h.scrollLeft)-(h.clientLeft||0),width:e.width,height:e.height}},pad:function(a,b,v){return Array((b||2)+1-String(a).replace("-","").length).join(v||"0")+a},pick:c,pInt:B,relativeLength:function(a,b,v){return/%$/.test(a)?b*parseFloat(a)/100+(v||0):parseFloat(a)},removeEvent:r,setOptions:R,splat:function(a){return D(a)?a:[a]},stableSort:function(a,b){var v=a.length,e,p;for(p=0;p<v;p++)a[p].safeI=p;a.sort(function(a,p){e=b(a,p);return 0===e?a.safeI-p.safeI:e});for(p=0;p<v;p++)delete a[p].safeI},syncTimeout:function(a,
b,v){if(0<b)return setTimeout(a,b,v);a.call(0,v);return-1},timeUnits:{millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5},uniqueKey:F,useSerialIds:function(a){return O=c(a,O)},wrap:function(a,b,v){var e=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments),b=arguments,h=this;h.proceed=function(){e.apply(h,arguments.length?arguments:b)};a.unshift(e);a=v.apply(this,a);h.proceed=null;return a}}}});P(k,"Core/Renderer/HTML/AST.js",[k["Core/Globals.js"],
k["Core/Utilities.js"]],function(f,d){var k=f.SVG_NS,x=d.attr,B=d.createElement,G=d.discardElement,D=d.error,H=d.isString,t=d.objectEach,C=d.splat;"";var l=!1;try{l=!!(new DOMParser).parseFromString("","text/html")}catch(E){}return function(){function E(g){this.nodes="string"===typeof g?this.parseMarkup(g):g}E.filterUserAttributes=function(g){t(g,function(y,c){var q=!0;-1===E.allowedAttributes.indexOf(c)&&(q=!1);-1!==["background","dynsrc","href","lowsrc","src"].indexOf(c)&&(q=H(y)&&E.allowedReferences.some(function(c){return 0===
y.indexOf(c)}));q||(D("Highcharts warning: Invalid attribute '"+c+"' in config"),delete g[c])});return g};E.setElementHTML=function(g,y){g.innerHTML="";y&&(new E(y)).addToDOM(g)};E.prototype.addToDOM=function(g){function y(c,g){var n;C(c).forEach(function(c){var q=c.tagName,A=c.textContent?f.doc.createTextNode(c.textContent):void 0;if(q)if("#text"===q)var m=A;else if(-1!==E.allowedTags.indexOf(q)){q=f.doc.createElementNS("svg"===q?k:g.namespaceURI||k,q);var r=c.attributes||{};t(c,function(e,h){"tagName"!==
h&&"attributes"!==h&&"children"!==h&&"textContent"!==h&&(r[h]=e)});x(q,E.filterUserAttributes(r));A&&q.appendChild(A);y(c.children||[],q);m=q}else D("Highcharts warning: Invalid tagName '"+q+"' in config");m&&g.appendChild(m);n=m});return n}return y(this.nodes,g)};E.prototype.parseMarkup=function(g){var y=[];if(l)g=(new DOMParser).parseFromString(g,"text/html");else{var c=B("div");c.innerHTML=g;g={body:c}}var q=function(c,g){var n=c.nodeName.toLowerCase(),A={tagName:n};if("#text"===n){n=c.textContent||
"";if(/^[\s]*$/.test(n))return;A.textContent=n}if(n=c.attributes){var m={};[].forEach.call(n,function(e){m[e.name]=e.value});A.attributes=m}if(c.childNodes.length){var r=[];[].forEach.call(c.childNodes,function(e){q(e,r)});r.length&&(A.children=r)}g.push(A)};[].forEach.call(g.body.childNodes,function(c){return q(c,y)});c&&G(c);return y};E.allowedTags="a b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr ul #text".split(" ");
E.allowedAttributes="aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style result rowspan summary target tabindex text-align textAnchor textLength type valign width x x1 xy y y1 y2 zIndex".split(" ");
E.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" ");return E}()});P(k,"Core/Color/Color.js",[k["Core/Globals.js"],k["Core/Utilities.js"]],function(f,d){var k=d.isNumber,x=d.merge,B=d.pInt;"";d=function(){function d(D){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(d){return[B(d[1]),B(d[2]),B(d[3]),parseFloat(d[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(d){return[B(d[1]),
B(d[2]),B(d[3]),1]}}];this.rgba=[];if(f.Color!==d)return new f.Color(D);if(!(this instanceof d))return new d(D);this.init(D)}d.parse=function(f){return new d(f)};d.prototype.init=function(f){var k,t;if((this.input=f=d.names[f&&f.toLowerCase?f.toLowerCase():""]||f)&&f.stops)this.stops=f.stops.map(function(l){return new d(l[1])});else{if(f&&f.charAt&&"#"===f.charAt()){var C=f.length;f=parseInt(f.substr(1),16);7===C?k=[(f&16711680)>>16,(f&65280)>>8,f&255,1]:4===C&&(k=[(f&3840)>>4|(f&3840)>>8,(f&240)>>
4|f&240,(f&15)<<4|f&15,1])}if(!k)for(t=this.parsers.length;t--&&!k;){var l=this.parsers[t];(C=l.regex.exec(f))&&(k=l.parse(C))}}this.rgba=k||[]};d.prototype.get=function(d){var f=this.input,t=this.rgba;if("undefined"!==typeof this.stops){var C=x(f);C.stops=[].concat(C.stops);this.stops.forEach(function(l,E){C.stops[E]=[C.stops[E][0],l.get(d)]})}else C=t&&k(t[0])?"rgb"===d||!d&&1===t[3]?"rgb("+t[0]+","+t[1]+","+t[2]+")":"a"===d?t[3]:"rgba("+t.join(",")+")":f;return C};d.prototype.brighten=function(d){var f,
t=this.rgba;if(this.stops)this.stops.forEach(function(C){C.brighten(d)});else if(k(d)&&0!==d)for(f=0;3>f;f++)t[f]+=B(255*d),0>t[f]&&(t[f]=0),255<t[f]&&(t[f]=255);return this};d.prototype.setOpacity=function(d){this.rgba[3]=d;return this};d.prototype.tweenTo=function(d,f){var t=this.rgba,C=d.rgba;C.length&&t&&t.length?(d=1!==C[3]||1!==t[3],f=(d?"rgba(":"rgb(")+Math.round(C[0]+(t[0]-C[0])*(1-f))+","+Math.round(C[1]+(t[1]-C[1])*(1-f))+","+Math.round(C[2]+(t[2]-C[2])*(1-f))+(d?","+(C[3]+(t[3]-C[3])*(1-
f)):"")+")"):f=d.input||"none";return f};d.names={white:"#ffffff",black:"#000000"};return d}();f.Color=d;f.color=d.parse;return d});P(k,"Core/Color/Palette.js",[],function(){return{colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),backgroundColor:"#ffffff",neutralColor100:"#000000",neutralColor80:"#333333",neutralColor60:"#666666",neutralColor40:"#999999",neutralColor20:"#cccccc",neutralColor10:"#e6e6e6",neutralColor5:"#f2f2f2",neutralColor3:"#f7f7f7",
highlightColor100:"#003399",highlightColor80:"#335cad",highlightColor60:"#6685c2",highlightColor20:"#ccd6eb",highlightColor10:"#e6ebf5",indicatorPositiveLine:"#06b535",indicatorNegativeLine:"#f21313"}});P(k,"Core/Animation/Fx.js",[k["Core/Globals.js"],k["Core/Utilities.js"]],function(f,d){var k=f.win,x=d.isNumber,B=d.objectEach;d=function(){function d(d,f,t){this.pos=NaN;this.options=f;this.elem=d;this.prop=t}d.prototype.dSetter=function(){var d=this.paths,f=d&&d[0];d=d&&d[1];var t=[],C=this.now||
0;if(1!==C&&f&&d)if(f.length===d.length&&1>C)for(var l=0;l<d.length;l++){for(var E=f[l],g=d[l],y=[],c=0;c<g.length;c++){var q=E[c],n=g[c];x(q)&&x(n)&&("A"!==g[0]||4!==c&&5!==c)?y[c]=q+C*(n-q):y[c]=n}t.push(y)}else t=d;else t=this.toD||[];this.elem.attr("d",t,void 0,!0)};d.prototype.update=function(){var d=this.elem,f=this.prop,t=this.now,C=this.options.step;if(this[f+"Setter"])this[f+"Setter"]();else d.attr?d.element&&d.attr(f,t,null,!0):d.style[f]=t+this.unit;C&&C.call(d,t,this)};d.prototype.run=
function(f,H,t){var C=this,l=C.options,E=function(c){return E.stopped?!1:C.step(c)},g=k.requestAnimationFrame||function(c){setTimeout(c,13)},y=function(){for(var c=0;c<d.timers.length;c++)d.timers[c]()||d.timers.splice(c--,1);d.timers.length&&g(y)};f!==H||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=f,this.end=H,this.unit=t,this.now=this.start,this.pos=0,E.elem=this.elem,E.prop=this.prop,E()&&1===d.timers.push(E)&&g(y)):(delete l.curAnim[this.prop],l.complete&&0===Object.keys(l.curAnim).length&&
l.complete.call(this.elem))};d.prototype.step=function(d){var f=+new Date,t=this.options,C=this.elem,l=t.complete,E=t.duration,g=t.curAnim;if(C.attr&&!C.element)d=!1;else if(d||f>=E+this.startTime){this.now=this.end;this.pos=1;this.update();var y=g[this.prop]=!0;B(g,function(c){!0!==c&&(y=!1)});y&&l&&l.call(C);d=!1}else this.pos=t.easing((f-this.startTime)/E),this.now=this.start+(this.end-this.start)*this.pos,this.update(),d=!0;return d};d.prototype.initPath=function(d,f,t){function C(c,g){for(;c.length<
A;){var m=c[0],n=g[A-c.length];n&&"M"===m[0]&&(c[0]="C"===n[0]?["C",m[1],m[2],m[1],m[2],m[1],m[2]]:["L",m[1],m[2]]);c.unshift(m);y&&c.push(c[c.length-1])}}function l(g,n){for(;g.length<A;)if(n=g[g.length/c-1].slice(),"C"===n[0]&&(n[1]=n[5],n[2]=n[6]),y){var m=g[g.length/c].slice();g.splice(g.length/2,0,n,m)}else g.push(n)}var E=d.startX,g=d.endX;f=f&&f.slice();t=t.slice();var y=d.isArea,c=y?2:1;if(!f)return[t,t];if(E&&g){for(d=0;d<E.length;d++)if(E[d]===g[0]){var q=d;break}else if(E[0]===g[g.length-
E.length+d]){q=d;var n=!0;break}else if(E[E.length-1]===g[g.length-E.length+d]){q=E.length-d;break}"undefined"===typeof q&&(f=[])}if(f.length&&x(q)){var A=t.length+q*c;n?(C(f,t),l(t,f)):(C(t,f),l(f,t))}return[f,t]};d.prototype.fillSetter=function(){d.prototype.strokeSetter.apply(this,arguments)};d.prototype.strokeSetter=function(){this.elem.attr(this.prop,f.color(this.start).tweenTo(f.color(this.end),this.pos),null,!0)};d.timers=[];return d}();f.Fx=d;f.timers=d.timers;return d});P(k,"Core/Animation/AnimationUtilities.js",
[k["Core/Animation/Fx.js"],k["Core/Globals.js"],k["Core/Utilities.js"]],function(f,d,k){var x=k.defined,B=k.getStyle,S=k.isArray,D=k.isNumber,H=k.isObject,t=k.merge,C=k.objectEach,l=k.pick;k=d.setAnimation=function(c,g){g.renderer.globalAnimation=l(c,g.options.chart.animation,!0)};var E=d.animObject=function(c){return H(c)?t({duration:500,defer:0},c):{duration:c?500:0,defer:0}},g=d.getDeferredAnimation=function(c,g,n){var q=E(g),y=0,l=0;(n?[n]:c.series).forEach(function(c){c=E(c.options.animation);
y=g&&x(g.defer)?q.defer:Math.max(y,c.duration+c.defer);l=Math.min(q.duration,c.duration)});c.renderer.forExport&&(y=0);return{defer:Math.max(0,y-l),duration:Math.min(y,l)}},y=d.stop=function(c,g){for(var n=f.timers.length;n--;)f.timers[n].elem!==c||g&&g!==f.timers[n].prop||(f.timers[n].stopped=!0)};return{animate:function(c,g,n){var q,l="",d,m;if(!H(n)){var r=arguments;n={duration:r[2],easing:r[3],complete:r[4]}}D(n.duration)||(n.duration=400);n.easing="function"===typeof n.easing?n.easing:Math[n.easing]||
Math.easeInOutSine;n.curAnim=t(g);C(g,function(e,h){y(c,h);m=new f(c,n,h);d=null;"d"===h&&S(g.d)?(m.paths=m.initPath(c,c.pathArray,g.d),m.toD=g.d,q=0,d=1):c.attr?q=c.attr(h):(q=parseFloat(B(c,h))||0,"opacity"!==h&&(l="px"));d||(d=e);d&&d.match&&d.match("px")&&(d=d.replace(/px/g,""));m.run(q,d,l)})},animObject:E,getDeferredAnimation:g,setAnimation:k,stop:y}});P(k,"Core/Renderer/SVG/SVGElement.js",[k["Core/Animation/AnimationUtilities.js"],k["Core/Renderer/HTML/AST.js"],k["Core/Color/Color.js"],k["Core/Globals.js"],
k["Core/Color/Palette.js"],k["Core/Utilities.js"]],function(f,d,k,x,B,G){var D=f.animate,H=f.animObject,t=f.stop,C=x.deg2rad,l=x.doc,E=x.hasTouch,g=x.noop,y=x.svg,c=x.SVG_NS,q=x.win,n=G.attr,A=G.createElement,M=G.css,z=G.defined,m=G.erase,r=G.extend,e=G.fireEvent,h=G.isArray,a=G.isFunction,b=G.isNumber,w=G.isString,J=G.merge,O=G.objectEach,F=G.pick,N=G.pInt,R=G.syncTimeout,Q=G.uniqueKey;"";f=function(){function f(){this.height=this.element=void 0;this.opacity=1;this.renderer=void 0;this.SVG_NS=c;
this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ");this.width=void 0}f.prototype._defaultGetter=function(a){a=F(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a};f.prototype._defaultSetter=function(a,b,p){p.setAttribute(b,a)};f.prototype.add=function(a){var b=this.renderer,p=this.element;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;"undefined"!==typeof this.textStr&&
"text"===this.element.nodeName&&b.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)var e=this.zIndexSetter();e||(a?a.element:b.box).appendChild(p);if(this.onAdd)this.onAdd();return this};f.prototype.addClass=function(a,b){var p=b?"":this.attr("class")||"";a=(a||"").split(/ /g).reduce(function(a,b){-1===p.indexOf(b)&&a.push(b);return a},p?[p]:[]).join(" ");a!==p&&this.attr("class",a);return this};f.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=
!1)};f.prototype.align=function(a,b,p){var e,v={};var c=this.renderer;var u=c.alignedObjects;var h,I;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!p||w(p))this.alignTo=e=p||"renderer",m(u,this),u.push(this),p=void 0}else a=this.alignOptions,b=this.alignByTranslate,e=this.alignTo;p=F(p,c[e],c);e=a.align;c=a.verticalAlign;u=(p.x||0)+(a.x||0);var g=(p.y||0)+(a.y||0);"right"===e?h=1:"center"===e&&(h=2);h&&(u+=(p.width-(a.width||0))/h);v[b?"translateX":"x"]=Math.round(u);"bottom"===c?I=1:"middle"===
c&&(I=2);I&&(g+=(p.height-(a.height||0))/I);v[b?"translateY":"y"]=Math.round(g);this[this.placed?"animate":"attr"](v);this.placed=!0;this.alignAttr=v;return this};f.prototype.alignSetter=function(a){var b={left:"start",center:"middle",right:"end"};b[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",b[a]))};f.prototype.animate=function(a,b,p){var e=this,v=H(F(b,this.renderer.globalAnimation,!0));b=v.defer;F(l.hidden,l.msHidden,l.webkitHidden,!1)&&(v.duration=0);0!==v.duration?(p&&(v.complete=
p),R(function(){e.element&&D(e,a,v)},b)):(this.attr(a,void 0,p),O(a,function(a,b){v.step&&v.step.call(this,a,{prop:b,pos:1,elem:this})},this));return this};f.prototype.applyTextOutline=function(a){var b=this.element;-1!==a.indexOf("contrast")&&(a=a.replace(/contrast/g,this.renderer.getContrast(b.style.fill)));var p=a.split(" ");a=p[p.length-1];if((p=p[0])&&"none"!==p&&x.svg){this.fakeTS=!0;this.ySetter=this.xSetter;p=p.replace(/(^[\d\.]+)(.*?)$/g,function(a,b,p){return 2*Number(b)+p});this.removeTextOutline();
var e=l.createElementNS(c,"tspan");n(e,{"class":"highcharts-text-outline",fill:a,stroke:a,"stroke-width":p,"stroke-linejoin":"round"});[].forEach.call(b.childNodes,function(a){var b=a.cloneNode(!0);b.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(function(a){return b.removeAttribute(a)});e.appendChild(b)});a=l.createElementNS(c,"tspan");a.textContent="\u200b";n(a,{x:b.getAttribute("x"),y:b.getAttribute("y")});e.appendChild(a);b.insertBefore(e,b.firstChild)}};f.prototype.attr=function(a,
b,p,e){var K=this.element,v,u=this,c,h,g=this.symbolCustomAttribs;if("string"===typeof a&&"undefined"!==typeof b){var L=a;a={};a[L]=b}"string"===typeof a?u=(this[a+"Getter"]||this._defaultGetter).call(this,a,K):(O(a,function(b,p){c=!1;e||t(this,p);this.symbolName&&-1!==g.indexOf(p)&&(v||(this.symbolAttr(a),v=!0),c=!0);!this.rotation||"x"!==p&&"y"!==p||(this.doTransform=!0);c||(h=this[p+"Setter"]||this._defaultSetter,h.call(this,b,p,K),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(p)&&
this.updateShadows(p,b,h))},this),this.afterSetters());p&&p.call(this);return u};f.prototype.clip=function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")};f.prototype.crisp=function(a,b){b=b||a.strokeWidth||0;var 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);z(a.strokeWidth)&&(a.strokeWidth=b);return a};f.prototype.complexColor=
function(a,b,p){var K=this.renderer,v,c,u,g,I,m,L,w,n,r,q=[],F;e(this.renderer,"complexColor",{args:arguments},function(){a.radialGradient?c="radialGradient":a.linearGradient&&(c="linearGradient");if(c){u=a[c];I=K.gradients;m=a.stops;n=p.radialReference;h(u)&&(a[c]=u={x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===c&&n&&!z(u.gradientUnits)&&(g=u,u=J(u,K.getRadialAttr(n,g),{gradientUnits:"userSpaceOnUse"}));O(u,function(a,b){"id"!==b&&q.push(b,a)});O(m,function(a){q.push(a)});
q=q.join(",");if(I[q])r=I[q].attr("id");else{u.id=r=Q();var e=I[q]=K.createElement(c).attr(u).add(K.defs);e.radAttr=g;e.stops=[];m.forEach(function(a){0===a[1].indexOf("rgba")?(v=k.parse(a[1]),L=v.get("rgb"),w=v.get("a")):(L=a[1],w=1);a=K.createElement("stop").attr({offset:a[0],"stop-color":L,"stop-opacity":w}).add(e);e.stops.push(a)})}F="url("+K.url+"#"+r+")";p.setAttribute(b,F);p.gradient=q;a.toString=function(){return F}}})};f.prototype.css=function(a){var b=this.styles,p={},e=this.element,c="",
v=!b,u=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);b&&O(a,function(a,u){b&&b[u]!==a&&(p[u]=a,v=!0)});if(v){b&&(a=r(b,p));if(a)if(null===a.width||"auto"===a.width)delete this.textWidth;else if("text"===e.nodeName.toLowerCase()&&a.width)var h=this.textWidth=N(a.width);this.styles=a;h&&!y&&this.renderer.forExport&&delete a.width;if(e.namespaceURI===this.SVG_NS){var g=function(a,b){return"-"+b.toLowerCase()};O(a,function(a,b){-1===u.indexOf(b)&&(c+=b.replace(/([A-Z])/g,g)+":"+
a+";")});c&&n(e,"style",c)}else M(e,a);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline))}return this};f.prototype.dashstyleSetter=function(a){var b=this["stroke-width"];"inherit"===b&&(b=1);if(a=a&&a.toLowerCase()){var p=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,
"").split(",");for(a=p.length;a--;)p[a]=""+N(p[a])*F(b,NaN);a=p.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}};f.prototype.destroy=function(){var a=this,b=a.element||{},p=a.renderer,e=p.isSVG&&"SPAN"===b.nodeName&&a.parentGroup||void 0,c=b.ownerSVGElement;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;t(a);if(a.clipPath&&c){var h=a.clipPath;[].forEach.call(c.querySelectorAll("[clip-path],[CLIP-PATH]"),function(a){-1<a.getAttribute("clip-path").indexOf(h.element.id)&&
a.removeAttribute("clip-path")});a.clipPath=h.destroy()}if(a.stops){for(c=0;c<a.stops.length;c++)a.stops[c].destroy();a.stops.length=0;a.stops=void 0}a.safeRemoveChild(b);for(p.styledMode||a.destroyShadows();e&&e.div&&0===e.div.childNodes.length;)b=e.parentGroup,a.safeRemoveChild(e.div),delete e.div,e=b;a.alignTo&&m(p.alignedObjects,a);O(a,function(b,p){a[p]&&a[p].parentGroup===a&&a[p].destroy&&a[p].destroy();delete a[p]})};f.prototype.destroyShadows=function(){(this.shadows||[]).forEach(function(a){this.safeRemoveChild(a)},
this);this.shadows=void 0};f.prototype.destroyTextPath=function(a,b){var p=a.getElementsByTagName("text")[0];if(p){if(p.removeAttribute("dx"),p.removeAttribute("dy"),b.element.setAttribute("id",""),this.textPathWrapper&&p.getElementsByTagName("textPath").length){for(a=this.textPathWrapper.element.childNodes;a.length;)p.appendChild(a[0]);p.removeChild(this.textPathWrapper.element)}}else if(a.getAttribute("dx")||a.getAttribute("dy"))a.removeAttribute("dx"),a.removeAttribute("dy");this.textPathWrapper&&
(this.textPathWrapper=this.textPathWrapper.destroy())};f.prototype.dSetter=function(a,b,p){h(a)&&("string"===typeof a[0]&&(a=this.renderer.pathToSegments(a)),this.pathArray=a,a=a.reduce(function(a,b,p){return b&&b.join?(p?a+" ":"")+b.join(" "):(b||"").toString()},""));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[b]!==a&&(p.setAttribute(b,a),this[b]=a)};f.prototype.fadeOut=function(a){var b=this;b.animate({opacity:0},{duration:F(a,150),complete:function(){b.attr({y:-9999}).hide()}})};f.prototype.fillSetter=
function(a,b,p){"string"===typeof a?p.setAttribute(b,a):a&&this.complexColor(a,b,p)};f.prototype.getBBox=function(b,e){var p,c=this.renderer,h=this.element,g=this.styles,u=this.textStr,m=c.cache,I=c.cacheKeys,v=h.namespaceURI===this.SVG_NS;e=F(e,this.rotation,0);var L=c.styledMode?h&&f.prototype.getStyle.call(h,"font-size"):g&&g.fontSize;if(z(u)){var w=u.toString();-1===w.indexOf("<")&&(w=w.replace(/[0-9]/g,"0"));w+=["",e,L,this.textWidth,g&&g.textOverflow,g&&g.fontWeight].join()}w&&!b&&(p=m[w]);
if(!p){if(v||c.forExport){try{var n=this.fakeTS&&function(a){var b=h.querySelector(".highcharts-text-outline");b&&M(b,{display:a})};a(n)&&n("none");p=h.getBBox?r({},h.getBBox()):{width:h.offsetWidth,height:h.offsetHeight};a(n)&&n("")}catch(da){""}if(!p||0>p.width)p={width:0,height:0}}else p=this.htmlGetBBox();c.isSVG&&(b=p.width,c=p.height,v&&(p.height=c={"11px,17":14,"13px,20":16}[g&&g.fontSize+","+Math.round(c)]||c),e&&(g=e*C,p.width=Math.abs(c*Math.sin(g))+Math.abs(b*Math.cos(g)),p.height=Math.abs(c*
Math.cos(g))+Math.abs(b*Math.sin(g))));if(w&&0<p.height){for(;250<I.length;)delete m[I.shift()];m[w]||I.push(w);m[w]=p}}return p};f.prototype.getStyle=function(a){return q.getComputedStyle(this.element||this,"").getPropertyValue(a)};f.prototype.hasClass=function(a){return-1!==(""+this.attr("class")).split(" ").indexOf(a)};f.prototype.hide=function(a){a?this.attr({y:-9999}):this.attr({visibility:"hidden"});return this};f.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}};f.prototype.init=
function(a,b){this.element="span"===b?A(b):l.createElementNS(this.SVG_NS,b);this.renderer=a;e(this,"afterInit")};f.prototype.invert=function(a){this.inverted=a;this.updateTransform();return this};f.prototype.on=function(a,b){var p,e,c=this.element,h;E&&"click"===a?(c.ontouchstart=function(a){p=a.touches[0].clientX;e=a.touches[0].clientY},c.ontouchend=function(a){p&&4<=Math.sqrt(Math.pow(p-a.changedTouches[0].clientX,2)+Math.pow(e-a.changedTouches[0].clientY,2))||b.call(c,a);h=!0;!1!==a.cancelable&&
a.preventDefault()},c.onclick=function(a){h||b.call(c,a)}):c["on"+a]=b;return this};f.prototype.opacitySetter=function(a,b,p){this.opacity=a=Number(Number(a).toFixed(3));p.setAttribute(b,a)};f.prototype.removeClass=function(a){return this.attr("class",(""+this.attr("class")).replace(w(a)?new RegExp("(^| )"+a+"( |$)"):a," ").replace(/ +/g," ").trim())};f.prototype.removeTextOutline=function(){var a=this.element.querySelector("tspan.highcharts-text-outline");a&&this.safeRemoveChild(a)};f.prototype.safeRemoveChild=
function(a){var b=a.parentNode;b&&b.removeChild(a)};f.prototype.setRadialReference=function(a){var b=this.element.gradient&&this.renderer.gradients[this.element.gradient];this.element.radialReference=a;b&&b.radAttr&&b.animate(this.renderer.getRadialAttr(a,b.radAttr));return this};f.prototype.setTextPath=function(a,e){var p=this.element,c=this.text?this.text.element:p,h={textAnchor:"text-anchor"},m=!1,u=this.textPathWrapper,v=!u;e=J(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},
e);var I=d.filterUserAttributes(e.attributes);if(a&&e&&e.enabled){u&&null===u.element.parentNode?(v=!0,u=u.destroy()):u&&this.removeTextOutline.call(u.parentGroup);this.options&&this.options.padding&&(I.dx=-this.options.padding);u||(this.textPathWrapper=u=this.renderer.createElement("textPath"),m=!0);var w=u.element;(e=a.element.getAttribute("id"))||a.element.setAttribute("id",e=Q());if(v)for(c.setAttribute("y",0),b(I.dx)&&c.setAttribute("x",-I.dx),a=[].slice.call(c.childNodes),v=0;v<a.length;v++){var n=
a[v];n.nodeType!==Node.TEXT_NODE&&"tspan"!==n.nodeName||w.appendChild(n)}m&&u&&u.add({element:c});w.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+e);z(I.dy)&&(w.parentNode.setAttribute("dy",I.dy),delete I.dy);z(I.dx)&&(w.parentNode.setAttribute("dx",I.dx),delete I.dx);O(I,function(a,b){w.setAttribute(h[b]||b,a)});p.removeAttribute("transform");this.removeTextOutline.call(u);this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=
this.updateTransform=g}else u&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(p,a),this.updateTransform(),this.options&&this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this};f.prototype.shadow=function(a,b,p){var e=[],c=this.element,h=!1,u=this.oldShadowOptions;var g={color:B.neutralColor100,offsetX:1,offsetY:1,opacity:.15,width:3};var I;!0===a?I=g:"object"===typeof a&&(I=r(g,a));I&&(I&&u&&O(I,function(a,b){a!==u[b]&&(h=!0)}),h&&
this.destroyShadows(),this.oldShadowOptions=I);if(!I)this.destroyShadows();else if(!this.shadows){var m=I.opacity/I.width;var v=this.parentInverted?"translate(-1,-1)":"translate("+I.offsetX+", "+I.offsetY+")";for(g=1;g<=I.width;g++){var w=c.cloneNode(!1);var L=2*I.width+1-2*g;n(w,{stroke:a.color||B.neutralColor100,"stroke-opacity":m*g,"stroke-width":L,transform:v,fill:"none"});w.setAttribute("class",(w.getAttribute("class")||"")+" highcharts-shadow");p&&(n(w,"height",Math.max(n(w,"height")-L,0)),
w.cutHeight=L);b?b.element.appendChild(w):c.parentNode&&c.parentNode.insertBefore(w,c);e.push(w)}this.shadows=e}return this};f.prototype.show=function(a){return this.attr({visibility:a?"inherit":"visible"})};f.prototype.strokeSetter=function(a,b,p){this[b]=a;this.stroke&&this["stroke-width"]?(f.prototype.fillSetter.call(this,this.stroke,"stroke",p),p.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===b&&0===a&&this.hasStroke?(p.removeAttribute("stroke"),this.hasStroke=
!1):this.renderer.styledMode&&this["stroke-width"]&&(p.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};f.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var a=this.getStyle("stroke-width"),b=0;if(a.indexOf("px")===a.length-2)b=N(a);else if(""!==a){var p=l.createElementNS(c,"rect");n(p,{width:a,"stroke-width":0});this.element.parentNode.appendChild(p);b=p.getBBox().width;p.parentNode.removeChild(p)}return b};f.prototype.symbolAttr=
function(a){var b=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(p){b[p]=F(a[p],b[p])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})};f.prototype.textSetter=function(a){a!==this.textStr&&(delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))};f.prototype.titleSetter=function(a){var b=this.element,p=b.getElementsByTagName("title")[0]||l.createElementNS(this.SVG_NS,"title");b.insertBefore?b.insertBefore(p,
b.firstChild):b.appendChild(p);p.textContent=String(F(a,"")).replace(/<[^>]*>/g,"").replace(/</g,"<").replace(/>/g,">")};f.prototype.toFront=function(){var a=this.element;a.parentNode.appendChild(a);return this};f.prototype.translate=function(a,b){return this.attr({translateX:a,translateY:b})};f.prototype.updateShadows=function(a,b,p){var e=this.shadows;if(e)for(var c=e.length;c--;)p.call(e[c],"height"===a?Math.max(b-(e[c].cutHeight||0),0):"d"===a?this.d:b,a,e[c])};f.prototype.updateTransform=
function(){var a=this.translateX||0,b=this.translateY||0,p=this.scaleX,e=this.scaleY,c=this.inverted,h=this.rotation,u=this.matrix,g=this.element;c&&(a+=this.width,b+=this.height);a=["translate("+a+","+b+")"];z(u)&&a.push("matrix("+u.join(",")+")");c?a.push("rotate(90) scale(-1,1)"):h&&a.push("rotate("+h+" "+F(this.rotationOriginX,g.getAttribute("x"),0)+" "+F(this.rotationOriginY,g.getAttribute("y")||0)+")");(z(p)||z(e))&&a.push("scale("+F(p,1)+" "+F(e,1)+")");a.length&&g.setAttribute("transform",
a.join(" "))};f.prototype.visibilitySetter=function(a,b,p){"inherit"===a?p.removeAttribute(b):this[b]!==a&&p.setAttribute(b,a);this[b]=a};f.prototype.xGetter=function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)};f.prototype.zIndexSetter=function(a,b){var p=this.renderer,e=this.parentGroup,c=(e||p).element||p.box,h=this.element,u=!1;p=c===p.box;var g=this.added;var I;z(a)?(h.setAttribute("data-z-index",a),a=+a,this[b]===a&&(g=!1)):z(this[b])&&
h.removeAttribute("data-z-index");this[b]=a;if(g){(a=this.zIndex)&&e&&(e.handleZ=!0);b=c.childNodes;for(I=b.length-1;0<=I&&!u;I--){e=b[I];g=e.getAttribute("data-z-index");var m=!z(g);if(e!==h)if(0>a&&m&&!p&&!I)c.insertBefore(h,b[I]),u=!0;else if(N(g)<=a||m&&(!z(a)||0<=a))c.insertBefore(h,b[I+1]||null),u=!0}u||(c.insertBefore(h,b[p?3:0]||null),u=!0)}return u};return f}();f.prototype["stroke-widthSetter"]=f.prototype.strokeSetter;f.prototype.yGetter=f.prototype.xGetter;f.prototype.matrixSetter=f.prototype.rotationOriginXSetter=
f.prototype.rotationOriginYSetter=f.prototype.rotationSetter=f.prototype.scaleXSetter=f.prototype.scaleYSetter=f.prototype.translateXSetter=f.prototype.translateYSetter=f.prototype.verticalAlignSetter=function(a,b){this[b]=a;this.doTransform=!0};x.SVGElement=f;return x.SVGElement});P(k,"Core/Renderer/SVG/SVGLabel.js",[k["Core/Renderer/SVG/SVGElement.js"],k["Core/Utilities.js"]],function(f,d){function k(f,d){D(f)?f!==this[d]&&(this[d]=f,this.updateTextPadding()):this[d]=void 0}var x=this&&this.__extends||
function(){var f=function(d,g){f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,c){g.__proto__=c}||function(g,c){for(var q in c)c.hasOwnProperty(q)&&(g[q]=c[q])};return f(d,g)};return function(d,g){function y(){this.constructor=d}f(d,g);d.prototype=null===g?Object.create(g):(y.prototype=g.prototype,new y)}}(),B=d.defined,G=d.extend,D=d.isNumber,H=d.merge,t=d.pick,C=d.removeEvent;return function(d){function l(g,f,c,q,n,A,M,z,m,r){var e=d.call(this)||this;e.paddingSetter=k;e.paddingLeftSetter=
k;e.paddingRightSetter=k;e.init(g,"g");e.textStr=f;e.x=c;e.y=q;e.anchorX=A;e.anchorY=M;e.baseline=m;e.className=r;"button"!==r&&e.addClass("highcharts-label");r&&e.addClass("highcharts-"+r);e.text=g.text("",0,0,z).attr({zIndex:1});if("string"===typeof n){var h=/^url\((.*?)\)$/.test(n);if(e.renderer.symbols[n]||h)e.symbolKey=n}e.bBox=l.emptyBBox;e.padding=3;e.baselineOffset=0;e.needsBox=g.styledMode||h;e.deferredAttr={};e.alignFactor=0;return e}x(l,d);l.prototype.alignSetter=function(g){g={left:0,
center:.5,right:1}[g];g!==this.alignFactor&&(this.alignFactor=g,this.bBox&&D(this.xSetting)&&this.attr({x:this.xSetting}))};l.prototype.anchorXSetter=function(g,l){this.anchorX=g;this.boxAttr(l,Math.round(g)-this.getCrispAdjust()-this.xSetting)};l.prototype.anchorYSetter=function(g,l){this.anchorY=g;this.boxAttr(l,g-this.ySetting)};l.prototype.boxAttr=function(g,l){this.box?this.box.attr(g,l):this.deferredAttr[g]=l};l.prototype.css=function(g){if(g){var d={};g=H(g);l.textProps.forEach(function(c){"undefined"!==
typeof g[c]&&(d[c]=g[c],delete g[c])});this.text.css(d);var c="width"in d;"fontSize"in d||"fontWeight"in d?this.updateTextPadding():c&&this.updateBoxSize()}return f.prototype.css.call(this,g)};l.prototype.destroy=function(){C(this.element,"mouseenter");C(this.element,"mouseleave");this.text&&this.text.destroy();this.box&&(this.box=this.box.destroy());f.prototype.destroy.call(this)};l.prototype.fillSetter=function(g,l){g&&(this.needsBox=!0);this.fill=g;this.boxAttr(l,g)};l.prototype.getBBox=function(){var g=
this.bBox,l=this.padding,c=t(this.paddingLeft,l);return{width:this.width,height:this.height,x:g.x-c,y:g.y-l}};l.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};l.prototype.heightSetter=function(g){this.heightSetting=g};l.prototype.on=function(g,l){var c=this,q=c.text,n=q&&"SPAN"===q.element.tagName?q:void 0;if(n){var d=function(q){("mouseenter"===g||"mouseleave"===g)&&q.relatedTarget instanceof
Element&&(c.element.compareDocumentPosition(q.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY||n.element.compareDocumentPosition(q.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||l.call(c.element,q)};n.on(g,d)}f.prototype.on.call(c,g,d||l);return c};l.prototype.onAdd=function(){var g=this.textStr;this.text.add(this);this.attr({text:B(g)?g:"",x:this.x,y:this.y});this.box&&B(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})};l.prototype.rSetter=function(g,l){this.boxAttr(l,
g)};l.prototype.shadow=function(g){g&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(g));return this};l.prototype.strokeSetter=function(g,l){this.stroke=g;this.boxAttr(l,g)};l.prototype["stroke-widthSetter"]=function(g,l){g&&(this.needsBox=!0);this["stroke-width"]=g;this.boxAttr(l,g)};l.prototype["text-alignSetter"]=function(g){this.textAlign=g};l.prototype.textSetter=function(g){"undefined"!==typeof g&&this.text.attr({text:g});this.updateTextPadding()};l.prototype.updateBoxSize=
function(){var g=this.text.element.style,d={},c=this.padding,q=this.bBox=D(this.widthSetting)&&D(this.heightSetting)&&!this.textAlign||!B(this.text.textStr)?l.emptyBBox:this.text.getBBox();this.width=this.getPaddedWidth();this.height=(this.heightSetting||q.height||0)+2*c;this.baselineOffset=c+Math.min(this.renderer.fontMetrics(g&&g.fontSize,this.text).b,q.height||Infinity);this.needsBox&&(this.box||(g=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect(),g.addClass(("button"===
this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),g.add(this)),g=this.getCrispAdjust(),d.x=g,d.y=(this.baseline?-this.baselineOffset:0)+g,d.width=Math.round(this.width),d.height=Math.round(this.height),this.box.attr(G(d,this.deferredAttr)),this.deferredAttr={})};l.prototype.updateTextPadding=function(){var g=this.text;this.updateBoxSize();var l=this.baseline?0:this.baselineOffset,c=t(this.paddingLeft,this.padding);B(this.widthSetting)&&this.bBox&&
("center"===this.textAlign||"right"===this.textAlign)&&(c+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width));if(c!==g.x||l!==g.y)g.attr("x",c),g.hasBoxWidthChanged&&(this.bBox=g.getBBox(!0)),"undefined"!==typeof l&&g.attr("y",l);g.x=c;g.y=l};l.prototype.widthSetter=function(g){this.widthSetting=D(g)?g:void 0};l.prototype.getPaddedWidth=function(){var g=this.padding,l=t(this.paddingLeft,g);g=t(this.paddingRight,g);return(this.widthSetting||this.bBox.width||0)+l+g};l.prototype.xSetter=
function(g){this.x=g;this.alignFactor&&(g-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0);this.xSetting=Math.round(g);this.attr("translateX",this.xSetting)};l.prototype.ySetter=function(g){this.ySetting=this.y=Math.round(g);this.attr("translateY",this.ySetting)};l.emptyBBox={width:0,height:0,x:0,y:0};l.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" ");return l}(f)});P(k,"Core/Renderer/SVG/TextBuilder.js",
[k["Core/Globals.js"],k["Core/Utilities.js"],k["Core/Renderer/HTML/AST.js"]],function(f,d,k){var x=f.doc,B=f.SVG_NS,S=d.attr,D=d.isString,H=d.objectEach,t=d.pick;return function(){function d(l){var d=l.styles;this.renderer=l.renderer;this.svgElement=l;this.width=l.textWidth;this.textLineHeight=d&&d.lineHeight;this.textOutline=d&&d.textOutline;this.ellipsis=!(!d||"ellipsis"!==d.textOverflow);this.noWrap=!(!d||"nowrap"!==d.whiteSpace);this.fontSize=d&&d.fontSize}d.prototype.buildSVG=function(){var l=
this.svgElement,d=l.element,g=l.renderer,f=t(l.textStr,"").toString(),c=-1!==f.indexOf("<"),q=d.childNodes,n=q.length;g=this.width&&!l.added&&g.box;var A=/<br.*?>/g;var M=[f,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,this.fontSize,this.width].join();if(M!==l.textCache){l.textCache=M;for(delete l.actualWidth;n--;)d.removeChild(q[n]);c||this.ellipsis||this.width||-1!==f.indexOf(" ")&&(!this.noWrap||A.test(f))?""!==f&&(g&&g.appendChild(d),f=new k(f),this.modifyTree(f.nodes),f.addToDOM(l.element),
this.modifyDOM(),this.ellipsis&&-1!==(d.textContent||"").indexOf("\u2026")&&l.attr("title",this.unescapeEntities(l.textStr||"",["<",">"])),g&&g.removeChild(d)):d.appendChild(x.createTextNode(this.unescapeEntities(f)));D(this.textOutline)&&l.applyTextOutline&&l.applyTextOutline(this.textOutline)}};d.prototype.modifyDOM=function(){var d=this,f=this.svgElement,g=S(f.element,"x");[].forEach.call(f.element.querySelectorAll("tspan.highcharts-br"),function(c){c.nextSibling&&c.previousSibling&&S(c,
{dy:d.getLineHeight(c.nextSibling),x:g})});var y=this.width||0;if(y){var c=function(c,q){var n=c.textContent||"",l=n.replace(/([^\^])-/g,"$1- ").split(" "),m=!d.noWrap&&(1<l.length||1<f.element.childNodes.length),r=d.getLineHeight(q),e=0,h=f.actualWidth;if(d.ellipsis)n&&d.truncate(c,n,void 0,0,Math.max(0,y-parseInt(d.fontSize||12,10)),function(a,b){return a.substring(0,b)+"\u2026"});else if(m){n=[];for(m=[];q.firstChild&&q.firstChild!==c;)m.push(q.firstChild),q.removeChild(q.firstChild);for(;l.length;)l.length&&
!d.noWrap&&0<e&&(n.push(c.textContent||""),c.textContent=l.join(" ").replace(/- /g,"-")),d.truncate(c,void 0,l,0===e?h||0:0,y,function(a,b){return l.slice(0,b).join(" ").replace(/- /g,"-")}),h=f.actualWidth,e++;m.forEach(function(a){q.insertBefore(a,c)});n.forEach(function(a){q.insertBefore(x.createTextNode(a),c);a=x.createElementNS(B,"tspan");a.textContent="\u200b";S(a,{dy:r,x:g});q.insertBefore(a,c)})}},q=function(g){[].slice.call(g.childNodes).forEach(function(n){n.nodeType===Node.TEXT_NODE?c(n,
g):(-1!==n.className.baseVal.indexOf("highcharts-br")&&(f.actualWidth=0),q(n))})};q(f.element)}};d.prototype.getLineHeight=function(d){var l;d=d.nodeType===Node.TEXT_NODE?d.parentElement:d;this.renderer.styledMode||(l=d&&/(px|em)$/.test(d.style.fontSize)?d.style.fontSize:this.fontSize||this.renderer.style.fontSize||12);return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(l,d||this.svgElement.element).h};d.prototype.modifyTree=function(d){var l=this,g=function(f,
c){var q=f.tagName,n=l.renderer.styledMode,A=f.attributes||{};if("b"===q||"strong"===q)n?A["class"]="highcharts-strong":A.style="font-weight:bold;"+(A.style||"");else if("i"===q||"em"===q)n?A["class"]="highcharts-emphasized":A.style="font-style:italic;"+(A.style||"");D(A.style)&&(A.style=A.style.replace(/(;| |^)color([ :])/,"$1fill$2"));"br"===q&&(A["class"]="highcharts-br",f.textContent="\u200b",(c=d[c+1])&&c.textContent&&(c.textContent=c.textContent.replace(/^ +/gm,"")));"#text"!==q&&"a"!==q&&(f.tagName=
"tspan");f.attributes=A;f.children&&f.children.filter(function(c){return"#text"!==c.tagName}).forEach(g)};for(d.forEach(g);d[0]&&"tspan"===d[0].tagName&&!d[0].children;)d.splice(0,1)};d.prototype.truncate=function(d,f,g,y,c,q){var n=this.svgElement,l=n.renderer,M=n.rotation,z=[],m=g?1:0,r=(f||g||"").length,e=r,h,a=function(a,b){b=b||a;var e=d.parentNode;if(e&&"undefined"===typeof z[b])if(e.getSubStringLength)try{z[b]=y+e.getSubStringLength(0,g?b+1:b)}catch(F){""}else l.getSpanWidth&&(d.textContent=
q(f||g,a),z[b]=y+l.getSpanWidth(n,d));return z[b]};n.rotation=0;var b=a(d.textContent.length);if(y+b>c){for(;m<=r;)e=Math.ceil((m+r)/2),g&&(h=q(g,e)),b=a(e,h&&h.length-1),m===r?m=r+1:b>c?r=e-1:m=e;0===r?d.textContent="":f&&r===f.length-1||(d.textContent=h||q(f||g,e))}g&&g.splice(0,e);n.actualWidth=b;n.rotation=M};d.prototype.unescapeEntities=function(d,f){H(this.renderer.escapes,function(g,l){f&&-1!==f.indexOf(g)||(d=d.toString().replace(new RegExp(g,"g"),l))});return d};return d}()});P(k,"Core/Renderer/SVG/SVGRenderer.js",
[k["Core/Color/Color.js"],k["Core/Globals.js"],k["Core/Color/Palette.js"],k["Core/Renderer/SVG/SVGElement.js"],k["Core/Renderer/SVG/SVGLabel.js"],k["Core/Renderer/HTML/AST.js"],k["Core/Renderer/SVG/TextBuilder.js"],k["Core/Utilities.js"]],function(f,d,k,x,B,G,D,H){var t=H.addEvent,C=H.attr,l=H.createElement,E=H.css,g=H.defined,y=H.destroyObjectProperties,c=H.extend,q=H.isArray,n=H.isNumber,A=H.isObject,M=H.isString,z=H.merge,m=H.pick,r=H.pInt,e=H.uniqueKey,h=d.charts,a=d.deg2rad,b=d.doc,w=d.isFirefox,
J=d.isMS,O=d.isWeb