/*
 Highcharts JS v6.1.1 (2018-06-27)

 (c) 2014 Highsoft AS
 Authors: Jon Arild Nygard / Oystein Moseng

 License: www.highcharts.com/license
*/
(function(x){"object"===typeof module&&module.exports?module.exports=x:x(Highcharts)})(function(x){var F=function(b){var x=b.each,C=b.extend,q=b.isArray,k=b.isObject,r=b.isNumber,E=b.merge,A=b.pick,n=b.reduce;return{getColor:function(t,u){var y=u.index,g=u.mapOptionsToLevel,n=u.parentColor,z=u.parentColorIndex,v=u.series,e=u.colors,q=u.siblings,l=v.points,k,D,B,r;if(t){l=l[t.i];t=g[t.level]||{};if(k=l&&t.colorByPoint)B=l.index%(e?e.length:v.chart.options.chart.colorCount),D=e&&e[B];e=l&&l.options.color;
k=t&&t.color;if(g=n)g=(g=t&&t.colorVariation)&&"brightness"===g.key?b.color(n).brighten(y/q*g.to).get():n;k=A(e,k,D,g,v.color);r=A(l&&l.options.colorIndex,t&&t.colorIndex,B,z,u.colorIndex)}return{color:k,colorIndex:r}},getLevelOptions:function(b){var u=null,y,g,t,z;if(k(b))for(u={},t=r(b.from)?b.from:1,z=b.levels,g={},y=k(b.defaults)?b.defaults:{},q(z)&&(g=n(z,function(b,e){var g,l;k(e)&&r(e.level)&&(l=E({},e),g="boolean"===typeof l.levelIsConstant?l.levelIsConstant:y.levelIsConstant,delete l.levelIsConstant,
delete l.level,e=e.level+(g?0:t-1),k(b[e])?C(b[e],l):b[e]=l);return b},{})),z=r(b.to)?b.to:1,b=0;b<=z;b++)u[b]=E({},y,k(g[b])?g[b]:{});return u},setTreeValues:function u(b,g){var n=g.before,k=g.idRoot,y=g.mapIdToNode[k],e=g.points[b.i],q=e&&e.options||{},l=0,r=[];C(b,{levelDynamic:b.level-(("boolean"===typeof g.levelIsConstant?g.levelIsConstant:1)?0:y.level),name:A(e&&e.name,""),visible:k===b.id||("boolean"===typeof g.visible?g.visible:!1)});"function"===typeof n&&(b=n(b,g));x(b.children,function(e,
n){var k=C({},g);C(k,{index:n,siblings:b.children.length,visible:b.visible});e=u(e,k);r.push(e);e.visible&&(l+=e.val)});b.visible=0<l||b.visible;n=A(q.value,l);C(b,{children:r,childrenTotal:l,isLeaf:b.visible&&!l,val:n});return b},updateRootId:function(b){var n;k(b)&&(n=k(b.options)?b.options:{},n=A(b.rootNode,n.rootId,""),k(b.userOptions)&&(b.userOptions.rootId=n),b.rootNode=n);return n}}}(x);(function(b,x){var C=b.seriesType,q=b.seriesTypes,k=b.map,r=b.merge,E=b.extend,A=b.noop,n=b.each,t=x.getColor,
u=x.getLevelOptions,y=b.grep,g=b.isNumber,F=b.isObject,z=b.isString,v=b.pick,e=b.Series,H=b.stableSort,l=b.Color,I=function(a,c,d){d=d||this;b.objectEach(a,function(b,f){c.call(d,b,f,a)})},D=b.reduce,B=function(a,c,d){d=d||this;a=c.call(d,a);!1!==a&&B(a,c,d)},J=x.updateRootId;C("treemap","scatter",{showInLegend:!1,marker:!1,colorByPoint:!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}},borderColor:"#e6e6e6",borderWidth:1,opacity:.15,states:{hover:{borderColor:"#999999",brightness:q.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}}},{pointArrayMap:["value"],axisTypes:q.heatmap?["xAxis","yAxis","colorAxis"]:["xAxis","yAxis"],directTouch:!0,optionalAxis:"colorAxis",getSymbol:A,parallelArrays:["x","y",
"value","colorValue"],colorKey:"colorValue",translateColors:q.heatmap&&q.heatmap.prototype.translateColors,colorAttribs:q.heatmap&&q.heatmap.prototype.colorAttribs,trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,c){a=D(a||[],function(a,c,b){c=v(c.parent,"");void 0===a[c]&&(a[c]=[]);a[c].push(b);return a},{});I(a,function(a,m,f){""!==m&&-1===b.inArray(m,c)&&(n(a,function(a){f[""].push(a)}),delete f[m])});return a},getTree:function(){var a=k(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){e.prototype.init.call(this,a,c);this.options.allowDrillToNode&&b.addEvent(this,"click",this.onClickDrillToNode)},buildNode:function(a,c,d,b,f){var p=this,m=[],h=p.points[c],G=0,e;n(b[a]||[],function(c){e=p.buildNode(p.points[c].id,c,d+1,b,a);G=Math.max(e.height+1,G);m.push(e)});c={id:a,i:c,children:m,height:G,level:d,parent:f,visible:!1};p.nodeMap[c.id]=c;h&&(h.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,f=0,p=[],e,h=c.points[a.i];n(a.children,function(a){a=c.setTreeValues(a);p.push(a);a.ignore||(f+=a.val)});H(p,function(a,c){return a.sortIndex-c.sortIndex});e=v(h&&h.options.value,f);h&&(h.value=e);E(a,{children:p,childrenTotal:f,ignore:!(v(h&&h.visible,!0)&&0<e),isLeaf:a.visible&&!f,levelDynamic:a.level-(d?0:b.level),name:v(h&&h.name,""),sortIndex:v(h&&h.sortIndex,-e),val:e});return a},calculateChildrenAreas:function(a,
c){var d=this,b=d.options,f=d.mapOptionsToLevel[a.level+1],p=v(d[f&&f.layoutAlgorithm]&&f.layoutAlgorithm,b.layoutAlgorithm),e=b.alternateStartingDirection,h=[];a=y(a.children,function(a){return!a.ignore});f&&f.layoutStartingDirection&&(c.direction="vertical"===f.layoutStartingDirection?0:1);h=d[p](c,a);n(a,function(a,b){b=h[b];a.values=r(b,{val:a.childrenTotal,direction:e?1-c.direction:c.direction});a.pointValues=r(b,{x:b.x/d.axisRatio,width:b.width/d.axisRatio});a.children.length&&d.calculateChildrenAreas(a,
a.values)})},setPointValues:function(){var a=this,c=a.xAxis,d=a.yAxis;n(a.points,function(b){var f=b.node,p=f.pointValues,m,h,e;e=(a.pointAttribs(b)["stroke-width"]||0)%2/2;p&&f.visible?(f=Math.round(c.translate(p.x,0,0,0,1))-e,m=Math.round(c.translate(p.x+p.width,0,0,0,1))-e,h=Math.round(d.translate(p.y,0,0,0,1))-e,p=Math.round(d.translate(p.y+p.height,0,0,0,1))-e,b.shapeType="rect",b.shapeArgs={x:Math.min(f,m),y:Math.min(h,p),width:Math.abs(m-f),height:Math.abs(p-h)},b.plotX=b.shapeArgs.x+b.shapeArgs.width/
2,b.plotY=b.shapeArgs.y+b.shapeArgs.height/2):(delete b.plotX,delete b.plotY)})},setColorRecursive:function(a,c,b,e,f){var d=this,m=d&&d.chart,m=m&&m.options&&m.options.colors,h;if(a){h=t(a,{colors:m,index:e,mapOptionsToLevel:d.mapOptionsToLevel,parentColor:c,parentColorIndex:b,series:d,siblings:f});if(c=d.points[a.i])c.color=h.color,c.colorIndex=h.colorIndex;n(a.children||[],function(c,b){d.setColorRecursive(c,h.color,h.colorIndex,b,a.children.length)})}},algorithmGroup:function(a,c,b,m){this.height=
a;this.width=c;this.plot=m;this.startDirection=this.direction=b;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,b,m){var d,e,g,h,l=b.lW,k=b.lH,w=b.plot,t,u=0,q=b.elArr.length-1;c?(l=b.nW,k=b.nH):t=b.elArr[b.elArr.length-1];n(b.elArr,function(a){if(c||
u<q)0===b.direction?(d=w.x,e=w.y,g=l,h=a/g):(d=w.x,e=w.y,h=k,g=a/h),m.push({x:d,y:e,width:g,height:h}),0===b.direction?w.y+=h:w.x+=g;u+=1});b.reset();0===b.direction?b.width-=l:b.height-=k;w.y=w.parent.y+(w.parent.height-b.height);w.x=w.parent.x+(w.parent.width-b.width);a&&(b.direction=1-b.direction);c||b.addElement(t)},algorithmLowAspectRatio:function(a,b,d){var c=[],e=this,p,g={x:b.x,y:b.y,parent:b},h=0,l=d.length-1,k=new this.algorithmGroup(b.height,b.width,b.direction,g);n(d,function(d){p=d.val/
b.val*b.height*b.width;k.addElement(p);k.lP.nR>k.lP.lR&&e.algorithmCalcPoints(a,!1,k,c,g);h===l&&e.algorithmCalcPoints(a,!0,k,c,g);h+=1});return c},algorithmFill:function(a,b,d){var c=[],e,p=b.direction,g=b.x,h=b.y,k=b.width,l=b.height,t,u,q,r;n(d,function(d){e=d.val/b.val*b.height*b.width;t=g;u=h;0===p?(r=l,q=e/r,k-=q,g+=q):(q=k,r=e/q,l-=r,h+=r);c.push({x:t,y:u,width:q,height:r});a&&(p=1-p)});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,d=J(a),m,f;e.prototype.translate.call(a);f=a.tree=a.getTree();m=a.nodeMap[d];a.mapOptionsToLevel=u({from:m.level+1,levels:b.levels,to:f.height,defaults:{levelIsConstant:a.options.levelIsConstant,colorByPoint:b.colorByPoint}});""===d||m&&m.children.length||(a.drillToNode("",!1),d=a.rootNode,m=a.nodeMap[d]);B(a.nodeMap[a.rootNode],function(b){var c=
!1,d=b.parent;b.visible=!0;if(d||""===d)c=a.nodeMap[d];return c});B(a.nodeMap[a.rootNode].children,function(a){var b=!1;n(a,function(a){a.visible=!0;a.children.length&&(b=(b||[]).concat(a.children))});return b});a.setTreeValues(f);a.axisRatio=a.xAxis.len/a.yAxis.len;a.nodeMap[""].pointValues=d={x:0,y:0,width:100,height:100};a.nodeMap[""].values=d=r(d,{width:d.width*a.axisRatio,direction:"vertical"===b.layoutStartingDirection?0:1,val:f.val});a.calculateChildrenAreas(f,d);a.colorAxis?a.translateColors():
b.colorByPoint||a.setColorRecursive(a.tree);b.allowDrillToNode&&(b=m.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,d=y(a.points,function(a){return a.node.visible}),m,f;n(d,function(c){f=b[c.node.level];m={style:{}};c.node.isLeaf||(m.enabled=!1);f&&f.dataLabels&&(m=r(m,f.dataLabels),a._hasPointLabels=!0);c.shapeArgs&&(m.style.width=c.shapeArgs.width,
c.dataLabel&&c.dataLabel.css({width:c.shapeArgs.width+"px"}));c.dlOptions=r(m,c.options.dataLabels)});e.prototype.drawDataLabels.call(this)},alignDataLabel:function(a){q.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},pointAttribs:function(a,b){var c=F(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},e=a&&c[a.node.level]||{},c=this.options,f=b&&c.states[b]||{},g=a&&a.getClassName()||"";a={stroke:a&&a.borderColor||e.borderColor||
f.borderColor||c.borderColor,"stroke-width":v(a&&a.borderWidth,e.borderWidth,f.borderWidth,c.borderWidth),dashstyle:a&&a.borderDashStyle||e.borderDashStyle||f.borderDashStyle||c.borderDashStyle,fill:a&&a.color||this.color};-1!==g.indexOf("highcharts-above-level")?(a.fill="none",a["stroke-width"]=0):-1!==g.indexOf("highcharts-internal-node-interactive")?(b=v(f.opacity,c.opacity),a.fill=l(a.fill).setOpacity(b).get(),a.cursor="pointer"):-1!==g.indexOf("highcharts-internal-node")?a.fill="none":b&&(a.fill=
l(a.fill).brighten(f.brightness).get());return a},drawPoints:function(){var a=this,b=y(a.points,function(a){return a.node.visible});n(b,function(b){var c="level-group-"+b.node.levelDynamic;a[c]||(a[c]=a.chart.renderer.g(c).attr({zIndex:1E3-b.node.levelDynamic}).add(a.group));b.group=a[c]});q.column.prototype.drawPoints.call(this);a.options.allowDrillToNode&&n(b,function(b){b.graphic&&(b.drillId=a.options.interactByLeaf?a.drillToByLeaf(b):a.drillToByGroup(b))})},onClickDrillToNode:function(a){var b=
(a=a.point)&&a.drillId;z(b)&&(a.setState(""),this.drillToNode(b))},drillToByGroup:function(a){var b=!1;1!==a.node.level-this.nodeMap[this.rootNode].level||a.node.isLeaf||(b=a.id);return b},drillToByLeaf:function(a){var b=!1;if(a.node.parent!==this.rootNode&&a.node.isLeaf)for(a=a.node;!b;)a=this.nodeMap[a.parent],a.parent===this.rootNode&&(b=a.id);return b},drillUp:function(){var a=this.nodeMap[this.rootNode];a&&z(a.parent)&&this.drillToNode(a.parent)},drillToNode:function(a,b){var c=this.nodeMap[a];
this.idPreviousRoot=this.rootNode;this.rootNode=a;""===a?this.drillUpButton=this.drillUpButton.destroy():this.showDrillUpButton(c&&c.name||a);this.isDirty=!0;v(b,!0)&&this.chart.redraw()},showDrillUpButton:function(a){var b=this;a=a||"\x3c Back";var d=b.options.drillUpButton,e,f;d.text&&(a=d.text);this.drillUpButton?(this.drillUpButton.placed=!1,this.drillUpButton.attr({text:a}).align()):(f=(e=d.theme)&&e.states,this.drillUpButton=this.chart.renderer.button(a,null,null,function(){b.drillUp()},e,f&&
f.hover,f&&f.select).addClass("highcharts-drillup-button").attr({align:d.position.align,zIndex:7}).add().align(d.position,!1,d.relativeTo||"plotBox"))},buildKDTree:A,drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,getExtremes:function(){e.prototype.getExtremes.call(this,this.colorValueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;e.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:[]};e.prototype.bindAxes.call(this);b.extend(this.yAxis.options,a);b.extend(this.xAxis.options,a)},utils:{recursive:B,reduce:D}},{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||v(d.interactByLeaf,!d.allowDrillToNode)?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){b.Point.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})},setVisible:q.pie.prototype.pointClass.prototype.setVisible})})(x,F)});
