/*
 Highcharts JS v8.0.0 (2019-12-10)

 (c) 2016-2019 Highsoft AS
 Authors: Jon Arild Nygard

 License: www.highcharts.com/license
*/
(function(d){"object"===typeof module&&module.exports?(d["default"]=d,module.exports=d):"function"===typeof define&&define.amd?define("highcharts/modules/sunburst",["highcharts"],function(w){d(w);d.Highcharts=w;return d}):d("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(d){function w(m,b,d,g){m.hasOwnProperty(b)||(m[b]=g.apply(null,d))}d=d?d._modules:{};w(d,"mixins/draw-point.js",[],function(){var m=function(b){var m=this,d=m.graphic,E=b.animatableAttribs,n=b.onComplete,q=b.css,z=b.renderer;
if(m.shouldDraw())d||(m.graphic=d=z[b.shapeType](b.shapeArgs).add(b.group)),d.css(q).attr(b.attribs).animate(E,b.isNew?!1:void 0,n);else if(d){var G=function(){m.graphic=d=d.destroy();"function"===typeof n&&n()};Object.keys(E).length?d.animate(E,void 0,function(){G()}):G()}};return function(b){(b.attribs=b.attribs||{})["class"]=this.getClassName();m.call(this,b)}});w(d,"mixins/tree-series.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var m=b.extend,g=b.isArray,E=b.isNumber,n=b.isObject,
q=b.pick,z=d.merge;return{getColor:function(m,l){var b=l.index,G=l.mapOptionsToLevel,r=l.parentColor,n=l.parentColorIndex,g=l.series,v=l.colors,z=l.siblings,u=g.points,E=g.chart.options.chart,A;if(m){u=u[m.i];m=G[m.level]||{};if(G=u&&m.colorByPoint){var J=u.index%(v?v.length:E.colorCount);var D=v&&v[J]}if(!g.chart.styledMode){v=u&&u.options.color;E=m&&m.color;if(A=r)A=(A=m&&m.colorVariation)&&"brightness"===A.key?d.color(r).brighten(b/z*A.to).get():r;A=q(v,E,D,A,g.color)}var w=q(u&&u.options.colorIndex,
m&&m.colorIndex,J,n,l.colorIndex)}return{color:A,colorIndex:w}},getLevelOptions:function(b){var d=null;if(n(b)){d={};var F=E(b.from)?b.from:1;var q=b.levels;var r={};var H=n(b.defaults)?b.defaults:{};g(q)&&(r=q.reduce(function(b,d){if(n(d)&&E(d.level)){var l=z({},d);var q="boolean"===typeof l.levelIsConstant?l.levelIsConstant:H.levelIsConstant;delete l.levelIsConstant;delete l.level;d=d.level+(q?0:F-1);n(b[d])?m(b[d],l):b[d]=l}return b},{}));q=E(b.to)?b.to:1;for(b=0;b<=q;b++)d[b]=z({},H,n(r[b])?r[b]:
{})}return d},setTreeValues:function L(b,d){var l=d.before,g=d.idRoot,n=d.mapIdToNode[g],v=d.points[b.i],E=v&&v.options||{},u=0,z=[];m(b,{levelDynamic:b.level-(("boolean"===typeof d.levelIsConstant?d.levelIsConstant:1)?0:n.level),name:q(v&&v.name,""),visible:g===b.id||("boolean"===typeof d.visible?d.visible:!1)});"function"===typeof l&&(b=l(b,d));b.children.forEach(function(l,q){var g=m({},d);m(g,{index:q,siblings:b.children.length,visible:b.visible});l=L(l,g);z.push(l);l.visible&&(u+=l.val)});b.visible=
0<u||b.visible;l=q(E.value,u);m(b,{children:z,childrenTotal:u,isLeaf:b.visible&&!u,val:l});return b},updateRootId:function(b){if(n(b)){var d=n(b.options)?b.options:{};d=q(b.rootNode,d.rootId,"");n(b.userOptions)&&(b.userOptions.rootId=d);b.rootNode=d}return d}}});w(d,"modules/treemap.src.js",[d["parts/Globals.js"],d["mixins/tree-series.js"],d["mixins/draw-point.js"],d["parts/Utilities.js"]],function(d,b,w,g){var m=g.correctFloat,n=g.defined,q=g.extend,z=g.isArray,G=g.isNumber,l=g.isObject,F=g.isString,
L=g.objectEach,r=g.pick;g=d.seriesType;var H=d.seriesTypes,M=d.addEvent,v=d.merge,P=d.error,u=d.noop,Q=d.fireEvent,A=b.getColor,J=b.getLevelOptions,D=d.Series,N=d.stableSort,O=d.Color,f=function(a,c,e){e=e||this;L(a,function(t,h){c.call(e,t,h,a)})},k=function(a,c,e){e=e||this;a=c.call(e,a);!1!==a&&k(a,c,e)},x=b.updateRootId;g("treemap","scatter",{allowTraversingTree:!1,animationLimit:250,showInLegend:!1,marker:!1,colorByPoint:!1,dataLabels:{defer:!1,enabled:!0,formatter:function(){var a=this&&this.point?
this.point:{};return F(a.name)?a.name:""},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:"",pointFormat:"<b>{point.name}</b>: {point.value}<br/>"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,drillUpButton:{position:{align:"right",x:-10,y:10}},traverseUpButton:{position:{align:"right",x:-10,y:10}},borderColor:"#e6e6e6",borderWidth:1,colorKey:"colorValue",opacity:.15,states:{hover:{borderColor:"#999999",
brightness:H.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}}},{pointArrayMap:["value"],directTouch:!0,optionalAxis:"colorAxis",getSymbol:u,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,c){a=z(a)?a:[];var e=z(c)?c:[];c=a.reduce(function(a,c,e){c=r(c.parent,"");"undefined"===typeof a[c]&&(a[c]=[]);a[c].push(e);return a},{"":[]});f(c,function(a,c,f){""!==c&&-1===e.indexOf(c)&&(a.forEach(function(a){f[""].push(a)}),
delete f[c])});return c},getTree:function(){var a=this.data.map(function(a){return a.id});a=this.getListOfParents(this.data,a);this.nodeMap=[];return this.buildNode("",-1,0,a,null)},hasData:function(){return!!this.processedXData.length},init:function(a,c){var e=d.colorMapSeriesMixin;e&&(this.colorAttribs=e.colorAttribs);this.eventsToUnbind.push(M(this,"setOptions",function(a){a=a.userOptions;n(a.allowDrillToNode)&&!n(a.allowTraversingTree)&&(a.allowTraversingTree=a.allowDrillToNode,delete a.allowDrillToNode);
n(a.drillUpButton)&&!n(a.traverseUpButton)&&(a.traverseUpButton=a.drillUpButton,delete a.drillUpButton)}));D.prototype.init.call(this,a,c);this.options.allowTraversingTree&&this.eventsToUnbind.push(M(this,"click",this.onClickDrillToNode))},buildNode:function(a,c,e,f,h){var t=this,d=[],b=t.points[c],k=0,p;(f[a]||[]).forEach(function(c){p=t.buildNode(t.points[c].id,c,e+1,f,a);k=Math.max(p.height+1,k);d.push(p)});c={id:a,i:c,children:d,height:k,level:e,parent:h,visible:!1};t.nodeMap[c.id]=c;b&&(b.node=
c);return c},setTreeValues:function(a){var c=this,e=c.options,f=c.nodeMap[c.rootNode];e="boolean"===typeof e.levelIsConstant?e.levelIsConstant:!0;var h=0,d=[],b=c.points[a.i];a.children.forEach(function(a){a=c.setTreeValues(a);d.push(a);a.ignore||(h+=a.val)});N(d,function(a,c){return a.sortIndex-c.sortIndex});var k=r(b&&b.options.value,h);b&&(b.value=k);q(a,{children:d,childrenTotal:h,ignore:!(r(b&&b.visible,!0)&&0<k),isLeaf:a.visible&&!h,levelDynamic:a.level-(e?0:f.level),name:r(b&&b.name,""),sortIndex:r(b&&
b.sortIndex,-k),val:k});return a},calculateChildrenAreas:function(a,c){var e=this,f=e.options,h=e.mapOptionsToLevel[a.level+1],b=r(e[h&&h.layoutAlgorithm]&&h.layoutAlgorithm,f.layoutAlgorithm),d=f.alternateStartingDirection,k=[];a=a.children.filter(function(a){return!a.ignore});h&&h.layoutStartingDirection&&(c.direction="vertical"===h.layoutStartingDirection?0:1);k=e[b](c,a);a.forEach(function(a,h){h=k[h];a.values=v(h,{val:a.childrenTotal,direction:d?1-c.direction:c.direction});a.pointValues=v(h,
{x:h.x/e.axisRatio,y:100-h.y-h.height,width:h.width/e.axisRatio});a.children.length&&e.calculateChildrenAreas(a,a.values)})},setPointValues:function(){var a=this,c=a.xAxis,e=a.yAxis,f=a.chart.styledMode;a.points.forEach(function(h){var b=h.node,d=b.pointValues;b=b.visible;if(d&&b){b=d.height;var t=d.width,k=d.x,p=d.y,x=f?0:(a.pointAttribs(h)["stroke-width"]||0)%2/2;d=Math.round(c.toPixels(k,!0))-x;t=Math.round(c.toPixels(k+t,!0))-x;k=Math.round(e.toPixels(p,!0))-x;b=Math.round(e.toPixels(p+b,!0))-
x;h.shapeArgs={x:Math.min(d,t),y:Math.min(k,b),width:Math.abs(t-d),height:Math.abs(b-k)};h.plotX=h.shapeArgs.x+h.shapeArgs.width/2;h.plotY=h.shapeArgs.y+h.shapeArgs.height/2}else delete h.plotX,delete h.plotY})},setColorRecursive:function(a,c,e,b,h){var f=this,d=f&&f.chart;d=d&&d.options&&d.options.colors;if(a){var t=A(a,{colors:d,index:b,mapOptionsToLevel:f.mapOptionsToLevel,parentColor:c,parentColorIndex:e,series:f,siblings:h});if(c=f.points[a.i])c.color=t.color,c.colorIndex=t.colorIndex;(a.children||
[]).forEach(function(c,e){f.setColorRecursive(c,t.color,t.colorIndex,e,a.children.length)})}},algorithmGroup:function(a,c,e,f){this.height=a;this.width=c;this.plot=f;this.startDirection=this.direction=e;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,e,f){var b,d,t,k,x=e.lW,p=e.lH,C=e.plot,g=0,q=e.elArr.length-1;if(c)x=e.nW,p=e.nH;else var l=e.elArr[e.elArr.length-1];e.elArr.forEach(function(a){if(c||g<q)0===e.direction?(b=C.x,d=C.y,t=x,k=a/t):(b=C.x,d=C.y,k=p,t=a/k),f.push({x:b,y:d,width:t,height:m(k)}),0===e.direction?C.y+=k:C.x+=t;g+=1});e.reset();0===e.direction?e.width-=x:e.height-=p;C.y=C.parent.y+(C.parent.height-e.height);C.x=C.parent.x+(C.parent.width-e.width);a&&(e.direction=1-e.direction);c||e.addElement(l)},algorithmLowAspectRatio:function(a,
c,e){var f=[],b=this,d,k={x:c.x,y:c.y,parent:c},x=0,m=e.length-1,p=new this.algorithmGroup(c.height,c.width,c.direction,k);e.forEach(function(e){d=e.val/c.val*c.height*c.width;p.addElement(d);p.lP.nR>p.lP.lR&&b.algorithmCalcPoints(a,!1,p,f,k);x===m&&b.algorithmCalcPoints(a,!0,p,f,k);x+=1});return f},algorithmFill:function(a,c,e){var f=[],b,d=c.direction,k=c.x,x=c.y,m=c.width,p=c.height,g,q,l,n;e.forEach(function(e){b=e.val/c.val*c.height*c.width;g=k;q=x;0===d?(n=p,l=b/n,m-=l,k+=l):(l=m,n=b/l,p-=n,
x+=n);f.push({x:g,y:q,width:l,height:n});a&&(d=1-d)});return f},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.options,e=x(a);D.prototype.translate.call(a);var f=a.tree=a.getTree();var b=a.nodeMap[e];a.renderTraverseUpButton(e);a.mapOptionsToLevel=J({from:b.level+
1,levels:c.levels,to:f.height,defaults:{levelIsConstant:a.options.levelIsConstant,colorByPoint:c.colorByPoint}});""===e||b&&b.children.length||(a.setRootNode("",!1),e=a.rootNode,b=a.nodeMap[e]);k(a.nodeMap[a.rootNode],function(c){var e=!1,f=c.parent;c.visible=!0;if(f||""===f)e=a.nodeMap[f];return e});k(a.nodeMap[a.rootNode].children,function(a){var c=!1;a.forEach(function(a){a.visible=!0;a.children.length&&(c=(c||[]).concat(a.children))});return c});a.setTreeValues(f);a.axisRatio=a.xAxis.len/a.yAxis.len;
a.nodeMap[""].pointValues=e={x:0,y:0,width:100,height:100};a.nodeMap[""].values=e=v(e,{width:e.width*a.axisRatio,direction:"vertical"===c.layoutStartingDirection?0:1,val:f.val});a.calculateChildrenAreas(f,e);a.colorAxis||c.colorByPoint||a.setColorRecursive(a.tree);c.allowTraversingTree&&(c=b.pointValues,a.xAxis.setExtremes(c.x,c.x+c.width,!1),a.yAxis.setExtremes(c.y,c.y+c.height,!1),a.xAxis.setScale(),a.yAxis.setScale());a.setPointValues()},drawDataLabels:function(){var a=this,c=a.mapOptionsToLevel,
e,f;a.points.filter(function(a){return a.node.visible}).forEach(function(b){f=c[b.node.level];e={style:{}};b.node.isLeaf||(e.enabled=!1);f&&f.dataLabels&&(e=v(e,f.dataLabels),a._hasPointLabels=!0);b.shapeArgs&&(e.style.width=b.shapeArgs.width,b.dataLabel&&b.dataLabel.css({width:b.shapeArgs.width+"px"}));b.dlOptions=v(e,b.options.dataLabels)});D.prototype.drawDataLabels.call(this)},alignDataLabel:function(a,c,e){var b=e.style;!n(b.textOverflow)&&c.text&&c.getBBox().width>c.text.textWidth&&c.css({textOverflow:"ellipsis",
width:b.width+="px"});H.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},pointAttribs:function(a,c){var e=l(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},b=a&&e[a.node.level]||{};e=this.options;var f=c&&e.states[c]||{},d=a&&a.getClassName()||"";a={stroke:a&&a.borderColor||b.borderColor||f.borderColor||e.borderColor,"stroke-width":r(a&&a.borderWidth,b.borderWidth,f.borderWidth,e.borderWidth),dashstyle:a&&a.borderDashStyle||b.borderDashStyle||
f.borderDashStyle||e.borderDashStyle,fill:a&&a.color||this.color};-1!==d.indexOf("highcharts-above-level")?(a.fill="none",a["stroke-width"]=0):-1!==d.indexOf("highcharts-internal-node-interactive")?(c=r(f.opacity,e.opacity),a.fill=O(a.fill).setOpacity(c).get(),a.cursor="pointer"):-1!==d.indexOf("highcharts-internal-node")?a.fill="none":c&&(a.fill=O(a.fill).brighten(f.brightness).get());return a},drawPoints:function(){var a=this,c=a.chart,e=c.renderer,b=c.styledMode,f=a.options,d=b?{}:f.shadow,k=f.borderRadius,
x=c.pointCount<f.animationLimit,m=f.allowTraversingTree;a.points.forEach(function(c){var h=c.node.levelDynamic,t={},l={},g={},p="level-group-"+h,B=!!c.graphic,R=x&&B,n=c.shapeArgs;c.shouldDraw()&&(k&&(l.r=k),v(!0,R?t:l,B?n:{},b?{}:a.pointAttribs(c,c.selected&&"select")),a.colorAttribs&&b&&q(g,a.colorAttribs(c)),a[p]||(a[p]=e.g(p).attr({zIndex:1E3-h}).add(a.group),a[p].survive=!0));c.draw({animatableAttribs:t,attribs:l,css:g,group:a[p],renderer:e,shadow:d,shapeArgs:n,shapeType:"rect"});m&&c.graphic&&
(c.drillId=f.interactByLeaf?a.drillToByLeaf(c):a.drillToByGroup(c))})},onClickDrillToNode:function(a){var c=(a=a.point)&&a.drillId;F(c)&&(a.setState(""),this.setRootNode(c,!0,{trigger:"click"}))},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&&F(a.parent)&&this.setRootNode(a.parent,!0,{trigger:"traverseUpButton"})},drillToNode:function(a,c){P("WARNING: treemap.drillToNode has been renamed to treemap.setRootNode, and will be removed in the next major version.");this.setRootNode(a,c)},setRootNode:function(a,c,e){a=q({newRootId:a,previousRootId:this.rootNode,redraw:r(c,!0),series:this},e);Q(this,"setRootNode",a,function(a){var c=a.series;c.idPreviousRoot=a.previousRootId;c.rootNode=a.newRootId;c.isDirty=!0;a.redraw&&
c.chart.redraw()})},renderTraverseUpButton:function(a){var c=this,e=c.options.traverseUpButton,b=r(e.text,c.nodeMap[a].name,"< Back");if(""===a)c.drillUpButton&&(c.drillUpButton=c.drillUpButton.destroy());else if(this.drillUpButton)this.drillUpButton.placed=!1,this.drillUpButton.attr({text:b}).align();else{var f=(a=e.theme)&&a.states;this.drillUpButton=this.chart.renderer.button(b,null,null,function(){c.drillUp()},a,f&&f.hover,f&&f.select).addClass("highcharts-drillup-button").attr({align:e.position.align,
zIndex:7}).add().align(e.position,!1,e.relativeTo||"plotBox")}},buildKDTree:u,drawLegendSymbol:d.LegendSymbolMixin.drawRectangle,getExtremes:function(){D.prototype.getExtremes.call(this,this.colorValueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;D.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:[]};D.prototype.bindAxes.call(this);
q(this.yAxis.options,a);q(this.xAxis.options,a)},setState:function(a){this.options.inactiveOtherPoints=!0;D.prototype.setState.call(this,a,!1);this.options.inactiveOtherPoints=!1},utils:{recursive:k}},{draw:w,setVisible:H.pie.prototype.pointClass.prototype.setVisible,getClassName:function(){var a=d.Point.prototype.getClassName.call(this),c=this.series,e=c.options;this.node.level<=c.nodeMap[c.rootNode].level?a+=" highcharts-above-level":this.node.isLeaf||r(e.interactByLeaf,!e.allowTraversingTree)?
this.node.isLeaf||(a+=" highcharts-internal-node"):a+=" highcharts-internal-node-interactive";return a},isValid:function(){return this.id||G(this.value)},setState:function(a){d.Point.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})},shouldDraw:function(){return G(this.plotY)&&null!==this.y}});""});w(d,"modules/sunburst.src.js",[d["parts/Globals.js"],d["parts/Utilities.js"],d["mixins/draw-point.js"],d["mixins/tree-series.js"]],function(d,b,w,g){var m=b.correctFloat,
n=b.extend,q=b.isNumber,z=b.isObject,G=b.isString,l=b.splat;b=d.CenteredSeriesMixin;var F=d.Series,L=b.getCenter,r=g.getColor,H=g.getLevelOptions,M=b.getStartAndEndRadians,v=d.merge,P=180/Math.PI;b=d.seriesType;var u=d.seriesTypes,Q=g.setTreeValues,A=g.updateRootId,J=function(f,b){var d=[];if(q(f)&&q(b)&&f<=b)for(;f<=b;f++)d.push(f);return d},D=function(b,d){d=z(d)?d:{};var f=0,a;if(z(b)){var c=v({},b);b=q(d.from)?d.from:0;var e=q(d.to)?d.to:0;var k=J(b,e);b=Object.keys(c).filter(function(a){return-1===
k.indexOf(+a)});var h=a=q(d.diffRadius)?d.diffRadius:0;k.forEach(function(b){b=c[b];var e=b.levelSize.unit,d=b.levelSize.value;"weight"===e?f+=d:"percentage"===e?(b.levelSize={unit:"pixels",value:d/100*h},a-=b.levelSize.value):"pixels"===e&&(a-=d)});k.forEach(function(b){var e=c[b];"weight"===e.levelSize.unit&&(e=e.levelSize.value,c[b].levelSize={unit:"pixels",value:e/f*a})});b.forEach(function(a){c[a].levelSize={value:0,unit:"pixels"}})}return c},N=function(b){var d=b.level;return{from:0<d?d:1,to:d+
b.height}},O=function(b,d){var f=d.mapIdToNode[b.parent],a=d.series,c=a.chart,e=a.points[b.i];f=r(b,{colors:a.options.colors||c&&c.options.colors,colorIndex:a.colorIndex,index:d.index,mapOptionsToLevel:d.mapOptionsToLevel,parentColor:f&&f.color,parentColorIndex:f&&f.colorIndex,series:d.series,siblings:d.siblings});b.color=f.color;b.colorIndex=f.colorIndex;e&&(e.color=b.color,e.colorIndex=b.colorIndex,b.sliced=b.id!==d.idRoot?e.sliced:!1);return b};b("sunburst","treemap",{center:["50%","50%"],colorByPoint:!1,
opacity:1,dataLabels:{allowOverlap:!0,defer:!0,rotationMode:"auto",style:{textOverflow:"ellipsis"}},rootId:void 0,levelIsConstant:!0,levelSize:{value:1,unit:"weight"},slicedOffset:10},{drawDataLabels:d.noop,drawPoints:function(){var b=this,d=b.mapOptionsToLevel,x=b.shapeRoot,a=b.group,c=b.hasRendered,e=b.rootNode,t=b.idPreviousRoot,h=b.nodeMap,g=h[t],m=g&&g.shapeArgs;g=b.points;var r=b.startAndEndRadians,u=b.chart,p=u&&u.options&&u.options.chart||{},C="boolean"===typeof p.animation?p.animation:!0,
w=b.center[3]/2,E=b.chart.renderer,A=!1,D=!1;if(p=!!(C&&c&&e!==t&&b.dataLabelsGroup)){b.dataLabelsGroup.attr({opacity:0});var G=function(){A=!0;b.dataLabelsGroup&&b.dataLabelsGroup.animate({opacity:1,visibility:"visible"})}}g.forEach(function(f){var k=f.node,g=d[k.level];var p=f.shapeExisting||{};var B=k.shapeArgs||{},A=!(!k.visible||!k.shapeArgs);if(c&&C){var K={};var F={end:B.end,start:B.start,innerR:B.innerR,r:B.r,x:B.x,y:B.y};A?!f.graphic&&m&&(K=e===f.id?{start:r.start,end:r.end}:m.end<=B.start?
{start:r.end,end:r.end}:{start:r.start,end:r.start},K.innerR=K.r=w):f.graphic&&(t===f.id?F={innerR:w,r:w}:x&&(F=x.end<=p.start?{innerR:w,r:w,start:r.end,end:r.end}:{innerR:w,r:w,start:r.start,end:r.start}));p=K}else F=B,p={};K=[B.plotX,B.plotY];if(!f.node.isLeaf)if(e===f.id){var y=h[e];y=y.parent}else y=f.id;n(f,{shapeExisting:B,tooltipPos:K,drillId:y,name:""+(f.name||f.id||f.index),plotX:B.plotX,plotY:B.plotY,value:k.val,isNull:!A});y=f.options;k=z(B)?B:{};y=z(y)?y.dataLabels:{};g=l(z(g)?g.dataLabels:
{})[0];g=v({style:{}},g,y);y=g.rotationMode;if(!q(g.rotation)){if("auto"===y||"circular"===y)if(1>f.innerArcLength&&f.outerArcLength>k.radius){var I=0;f.dataLabelPath&&"circular"===y&&(g.textPath={enabled:!0})}else 1<f.innerArcLength&&f.outerArcLength>1.5*k.radius?"circular"===y?g.textPath={enabled:!0,attributes:{dy:5}}:y="parallel":(f.dataLabel&&f.dataLabel.textPathWrapper&&"circular"===y&&(g.textPath={enabled:!1}),y="perpendicular");"auto"!==y&&"circular"!==y&&(I=k.end-(k.end-k.start)/2);g.style.width=
"parallel"===y?Math.min(2.5*k.radius,(f.outerArcLength+f.innerArcLength)/2):k.radius;"perpendicular"===y&&f.series.chart.renderer.fontMetrics(g.style.fontSize).h>f.outerArcLength&&(g.style.width=1);g.style.width=Math.max(g.style.width-2*(g.padding||0),1);I=I*P%180;"parallel"===y&&(I-=90);90<I?I-=180:-90>I&&(I+=180);g.rotation=I}g.textPath&&(0===f.shapeExisting.innerR&&g.textPath.enabled?(g.rotation=0,g.textPath.enabled=!1,g.style.width=Math.max(2*f.shapeExisting.r-2*(g.padding||0),1)):f.dlOptions&&
f.dlOptions.textPath&&!f.dlOptions.textPath.enabled&&"circular"===y&&(g.textPath.enabled=!0),g.textPath.enabled&&(g.rotation=0,g.style.width=Math.max((f.outerArcLength+f.innerArcLength)/2-2*(g.padding||0),1)));0===g.rotation&&(g.rotation=.001);f.dlOptions=g;if(!D&&A){D=!0;var H=G}f.draw({animatableAttribs:F,attribs:n(p,!u.styledMode&&b.pointAttribs(f,f.selected&&"select")),onComplete:H,group:a,renderer:E,shapeType:"arc",shapeArgs:B})});p&&D?(b.hasRendered=!1,b.options.dataLabels.defer=!0,F.prototype.drawDataLabels.call(b),
b.hasRendered=!0,A&&G()):F.prototype.drawDataLabels.call(b)},pointAttribs:u.column.prototype.pointAttribs,layoutAlgorithm:function(b,d,g){var a=b.start,c=b.end-a,e=b.val,f=b.x,k=b.y,l=g&&z(g.levelSize)&&q(g.levelSize.value)?g.levelSize.value:0,m=b.r,x=m+l,n=g&&q(g.slicedOffset)?g.slicedOffset:0;return(d||[]).reduce(function(b,d){var g=1/e*d.val*c,h=a+g/2,t=f+Math.cos(h)*n;h=k+Math.sin(h)*n;d={x:d.sliced?t:f,y:d.sliced?h:k,innerR:m,r:x,radius:l,start:a,end:a+g};b.push(d);a=d.end;return b},[])},setShapeArgs:function(b,
d,g){var a=[],c=g[b.level+1];b=b.children.filter(function(a){return a.visible});a=this.layoutAlgorithm(d,b,c);b.forEach(function(b,c){c=a[c];var d=c.start+(c.end-c.start)/2,e=c.innerR+(c.r-c.innerR)/2,f=c.end-c.start;e=0===c.innerR&&6.28<f?{x:c.x,y:c.y}:{x:c.x+Math.cos(d)*e,y:c.y+Math.sin(d)*e};var k=b.val?b.childrenTotal>b.val?b.childrenTotal:b.val:b.childrenTotal;this.points[b.i]&&(this.points[b.i].innerArcLength=f*c.innerR,this.points[b.i].outerArcLength=f*c.r);b.shapeArgs=v(c,{plotX:e.x,plotY:e.y+
4*Math.abs(Math.cos(d))});b.values=v(c,{val:k});b.children.length&&this.setShapeArgs(b,b.values,g)},this)},translate:function(){var b=this,g=b.options,l=b.center=L.call(b),a=b.startAndEndRadians=M(g.startAngle,g.endAngle),c=l[3]/2,e=l[2]/2-c,m=A(b),h=b.nodeMap,n=h&&h[m],q={};b.shapeRoot=n&&n.shapeArgs;F.prototype.translate.call(b);var r=b.tree=b.getTree();b.renderTraverseUpButton(m);h=b.nodeMap;n=h[m];var u=G(n.parent)?n.parent:"";u=h[u];var p=N(n);var v=p.from,w=p.to;p=H({from:v,levels:b.options.levels,
to:w,defaults:{colorByPoint:g.colorByPoint,dataLabels:g.dataLabels,levelIsConstant:g.levelIsConstant,levelSize:g.levelSize,slicedOffset:g.slicedOffset}});p=D(p,{diffRadius:e,from:v,to:w});Q(r,{before:O,idRoot:m,levelIsConstant:g.levelIsConstant,mapOptionsToLevel:p,mapIdToNode:h,points:b.points,series:b});g=h[""].shapeArgs={end:a.end,r:c,start:a.start,val:n.val,x:l[0],y:l[1]};this.setShapeArgs(u,g,p);b.mapOptionsToLevel=p;b.data.forEach(function(a){q[a.id]&&d.error(31,!1,b.chart);q[a.id]=!0});q={}},
alignDataLabel:function(b,d,g){if(!g.textPath||!g.textPath.enabled)return u.treemap.prototype.alignDataLabel.apply(this,arguments)},animate:function(b){var d=this.chart,f=[d.plotWidth/2,d.plotHeight/2],a=d.plotLeft,c=d.plotTop;d=this.group;b?(b={translateX:f[0]+a,translateY:f[1]+c,scaleX:.001,scaleY:.001,rotation:10,opacity:.01},d.attr(b)):(b={translateX:a,translateY:c,scaleX:1,scaleY:1,rotation:0,opacity:1},d.animate(b,this.options.animation),this.animate=null)},utils:{calculateLevelSizes:D,getLevelFromAndTo:N,
range:J}},{draw:w,shouldDraw:function(){return!this.isNull},isValid:function(){return!0},getDataLabelPath:function(b){var d=this.series.chart.renderer,f=this.shapeExisting,a=f.start,c=f.end,e=a+(c-a)/2;e=0>e&&e>-Math.PI||e>Math.PI;var g=f.r+(b.options.distance||0);a===-Math.PI/2&&m(c)===m(1.5*Math.PI)&&(a=-Math.PI+Math.PI/360,c=-Math.PI/360,e=!0);if(c-a>Math.PI){e=!1;var h=!0}this.dataLabelPath&&(this.dataLabelPath=this.dataLabelPath.destroy());this.dataLabelPath=d.arc({open:!0,longArc:h?1:0}).add(b);
this.dataLabelPath.attr({start:e?a:c,end:e?c:a,clockwise:+e,x:f.x,y:f.y,r:(g+f.innerR)/2});return this.dataLabelPath}})});w(d,"masters/modules/sunburst.src.js",[],function(){})});
//# sourceMappingURL=sunburst.js.map