define(["./when-b60132fc","./Cartesian2-47311507","./arrayFill-4513d7ad","./BoundingSphere-561b54d0","./Cartographic-3309dd0d","./Check-7b2a090c","./ComponentDatatype-c140a87d","./GeometryAttribute-3a42bbdc","./GeometryAttributes-252e9929","./GeometryInstance-41780fb6","./GeometryOffsetAttribute-fbeb6f1a","./GeometryPipeline-e1b82a4e","./IndexDatatype-8a5eead4","./Math-119be1a3","./PolygonPipeline-f49953b9","./PrimitiveType-39acab88","./Transforms-cb0006b0","./RectangleGeometryLibrary-8761458c","./VertexFormat-6446fca0","./Cartesian4-3ca25aab","./RuntimeError-4a5c8994","./WebGLConstants-4ae0db90","./AttributeCompression-90851096","./EncodedCartesian3-f1396b05","./IntersectionTests-0c6d0a14","./Plane-097b3a8f","./earcut-2.2.1-20c8012f","./EllipsoidRhumbLine-ed1a6bf4","./buildModuleUrl-3addfe33","./FeatureDetection-c3b71206"],(function(t,e,a,r,n,i,o,s,l,u,c,m,d,p,g,y,f,h,b,v,_,A,x,w,C,R,F,E,G,P){"use strict";var V=new n.Cartesian3,L=new n.Cartesian3,D=new n.Cartesian3,M=new n.Cartesian3,T=new e.Rectangle,O=new e.Cartesian2,N=new r.BoundingSphere,S=new r.BoundingSphere;function I(t,e){var a=new s.Geometry({attributes:new l.GeometryAttributes,primitiveType:y.PrimitiveType.TRIANGLES});return a.attributes.position=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(a.attributes.normal=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(a.attributes.tangent=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(a.attributes.bitangent=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),a}var k=new n.Cartesian3,H=new n.Cartesian3;function z(t,e){var a=t._vertexFormat,i=t._ellipsoid,l=e.height,u=e.width,c=e.northCap,m=e.southCap,p=0,g=l,y=l,f=0;c&&(p=1,y-=1,f+=1),m&&(g-=1,y-=1,f+=1),f+=u*y;for(var b=a.position?new Float64Array(3*f):void 0,v=a.st?new Float32Array(2*f):void 0,_=0,A=0,x=V,w=O,C=Number.MAX_VALUE,R=Number.MAX_VALUE,F=-Number.MAX_VALUE,E=-Number.MAX_VALUE,G=p;G1||E>1))for(var T=0;T0;i-=x)dt=B(dt,bt,ht=3*i,R,P),bt+=6,f.st&&(yt=U(yt,vt,2*i,T),vt+=4),l&&(_t+=3,pt[_t++]=O[ht],pt[_t++]=O[ht+1],pt[_t++]=O[ht+2]),ft&&(gt[At++]=1,At+=1);if(nt){var Ct=xt;for(ht=3*Ct,i=0;i<2;i++)dt=B(dt,bt,ht,R,P),bt+=6,f.st&&(yt=U(yt,vt,2*Ct,T),vt+=4),l&&(_t+=3,pt[_t++]=O[ht],pt[_t++]=O[ht+1],pt[_t++]=O[ht+2]),ft&&(gt[At++]=1,At+=1)}else for(i=x-1;i>=0;i--)dt=B(dt,bt,ht=3*i,R,P),bt+=6,f.st&&(yt=U(yt,vt,2*i,T),vt+=4),l&&(_t+=3,pt[_t++]=O[ht],pt[_t++]=O[ht+1],pt[_t++]=O[ht+2]),ft&&(gt[At++]=1,At+=1);var Rt=function(t,e,a){var r=t.length,i=e.normal?new Float32Array(r):void 0,o=e.tangent?new Float32Array(r):void 0,s=e.bitangent?new Float32Array(r):void 0,l=0,u=0,c=0,m=!0,d=M,g=D,y=L;if(e.normal||e.tangent||e.bitangent)for(var f=0;f