define(["exports","./arrayFill-deb10550","./buildModuleUrl-d920237a","./Cartesian2-2b41fabe","./Cartographic-1d953166","./ComponentDatatype-07894a2b","./when-d186add7","./Check-2514d21d","./Rectangle-f841217d","./GeometryAttribute-95780fd1","./GeometryAttributes-9c67dd14","./GeometryOffsetAttribute-da5a1d35","./IndexDatatype-61ffec74","./Math-7f5f2992","./FeatureDetection-4281d393","./VertexFormat-769ac289"],(function(t,e,n,i,a,r,o,m,s,u,c,f,d,p,l,_){"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,A=Math.sin;function b(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,p.e.TWO_PI),s=o.u(t.minimumCone,0),u=o.u(t.maximumCone,p.e.PI),c=Math.round(o.u(t.stackPartitions,64)),f=Math.round(o.u(t.slicePartitions,64)),d=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(d),this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidGeometry"}b.packedLength=2*a.t.packedLength+_.n.packedLength+7,b.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,D={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};b.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++],d=t[e++],p=t[e++],l=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=d,n._stackPartitions=p,n._slicePartitions=l,n._offsetAttribute=-1===h?void 0:h,n):(D.minimumClock=u,D.maximumClock=c,D.minimumCone=f,D.maximumCone=d,D.stackPartitions=p,D.slicePartitions=l,D.offsetAttribute=-1===h?void 0:h,new b(D))},b.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,b=t._minimumCone,x=t._maximumCone,P=t._vertexFormat,g=t._slicePartitions+1,F=t._stackPartitions+1;(g=Math.round(g*Math.abs(k-_)/p.e.TWO_PI))<2&&(g=2),(F=Math.round(F*Math.abs(x-b)/p.e.PI))<2&&(F=2);var D,T,I=0,L=[b],O=[_];for(D=0;D0&&(G=!0,E+=g-1),x0&&D!==M-1&&0!==T&&T!==z-1&&(Y[ot]=!0),ot++;for(I=0,D=1;D=At&&D