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