/* Highcharts JS v9.1.0 (2021-05-03) Highcharts Drilldown module Author: Torstein Honsi 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/drilldown",["highcharts"],function(m){c(m);c.Highcharts=m;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function m(c,m,n,z){c.hasOwnProperty(m)||(c[m]=z.apply(null,n))}c=c?c._modules:{};m(c,"Extensions/Drilldown.js",[c["Core/Animation/AnimationUtilities.js"],c["Core/Axis/Axis.js"],c["Core/Chart/Chart.js"],c["Core/Color/Color.js"], c["Series/Column/ColumnSeries.js"],c["Core/FormatUtilities.js"],c["Core/Globals.js"],c["Core/Options.js"],c["Core/Color/Palette.js"],c["Core/Series/Point.js"],c["Core/Series/Series.js"],c["Core/Series/SeriesRegistry.js"],c["Core/Renderer/SVG/SVGRenderer.js"],c["Core/Axis/Tick.js"],c["Core/Utilities.js"]],function(c,m,n,z,r,I,A,J,C,v,D,w,K,E,p){var F=c.animObject,L=I.format,M=A.noop;c=J.defaultOptions;var k=p.addEvent,N=p.removeEvent,q=p.extend,x=p.fireEvent,t=p.merge,O=p.objectEach,u=p.pick,P=p.syncTimeout; w=w.seriesTypes.pie;var G=1;q(c.lang,{drillUpText:"\u25c1 Back to {series.name}"});c.drilldown={activeAxisLabelStyle:{cursor:"pointer",color:C.highlightColor100,fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",color:C.highlightColor100,fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}}};K.prototype.Element.prototype.fadeIn=function(a){this.attr({opacity:.1,visibility:"inherit"}).animate({opacity:u(this.newOpacity, 1)},a||{duration:250})};n.prototype.addSeriesAsDrilldown=function(a,b){this.addSingleSeriesAsDrilldown(a,b);this.applyDrilldown()};n.prototype.addSingleSeriesAsDrilldown=function(a,b){var d=a.series,g=d.xAxis,e=d.yAxis,f=[],c=[],h;var l=this.styledMode?{colorIndex:u(a.colorIndex,d.colorIndex)}:{color:a.color||d.color};this.drilldownLevels||(this.drilldownLevels=[]);var y=d.options._levelNumber||0;(h=this.drilldownLevels[this.drilldownLevels.length-1])&&h.levelNumber!==y&&(h=void 0);b=q(q({_ddSeriesId:G++}, l),b);var k=d.points.indexOf(a);d.chart.series.forEach(function(a){a.xAxis!==g||a.isDrilling||(a.options._ddSeriesId=a.options._ddSeriesId||G++,a.options._colorIndex=a.userOptions._colorIndex,a.options._levelNumber=a.options._levelNumber||y,h?(f=h.levelSeries,c=h.levelSeriesOptions):(f.push(a),a.purgedOptions=t({_ddSeriesId:a.options._ddSeriesId,_levelNumber:a.options._levelNumber,selected:a.options.selected},a.userOptions),c.push(a.purgedOptions)))});a=q({levelNumber:y,seriesOptions:d.options,seriesPurgedOptions:d.purgedOptions, levelSeriesOptions:c,levelSeries:f,shapeArgs:a.shapeArgs,bBox:a.graphic?a.graphic.getBBox():{},color:a.isNull?(new z(l.color)).setOpacity(0).get():l.color,lowerSeriesOptions:b,pointOptions:d.options.data[k],pointIndex:k,oldExtremes:{xMin:g&&g.userMin,xMax:g&&g.userMax,yMin:e&&e.userMin,yMax:e&&e.userMax},resetZoomButton:this.resetZoomButton},l);this.drilldownLevels.push(a);g&&g.names&&(g.names.length=0);b=a.lowerSeries=this.addSeries(b,!1);b.options._levelNumber=y+1;g&&(g.oldPos=g.pos,g.userMin=g.userMax= null,e.userMin=e.userMax=null);d.type===b.type&&(b.animate=b.animateDrilldown||M,b.options.animation=!0)};n.prototype.applyDrilldown=function(){var a=this.drilldownLevels;if(a&&0