/*
 Highcharts JS v6.0.4 (2017-12-15)

 (c) 2016 Highsoft AS
 Authors: Jon Arild Nygard

 License: www.highcharts.com/license
*/
(function(z){"object"===typeof module&&module.exports?module.exports=z:z(Highcharts)})(function(z){(function(b){var r=b.deg2rad,f=b.isNumber,l=b.pick,G=b.relativeLength;b.CenteredSeriesMixin={getCenter:function(){var b=this.options,h=this.chart,n=2*(b.slicedOffset||0),k=h.plotWidth-2*n,h=h.plotHeight-2*n,x=b.center,x=[l(x[0],"50%"),l(x[1],"50%"),b.size||"100%",b.innerSize||0],f=Math.min(k,h),y,A;for(y=0;4>y;++y)A=x[y],b=2>y||2===y&&/%$/.test(A),x[y]=G(A,[k,h,f,x[2]][y])+(b?n:0);x[3]>x[2]&&(x[3]=x[2]);
return x},getStartAndEndRadians:function(b,h){b=f(b)?b:0;h=f(h)&&h>b&&360>h-b?h:b+360;return{start:r*(b+-90),end:r*(h+-90)}}}})(z);var L=function(){return function(b){var r=this,f=r.graphic,l=b.animate,G=b.attr,u=b.onComplete,h=b.css,n=b.group,k=b.renderer,x=b.shapeArgs;b=b.shapeType;r.shouldDraw()?(f||(r.graphic=f=k[b](x).add(n)),f.css(h).attr(G).animate(l,void 0,u)):f&&f.animate(l,void 0,function(){r.graphic=f=f.destroy();"function"===typeof u&&u()});f&&f.addClass(r.getClassName(),!0)}}(),K=function(b){var r=
b.each,f=b.extend,l=b.pick;return{getColor:function(b,f){var h=f.levelMap,n=f.parentColorIndex,k=f.series,x=f.colors,r=k.points,y,A;b&&(r=r[b.i],h=h[b.levelDynamic]||{},(b=r&&("boolean"===typeof h.colorByPoint?h.colorByPoint:!!k.options.colorByPoint))&&(y=r.index%(x?x.length:k.chart.options.chart.colorCount)),A=l(r&&r.options.colorIndex,h&&h.colorIndex,y,n,f.colorIndex));return{color:void 0,colorIndex:A}},setTreeValues:function u(b,n){var k=n.before,h=n.idRoot,z=n.mapIdToNode[h],y=n.points[b.i],A=
y&&y.options||{},w=0,B=[];f(b,{levelDynamic:b.level-(("boolean"===typeof n.levelIsConstant?n.levelIsConstant:1)?0:z.level),name:l(y&&y.name,""),visible:h===b.id||("boolean"===typeof n.visible?n.visible:!1)});"function"===typeof k&&(b=k(b,n));r(b.children,function(k,h){var l=f({},n);f(l,{index:h,siblings:b.children.length,visible:b.visible});k=u(k,l);B.push(k);k.visible&&(w+=k.val)});b.visible=0<w||b.visible;k=l(A.value,w);f(b,{children:B,childrenTotal:w,isLeaf:b.visible&&!w,val:k});return b}}}(z);
(function(b,r){var f=b.seriesType,l=b.seriesTypes,z=b.map,u=b.merge,h=b.extend,n=b.noop,k=b.each,x=r.getColor,D=b.grep,y=b.isNumber,A=b.isString,w=b.pick,B=b.Series,I=b.stableSort,J=function(a,c,d){d=d||this;b.objectEach(a,function(b,e){c.call(d,b,e,a)})},F=b.reduce,E=function(a,c,d){d=d||this;a=c.call(d,a);!1!==a&&E(a,c,d)};f("treemap","scatter",{showInLegend:!1,marker:!1,dataLabels:{enabled:!0,defer:!1,verticalAlign:"middle",formatter:function(){return this.point.name||this.point.id},inside:!0},
tooltip:{headerFormat:"",pointFormat:"\x3cb\x3e{point.name}\x3c/b\x3e: {point.value}\x3cbr/\x3e"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,drillUpButton:{position:{align:"right",x:-10,y:10}}},{pointArrayMap:["value"],axisTypes:l.heatmap?["xAxis","yAxis","colorAxis"]:["xAxis","yAxis"],directTouch:!0,optionalAxis:"colorAxis",getSymbol:n,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",translateColors:l.heatmap&&
l.heatmap.prototype.translateColors,colorAttribs:l.heatmap&&l.heatmap.prototype.colorAttribs,trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,c){a=F(a||[],function(c,a,e){a=w(a.parent,"");void 0===c[a]&&(c[a]=[]);c[a].push(e);return c},{});J(a,function(a,p,e){""!==p&&-1===b.inArray(p,c)&&(k(a,function(a){e[""].push(a)}),delete e[p])});return a},getTree:function(){var a=z(this.data,function(a){return a.id}),a=this.getListOfParents(this.data,a);this.nodeMap=[];return this.buildNode("",
-1,0,a,null)},init:function(a,c){B.prototype.init.call(this,a,c);this.options.allowDrillToNode&&b.addEvent(this,"click",this.onClickDrillToNode)},buildNode:function(a,c,d,b,e){var m=this,g=[],p=m.points[c],H=0,v;k(b[a]||[],function(c){v=m.buildNode(m.points[c].id,c,d+1,b,a);H=Math.max(v.height+1,H);g.push(v)});c={id:a,i:c,children:g,height:H,level:d,parent:e,visible:!1};m.nodeMap[c.id]=c;p&&(p.node=c);return c},setTreeValues:function(a){var c=this,d=c.options,b=c.nodeMap[c.rootNode],d="boolean"===
typeof d.levelIsConstant?d.levelIsConstant:!0,e=0,m=[],g,t=c.points[a.i];k(a.children,function(a){a=c.setTreeValues(a);m.push(a);a.ignore||(e+=a.val)});I(m,function(a,c){return a.sortIndex-c.sortIndex});g=w(t&&t.options.value,e);t&&(t.value=g);h(a,{children:m,childrenTotal:e,ignore:!(w(t&&t.visible,!0)&&0<g),isLeaf:a.visible&&!e,levelDynamic:a.level-(d?0:b.level),name:w(t&&t.name,""),sortIndex:w(t&&t.sortIndex,-g),val:g});return a},calculateChildrenAreas:function(a,c){var d=this,b=d.options,e=this.levelMap[a.levelDynamic+
1],m=w(d[e&&e.layoutAlgorithm]&&e.layoutAlgorithm,b.layoutAlgorithm),g=b.alternateStartingDirection,t=[];a=D(a.children,function(a){return!a.ignore});e&&e.layoutStartingDirection&&(c.direction="vertical"===e.layoutStartingDirection?0:1);t=d[m](c,a);k(a,function(a,b){b=t[b];a.values=u(b,{val:a.childrenTotal,direction:g?1-c.direction:c.direction});a.pointValues=u(b,{x:b.x/d.axisRatio,width:b.width/d.axisRatio});a.children.length&&d.calculateChildrenAreas(a,a.values)})},setPointValues:function(){var a=
this.xAxis,c=this.yAxis;k(this.points,function(d){var b=d.node,e=b.pointValues,m,g;e&&b.visible?(b=Math.round(a.translate(e.x,0,0,0,1))-0,m=Math.round(a.translate(e.x+e.width,0,0,0,1))-0,g=Math.round(c.translate(e.y,0,0,0,1))-0,e=Math.round(c.translate(e.y+e.height,0,0,0,1))-0,d.shapeType="rect",d.shapeArgs={x:Math.min(b,m),y:Math.min(g,e),width:Math.abs(m-b),height:Math.abs(e-g)},d.plotX=d.shapeArgs.x+d.shapeArgs.width/2,d.plotY=d.shapeArgs.y+d.shapeArgs.height/2):(delete d.plotX,delete d.plotY)})},
setColorRecursive:function(a,c,d,b,e){var m=this,g=m&&m.chart,g=g&&g.options&&g.options.colors,p;if(a){p=x(a,{colors:g,index:b,levelMap:m.levelMap,parentColor:c,parentColorIndex:d,series:m,siblings:e});if(c=m.points[a.i])c.color=p.color,c.colorIndex=p.colorIndex;k(a.children||[],function(c,d){m.setColorRecursive(c,p.color,p.colorIndex,d,a.children.length)})}},algorithmGroup:function(a,c,d,b){this.height=a;this.width=c;this.plot=b;this.startDirection=this.direction=d;this.lH=this.nH=this.lW=this.nW=
this.total=0;this.elArr=[];this.lP={total:0,lH:0,nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(a,c){return Math.max(a/c,c/a)}};this.addElement=function(a){this.lP.total=this.elArr[this.elArr.length-1];this.total+=a;0===this.direction?(this.lW=this.nW,this.lP.lH=this.lP.total/this.lW,this.lP.lR=this.lP.aspectRatio(this.lW,this.lP.lH),this.nW=this.total/this.height,this.lP.nH=this.lP.total/this.nW,this.lP.nR=this.lP.aspectRatio(this.nW,this.lP.nH)):(this.lH=this.nH,this.lP.lW=this.lP.total/this.lH,
this.lP.lR=this.lP.aspectRatio(this.lP.lW,this.lH),this.nH=this.total/this.width,this.lP.nW=this.lP.total/this.nH,this.lP.nR=this.lP.aspectRatio(this.lP.nW,this.nH));this.elArr.push(a)};this.reset=function(){this.lW=this.nW=0;this.elArr=[];this.total=0}},algorithmCalcPoints:function(a,c,d,b){var e,m,g,p,h=d.lW,v=d.lH,f=d.plot,l,q=0,n=d.elArr.length-1;c?(h=d.nW,v=d.nH):l=d.elArr[d.elArr.length-1];k(d.elArr,function(a){if(c||q<n)0===d.direction?(e=f.x,m=f.y,g=h,p=a/g):(e=f.x,m=f.y,p=v,g=a/p),b.push({x:e,
y:m,width:g,height:p}),0===d.direction?f.y+=p:f.x+=g;q+=1});d.reset();0===d.direction?d.width-=h:d.height-=v;f.y=f.parent.y+(f.parent.height-d.height);f.x=f.parent.x+(f.parent.width-d.width);a&&(d.direction=1-d.direction);c||d.addElement(l)},algorithmLowAspectRatio:function(a,c,d){var b=[],e=this,m,g={x:c.x,y:c.y,parent:c},f=0,h=d.length-1,v=new this.algorithmGroup(c.height,c.width,c.direction,g);k(d,function(d){m=d.val/c.val*c.height*c.width;v.addElement(m);v.lP.nR>v.lP.lR&&e.algorithmCalcPoints(a,
!1,v,b,g);f===h&&e.algorithmCalcPoints(a,!0,v,b,g);f+=1});return b},algorithmFill:function(a,c,d){var b=[],e,m=c.direction,g=c.x,f=c.y,h=c.width,v=c.height,l,n,q,r;k(d,function(d){e=d.val/c.val*c.height*c.width;l=g;n=f;0===m?(r=v,q=e/r,h-=q,g+=q):(q=h,r=e/q,v-=r,f+=r);b.push({x:l,y:n,width:q,height:r});a&&(m=1-m)});return b},strip:function(a,c){return this.algorithmLowAspectRatio(!1,a,c)},squarified:function(a,c){return this.algorithmLowAspectRatio(!0,a,c)},sliceAndDice:function(a,c){return this.algorithmFill(!0,
a,c)},stripes:function(a,c){return this.algorithmFill(!1,a,c)},translate:function(){var a=this,c=a.rootNode=w(a.rootNode,a.options.rootId,""),d,b;B.prototype.translate.call(a);a.levelMap=F(a.options.levels||[],function(a,c){a[c.level]=c;return a},{});b=a.tree=a.getTree();d=a.nodeMap[c];""===c||d&&d.children.length||(a.drillToNode("",!1),c=a.rootNode,d=a.nodeMap[c]);E(a.nodeMap[a.rootNode],function(c){var d=!1,b=c.parent;c.visible=!0;if(b||""===b)d=a.nodeMap[b];return d});E(a.nodeMap[a.rootNode].children,
function(a){var c=!1;k(a,function(a){a.visible=!0;a.children.length&&(c=(c||[]).concat(a.children))});return c});a.setTreeValues(b);a.axisRatio=a.xAxis.len/a.yAxis.len;a.nodeMap[""].pointValues=c={x:0,y:0,width:100,height:100};a.nodeMap[""].values=c=u(c,{width:c.width*a.axisRatio,direction:"vertical"===a.options.layoutStartingDirection?0:1,val:b.val});a.calculateChildrenAreas(b,c);a.colorAxis?a.translateColors():a.options.colorByPoint||a.setColorRecursive(a.tree);a.options.allowDrillToNode&&(d=d.pointValues,
a.xAxis.setExtremes(d.x,d.x+d.width,!1),a.yAxis.setExtremes(d.y,d.y+d.height,!1),a.xAxis.setScale(),a.yAxis.setScale());a.setPointValues()},drawDataLabels:function(){var a=this,c=D(a.points,function(a){return a.node.visible}),d,b;k(c,function(c){b=a.levelMap[c.node.levelDynamic];d={style:{}};c.node.isLeaf||(d.enabled=!1);b&&b.dataLabels&&(d=u(d,b.dataLabels),a._hasPointLabels=!0);c.shapeArgs&&(d.style.width=c.shapeArgs.width,c.dataLabel&&c.dataLabel.css({width:c.shapeArgs.width+"px"}));c.dlOptions=
u(d,c.options.dataLabels)});B.prototype.drawDataLabels.call(this)},alignDataLabel:function(a){l.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},drawPoints:function(){var a=this,c=D(a.points,function(a){return a.node.visible});k(c,function(c){var d="level-group-"+c.node.levelDynamic;a[d]||(a[d]=a.chart.renderer.g(d).attr({zIndex:1E3-c.node.levelDynamic}).add(a.group));c.group=a[d]});l.column.prototype.drawPoints.call(this);this.colorAttribs&&
k(this.points,function(a){a.graphic&&a.graphic.css(this.colorAttribs(a))},this);a.options.allowDrillToNode&&k(c,function(c){c.graphic&&(c.drillId=a.options.interactByLeaf?a.drillToByLeaf(c):a.drillToByGroup(c))})},onClickDrillToNode:function(a){var c=(a=a.point)&&a.drillId;A(c)&&(a.setState(""),this.drillToNode(c))},drillToByGroup:function(a){var c=!1;1!==a.node.level-this.nodeMap[this.rootNode].level||a.node.isLeaf||(c=a.id);return c},drillToByLeaf:function(a){var c=!1;if(a.node.parent!==this.rootNode&&
a.node.isLeaf)for(a=a.node;!c;)a=this.nodeMap[a.parent],a.parent===this.rootNode&&(c=a.id);return c},drillUp:function(){var a=this.nodeMap[this.rootNode];a&&A(a.parent)&&this.drillToNode(a.parent)},drillToNode:function(a,c){var d=this.nodeMap[a];this.idPreviousRoot=this.rootNode;this.rootNode=a;""===a?this.drillUpButton=this.drillUpButton.destroy():this.showDrillUpButton(d&&d.name||a);this.isDirty=!0;w(c,!0)&&this.chart.redraw()},showDrillUpButton:function(a){var c=this;a=a||"\x3c Back";var d=c.options.drillUpButton,
b,e;d.text&&(a=d.text);this.drillUpButton?(this.drillUpButton.placed=!1,this.drillUpButton.attr({text:a}).align()):(e=(b=d.theme)&&b.states,this.drillUpButton=this.chart.renderer.button(a,null,null,function(){c.drillUp()},b,e&&e.hover,e&&e.select).addClass("highcharts-drillup-button").attr({align:d.position.align,zIndex:7}).add().align(d.position,!1,d.relativeTo||"plotBox"))},buildKDTree:n,drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,getExtremes:function(){B.prototype.getExtremes.call(this,
this.colorValueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;B.prototype.getExtremes.call(this)},getExtremesFromAll:!0,bindAxes:function(){var a={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,dataMin:0,minPadding:0,max:100,dataMax:100,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]};B.prototype.bindAxes.call(this);b.extend(this.yAxis.options,a);b.extend(this.xAxis.options,a)},utils:{recursive:E,reduce:F}},{getClassName:function(){var a=b.Point.prototype.getClassName.call(this),
c=this.series,d=c.options;this.node.level<=c.nodeMap[c.rootNode].level?a+=" highcharts-above-level":this.node.isLeaf||w(d.interactByLeaf,!d.allowDrillToNode)?this.node.isLeaf||(a+=" highcharts-internal-node"):a+=" highcharts-internal-node-interactive";return a},isValid:function(){return this.id||y(this.value)},setState:function(a){b.Point.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})},setVisible:l.pie.prototype.pointClass.prototype.setVisible})})(z,K);(function(b,
r,f){var l=b.CenteredSeriesMixin,z=b.Series,u=b.each,h=b.extend,n=l.getCenter,k=f.getColor,x=l.getStartAndEndRadians,D=b.grep,y=b.isNumber,A=b.isObject,w=b.isString,B=b.merge,I=b.pick,J=180/Math.PI,l=b.seriesType,F=f.setTreeValues,E=b.reduce,a=function(a,b){var c=b.mapIdToNode[a.parent],d=b.series,m=d.chart,g=d.points[a.i];b=k(a,{colors:m&&m.options&&m.options.colors,colorIndex:d.colorIndex,colorByPoint:d.colorByPoint,index:b.index,levelMap:b.levelMap,parentColor:c&&c.color,parentColorIndex:c&&c.colorIndex,
series:b.series,siblings:b.siblings});a.color=b.color;a.colorIndex=b.colorIndex;g&&(g.color=a.color,g.colorIndex=a.colorIndex,a.sliced=g.sliced);return a};l("sunburst","treemap",{center:["50%","50%"],dataLabels:{defer:!0,style:{textOverflow:"ellipsis"},rotationMode:"perpendicular"},rootId:void 0,levelIsConstant:!0,slicedOffset:10},{drawDataLabels:b.noop,drawPoints:function(){var a=this,b=a.levelMap,f=a.shapeRoot,e=a.group,m=a.hasRendered,g=a.rootNode,k=a.idPreviousRoot,l=a.nodeMap,v=l[k],r=v&&v.shapeArgs,
v=a.points,n=a.startAndEndRadians,q=a.chart,q=q&&q.options&&q.options.chart||{},x="boolean"===typeof q.animation?q.animation:!0,w=a.center[3]/2,E=a.chart.renderer,D,F=!1,G=!1;if(q=!!(x&&m&&g!==k&&a.dataLabelsGroup))a.dataLabelsGroup.attr({opacity:0}),D=function(){F=!0;a.dataLabelsGroup&&a.dataLabelsGroup.animate({opacity:1,visibility:"visible"})};u(v,function(c){var d,v,p=c.node,t=b[p.levelDynamic];d=c.shapeExisting||{};var q=p.shapeArgs||{},z,H=!(!p.visible||!p.shapeArgs);if(m&&x){var u={};v={end:q.end,
start:q.start,innerR:q.innerR,r:q.r,x:q.x,y:q.y};H?!c.graphic&&r&&(u=g===c.id?{start:n.start,end:n.end}:r.end<=q.start?{start:n.end,end:n.end}:{start:n.start,end:n.start},u.innerR=u.r=w):c.graphic&&(k===c.id?v={innerR:w,r:w}:f&&(v=f.end<=d.start?{innerR:w,r:w,start:n.end,end:n.end}:{innerR:w,r:w,start:n.start,end:n.start}));d=u}else v=q,d={};var u=[q.plotX,q.plotY],C;c.node.isLeaf||(g===c.id?(C=l[g],C=C.parent):C=c.id);h(c,{shapeExisting:q,tooltipPos:u,drillId:C,name:""+(c.name||c.id||c.index),plotX:q.plotX,
plotY:q.plotY,value:p.val,isNull:!H});u=c.options;C=a.options;p=A(q)?q:{};C=A(C)?C.dataLabels:{};u=A(u)?u.dataLabels:{};t=A(t)?t.dataLabels:{};t=B({rotationMode:"perpendicular",style:{width:p.radius}},C,t,u);y(t.rotation)||(p=p.end-(p.end-p.start)/2,p=p*J%180,"parallel"===t.rotationMode&&(p-=90),90<p&&(p-=180),t.rotation=p);0===t.rotation&&(t.rotation=.001);c.dlOptions=t;!G&&H&&(G=!0,z=D);c.draw({animate:v,attr:h(d,a.pointAttribs&&a.pointAttribs(c,c.selected&&"select")),onComplete:z,group:e,renderer:E,
shapeType:"arc",shapeArgs:q})});q&&G?(a.hasRendered=!1,a.options.dataLabels.defer=!0,z.prototype.drawDataLabels.call(a),a.hasRendered=!0,F&&D()):z.prototype.drawDataLabels.call(a)},layoutAlgorithm:function(a,b,f){var c=a.start,d=a.end-c,g=a.val,p=a.x,h=a.y,k=a.r,n=k+a.radius,l=y(f.slicedOffset)?f.slicedOffset:0;return E(b||[],function(b,e){var m=1/g*e.val*d,t=c+m/2,q=p+Math.cos(t)*l,t=h+Math.sin(t)*l;e={x:e.sliced&&e.id!==f.idRoot?q:p,y:e.sliced&&e.id!==f.idRoot?t:h,innerR:k,r:n,radius:a.radius,start:c,
end:c+m};b.push(e);c=e.end;return b},[])},setShapeArgs:function(a,b,f){var c=[];a=D(a.children,function(a){return a.visible});c=this.layoutAlgorithm(b,a,f);u(a,function(a,b){b=c[b];var d=b.start+(b.end-b.start)/2,e=b.innerR+(b.r-b.innerR)/2,d=0===b.innerR&&6.28<b.end-b.start?{x:b.x,y:b.y}:{x:b.x+Math.cos(d)*e,y:b.y+Math.sin(d)*e},e=a.val?a.childrenTotal>a.val?a.childrenTotal:a.val:a.childrenTotal,g=(b.end-b.start)/(2*Math.PI),m=2*Math.PI*b.innerR;this.points[a.i]&&(this.points[a.i].innerArcLength=
g*m);a.shapeArgs=B(b,{plotX:d.x,plotY:d.y});a.values=B(b,{val:e});a.children.length&&this.setShapeArgs(a,a.values,f)},this)},translate:function(){var c=this.options,b=this.center=n.call(this),f=this.startAndEndRadians=x(c.startAngle,c.endAngle),e=b[3]/2,m=b[2]/2,g=this.rootNode=I(this.rootNode,c.rootId,""),h=this.nodeMap,k,l=h&&h[g],r,u;this.shapeRoot=l&&l.shapeArgs;z.prototype.translate.call(this);this.levelMap=E(this.options.levels||[],function(a,b){a[b.level]=b;return a},{});u=this.tree=this.getTree();
h=this.nodeMap;l=h[g];k=w(l.parent)?l.parent:"";r=h[k];F(u,{before:a,idRoot:g,levelIsConstant:c.levelIsConstant,levelMap:this.levelMap,mapIdToNode:h,points:this.points,series:this});b=h[""].shapeArgs={end:f.end,r:e,radius:(m-e)/(g===k?l.height:l.height+1),start:f.start,val:r.val,x:b[0],y:b[1]};this.setShapeArgs(r,b,{idRoot:g,slicedOffset:c.slicedOffset})},animate:function(a){var b=this.chart,c=[b.plotWidth/2,b.plotHeight/2],e=b.plotLeft,f=b.plotTop,b=this.group;a?(a={translateX:c[0]+e,translateY:c[1]+
f,scaleX:.001,scaleY:.001,rotation:10,opacity:.01},b.attr(a)):(a={translateX:e,translateY:f,scaleX:1,scaleY:1,rotation:0,opacity:1},b.animate(a,this.options.animation),this.animate=null)}},{draw:r,shouldDraw:function(){return!this.isNull}})})(z,L,K)});
