define(["./when-cbf8cd21","./Check-35e1a91d","./Math-e66fad2a","./Rectangle-53325d53","./WebGLConstants-95ceb4e9","./PixelFormat-d198afce","./Transforms-00c25a19","./RuntimeError-f4c64df1","./ComponentDatatype-7ee14e67","./GeometryAttribute-0b3418e6","./GeometryAttributes-90846c5f","./AttributeCompression-fd688b33","./GeometryPipeline-eeba9dc9","./EncodedCartesian3-35776b5f","./IndexDatatype-66caba23","./IntersectionTests-fdc68d04","./Plane-353c5ea0","./GeometryOffsetAttribute-84f7eff3","./VertexFormat-cc24f342","./GeometryInstance-5e3224ad","./arrayRemoveDuplicates-b817241d","./BoundingRectangle-1ba4d0fb","./EllipsoidTangentPlane-c89e3523","./ArcType-2b58731c","./EllipsoidRhumbLine-59f604d0","./PolygonPipeline-ae1ebf63","./PolygonGeometryLibrary-5e083c62","./EllipsoidGeodesic-f0048131"],function(Y,e,U,j,t,r,Q,a,q,K,o,i,D,n,L,s,l,Z,b,N,u,c,H,p,m,R,M,y){"use strict";var J=new j.Cartographic,X=new j.Cartographic;var S=new c.BoundingRectangle,$=new j.Cartesian3,ee=new j.Cartesian3,te=new j.Cartesian3,re=new j.Cartesian3,ae=new j.Cartesian3,oe=new j.Cartesian3,ie=new j.Cartesian3,ne=new j.Cartesian3,se=new j.Cartesian3,le=new j.Cartesian2,ue=new j.Cartesian2,ce=new j.Cartesian3,pe=new Q.Quaternion,me=new Q.Matrix3,ye=new Q.Matrix3;function B(e){var t,r,a,o=e.vertexFormat,i=e.geometry,n=e.shadowVolume,s=i.attributes.position.values,l=s.length,u=e.wall,c=e.top||u,p=e.bottom||u;if(o.st||o.normal||o.tangent||o.bitangent||n){var m=e.boundingRectangle,y=e.tangentPlane,g=e.ellipsoid,d=e.stRotation,h=e.perPositionHeight,f=le;f.x=m.x,f.y=m.y;var b,v=o.st?new Float32Array(l/3*2):void 0;o.normal&&(b=h&&c&&!u?i.attributes.normal.values:new Float32Array(l));var _,P=o.tangent?new Float32Array(l):void 0,C=o.bitangent?new Float32Array(l):void 0,w=n?new Float32Array(l):void 0,x=0,T=0,I=ee,A=te,E=re,G=!0,O=me,V=ye;V=0!==d?(_=Q.Quaternion.fromAxisAngle(y._plane.normal,d,pe),O=Q.Matrix3.fromQuaternion(_,O),_=Q.Quaternion.fromAxisAngle(y._plane.normal,-d,pe),Q.Matrix3.fromQuaternion(_,V)):(O=Q.Matrix3.clone(Q.Matrix3.IDENTITY,O),Q.Matrix3.clone(Q.Matrix3.IDENTITY,V));var F=0,D=0;c&&p&&(F=l/2,D=l/3,l/=2);for(var L=0;Lh.eastOverIDL-h.westOverIDL&&(o.west=h.westOverIDL,o.east=h.eastOverIDL,o.east>U.CesiumMath.PI&&(o.east=o.east-U.CesiumMath.TWO_PI),o.west>U.CesiumMath.PI&&(o.west=o.west-U.CesiumMath.TWO_PI)),o}var _=new j.Cartographic;function P(e,t,r,a){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=0