define(["./when-4bbc8319","./Matrix2-ccd5b911","./ArcType-98ec98bf","./GeometryOffsetAttribute-1772960d","./BoundingRectangle-2b0e1a9b","./Transforms-d5c6ad6e","./RuntimeError-346a3079","./ComponentDatatype-93750d1a","./EllipsoidGeodesic-19ea7553","./EllipsoidTangentPlane-e000bae1","./GeometryAttribute-c30799b8","./GeometryInstance-5f4fe82b","./GeometryPipeline-548e76d2","./IndexDatatype-b7d979a6","./PolygonGeometryLibrary-d35c292d","./PolygonPipeline-83fb62b0","./VertexFormat-71718faa","./combine-83860057","./WebGLConstants-1c8239cc","./AxisAlignedBoundingBox-883f9c89","./IntersectionTests-4d6f5c54","./Plane-18bb00f8","./AttributeCompression-1f045b73","./EncodedCartesian3-08b8d980","./arrayRemoveDuplicates-18786327","./EllipsoidRhumbLine-aa9e6266","./GeometryAttributes-7827a6c2"],function(z,W,c,Y,e,U,t,j,m,A,Q,E,G,O,V,F,f,r,o,a,i,n,s,l,u,p,y){"use strict";var q=new W.Cartographic,K=new W.Cartographic;var D=new e.BoundingRectangle,Z=new W.Cartesian3,J=new W.Cartesian3,X=new W.Cartesian3,$=new W.Cartesian3,ee=new W.Cartesian3,te=new W.Cartesian3,re=new W.Cartesian3,oe=new W.Cartesian3,ae=new W.Cartesian3,ie=new W.Cartesian2,ne=new W.Cartesian2,se=new W.Cartesian3,le=new U.Quaternion,ue=new W.Matrix3,pe=new W.Matrix3;function L(e){var t,r=e.vertexFormat,o=e.geometry,a=e.shadowVolume,i=o.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||a){var p=e.boundingRectangle,c=e.tangentPlane,m=e.ellipsoid,y=e.stRotation,g=e.perPositionHeight,d=ie;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?o.attributes.normal.values:new Float32Array(n));var b,_=r.tangent?new Float32Array(n):void 0,v=r.bitangent?new Float32Array(n):void 0,P=a?new Float32Array(n):void 0,x=0,w=0,C=J,T=X,I=$,A=!0,E=ue,G=pe;G=0!==y?(b=U.Quaternion.fromAxisAngle(c._plane.normal,y,le),E=W.Matrix3.fromQuaternion(b,E),b=U.Quaternion.fromAxisAngle(c._plane.normal,-y,le),W.Matrix3.fromQuaternion(b,G)):(E=W.Matrix3.clone(W.Matrix3.IDENTITY,E),W.Matrix3.clone(W.Matrix3.IDENTITY,G));var O=0,V=0;l&&u&&(O=n/2,V=n/3,n/=2);for(var F=0;Fh.eastOverIDL-h.westOverIDL&&(a.west=h.westOverIDL,a.east=h.eastOverIDL,a.east>j.CesiumMath.PI&&(a.east=a.east-j.CesiumMath.TWO_PI),a.west>j.CesiumMath.PI&&(a.west=a.west-j.CesiumMath.TWO_PI)),a}var v=new W.Cartographic;function P(e,t,r,o){for(var a=e.surfaceDistance,i=Math.ceil(a*t),n=0