define(["exports","./GeometryOffsetAttribute-821af768","./Transforms-f15de320","./Matrix2-c6c16658","./ComponentDatatype-3d0a0aac","./when-4bbc8319","./RuntimeError-5b082e8f","./GeometryAttribute-8350368e","./GeometryAttributes-7827a6c2","./IndexDatatype-ddbc25a7"],(function(t,i,e,n,a,o,r,s,m,u){"use strict";const f=new n.Cartesian3(1,1,1),c=Math.cos,l=Math.sin;function d(t){t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT);const i=o.defaultValue(t.radii,f),e=o.defaultValue(t.innerRadii,i),r=o.defaultValue(t.minimumClock,0),s=o.defaultValue(t.maximumClock,a.CesiumMath.TWO_PI),m=o.defaultValue(t.minimumCone,0),u=o.defaultValue(t.maximumCone,a.CesiumMath.PI),c=Math.round(o.defaultValue(t.stackPartitions,10)),l=Math.round(o.defaultValue(t.slicePartitions,8)),d=Math.round(o.defaultValue(t.subdivisions,128));this._radii=n.Cartesian3.clone(i),this._innerRadii=n.Cartesian3.clone(e),this._minimumClock=r,this._maximumClock=s,this._minimumCone=m,this._maximumCone=u,this._stackPartitions=c,this._slicePartitions=l,this._subdivisions=d,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}d.packedLength=2*n.Cartesian3.packedLength+8,d.pack=function(t,i,e){return e=o.defaultValue(e,0),n.Cartesian3.pack(t._radii,i,e),e+=n.Cartesian3.packedLength,n.Cartesian3.pack(t._innerRadii,i,e),e+=n.Cartesian3.packedLength,i[e++]=t._minimumClock,i[e++]=t._maximumClock,i[e++]=t._minimumCone,i[e++]=t._maximumCone,i[e++]=t._stackPartitions,i[e++]=t._slicePartitions,i[e++]=t._subdivisions,i[e]=o.defaultValue(t._offsetAttribute,-1),i};const C=new n.Cartesian3,_=new n.Cartesian3,p={radii:C,innerRadii:_,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};d.unpack=function(t,i,e){i=o.defaultValue(i,0);const a=n.Cartesian3.unpack(t,i,C);i+=n.Cartesian3.packedLength;const r=n.Cartesian3.unpack(t,i,_);i+=n.Cartesian3.packedLength;const s=t[i++],m=t[i++],u=t[i++],f=t[i++],c=t[i++],l=t[i++],h=t[i++],y=t[i];return o.defined(e)?(e._radii=n.Cartesian3.clone(a,e._radii),e._innerRadii=n.Cartesian3.clone(r,e._innerRadii),e._minimumClock=s,e._maximumClock=m,e._minimumCone=u,e._maximumCone=f,e._stackPartitions=c,e._slicePartitions=l,e._subdivisions=h,e._offsetAttribute=-1===y?void 0:y,e):(p.minimumClock=s,p.maximumClock=m,p.minimumCone=u,p.maximumCone=f,p.stackPartitions=c,p.slicePartitions=l,p.subdivisions=h,p.offsetAttribute=-1===y?void 0:y,new d(p))},d.createGeometry=function(t){const r=t._radii;if(r.x<=0||r.y<=0||r.z<=0)return;const f=t._innerRadii;if(f.x<=0||f.y<=0||f.z<=0)return;const d=t._minimumClock,C=t._maximumClock,_=t._minimumCone,p=t._maximumCone,h=t._subdivisions,y=n.Ellipsoid.fromCartesian3(r);let b=t._slicePartitions+1,k=t._stackPartitions+1;b=Math.round(b*Math.abs(C-d)/a.CesiumMath.TWO_PI),k=Math.round(k*Math.abs(p-_)/a.CesiumMath.PI),b<2&&(b=2),k<2&&(k=2);let x=0,A=1;const P=f.x!==r.x||f.y!==r.y||f.z!==r.z;let v=!1,w=!1;P&&(A=2,_>0&&(v=!0,x+=b),p