/* Highcharts JS v5.0.2 (2016-10-26) 3D features for Highcharts JS @license: www.highcharts.com/license */ (function(v){"object"===typeof module&&module.exports?module.exports=v:v(Highcharts)})(function(v){(function(b){var q=b.deg2rad,l=b.pick;b.perspective=function(p,u,y){var e=u.options.chart.options3d,g=y?u.inverted:!1,h=u.plotWidth/2,d=u.plotHeight/2,f=e.depth/2,n=l(e.depth,1)*l(e.viewDistance,0),c=u.scale3d||1,a=q*e.beta*(g?-1:1),e=q*e.alpha*(g?-1:1),k=Math.cos(e),t=Math.cos(-a),z=Math.sin(e),A=Math.sin(-a);y||(h+=u.plotLeft,d+=u.plotTop);return b.map(p,function(a){var b,e;e=(g?a.y:a.x)-h;var l=(g? a.x:a.y)-d,p=(a.z||0)-f;b=t*e-A*p;a=-z*A*e+k*l-t*z*p;e=k*A*e+z*l+k*t*p;l=0k&&d-k>Math.PI/2+.0001?(B=B.concat(p(a,b,m,c,k,k+Math.PI/2,E,e)), B=B.concat(p(a,b,m,c,k+Math.PI/2,d,E,e))):dMath.PI/2+.0001?(B=B.concat(p(a,b,m,c,k,k-Math.PI/2,E,e)),B=B.concat(p(a,b,m,c,k-Math.PI/2,d,E,e))):["C",a+m*Math.cos(k)-m*w*F*Math.sin(k)+E,b+c*Math.sin(k)+c*w*F*Math.cos(k)+e,a+m*Math.cos(d)+m*w*F*Math.sin(d)+E,b+c*Math.sin(d)-c*w*F*Math.cos(d)+e,a+m*Math.cos(d)+E,b+c*Math.sin(d)+e]}var u=Math.cos,y=Math.PI,e=Math.sin,g=b.animObject,h=b.charts,d=b.color,f=b.defined,n=b.deg2rad,c=b.each,a=b.extend,k=b.inArray,t=b.map,z=b.merge,A=b.perspective,v= b.pick,D=b.SVGElement,C=b.SVGRenderer,r=b.wrap,w=4*(Math.sqrt(2)-1)/3/(y/2);r(C.prototype,"init",function(a){a.apply(this,[].slice.call(arguments,1));c([{name:"darker",slope:.6},{name:"brighter",slope:1.4}],function(a){this.definition({tagName:"filter",id:"highcharts-"+a.name,children:[{tagName:"feComponentTransfer",children:[{tagName:"feFuncR",type:"linear",slope:a.slope},{tagName:"feFuncG",type:"linear",slope:a.slope},{tagName:"feFuncB",type:"linear",slope:a.slope}]}]})},this)});C.prototype.toLinePath= function(a,b){var m=[];c(a,function(a){m.push("L",a.x,a.y)});a.length&&(m[0]="M",b&&m.push("Z"));return m};C.prototype.cuboid=function(a){var c=this.g();a=this.cuboidPath(a);c.front=this.path(a[0]).attr({"class":"highcharts-3d-front",zIndex:a[3]}).add(c);c.top=this.path(a[1]).attr({"class":"highcharts-3d-top",zIndex:a[4]}).add(c);c.side=this.path(a[2]).attr({"class":"highcharts-3d-side",zIndex:a[5]}).add(c);c.fillSetter=function(a){this.front.attr({fill:a});this.top.attr({fill:d(a).brighten(.1).get()}); this.side.attr({fill:d(a).brighten(-.1).get()});this.color=a;return this};c.opacitySetter=function(a){this.front.attr({opacity:a});this.top.attr({opacity:a});this.side.attr({opacity:a});return this};c.attr=function(a){if(a.shapeArgs||f(a.x))a=this.renderer.cuboidPath(a.shapeArgs||a),this.front.attr({d:a[0],zIndex:a[3]}),this.top.attr({d:a[1],zIndex:a[4]}),this.side.attr({d:a[2],zIndex:a[5]});else return b.SVGElement.prototype.attr.call(this,a);return this};c.animate=function(a,c,b){f(a.x)&&f(a.y)? (a=this.renderer.cuboidPath(a),this.front.attr({zIndex:a[3]}).animate({d:a[0]},c,b),this.top.attr({zIndex:a[4]}).animate({d:a[1]},c,b),this.side.attr({zIndex:a[5]}).animate({d:a[2]},c,b),this.attr({zIndex:-a[6]})):a.opacity?(this.front.animate(a,c,b),this.top.animate(a,c,b),this.side.animate(a,c,b)):D.prototype.animate.call(this,a,c,b);return this};c.destroy=function(){this.front.destroy();this.top.destroy();this.side.destroy();return null};c.attr({zIndex:-a[6]});return c};C.prototype.cuboidPath= function(a){function c(a){return n[a]}var b=a.x,k=a.y,d=a.z,e=a.height,E=a.width,f=a.depth,n=[{x:b,y:k,z:d},{x:b+E,y:k,z:d},{x:b+E,y:k+e,z:d},{x:b,y:k+e,z:d},{x:b,y:k+e,z:d+f},{x:b+E,y:k+e,z:d+f},{x:b+E,y:k,z:d+f},{x:b,y:k,z:d+f}],n=A(n,h[this.chartIndex],a.insidePlotArea),d=function(a,b){var k=[];a=t(a,c);b=t(b,c);0>q(a)?k=a:0>q(b)&&(k=b);return k};a=d([3,2,1,0],[7,6,5,4]);b=[4,5,2,3];k=d([1,6,7,0],b);d=d([1,2,5,6],[0,7,4,3]);return[this.toLinePath(a,!0),this.toLinePath(k,!0),this.toLinePath(d,!0), l(a),l(k),l(d),9E9*l(t(b,c))]};b.SVGRenderer.prototype.arc3d=function(b){function e(a){var b=!1,c={},d;for(d in a)-1!==k(d,h)&&(c[d]=a[d],delete a[d],b=!0);return b?c:!1}var m=this.g(),f=m.renderer,h="x y r innerR start end".split(" ");b=z(b);b.alpha*=n;b.beta*=n;m.top=f.path();m.side1=f.path();m.side2=f.path();m.inn=f.path();m.out=f.path();m.onAdd=function(){var a=m.parentGroup,b=m.attr("class");m.top.add(m);c(["out","inn","side1","side2"],function(c){m[c].addClass(b+" highcharts-3d-side").add(a)})}; m.setPaths=function(a){var b=m.renderer.arc3dPath(a),c=100*b.zTop;m.attribs=a;m.top.attr({d:b.top,zIndex:b.zTop});m.inn.attr({d:b.inn,zIndex:b.zInn});m.out.attr({d:b.out,zIndex:b.zOut});m.side1.attr({d:b.side1,zIndex:b.zSide1});m.side2.attr({d:b.side2,zIndex:b.zSide2});m.zIndex=c;m.attr({zIndex:c});a.center&&(m.top.setRadialReference(a.center),delete a.center)};m.setPaths(b);m.fillSetter=function(a){var b=d(a).brighten(-.1).get();this.fill=a;this.side1.attr({fill:b});this.side2.attr({fill:b});this.inn.attr({fill:b}); this.out.attr({fill:b});this.top.attr({fill:a});return this};c(["opacity","translateX","translateY","visibility"],function(a){m[a+"Setter"]=function(a,b){m[b]=a;c(["out","inn","side1","side2","top"],function(c){m[c].attr(b,a)})}});r(m,"attr",function(b,c,k){var d;"object"===typeof c&&(d=e(c))&&(a(m.attribs,d),m.setPaths(m.attribs));return b.call(this,c,k)});r(m,"animate",function(a,b,c,k){var d,m=this.attribs,f;delete b.center;delete b.z;delete b.depth;delete b.alpha;delete b.beta;f=g(v(c,this.renderer.globalAnimation)); f.duration&&(b=z(b),d=e(b),b.dummy=1,d&&(f.step=function(a,b){function c(a){return m[a]+(v(d[a],m[a])-m[a])*b.pos}"dummy"===b.prop&&b.elem.setPaths(z(m,{x:c("x"),y:c("y"),r:c("r"),innerR:c("innerR"),start:c("start"),end:c("end")}))}),c=f);return a.call(this,b,c,k)});m.destroy=function(){this.top.destroy();this.out.destroy();this.inn.destroy();this.side1.destroy();this.side2.destroy();D.prototype.destroy.call(this)};m.hide=function(){this.top.hide();this.out.hide();this.inn.hide();this.side1.hide(); this.side2.hide()};m.show=function(){this.top.show();this.out.show();this.inn.show();this.side1.show();this.side2.show()};return m};C.prototype.arc3dPath=function(a){function b(a){a%=2*Math.PI;a>Math.PI&&(a=2*Math.PI-a);return a}var c=a.x,d=a.y,k=a.start,f=a.end-.00001,n=a.r,h=a.innerR,l=a.depth,g=a.alpha,t=a.beta,z=Math.cos(k),B=Math.sin(k);a=Math.cos(f);var q=Math.sin(f),x=n*Math.cos(t),n=n*Math.cos(g),A=h*Math.cos(t),w=h*Math.cos(g),h=l*Math.sin(t),r=l*Math.sin(g),l=["M",c+x*z,d+n*B],l=l.concat(p(c, d,x,n,k,f,0,0)),l=l.concat(["L",c+A*a,d+w*q]),l=l.concat(p(c,d,A,w,f,k,0,0)),l=l.concat(["Z"]),C=0-C?k:f>-C?-C:k,v=fD&&ky-t&&kh&&(w=Math.min(w,1-Math.abs((d+e)/(h+e))%1));cq&&(w=0>q?Math.min(w,(a+g)/(-q+a+g)):Math.min(w,1-(a+g)/(q+g)%1));k=e.min&&d<=e.max:!1,g.push({x:h.plotX,y:h.plotY,z:h.plotZ});p=q(g,p,!0);for(f=0;f