/*
 Highcharts JS v9.1.0 (2021-05-03)

 3D features for Highcharts JS

 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/highcharts-3d",["highcharts"],function(D){c(D);c.Highcharts=D;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function D(c,r,t,E){c.hasOwnProperty(r)||(c[r]=E.apply(null,t))}c=c?c._modules:{};D(c,"Extensions/Math3D.js",[c["Core/Globals.js"],c["Core/Utilities.js"]],function(c,r){function t(m,b,a){b=0<a&&a<Number.POSITIVE_INFINITY?
a/(m.z+b.z+a):1;return{x:m.x*b,y:m.y*b}}function B(m,b,a,q){var k=b.options.chart.options3d,d=w(q,a?b.inverted:!1),e={x:b.plotWidth/2,y:b.plotHeight/2,z:k.depth/2,vd:w(k.depth,1)*w(k.viewDistance,0)},g=b.scale3d||1;q=u*k.beta*(d?-1:1);k=u*k.alpha*(d?-1:1);var p=Math.cos(k),f=Math.cos(-q),c=Math.sin(k),H=Math.sin(-q);a||(e.x+=b.plotLeft,e.y+=b.plotTop);return m.map(function(a){var b=(d?a.y:a.x)-e.x;var l=(d?a.x:a.y)-e.y;a=(a.z||0)-e.z;b={x:f*b-H*a,y:-c*H*b+p*l-f*c*a,z:p*H*b+c*l+p*f*a};l=t(b,e,e.vd);
l.x=l.x*g+e.x;l.y=l.y*g+e.y;l.z=b.z*g+e.z;return{x:d?l.y:l.x,y:d?l.x:l.y,z:l.z}})}function d(d,b){var a=b.options.chart.options3d,q=b.plotWidth/2;b=b.plotHeight/2;a=w(a.depth,1)*w(a.viewDistance,0)+a.depth;return Math.sqrt(Math.pow(q-w(d.plotX,d.x),2)+Math.pow(b-w(d.plotY,d.y),2)+Math.pow(a-w(d.plotZ,d.z),2))}function v(d){var b=0,a;for(a=0;a<d.length;a++){var q=(a+1)%d.length;b+=d[a].x*d[q].y-d[q].x*d[a].y}return b/2}function n(d,b,a){return v(B(d,b,a))}var w=r.pick,u=c.deg2rad;c.perspective3D=t;
c.perspective=B;c.pointCameraDistance=d;c.shapeArea=v;c.shapeArea3d=n;return{perspective:B,perspective3D:t,pointCameraDistance:d,shapeArea:v,shapeArea3D:n}});D(c,"Core/Renderer/SVG/SVGElement3D.js",[c["Core/Color/Color.js"],c["Core/Renderer/SVG/SVGElement.js"],c["Core/Utilities.js"]],function(c,r,t){var B=c.parse,d=t.defined,v=t.merge,n=t.objectEach,w=t.pick,u;(function(c){c.base={initArgs:function(b){var a=this,d=a.renderer,c=d[a.pathType+"Path"](b),m=c.zIndexes;a.parts.forEach(function(e){a[e]=
d.path(c[e]).attr({"class":"highcharts-3d-"+e,zIndex:m[e]||0}).add(a)});a.attr({"stroke-linejoin":"round",zIndex:m.group});a.originalDestroy=a.destroy;a.destroy=a.destroyParts;a.forcedSides=c.forcedSides},singleSetterForParts:function(b,a,d,c,m,e){var g={};c=[null,null,c||"attr",m,e];var p=d&&d.zIndexes;d?(p&&p.group&&this.attr({zIndex:p.group}),n(d,function(a,e){g[e]={};g[e][b]=a;p&&(g[e].zIndex=d.zIndexes[e]||0)}),c[1]=g):(g[b]=a,c[0]=g);return this.processParts.apply(this,c)},processParts:function(b,
a,d,c,m){var e=this;e.parts.forEach(function(g){a&&(b=w(a[g],!1));if(!1!==b)e[g][d](b,c,m)});return e},destroyParts:function(){this.processParts(null,null,"destroy");return this.originalDestroy()}};c.cuboid=v(c.base,{parts:["front","top","side"],pathType:"cuboid",attr:function(b,a,c,m){if("string"===typeof b&&"undefined"!==typeof a){var q=b;b={};b[q]=a}return b.shapeArgs||d(b.x)?this.singleSetterForParts("d",null,this.renderer[this.pathType+"Path"](b.shapeArgs||b)):r.prototype.attr.call(this,b,void 0,
c,m)},animate:function(b,a,q){if(d(b.x)&&d(b.y)){b=this.renderer[this.pathType+"Path"](b);var m=b.forcedSides;this.singleSetterForParts("d",null,b,"animate",a,q);this.attr({zIndex:b.zIndexes.group});m!==this.forcedSides&&(this.forcedSides=m,c.cuboid.fillSetter.call(this,this.fill))}else r.prototype.animate.call(this,b,a,q);return this},fillSetter:function(b){this.forcedSides=this.forcedSides||[];this.singleSetterForParts("fill",null,{front:b,top:B(b).brighten(0<=this.forcedSides.indexOf("top")?0:
.1).get(),side:B(b).brighten(0<=this.forcedSides.indexOf("side")?0:-.1).get()});this.color=this.fill=b;return this}})})(u||(u={}));return u});D(c,"Core/Renderer/SVG/SVGRenderer3D.js",[c["Core/Animation/AnimationUtilities.js"],c["Core/Color/Color.js"],c["Core/Globals.js"],c["Extensions/Math3D.js"],c["Core/Renderer/SVG/SVGElement.js"],c["Core/Renderer/SVG/SVGElement3D.js"],c["Core/Renderer/SVG/SVGRenderer.js"],c["Core/Utilities.js"]],function(c,r,t,E,d,v,n,w){function u(a,e,b,g,f,d,c,p){var h=[],l=
d-f;return d>f&&d-f>Math.PI/2+.0001?(h=h.concat(u(a,e,b,g,f,f+Math.PI/2,c,p)),h=h.concat(u(a,e,b,g,f+Math.PI/2,d,c,p))):d<f&&f-d>Math.PI/2+.0001?(h=h.concat(u(a,e,b,g,f,f-Math.PI/2,c,p)),h=h.concat(u(a,e,b,g,f-Math.PI/2,d,c,p))):[["C",a+b*Math.cos(f)-b*F*l*Math.sin(f)+c,e+g*Math.sin(f)+g*F*l*Math.cos(f)+p,a+b*Math.cos(d)+b*F*l*Math.sin(d)+c,e+g*Math.sin(d)-g*F*l*Math.cos(d)+p,a+b*Math.cos(d)+c,e+g*Math.sin(d)+p]]}var m=c.animObject,b=r.parse,a=t.charts,q=t.deg2rad,k=E.perspective,y=E.shapeArea,e=
w.defined,g=w.extend,p=w.merge,f=w.pick,J=Math.cos,H=Math.sin,K=Math.PI,F=4*(Math.sqrt(2)-1)/3/(K/2);n.prototype.elements3d=v;n.prototype.toLinePath=function(a,e){var b=[];a.forEach(function(a){b.push(["L",a.x,a.y])});a.length&&(b[0][0]="M",e&&b.push(["Z"]));return b};n.prototype.toLineSegments=function(a){var e=[],b=!0;a.forEach(function(a){e.push(b?["M",a.x,a.y]:["L",a.x,a.y]);b=!b});return e};n.prototype.face3d=function(b){var g=this,h=this.createElement("path");h.vertexes=[];h.insidePlotArea=
!1;h.enabled=!0;h.attr=function(b){if("object"===typeof b&&(e(b.enabled)||e(b.vertexes)||e(b.insidePlotArea))){this.enabled=f(b.enabled,this.enabled);this.vertexes=f(b.vertexes,this.vertexes);this.insidePlotArea=f(b.insidePlotArea,this.insidePlotArea);delete b.enabled;delete b.vertexes;delete b.insidePlotArea;var h=k(this.vertexes,a[g.chartIndex],this.insidePlotArea),l=g.toLinePath(h,!0);h=y(h);b.d=l;b.visibility=this.enabled&&0<h?"visible":"hidden"}return d.prototype.attr.apply(this,arguments)};
h.animate=function(b){if("object"===typeof b&&(e(b.enabled)||e(b.vertexes)||e(b.insidePlotArea))){this.enabled=f(b.enabled,this.enabled);this.vertexes=f(b.vertexes,this.vertexes);this.insidePlotArea=f(b.insidePlotArea,this.insidePlotArea);delete b.enabled;delete b.vertexes;delete b.insidePlotArea;var h=k(this.vertexes,a[g.chartIndex],this.insidePlotArea),l=g.toLinePath(h,!0);h=y(h);h=this.enabled&&0<h?"visible":"hidden";b.d=l;this.attr("visibility",h)}return d.prototype.animate.apply(this,arguments)};
return h.attr(b)};n.prototype.polyhedron=function(a){var b=this,h=this.g(),g=h.destroy;this.styledMode||h.attr({"stroke-linejoin":"round"});h.faces=[];h.destroy=function(){for(var a=0;a<h.faces.length;a++)h.faces[a].destroy();return g.call(this)};h.attr=function(a,g,f,l){if("object"===typeof a&&e(a.faces)){for(;h.faces.length>a.faces.length;)h.faces.pop().destroy();for(;h.faces.length<a.faces.length;)h.faces.push(b.face3d().add(h));for(var c=0;c<a.faces.length;c++)b.styledMode&&delete a.faces[c].fill,
h.faces[c].attr(a.faces[c],null,f,l);delete a.faces}return d.prototype.attr.apply(this,arguments)};h.animate=function(a,e,g){if(a&&a.faces){for(;h.faces.length>a.faces.length;)h.faces.pop().destroy();for(;h.faces.length<a.faces.length;)h.faces.push(b.face3d().add(h));for(var f=0;f<a.faces.length;f++)h.faces[f].animate(a.faces[f],e,g);delete a.faces}return d.prototype.animate.apply(this,arguments)};return h.attr(a)};n.prototype.element3d=function(a,b){var e=this.g();g(e,this.elements3d[a]);e.initArgs(b);
return e};n.prototype.cuboid=function(a){return this.element3d("cuboid",a)};n.prototype.cuboidPath=function(b){function e(a){return 0===l&&1<a&&6>a?{x:I[a].x,y:I[a].y+10,z:I[a].z}:I[0].x===I[7].x&&4<=a?{x:I[a].x+10,y:I[a].y,z:I[a].z}:0===m&&2>a||5<a?{x:I[a].x,y:I[a].y,z:I[a].z+10}:I[a]}function g(a){return I[a]}var f=b.x||0,d=b.y||0,c=b.z||0,l=b.height||0,p=b.width||0,m=b.depth||0,x=a[this.chartIndex],z=x.options.chart.options3d.alpha,G=0,I=[{x:f,y:d,z:c},{x:f+p,y:d,z:c},{x:f+p,y:d+l,z:c},{x:f,y:d+
l,z:c},{x:f,y:d+l,z:c+m},{x:f+p,y:d+l,z:c+m},{x:f+p,y:d,z:c+m},{x:f,y:d,z:c+m}],q=[];I=k(I,x,b.insidePlotArea);var A=function(a,b,z){var f=[[],-1],d=a.map(g),h=b.map(g);a=a.map(e);b=b.map(e);0>y(d)?f=[d,0]:0>y(h)?f=[h,1]:z&&(q.push(z),f=0>y(a)?[d,0]:0>y(b)?[h,1]:[d,0]);return f};var C=A([3,2,1,0],[7,6,5,4],"front");b=C[0];var H=C[1];C=A([1,6,7,0],[4,5,2,3],"top");p=C[0];var J=C[1];C=A([1,2,5,6],[0,7,4,3],"side");A=C[0];C=C[1];1===C?G+=1E6*(x.plotWidth-f):C||(G+=1E6*f);G+=10*(!J||0<=z&&180>=z||360>
z&&357.5<z?x.plotHeight-d:10+d);1===H?G+=100*c:H||(G+=100*(1E3-c));return{front:this.toLinePath(b,!0),top:this.toLinePath(p,!0),side:this.toLinePath(A,!0),zIndexes:{group:Math.round(G)},forcedSides:q,isFront:H,isTop:J}};n.prototype.arc3d=function(a){function e(a){var b=!1,e={},f;a=p(a);for(f in a)-1!==l.indexOf(f)&&(e[f]=a[f],delete a[f],b=!0);return b?[e,a]:!1}var h=this.g(),c=h.renderer,l="x y r innerR start end depth".split(" ");a=p(a);a.alpha=(a.alpha||0)*q;a.beta=(a.beta||0)*q;h.top=c.path();
h.side1=c.path();h.side2=c.path();h.inn=c.path();h.out=c.path();h.onAdd=function(){var a=h.parentGroup,b=h.attr("class");h.top.add(h);["out","inn","side1","side2"].forEach(function(e){h[e].attr({"class":b+" highcharts-3d-side"}).add(a)})};["addClass","removeClass"].forEach(function(a){h[a]=function(){var b=arguments;["top","out","inn","side1","side2"].forEach(function(e){h[e][a].apply(h[e],b)})}});h.setPaths=function(a){var b=h.renderer.arc3dPath(a),e=100*b.zTop;h.attribs=a;h.top.attr({d:b.top,zIndex:b.zTop});
h.inn.attr({d:b.inn,zIndex:b.zInn});h.out.attr({d:b.out,zIndex:b.zOut});h.side1.attr({d:b.side1,zIndex:b.zSide1});h.side2.attr({d:b.side2,zIndex:b.zSide2});h.zIndex=e;h.attr({zIndex:e});a.center&&(h.top.setRadialReference(a.center),delete a.center)};h.setPaths(a);h.fillSetter=function(a){var e=b(a).brighten(-.1).get();this.fill=a;this.side1.attr({fill:e});this.side2.attr({fill:e});this.inn.attr({fill:e});this.out.attr({fill:e});this.top.attr({fill:a});return this};["opacity","translateX","translateY",
"visibility"].forEach(function(a){h[a+"Setter"]=function(a,b){h[b]=a;["out","inn","side1","side2","top"].forEach(function(e){h[e].attr(b,a)})}});h.attr=function(a){var b;if("object"===typeof a&&(b=e(a))){var f=b[0];arguments[0]=b[1];g(h.attribs,f);h.setPaths(h.attribs)}return d.prototype.attr.apply(h,arguments)};h.animate=function(a,b,g){var c=this.attribs,l="data-"+Math.random().toString(26).substring(2,9);delete a.center;delete a.z;delete a.alpha;delete a.beta;var z=m(f(b,this.renderer.globalAnimation));
if(z.duration){b=e(a);h[l]=0;a[l]=1;h[l+"Setter"]=t.noop;if(b){var G=b[0];z.step=function(a,b){function e(a){return c[a]+(f(G[a],c[a])-c[a])*b.pos}b.prop===l&&b.elem.setPaths(p(c,{x:e("x"),y:e("y"),r:e("r"),innerR:e("innerR"),start:e("start"),end:e("end"),depth:e("depth")}))}}b=z}return d.prototype.animate.call(this,a,b,g)};h.destroy=function(){this.top.destroy();this.out.destroy();this.inn.destroy();this.side1.destroy();this.side2.destroy();return d.prototype.destroy.call(this)};h.hide=function(){this.top.hide();
this.out.hide();this.inn.hide();this.side1.hide();this.side2.hide()};h.show=function(a){this.top.show(a);this.out.show(a);this.inn.show(a);this.side1.show(a);this.side2.show(a)};return h};n.prototype.arc3dPath=function(a){function b(a){a%=2*Math.PI;a>Math.PI&&(a=2*Math.PI-a);return a}var e=a.x||0,f=a.y||0,g=a.start||0,d=(a.end||0)-.00001,c=a.r||0,p=a.innerR||0,l=a.depth||0,x=a.alpha||0,z=a.beta||0,G=Math.cos(g),m=Math.sin(g);a=Math.cos(d);var q=Math.sin(d),A=c*Math.cos(z);c*=Math.cos(x);var C=p*Math.cos(z),
k=p*Math.cos(x);p=l*Math.sin(z);var n=l*Math.sin(x);l=[["M",e+A*G,f+c*m]];l=l.concat(u(e,f,A,c,g,d,0,0));l.push(["L",e+C*a,f+k*q]);l=l.concat(u(e,f,C,k,d,g,0,0));l.push(["Z"]);var y=0<z?Math.PI/2:0;z=0<x?0:Math.PI/2;y=g>-y?g:d>-y?-y:g;var F=d<K-z?d:g<K-z?K-z:d,v=2*K-z;x=[["M",e+A*J(y),f+c*H(y)]];x=x.concat(u(e,f,A,c,y,F,0,0));d>v&&g<v?(x.push(["L",e+A*J(F)+p,f+c*H(F)+n]),x=x.concat(u(e,f,A,c,F,v,p,n)),x.push(["L",e+A*J(v),f+c*H(v)]),x=x.concat(u(e,f,A,c,v,d,0,0)),x.push(["L",e+A*J(d)+p,f+c*H(d)+n]),
x=x.concat(u(e,f,A,c,d,v,p,n)),x.push(["L",e+A*J(v),f+c*H(v)]),x=x.concat(u(e,f,A,c,v,F,0,0))):d>K-z&&g<K-z&&(x.push(["L",e+A*Math.cos(F)+p,f+c*Math.sin(F)+n]),x=x.concat(u(e,f,A,c,F,d,p,n)),x.push(["L",e+A*Math.cos(d),f+c*Math.sin(d)]),x=x.concat(u(e,f,A,c,d,F,0,0)));x.push(["L",e+A*Math.cos(F)+p,f+c*Math.sin(F)+n]);x=x.concat(u(e,f,A,c,F,y,p,n));x.push(["Z"]);z=[["M",e+C*G,f+k*m]];z=z.concat(u(e,f,C,k,g,d,0,0));z.push(["L",e+C*Math.cos(d)+p,f+k*Math.sin(d)+n]);z=z.concat(u(e,f,C,k,d,g,p,n));z.push(["Z"]);
G=[["M",e+A*G,f+c*m],["L",e+A*G+p,f+c*m+n],["L",e+C*G+p,f+k*m+n],["L",e+C*G,f+k*m],["Z"]];e=[["M",e+A*a,f+c*q],["L",e+A*a+p,f+c*q+n],["L",e+C*a+p,f+k*q+n],["L",e+C*a,f+k*q],["Z"]];q=Math.atan2(n,-p);f=Math.abs(d+q);a=Math.abs(g+q);g=Math.abs((g+d)/2+q);f=b(f);a=b(a);g=b(g);g*=1E5;d=1E5*a;f*=1E5;return{top:l,zTop:1E5*Math.PI+1,out:x,zOut:Math.max(g,d,f),inn:z,zInn:Math.max(g,d,f),side1:G,zSide1:.99*f,side2:e,zSide2:.99*d}};return n});D(c,"Core/Axis/Tick3D.js",[c["Core/Utilities.js"]],function(c){var r=
c.addEvent,t=c.extend,B=c.wrap;return function(){function d(){}d.compose=function(c){r(c,"afterGetLabelPosition",d.onAfterGetLabelPosition);B(c.prototype,"getMarkPath",d.wrapGetMarkPath)};d.onAfterGetLabelPosition=function(d){var c=this.axis.axis3D;c&&t(d.pos,c.fix3dPosition(d.pos))};d.wrapGetMarkPath=function(d){var c=this.axis.axis3D,v=d.apply(this,[].slice.call(arguments,1));if(c){var u=v[0],m=v[1];if("M"===u[0]&&"L"===m[0])return c=[c.fix3dPosition({x:u[1],y:u[2],z:0}),c.fix3dPosition({x:m[1],
y:m[2],z:0})],this.axis.chart.renderer.toLineSegments(c)}return v};return d}()});D(c,"Core/Axis/Axis3D.js",[c["Core/Globals.js"],c["Extensions/Math3D.js"],c["Core/Axis/Tick.js"],c["Core/Axis/Tick3D.js"],c["Core/Utilities.js"]],function(c,r,t,E,d){var v=r.perspective,n=r.perspective3D,w=r.shapeArea,u=d.addEvent,m=d.merge,b=d.pick,a=d.wrap,q=c.deg2rad,k=function(){function a(a){this.axis=a}a.prototype.fix3dPosition=function(a,c){var e=this.axis,f=e.chart;if("colorAxis"===e.coll||!f.chart3d||!f.is3d())return a;
var d=q*f.options.chart.options3d.alpha,g=q*f.options.chart.options3d.beta,m=b(c&&e.options.title.position3d,e.options.labels.position3d);c=b(c&&e.options.title.skew3d,e.options.labels.skew3d);var k=f.chart3d.frame3d,l=f.plotLeft,n=f.plotWidth+l,h=f.plotTop,u=f.plotHeight+h;f=!1;var y=0,t=0,r={x:0,y:1,z:0};a=e.axis3D.swapZ({x:a.x,y:a.y,z:0});if(e.isZAxis)if(e.opposite){if(null===k.axes.z.top)return{};t=a.y-h;a.x=k.axes.z.top.x;a.y=k.axes.z.top.y;l=k.axes.z.top.xDir;f=!k.top.frontFacing}else{if(null===
k.axes.z.bottom)return{};t=a.y-u;a.x=k.axes.z.bottom.x;a.y=k.axes.z.bottom.y;l=k.axes.z.bottom.xDir;f=!k.bottom.frontFacing}else if(e.horiz)if(e.opposite){if(null===k.axes.x.top)return{};t=a.y-h;a.y=k.axes.x.top.y;a.z=k.axes.x.top.z;l=k.axes.x.top.xDir;f=!k.top.frontFacing}else{if(null===k.axes.x.bottom)return{};t=a.y-u;a.y=k.axes.x.bottom.y;a.z=k.axes.x.bottom.z;l=k.axes.x.bottom.xDir;f=!k.bottom.frontFacing}else if(e.opposite){if(null===k.axes.y.right)return{};y=a.x-n;a.x=k.axes.y.right.x;a.z=k.axes.y.right.z;
l=k.axes.y.right.xDir;l={x:l.z,y:l.y,z:-l.x}}else{if(null===k.axes.y.left)return{};y=a.x-l;a.x=k.axes.y.left.x;a.z=k.axes.y.left.z;l=k.axes.y.left.xDir}"chart"!==m&&("flap"===m?e.horiz?(g=Math.sin(d),d=Math.cos(d),e.opposite&&(g=-g),f&&(g=-g),r={x:l.z*g,y:d,z:-l.x*g}):l={x:Math.cos(g),y:0,z:Math.sin(g)}:"ortho"===m?e.horiz?(r=Math.cos(d),m=Math.sin(g)*r,d=-Math.sin(d),g=-r*Math.cos(g),r={x:l.y*g-l.z*d,y:l.z*m-l.x*g,z:l.x*d-l.y*m},d=1/Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z),f&&(d=-d),r={x:d*r.x,y:d*r.y,
z:d*r.z}):l={x:Math.cos(g),y:0,z:Math.sin(g)}:e.horiz?r={x:Math.sin(g)*Math.sin(d),y:Math.cos(d),z:-Math.cos(g)*Math.sin(d)}:l={x:Math.cos(g),y:0,z:Math.sin(g)});a.x+=y*l.x+t*r.x;a.y+=y*l.y+t*r.y;a.z+=y*l.z+t*r.z;f=v([a],e.chart)[0];c&&(0>w(v([a,{x:a.x+l.x,y:a.y+l.y,z:a.z+l.z},{x:a.x+r.x,y:a.y+r.y,z:a.z+r.z}],e.chart))&&(l={x:-l.x,y:-l.y,z:-l.z}),a=v([{x:a.x,y:a.y,z:a.z},{x:a.x+l.x,y:a.y+l.y,z:a.z+l.z},{x:a.x+r.x,y:a.y+r.y,z:a.z+r.z}],e.chart),f.matrix=[a[1].x-a[0].x,a[1].y-a[0].y,a[2].x-a[0].x,a[2].y-
a[0].y,f.x,f.y],f.matrix[4]-=f.x*f.matrix[0]+f.y*f.matrix[2],f.matrix[5]-=f.x*f.matrix[1]+f.y*f.matrix[3]);return f};a.prototype.swapZ=function(a,b){var e=this.axis;return e.isZAxis?(b=b?0:e.chart.plotLeft,{x:b+a.z,y:a.y,z:a.x-b}):a};return a}();return function(){function d(){}d.compose=function(b){m(!0,b.defaultOptions,d.defaultOptions);b.keepProps.push("axis3D");u(b,"init",d.onInit);u(b,"afterSetOptions",d.onAfterSetOptions);u(b,"drawCrosshair",d.onDrawCrosshair);u(b,"destroy",d.onDestroy);b=b.prototype;
a(b,"getLinePath",d.wrapGetLinePath);a(b,"getPlotBandPath",d.wrapGetPlotBandPath);a(b,"getPlotLinePath",d.wrapGetPlotLinePath);a(b,"getSlotWidth",d.wrapGetSlotWidth);a(b,"getTitlePosition",d.wrapGetTitlePosition);E.compose(t)};d.onAfterSetOptions=function(){var a=this.chart,d=this.options;a.is3d&&a.is3d()&&"colorAxis"!==this.coll&&(d.tickWidth=b(d.tickWidth,0),d.gridLineWidth=b(d.gridLineWidth,1))};d.onDestroy=function(){["backFrame","bottomFrame","sideFrame"].forEach(function(a){this[a]&&(this[a]=
this[a].destroy())},this)};d.onDrawCrosshair=function(a){this.chart.is3d()&&"colorAxis"!==this.coll&&a.point&&(a.point.crosshairPos=this.isXAxis?a.point.axisXpos:this.len-a.point.axisYpos)};d.onInit=function(){this.axis3D||(this.axis3D=new k(this))};d.wrapGetLinePath=function(a){return this.chart.is3d()&&"colorAxis"!==this.coll?[]:a.apply(this,[].slice.call(arguments,1))};d.wrapGetPlotBandPath=function(a){if(!this.chart.is3d()||"colorAxis"===this.coll)return a.apply(this,[].slice.call(arguments,1));
var b=arguments,d=b[2],f=[];b=this.getPlotLinePath({value:b[1]});d=this.getPlotLinePath({value:d});if(b&&d)for(var e=0;e<b.length;e+=2){var c=b[e],k=b[e+1],m=d[e],l=d[e+1];"M"===c[0]&&"L"===k[0]&&"M"===m[0]&&"L"===l[0]&&f.push(c,k,l,["L",m[1],m[2]],["Z"])}return f};d.wrapGetPlotLinePath=function(a){var b=this.axis3D,d=this.chart,f=a.apply(this,[].slice.call(arguments,1));if("colorAxis"===this.coll||!d.chart3d||!d.is3d()||null===f)return f;var e=d.options.chart.options3d,c=this.isZAxis?d.plotWidth:
e.depth;e=d.chart3d.frame3d;var k=f[0],m=f[1];f=[];"M"===k[0]&&"L"===m[0]&&(b=[b.swapZ({x:k[1],y:k[2],z:0}),b.swapZ({x:k[1],y:k[2],z:c}),b.swapZ({x:m[1],y:m[2],z:0}),b.swapZ({x:m[1],y:m[2],z:c})],this.horiz?(this.isZAxis?(e.left.visible&&f.push(b[0],b[2]),e.right.visible&&f.push(b[1],b[3])):(e.front.visible&&f.push(b[0],b[2]),e.back.visible&&f.push(b[1],b[3])),e.top.visible&&f.push(b[0],b[1]),e.bottom.visible&&f.push(b[2],b[3])):(e.front.visible&&f.push(b[0],b[2]),e.back.visible&&f.push(b[1],b[3]),
e.left.visible&&f.push(b[0],b[1]),e.right.visible&&f.push(b[2],b[3])),f=v(f,this.chart,!1));return d.renderer.toLineSegments(f)};d.wrapGetSlotWidth=function(a,d){var e=this.chart,f=this.ticks,c=this.gridGroup;if(this.categories&&e.frameShapes&&e.is3d()&&c&&d&&d.label){c=c.element.childNodes[0].getBBox();var g=e.frameShapes.left.getBBox(),k=e.options.chart.options3d;e={x:e.plotWidth/2,y:e.plotHeight/2,z:k.depth/2,vd:b(k.depth,1)*b(k.viewDistance,0)};var m=k=void 0,l=d.pos,q=f[l-1];f=f[l+1];0!==l&&
q&&q.label&&q.label.xy&&(k=n({x:q.label.xy.x,y:q.label.xy.y,z:null},e,e.vd));f&&f.label&&f.label.xy&&(m=n({x:f.label.xy.x,y:f.label.xy.y,z:null},e,e.vd));f={x:d.label.xy.x,y:d.label.xy.y,z:null};f=n(f,e,e.vd);return Math.abs(k?f.x-k.x:m?m.x-f.x:c.x-g.x)}return a.apply(this,[].slice.call(arguments,1))};d.wrapGetTitlePosition=function(a){var b=a.apply(this,[].slice.call(arguments,1));return this.axis3D?this.axis3D.fix3dPosition(b,!0):b};d.defaultOptions={labels:{position3d:"offset",skew3d:!1},title:{position3d:null,
skew3d:null}};return d}()});D(c,"Core/Axis/ZAxis.js",[c["Core/Axis/Axis.js"],c["Core/Utilities.js"]],function(c,r){var t=this&&this.__extends||function(){var d=function(b,a){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d])};return d(b,a)};return function(b,a){function c(){this.constructor=b}d(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}}(),B=r.addEvent,d=r.merge,v=r.pick,
n=r.splat,w=function(){function d(){}d.compose=function(b){B(b,"afterGetAxes",d.onAfterGetAxes);b=b.prototype;b.addZAxis=d.wrapAddZAxis;b.collectionsWithInit.zAxis=[b.addZAxis];b.collectionsWithUpdate.push("zAxis")};d.onAfterGetAxes=function(){var b=this,a=this.options;a=a.zAxis=n(a.zAxis||{});b.is3d()&&(b.zAxis=[],a.forEach(function(a,d){a.index=d;a.isX=!0;b.addZAxis(a).setScale()}))};d.wrapAddZAxis=function(b){return new u(this,b)};return d}(),u=function(c){function b(a,b){a=c.call(this,a,b)||this;
a.isZAxis=!0;return a}t(b,c);b.prototype.getSeriesExtremes=function(){var a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.ignoreMinPadding=a.ignoreMaxPadding=void 0;a.stacking&&a.stacking.buildStacks();a.series.forEach(function(d){if(d.visible||!b.options.chart.ignoreHiddenSeries)a.hasVisibleSeries=!0,d=d.zData,d.length&&(a.dataMin=Math.min(v(a.dataMin,d[0]),Math.min.apply(null,d)),a.dataMax=Math.max(v(a.dataMax,d[0]),Math.max.apply(null,d)))})};b.prototype.setAxisSize=function(){var a=
this.chart;c.prototype.setAxisSize.call(this);this.width=this.len=a.options.chart.options3d&&a.options.chart.options3d.depth||0;this.right=a.chartWidth-this.width-this.left};b.prototype.setOptions=function(a){a=d({offset:0,lineWidth:0},a);this.isZAxis=!0;c.prototype.setOptions.call(this,a);this.coll="zAxis"};b.ZChartComposition=w;return b}(c);return u});D(c,"Core/Chart/Chart3D.js",[c["Core/Axis/Axis.js"],c["Core/Axis/Axis3D.js"],c["Core/Chart/Chart.js"],c["Core/Animation/Fx.js"],c["Core/Globals.js"],
c["Extensions/Math3D.js"],c["Core/Options.js"],c["Core/Utilities.js"],c["Core/Axis/ZAxis.js"]],function(c,r,t,E,d,v,n,w,u){var m=v.perspective,b=v.shapeArea3D,a=n.defaultOptions,q=w.addEvent,k=w.isArray,y=w.merge,e=w.pick,g=w.wrap,p;(function(c){function f(a){this.is3d()&&"scatter"===a.options.type&&(a.options.type="scatter3d")}function p(){if(this.chart3d&&this.is3d()){var a=this.renderer,b=this.options.chart.options3d,e=this.chart3d.get3dFrame(),c=this.plotLeft,f=this.plotLeft+this.plotWidth,g=
this.plotTop,l=this.plotTop+this.plotHeight;b=b.depth;var k=c-(e.left.visible?e.left.size:0),h=f+(e.right.visible?e.right.size:0),m=g-(e.top.visible?e.top.size:0),p=l+(e.bottom.visible?e.bottom.size:0),q=0-(e.front.visible?e.front.size:0),n=b+(e.back.visible?e.back.size:0),u=this.hasRendered?"animate":"attr";this.chart3d.frame3d=e;this.frameShapes||(this.frameShapes={bottom:a.polyhedron().add(),top:a.polyhedron().add(),left:a.polyhedron().add(),right:a.polyhedron().add(),back:a.polyhedron().add(),
front:a.polyhedron().add()});this.frameShapes.bottom[u]({"class":"highcharts-3d-frame highcharts-3d-frame-bottom",zIndex:e.bottom.frontFacing?-1E3:1E3,faces:[{fill:d.color(e.bottom.color).brighten(.1).get(),vertexes:[{x:k,y:p,z:q},{x:h,y:p,z:q},{x:h,y:p,z:n},{x:k,y:p,z:n}],enabled:e.bottom.visible},{fill:d.color(e.bottom.color).brighten(.1).get(),vertexes:[{x:c,y:l,z:b},{x:f,y:l,z:b},{x:f,y:l,z:0},{x:c,y:l,z:0}],enabled:e.bottom.visible},{fill:d.color(e.bottom.color).brighten(-.1).get(),vertexes:[{x:k,
y:p,z:q},{x:k,y:p,z:n},{x:c,y:l,z:b},{x:c,y:l,z:0}],enabled:e.bottom.visible&&!e.left.visible},{fill:d.color(e.bottom.color).brighten(-.1).get(),vertexes:[{x:h,y:p,z:n},{x:h,y:p,z:q},{x:f,y:l,z:0},{x:f,y:l,z:b}],enabled:e.bottom.visible&&!e.right.visible},{fill:d.color(e.bottom.color).get(),vertexes:[{x:h,y:p,z:q},{x:k,y:p,z:q},{x:c,y:l,z:0},{x:f,y:l,z:0}],enabled:e.bottom.visible&&!e.front.visible},{fill:d.color(e.bottom.color).get(),vertexes:[{x:k,y:p,z:n},{x:h,y:p,z:n},{x:f,y:l,z:b},{x:c,y:l,z:b}],
enabled:e.bottom.visible&&!e.back.visible}]});this.frameShapes.top[u]({"class":"highcharts-3d-frame highcharts-3d-frame-top",zIndex:e.top.frontFacing?-1E3:1E3,faces:[{fill:d.color(e.top.color).brighten(.1).get(),vertexes:[{x:k,y:m,z:n},{x:h,y:m,z:n},{x:h,y:m,z:q},{x:k,y:m,z:q}],enabled:e.top.visible},{fill:d.color(e.top.color).brighten(.1).get(),vertexes:[{x:c,y:g,z:0},{x:f,y:g,z:0},{x:f,y:g,z:b},{x:c,y:g,z:b}],enabled:e.top.visible},{fill:d.color(e.top.color).brighten(-.1).get(),vertexes:[{x:k,y:m,
z:n},{x:k,y:m,z:q},{x:c,y:g,z:0},{x:c,y:g,z:b}],enabled:e.top.visible&&!e.left.visible},{fill:d.color(e.top.color).brighten(-.1).get(),vertexes:[{x:h,y:m,z:q},{x:h,y:m,z:n},{x:f,y:g,z:b},{x:f,y:g,z:0}],enabled:e.top.visible&&!e.right.visible},{fill:d.color(e.top.color).get(),vertexes:[{x:k,y:m,z:q},{x:h,y:m,z:q},{x:f,y:g,z:0},{x:c,y:g,z:0}],enabled:e.top.visible&&!e.front.visible},{fill:d.color(e.top.color).get(),vertexes:[{x:h,y:m,z:n},{x:k,y:m,z:n},{x:c,y:g,z:b},{x:f,y:g,z:b}],enabled:e.top.visible&&
!e.back.visible}]});this.frameShapes.left[u]({"class":"highcharts-3d-frame highcharts-3d-frame-left",zIndex:e.left.frontFacing?-1E3:1E3,faces:[{fill:d.color(e.left.color).brighten(.1).get(),vertexes:[{x:k,y:p,z:q},{x:c,y:l,z:0},{x:c,y:l,z:b},{x:k,y:p,z:n}],enabled:e.left.visible&&!e.bottom.visible},{fill:d.color(e.left.color).brighten(.1).get(),vertexes:[{x:k,y:m,z:n},{x:c,y:g,z:b},{x:c,y:g,z:0},{x:k,y:m,z:q}],enabled:e.left.visible&&!e.top.visible},{fill:d.color(e.left.color).brighten(-.1).get(),
vertexes:[{x:k,y:p,z:n},{x:k,y:m,z:n},{x:k,y:m,z:q},{x:k,y:p,z:q}],enabled:e.left.visible},{fill:d.color(e.left.color).brighten(-.1).get(),vertexes:[{x:c,y:g,z:b},{x:c,y:l,z:b},{x:c,y:l,z:0},{x:c,y:g,z:0}],enabled:e.left.visible},{fill:d.color(e.left.color).get(),vertexes:[{x:k,y:p,z:q},{x:k,y:m,z:q},{x:c,y:g,z:0},{x:c,y:l,z:0}],enabled:e.left.visible&&!e.front.visible},{fill:d.color(e.left.color).get(),vertexes:[{x:k,y:m,z:n},{x:k,y:p,z:n},{x:c,y:l,z:b},{x:c,y:g,z:b}],enabled:e.left.visible&&!e.back.visible}]});
this.frameShapes.right[u]({"class":"highcharts-3d-frame highcharts-3d-frame-right",zIndex:e.right.frontFacing?-1E3:1E3,faces:[{fill:d.color(e.right.color).brighten(.1).get(),vertexes:[{x:h,y:p,z:n},{x:f,y:l,z:b},{x:f,y:l,z:0},{x:h,y:p,z:q}],enabled:e.right.visible&&!e.bottom.visible},{fill:d.color(e.right.color).brighten(.1).get(),vertexes:[{x:h,y:m,z:q},{x:f,y:g,z:0},{x:f,y:g,z:b},{x:h,y:m,z:n}],enabled:e.right.visible&&!e.top.visible},{fill:d.color(e.right.color).brighten(-.1).get(),vertexes:[{x:f,
y:g,z:0},{x:f,y:l,z:0},{x:f,y:l,z:b},{x:f,y:g,z:b}],enabled:e.right.visible},{fill:d.color(e.right.color).brighten(-.1).get(),vertexes:[{x:h,y:p,z:q},{x:h,y:m,z:q},{x:h,y:m,z:n},{x:h,y:p,z:n}],enabled:e.right.visible},{fill:d.color(e.right.color).get(),vertexes:[{x:h,y:m,z:q},{x:h,y:p,z:q},{x:f,y:l,z:0},{x:f,y:g,z:0}],enabled:e.right.visible&&!e.front.visible},{fill:d.color(e.right.color).get(),vertexes:[{x:h,y:p,z:n},{x:h,y:m,z:n},{x:f,y:g,z:b},{x:f,y:l,z:b}],enabled:e.right.visible&&!e.back.visible}]});
this.frameShapes.back[u]({"class":"highcharts-3d-frame highcharts-3d-frame-back",zIndex:e.back.frontFacing?-1E3:1E3,faces:[{fill:d.color(e.back.color).brighten(.1).get(),vertexes:[{x:h,y:p,z:n},{x:k,y:p,z:n},{x:c,y:l,z:b},{x:f,y:l,z:b}],enabled:e.back.visible&&!e.bottom.visible},{fill:d.color(e.back.color).brighten(.1).get(),vertexes:[{x:k,y:m,z:n},{x:h,y:m,z:n},{x:f,y:g,z:b},{x:c,y:g,z:b}],enabled:e.back.visible&&!e.top.visible},{fill:d.color(e.back.color).brighten(-.1).get(),vertexes:[{x:k,y:p,
z:n},{x:k,y:m,z:n},{x:c,y:g,z:b},{x:c,y:l,z:b}],enabled:e.back.visible&&!e.left.visible},{fill:d.color(e.back.color).brighten(-.1).get(),vertexes:[{x:h,y:m,z:n},{x:h,y:p,z:n},{x:f,y:l,z:b},{x:f,y:g,z:b}],enabled:e.back.visible&&!e.right.visible},{fill:d.color(e.back.color).get(),vertexes:[{x:c,y:g,z:b},{x:f,y:g,z:b},{x:f,y:l,z:b},{x:c,y:l,z:b}],enabled:e.back.visible},{fill:d.color(e.back.color).get(),vertexes:[{x:k,y:p,z:n},{x:h,y:p,z:n},{x:h,y:m,z:n},{x:k,y:m,z:n}],enabled:e.back.visible}]});this.frameShapes.front[u]({"class":"highcharts-3d-frame highcharts-3d-frame-front",
zIndex:e.front.frontFacing?-1E3:1E3,faces:[{fill:d.color(e.front.color).brighten(.1).get(),vertexes:[{x:k,y:p,z:q},{x:h,y:p,z:q},{x:f,y:l,z:0},{x:c,y:l,z:0}],enabled:e.front.visible&&!e.bottom.visible},{fill:d.color(e.front.color).brighten(.1).get(),vertexes:[{x:h,y:m,z:q},{x:k,y:m,z:q},{x:c,y:g,z:0},{x:f,y:g,z:0}],enabled:e.front.visible&&!e.top.visible},{fill:d.color(e.front.color).brighten(-.1).get(),vertexes:[{x:k,y:m,z:q},{x:k,y:p,z:q},{x:c,y:l,z:0},{x:c,y:g,z:0}],enabled:e.front.visible&&!e.left.visible},
{fill:d.color(e.front.color).brighten(-.1).get(),vertexes:[{x:h,y:p,z:q},{x:h,y:m,z:q},{x:f,y:g,z:0},{x:f,y:l,z:0}],enabled:e.front.visible&&!e.right.visible},{fill:d.color(e.front.color).get(),vertexes:[{x:f,y:g,z:0},{x:c,y:g,z:0},{x:c,y:l,z:0},{x:f,y:l,z:0}],enabled:e.front.visible},{fill:d.color(e.front.color).get(),vertexes:[{x:h,y:p,z:q},{x:k,y:p,z:q},{x:k,y:m,z:q},{x:h,y:m,z:q}],enabled:e.front.visible}]})}}function n(){this.styledMode&&(this.renderer.definition({tagName:"style",textContent:".highcharts-3d-top{filter: url(#highcharts-brighter)}\n.highcharts-3d-side{filter: url(#highcharts-darker)}\n"}),
[{name:"darker",slope:.6},{name:"brighter",slope:1.4}].forEach(function(a){this.renderer.definition({tagName:"filter",attributes:{id:"highcharts-"+a.name},children:[{tagName:"feComponentTransfer",children:[{tagName:"feFuncR",attributes:{type:"linear",slope:a.slope}},{tagName:"feFuncG",attributes:{type:"linear",slope:a.slope}},{tagName:"feFuncB",attributes:{type:"linear",slope:a.slope}}]}]})},this))}function u(){var a=this.options;this.is3d()&&(a.series||[]).forEach(function(b){"scatter"===(b.type||
a.chart.type||a.chart.defaultSeriesType)&&(b.type="scatter3d")})}function l(){var a=this.options.chart.options3d;if(this.chart3d&&this.is3d()){a&&(a.alpha=a.alpha%360+(0<=a.alpha?0:360),a.beta=a.beta%360+(0<=a.beta?0:360));var b=this.inverted,e=this.clipBox,d=this.margin;e[b?"y":"x"]=-(d[3]||0);e[b?"x":"y"]=-(d[0]||0);e[b?"height":"width"]=this.chartWidth+(d[3]||0)+(d[1]||0);e[b?"width":"height"]=this.chartHeight+(d[0]||0)+(d[2]||0);this.scale3d=1;!0===a.fitToPlot&&(this.scale3d=this.chart3d.getScale(a.depth));
this.chart3d.frame3d=this.chart3d.get3dFrame()}}function r(){this.is3d()&&(this.isDirtyBox=!0)}function h(){this.chart3d&&this.is3d()&&(this.chart3d.frame3d=this.chart3d.get3dFrame())}function v(){this.chart3d||(this.chart3d=new E(this))}function t(a){return this.is3d()||a.apply(this,[].slice.call(arguments,1))}function w(a){var b=this.series.length;if(this.is3d())for(;b--;)a=this.series[b],a.translate(),a.render();else a.call(this)}function B(a){a.apply(this,[].slice.call(arguments,1));this.is3d()&&
(this.container.className+=" highcharts-3d-chart")}var E=function(){function a(a){this.frame3d=void 0;this.chart=a}a.prototype.get3dFrame=function(){var a=this.chart,d=a.options.chart.options3d,c=d.frame,f=a.plotLeft,g=a.plotLeft+a.plotWidth,l=a.plotTop,k=a.plotTop+a.plotHeight,h=d.depth,p=function(e){e=b(e,a);return.5<e?1:-.5>e?-1:0},q=p([{x:f,y:k,z:h},{x:g,y:k,z:h},{x:g,y:k,z:0},{x:f,y:k,z:0}]),n=p([{x:f,y:l,z:0},{x:g,y:l,z:0},{x:g,y:l,z:h},{x:f,y:l,z:h}]),u=p([{x:f,y:l,z:0},{x:f,y:l,z:h},{x:f,
y:k,z:h},{x:f,y:k,z:0}]),r=p([{x:g,y:l,z:h},{x:g,y:l,z:0},{x:g,y:k,z:0},{x:g,y:k,z:h}]),v=p([{x:f,y:k,z:0},{x:g,y:k,z:0},{x:g,y:l,z:0},{x:f,y:l,z:0}]);p=p([{x:f,y:l,z:h},{x:g,y:l,z:h},{x:g,y:k,z:h},{x:f,y:k,z:h}]);var t=!1,H=!1,w=!1,y=!1;[].concat(a.xAxis,a.yAxis,a.zAxis).forEach(function(a){a&&(a.horiz?a.opposite?H=!0:t=!0:a.opposite?y=!0:w=!0)});var B=function(a,b,c){for(var d=["size","color","visible"],f={},g=0;g<d.length;g++)for(var k=d[g],l=0;l<a.length;l++)if("object"===typeof a[l]){var h=a[l][k];
if("undefined"!==typeof h&&null!==h){f[k]=h;break}}a=c;!0===f.visible||!1===f.visible?a=f.visible:"auto"===f.visible&&(a=0<b);return{size:e(f.size,1),color:e(f.color,"none"),frontFacing:0<b,visible:a}};c={axes:{},bottom:B([c.bottom,c.top,c],q,t),top:B([c.top,c.bottom,c],n,H),left:B([c.left,c.right,c.side,c],u,w),right:B([c.right,c.left,c.side,c],r,y),back:B([c.back,c.front,c],p,!0),front:B([c.front,c.back,c],v,!1)};"auto"===d.axisLabelPosition?(r=function(a,b){return a.visible!==b.visible||a.visible&&
b.visible&&a.frontFacing!==b.frontFacing},d=[],r(c.left,c.front)&&d.push({y:(l+k)/2,x:f,z:0,xDir:{x:1,y:0,z:0}}),r(c.left,c.back)&&d.push({y:(l+k)/2,x:f,z:h,xDir:{x:0,y:0,z:-1}}),r(c.right,c.front)&&d.push({y:(l+k)/2,x:g,z:0,xDir:{x:0,y:0,z:1}}),r(c.right,c.back)&&d.push({y:(l+k)/2,x:g,z:h,xDir:{x:-1,y:0,z:0}}),q=[],r(c.bottom,c.front)&&q.push({x:(f+g)/2,y:k,z:0,xDir:{x:1,y:0,z:0}}),r(c.bottom,c.back)&&q.push({x:(f+g)/2,y:k,z:h,xDir:{x:-1,y:0,z:0}}),n=[],r(c.top,c.front)&&n.push({x:(f+g)/2,y:l,z:0,
xDir:{x:1,y:0,z:0}}),r(c.top,c.back)&&n.push({x:(f+g)/2,y:l,z:h,xDir:{x:-1,y:0,z:0}}),u=[],r(c.bottom,c.left)&&u.push({z:(0+h)/2,y:k,x:f,xDir:{x:0,y:0,z:-1}}),r(c.bottom,c.right)&&u.push({z:(0+h)/2,y:k,x:g,xDir:{x:0,y:0,z:1}}),k=[],r(c.top,c.left)&&k.push({z:(0+h)/2,y:l,x:f,xDir:{x:0,y:0,z:-1}}),r(c.top,c.right)&&k.push({z:(0+h)/2,y:l,x:g,xDir:{x:0,y:0,z:1}}),f=function(b,e,c){if(0===b.length)return null;if(1===b.length)return b[0];for(var d=0,f=m(b,a,!1),g=1;g<f.length;g++)c*f[g][e]>c*f[d][e]?d=
g:c*f[g][e]===c*f[d][e]&&f[g].z<f[d].z&&(d=g);return b[d]},c.axes={y:{left:f(d,"x",-1),right:f(d,"x",1)},x:{top:f(n,"y",-1),bottom:f(q,"y",1)},z:{top:f(k,"y",-1),bottom:f(u,"y",1)}}):c.axes={y:{left:{x:f,z:0,xDir:{x:1,y:0,z:0}},right:{x:g,z:0,xDir:{x:0,y:0,z:1}}},x:{top:{y:l,z:0,xDir:{x:1,y:0,z:0}},bottom:{y:k,z:0,xDir:{x:1,y:0,z:0}}},z:{top:{x:w?g:f,y:l,xDir:w?{x:0,y:0,z:1}:{x:0,y:0,z:-1}},bottom:{x:w?g:f,y:k,xDir:w?{x:0,y:0,z:1}:{x:0,y:0,z:-1}}}};return c};a.prototype.getScale=function(a){var b=
this.chart,e=b.plotLeft,c=b.plotWidth+e,d=b.plotTop,f=b.plotHeight+d,g=e+b.plotWidth/2,k=d+b.plotHeight/2,l=Number.MAX_VALUE,h=-Number.MAX_VALUE,p=Number.MAX_VALUE,q=-Number.MAX_VALUE,n=1;var u=[{x:e,y:d,z:0},{x:e,y:d,z:a}];[0,1].forEach(function(a){u.push({x:c,y:u[a].y,z:u[a].z})});[0,1,2,3].forEach(function(a){u.push({x:u[a].x,y:f,z:u[a].z})});u=m(u,b,!1);u.forEach(function(a){l=Math.min(l,a.x);h=Math.max(h,a.x);p=Math.min(p,a.y);q=Math.max(q,a.y)});e>l&&(n=Math.min(n,1-Math.abs((e+g)/(l+g))%1));
c<h&&(n=Math.min(n,(c-g)/(h-g)));d>p&&(n=0>p?Math.min(n,(d+k)/(-p+d+k)):Math.min(n,1-(d+k)/(p+k)%1));f<q&&(n=Math.min(n,Math.abs((f-k)/(q-k))));return n};return a}();c.Composition=E;c.defaultOptions={chart:{options3d:{enabled:!1,alpha:0,beta:0,depth:100,fitToPlot:!0,viewDistance:25,axisLabelPosition:null,frame:{visible:"default",size:1,bottom:{},top:{},left:{},right:{},back:{},front:{}}}}};c.compose=function(b,e){var m=b.prototype;e=e.prototype;m.is3d=function(){return!(!this.options.chart.options3d||
!this.options.chart.options3d.enabled)};m.propsRequireDirtyBox.push("chart.options3d");m.propsRequireUpdateSeries.push("chart.options3d");e.matrixSetter=function(){if(1>this.pos&&(k(this.start)||k(this.end))){var a=this.start||[1,0,0,1,0,0],b=this.end||[1,0,0,1,0,0];var e=[];for(var c=0;6>c;c++)e.push(this.pos*b[c]+(1-this.pos)*a[c])}else e=this.end;this.elem.attr(this.prop,e,null,!0)};y(!0,a,c.defaultOptions);q(b,"init",v);q(b,"addSeries",f);q(b,"afterDrawChartBox",p);q(b,"afterGetContainer",n);
q(b,"afterInit",u);q(b,"afterSetChartSize",l);q(b,"beforeRedraw",r);q(b,"beforeRender",h);g(d.Chart.prototype,"isInsidePlot",t);g(b,"renderSeries",w);g(b,"setClassName",B)}})(p||(p={}));p.compose(t,E);u.ZChartComposition.compose(t);r.compose(c);"";return p});D(c,"Core/Series/Series3D.js",[c["Extensions/Math3D.js"],c["Core/Series/Series.js"],c["Core/Utilities.js"]],function(c,r,t){var B=this&&this.__extends||function(){var c=function(b,a){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,
b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return c(b,a)};return function(b,a){function d(){this.constructor=b}c(b,a);b.prototype=null===a?Object.create(a):(d.prototype=a.prototype,new d)}}(),d=c.perspective;c=t.addEvent;var v=t.extend,n=t.merge,w=t.pick,u=t.isNumber;t=function(c){function b(){return null!==c&&c.apply(this,arguments)||this}B(b,c);b.prototype.translate=function(){c.prototype.translate.apply(this,arguments);this.chart.is3d()&&this.translate3dPoints()};
b.prototype.translate3dPoints=function(){var a=this.options,b=this.chart,c=w(this.zAxis,b.options.zAxis[0]),m=[],e,g=[];this.zPadding=(a.stacking?u(a.stack)?a.stack:0:this.index||0)*(a.depth||0+(a.groupZPadding||1));for(e=0;e<this.data.length;e++){a=this.data[e];if(c&&c.translate){var p=c.logarithmic&&c.val2lin?c.val2lin(a.z):a.z;a.plotZ=c.translate(p);a.isInside=a.isInside?p>=c.min&&p<=c.max:!1}else a.plotZ=this.zPadding;a.axisXpos=a.plotX;a.axisYpos=a.plotY;a.axisZpos=a.plotZ;m.push({x:a.plotX,
y:a.plotY,z:a.plotZ});g.push(a.plotX||0)}this.rawPointsX=g;b=d(m,b,!0);for(e=0;e<this.data.length;e++)a=this.data[e],c=b[e],a.plotX=c.x,a.plotY=c.y,a.plotZ=c.z};b.defaultOptions=n(r.defaultOptions);return b}(r);c(r,"afterTranslate",function(){this.chart.is3d()&&this.translate3dPoints()});v(r.prototype,{translate3dPoints:t.prototype.translate3dPoints});return t});D(c,"Series/Column3D/Column3DComposition.js",[c["Series/Column/ColumnSeries.js"],c["Core/Globals.js"],c["Core/Series/Series.js"],c["Extensions/Math3D.js"],
c["Core/Series/SeriesRegistry.js"],c["Extensions/Stacking.js"],c["Core/Utilities.js"]],function(c,r,t,E,d,v,n){function w(a,b){var e=a.series,c={},d,g=1;e.forEach(function(a){d=y(a.options.stack,b?0:e.length-1-a.index);c[d]?c[d].series.push(a):(c[d]={series:[a],position:g},g++)});c.totalStacks=g+1;return c}function u(a){var b=a.apply(this,[].slice.call(arguments,1));this.chart.is3d&&this.chart.is3d()&&(b.stroke=this.options.edgeColor||b.fill,b["stroke-width"]=y(this.options.edgeWidth,1));return b}
function m(a,b,c){var e=this.chart.is3d&&this.chart.is3d();e&&(this.options.inactiveOtherPoints=!0);a.call(this,b,c);e&&(this.options.inactiveOtherPoints=!1)}function b(a){for(var b=[],e=1;e<arguments.length;e++)b[e-1]=arguments[e];return this.series.chart.is3d()?this.graphic&&"g"!==this.graphic.element.nodeName:a.apply(this,b)}var a=c.prototype,q=r.svg,k=E.perspective;r=n.addEvent;var y=n.pick;n=n.wrap;n(a,"translate",function(a){a.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&this.translate3dShapes()});
n(t.prototype,"justifyDataLabel",function(a){return arguments[2].outside3dPlot?!1:a.apply(this,[].slice.call(arguments,1))});a.translate3dPoints=function(){};a.translate3dShapes=function(){var a=this,b=a.chart,c=a.options,d=c.depth,m=(c.stacking?c.stack||0:a.index)*(d+(c.groupZPadding||1)),n=a.borderWidth%2?.5:0,q;b.inverted&&!a.yAxis.reversed&&(n*=-1);!1!==c.grouping&&(m=0);m+=c.groupZPadding||1;a.data.forEach(function(c){c.outside3dPlot=null;if(null!==c.y){var e=c.shapeArgs,f=c.tooltipPos,g;[["x",
"width"],["y","height"]].forEach(function(b){g=e[b[0]]-n;0>g&&(e[b[1]]+=e[b[0]]+n,e[b[0]]=-n,g=0);g+e[b[1]]>a[b[0]+"Axis"].len&&0!==e[b[1]]&&(e[b[1]]=a[b[0]+"Axis"].len-e[b[0]]);if(0!==e[b[1]]&&(e[b[0]]>=a[b[0]+"Axis"].len||e[b[0]]+e[b[1]]<=n)){for(var d in e)e[d]=0;c.outside3dPlot=!0}});"rect"===c.shapeType&&(c.shapeType="cuboid");e.z=m;e.depth=d;e.insidePlotArea=!0;q={x:e.x+e.width/2,y:e.y,z:m+d/2};b.inverted&&(q.x=e.height,q.y=c.clientX);c.plot3d=k([q],b,!0,!1)[0];f=k([{x:f[0],y:f[1],z:m+d/2}],
b,!0,!1)[0];c.tooltipPos=[f.x,f.y]}});a.z=m};n(a,"animate",function(a){if(this.chart.is3d()){var b=arguments[1],c=this.yAxis,e=this,d=this.yAxis.reversed;q&&(b?e.data.forEach(function(a){null!==a.y&&(a.height=a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,d||(a.shapeArgs.y=a.stackY?a.plotY+c.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)))}):(e.data.forEach(function(a){null!==a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,
e.options.animation))}),this.drawDataLabels()))}else a.apply(this,[].slice.call(arguments,1))});n(a,"plotGroup",function(a,b,c,d,k,m){"dataLabelsGroup"!==b&&this.chart.is3d()&&(this[b]&&delete this[b],m&&(this.chart.columnGroup||(this.chart.columnGroup=this.chart.renderer.g("columnGroup").add(m)),this[b]=this.chart.columnGroup,this.chart.columnGroup.attr(this.getPlotBox()),this[b].survive=!0,"group"===b||"markerGroup"===b))&&(arguments[3]="visible");return a.apply(this,Array.prototype.slice.call(arguments,
1))});n(a,"setVisible",function(a,b){var c=this;c.chart.is3d()&&c.data.forEach(function(a){a.visible=a.options.visible=b="undefined"===typeof b?!y(c.visible,a.visible):b;c.options.data[c.data.indexOf(a)]=a.options;a.graphic&&a.graphic.attr({visibility:b?"visible":"hidden"})});a.apply(this,Array.prototype.slice.call(arguments,1))});r(c,"afterInit",function(){if(this.chart.is3d()){var a=this.options,b=a.grouping,c=a.stacking,d=this.yAxis.options.reversedStacks,k=0;if("undefined"===typeof b||b){b=w(this.chart,
c);k=a.stack||0;for(c=0;c<b[k].series.length&&b[k].series[c]!==this;c++);k=10*(b.totalStacks-b[k].position)+(d?c:-c);this.xAxis.reversed||(k=10*b.totalStacks-k)}a.depth=a.depth||25;this.z=this.z||0;a.zIndex=k}});n(a,"pointAttribs",u);n(a,"setState",m);n(a.pointClass.prototype,"hasNewShapeType",b);d.seriesTypes.columnRange&&(r=d.seriesTypes.columnrange.prototype,n(r,"pointAttribs",u),n(r,"setState",m),n(r.pointClass.prototype,"hasNewShapeType",b),r.plotGroup=a.plotGroup,r.setVisible=a.setVisible);
n(t.prototype,"alignDataLabel",function(a,b,c,d,m){var e=this.chart;d.outside3dPlot=b.outside3dPlot;if(e.is3d()&&this.is("column")){var f=this.options,g=y(d.inside,!!this.options.stacking),l=e.options.chart.options3d,n=b.pointWidth/2||0;f={x:m.x+n,y:m.y,z:this.z+f.depth/2};e.inverted&&(g&&(m.width=0,f.x+=b.shapeArgs.height/2),90<=l.alpha&&270>=l.alpha&&(f.y+=b.shapeArgs.width));f=k([f],e,!0,!1)[0];m.x=f.x-n;m.y=b.outside3dPlot?-9E9:f.y}a.apply(this,[].slice.call(arguments,1))});n(v.prototype,"getStackBox",
function(a,b,c,f,m,n,q,u){var e=a.apply(this,[].slice.call(arguments,1));if(b.is3d()&&c.base){var g=+c.base.split(",")[0],h=b.series[g];g=b.options.chart.options3d;h&&h instanceof d.seriesTypes.column&&(h={x:e.x+(b.inverted?q:n/2),y:e.y,z:h.options.depth/2},b.inverted&&(e.width=0,90<=g.alpha&&270>=g.alpha&&(h.y+=n)),h=k([h],b,!0,!1)[0],e.x=h.x-n/2,e.y=h.y)}return e});"";return c});D(c,"Series/Pie3D/Pie3DPoint.js",[c["Core/Series/SeriesRegistry.js"]],function(c){var r=this&&this.__extends||function(){var c=
function(d,r){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var n in d)d.hasOwnProperty(n)&&(c[n]=d[n])};return c(d,r)};return function(d,r){function n(){this.constructor=d}c(d,r);d.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();c=c.seriesTypes.pie.prototype.pointClass;var t=c.prototype.haloPath;return function(c){function d(){var d=null!==c&&c.apply(this,arguments)||this;d.series=void 0;return d}r(d,c);d.prototype.haloPath=
function(){return this.series.chart.is3d()?[]:t.apply(this,arguments)};return d}(c)});D(c,"Series/Pie3D/Pie3DSeries.js",[c["Core/Globals.js"],c["Series/Pie3D/Pie3DPoint.js"],c["Core/Series/SeriesRegistry.js"],c["Core/Utilities.js"]],function(c,r,t,E){var d=this&&this.__extends||function(){var c=function(d,b){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return c(d,b)};return function(d,b){function a(){this.constructor=
d}c(d,b);d.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}}(),v=c.deg2rad,n=c.svg;c=E.extend;var w=E.pick;t=function(c){function m(){return null!==c&&c.apply(this,arguments)||this}d(m,c);m.prototype.addPoint=function(){c.prototype.addPoint.apply(this,arguments);this.chart.is3d()&&this.update(this.userOptions,!0)};m.prototype.animate=function(b){if(this.chart.is3d()){var a=this.options.animation;var d=this.center;var k=this.group,m=this.markerGroup;n&&(!0===a&&(a={}),b?(k.oldtranslateX=
w(k.oldtranslateX,k.translateX),k.oldtranslateY=w(k.oldtranslateY,k.translateY),d={translateX:d[0],translateY:d[1],scaleX:.001,scaleY:.001},k.attr(d),m&&(m.attrSetters=k.attrSetters,m.attr(d))):(d={translateX:k.oldtranslateX,translateY:k.oldtranslateY,scaleX:1,scaleY:1},k.animate(d,a),m&&m.animate(d,a)))}else c.prototype.animate.apply(this,arguments)};m.prototype.drawDataLabels=function(){if(this.chart.is3d()){var b=this.chart.options.chart.options3d;this.data.forEach(function(a){var c=a.shapeArgs,
d=c.r,m=(c.start+c.end)/2;a=a.labelPosition;var e=a.connectorPosition,g=-d*(1-Math.cos((c.alpha||b.alpha)*v))*Math.sin(m),n=d*(Math.cos((c.beta||b.beta)*v)-1)*Math.cos(m);[a.natural,e.breakAt,e.touchingSliceAt].forEach(function(a){a.x+=n;a.y+=g})})}c.prototype.drawDataLabels.apply(this,arguments)};m.prototype.pointAttribs=function(b){var a=c.prototype.pointAttribs.apply(this,arguments),d=this.options;this.chart.is3d()&&!this.chart.styledMode&&(a.stroke=d.edgeColor||b.color||this.color,a["stroke-width"]=
w(d.edgeWidth,1));return a};m.prototype.translate=function(){c.prototype.translate.apply(this,arguments);if(this.chart.is3d()){var b=this,a=b.options,d=a.depth||0,k=b.chart.options.chart.options3d,m=k.alpha,e=k.beta,g=a.stacking?(a.stack||0)*d:b._i*d;g+=d/2;!1!==a.grouping&&(g=0);b.data.forEach(function(c){var f=c.shapeArgs;c.shapeType="arc3d";f.z=g;f.depth=.75*d;f.alpha=m;f.beta=e;f.center=b.center;f=(f.end+f.start)/2;c.slicedTranslation={translateX:Math.round(Math.cos(f)*a.slicedOffset*Math.cos(m*
v)),translateY:Math.round(Math.sin(f)*a.slicedOffset*Math.cos(m*v))}})}};return m}(t.seriesTypes.pie);c(t.prototype,{pointClass:r});"";return t});D(c,"Series/Pie3D/Pie3DComposition.js",[c["Series/Pie3D/Pie3DPoint.js"],c["Series/Pie3D/Pie3DSeries.js"],c["Core/Series/SeriesRegistry.js"]],function(c,r,t){t.seriesTypes.pie.prototype.pointClass.prototype.haloPath=c.prototype.haloPath;t.seriesTypes.pie=r});D(c,"Series/Scatter3D/Scatter3DPoint.js",[c["Series/Scatter/ScatterSeries.js"],c["Core/Utilities.js"]],
function(c,r){var t=this&&this.__extends||function(){var c=function(d,n){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var m in d)d.hasOwnProperty(m)&&(c[m]=d[m])};return c(d,n)};return function(d,n){function r(){this.constructor=d}c(d,n);d.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=r.defined;return function(c){function d(){var d=null!==c&&c.apply(this,arguments)||this;d.options=void 0;d.series=void 0;return d}
t(d,c);d.prototype.applyOptions=function(){c.prototype.applyOptions.apply(this,arguments);B(this.z)||(this.z=0);return this};return d}(c.prototype.pointClass)});D(c,"Series/Scatter3D/Scatter3DSeries.js",[c["Extensions/Math3D.js"],c["Series/Scatter3D/Scatter3DPoint.js"],c["Series/Scatter/ScatterSeries.js"],c["Core/Series/SeriesRegistry.js"],c["Core/Utilities.js"]],function(c,r,t,E,d){var v=this&&this.__extends||function(){var c=function(d,b){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&
function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return c(d,b)};return function(d,b){function a(){this.constructor=d}c(d,b);d.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}}(),n=c.pointCameraDistance;c=d.extend;var w=d.merge;d=function(c){function d(){var b=null!==c&&c.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;return b}v(d,c);d.prototype.pointAttribs=function(b){var a=c.prototype.pointAttribs.apply(this,
arguments);this.chart.is3d()&&b&&(a.zIndex=n(b,this.chart));return a};d.defaultOptions=w(t.defaultOptions,{tooltip:{pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>z: <b>{point.z}</b><br/>"}});return d}(t);c(d.prototype,{axisTypes:["xAxis","yAxis","zAxis"],directTouch:!0,parallelArrays:["x","y","z"],pointArrayMap:["x","y","z"],pointClass:r});E.registerSeriesType("scatter3d",d);"";return d});D(c,"Series/Area3DSeries.js",[c["Extensions/Math3D.js"],c["Core/Series/SeriesRegistry.js"],c["Core/Utilities.js"]],
function(c,r,t){var B=c.perspective;c=r.seriesTypes;var d=c.line,v=t.pick;t=t.wrap;t(c.area.prototype,"getGraphPath",function(c){var n=c.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d())return n;var r=d.prototype.getGraphPath,m=this.options;var b=[];var a=[],q=v(m.connectNulls,"percent"===m.stacking),k=Math.round(this.yAxis.getThreshold(m.threshold));if(this.rawPointsX)for(var t=0;t<this.points.length;t++)b.push({x:this.rawPointsX[t],y:m.stacking?this.points[t].yBottom:k,z:this.zPadding});
m=this.chart.options.chart.options3d;b=B(b,this.chart,!0).map(function(a){return{plotX:a.x,plotY:a.y,plotZ:a.z}});this.group&&m&&m.depth&&m.beta&&(this.markerGroup&&(this.markerGroup.add(this.group),this.markerGroup.attr({translateX:0,translateY:0})),this.group.attr({zIndex:Math.max(1,270<m.beta||90>m.beta?m.depth-Math.round(this.zPadding||0):Math.round(this.zPadding||0))}));b.reversed=!0;b=r.call(this,b,!0,!0);b[0]&&"M"===b[0][0]&&(b[0]=["L",b[0][1],b[0][2]]);this.areaPath&&(b=this.areaPath.splice(0,
this.areaPath.length/2).concat(b),b.xMap=this.areaPath.xMap,this.areaPath=b,r.call(this,a,!1,q));return n})});D(c,"masters/highcharts-3d.src.js",[],function(){})});
//# sourceMappingURL=highcharts-3d.js.map