define(["./when-54335d57","./Cartesian2-8646c5a1","./ArcType-2b58731c","./GeometryOffsetAttribute-718fa138","./BoundingRectangle-07202124","./Transforms-79117a7b","./Check-24483042","./ComponentDatatype-1a100acd","./EllipsoidGeodesic-cc216670","./EllipsoidTangentPlane-325a8e68","./GeometryAttribute-374f805d","./GeometryInstance-6aa9010a","./GeometryPipeline-571ff4c9","./IndexDatatype-82ceea78","./Math-d6182036","./PolygonGeometryLibrary-2a7648d9","./PolygonPipeline-97a7160d","./VertexFormat-81ec7207","./RuntimeError-88a32665","./WebGLConstants-95ceb4e9","./IntersectionTests-5394f658","./Plane-13ae4b1b","./AttributeCompression-10c27d9c","./EncodedCartesian3-bf827957","./arrayRemoveDuplicates-3fea1e5f","./EllipsoidRhumbLine-2b7999f3","./GeometryAttributes-caa08d6c"],function(z,W,c,Y,e,U,t,j,y,A,Q,E,G,O,q,V,F,f,r,a,o,i,n,s,l,u,p){"use strict";var K=new W.Cartographic,Z=new W.Cartographic;var D=new e.BoundingRectangle,J=new W.Cartesian3,X=new W.Cartesian3,$=new W.Cartesian3,ee=new W.Cartesian3,te=new W.Cartesian3,re=new W.Cartesian3,ae=new W.Cartesian3,oe=new W.Cartesian3,ie=new W.Cartesian3,ne=new W.Cartesian2,se=new W.Cartesian2,le=new W.Cartesian3,ue=new U.Quaternion,pe=new U.Matrix3,ce=new U.Matrix3;function L(e){var t,r=e.vertexFormat,a=e.geometry,o=e.shadowVolume,i=a.attributes.position.values,n=i.length,s=e.wall,l=e.top||s,u=e.bottom||s;if(r.st||r.normal||r.tangent||r.bitangent||o){var p=e.boundingRectangle,c=e.tangentPlane,y=e.ellipsoid,m=e.stRotation,g=e.perPositionHeight,d=ne;d.x=p.x,d.y=p.y;var h,f=r.st?new Float32Array(n/3*2):void 0;r.normal&&(h=g&&l&&!s?a.attributes.normal.values:new Float32Array(n));var b,_=r.tangent?new Float32Array(n):void 0,v=r.bitangent?new Float32Array(n):void 0,P=o?new Float32Array(n):void 0,C=0,w=0,x=X,T=$,I=ee,A=!0,E=pe,G=ce;G=0!==m?(b=U.Quaternion.fromAxisAngle(c._plane.normal,m,ue),E=U.Matrix3.fromQuaternion(b,E),b=U.Quaternion.fromAxisAngle(c._plane.normal,-m,ue),U.Matrix3.fromQuaternion(b,G)):(E=U.Matrix3.clone(U.Matrix3.IDENTITY,E),U.Matrix3.clone(U.Matrix3.IDENTITY,G));var O=0,V=0;l&&u&&(O=n/2,V=n/3,n/=2);for(var F=0;Fd.eastOverIDL-d.westOverIDL&&(o.west=d.westOverIDL,o.east=d.eastOverIDL,o.east>q.CesiumMath.PI&&(o.east=o.east-q.CesiumMath.TWO_PI),o.west>q.CesiumMath.PI&&(o.west=o.west-q.CesiumMath.TWO_PI)),o}var _=new W.Cartographic;function v(e,t,r,a){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=0