define(["./when-4bbc8319","./Matrix2-9aa31791","./ArcType-98ec98bf","./GeometryOffsetAttribute-1772960d","./BoundingRectangle-218a9c7b","./Transforms-d13cc04e","./RuntimeError-346a3079","./ComponentDatatype-93750d1a","./EllipsoidGeodesic-dd8f2afb","./EllipsoidTangentPlane-eecce7e8","./GeometryAttribute-43536dc0","./GeometryInstance-47b34185","./GeometryPipeline-2356afec","./IndexDatatype-b7d979a6","./PolygonGeometryLibrary-dec9574a","./PolygonPipeline-da7fc5ca","./VertexFormat-71718faa","./combine-83860057","./WebGLConstants-1c8239cc","./AxisAlignedBoundingBox-07c6b7f2","./IntersectionTests-96a04219","./Plane-318d6937","./AttributeCompression-af389d04","./EncodedCartesian3-f286cedc","./arrayRemoveDuplicates-18786327","./EllipsoidRhumbLine-30c47ff4","./GeometryAttributes-7827a6c2"],(function(e,t,r,a,o,i,n,s,l,u,c,p,m,y,g,d,h,f,v,b,_,P,x,w,C,T,I){"use strict";var A=new t.Cartographic,E=new t.Cartographic;function G(e,t,r,a){var o=a.cartesianToCartographic(e,A).height,i=a.cartesianToCartographic(t,E);i.height=o,a.cartographicToCartesian(i,t);var n=a.cartesianToCartographic(r,E);n.height=o-100,a.cartographicToCartesian(n,r)}var O=new o.BoundingRectangle,V=new t.Cartesian3,F=new t.Cartesian3,D=new t.Cartesian3,L=new t.Cartesian3,N=new t.Cartesian3,H=new t.Cartesian3,R=new t.Cartesian3,M=new t.Cartesian3,S=new t.Cartesian3,B=new t.Cartesian2,k=new t.Cartesian2,z=new t.Cartesian3,W=new i.Quaternion,Y=new t.Matrix3,U=new t.Matrix3;function j(r){var o=r.vertexFormat,n=r.geometry,l=r.shadowVolume,u=n.attributes.position.values,p=u.length,m=r.wall,y=r.top||m,g=r.bottom||m;if(o.st||o.normal||o.tangent||o.bitangent||l){var d=r.boundingRectangle,h=r.tangentPlane,f=r.ellipsoid,v=r.stRotation,b=r.perPositionHeight,_=B;_.x=d.x,_.y=d.y;var P,x=o.st?new Float32Array(p/3*2):void 0;o.normal&&(P=b&&y&&!m?n.attributes.normal.values:new Float32Array(p));var w=o.tangent?new Float32Array(p):void 0,C=o.bitangent?new Float32Array(p):void 0,T=l?new Float32Array(p):void 0,I=0,A=0,E=F,O=D,j=L,Q=!0,q=Y,K=U;if(0!==v){var Z=i.Quaternion.fromAxisAngle(h._plane.normal,v,W);q=t.Matrix3.fromQuaternion(Z,q),Z=i.Quaternion.fromAxisAngle(h._plane.normal,-v,W),K=t.Matrix3.fromQuaternion(Z,K)}else q=t.Matrix3.clone(t.Matrix3.IDENTITY,q),K=t.Matrix3.clone(t.Matrix3.IDENTITY,K);var J=0,X=0;y&&g&&(J=p/2,X=p/3,p/=2);for(var $=0;$K.eastOverIDL-K.westOverIDL&&(u.west=K.westOverIDL,u.east=K.eastOverIDL,u.east>s.CesiumMath.PI&&(u.east=u.east-s.CesiumMath.TWO_PI),u.west>s.CesiumMath.PI&&(u.west=u.west-s.CesiumMath.TWO_PI)),u}var X=new t.Cartographic;function $(e,t,r,a){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=i>0?o/(i-1):Number.POSITIVE_INFINITY,l=0,u=0;u=0?p:p+s.CesiumMath.TWO_PI;a.westOverIDL=Math.min(a.westOverIDL,y),a.eastOverIDL=Math.max(a.eastOverIDL,y)}}var ee=[];function te(e,t,r,a,o,i,n,s,l){var c,m={walls:[]};if(i||n){var h,f,v=g.PolygonGeometryLibrary.createGeometryFromPositions(e,t,r,o,s,l),b=v.attributes.position.values,_=v.indices;if(i&&n){var P=b.concat(b);h=P.length/3,(f=y.IndexDatatype.createTypedArray(h,2*_.length)).set(_);var x=_.length,w=h/2;for(c=0;c