define(["exports","./arrayFill-0358accf","./buildModuleUrl-3d15f25c","./Cartesian2-6033fa5d","./Cartographic-67e73ef9","./ComponentDatatype-81047f82","./when-92c6cf3c","./Check-52a7d806","./Rectangle-bab7abf0","./GeometryAttribute-ef657318","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-4c0e98b8","./Math-92c3b5f7","./PrimitiveType-cdfe443e","./VertexFormat-f496a3f1"],(function(t,e,n,i,a,r,o,m,s,u,c,f,p,l,d,_){"use strict";var h=new a.t,v=new a.t,y=new a.t,w=new a.t,k=new a.t(1,1,1),C=Math.cos,b=Math.sin;function A(t){t=o.u(t,o.u.EMPTY_OBJECT);var e=o.u(t.radii,k),n=o.u(t.innerRadii,e),i=o.u(t.minimumClock,0),r=o.u(t.maximumClock,l.e.TWO_PI),s=o.u(t.minimumCone,0),u=o.u(t.maximumCone,l.e.PI),c=Math.round(o.u(t.stackPartitions,64)),f=Math.round(o.u(t.slicePartitions,64)),p=o.u(t.vertexFormat,_.n.DEFAULT);if(f<3)throw new m.t("options.slicePartitions cannot be less than three.");if(c<3)throw new m.t("options.stackPartitions cannot be less than three.");this._radii=a.t.clone(e),this._innerRadii=a.t.clone(n),this._minimumClock=i,this._maximumClock=r,this._minimumCone=s,this._maximumCone=u,this._stackPartitions=c,this._slicePartitions=f,this._vertexFormat=_.n.clone(p),this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidGeometry"}A.packedLength=2*a.t.packedLength+_.n.packedLength+7,A.pack=function(t,e,n){if(!o.e(t))throw new m.t("value is required");if(!o.e(e))throw new m.t("array is required");return n=o.u(n,0),a.t.pack(t._radii,e,n),n+=a.t.packedLength,a.t.pack(t._innerRadii,e,n),n+=a.t.packedLength,_.n.pack(t._vertexFormat,e,n),n+=_.n.packedLength,e[n++]=t._minimumClock,e[n++]=t._maximumClock,e[n++]=t._minimumCone,e[n++]=t._maximumCone,e[n++]=t._stackPartitions,e[n++]=t._slicePartitions,e[n]=o.u(t._offsetAttribute,-1),e};var x,P=new a.t,g=new a.t,F=new _.n,T={radii:P,innerRadii:g,vertexFormat:F,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};A.unpack=function(t,e,n){if(!o.e(t))throw new m.t("array is required");e=o.u(e,0);var i=a.t.unpack(t,e,P);e+=a.t.packedLength;var r=a.t.unpack(t,e,g);e+=a.t.packedLength;var s=_.n.unpack(t,e,F);e+=_.n.packedLength;var u=t[e++],c=t[e++],f=t[e++],p=t[e++],l=t[e++],d=t[e++],h=t[e];return o.e(n)?(n._radii=a.t.clone(i,n._radii),n._innerRadii=a.t.clone(r,n._innerRadii),n._vertexFormat=_.n.clone(s,n._vertexFormat),n._minimumClock=u,n._maximumClock=c,n._minimumCone=f,n._maximumCone=p,n._stackPartitions=l,n._slicePartitions=d,n._offsetAttribute=-1===h?void 0:h,n):(T.minimumClock=u,T.maximumClock=c,T.minimumCone=f,T.maximumCone=p,T.stackPartitions=l,T.slicePartitions=d,T.offsetAttribute=-1===h?void 0:h,new A(T))},A.createGeometry=function(t){var i=t._radii;if(!(i.x<=0||i.y<=0||i.z<=0)){var m=t._innerRadii;if(!(m.x<=0||m.y<=0||m.z<=0)){var _=t._minimumClock,k=t._maximumClock,A=t._minimumCone,x=t._maximumCone,P=t._vertexFormat,g=t._slicePartitions+1,F=t._stackPartitions+1;(g=Math.round(g*Math.abs(k-_)/l.e.TWO_PI))<2&&(g=2),(F=Math.round(F*Math.abs(x-A)/l.e.PI))<2&&(F=2);var T,D,I=0,L=[A],O=[_];for(T=0;T0&&(G=!0,E+=g-1),x0&&T!==M-1&&0!==D&&D!==z-1&&(Y[ot]=!0),ot++;for(I=0,T=1;T=bt&&T