/* Highcharts JS v5.0.14 (2017-07-28) 3D features for Highcharts JS @license: www.highcharts.com/license */ (function(y){"object"===typeof module&&module.exports?module.exports=y:y(Highcharts)})(function(y){(function(b){var v=b.deg2rad,t=b.pick;b.perspective=function(u,w,x){var k=w.options.chart.options3d,n=x?w.inverted:!1,f=w.plotWidth/2,p=w.plotHeight/2,l=k.depth/2,d=t(k.depth,1)*t(k.viewDistance,0),a=w.scale3d||1,c=v*k.beta*(n?-1:1),k=v*k.alpha*(n?-1:1),e=Math.cos(k),g=Math.cos(-c),h=Math.sin(k),A=Math.sin(-c);x||(f+=w.plotLeft,p+=w.plotTop);return b.map(u,function(c){var b,r;r=(n?c.y:c.x)-f;var m=(n? c.x:c.y)-p,G=(c.z||0)-l;b=g*r-A*G;c=-h*A*r+e*m-g*h*G;r=e*A*r+h*m+e*g*G;m=0d&&b-d>Math.PI/2+.0001?(B=B.concat(v(a,e,c,g,d,d+Math.PI/2,h,l)),B=B.concat(v(a,e,c,g,d+Math.PI/2,b,h,l))):bMath.PI/2+.0001?(B=B.concat(v(a,e,c,g,d,d-Math.PI/2,h,l)),B=B.concat(v(a,e,c,g,d-Math.PI/2,b,h,l))):["C",a+c*Math.cos(d)-c*r*m*Math.sin(d)+h,e+g*Math.sin(d)+g*r*m*Math.cos(d)+l,a+c*Math.cos(b)+c*r*m*Math.sin(b)+h,e+g*Math.sin(b)- g*r*m*Math.cos(b)+l,a+c*Math.cos(b)+h,e+g*Math.sin(b)+l]}var t=Math.cos,u=Math.PI,w=Math.sin,x=b.animObject,k=b.charts,n=b.color,f=b.defined,p=b.deg2rad,l=b.each,d=b.extend,a=b.inArray,c=b.map,e=b.merge,g=b.perspective,h=b.pick,A=b.SVGElement,q=b.SVGRenderer,z=b.wrap,r=4*(Math.sqrt(2)-1)/3/(u/2);q.prototype.toLinePath=function(a,e){var c=[];l(a,function(a){c.push("L",a.x,a.y)});a.length&&(c[0]="M",e&&c.push("Z"));return c};q.prototype.toLineSegments=function(a){var e=[],c=!0;l(a,function(a){e.push(c? "M":"L",a.x,a.y);c=!c});return e};q.prototype.face3d=function(a){var e=this,c=this.createElement("path");c.vertexes=[];c.insidePlotArea=!1;c.enabled=!0;z(c,"attr",function(a,c){if("object"===typeof c&&(f(c.enabled)||f(c.vertexes)||f(c.insidePlotArea))){this.enabled=h(c.enabled,this.enabled);this.vertexes=h(c.vertexes,this.vertexes);this.insidePlotArea=h(c.insidePlotArea,this.insidePlotArea);delete c.enabled;delete c.vertexes;delete c.insidePlotArea;var d=g(this.vertexes,k[e.chartIndex],this.insidePlotArea), B=e.toLinePath(d,!0),d=b.shapeArea(d),d=this.enabled&&0d.faces.length;)e.faces.pop().destroy(); for(;e.faces.lengthd.faces.length;)e.faces.pop().destroy();for(;e.faces.lengthb.shapeArea(a)?g=[a,0]:0>b.shapeArea(d)&&(g=[d,1]);return g};q=z([3,2,1,0],[7,6,5,4]);a=q[0];p=q[1];q=z([1,6,7,0],[4,5,2,3]);l=q[0];r=q[1];q=z([1,2,5,6],[0,7,4,3]);z=q[0];q=q[1];1===q?f+=1E4*(1E3-d):q|| (f+=1E4*d);f+=10*(!r||0<=n&&180>=n||360>n&&357.5Math.PI&&(a=2*Math.PI-a);return a}var e=a.x,d=a.y,b=a.start,g=a.end-.00001,h=a.r,l=a.innerR,m=a.depth,p=a.alpha,q=a.beta,r=Math.cos(b),A=Math.sin(b);a=Math.cos(g);var z=Math.sin(g),f=h*Math.cos(q),h=h*Math.cos(p),k=l*Math.cos(q),n=l*Math.cos(p),l=m*Math.sin(q),x=m*Math.sin(p),m=["M",e+f*r,d+h*A],m=m.concat(v(e,d,f,h,b,g,0,0)),m=m.concat(["L",e+k*a,d+n*z]),m=m.concat(v(e,d,k,n,g,b,0,0)),m=m.concat(["Z"]),y=0-y?b:g>-y?-y:b,C=gD&&bu-q&&bp&&(k=Math.min(k,1-Math.abs((d+g)/(p+g))%1));af&&(k=0>f?Math.min(k,(c+h)/(-f+c+h)):Math.min(k,1-(c+h)/(f+h)%1));ee*b[d][c]? d=g:e*b[g][c]===e*b[d][c]&&b[g].zl&&(b[a[1]]+=b[a[0]]+f,b[a[0]]=-f,l=0);l+b[a[1]]>d[a[0]+"Axis"].len&&0!==b[a[1]]&&(b[a[1]]=d[a[0]+"Axis"].len-b[a[0]]);if(0!==b[a[1]]&&(b[a[0]]>=d[a[0]+"Axis"].len||b[a[0]]+b[a[1]]<=f))for(var c in b)b[c]=0});c.shapeType="cuboid";b.z=g;b.depth= e;b.insidePlotArea=!0;h=u([{x:h[0],y:h[1],z:g}],a,!0)[0];c.tooltipPos=[h.x,h.y]}});d.z=g}});p(k.column.prototype,"animate",function(b){if(this.chart.is3d()){var d=arguments[1],a=this.yAxis,c=this,e=this.yAxis.reversed;f&&(d?t(c.data,function(c){null!==c.y&&(c.height=c.shapeArgs.height,c.shapey=c.shapeArgs.y,c.shapeArgs.height=1,e||(c.shapeArgs.y=c.stackY?c.plotY+a.translate(c.stackY):c.plotY+(c.negative?-c.height:c.height)))}):(t(c.data,function(a){null!==a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y= a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,c.options.animation))}),this.drawDataLabels(),c.animate=null))}else b.apply(this,[].slice.call(arguments,1))});p(k.column.prototype,"plotGroup",function(b,d,a,c,e,g){this.chart.is3d()&&g&&!this[d]&&(this[d]=g,g.attr(this.getPlotBox()),this[d].survive=!0);return b.apply(this,Array.prototype.slice.call(arguments,1))});p(k.column.prototype,"setVisible",function(b,d){var a=this,c;a.chart.is3d()&&t(a.data,function(b){c=(b.visible=b.options.visible=d=void 0=== d?!b.visible:d)?"visible":"hidden";a.options.data[n(b,a.data)]=b.options;b.graphic&&b.graphic.attr({visibility:c})});b.apply(this,Array.prototype.slice.call(arguments,1))});p(k.column.prototype,"init",function(b){b.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var d=this.options,a=d.grouping,c=d.stacking,e=w(this.yAxis.options.reversedStacks,!0),g=0;if(void 0===a||a){a=this.chart.retrieveStacks(c);g=d.stack||0;for(c=0;c=f.min&&d<=f.max:!1,p.push({x:l.plotX,y:l.plotY,z:l.plotZ});k=v(p,k,!0);for(a=0;a