/* Highcharts JS v8.1.0 (2020-05-05) (c) 2014-2019 Highsoft AS Authors: Jon Arild Nygard / Oystein Moseng License: www.highcharts.com/license */ (function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/treemap",["highcharts"],function(w){c(w);c.Highcharts=w;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function w(c,d,x,l){c.hasOwnProperty(d)||(c[d]=l.apply(null,x))}c=c?c._modules:{};w(c,"mixins/tree-series.js",[c["parts/Color.js"],c["parts/Utilities.js"]],function(c,d){var x=d.extend,l=d.isArray,n=d.isNumber,q=d.isObject, h=d.merge,v=d.pick;return{getColor:function(f,k){var r=k.index,d=k.mapOptionsToLevel,h=k.parentColor,q=k.parentColorIndex,C=k.series,A=k.colors,x=k.siblings,p=C.points,l=C.chart.options.chart,y;if(f){p=p[f.i];f=d[f.level]||{};if(d=p&&f.colorByPoint){var t=p.index%(A?A.length:l.colorCount);var n=A&&A[t]}if(!C.chart.styledMode){A=p&&p.options.color;l=f&&f.color;if(y=h)y=(y=f&&f.colorVariation)&&"brightness"===y.key?c.parse(h).brighten(r/x*y.to).get():h;y=v(A,l,n,y,C.color)}var w=v(p&&p.options.colorIndex, f&&f.colorIndex,t,q,k.colorIndex)}return{color:y,colorIndex:w}},getLevelOptions:function(f){var k=null;if(q(f)){k={};var d=n(f.from)?f.from:1;var c=f.levels;var z={};var v=q(f.defaults)?f.defaults:{};l(c)&&(z=c.reduce(function(k,c){if(q(c)&&n(c.level)){var f=h({},c);var r="boolean"===typeof f.levelIsConstant?f.levelIsConstant:v.levelIsConstant;delete f.levelIsConstant;delete f.level;c=c.level+(r?0:d-1);q(k[c])?x(k[c],f):k[c]=f}return k},{}));c=n(f.to)?f.to:1;for(f=0;f<=c;f++)k[f]=h({},v,q(z[f])?z[f]: {})}return k},setTreeValues:function J(k,c){var d=c.before,h=c.idRoot,r=c.mapIdToNode[h],l=c.points[k.i],q=l&&l.options||{},p=0,n=[];x(k,{levelDynamic:k.level-(("boolean"===typeof c.levelIsConstant?c.levelIsConstant:1)?0:r.level),name:v(l&&l.name,""),visible:h===k.id||("boolean"===typeof c.visible?c.visible:!1)});"function"===typeof d&&(k=d(k,c));k.children.forEach(function(d,h){var l=x({},c);x(l,{index:h,siblings:k.children.length,visible:k.visible});d=J(d,l);n.push(d);d.visible&&(p+=d.val)});k.visible= 0{point.name}: {point.value}
"},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:h,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,b){a=C(a)?a:[];var e=C(b)?b:[];b=a.reduce(function(a,b,e){b=t(b.parent, "");"undefined"===typeof a[b]&&(a[b]=[]);a[b].push(e);return a},{"":[]});P(b,function(a,b,c){""!==b&&-1===e.indexOf(b)&&(a.forEach(function(a){c[""].push(a)}),delete c[b])});return b},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,b){var e=c.colorMapSeriesMixin;e&&(this.colorAttribs=e.colorAttribs);this.eventsToUnbind.push(f(this, "setOptions",function(a){a=a.userOptions;r(a.allowDrillToNode)&&!r(a.allowTraversingTree)&&(a.allowTraversingTree=a.allowDrillToNode,delete a.allowDrillToNode);r(a.drillUpButton)&&!r(a.traverseUpButton)&&(a.traverseUpButton=a.drillUpButton,delete a.drillUpButton)}));F.prototype.init.call(this,a,b);this.options.allowTraversingTree&&this.eventsToUnbind.push(f(this,"click",this.onClickDrillToNode))},buildNode:function(a,b,e,c,g){var B=this,m=[],u=B.points[b],d=0,D;(c[a]||[]).forEach(function(b){D=B.buildNode(B.points[b].id, b,e+1,c,a);d=Math.max(D.height+1,d);m.push(D)});b={id:a,i:b,children:m,height:d,level:e,parent:g,visible:!1};B.nodeMap[b.id]=b;u&&(u.node=b);return b},setTreeValues:function(a){var b=this,e=b.options,c=b.nodeMap[b.rootNode];e="boolean"===typeof e.levelIsConstant?e.levelIsConstant:!0;var g=0,B=[],m=b.points[a.i];a.children.forEach(function(a){a=b.setTreeValues(a);B.push(a);a.ignore||(g+=a.val)});M(B,function(a,b){return a.sortIndex-b.sortIndex});var d=t(m&&m.options.value,g);m&&(m.value=d);z(a,{children:B, childrenTotal:g,ignore:!(t(m&&m.visible,!0)&&0k.lP.lR&&g.algorithmCalcPoints(a,!1,k,c,f);h===l&&g.algorithmCalcPoints(a,!0,k,c,f);h+=1});return c},algorithmFill:function(a,b,e){var c=[],g,d=b.direction,f=b.x,h=b.y, k=b.width,l=b.height,q,n,p,r;e.forEach(function(e){g=e.val/b.val*b.height*b.width;q=f;n=h;0===d?(r=l,p=g/r,k-=p,f+=p):(p=k,r=g/p,l-=r,h+=r);c.push({x:q,y:n,width:p,height:r});a&&(d=1-d)});return c},strip:function(a,b){return this.algorithmLowAspectRatio(!1,a,b)},squarified:function(a,b){return this.algorithmLowAspectRatio(!0,a,b)},sliceAndDice:function(a,b){return this.algorithmFill(!0,a,b)},stripes:function(a,b){return this.algorithmFill(!1,a,b)},translate:function(){var a=this,b=a.options,c=Q(a); F.prototype.translate.call(a);var d=a.tree=a.getTree();var g=a.nodeMap[c];a.renderTraverseUpButton(c);a.mapOptionsToLevel=O({from:g.level+1,levels:b.levels,to:d.height,defaults:{levelIsConstant:a.options.levelIsConstant,colorByPoint:b.colorByPoint}});""===c||g&&g.children.length||(a.setRootNode("",!1),c=a.rootNode,g=a.nodeMap[c]);G(a.nodeMap[a.rootNode],function(b){var c=!1,e=b.parent;b.visible=!0;if(e||""===e)c=a.nodeMap[e];return c});G(a.nodeMap[a.rootNode].children,function(a){var b=!1;a.forEach(function(a){a.visible= !0;a.children.length&&(b=(b||[]).concat(a.children))});return b});a.setTreeValues(d);a.axisRatio=a.xAxis.len/a.yAxis.len;a.nodeMap[""].pointValues=c={x:0,y:0,width:100,height:100};a.nodeMap[""].values=c=E(c,{width:c.width*a.axisRatio,direction:"vertical"===b.layoutStartingDirection?0:1,val:d.val});a.calculateChildrenAreas(d,c);a.colorAxis||b.colorByPoint||a.setColorRecursive(a.tree);b.allowTraversingTree&&(b=g.pointValues,a.xAxis.setExtremes(b.x,b.x+b.width,!1),a.yAxis.setExtremes(b.y,b.y+b.height, !1),a.xAxis.setScale(),a.yAxis.setScale());a.setPointValues()},drawDataLabels:function(){var a=this,b=a.mapOptionsToLevel,c,d;a.points.filter(function(a){return a.node.visible}).forEach(function(e){d=b[e.node.level];c={style:{}};e.node.isLeaf||(c.enabled=!1);d&&d.dataLabels&&(c=E(c,d.dataLabels),a._hasPointLabels=!0);e.shapeArgs&&(c.style.width=e.shapeArgs.width,e.dataLabel&&e.dataLabel.css({width:e.shapeArgs.width+"px"}));e.dlOptions=E(c,e.options.dataLabels)});F.prototype.drawDataLabels.call(this)}, alignDataLabel:function(a,b,c){var e=c.style;!r(e.textOverflow)&&b.text&&b.getBBox().width>b.text.textWidth&&b.css({textOverflow:"ellipsis",width:e.width+="px"});H.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},pointAttribs:function(a,b){var c=L(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},d=a&&c[a.node.level]||{};c=this.options;var g=b&&c.states[b]||{},f=a&&a.getClassName()||"";a={stroke:a&&a.borderColor||d.borderColor||g.borderColor|| c.borderColor,"stroke-width":t(a&&a.borderWidth,d.borderWidth,g.borderWidth,c.borderWidth),dashstyle:a&&a.borderDashStyle||d.borderDashStyle||g.borderDashStyle||c.borderDashStyle,fill:a&&a.color||this.color};-1!==f.indexOf("highcharts-above-level")?(a.fill="none",a["stroke-width"]=0):-1!==f.indexOf("highcharts-internal-node-interactive")?(b=t(g.opacity,c.opacity),a.fill=v(a.fill).setOpacity(b).get(),a.cursor="pointer"):-1!==f.indexOf("highcharts-internal-node")?a.fill="none":b&&(a.fill=v(a.fill).brighten(g.brightness).get()); return a},drawPoints:function(){var a=this,b=a.chart,c=b.renderer,d=b.styledMode,f=a.options,h=d?{}:f.shadow,k=f.borderRadius,l=b.pointCount