define(["exports","./ArcType-fc72c06c","./GeometryOffsetAttribute-ed56ff58","./BoundingRectangle-0e36efc3","./BoundingSphere-9a3b5656","./Cartesian2-bd414876","./Cartesian3-e0307675","./Check-741c5f3c","./ComponentDatatype-aaeec80f","./defaultValue-81eec7ed","./EllipsoidGeodesic-e7a5ca44","./EllipsoidTangentPlane-4d138901","./GeometryAttribute-2b42a913","./GeometryInstance-1b39c9e8","./GeometryPipeline-e7083fea","./IndexDatatype-3f3c99e8","./Math-e73894ab","./Matrix4-4c545f70","./PolygonGeometryLibrary-231711c2","./PolygonPipeline-04baeb41","./Transforms-5b829630","./Rectangle-cf3e0e3e","./VertexFormat-d50a69ba"],(function(e,t,o,r,n,a,i,s,l,c,u,p,y,g,m,d,h,f,b,_,P,x,C){"use strict";const w=new a.Cartographic,T=new a.Cartographic;function I(e,t,o,r){const n=r.cartesianToCartographic(e,w).height,a=r.cartesianToCartographic(t,T);a.height=n,r.cartographicToCartesian(a,t);const i=r.cartesianToCartographic(o,T);i.height=n-100,r.cartographicToCartesian(i,o)}const A=new r.BoundingRectangle,E=new i.Cartesian3,v=new i.Cartesian3,G=new i.Cartesian3,O=new i.Cartesian3,V=new i.Cartesian3,F=new i.Cartesian3;let N=new i.Cartesian3,D=new i.Cartesian3,H=new i.Cartesian3;const L=new a.Cartesian2,R=new a.Cartesian2,M=new i.Cartesian3,S=new P.Quaternion,B=new f.Matrix3,k=new f.Matrix3;function z(e){const t=e.vertexFormat,r=e.geometry,n=e.shadowVolume,s=r.attributes.position.values;let u=s.length;const p=e.wall,g=e.top||p,m=e.bottom||p;if(t.st||t.normal||t.tangent||t.bitangent||n){const o=e.boundingRectangle,c=e.tangentPlane,d=e.ellipsoid,b=e.stRotation,_=e.perPositionHeight,x=L;x.x=o.x,x.y=o.y;const C=t.st?new Float32Array(u/3*2):void 0;let w;t.normal&&(w=_&&g&&!p?r.attributes.normal.values:new Float32Array(u));const T=t.tangent?new Float32Array(u):void 0,A=t.bitangent?new Float32Array(u):void 0,z=n?new Float32Array(u):void 0;let W=0,Y=0,U=v,j=G,Q=O,q=!0,K=B,Z=k;if(0!==b){let e=P.Quaternion.fromAxisAngle(c._plane.normal,b,S);K=f.Matrix3.fromQuaternion(e,K),e=P.Quaternion.fromAxisAngle(c._plane.normal,-b,S),Z=f.Matrix3.fromQuaternion(e,Z)}else K=f.Matrix3.clone(f.Matrix3.IDENTITY,K),Z=f.Matrix3.clone(f.Matrix3.IDENTITY,Z);let J=0,X=0;g&&m&&(J=u/2,X=u/3,u/=2);for(let r=0;rU.eastOverIDL-U.westOverIDL&&(a.west=U.westOverIDL,a.east=U.eastOverIDL,a.east>h.CesiumMath.PI&&(a.east=a.east-h.CesiumMath.TWO_PI),a.west>h.CesiumMath.PI&&(a.west=a.west-h.CesiumMath.TWO_PI)),a}const q=new a.Cartographic;function K(e,t,o,r){const n=e.surfaceDistance,a=Math.ceil(n*t),i=a>0?n/(a-1):Number.POSITIVE_INFINITY;let s=0;for(let t=0;t=0?n:n+h.CesiumMath.TWO_PI;r.westOverIDL=Math.min(r.westOverIDL,l),r.eastOverIDL=Math.max(r.eastOverIDL,l)}}const Z=[];function J(e,t,o,r,n,a,i,s,l){const c={walls:[]};let u;if(a||i){const r=b.PolygonGeometryLibrary.createGeometryFromPositions(e,t,o,n,s,l),p=r.attributes.position.values,y=r.indices;let m,h;if(a&&i){const e=p.concat(p);m=e.length/3,h=d.IndexDatatype.createTypedArray(m,2*y.length),h.set(y);const t=y.length,o=m/2;for(u=0;u