UNPKG

highcharts

Version:
12 lines 43.9 kB
/** * Highcharts JS v13.0.1 (2026-08-17) * @module highcharts/highcharts-3d * @requires highcharts * * 3D features for Highcharts JS * * (c) 2009-2026 Highsoft AS * * A commercial license may be required depending on use, * see www.highcharts.com/license */import*as t from"./highcharts.js";let e={};e.n=t=>{let i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},e.d=(t,i)=>{if(Array.isArray(i))for(var s=0;s<i.length;){var a=i[s++],o=i[s++];e.o(t,a)?0===o&&s++:0===o?Object.defineProperty(t,a,{enumerable:!0,value:i[s++]}):Object.defineProperty(t,a,{enumerable:!0,get:o})}else for(var a in i)e.o(i,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:i[a]})},e.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let i=t.default;var s,a,o=e.n(i);let r=t.default.Color;var l=e.n(r);let{deg2rad:n}=o();function h(t,e,s,a){let o=e.options.chart.options3d,r=(0,i.pick)(a,!!s&&e.inverted),l={x:e.plotWidth/2,y:e.plotHeight/2,z:o.depth/2,vd:(0,i.pick)(o.depth,1)*(0,i.pick)(o.viewDistance,0)},h=e.scale3d||1,d=n*o.beta*(r?-1:1),c=n*o.alpha*(r?-1:1),x={cosA:Math.cos(c),cosB:Math.cos(-d),sinA:Math.sin(c),sinB:Math.sin(-d)};return s||(l.x+=e.plotLeft,l.y+=e.plotTop),t.map(function(t){var e,i,s;let a=(e=(r?t.y:t.x)-l.x,i=(r?t.x:t.y)-l.y,s=(t.z||0)-l.z,{x:x.cosB*e-x.sinB*s,y:-x.sinA*x.sinB*e+x.cosA*i-x.cosB*x.sinA*s,z:x.cosA*x.sinB*e+x.sinA*i+x.cosA*x.cosB*s}),o=p(a,l,l.vd);return o.x=o.x*h+l.x,o.y=o.y*h+l.y,o.z=a.z*h+l.z,{x:r?o.y:o.x,y:r?o.x:o.y,z:o.z}})}function p(t,e,i){let s=i>0&&i<1/0?i/(t.z+e.z+i):1;return{x:t.x*s,y:t.y*s}}function d(t){let e=0,i,s;for(i=0;i<t.length;i++)s=(i+1)%t.length,e+=t[i].x*t[s].y-t[s].x*t[i].y;return e/2}let c={perspective:h,perspective3D:p,pointCameraDistance:function(t,e){let s=e.options.chart.options3d,a={x:e.plotWidth/2,y:e.plotHeight/2,z:(0,i.pick)(s.depth,1)*(0,i.pick)(s.viewDistance,0)+s.depth};return Math.sqrt(Math.pow(a.x-(0,i.pick)(t.plotX,t.x),2)+Math.pow(a.y-(0,i.pick)(t.plotY,t.y),2)+Math.pow(a.z-(0,i.pick)(t.plotZ,t.z),2))},shapeArea:d,shapeArea3D:function(t,e,i){return d(h(t,e,i))}},{parse:x}=l(),{defaultOptions:y}=o(),{perspective:f,shapeArea3D:u}=c;!function(t){function e(t){this.is3d()&&"scatter"===t.options.type&&(t.options.type="scatter3d")}function s(){if(this.chart3d&&this.is3d()){let t=this.renderer,e=this.options.chart.options3d,i=this.chart3d.get3dFrame(),s=this.plotLeft,a=this.plotLeft+this.plotWidth,o=this.plotTop,r=this.plotTop+this.plotHeight,l=e.depth,n=s-(i.left.visible?i.left.size:0),h=a+(i.right.visible?i.right.size:0),p=o-(i.top.visible?i.top.size:0),d=r+(i.bottom.visible?i.bottom.size:0),c=0-(i.front.visible?i.front.size:0),y=l+(i.back.visible?i.back.size:0),f=this.hasRendered?"animate":"attr";this.chart3d.frame3d=i,this.frameShapes||(this.frameShapes={bottom:t.polyhedron().add(),top:t.polyhedron().add(),left:t.polyhedron().add(),right:t.polyhedron().add(),back:t.polyhedron().add(),front:t.polyhedron().add()}),this.frameShapes.bottom[f]({class:"highcharts-3d-frame highcharts-3d-frame-bottom",zIndex:i.bottom.frontFacing?-1e3:1e3,faces:[{fill:x(i.bottom.color).brighten(.1).get(),vertexes:[{x:n,y:d,z:c},{x:h,y:d,z:c},{x:h,y:d,z:y},{x:n,y:d,z:y}],enabled:i.bottom.visible},{fill:x(i.bottom.color).brighten(.1).get(),vertexes:[{x:s,y:r,z:l},{x:a,y:r,z:l},{x:a,y:r,z:0},{x:s,y:r,z:0}],enabled:i.bottom.visible},{fill:x(i.bottom.color).brighten(-.1).get(),vertexes:[{x:n,y:d,z:c},{x:n,y:d,z:y},{x:s,y:r,z:l},{x:s,y:r,z:0}],enabled:i.bottom.visible&&!i.left.visible},{fill:x(i.bottom.color).brighten(-.1).get(),vertexes:[{x:h,y:d,z:y},{x:h,y:d,z:c},{x:a,y:r,z:0},{x:a,y:r,z:l}],enabled:i.bottom.visible&&!i.right.visible},{fill:x(i.bottom.color).get(),vertexes:[{x:h,y:d,z:c},{x:n,y:d,z:c},{x:s,y:r,z:0},{x:a,y:r,z:0}],enabled:i.bottom.visible&&!i.front.visible},{fill:x(i.bottom.color).get(),vertexes:[{x:n,y:d,z:y},{x:h,y:d,z:y},{x:a,y:r,z:l},{x:s,y:r,z:l}],enabled:i.bottom.visible&&!i.back.visible}]}),this.frameShapes.top[f]({class:"highcharts-3d-frame highcharts-3d-frame-top",zIndex:i.top.frontFacing?-1e3:1e3,faces:[{fill:x(i.top.color).brighten(.1).get(),vertexes:[{x:n,y:p,z:y},{x:h,y:p,z:y},{x:h,y:p,z:c},{x:n,y:p,z:c}],enabled:i.top.visible},{fill:x(i.top.color).brighten(.1).get(),vertexes:[{x:s,y:o,z:0},{x:a,y:o,z:0},{x:a,y:o,z:l},{x:s,y:o,z:l}],enabled:i.top.visible},{fill:x(i.top.color).brighten(-.1).get(),vertexes:[{x:n,y:p,z:y},{x:n,y:p,z:c},{x:s,y:o,z:0},{x:s,y:o,z:l}],enabled:i.top.visible&&!i.left.visible},{fill:x(i.top.color).brighten(-.1).get(),vertexes:[{x:h,y:p,z:c},{x:h,y:p,z:y},{x:a,y:o,z:l},{x:a,y:o,z:0}],enabled:i.top.visible&&!i.right.visible},{fill:x(i.top.color).get(),vertexes:[{x:n,y:p,z:c},{x:h,y:p,z:c},{x:a,y:o,z:0},{x:s,y:o,z:0}],enabled:i.top.visible&&!i.front.visible},{fill:x(i.top.color).get(),vertexes:[{x:h,y:p,z:y},{x:n,y:p,z:y},{x:s,y:o,z:l},{x:a,y:o,z:l}],enabled:i.top.visible&&!i.back.visible}]}),this.frameShapes.left[f]({class:"highcharts-3d-frame highcharts-3d-frame-left",zIndex:i.left.frontFacing?-1e3:1e3,faces:[{fill:x(i.left.color).brighten(.1).get(),vertexes:[{x:n,y:d,z:c},{x:s,y:r,z:0},{x:s,y:r,z:l},{x:n,y:d,z:y}],enabled:i.left.visible&&!i.bottom.visible},{fill:x(i.left.color).brighten(.1).get(),vertexes:[{x:n,y:p,z:y},{x:s,y:o,z:l},{x:s,y:o,z:0},{x:n,y:p,z:c}],enabled:i.left.visible&&!i.top.visible},{fill:x(i.left.color).brighten(-.1).get(),vertexes:[{x:n,y:d,z:y},{x:n,y:p,z:y},{x:n,y:p,z:c},{x:n,y:d,z:c}],enabled:i.left.visible},{fill:x(i.left.color).brighten(-.1).get(),vertexes:[{x:s,y:o,z:l},{x:s,y:r,z:l},{x:s,y:r,z:0},{x:s,y:o,z:0}],enabled:i.left.visible},{fill:x(i.left.color).get(),vertexes:[{x:n,y:d,z:c},{x:n,y:p,z:c},{x:s,y:o,z:0},{x:s,y:r,z:0}],enabled:i.left.visible&&!i.front.visible},{fill:x(i.left.color).get(),vertexes:[{x:n,y:p,z:y},{x:n,y:d,z:y},{x:s,y:r,z:l},{x:s,y:o,z:l}],enabled:i.left.visible&&!i.back.visible}]}),this.frameShapes.right[f]({class:"highcharts-3d-frame highcharts-3d-frame-right",zIndex:i.right.frontFacing?-1e3:1e3,faces:[{fill:x(i.right.color).brighten(.1).get(),vertexes:[{x:h,y:d,z:y},{x:a,y:r,z:l},{x:a,y:r,z:0},{x:h,y:d,z:c}],enabled:i.right.visible&&!i.bottom.visible},{fill:x(i.right.color).brighten(.1).get(),vertexes:[{x:h,y:p,z:c},{x:a,y:o,z:0},{x:a,y:o,z:l},{x:h,y:p,z:y}],enabled:i.right.visible&&!i.top.visible},{fill:x(i.right.color).brighten(-.1).get(),vertexes:[{x:a,y:o,z:0},{x:a,y:r,z:0},{x:a,y:r,z:l},{x:a,y:o,z:l}],enabled:i.right.visible},{fill:x(i.right.color).brighten(-.1).get(),vertexes:[{x:h,y:d,z:c},{x:h,y:p,z:c},{x:h,y:p,z:y},{x:h,y:d,z:y}],enabled:i.right.visible},{fill:x(i.right.color).get(),vertexes:[{x:h,y:p,z:c},{x:h,y:d,z:c},{x:a,y:r,z:0},{x:a,y:o,z:0}],enabled:i.right.visible&&!i.front.visible},{fill:x(i.right.color).get(),vertexes:[{x:h,y:d,z:y},{x:h,y:p,z:y},{x:a,y:o,z:l},{x:a,y:r,z:l}],enabled:i.right.visible&&!i.back.visible}]}),this.frameShapes.back[f]({class:"highcharts-3d-frame highcharts-3d-frame-back",zIndex:i.back.frontFacing?-1e3:1e3,faces:[{fill:x(i.back.color).brighten(.1).get(),vertexes:[{x:h,y:d,z:y},{x:n,y:d,z:y},{x:s,y:r,z:l},{x:a,y:r,z:l}],enabled:i.back.visible&&!i.bottom.visible},{fill:x(i.back.color).brighten(.1).get(),vertexes:[{x:n,y:p,z:y},{x:h,y:p,z:y},{x:a,y:o,z:l},{x:s,y:o,z:l}],enabled:i.back.visible&&!i.top.visible},{fill:x(i.back.color).brighten(-.1).get(),vertexes:[{x:n,y:d,z:y},{x:n,y:p,z:y},{x:s,y:o,z:l},{x:s,y:r,z:l}],enabled:i.back.visible&&!i.left.visible},{fill:x(i.back.color).brighten(-.1).get(),vertexes:[{x:h,y:p,z:y},{x:h,y:d,z:y},{x:a,y:r,z:l},{x:a,y:o,z:l}],enabled:i.back.visible&&!i.right.visible},{fill:x(i.back.color).get(),vertexes:[{x:s,y:o,z:l},{x:a,y:o,z:l},{x:a,y:r,z:l},{x:s,y:r,z:l}],enabled:i.back.visible},{fill:x(i.back.color).get(),vertexes:[{x:n,y:d,z:y},{x:h,y:d,z:y},{x:h,y:p,z:y},{x:n,y:p,z:y}],enabled:i.back.visible}]}),this.frameShapes.front[f]({class:"highcharts-3d-frame highcharts-3d-frame-front",zIndex:i.front.frontFacing?-1e3:1e3,faces:[{fill:x(i.front.color).brighten(.1).get(),vertexes:[{x:n,y:d,z:c},{x:h,y:d,z:c},{x:a,y:r,z:0},{x:s,y:r,z:0}],enabled:i.front.visible&&!i.bottom.visible},{fill:x(i.front.color).brighten(.1).get(),vertexes:[{x:h,y:p,z:c},{x:n,y:p,z:c},{x:s,y:o,z:0},{x:a,y:o,z:0}],enabled:i.front.visible&&!i.top.visible},{fill:x(i.front.color).brighten(-.1).get(),vertexes:[{x:n,y:p,z:c},{x:n,y:d,z:c},{x:s,y:r,z:0},{x:s,y:o,z:0}],enabled:i.front.visible&&!i.left.visible},{fill:x(i.front.color).brighten(-.1).get(),vertexes:[{x:h,y:d,z:c},{x:h,y:p,z:c},{x:a,y:o,z:0},{x:a,y:r,z:0}],enabled:i.front.visible&&!i.right.visible},{fill:x(i.front.color).get(),vertexes:[{x:a,y:o,z:0},{x:s,y:o,z:0},{x:s,y:r,z:0},{x:a,y:r,z:0}],enabled:i.front.visible},{fill:x(i.front.color).get(),vertexes:[{x:h,y:d,z:c},{x:n,y:d,z:c},{x:n,y:p,z:c},{x:h,y:p,z:c}],enabled:i.front.visible}]})}}function a(){this.styledMode&&[{name:"darker",slope:.6},{name:"brighter",slope:1.4}].forEach(function(t){this.renderer.definition({tagName:"filter",attributes:{id:"highcharts-"+t.name},children:[{tagName:"feComponentTransfer",children:[{tagName:"feFuncR",attributes:{type:"linear",slope:t.slope}},{tagName:"feFuncG",attributes:{type:"linear",slope:t.slope}},{tagName:"feFuncB",attributes:{type:"linear",slope:t.slope}}]}]})},this)}function o(){let t=this.options;this.is3d()&&(t.series||[]).forEach(function(e){"scatter"===(e.type||t.chart.type)&&(e.type="scatter3d")})}function r(){let t=this.options.chart.options3d;if(this.chart3d&&this.is3d()){t&&(t.alpha=t.alpha%360+(t.alpha>=0?0:360),t.beta=t.beta%360+(t.beta>=0?0:360));let e=this.inverted,i=this.clipBox,s=this.margin;i[e?"y":"x"]=-(s[3]||0),i[e?"x":"y"]=-(s[0]||0),i[e?"height":"width"]=this.chartWidth+(s[3]||0)+(s[1]||0),i[e?"width":"height"]=this.chartHeight+(s[0]||0)+(s[2]||0),this.scale3d=1,!0===t.fitToPlot&&(this.scale3d=this.chart3d.getScale(t.depth)),this.chart3d.frame3d=this.chart3d.get3dFrame()}}function l(){this.is3d()&&(this.isDirtyBox=!0)}function n(){this.chart3d&&this.is3d()&&(this.chart3d.frame3d=this.chart3d.get3dFrame())}function h(){this.chart3d||(this.chart3d=new z(this))}function p(t){return this.is3d()||t.apply(this,[].slice.call(arguments,1))}function d(t){let e,i=this.series.length;if(this.is3d())for(;i--;)(e=this.series[i]).translate(),e.render();else t.call(this)}function c(t){t.apply(this,[].slice.call(arguments,1)),this.is3d()&&(this.container.className+=" highcharts-3d-chart")}t.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:{}}}}},t.compose=function(x,f){let u=x.prototype,z=f.prototype;u.is3d=function(){return!!this.options.chart.options3d?.enabled},u.propsRequireDirtyBox.push("chart.options3d"),u.propsRequireUpdateSeries.push("chart.options3d"),z.matrixSetter=function(){let t;if(this.pos<1&&((0,i.isArray)(this.start)||(0,i.isArray)(this.end))){let e=this.start||[1,0,0,1,0,0],i=this.end||[1,0,0,1,0,0];t=[];for(let s=0;s<6;s++)t.push(this.pos*i[s]+(1-this.pos)*e[s])}else t=this.end;this.elem.attr(this.prop,t,null,!0)},(0,i.merge)(!0,y,t.defaultOptions),(0,i.addEvent)(x,"init",h),(0,i.addEvent)(x,"addSeries",e),(0,i.addEvent)(x,"afterDrawChartBox",s),(0,i.addEvent)(x,"afterGetContainer",a),(0,i.addEvent)(x,"afterInit",o),(0,i.addEvent)(x,"afterSetChartSize",r),(0,i.addEvent)(x,"beforeRedraw",l),(0,i.addEvent)(x,"beforeRender",n),(0,i.wrap)(u,"isInsidePlot",p),(0,i.wrap)(u,"renderSeries",d),(0,i.wrap)(u,"setClassName",c)};class z{constructor(t){this.chart=t}get3dFrame(){let t=this.chart,e=t.options.chart.options3d,s=e.frame,a=t.plotLeft,o=t.plotLeft+t.plotWidth,r=t.plotTop,l=t.plotTop+t.plotHeight,n=e.depth,h=function(e){let i=u(e,t);return i>.5?1:i<-.5?-1:0},p=h([{x:a,y:l,z:n},{x:o,y:l,z:n},{x:o,y:l,z:0},{x:a,y:l,z:0}]),d=h([{x:a,y:r,z:0},{x:o,y:r,z:0},{x:o,y:r,z:n},{x:a,y:r,z:n}]),c=h([{x:a,y:r,z:0},{x:a,y:r,z:n},{x:a,y:l,z:n},{x:a,y:l,z:0}]),x=h([{x:o,y:r,z:n},{x:o,y:r,z:0},{x:o,y:l,z:0},{x:o,y:l,z:n}]),y=h([{x:a,y:l,z:0},{x:o,y:l,z:0},{x:o,y:r,z:0},{x:a,y:r,z:0}]),z=h([{x:a,y:r,z:n},{x:o,y:r,z:n},{x:o,y:l,z:n},{x:a,y:l,z:n}]),b=!1,g=!1,m=!1,v=!1;[].concat(t.xAxis,t.yAxis,t.zAxis).forEach(function(t){t&&(t.horiz?t.opposite?g=!0:b=!0:t.opposite?v=!0:m=!0)});let M=function(t,e,s){let a=["size","color","visible"],o={};for(let e=0;e<a.length;e++){let i=a[e];for(let e=0;e<t.length;e++)if("object"==typeof t[e]){let s=t[e][i];if(null!=s){o[i]=s;break}}}let r=s;return!0===o.visible||!1===o.visible?r=o.visible:"auto"===o.visible&&(r=e>0),{size:(0,i.pick)(o.size,1),color:(0,i.pick)(o.color,"none"),frontFacing:e>0,visible:r}},P={axes:{},bottom:M([s.bottom,s.top,s],p,b),top:M([s.top,s.bottom,s],d,g),left:M([s.left,s.right,s.side,s],c,m),right:M([s.right,s.left,s.side,s],x,v),back:M([s.back,s.front,s],z,!0),front:M([s.front,s.back,s],y,!1)};if("auto"===e.axisLabelPosition){let e=function(t,e){return t.visible!==e.visible||t.visible&&e.visible&&t.frontFacing!==e.frontFacing},i=[];e(P.left,P.front)&&i.push({y:(r+l)/2,x:a,z:0,xDir:{x:1,y:0,z:0}}),e(P.left,P.back)&&i.push({y:(r+l)/2,x:a,z:n,xDir:{x:0,y:0,z:-1}}),e(P.right,P.front)&&i.push({y:(r+l)/2,x:o,z:0,xDir:{x:0,y:0,z:1}}),e(P.right,P.back)&&i.push({y:(r+l)/2,x:o,z:n,xDir:{x:-1,y:0,z:0}});let s=[];e(P.bottom,P.front)&&s.push({x:(a+o)/2,y:l,z:0,xDir:{x:1,y:0,z:0}}),e(P.bottom,P.back)&&s.push({x:(a+o)/2,y:l,z:n,xDir:{x:-1,y:0,z:0}});let h=[];e(P.top,P.front)&&h.push({x:(a+o)/2,y:r,z:0,xDir:{x:1,y:0,z:0}}),e(P.top,P.back)&&h.push({x:(a+o)/2,y:r,z:n,xDir:{x:-1,y:0,z:0}});let p=[];e(P.bottom,P.left)&&p.push({z:(0+n)/2,y:l,x:a,xDir:{x:0,y:0,z:-1}}),e(P.bottom,P.right)&&p.push({z:(0+n)/2,y:l,x:o,xDir:{x:0,y:0,z:1}});let d=[];e(P.top,P.left)&&d.push({z:(0+n)/2,y:r,x:a,xDir:{x:0,y:0,z:-1}}),e(P.top,P.right)&&d.push({z:(0+n)/2,y:r,x:o,xDir:{x:0,y:0,z:1}});let c=function(e,i,s){if(0===e.length)return null;if(1===e.length)return e[0];let a=f(e,t,!1),o=0;for(let t=1;t<a.length;t++)s*a[t][i]>s*a[o][i]?o=t:s*a[t][i]==s*a[o][i]&&a[t].z<a[o].z&&(o=t);return e[o]};P.axes={y:{left:c(i,"x",-1),right:c(i,"x",1)},x:{top:c(h,"y",-1),bottom:c(s,"y",1)},z:{top:c(d,"y",-1),bottom:c(p,"y",1)}}}else P.axes={y:{left:{x:a,z:0,xDir:{x:1,y:0,z:0}},right:{x:o,z:0,xDir:{x:0,y:0,z:1}}},x:{top:{y:r,z:0,xDir:{x:1,y:0,z:0}},bottom:{y:l,z:0,xDir:{x:1,y:0,z:0}}},z:{top:{x:m?o:a,y:r,xDir:m?{x:0,y:0,z:1}:{x:0,y:0,z:-1}},bottom:{x:m?o:a,y:l,xDir:m?{x:0,y:0,z:1}:{x:0,y:0,z:-1}}}};return P}getScale(t){let e=this.chart,i=e.plotLeft,s=e.plotWidth+i,a=e.plotTop,o=e.plotHeight+a,r=i+e.plotWidth/2,l=a+e.plotHeight/2,n={minX:Number.MAX_VALUE,maxX:-Number.MAX_VALUE,minY:Number.MAX_VALUE,maxY:-Number.MAX_VALUE},h,p=1;return h=[{x:i,y:a,z:0},{x:i,y:a,z:t}],[0,1].forEach(function(t){h.push({x:s,y:h[t].y,z:h[t].z})}),[0,1,2,3].forEach(function(t){h.push({x:h[t].x,y:o,z:h[t].z})}),(h=f(h,e,!1)).forEach(function(t){n.minX=Math.min(n.minX,t.x),n.maxX=Math.max(n.maxX,t.x),n.minY=Math.min(n.minY,t.y),n.maxY=Math.max(n.maxY,t.y)}),i>n.minX&&(p=Math.min(p,1-Math.abs((i+r)/(n.minX+r))%1)),s<n.maxX&&(p=Math.min(p,(s-r)/(n.maxX-r))),a>n.minY&&(p=n.minY<0?Math.min(p,(a+l)/(-n.minY+a+l)):Math.min(p,1-(a+l)/(n.minY+l)%1)),o<n.maxY&&(p=Math.min(p,Math.abs((o-l)/(n.maxY-l)))),p}}t.Additions=z}(s||(s={}));let z=s,b=t.default.SeriesRegistry;var g=e.n(b);let{composed:m}=o(),{perspective:v}=c,{line:{prototype:M}}=g().seriesTypes;function P(t){let e=t.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d())return e;let i=M.getGraphPath,s=this.options,a=Math.round(this.yAxis.getThreshold(s.threshold)),o=[];if(this.rawPointsX)for(let t=0;t<this.points.length;t++)o.push({x:this.rawPointsX[t],y:s.stacking?this.points[t].yBottom:a,z:this.zPadding});let r=this.chart.options.chart.options3d;o=v(o,this.chart,!0).map(t=>({plotX:t.x,plotY:t.y,plotZ:t.z})),this.group&&r&&r.depth&&r.beta&&(this.markerGroup&&(this.markerGroup.add(this.group),this.markerGroup.attr({translateX:0,translateY:0,zIndex:0})),this.group.attr({zIndex:Math.max(1,r.beta>270||r.beta<90?r.depth-Math.round(this.zPadding||0):Math.round(this.zPadding||0))})),o.reversed=!0;let l=i.call(this,o,!0,!0);if(l[0]&&"M"===l[0][0]&&(l[0]=["L",l[0][1],l[0][2]]),this.areaPath){let t=this.areaPath.splice(0,this.areaPath.length/2).concat(l);t.xMap=this.areaPath.xMap,this.areaPath=t}return this.graphPath=e,e}let A={labels:{position3d:"offset",skew3d:!1},title:{position3d:null,skew3d:null}},{composed:k}=o();function S(t){let e=this.axis.axis3D;e&&(0,i.extend)(t.pos,e.fix3dPosition(t.pos))}function w(t){let e=this.axis.axis3D,i=t.apply(this,[].slice.call(arguments,1));if(e){let t=i[0],s=i[1];if("M"===t[0]&&"L"===s[0]){let i=[e.fix3dPosition({x:t[1],y:t[2],z:0}),e.fix3dPosition({x:s[1],y:s[2],z:0})];return this.axis.chart.renderer.toLineSegments(i)}}return i}let D=function(t){(0,i.pushUnique)(k,"Axis.Tick3D")&&((0,i.addEvent)(t,"afterGetLabelPosition",S),(0,i.wrap)(t.prototype,"getMarkPath",w))},{defaultOptions:L}=o(),{deg2rad:I}=o(),{perspective:X,perspective3D:E,shapeArea:T}=c;function Y(){let t=this.chart,e=this.options;t.is3d?.()&&"colorAxis"!==this.coll&&(this.clippable=!1,e.tickWidth=(0,i.pick)(e.tickWidth,0),e.gridLineWidth=(0,i.pick)(e.gridLineWidth,1))}function Z(t){this.chart.is3d()&&"colorAxis"!==this.coll&&t.point&&(t.point.crosshairPos=this.isXAxis?t.point.axisXpos:this.len-t.point.axisYpos)}function O(){this.axis3D||(this.axis3D=new j(this))}function F(t){return this.chart.is3d()&&"colorAxis"!==this.coll?[]:t.apply(this,[].slice.call(arguments,1))}function C(t){if(!this.chart.is3d()||"colorAxis"===this.coll)return t.apply(this,[].slice.call(arguments,1));let e=arguments,i=e[1],s=e[2],a=[],o=this.getPlotLinePath({value:i}),r=this.getPlotLinePath({value:s});if(o&&r)for(let t=0;t<o.length;t+=2){let e=o[t],i=o[t+1],s=r[t],l=r[t+1];"M"===e[0]&&"L"===i[0]&&"M"===s[0]&&"L"===l[0]&&a.push(e,i,l,["L",s[1],s[2]],["Z"])}return a}function W(t){let e=this.axis3D,i=this.chart,s=t.apply(this,[].slice.call(arguments,1));if("colorAxis"===this.coll||!i.chart3d||!i.is3d()||null===s)return s;let a=i.options.chart.options3d,o=this.isZAxis?i.plotWidth:a.depth,r=i.chart3d.frame3d,l=s[0],n=s[1],h,p=[];return"M"===l[0]&&"L"===n[0]&&(h=[e.swapZ({x:l[1],y:l[2],z:0}),e.swapZ({x:l[1],y:l[2],z:o}),e.swapZ({x:n[1],y:n[2],z:0}),e.swapZ({x:n[1],y:n[2],z:o})],this.horiz?(this.isZAxis?(r.left.visible&&p.push(h[0],h[2]),r.right.visible&&p.push(h[1],h[3])):(r.front.visible&&p.push(h[0],h[2]),r.back.visible&&p.push(h[1],h[3])),r.top.visible&&p.push(h[0],h[1]),r.bottom.visible&&p.push(h[2],h[3])):(r.front.visible&&p.push(h[0],h[2]),r.back.visible&&p.push(h[1],h[3]),r.left.visible&&p.push(h[0],h[1]),r.right.visible&&p.push(h[2],h[3])),p=X(p,this.chart,!1)),i.renderer.toLineSegments(p)}function B(t,e){let{chart:s,gridGroup:a,tickPositions:o,ticks:r}=this;if(this.categories&&s.frameShapes&&s.is3d()&&a&&e&&e.label){let t,l,n,h=a.element.childNodes[0].getBBox(),p=s.frameShapes.left.getBBox(),d=s.options.chart.options3d,c={x:s.plotWidth/2,y:s.plotHeight/2,z:d.depth/2,vd:(0,i.pick)(d.depth,1)*(0,i.pick)(d.viewDistance,0)},x=o.indexOf(e.pos),y=r[o[x-1]],f=r[o[x+1]];return y?.label?.xy&&(l=E({x:y.label.xy.x,y:y.label.xy.y,z:null},c,c.vd)),f?.label?.xy&&(n=E({x:f.label.xy.x,y:f.label.xy.y,z:null},c,c.vd)),t=E(t={x:e.label.xy.x,y:e.label.xy.y,z:null},c,c.vd),Math.abs(l?t.x-l.x:n?n.x-t.x:h.x-p.x)}return t.apply(this,[].slice.call(arguments,1))}function G(t){let e=t.apply(this,[].slice.call(arguments,1));return this.axis3D?this.axis3D.fix3dPosition(e,!0):e}class j{static compose(t,e){if(D(e),!t.keepProps.includes("axis3D")){(0,i.merge)(!0,L.xAxis,A),t.keepProps.push("axis3D"),(0,i.addEvent)(t,"init",O),(0,i.addEvent)(t,"afterSetOptions",Y),(0,i.addEvent)(t,"drawCrosshair",Z);let e=t.prototype;(0,i.wrap)(e,"getLinePath",F),(0,i.wrap)(e,"getPlotBandPath",C),(0,i.wrap)(e,"getPlotLinePath",W),(0,i.wrap)(e,"getSlotWidth",B),(0,i.wrap)(e,"getTitlePosition",G)}}constructor(t){this.axis=t}fix3dPosition(t,e){let s=this.axis,a=s.chart;if("colorAxis"===s.coll||!a.chart3d||!a.is3d())return t;let o=I*a.options.chart.options3d.alpha,r=I*a.options.chart.options3d.beta,l=(0,i.pick)(e&&s.options.title.position3d,s.options.labels.position3d),n=(0,i.pick)(e&&s.options.title.skew3d,s.options.labels.skew3d),h=a.chart3d.frame3d,p=a.plotLeft,d=a.plotWidth+p,c=a.plotTop,x=a.plotHeight+c,y=0,f=0,u,z={x:0,y:1,z:0},b=!1;if(t=s.axis3D.swapZ({x:t.x,y:t.y,z:0}),s.isZAxis)if(s.opposite){if(null===h.axes.z.top)return{};f=t.y-c,t.x=h.axes.z.top.x,t.y=h.axes.z.top.y,u=h.axes.z.top.xDir,b=!h.top.frontFacing}else{if(null===h.axes.z.bottom)return{};f=t.y-x,t.x=h.axes.z.bottom.x,t.y=h.axes.z.bottom.y,u=h.axes.z.bottom.xDir,b=!h.bottom.frontFacing}else if(s.horiz)if(s.opposite){if(null===h.axes.x.top)return{};f=t.y-c,t.y=h.axes.x.top.y,t.z=h.axes.x.top.z,u=h.axes.x.top.xDir,b=!h.top.frontFacing}else{if(null===h.axes.x.bottom)return{};f=t.y-x,t.y=h.axes.x.bottom.y,t.z=h.axes.x.bottom.z,u=h.axes.x.bottom.xDir,b=!h.bottom.frontFacing}else if(s.opposite){if(null===h.axes.y.right)return{};y=t.x-d,t.x=h.axes.y.right.x,t.z=h.axes.y.right.z,u={x:(u=h.axes.y.right.xDir).z,y:u.y,z:-u.x}}else{if(null===h.axes.y.left)return{};y=t.x-p,t.x=h.axes.y.left.x,t.z=h.axes.y.left.z,u=h.axes.y.left.xDir}if("chart"===l);else if("flap"===l)if(s.horiz){let t=Math.sin(o),e=Math.cos(o);b&&(t=-t),z={x:u.z*t,y:e,z:-u.x*t}}else u={x:Math.cos(r),y:0,z:Math.sin(r)};else if("ortho"===l)if(s.horiz){let t=Math.sin(o),e=Math.cos(o),i={x:Math.sin(r)*e,y:-t,z:-e*Math.cos(r)},s=1/Math.sqrt((z={x:u.y*i.z-u.z*i.y,y:u.z*i.x-u.x*i.z,z:u.x*i.y-u.y*i.x}).x*z.x+z.y*z.y+z.z*z.z);b&&(s=-s),z={x:s*z.x,y:s*z.y,z:s*z.z}}else u={x:Math.cos(r),y:0,z:Math.sin(r)};else s.horiz?z={x:Math.sin(r)*Math.sin(o),y:Math.cos(o),z:-Math.cos(r)*Math.sin(o)}:u={x:Math.cos(r),y:0,z:Math.sin(r)};t.x+=y*u.x+f*z.x,t.y+=y*u.y+f*z.y,t.z+=y*u.z+f*z.z;let g=X([t],s.chart)[0];if(n){0>T(X([t,{x:t.x+u.x,y:t.y+u.y,z:t.z+u.z},{x:t.x+z.x,y:t.y+z.y,z:t.z+z.z}],s.chart))&&(u={x:-u.x,y:-u.y,z:-u.z});let e=X([{x:t.x,y:t.y,z:t.z},{x:t.x+u.x,y:t.y+u.y,z:t.z+u.z},{x:t.x+z.x,y:t.y+z.y,z:t.z+z.z}],s.chart);g.matrix=[e[1].x-e[0].x,e[1].y-e[0].y,e[2].x-e[0].x,e[2].y-e[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}swapZ(t,e){let i=this.axis;if(i.isZAxis){let s=e?0:i.chart.plotLeft;return{x:s+t.z,y:t.y,z:t.x-s}}return t}}let N=t.default.Series;var R=e.n(N);let{composed:U}=o(),{perspective:V}=c;class q extends R(){static compose(t){(0,i.pushUnique)(U,"Core.Series3D")&&((0,i.addEvent)(t,"afterTranslate",function(){this.chart.is3d()&&this.translate3dPoints()}),(0,i.extend)(t.prototype,{translate3dPoints:q.prototype.translate3dPoints}))}translate3dPoints(){let t,e,s=this,a=s.options,o=s.chart,r=(0,i.pick)(s.zAxis,o.options.zAxis[0]),l=[],n=[],h=a.stacking?(0,i.isNumber)(a.stack)?a.stack:0:s.index||0;s.zPadding=h*(a.depth||0+(a.groupZPadding||1)),s.points.forEach(t=>{r?.translate?(e=r.logarithmic&&r.val2lin?r.val2lin(t.z):t.z,t.plotZ=r.translate(e),t.isInside=!!t.isInside&&e>=r.min&&e<=r.max):t.plotZ=s.zPadding,t.axisXpos=t.plotX,t.axisYpos=t.plotY,t.axisZpos=t.plotZ,l.push({x:t.plotX,y:t.plotY,z:t.plotZ}),n.push(t.plotX||0)}),s.rawPointsX=n;let p=V(l,o,!0);s.points.forEach((e,i)=>{e.plotX=(t=p[i]).x,e.plotY=t.y,e.plotZ=t.z})}}q.defaultOptions=(0,i.merge)(R().defaultOptions);let H=t.default.StackItem;var _=e.n(H);let J=t.default.SVGRenderer;var K=e.n(J);let Q=t.default.SVGElement;var $=e.n(Q);let{parse:tt}=l();class te extends $(){constructor(){super(...arguments),this.parts=["front","top","side"],this.pathType="cuboid"}initArgs(t){let e=this.renderer,i=e[this.pathType+"Path"](t),s=i.zIndexes;for(let t of this.parts){let a={class:"highcharts-3d-"+t,zIndex:s[t]||0};e.styledMode&&("top"===t?a.filter="url(#highcharts-brighter)":"side"===t&&(a.filter="url(#highcharts-darker)")),this[t]=e.path(i[t]).attr(a).add(this)}this.attr({"stroke-linejoin":"round",zIndex:s.group}),this.forcedSides=i.forcedSides}singleSetterForParts(t,e,i,s,a,o){let r={},l=[null,null,s||"attr",a,o],n=i?.zIndexes;if(i){for(let e of(n?.group&&this.attr({zIndex:n.group}),Object.keys(i)))r[e]={},r[e][t]=i[e],n&&(r[e].zIndex=i.zIndexes[e]||0);l[1]=r}else r[t]=e,l[0]=r;return this.processParts.apply(this,l)}processParts(t,e,s,a,o){for(let r of this.parts)e&&(t=(0,i.pick)(e[r],!1)),!1!==t&&this[r][s](t,a,o);return this}destroy(){return this.processParts(null,null,"destroy"),super.destroy()}attr(t,e,s,a){if("string"==typeof t&&void 0!==e){let i=t;(t={})[i]=e}return t.shapeArgs||(0,i.defined)(t.x)?this.singleSetterForParts("d",null,this.renderer[this.pathType+"Path"](t.shapeArgs||t)):super.attr(t,void 0,s,a)}animate(t,e,s){if((0,i.defined)(t.x)&&(0,i.defined)(t.y)){let i=this.renderer[this.pathType+"Path"](t),a=i.forcedSides;this.singleSetterForParts("d",null,i,"animate",e,s),this.attr({zIndex:i.zIndexes.group}),a!==this.forcedSides&&(this.forcedSides=a,this.renderer.styledMode||this.fillSetter(this.fill))}else super.animate(t,e,s);return this}fillSetter(t){return this.forcedSides=this.forcedSides||[],this.singleSetterForParts("fill",null,{front:t,top:tt(t).brighten(this.forcedSides.indexOf("top")>=0?0:.1).get(),side:tt(t).brighten(this.forcedSides.indexOf("side")>=0?0:-.1).get()}),this.color=this.fill=t,this}}te.types={base:te,cuboid:te};let{parse:ti}=l(),{charts:ts,deg2rad:ta}=o(),{perspective:to,shapeArea:tr}=c,tl=Math.cos,tn=Math.sin,th=Math.PI,tp=4*(Math.sqrt(2)-1)/3/(th/2);function td(t,e,i,s,a,o,r,l){let n=o-a,h=[];return o>a&&o-a>Math.PI/2+1e-4?h=(h=h.concat(td(t,e,i,s,a,a+Math.PI/2,r,l))).concat(td(t,e,i,s,a+Math.PI/2,o,r,l)):o<a&&a-o>Math.PI/2+1e-4?h=(h=h.concat(td(t,e,i,s,a,a-Math.PI/2,r,l))).concat(td(t,e,i,s,a-Math.PI/2,o,r,l)):[["C",t+i*Math.cos(a)-i*tp*n*Math.sin(a)+r,e+s*Math.sin(a)+s*tp*n*Math.cos(a)+l,t+i*Math.cos(o)+i*tp*n*Math.sin(o)+r,e+s*Math.sin(o)-s*tp*n*Math.cos(o)+l,t+i*Math.cos(o)+r,e+s*Math.sin(o)+l]]}!function(t){function e(t,e){let i=[];for(let e of t)i.push(["L",e.x,e.y]);return t.length&&(i[0][0]="M",e&&i.push(["Z"])),i}function s(t){let e=[],i=!0;for(let s of t)e.push(i?["M",s.x,s.y]:["L",s.x,s.y]),i=!i;return e}function a(t){let e=this,s=e.Element.prototype,a=e.createElement("path");return a.vertexes=[],a.insidePlotArea=!1,a.enabled=!0,a.attr=function(t){if("object"==typeof t&&((0,i.defined)(t.enabled)||(0,i.defined)(t.vertexes)||(0,i.defined)(t.insidePlotArea))){this.enabled=(0,i.pick)(t.enabled,this.enabled),this.vertexes=(0,i.pick)(t.vertexes,this.vertexes),this.insidePlotArea=(0,i.pick)(t.insidePlotArea,this.insidePlotArea),delete t.enabled,delete t.vertexes,delete t.insidePlotArea;let s=ts[e.chartIndex],a=to(this.vertexes,s,this.insidePlotArea),o=e.toLinePath(a,!0),r=tr(a);t.d=o,t.visibility=this.enabled&&r>0?"inherit":"hidden"}return s.attr.apply(this,arguments)},a.animate=function(t){if("object"==typeof t&&((0,i.defined)(t.enabled)||(0,i.defined)(t.vertexes)||(0,i.defined)(t.insidePlotArea))){this.enabled=(0,i.pick)(t.enabled,this.enabled),this.vertexes=(0,i.pick)(t.vertexes,this.vertexes),this.insidePlotArea=(0,i.pick)(t.insidePlotArea,this.insidePlotArea),delete t.enabled,delete t.vertexes,delete t.insidePlotArea;let s=ts[e.chartIndex],a=to(this.vertexes,s,this.insidePlotArea),o=e.toLinePath(a,!0),r=tr(a),l=this.enabled&&r>0?"visible":"hidden";t.d=o,this.attr("visibility",l)}return s.animate.apply(this,arguments)},a.attr(t)}function r(t){let e=this,s=e.Element.prototype,a=e.g(),o=a.destroy;return this.styledMode||a.attr({"stroke-linejoin":"round"}),a.faces=[],a.destroy=function(){for(let t=0;t<a.faces.length;t++)a.faces[t].destroy();return o.call(this)},a.attr=function(t,o,r,l){if("object"==typeof t&&(0,i.defined)(t.faces)){for(;a.faces.length>t.faces.length;)a.faces.pop().destroy();for(;a.faces.length<t.faces.length;)a.faces.push(e.face3d().add(a));for(let i=0;i<t.faces.length;i++)e.styledMode&&delete t.faces[i].fill,a.faces[i].attr(t.faces[i],null,r,l);delete t.faces}return s.attr.apply(this,arguments)},a.animate=function(t,i,o){if(t?.faces){for(;a.faces.length>t.faces.length;)a.faces.pop().destroy();for(;a.faces.length<t.faces.length;)a.faces.push(e.face3d().add(a));for(let e=0;e<t.faces.length;e++)a.faces[e].animate(t.faces[e],i,o);delete t.faces}return s.animate.apply(this,arguments)},a.attr(t)}function l(t,e){let i=new te.types[t](this,"g");return i.initArgs(e),i}function n(t){return this.element3d("cuboid",t)}function h(t){let e=t.x||0,i=t.y||0,s=t.z||0,a=t.height||0,o=t.width||0,r=t.depth||0,l=ts[this.chartIndex],n=l.options.chart.options3d.alpha,h=[],p,d=0,c=[{x:e,y:i,z:s},{x:e+o,y:i,z:s},{x:e+o,y:i+a,z:s},{x:e,y:i+a,z:s},{x:e,y:i+a,z:s+r},{x:e+o,y:i+a,z:s+r},{x:e+o,y:i,z:s+r},{x:e,y:i,z:s+r}];c=to(c,l,t.insidePlotArea);let x=t=>0===a&&t>1&&t<6?{x:c[t].x,y:c[t].y+10,z:c[t].z}:c[0].x===c[7].x&&t>=4?{x:c[t].x+10,y:c[t].y,z:c[t].z}:0===r&&t<2||t>5?{x:c[t].x,y:c[t].y,z:c[t].z+10}:c[t],y=t=>c[t],f=(t,e,i)=>{let s=t.map(y),a=e.map(y),o=t.map(x),r=e.map(x),l=[[],-1];return 0>tr(s)?l=[s,0]:0>tr(a)?l=[a,1]:i&&(h.push(i),l=0>tr(o)?[s,0]:0>tr(r)?[a,1]:[s,0]),l},u=(p=f([3,2,1,0],[7,6,5,4],"front"))[0],z=p[1],b=(p=f([1,6,7,0],[4,5,2,3],"top"))[0],g=p[1],m=(p=f([1,2,5,6],[0,7,4,3],"side"))[0],v=p[1];return 1===v?d+=1e6*(l.plotWidth-e):v||(d+=1e6*e),d+=10*(!g||n>=0&&n<=180||n<360&&n>357.5?l.plotHeight-i:10+i),1===z?d+=100*s:z||(d+=100*(1e3-s)),{front:this.toLinePath(u,!0),top:this.toLinePath(b,!0),side:this.toLinePath(m,!0),zIndexes:{group:Math.round(d)},forcedSides:h,isFront:z,isTop:g}}function p(t){let e=this.g(),s=this.Element.prototype,a=["alpha","beta","x","y","r","innerR","start","end","depth"];function r(t){let e,s={};for(e in t=(0,i.merge)(t))-1!==a.indexOf(e)&&(s[e]=t[e],delete t[e]);return!!Object.keys(s).length&&[s,t]}for(let s of((t=(0,i.merge)(t)).alpha=(t.alpha||0)*ta,t.beta=(t.beta||0)*ta,e.top=this.path(),e.side1=this.path(),e.side2=this.path(),e.inn=this.path(),e.out=this.path(),e.onAdd=function(){let t=e.parentGroup,i=e.attr("class");for(let s of(e.top.add(e),["out","inn","side1","side2"]))e[s].attr({class:i+" highcharts-3d-side"}).add(t)},["addClass","removeClass"]))e[s]=function(){let t=arguments;for(let i of["top","out","inn","side1","side2"])e[i][s].apply(e[i],t)};for(let i of(e.setPaths=function(t){let i=e.renderer.arc3dPath(t),s=100*i.zTop;e.attribs=t,e.top.attr({d:i.top,zIndex:i.zTop}),e.inn.attr({d:i.inn,zIndex:i.zInn}),e.out.attr({d:i.out,zIndex:i.zOut}),e.side1.attr({d:i.side1,zIndex:i.zSide1}),e.side2.attr({d:i.side2,zIndex:i.zSide2}),e.zIndex=s,e.attr({zIndex:s}),t.center&&(e.top.setRadialReference(t.center),delete t.center)},e.setPaths(t),e.fillSetter=function(t){let e=ti(t).brighten(-.1).get();return this.fill=t,this.side1.attr({fill:e}),this.side2.attr({fill:e}),this.inn.attr({fill:e}),this.out.attr({fill:e}),this.top.attr({fill:t}),this},["opacity","translateX","translateY","visibility"]))e[i+"Setter"]=function(t,i){for(let s of(e[i]=t,["out","inn","side1","side2","top"]))e[s].attr(i,t)};return e.attr=function(t){if("object"==typeof t){let s=r(t);if(s){let t=s[0];arguments[0]=s[1],void 0!==t.alpha&&(t.alpha*=ta),void 0!==t.beta&&(t.beta*=ta),(0,i.extend)(e.attribs,t),e.attribs&&e.setPaths(e.attribs)}}return s.attr.apply(e,arguments)},e.animate=function(t,a,l){let n=this.attribs,h="data-"+Math.random().toString(26).substring(2,9);delete t.center,delete t.z;let p=(0,i.animObject)((0,i.pick)(a,this.renderer.globalAnimation));if(p.duration){let s=r(t);if(e[h]=0,t[h]=1,e[h+"Setter"]=o().noop,s){let t=s[0],e=(e,s)=>n[e]+((0,i.pick)(t[e],n[e])-n[e])*s;p.step=function(t,s){s.prop===h&&s.elem&&s.elem.setPaths((0,i.merge)(n,{x:e("x",s.pos),y:e("y",s.pos),r:e("r",s.pos),innerR:e("innerR",s.pos),start:e("start",s.pos),end:e("end",s.pos),depth:e("depth",s.pos)}))}}a=p}return s.animate.call(this,t,a,l)},e.destroy=function(){return this.top.destroy(),this.out.destroy(),this.inn.destroy(),this.side1.destroy(),this.side2.destroy(),s.destroy.call(this)},e.hide=function(){this.top.hide(),this.out.hide(),this.inn.hide(),this.side1.hide(),this.side2.hide()},e.show=function(t){this.top.show(t),this.out.show(t),this.inn.show(t),this.side1.show(t),this.side2.show(t)},e}function d(t){let e=t.x||0,i=t.y||0,s=t.start||0,a=(t.end||0)-1e-5,o=t.r||0,r=t.innerR||0,l=t.depth||0,n=t.alpha||0,h=t.beta||0,p=Math.cos(s),d=Math.sin(s),c=Math.cos(a),x=Math.sin(a),y=o*Math.cos(h),f=o*Math.cos(n),u=r*Math.cos(h),z=r*Math.cos(n),b=l*Math.sin(h),g=l*Math.sin(n),m=[["M",e+y*p,i+f*d]];(m=m.concat(td(e,i,y,f,s,a,0,0))).push(["L",e+u*c,i+z*x]),(m=m.concat(td(e,i,u,z,a,s,0,0))).push(["Z"]);let v=h>0?Math.PI/2:0,M=n>0?0:Math.PI/2,P=s>-v?s:a>-v?-v:s,A=a<th-M?a:s<th-M?th-M:a,k=2*th-M,S=[["M",e+y*tl(P),i+f*tn(P)]];S=S.concat(td(e,i,y,f,P,A,0,0)),a>k&&s<k?(S.push(["L",e+y*tl(A)+b,i+f*tn(A)+g]),(S=S.concat(td(e,i,y,f,A,k,b,g))).push(["L",e+y*tl(k),i+f*tn(k)]),(S=S.concat(td(e,i,y,f,k,a,0,0))).push(["L",e+y*tl(a)+b,i+f*tn(a)+g]),(S=S.concat(td(e,i,y,f,a,k,b,g))).push(["L",e+y*tl(k),i+f*tn(k)]),S=S.concat(td(e,i,y,f,k,A,0,0))):a>th-M&&s<th-M&&(S.push(["L",e+y*Math.cos(A)+b,i+f*Math.sin(A)+g]),(S=S.concat(td(e,i,y,f,A,a,b,g))).push(["L",e+y*Math.cos(a),i+f*Math.sin(a)]),S=S.concat(td(e,i,y,f,a,A,0,0))),S.push(["L",e+y*Math.cos(A)+b,i+f*Math.sin(A)+g]),(S=S.concat(td(e,i,y,f,A,P,b,g))).push(["Z"]);let w=[["M",e+u*p,i+z*d]];(w=w.concat(td(e,i,u,z,s,a,0,0))).push(["L",e+u*Math.cos(a)+b,i+z*Math.sin(a)+g]),(w=w.concat(td(e,i,u,z,a,s,b,g))).push(["Z"]);let D=[["M",e+y*p,i+f*d],["L",e+y*p+b,i+f*d+g],["L",e+u*p+b,i+z*d+g],["L",e+u*p,i+z*d],["Z"]],L=[["M",e+y*c,i+f*x],["L",e+y*c+b,i+f*x+g],["L",e+u*c+b,i+z*x+g],["L",e+u*c,i+z*x],["Z"]],I=Math.atan2(g,-b),X=Math.abs(a+I),E=Math.abs(s+I),T=Math.abs((s+a)/2+I);function Y(t){return(t%=2*Math.PI)>Math.PI&&(t=2*Math.PI-t),t}X=Y(X),E=Y(E);let Z=1e5*(T=Y(T)),O=1e5*E,F=1e5*X;return{top:m,zTop:1e5*Math.PI+1,out:S,zOut:Math.max(Z,O,F),inn:w,zInn:Math.max(Z,O,F),side1:D,zSide1:.99*F,side2:L,zSide2:.99*O}}t.compose=function(t){let o=t.prototype;o.element3d||(0,i.extend)(o,{Element3D:te,arc3d:p,arc3dPath:d,cuboid:n,cuboidPath:h,element3d:l,face3d:a,polyhedron:r,toLinePath:e,toLineSegments:s})}}(a||(a={}));let tc=a,tx=t.default.Axis;var ty=e.n(tx);let{defaultOptions:tf}=o();function tu(t){return new tb(this,t)}function tz(){let t=this.options.zAxis=(0,i.splat)(this.options.zAxis||{});this.is3d()&&(this.zAxis=[],t.forEach(t=>{this.addZAxis(t).setScale()}))}class tb extends ty(){constructor(){super(...arguments),this.isZAxis=!0}static compose(t){let e=t.prototype;e.addZAxis||(tf.zAxis=(0,i.merge)(tf.xAxis,{offset:0,lineWidth:0}),e.addZAxis=tu,e.collectionsWithInit.zAxis=[e.addZAxis],e.collectionsWithUpdate.push("zAxis"),(0,i.addEvent)(t,"afterCreateAxes",tz))}init(t,e){this.isZAxis=!0,super.init(t,e,"zAxis")}getSeriesExtremes(){this.hasVisibleSeries=!1,this.dataMin=this.dataMax=this.ignoreMinPadding=this.ignoreMaxPadding=void 0,this.stacking&&this.stacking.buildStacks(),this.series.forEach(t=>{if(t.reserveSpace()){let e=t.options.threshold;this.hasVisibleSeries=!0,this.positiveValuesOnly&&e<=0&&(e=void 0);let i=[...t.getColumn("z",!1,!0)].map(t=>t||0);i.length&&(this.dataMin=Math.min(this.dataMin??(i[0]||0),Math.min.apply(null,i)),this.dataMax=Math.max(this.dataMax??(i[0]||0),Math.max.apply(null,i)))}})}setAxisSize(){let t=this.chart;super.setAxisSize(),this.width=this.len=t.options.chart.options3d?.depth||0,this.right=t.chartWidth-this.width-this.left}}let{composed:tg}=o(),{perspective:tm}=c;function tv(){let t=this.chart,e=this.options,s=e.depth,a=(e.stacking?e.stack||0:this.index)*(s+(e.groupZPadding||1)),o=this.borderWidth%2?.5:0,r;for(let l of(t.inverted&&!this.yAxis.reversed&&(o*=-1),!1!==e.grouping&&(a=0),a+=e.groupZPadding||1,this.points))if(l.outside3dPlot=null,null!==l.y){let e,n=(0,i.extend)({x:0,y:0,width:0,height:0},l.shapeArgs||{}),h=[["x","width"],["y","height"]],p=l.tooltipPos;for(let t of h)if((e=n[t[0]]-o)<0&&(n[t[1]]+=n[t[0]]+o,n[t[0]]=-o,e=0),e+n[t[1]]>this[t[0]+"Axis"].len&&0!==n[t[1]]&&(n[t[1]]=this[t[0]+"Axis"].len-n[t[0]]),0!==n[t[1]]&&(n[t[0]]>=this[t[0]+"Axis"].len||n[t[0]]+n[t[1]]<=o)){for(let t in n)n[t]="y"===t?-9999:0;l.outside3dPlot=!0}if("roundedRect"===l.shapeType&&(l.shapeType="cuboid"),l.shapeArgs=(0,i.extend)(n,{z:a,depth:s,insidePlotArea:!0}),r={x:n.x+n.width/2,y:n.y,z:a+s/2},t.inverted&&(r.x=n.height,r.y=l.clientX||0),l.axisXpos=r.x,l.axisYpos=r.y,l.axisZpos=r.z,l.plot3d=tm([r],t,!0,!1)[0],p){let e=tm([{x:p[0],y:p[1],z:a+s/2}],t,!0,!1)[0];l.tooltipPos=[e.x,e.y]}}this.z=a}function tM(){if(this.chart.is3d()){let s=this.options,a=s.grouping,o=s.stacking,r=this.yAxis.options.reversedStacks,l=0;if(!(void 0!==a&&!a)){var t,e;let a,n,h,p,d,c=(t=this.chart,e=o||void 0,n=t.series,h={totalStacks:0},d=1,n.forEach(function(t){h[p=(0,i.pick)(t.options.stack,e?0:n.length-1-t.index)]?h[p].series.push(t):(h[p]={series:[t],position:d},d++)}),h.totalStacks=d+1,h),x=s.stack||0;for(a=0;a<c[x].series.length&&c[x].series[a]!==this;a++);l=10*(c.totalStacks-c[x].position)+(r?a:-a),this.xAxis.reversed||(l=10*c.totalStacks-l)}s.depth=s.depth||25,this.z=this.z||0,s.zIndex=l}}function tP(t,...e){return this.series.chart.is3d()?this.graphic&&"g"!==this.graphic.element.nodeName:t.apply(this,e)}function tA(t){if(this.chart.is3d()){let t=arguments,e=t[1],i=this.yAxis,s=this.yAxis.reversed;if(e)for(let t of this.points)null!==t.y&&(t.height=t.shapeArgs.height,t.shapey=t.shapeArgs.y,t.shapeArgs.height=1,s||(t.stackY?t.shapeArgs.y=t.plotY+i.translate(t.stackY):t.shapeArgs.y=t.plotY+(t.negative?-t.height:t.height)));else{for(let t of this.points)null!==t.y&&(t.shapeArgs.height=t.height,t.shapeArgs.y=t.shapey,t.graphic&&t.graphic[t.outside3dPlot?"attr":"animate"](t.shapeArgs,this.options.animation));this.drawDataLabels()}}else t.apply(this,[].slice.call(arguments,1))}function tk(t,e,i,s,a,o){return"dataLabelsGroup"!==e&&"markerGroup"!==e&&this.chart.is3d()&&(this[e]&&delete this[e],o&&(this.chart.columnGroup||(this.chart.columnGroup=this.chart.renderer.g("columnGroup").add(o)),this[e]=this.chart.columnGroup,this.chart.columnGroup.attr(this.getPlotBox()),this[e].survive=!0,"group"===e&&(arguments[3]="visible"))),t.apply(this,Array.prototype.slice.call(arguments,1))}function tS(t){let e=t.apply(this,[].slice.call(arguments,1));return this.chart.is3d&&this.chart.is3d()&&(e.stroke=this.options.edgeColor||e.fill,e["stroke-width"]=(0,i.pick)(this.options.edgeWidth,1)),e}function tw(t,e,i){let s=this.chart.is3d&&this.chart.is3d();s&&(this.options.inactiveOtherPoints=!0),t.call(this,e,i),s&&(this.options.inactiveOtherPoints=!1)}function tD(t,e){if(this.chart.is3d())for(let t of this.points)t.visible=t.options.visible=e=void 0===e?!(0,i.pick)(this.visible,t.visible):e,this.options.data&&(this.options.data[this.data.indexOf(t)]=t.options),t.graphic?.attr({visibility:e?"visible":"hidden"});t.apply(this,Array.prototype.slice.call(arguments,1))}function tL(t){t.apply(this,[].slice.call(arguments,1)),this.chart.is3d()&&this.translate3dShapes()}function tI(t,e,s,a,o){let r=this.chart;if(a.outside3dPlot=e.outside3dPlot,r.is3d()&&this.is("column")){let t=this.options,s=(0,i.pick)(a.inside,!!this.options.stacking),l=r.options.chart.options3d,n=(e.pointWidth||0)/2,h={x:o.x+n,y:o.y,z:this.z+t.depth/2};r.inverted&&(s&&(o.width=0,h.x+=e.shapeArgs.height/2),l.alpha>=90&&l.alpha<=270&&(h.y+=e.shapeArgs.width)),o.x=(h=tm([h],r,!0,!1)[0]).x-n,o.y=e.outside3dPlot?-9e9:h.y}t.apply(this,[].slice.call(arguments,1))}function tX(t){return!arguments[2].outside3dPlot&&t.apply(this,[].slice.call(arguments,1))}function tE(t,e){let i=t.apply(this,[].slice.call(arguments,1)),s=this.axis.chart,{width:a}=e;if(s.is3d()&&this.base){let t=+this.base.split(",")[0],e=s.series[t],o=s.options.chart.options3d;if(e&&"column"===e.type){let t={x:i.x+(s.inverted?i.height:a/2),y:i.y,z:e.options.depth/2};s.inverted&&(i.width=0,o.alpha>=90&&o.alpha<=270&&(t.y+=a)),i.x=(t=tm([t],s,!0,!1)[0]).x-a/2,i.y=t.y}}return i}let{pie:{prototype:{pointClass:tT}}}=g().seriesTypes,tY=class extends tT{haloPath(){return this.series?.chart.is3d()?[]:super.haloPath.apply(this,arguments)}},{composed:tZ,deg2rad:tO}=o(),{pie:tF}=g().seriesTypes;class tC extends tF{static compose(t){(0,i.pushUnique)(tZ,"Pie3D")&&(t.types.pie=tC)}addPoint(){super.addPoint.apply(this,arguments),this.chart.is3d()&&this.update(this.userOptions,!0)}animate(t){if(this.chart.is3d()){let e=this.center,s=this.group,a=this.markerGroup,o=this.options.animation,r;!0===o&&(o={}),t?(s.oldtranslateX=(0,i.pick)(s.oldtranslateX,s.translateX),s.oldtranslateY=(0,i.pick)(s.oldtranslateY,s.translateY),r={translateX:e[0],translateY:e[1],scaleX:.001,scaleY:.001},s.attr(r),a&&(a.attrSetters=s.attrSetters,a.attr(r))):(r={translateX:s.oldtranslateX,translateY:s.oldtranslateY,scaleX:1,scaleY:1},s.animate(r,o),a&&a.animate(r,o))}else super.animate.apply(this,arguments)}getDataLabelPosition(t,e){let i=super.getDataLabelPosition(t,e);if(this.chart.is3d()){let e=this.chart.options.chart.options3d,s=t.shapeArgs,a=s.r,o=(s.alpha||e?.alpha)*tO,r=(s.beta||e?.beta)*tO,l=(s.start+s.end)/2,n=i.connectorPosition,h=-a*(1-Math.cos(o))*Math.sin(l),p=a*(Math.cos(r)-1)*Math.cos(l);for(let t of[i?.natural,n.breakAt,n.touchingSliceAt])t.x+=p,t.y+=h}return i}pointAttribs(t){let e=super.pointAttribs.apply(this,arguments),s=this.options;return this.chart.is3d()&&!this.chart.styledMode&&(e.stroke=s.edgeColor||t.color||this.color,e["stroke-width"]=(0,i.pick)(s.edgeWidth,1)),e}translate(){if(super.translate.apply(this,arguments),!this.chart.is3d())return;let t=this.options,e=t.depth||0,i=this.chart.options.chart.options3d,s=i.alpha,a=i.beta,o=t.stacking?(t.stack||0)*e:this._i*e;for(let i of(o+=e/2,!1!==t.grouping&&(o=0),this.points)){let r=i.shapeArgs;i.shapeType="arc3d",r.z=o,r.depth=.75*e,r.alpha=s,r.beta=a,r.center=this.center;let l=(r.end+r.start)/2;i.slicedTranslation={translateX:Math.round(Math.cos(l)*t.slicedOffset*Math.cos(s*tO)),translateY:Math.round(Math.sin(l)*t.slicedOffset*Math.cos(s*tO))}}}drawTracker(){if(super.drawTracker.apply(this,arguments),this.chart.is3d()){for(let t of this.points)if(t.graphic)for(let e of["out","inn","side1","side2"])t.graphic&&(t.graphic[e].element.point=t)}}}(0,i.extend)(tC.prototype,{pointClass:tY});let tW=t.default.Series.types.scatter;var tB=e.n(tW);let{pointClass:tG}=tB().prototype,tj=class extends tG{applyOptions(){return super.applyOptions.apply(this,arguments),(0,i.defined)(this.z)||(this.z=0),this}},{pointCameraDistance:tN}=c;class tR extends tB(){pointAttribs(t){let e=super.pointAttribs.apply(this,arguments);return this.chart.is3d()&&t&&(e.zIndex=tN(t,this.chart)),e}}tR.defaultOptions=(0,i.merge)(tB().defaultOptions,{tooltip:{pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>z: <b>{point.z}</b><br/>"}}),(0,i.extend)(tR.prototype,{axisTypes:["xAxis","yAxis","zAxis"],directTouch:!0,parallelArrays:["x","y","z"],pointArrayMap:["x","y","z"],pointClass:tj}),g().registerSeriesType("scatter3d",tR);let tU=o();({compose:function(t){(0,i.pushUnique)(m,"Area3DSeries")&&(0,i.wrap)(t.prototype,"getGraphPath",P)}}).compose(tU.Series.types.area),j.compose(tU.Axis,tU.Tick),z.compose(tU.Chart,tU.Fx),({compose:function(t,e){if((0,i.pushUnique)(tg,"Column3D")){let s=t.prototype,a=e.prototype,{column:o,columnRange:r}=t.types;if((0,i.wrap)(s,"alignDataLabel",tI),(0,i.wrap)(s,"justifyDataLabel",tX),(0,i.wrap)(a,"getStackBox",tE),o){let t=o.prototype,e=t.pointClass.prototype;t.translate3dPoints=()=>void 0,t.translate3dShapes=tv,(0,i.addEvent)(t,"afterInit",tM),(0,i.wrap)(e,"hasNewShapeType",tP),(0,i.wrap)(t,"animate",tA),(0,i.wrap)(t,"plotGroup",tk),(0,i.wrap)(t,"pointAttribs",tS),(0,i.wrap)(t,"setState",tw),(0,i.wrap)(t,"setVisible",tD),(0,i.wrap)(t,"translate",tL)}if(r){let t=r.prototype,e=t.pointClass.prototype;(0,i.wrap)(e,"hasNewShapeType",tP),(0,i.wrap)(t,"plotGroup",tk),(0,i.wrap)(t,"pointAttribs",tS),(0,i.wrap)(t,"setState",tw),(0,i.wrap)(t,"setVisible",tD)}}}}).compose(tU.Series,_()),tC.compose(tU.Series),q.compose(tU.Series),tc.compose(K()),tb.compose(tU.Chart);let tV=tU;export{tV as default};