define(["./AttributeCompression-f9ee669b","./EllipsoidTangentPlane-fd839d7b","./buildModuleUrl-dba4ec07","./Cartesian2-1b9b0d8a","./Cartographic-1bbcab04","./when-515d5295","./Rectangle-e170be8b","./TerrainEncoding-29e3257b","./IndexDatatype-eefd5922","./Math-5e38123d","./PrimitiveType-b38a4004","./OrientedBoundingBox-57407e6e","./Check-3aa71481","./GeometryAttribute-9bc31a7f","./WebMercatorProjection-aa5a37a5","./createTaskProcessorWorker","./Intersect-53434a77","./Cartesian4-034d54d5","./IntersectionTests-5fa33dbd","./Plane-92c15089","./Event-9821f5d9","./RuntimeError-350acae3","./ComponentDatatype-d430c7f7","./WebGLConstants-77a84876","./PolygonPipeline-b8b35011","./WindingOrder-8479ef05","./EllipsoidRhumbLine-f50fdea6","./FeatureDetection-7fae0d5a"],(function(t,e,r,n,i,o,a,s,c,h,d,u,I,l,m,g,T,f,v,y,w,E,p,b,N,S,A,x){"use strict";function P(){I.t.throwInstantiationError()}Object.defineProperties(P.prototype,{errorEvent:{get:I.t.throwInstantiationError},credit:{get:I.t.throwInstantiationError},tilingScheme:{get:I.t.throwInstantiationError},ready:{get:I.t.throwInstantiationError},readyPromise:{get:I.t.throwInstantiationError},hasWaterMask:{get:I.t.throwInstantiationError},hasVertexNormals:{get:I.t.throwInstantiationError},availability:{get:I.t.throwInstantiationError}});var _=[];P.getRegularGridIndices=function(t,e){if(t*e>=h.n.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=_[t];o.t(r)||(_[t]=r=[]);var n=r[e];return o.t(n)||W(t,e,n=t*e=h.n.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=_[t];o.t(r)||(_[t]=r=[]);var n=r[e];return o.t(n)||W(t,e,n=t*e=h.n.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=F[t];o.t(r)||(F[t]=r=[]);var n=r[e];if(!o.t(n)){var i=P.getRegularGridIndices(t,e),a=G(t,e),s=a.westIndicesSouthToNorth,c=a.southIndicesEastToWest,d=a.eastIndicesNorthToSouth,u=a.northIndicesWestToEast;n=r[e]={indices:i,westIndicesSouthToNorth:s,southIndicesEastToWest:c,eastIndicesNorthToSouth:d,northIndicesWestToEast:u}}return n};var M=[];function G(t,e){var r,n=new Array(e),i=new Array(t),o=new Array(e),a=new Array(t);for(r=0;r=h.n.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=M[t];o.t(r)||(M[t]=r=[]);var n=r[e];if(!o.t(n)){var i=t*e,a=(t-1)*(e-1)*6,s=2*t+2*e,d=i+s,u=3*(t+e-2),l=a+6*Math.max(0,s-4)+u,m=G(t,e),g=m.westIndicesSouthToNorth,T=m.southIndicesEastToWest,f=m.eastIndicesNorthToSouth,v=m.northIndicesWestToEast,y=c.IndexDatatype.createTypedArray(d,l);W(t,e,y,0),P.addSkirtIndices(g,T,f,v,i,y,a+u),n=r[e]={indices:y,westIndicesSouthToNorth:g,southIndicesEastToWest:T,eastIndicesNorthToSouth:f,northIndicesWestToEast:v,indexCountWithoutSkirts:a}}return n},P.addSkirtIndices=function(t,e,r,n,i,o,a,s){var c=i;a=B(t,c,o,a,s),a=B(e,c+=t.length,o,a,s),a=B(r,c+=e.length,o,a,s),B(n,c+=r.length,o,a,s)},P.heightmapTerrainQuality=.25,P.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,e,r){return 2*t.maximumRadius*Math.PI*P.heightmapTerrainQuality/(e*r)},P.prototype.requestTileGeometry=I.t.throwInstantiationError,P.prototype.getLevelMaximumGeometricError=I.t.throwInstantiationError,P.prototype.getTileDataAvailable=I.t.throwInstantiationError,P.prototype.loadTileDataAvailability=I.t.throwInstantiationError;var O=32767,Y=new i.a,k=new i.a,C=new i.a,H=new i.i,R=new n.r,V=new i.a,U=new d.c,z=new d.c;function L(t,e,r,n,o,a,s,c,u){var I=Number.POSITIVE_INFINITY,l=o.north,m=o.south,g=o.east,T=o.west;g