define(["./when-b60132fc","./Cartesian2-47311507","./ArcType-29cf2197","./arrayRemoveDuplicates-d2f048c5","./BoundingSphere-561b54d0","./Cartographic-3309dd0d","./Color-5008547b","./ComponentDatatype-c140a87d","./Check-7b2a090c","./buildModuleUrl-3addfe33","./GeometryAttribute-3a42bbdc","./GeometryAttributes-252e9929","./IndexDatatype-8a5eead4","./Math-119be1a3","./PolylinePipeline-971d8853","./PrimitiveType-39acab88","./VertexFormat-6446fca0","./Cartesian4-3ca25aab","./RuntimeError-4a5c8994","./FeatureDetection-c3b71206","./WebGLConstants-4ae0db90","./Transforms-cb0006b0","./EllipsoidGeodesic-0f19ac62","./EllipsoidRhumbLine-ed1a6bf4","./IntersectionTests-0c6d0a14","./Plane-097b3a8f"],(function(e,t,r,a,o,i,n,l,s,p,d,c,u,y,m,f,h,v,C,_,b,A,g,w,E,P){"use strict";varT=[];functionx(e,t,r,a,o){vari,l=T;l.length=o;vars=r.red,p=r.green,d=r.blue,c=r.alpha,u=a.red,y=a.green,m=a.blue,f=a.alpha;if(n.Color.equals(r,a)){for(i=0;i<o;i++)l[i]=n.Color.clone(r);returnl}varh=(u-s)/o,v=(y-p)/o,C=(m-d)/o,_=(f-c)/o;for(i=0;i<o;i++)l[i]=newn.Color(s+i*h,p+i*v,d+i*C,c+i*_);returnl}functionD(a){varo,l,s=(a=e.defaultValue(a,e.defaultValue.EMPTY_OBJECT)).positions,d=a.colors,c=e.defaultValue(a.width,1),u=e.defaultValue(a.hMax,-1),m=e.defaultValue(a.colorsPerVertex,!1);this._positions=s,this._colors=d,this._width=c,this._hMax=u,this._colorsPerVertex=m,this._dist=a.dist,this._period=a.period,this._vertexFormat=h.VertexFormat.clone(e.defaultValue(a.vertexFormat,h.VertexFormat.DEFAULT)),this._followSurface=e.defaultValue(a.followSurface,!0),e.defined(a.followSurface)&&(o="PolylineGeometry.followSurface",l="PolylineGeometry.followSurface is deprecated and will be removed in Cesium 1.55. Use PolylineGeometry.arcType instead.",p.oneTimeWarning(o,l),a.arcType=a.followSurface?r.ArcType.GEODESIC:r.ArcType.NONE),this._arcType=e.defaultValue(a.arcType,r.ArcType.GEODESIC),this._followSurface=this._arcType!==r.ArcType.NONE,this._granularity=e.defaultValue(a.granularity,y.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84)),this._workerName="createPolylineGeometry";varf=1+s.length*i.Cartesian3.packedLength;f+=e.defined(d)?1+d.length*n.Color.packedLength:1,this.packedLength=f+t.Ellipsoid.packedLength+h.VertexFormat.packedLength+4+2}D.pack=function(r,a,o){varl;o=e.defaultValue(o,0);vars=r._positions,p=s.length;for(a[o++]=p,l=0;l<p;++l,o+=i.Cartesian3.packedLength)i.Cartesian3.pack(s[l],a,o);vard=r._colors;for(p=e.defined(d)?d.length:0,a[o++]=p,l=0;l<p;++l,o+=n.Color.packedLength)n.Color.pack(d[l],a,o);returnt.Ellipsoid.pack(r._ellipsoid,a,o),o+=t.Ellipsoid.packedLength,h.VertexFormat.pack(r._vertexFormat,a,o),o+=h.VertexFormat.packedLength,a[o++]=r._width,a[o++]=r._colorsPerVertex?1:0,a[o++]=r._arcType,a[o++]=r._granularity,a[o++]=r._hMax,a[o++]=r._dist,a[o]=r._period,a};vark=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),G=newh.VertexFormat,V={positions:void0,colors:void0,ellipsoid:k,vertexFormat:G,width:void0,colorsPerVertex:void0,arcType:void0,granularity:void0};D.unpack=function(r,a,o){varl;a=e.defaultValue(a,0);vars=r[a++],p=newArray(s);for(l=0;l<s;++l,a+=i.Cartesian3.packedLength)p[l]=i.Cartesian3.unpack(r,a);vard=(s=r[a++])>0?newArray(s):void0;for(l=0;l<s;++l,a+=n.Color.packedLength)d[l]=n.Color.unpack(r,a);varc=t.Ellipsoid.unpack(r,a,k);a+=t.Ellipsoid.packedLength;varu=h.VertexFormat.unpack(r,a,G);a+=h.VertexFormat.packedLength;vary=r[a++],m=1===r[a++],f=r[a++],v=r[a++],C=r[a++],_=1==r[a++],b=r[a];returne.defined(o)?(o._positions=p,o._colors=d,o._ellipsoid=t.Ellipsoid.clone(c,o._ellipsoid),o._vertexFormat=h.VertexFormat.clone(u,o._vertexFormat),o._width=y,o._colorsPerVertex=m,o._arcType=f,o._granularity=v,o._hMax=C,o._dist=_,o._period=b,o):(V.positions=p,V.colors=d,V.width=y,V.colorsPerVertex=m,V.arcType=f,V.granularity=v,V.hMax=C,V.dist=_,V.period=b,newD(V))};varF=newi.Cartesian3,L=newi.Cartesian3,S=newi.Cartesian3,O=newi.Cartesian3;returnD.createGeometry=function(t){vars,p,h,v=t._width,C=t._hMax,_=t._vertexFormat,b=t._colors,A=t._colorsPerVertex,g=t._arcType,