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