/* Highcharts JS v7.0.0 (2018-12-11) 3D features for Highcharts JS @license: www.highcharts.com/license */ (function(A){"object"===typeof module&&module.exports?module.exports=A:"function"===typeof define&&define.amd?define(function(){return A}):A("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(A){(function(b){var y=b.deg2rad,z=b.pick;b.perspective3D=function(b,q,v){q=0g&&C-g>Math.PI/2+.0001?(m=m.concat(y(a,d,h,b,g,g+Math.PI/2,e,p)),m=m.concat(y(a,d,h,b,g+Math.PI/2,C,e,p))):CMath.PI/2+.0001?(m=m.concat(y(a,d,h,b,g,g-Math.PI/2,e,p)),m=m.concat(y(a,d,h,b,g-Math.PI/2,C,e,p))):["C",a+h*Math.cos(g)-h*c*F*Math.sin(g)+e,d+b*Math.sin(g)+b*c*F*Math.cos(g)+p,a+h*Math.cos(C)+h*c*F*Math.sin(C)+e,d+b*Math.sin(C)-b*c*F*Math.cos(C)+p,a+h*Math.cos(C)+e,d+b*Math.sin(C)+p]}var z=Math.cos,u=Math.PI,q=Math.sin,v=b.animObject,x=b.charts,f=b.color,w=b.defined,p=b.deg2rad,e=b.extend,a=b.merge,l=b.perspective,r=b.pick,k=b.SVGElement,t=b.SVGRenderer,d=b.wrap,c,n,g;c=4*(Math.sqrt(2)-1)/3/ (u/2);t.prototype.toLinePath=function(a,d){var h=[];a.forEach(function(a){h.push("L",a.x,a.y)});a.length&&(h[0]="M",d&&h.push("Z"));return h};t.prototype.toLineSegments=function(a){var d=[],h=!0;a.forEach(function(a){d.push(h?"M":"L",a.x,a.y);h=!h});return d};t.prototype.face3d=function(a){var c=this,h=this.createElement("path");h.vertexes=[];h.insidePlotArea=!1;h.enabled=!0;d(h,"attr",function(a,d){if("object"===typeof d&&(w(d.enabled)||w(d.vertexes)||w(d.insidePlotArea))){this.enabled=r(d.enabled, this.enabled);this.vertexes=r(d.vertexes,this.vertexes);this.insidePlotArea=r(d.insidePlotArea,this.insidePlotArea);delete d.enabled;delete d.vertexes;delete d.insidePlotArea;var h=l(this.vertexes,x[c.chartIndex],this.insidePlotArea),m=c.toLinePath(h,!0),h=b.shapeArea(h),h=this.enabled&&0d.faces.length;)h.faces.pop().destroy();for(;h.faces.lengthd.faces.length;)h.faces.pop().destroy();for(;h.faces.lengthb.shapeArea(a)?h=[a,0]:0>b.shapeArea(c)&&(h=[c, 1]);return h};n=t([3,2,1,0],[7,6,5,4]);a=n[0];m=n[1];n=t([1,6,7,0],[4,5,2,3]);p=n[0];k=n[1];n=t([1,2,5,6],[0,7,4,3]);t=n[0];n=n[1];1===n?q+=1E4*(1E3-c):n||(q+=1E4*c);q+=10*(!k||0<=v&&180>=v||360>v&&357.5Math.PI&&(a=2*Math.PI-a);return a}var c=a.x,g=a.y,b=a.start,e=a.end-.00001,p=a.r,k=a.innerR||0,l=a.depth|| 0,m=a.alpha,n=a.beta,r=Math.cos(b),t=Math.sin(b);a=Math.cos(e);var v=Math.sin(e),f=p*Math.cos(n),p=p*Math.cos(m),x=k*Math.cos(n),w=k*Math.cos(m),k=l*Math.sin(n),B=l*Math.sin(m),l=["M",c+f*r,g+p*t],l=l.concat(y(c,g,f,p,b,e,0,0)),l=l.concat(["L",c+x*a,g+w*v]),l=l.concat(y(c,g,x,w,e,b,0,0)),l=l.concat(["Z"]),A=0-A?b:e>-A?-A:b,D=eE&&bu-n&&bc&&(h=Math.min(h,1-Math.abs((a+t)/(c+t))%1));pg&&(h=0>g?Math.min(h,(r+d)/(-g+r+d)):Math.min(h,1-(r+d)/(g+d)%1));ka?-1:0},n=c([{x:l,y:t,z:d},{x:f,y:t,z:d},{x:f,y:t,z:0},{x:l,y:t,z:0}]),g=c([{x:l,y:k,z:0},{x:f,y:k,z:0},{x:f,y:k,z:d},{x:l,y:k,z:d}]),m=c([{x:l,y:k,z:0},{x:l,y:k,z:d},{x:l,y:t,z:d},{x:l,y:t,z:0}]),q=c([{x:f,y:k,z:d},{x:f,y:k,z:0},{x:f,y:t,z:0},{x:f,y:t,z:d}]),h=c([{x:l,y:t,z:0},{x:f,y:t,z:0},{x:f,y:k,z:0},{x:l,y:k,z:0}]),c=c([{x:l,y:k,z:d},{x:f,y:k,z:d},{x:f,y:t,z:d},{x:l,y:t,z:d}]),w=!1,u=!1,y=!1,z=!1;[].concat(p.xAxis, p.yAxis,p.zAxis).forEach(function(a){a&&(a.horiz?a.opposite?u=!0:w=!0:a.opposite?z=!0:y=!0)});var A=function(a,c,d){for(var b=["size","color","visible"],g={},e=0;ed*g[b][c]?b=e:d*g[e][c]===d*g[b][c]&&g[e].zthis.pos&&(b.isArray(this.start)||b.isArray(this.end))){var e=this.start||[1,0,0,1,0,0],a=this.end||[1,0,0,1,0,0];f=[];for(var l=0;6>l;l++)f.push(this.pos*a[l]+(1-this.pos)*e[l])}else f=this.end;this.elem.attr(this.prop,f,null,!0)}})(A);(function(b){function y(d,c,b){if(!d.chart.is3d()|| "colorAxis"===d.coll)return c;var g=d.chart,e=x*g.options.chart.options3d.alpha,f=x*g.options.chart.options3d.beta,h=a(b&&d.options.title.position3d,d.options.labels.position3d);b=a(b&&d.options.title.skew3d,d.options.labels.skew3d);var k=g.frame3d,n=g.plotLeft,t=g.plotWidth+n,r=g.plotTop,q=g.plotHeight+r,g=!1,v=0,w=0,u={x:0,y:1,z:0};c=d.swapZ({x:c.x,y:c.y,z:0});if(d.isZAxis)if(d.opposite){if(null===k.axes.z.top)return{};w=c.y-r;c.x=k.axes.z.top.x;c.y=k.axes.z.top.y;n=k.axes.z.top.xDir;g=!k.top.frontFacing}else{if(null=== k.axes.z.bottom)return{};w=c.y-q;c.x=k.axes.z.bottom.x;c.y=k.axes.z.bottom.y;n=k.axes.z.bottom.xDir;g=!k.bottom.frontFacing}else if(d.horiz)if(d.opposite){if(null===k.axes.x.top)return{};w=c.y-r;c.y=k.axes.x.top.y;c.z=k.axes.x.top.z;n=k.axes.x.top.xDir;g=!k.top.frontFacing}else{if(null===k.axes.x.bottom)return{};w=c.y-q;c.y=k.axes.x.bottom.y;c.z=k.axes.x.bottom.z;n=k.axes.x.bottom.xDir;g=!k.bottom.frontFacing}else if(d.opposite){if(null===k.axes.y.right)return{};v=c.x-t;c.x=k.axes.y.right.x;c.z=k.axes.y.right.z; n=k.axes.y.right.xDir;n={x:n.z,y:n.y,z:-n.x}}else{if(null===k.axes.y.left)return{};v=c.x-n;c.x=k.axes.y.left.x;c.z=k.axes.y.left.z;n=k.axes.y.left.xDir}"chart"!==h&&("flap"===h?d.horiz?(f=Math.sin(e),e=Math.cos(e),d.opposite&&(f=-f),g&&(f=-f),u={x:n.z*f,y:e,z:-n.x*f}):n={x:Math.cos(f),y:0,z:Math.sin(f)}:"ortho"===h?d.horiz?(u=Math.cos(e),h=Math.sin(f)*u,e=-Math.sin(e),f=-u*Math.cos(f),u={x:n.y*f-n.z*e,y:n.z*h-n.x*f,z:n.x*e-n.y*h},e=1/Math.sqrt(u.x*u.x+u.y*u.y+u.z*u.z),g&&(e=-e),u={x:e*u.x,y:e*u.y, z:e*u.z}):n={x:Math.cos(f),y:0,z:Math.sin(f)}:d.horiz?u={x:Math.sin(f)*Math.sin(e),y:Math.cos(e),z:-Math.cos(f)*Math.sin(e)}:n={x:Math.cos(f),y:0,z:Math.sin(f)});c.x+=v*n.x+w*u.x;c.y+=v*n.y+w*u.y;c.z+=v*n.z+w*u.z;g=p([c],d.chart)[0];b&&(0>l(p([c,{x:c.x+n.x,y:c.y+n.y,z:c.z+n.z},{x:c.x+u.x,y:c.y+u.y,z:c.z+u.z}],d.chart))&&(n={x:-n.x,y:-n.y,z:-n.z}),d=p([{x:c.x,y:c.y,z:c.z},{x:c.x+n.x,y:c.y+n.y,z:c.z+n.z},{x:c.x+u.x,y:c.y+u.y,z:c.z+u.z}],d.chart),g.matrix=[d[1].x-d[0].x,d[1].y-d[0].y,d[2].x-d[0].x,d[2].y- d[0].y,g.x,g.y],g.matrix[4]-=g.x*g.matrix[0]+g.y*g.matrix[2],g.matrix[5]-=g.x*g.matrix[1]+g.y*g.matrix[3]);return g}var z,u=b.addEvent,q=b.Axis,v=b.Chart,x=b.deg2rad,f=b.extend,w=b.merge,p=b.perspective,e=b.perspective3D,a=b.pick,l=b.shapeArea,r=b.splat,k=b.Tick,t=b.wrap;w(!0,q.prototype.defaultOptions,{labels:{position3d:"offset",skew3d:!1},title:{position3d:null,skew3d:null}});u(q,"afterSetOptions",function(){var d;this.chart.is3d&&this.chart.is3d()&&"colorAxis"!==this.coll&&(d=this.options,d.tickWidth= a(d.tickWidth,0),d.gridLineWidth=a(d.gridLineWidth,1))});t(q.prototype,"getPlotLinePath",function(a){var c=a.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d()||"colorAxis"===this.coll||null===c)return c;var d=this.chart,b=d.options.chart.options3d,b=this.isZAxis?d.plotWidth:b.depth,d=d.frame3d,c=[this.swapZ({x:c[1],y:c[2],z:0}),this.swapZ({x:c[1],y:c[2],z:b}),this.swapZ({x:c[4],y:c[5],z:0}),this.swapZ({x:c[4],y:c[5],z:b})],b=[];this.horiz?(this.isZAxis?(d.left.visible&&b.push(c[0],c[2]), d.right.visible&&b.push(c[1],c[3])):(d.front.visible&&b.push(c[0],c[2]),d.back.visible&&b.push(c[1],c[3])),d.top.visible&&b.push(c[0],c[1]),d.bottom.visible&&b.push(c[2],c[3])):(d.front.visible&&b.push(c[0],c[2]),d.back.visible&&b.push(c[1],c[3]),d.left.visible&&b.push(c[0],c[1]),d.right.visible&&b.push(c[2],c[3]));b=p(b,this.chart,!1);return this.chart.renderer.toLineSegments(b)});t(q.prototype,"getLinePath",function(a){return this.chart.is3d()&&"colorAxis"!==this.coll?[]:a.apply(this,[].slice.call(arguments, 1))});t(q.prototype,"getPlotBandPath",function(a){if(!this.chart.is3d()||"colorAxis"===this.coll)return a.apply(this,[].slice.call(arguments,1));var d=arguments,b=d[2],e=[],d=this.getPlotLinePath(d[1]),b=this.getPlotLinePath(b);if(d&&b)for(var f=0;f=v.min&&w<=v.max:!1):f.plotZ=0,f.axisXpos=f.plotX,f.axisYpos=f.plotY,f.axisZpos=f.plotZ,x.push({x:f.plotX,y:f.plotY,z:f.plotZ});b=z(x,b,!0);for(p=0;pl&&(d[c[1]]+=d[c[0]]+k,d[c[0]]=-k,l=0);l+d[c[1]]>b[c[0]+"Axis"].len&&0!==d[c[1]]&&(d[c[1]]=b[c[0]+"Axis"].len-d[c[0]]);if(0!==d[c[1]]&&(d[c[0]]>=b[c[0]+"Axis"].len||d[c[0]]+d[c[1]]<=k)){for(var e in d)d[e]=0;a.outside3dPlot=!0}});"rect"===a.shapeType&&(a.shapeType="cuboid");d.z=r;d.depth=f;d.insidePlotArea=!0;c=u([{x:c[0],y:c[1],z:r}],e,!0)[0];a.tooltipPos=[c.x,c.y]}});b.z=r};w(x.column.prototype,"animate",function(b){if(this.chart.is3d()){var e= arguments[1],a=this.yAxis,l=this,p=this.yAxis.reversed;f&&(e?l.data.forEach(function(b){null!==b.y&&(b.height=b.shapeArgs.height,b.shapey=b.shapeArgs.y,b.shapeArgs.height=1,p||(b.shapeArgs.y=b.stackY?b.plotY+a.translate(b.stackY):b.plotY+(b.negative?-b.height:b.height)))}):(l.data.forEach(function(a){null!==a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,l.options.animation))}),this.drawDataLabels(),l.animate=null))}else b.apply(this,[].slice.call(arguments, 1))});w(x.column.prototype,"plotGroup",function(b,e,a,f,r,k){this.chart.is3d()&&k&&!this[e]&&(this.chart.columnGroup||(this.chart.columnGroup=this.chart.renderer.g("columnGroup").add(k)),this[e]=this.chart.columnGroup,this.chart.columnGroup.attr(this.getPlotBox()),this[e].survive=!0);return b.apply(this,Array.prototype.slice.call(arguments,1))});w(x.column.prototype,"setVisible",function(b,e){var a=this,f;a.chart.is3d()&&a.data.forEach(function(b){f=(b.visible=b.options.visible=e=void 0===e?!b.visible: e)?"visible":"hidden";a.options.data[a.data.indexOf(b)]=b.options;b.graphic&&b.graphic.attr({visibility:f})});b.apply(this,Array.prototype.slice.call(arguments,1))});x.column.prototype.handle3dGrouping=!0;z(v,"afterInit",function(){if(this.chart.is3d()&&this.handle3dGrouping){var b=this.options,e=b.grouping,a=b.stacking,f=q(this.yAxis.options.reversedStacks,!0),r=0;if(void 0===e||e){e=this.chart.retrieveStacks(a);r=b.stack||0;for(a=0;a