0||BoundingSphere.intersectPlane(n,Plane.ORIGIN_ZX_PLANE)!==Intersect$1.INTERSECTING)return e}if(t.geometryType!==GeometryType$1.NONE)switch(t.geometryType){case GeometryType$1.POLYLINES:splitLongitudePolyline(e);break;case GeometryType$1.TRIANGLES:splitLongitudeTriangles(e);break;case GeometryType$1.LINES:splitLongitudeLines(e)}else indexPrimitive(t),t.primitiveType===PrimitiveType$1.TRIANGLES?splitLongitudeTriangles(e):t.primitiveType===PrimitiveType$1.LINES&&splitLongitudeLines(e);return e};const scratchCartesian1$5=new Cartesian3,scratchCartesian2$7=new Cartesian3,scratchCartesian3$8=new Cartesian3,scratchCartesian4$5=new Cartesian3,texCoordScratch=new Cartesian2,textureMatrixScratch$1=new Matrix3,tangentMatrixScratch$1=new Matrix3,quaternionScratch$3=new Quaternion,scratchNormal$5=new Cartesian3,scratchTangent$4=new Cartesian3,scratchBitangent$4=new Cartesian3,scratchCartographic$f=new Cartographic,projectedCenterScratch=new Cartesian3,scratchMinTexCoord=new Cartesian2,scratchMaxTexCoord=new Cartesian2;function computeTopBottomAttributes(e,t,n){const i=t.vertexFormat,r=t.center,o=t.semiMajorAxis,a=t.semiMinorAxis,s=t.ellipsoid,c=t.stRotation,l=n?e.length/3*2:e.length/3,u=t.shadowVolume,d=i.st?new Float32Array(2*l):void 0,h=i.normal?new Float32Array(3*l):void 0,p=i.tangent?new Float32Array(3*l):void 0,f=i.bitangent?new Float32Array(3*l):void 0,m=u?new Float32Array(3*l):void 0;let g=0,_=scratchNormal$5,y=scratchTangent$4,C=scratchBitangent$4;const T=new GeographicProjection(s),S=T.project(s.cartesianToCartographic(r,scratchCartographic$f),projectedCenterScratch),A=s.scaleToGeodeticSurface(r,scratchCartesian1$5);s.geodeticSurfaceNormal(A,A);let v=textureMatrixScratch$1,E=tangentMatrixScratch$1;if(0!==c){let e=Quaternion.fromAxisAngle(A,c,quaternionScratch$3);v=Matrix3.fromQuaternion(e,v),e=Quaternion.fromAxisAngle(A,-c,quaternionScratch$3),E=Matrix3.fromQuaternion(e,E)}else v=Matrix3.clone(Matrix3.IDENTITY,v),E=Matrix3.clone(Matrix3.IDENTITY,E);const b=Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,scratchMinTexCoord),x=Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,scratchMaxTexCoord);let P=e.length;const D=n?P:0,w=D/3*2;for(let t=0;t1;--o){for(t[s++]=n++,t[s++]=n,t[s++]=r,i=2*o,a=0;aCesiumMath.PI&&(u.north=u.north>0?CesiumMath.PI_OVER_TWO-CesiumMath.EPSILON7:u.north,u.south=u.south<0?CesiumMath.EPSILON7-CesiumMath.PI_OVER_TWO:u.south,u.east=CesiumMath.PI,u.west=-CesiumMath.PI),u}function EllipseGeometry(e){const t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).center,n=defaultValue(e.ellipsoid,Ellipsoid.WGS84),i=e.semiMajorAxis,r=e.semiMinorAxis,o=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),a=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),s=defaultValue(e.height,0),c=defaultValue(e.extrudedHeight,s);this._center=Cartesian3.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=r,this._ellipsoid=Ellipsoid.clone(n),this._rotation=defaultValue(e.rotation,0),this._stRotation=defaultValue(e.stRotation,0),this._height=Math.max(c,s),this._granularity=o,this._vertexFormat=VertexFormat.clone(a),this._extrudedHeight=Math.min(c,s),this._shadowVolume=defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}EllipseGeometry.packedLength=Cartesian3.packedLength+Ellipsoid.packedLength+VertexFormat.packedLength+9,EllipseGeometry.pack=function(e,t,n){return n=defaultValue(n,0),Cartesian3.pack(e._center,t,n),n+=Cartesian3.packedLength,Ellipsoid.pack(e._ellipsoid,t,n),n+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,n),n+=VertexFormat.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=defaultValue(e._offsetAttribute,-1),t};const scratchCenter$7=new Cartesian3,scratchEllipsoid$e=new Ellipsoid,scratchVertexFormat$b=new VertexFormat,scratchOptions$l={center:scratchCenter$7,ellipsoid:scratchEllipsoid$e,vertexFormat:scratchVertexFormat$b,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function textureCoordinateRotationPoints$2(e){const t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];const n=EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,i=n.length/3,r=new Array(i);for(let e=0;e0){const e=Math.min(l,c);h=Math.round(c/e);const t=Math.min(h*l,c);for(d=0;d1&&(n-=1),6*n<1?e+6*(t-e)*n:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function Color(e,t,n,i){this.red=defaultValue(e,1),this.green=defaultValue(t,1),this.blue=defaultValue(n,1),this.alpha=defaultValue(i,1)}let scratchArrayBuffer,scratchUint32Array,scratchUint8Array;Object.defineProperties(Clock.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){JulianDate.equals(this._currentTime,e)||(this._clockStep===ClockStep$1.SYSTEM_CLOCK&&(this._clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===ClockStep$1.SYSTEM_CLOCK&&(this._clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===ClockStep$1.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=JulianDate.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===ClockStep$1.SYSTEM_CLOCK&&(this._clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),Clock.prototype.tick=function(){const e=getTimestamp$1();let t=JulianDate.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){const n=this._clockStep;if(n===ClockStep$1.SYSTEM_CLOCK)t=JulianDate.now(t);else{const i=this._multiplier;if(n===ClockStep$1.TICK_DEPENDENT)t=JulianDate.addSeconds(t,i,t);else{const n=e-this._lastSystemTime;t=JulianDate.addSeconds(t,i*(n/1e3),t)}const r=this.clockRange,o=this.startTime,a=this.stopTime;if(r===ClockRange$1.CLAMPED)JulianDate.lessThan(t,o)?t=JulianDate.clone(o,t):JulianDate.greaterThan(t,a)&&(t=JulianDate.clone(a,t),this.onStop.raiseEvent(this));else if(r===ClockRange$1.LOOP_STOP)for(JulianDate.lessThan(t,o)&&(t=JulianDate.clone(o,t));JulianDate.greaterThan(t,a);)t=JulianDate.addSeconds(o,JulianDate.secondsDifference(t,a),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t},Color.fromCartesian4=function(e,t){return defined(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new Color(e.x,e.y,e.z,e.w)},Color.fromBytes=function(e,t,n,i,r){return e=Color.byteToFloat(defaultValue(e,255)),t=Color.byteToFloat(defaultValue(t,255)),n=Color.byteToFloat(defaultValue(n,255)),i=Color.byteToFloat(defaultValue(i,255)),defined(r)?(r.red=e,r.green=t,r.blue=n,r.alpha=i,r):new Color(e,t,n,i)},Color.fromAlpha=function(e,t,n){return defined(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new Color(e.red,e.green,e.blue,t)},FeatureDetection.supportsTypedArrays()&&(scratchArrayBuffer=new ArrayBuffer(4),scratchUint32Array=new Uint32Array(scratchArrayBuffer),scratchUint8Array=new Uint8Array(scratchArrayBuffer)),Color.fromRgba=function(e,t){return scratchUint32Array[0]=e,Color.fromBytes(scratchUint8Array[0],scratchUint8Array[1],scratchUint8Array[2],scratchUint8Array[3],t)},Color.fromHsl=function(e,t,n,i,r){e=defaultValue(e,0)%1,t=defaultValue(t,0),n=defaultValue(n,0),i=defaultValue(i,1);let o=n,a=n,s=n;if(0!==t){let i;i=n<.5?n*(1+t):n+t-n*t;const r=2*n-i;o=hue2rgb(r,i,e+1/3),a=hue2rgb(r,i,e),s=hue2rgb(r,i,e-1/3)}return defined(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=i,r):new Color(o,a,s,i)},Color.fromRandom=function(e,t){let n=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).red;if(!defined(n)){const t=defaultValue(e.minimumRed,0),i=defaultValue(e.maximumRed,1);n=t+CesiumMath.nextRandomNumber()*(i-t)}let i=e.green;if(!defined(i)){const t=defaultValue(e.minimumGreen,0),n=defaultValue(e.maximumGreen,1);i=t+CesiumMath.nextRandomNumber()*(n-t)}let r=e.blue;if(!defined(r)){const t=defaultValue(e.minimumBlue,0),n=defaultValue(e.maximumBlue,1);r=t+CesiumMath.nextRandomNumber()*(n-t)}let o=e.alpha;if(!defined(o)){const t=defaultValue(e.minimumAlpha,0),n=defaultValue(e.maximumAlpha,1);o=t+CesiumMath.nextRandomNumber()*(n-t)}return defined(t)?(t.red=n,t.green=i,t.blue=r,t.alpha=o,t):new Color(n,i,r,o)};const rgbaMatcher=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,rrggbbaaMatcher=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,rgbParenthesesMatcher=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,hslParenthesesMatcher=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;function ColorGeometryInstanceAttribute(e,t,n,i){e=defaultValue(e,1),t=defaultValue(t,1),n=defaultValue(n,1),i=defaultValue(i,1),this.value=new Uint8Array([Color.floatToByte(e),Color.floatToByte(t),Color.floatToByte(n),Color.floatToByte(i)])}function CompressedTextureBuffer(e,t,n,i,r){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=r}Color.fromCssColorString=function(e,t){defined(t)||(t=new Color);const n=Color[(e=e.replace(/\s/g,"")).toUpperCase()];if(defined(n))return Color.clone(n,t),t;let i=rgbaMatcher.exec(e);return null!==i?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(defaultValue(i[4],"f"),16)/15,t):(i=rrggbbaaMatcher.exec(e),null!==i?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(defaultValue(i[4],"ff"),16)/255,t):(i=rgbParenthesesMatcher.exec(e),null!==i?(t.red=parseFloat(i[1])/("%"===i[1].substr(-1)?100:255),t.green=parseFloat(i[2])/("%"===i[2].substr(-1)?100:255),t.blue=parseFloat(i[3])/("%"===i[3].substr(-1)?100:255),t.alpha=parseFloat(defaultValue(i[4],"1.0")),t):(i=hslParenthesesMatcher.exec(e),null!==i?Color.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(defaultValue(i[4],"1.0")),t):t=void 0)))},Color.packedLength=4,Color.pack=function(e,t,n){return n=defaultValue(n,0),t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t},Color.unpack=function(e,t,n){return t=defaultValue(t,0),defined(n)||(n=new Color),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n},Color.byteToFloat=function(e){return e/255},Color.floatToByte=function(e){return 1===e?255:256*e|0},Color.clone=function(e,t){if(defined(e))return defined(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new Color(e.red,e.green,e.blue,e.alpha)},Color.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},Color.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]},Color.prototype.clone=function(e){return Color.clone(this,e)},Color.prototype.equals=function(e){return Color.equals(this,e)},Color.prototype.equalsEpsilon=function(e,t){return this===e||defined(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},Color.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},Color.prototype.toCssColorString=function(){const e=Color.floatToByte(this.red),t=Color.floatToByte(this.green),n=Color.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+n+")":"rgba("+e+","+t+","+n+","+this.alpha+")"},Color.prototype.toCssHexString=function(){let e=Color.floatToByte(this.red).toString(16);e.length<2&&(e="0"+e);let t=Color.floatToByte(this.green).toString(16);t.length<2&&(t="0"+t);let n=Color.floatToByte(this.blue).toString(16);if(n.length<2&&(n="0"+n),this.alpha<1){let i=Color.floatToByte(this.alpha).toString(16);return i.length<2&&(i="0"+i),"#"+e+t+n+i}return"#"+e+t+n},Color.prototype.toBytes=function(e){const t=Color.floatToByte(this.red),n=Color.floatToByte(this.green),i=Color.floatToByte(this.blue),r=Color.floatToByte(this.alpha);return defined(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=r,e):[t,n,i,r]},Color.prototype.toRgba=function(){return scratchUint8Array[0]=Color.floatToByte(this.red),scratchUint8Array[1]=Color.floatToByte(this.green),scratchUint8Array[2]=Color.floatToByte(this.blue),scratchUint8Array[3]=Color.floatToByte(this.alpha),scratchUint32Array[0]},Color.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},Color.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},Color.prototype.withAlpha=function(e,t){return Color.fromAlpha(this,e,t)},Color.add=function(e,t,n){return n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n},Color.subtract=function(e,t,n){return n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n},Color.multiply=function(e,t,n){return n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n},Color.divide=function(e,t,n){return n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n},Color.mod=function(e,t,n){return n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n},Color.lerp=function(e,t,n,i){return i.red=CesiumMath.lerp(e.red,t.red,n),i.green=CesiumMath.lerp(e.green,t.green,n),i.blue=CesiumMath.lerp(e.blue,t.blue,n),i.alpha=CesiumMath.lerp(e.alpha,t.alpha,n),i},Color.multiplyByScalar=function(e,t,n){return n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n},Color.divideByScalar=function(e,t,n){return n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n},Color.ALICEBLUE=Object.freeze(Color.fromCssColorString("#F0F8FF")),Color.ANTIQUEWHITE=Object.freeze(Color.fromCssColorString("#FAEBD7")),Color.AQUA=Object.freeze(Color.fromCssColorString("#00FFFF")),Color.AQUAMARINE=Object.freeze(Color.fromCssColorString("#7FFFD4")),Color.AZURE=Object.freeze(Color.fromCssColorString("#F0FFFF")),Color.BEIGE=Object.freeze(Color.fromCssColorString("#F5F5DC")),Color.BISQUE=Object.freeze(Color.fromCssColorString("#FFE4C4")),Color.BLACK=Object.freeze(Color.fromCssColorString("#000000")),Color.BLANCHEDALMOND=Object.freeze(Color.fromCssColorString("#FFEBCD")),Color.BLUE=Object.freeze(Color.fromCssColorString("#0000FF")),Color.BLUEVIOLET=Object.freeze(Color.fromCssColorString("#8A2BE2")),Color.BROWN=Object.freeze(Color.fromCssColorString("#A52A2A")),Color.BURLYWOOD=Object.freeze(Color.fromCssColorString("#DEB887")),Color.CADETBLUE=Object.freeze(Color.fromCssColorString("#5F9EA0")),Color.CHARTREUSE=Object.freeze(Color.fromCssColorString("#7FFF00")),Color.CHOCOLATE=Object.freeze(Color.fromCssColorString("#D2691E")),Color.CORAL=Object.freeze(Color.fromCssColorString("#FF7F50")),Color.CORNFLOWERBLUE=Object.freeze(Color.fromCssColorString("#6495ED")),Color.CORNSILK=Object.freeze(Color.fromCssColorString("#FFF8DC")),Color.CRIMSON=Object.freeze(Color.fromCssColorString("#DC143C")),Color.CYAN=Object.freeze(Color.fromCssColorString("#00FFFF")),Color.DARKBLUE=Object.freeze(Color.fromCssColorString("#00008B")),Color.DARKCYAN=Object.freeze(Color.fromCssColorString("#008B8B")),Color.DARKGOLDENROD=Object.freeze(Color.fromCssColorString("#B8860B")),Color.DARKGRAY=Object.freeze(Color.fromCssColorString("#A9A9A9")),Color.DARKGREEN=Object.freeze(Color.fromCssColorString("#006400")),Color.DARKGREY=Color.DARKGRAY,Color.DARKKHAKI=Object.freeze(Color.fromCssColorString("#BDB76B")),Color.DARKMAGENTA=Object.freeze(Color.fromCssColorString("#8B008B")),Color.DARKOLIVEGREEN=Object.freeze(Color.fromCssColorString("#556B2F")),Color.DARKORANGE=Object.freeze(Color.fromCssColorString("#FF8C00")),Color.DARKORCHID=Object.freeze(Color.fromCssColorString("#9932CC")),Color.DARKRED=Object.freeze(Color.fromCssColorString("#8B0000")),Color.DARKSALMON=Object.freeze(Color.fromCssColorString("#E9967A")),Color.DARKSEAGREEN=Object.freeze(Color.fromCssColorString("#8FBC8F")),Color.DARKSLATEBLUE=Object.freeze(Color.fromCssColorString("#483D8B")),Color.DARKSLATEGRAY=Object.freeze(Color.fromCssColorString("#2F4F4F")),Color.DARKSLATEGREY=Color.DARKSLATEGRAY,Color.DARKTURQUOISE=Object.freeze(Color.fromCssColorString("#00CED1")),Color.DARKVIOLET=Object.freeze(Color.fromCssColorString("#9400D3")),Color.DEEPPINK=Object.freeze(Color.fromCssColorString("#FF1493")),Color.DEEPSKYBLUE=Object.freeze(Color.fromCssColorString("#00BFFF")),Color.DIMGRAY=Object.freeze(Color.fromCssColorString("#696969")),Color.DIMGREY=Color.DIMGRAY,Color.DODGERBLUE=Object.freeze(Color.fromCssColorString("#1E90FF")),Color.FIREBRICK=Object.freeze(Color.fromCssColorString("#B22222")),Color.FLORALWHITE=Object.freeze(Color.fromCssColorString("#FFFAF0")),Color.FORESTGREEN=Object.freeze(Color.fromCssColorString("#228B22")),Color.FUCHSIA=Object.freeze(Color.fromCssColorString("#FF00FF")),Color.GAINSBORO=Object.freeze(Color.fromCssColorString("#DCDCDC")),Color.GHOSTWHITE=Object.freeze(Color.fromCssColorString("#F8F8FF")),Color.GOLD=Object.freeze(Color.fromCssColorString("#FFD700")),Color.GOLDENROD=Object.freeze(Color.fromCssColorString("#DAA520")),Color.GRAY=Object.freeze(Color.fromCssColorString("#808080")),Color.GREEN=Object.freeze(Color.fromCssColorString("#008000")),Color.GREENYELLOW=Object.freeze(Color.fromCssColorString("#ADFF2F")),Color.GREY=Color.GRAY,Color.HONEYDEW=Object.freeze(Color.fromCssColorString("#F0FFF0")),Color.HOTPINK=Object.freeze(Color.fromCssColorString("#FF69B4")),Color.INDIANRED=Object.freeze(Color.fromCssColorString("#CD5C5C")),Color.INDIGO=Object.freeze(Color.fromCssColorString("#4B0082")),Color.IVORY=Object.freeze(Color.fromCssColorString("#FFFFF0")),Color.KHAKI=Object.freeze(Color.fromCssColorString("#F0E68C")),Color.LAVENDER=Object.freeze(Color.fromCssColorString("#E6E6FA")),Color.LAVENDAR_BLUSH=Object.freeze(Color.fromCssColorString("#FFF0F5")),Color.LAWNGREEN=Object.freeze(Color.fromCssColorString("#7CFC00")),Color.LEMONCHIFFON=Object.freeze(Color.fromCssColorString("#FFFACD")),Color.LIGHTBLUE=Object.freeze(Color.fromCssColorString("#ADD8E6")),Color.LIGHTCORAL=Object.freeze(Color.fromCssColorString("#F08080")),Color.LIGHTCYAN=Object.freeze(Color.fromCssColorString("#E0FFFF")),Color.LIGHTGOLDENRODYELLOW=Object.freeze(Color.fromCssColorString("#FAFAD2")),Color.LIGHTGRAY=Object.freeze(Color.fromCssColorString("#D3D3D3")),Color.LIGHTGREEN=Object.freeze(Color.fromCssColorString("#90EE90")),Color.LIGHTGREY=Color.LIGHTGRAY,Color.LIGHTPINK=Object.freeze(Color.fromCssColorString("#FFB6C1")),Color.LIGHTSEAGREEN=Object.freeze(Color.fromCssColorString("#20B2AA")),Color.LIGHTSKYBLUE=Object.freeze(Color.fromCssColorString("#87CEFA")),Color.LIGHTSLATEGRAY=Object.freeze(Color.fromCssColorString("#778899")),Color.LIGHTSLATEGREY=Color.LIGHTSLATEGRAY,Color.LIGHTSTEELBLUE=Object.freeze(Color.fromCssColorString("#B0C4DE")),Color.LIGHTYELLOW=Object.freeze(Color.fromCssColorString("#FFFFE0")),Color.LIME=Object.freeze(Color.fromCssColorString("#00FF00")),Color.LIMEGREEN=Object.freeze(Color.fromCssColorString("#32CD32")),Color.LINEN=Object.freeze(Color.fromCssColorString("#FAF0E6")),Color.MAGENTA=Object.freeze(Color.fromCssColorString("#FF00FF")),Color.MAROON=Object.freeze(Color.fromCssColorString("#800000")),Color.MEDIUMAQUAMARINE=Object.freeze(Color.fromCssColorString("#66CDAA")),Color.MEDIUMBLUE=Object.freeze(Color.fromCssColorString("#0000CD")),Color.MEDIUMORCHID=Object.freeze(Color.fromCssColorString("#BA55D3")),Color.MEDIUMPURPLE=Object.freeze(Color.fromCssColorString("#9370DB")),Color.MEDIUMSEAGREEN=Object.freeze(Color.fromCssColorString("#3CB371")),Color.MEDIUMSLATEBLUE=Object.freeze(Color.fromCssColorString("#7B68EE")),Color.MEDIUMSPRINGGREEN=Object.freeze(Color.fromCssColorString("#00FA9A")),Color.MEDIUMTURQUOISE=Object.freeze(Color.fromCssColorString("#48D1CC")),Color.MEDIUMVIOLETRED=Object.freeze(Color.fromCssColorString("#C71585")),Color.MIDNIGHTBLUE=Object.freeze(Color.fromCssColorString("#191970")),Color.MINTCREAM=Object.freeze(Color.fromCssColorString("#F5FFFA")),Color.MISTYROSE=Object.freeze(Color.fromCssColorString("#FFE4E1")),Color.MOCCASIN=Object.freeze(Color.fromCssColorString("#FFE4B5")),Color.NAVAJOWHITE=Object.freeze(Color.fromCssColorString("#FFDEAD")),Color.NAVY=Object.freeze(Color.fromCssColorString("#000080")),Color.OLDLACE=Object.freeze(Color.fromCssColorString("#FDF5E6")),Color.OLIVE=Object.freeze(Color.fromCssColorString("#808000")),Color.OLIVEDRAB=Object.freeze(Color.fromCssColorString("#6B8E23")),Color.ORANGE=Object.freeze(Color.fromCssColorString("#FFA500")),Color.ORANGERED=Object.freeze(Color.fromCssColorString("#FF4500")),Color.ORCHID=Object.freeze(Color.fromCssColorString("#DA70D6")),Color.PALEGOLDENROD=Object.freeze(Color.fromCssColorString("#EEE8AA")),Color.PALEGREEN=Object.freeze(Color.fromCssColorString("#98FB98")),Color.PALETURQUOISE=Object.freeze(Color.fromCssColorString("#AFEEEE")),Color.PALEVIOLETRED=Object.freeze(Color.fromCssColorString("#DB7093")),Color.PAPAYAWHIP=Object.freeze(Color.fromCssColorString("#FFEFD5")),Color.PEACHPUFF=Object.freeze(Color.fromCssColorString("#FFDAB9")),Color.PERU=Object.freeze(Color.fromCssColorString("#CD853F")),Color.PINK=Object.freeze(Color.fromCssColorString("#FFC0CB")),Color.PLUM=Object.freeze(Color.fromCssColorString("#DDA0DD")),Color.POWDERBLUE=Object.freeze(Color.fromCssColorString("#B0E0E6")),Color.PURPLE=Object.freeze(Color.fromCssColorString("#800080")),Color.RED=Object.freeze(Color.fromCssColorString("#FF0000")),Color.ROSYBROWN=Object.freeze(Color.fromCssColorString("#BC8F8F")),Color.ROYALBLUE=Object.freeze(Color.fromCssColorString("#4169E1")),Color.SADDLEBROWN=Object.freeze(Color.fromCssColorString("#8B4513")),Color.SALMON=Object.freeze(Color.fromCssColorString("#FA8072")),Color.SANDYBROWN=Object.freeze(Color.fromCssColorString("#F4A460")),Color.SEAGREEN=Object.freeze(Color.fromCssColorString("#2E8B57")),Color.SEASHELL=Object.freeze(Color.fromCssColorString("#FFF5EE")),Color.SIENNA=Object.freeze(Color.fromCssColorString("#A0522D")),Color.SILVER=Object.freeze(Color.fromCssColorString("#C0C0C0")),Color.SKYBLUE=Object.freeze(Color.fromCssColorString("#87CEEB")),Color.SLATEBLUE=Object.freeze(Color.fromCssColorString("#6A5ACD")),Color.SLATEGRAY=Object.freeze(Color.fromCssColorString("#708090")),Color.SLATEGREY=Color.SLATEGRAY,Color.SNOW=Object.freeze(Color.fromCssColorString("#FFFAFA")),Color.SPRINGGREEN=Object.freeze(Color.fromCssColorString("#00FF7F")),Color.STEELBLUE=Object.freeze(Color.fromCssColorString("#4682B4")),Color.TAN=Object.freeze(Color.fromCssColorString("#D2B48C")),Color.TEAL=Object.freeze(Color.fromCssColorString("#008080")),Color.THISTLE=Object.freeze(Color.fromCssColorString("#D8BFD8")),Color.TOMATO=Object.freeze(Color.fromCssColorString("#FF6347")),Color.TURQUOISE=Object.freeze(Color.fromCssColorString("#40E0D0")),Color.VIOLET=Object.freeze(Color.fromCssColorString("#EE82EE")),Color.WHEAT=Object.freeze(Color.fromCssColorString("#F5DEB3")),Color.WHITE=Object.freeze(Color.fromCssColorString("#FFFFFF")),Color.WHITESMOKE=Object.freeze(Color.fromCssColorString("#F5F5F5")),Color.YELLOW=Object.freeze(Color.fromCssColorString("#FFFF00")),Color.YELLOWGREEN=Object.freeze(Color.fromCssColorString("#9ACD32")),Color.TRANSPARENT=Object.freeze(new Color(0,0,0,0)),Object.defineProperties(ColorGeometryInstanceAttribute.prototype,{componentDatatype:{get:function(){return ComponentDatatype$1.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),ColorGeometryInstanceAttribute.fromColor=function(e){return new ColorGeometryInstanceAttribute(e.red,e.green,e.blue,e.alpha)},ColorGeometryInstanceAttribute.toValue=function(e,t){return defined(t)?e.toBytes(t):new Uint8Array(e.toBytes())},ColorGeometryInstanceAttribute.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},Object.defineProperties(CompressedTextureBuffer.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}}),CompressedTextureBuffer.clone=function(e){if(defined(e))return new CompressedTextureBuffer(e._format,e._datatype,e._width,e._height,e._buffer)},CompressedTextureBuffer.prototype.clone=function(){return CompressedTextureBuffer.clone(this)};const CoplanarPolygonGeometryLibrary={},scratchIntersectionPoint=new Cartesian3,scratchXAxis=new Cartesian3,scratchYAxis=new Cartesian3,scratchZAxis=new Cartesian3,obbScratch=new OrientedBoundingBox;function projectTo2D(e,t,n,i,r){const o=Cartesian3.subtract(e,t,scratchIntersectionPoint),a=Cartesian3.dot(n,o),s=Cartesian3.dot(i,o);return Cartesian2.fromElements(a,s,r)}function calculateM(e,t,n){if(0===e)return t*n;const i=e*e,r=i*i,o=r*i,a=o*i,s=a*i,c=s*i,l=n;return t*((1-i/4-3*r/64-5*o/256-175*a/16384-441*s/65536-4851*c/1048576)*l-(3*i/8+3*r/32+45*o/1024+105*a/4096+2205*s/131072+6237*c/524288)*Math.sin(2*l)+(15*r/256+45*o/1024+525*a/16384+1575*s/65536+155925*c/8388608)*Math.sin(4*l)-(35*o/3072+175*a/12288+3675*s/262144+13475*c/1048576)*Math.sin(6*l)+(315*a/131072+2205*s/524288+43659*c/8388608)*Math.sin(8*l)-(693*s/1310720+6237*c/5242880)*Math.sin(10*l)+1001*c/8388608*Math.sin(12*l))}function calculateInverseM(e,t,n){const i=e/n;if(0===t)return i;const r=i*i,o=r*i,a=o*i,s=t*t,c=s*s,l=c*s,u=l*s,d=u*s,h=d*s,p=Math.sin(2*i),f=Math.cos(2*i),m=Math.sin(4*i),g=Math.cos(4*i),_=Math.sin(6*i),y=Math.cos(6*i),C=Math.sin(8*i),T=Math.cos(8*i),S=Math.sin(10*i);return i+i*s/4+7*i*c/64+15*i*l/256+579*i*u/16384+1515*i*d/65536+16837*i*h/1048576+(3*i*c/16+45*i*l/256-i*(32*r-561)*u/4096-i*(232*r-1677)*d/16384+i*(399985-90560*r+512*a)*h/5242880)*f+(21*i*l/256+483*i*u/4096-i*(224*r-1969)*d/16384-i*(33152*r-112599)*h/1048576)*g+(151*i*u/4096+4681*i*d/65536+1479*i*h/16384-453*o*h/32768)*y+(1097*i*d/65536+42783*i*h/1048576)*T+8011*i*h/1048576*Math.cos(10*i)+(3*s/8+3*c/16+213*l/2048-3*r*l/64+255*u/4096-33*r*u/512+20861*d/524288-33*r*d/512+a*d/1024+28273*h/1048576-471*r*h/8192+9*a*h/4096)*p+(21*c/256+21*l/256+533*u/8192-21*r*u/512+197*d/4096-315*r*d/4096+584039*h/16777216-12517*r*h/131072+7*a*h/2048)*m+(151*l/6144+151*u/4096+5019*d/131072-453*r*d/16384+26965*h/786432-8607*r*h/131072)*_+(1097*u/131072+1097*d/65536+225797*h/10485760-1097*r*h/65536)*C+(8011*d/2621440+8011*h/1048576)*S+293393*h/251658240*Math.sin(12*i)}function calculateSigma(e,t){if(0===e)return Math.log(Math.tan(.5*(CesiumMath.PI_OVER_TWO+t)));const n=e*Math.sin(t);return Math.log(Math.tan(.5*(CesiumMath.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function calculateHeading(e,t,n,i,r){const o=calculateSigma(e._ellipticity,n),a=calculateSigma(e._ellipticity,r);return Math.atan2(CesiumMath.negativePiToPi(i-t),a-o)}function calculateArcLength(e,t,n,i,r,o,a){const s=e._heading,c=o-i;let l=0;if(CesiumMath.equalsEpsilon(Math.abs(s),CesiumMath.PI_OVER_TWO,CesiumMath.EPSILON8))if(t===n)l=t*Math.cos(r)*CesiumMath.negativePiToPi(c);else{const n=Math.sin(r);l=t*Math.cos(r)*CesiumMath.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*n*n)}else{const n=calculateM(e._ellipticity,t,r);l=(calculateM(e._ellipticity,t,a)-n)/Math.cos(s)}return Math.abs(l)}CoplanarPolygonGeometryLibrary.validOutline=function(e){const t=OrientedBoundingBox.fromPoints(e,obbScratch).halfAxes,n=Matrix3.getColumn(t,0,scratchXAxis),i=Matrix3.getColumn(t,1,scratchYAxis),r=Matrix3.getColumn(t,2,scratchZAxis),o=Cartesian3.magnitude(n),a=Cartesian3.magnitude(i),s=Cartesian3.magnitude(r);return!(0===o&&(0===a||0===s)||0===a&&0===s)},CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments=function(e,t,n,i){const r=OrientedBoundingBox.fromPoints(e,obbScratch),o=r.halfAxes,a=Matrix3.getColumn(o,0,scratchXAxis),s=Matrix3.getColumn(o,1,scratchYAxis),c=Matrix3.getColumn(o,2,scratchZAxis),l=Cartesian3.magnitude(a),u=Cartesian3.magnitude(s),d=Cartesian3.magnitude(c),h=Math.min(l,u,d);if(0===l&&(0===u||0===d)||0===u&&0===d)return!1;let p,f;return h!==u&&h!==d||(p=a),h===l?p=s:h===d&&(f=s),h!==l&&h!==u||(f=c),Cartesian3.normalize(p,n),Cartesian3.normalize(f,i),Cartesian3.clone(r.center,t),!0},CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction=function(e,t,n){return function(i){const r=new Array(i.length);for(let o=0;oCesiumMath.EPSILON8){c=calculateInverseM(calculateM(r,i,e.latitude)+n*Math.cos(t),r,i);const o=calculateSigma(r,e.latitude),a=calculateSigma(r,c);l=Math.tan(t)*(a-o),s=CesiumMath.negativePiToPi(e.longitude+l)}else{let o;if(c=e.latitude,0===r)o=i*Math.cos(e.latitude);else{const t=Math.sin(e.latitude);o=i*Math.cos(e.latitude)/Math.sqrt(1-a*t*t)}l=n/o,s=t>0?CesiumMath.negativePiToPi(e.longitude+l):CesiumMath.negativePiToPi(e.longitude-l)}return defined(o)?(o.longitude=s,o.latitude=c,o.height=0,o):new Cartographic(s,c,0)}function EllipsoidRhumbLine(e,t,n){const i=defaultValue(n,Ellipsoid.WGS84);this._ellipsoid=i,this._start=new Cartographic,this._end=new Cartographic,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,defined(e)&&defined(t)&&computeProperties$1(this,e,t,i)}Object.defineProperties(EllipsoidRhumbLine.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}}),EllipsoidRhumbLine.fromStartHeadingDistance=function(e,t,n,i,r){const o=defaultValue(i,Ellipsoid.WGS84),a=o.maximumRadius,s=o.minimumRadius,c=a*a,l=s*s,u=Math.sqrt((c-l)/c),d=interpolateUsingSurfaceDistance(e,t=CesiumMath.negativePiToPi(t),n,o.maximumRadius,u);return!defined(r)||defined(i)&&!i.equals(r.ellipsoid)?new EllipsoidRhumbLine(e,d,o):(r.setEndPoints(e,d),r)},EllipsoidRhumbLine.prototype.setEndPoints=function(e,t){computeProperties$1(this,e,t,this._ellipsoid)},EllipsoidRhumbLine.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance=function(e,t){return interpolateUsingSurfaceDistance(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},EllipsoidRhumbLine.prototype.findIntersectionWithLongitude=function(e,t){const n=this._ellipticity,i=this._heading,r=Math.abs(i),o=this._start;if(e=CesiumMath.negativePiToPi(e),CesiumMath.equalsEpsilon(Math.abs(e),Math.PI,CesiumMath.EPSILON14)&&(e=CesiumMath.sign(o.longitude)*Math.PI),defined(t)||(t=new Cartographic),Math.abs(CesiumMath.PI_OVER_TWO-r)<=CesiumMath.EPSILON8)return t.longitude=e,t.latitude=o.latitude,t.height=0,t;if(CesiumMath.equalsEpsilon(Math.abs(CesiumMath.PI_OVER_TWO-r),CesiumMath.PI_OVER_TWO,CesiumMath.EPSILON8)){if(CesiumMath.equalsEpsilon(e,o.longitude,CesiumMath.EPSILON12))return;return t.longitude=e,t.latitude=CesiumMath.PI_OVER_TWO*CesiumMath.sign(CesiumMath.PI_OVER_TWO-i),t.height=0,t}const a=o.latitude,s=n*Math.sin(a),c=Math.tan(.5*(CesiumMath.PI_OVER_TWO+a))*Math.exp((e-o.longitude)/Math.tan(i)),l=(1+s)/(1-s);let u,d=o.latitude;do{u=d;const e=n*Math.sin(u),t=(1+e)/(1-e);d=2*Math.atan(c*Math.pow(t/l,n/2))-CesiumMath.PI_OVER_TWO}while(!CesiumMath.equalsEpsilon(d,u,CesiumMath.EPSILON12));return t.longitude=e,t.latitude=d,t.height=0,t},EllipsoidRhumbLine.prototype.findIntersectionWithLatitude=function(e,t){const n=this._ellipticity,i=this._heading,r=this._start;if(CesiumMath.equalsEpsilon(Math.abs(i),CesiumMath.PI_OVER_TWO,CesiumMath.EPSILON8))return;const o=calculateSigma(n,r.latitude),a=calculateSigma(n,e),s=Math.tan(i)*(a-o),c=CesiumMath.negativePiToPi(r.longitude+s);return defined(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new Cartographic(c,e,0)};var earcut_1=earcut,_default=earcut;function earcut(e,t,n){n=n||2;var i,r,o,a,s,c,l,u=t&&t.length,d=u?t[0]*n:e.length,h=linkedList(e,0,d,n,!0),p=[];if(!h||h.next===h.prev)return p;if(u&&(h=eliminateHoles(e,t,h,n)),e.length>80*n){i=o=e[0],r=a=e[1];for(var f=n;fo&&(o=s),c>a&&(a=c);l=0!==(l=Math.max(o-i,a-r))?1/l:0}return earcutLinked(h,p,n,i,r,l),p}function linkedList(e,t,n,i,r){var o,a;if(r===signedArea(e,t,n,i)>0)for(o=t;o=t;o-=i)a=insertNode(o,e[o],e[o+1],a);return a&&equals(a,a.next)&&(removeNode(a),a=a.next),a}function filterPoints(e,t){if(!e)return e;t||(t=e);var n,i=e;do{if(n=!1,i.steiner||!equals(i,i.next)&&0!==area(i.prev,i,i.next))i=i.next;else{if(removeNode(i),(i=t=i.prev)===i.next)break;n=!0}}while(n||i!==t);return t}function earcutLinked(e,t,n,i,r,o,a){if(e){!a&&o&&indexCurve(e,i,r,o);for(var s,c,l=e;e.prev!==e.next;)if(s=e.prev,c=e.next,o?isEarHashed(e,i,r,o):isEar(e))t.push(s.i/n),t.push(e.i/n),t.push(c.i/n),removeNode(e),e=c.next,l=c.next;else if((e=c)===l){a?1===a?earcutLinked(e=cureLocalIntersections(filterPoints(e),t,n),t,n,i,r,o,2):2===a&&splitEarcut(e,t,n,i,r,o):earcutLinked(filterPoints(e),t,n,i,r,o,1);break}}}function isEar(e){var t=e.prev,n=e,i=e.next;if(area(t,n,i)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(pointInTriangle(t.x,t.y,n.x,n.y,i.x,i.y,r.x,r.y)&&area(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function isEarHashed(e,t,n,i){var r=e.prev,o=e,a=e.next;if(area(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,u=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,d=zOrder(s,c,t,n,i),h=zOrder(l,u,t,n,i),p=e.prevZ,f=e.nextZ;p&&p.z>=d&&f&&f.z<=h;){if(p!==e.prev&&p!==e.next&&pointInTriangle(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&area(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==e.prev&&f!==e.next&&pointInTriangle(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&area(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&pointInTriangle(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&area(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&pointInTriangle(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&area(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function cureLocalIntersections(e,t,n){var i=e;do{var r=i.prev,o=i.next.next;!equals(r,o)&&intersects$1(r,i,i.next,o)&&locallyInside(r,o)&&locallyInside(o,r)&&(t.push(r.i/n),t.push(i.i/n),t.push(o.i/n),removeNode(i),removeNode(i.next),i=e=o),i=i.next}while(i!==e);return filterPoints(i)}function splitEarcut(e,t,n,i,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&isValidDiagonal(a,s)){var c=splitPolygon(a,s);return a=filterPoints(a,a.next),c=filterPoints(c,c.next),earcutLinked(a,t,n,i,r,o),void earcutLinked(c,t,n,i,r,o)}s=s.next}a=a.next}while(a!==e)}function eliminateHoles(e,t,n,i){var r,o,a,s=[];for(r=0,o=t.length;r=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x=i.x&&i.x>=u&&r!==i.x&&pointInTriangle(on.x||i.x===n.x&§orContainsSector(n,i)))&&(n=i,h=c)),i=i.next}while(i!==l);return n}function sectorContainsSector(e,t){return area(e.prev,e,t.prev)<0&&area(t.next,e,e.next)<0}function indexCurve(e,t,n,i){var r=e;do{null===r.z&&(r.z=zOrder(r.x,r.y,t,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,sortLinked(r)}function sortLinked(e){var t,n,i,r,o,a,s,c,l=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,i=n,s=0,t=0;t0||c>0&&i;)0!==s&&(0===c||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,c--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;n=i}o.nextZ=null,l*=2}while(a>1);return e}function zOrder(e,t,n,i,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function getLeftmost(e){var t=e,n=e;do{(t.x=0&&(e-a)*(i-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function isValidDiagonal(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!intersectsPolygon(e,t)&&(locallyInside(e,t)&&locallyInside(t,e)&&middleInside(e,t)&&(area(e.prev,e,t.prev)||area(e,t.prev,t))||equals(e,t)&&area(e.prev,e,e.next)>0&&area(t.prev,t,t.next)>0)}function area(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function equals(e,t){return e.x===t.x&&e.y===t.y}function intersects$1(e,t,n,i){var r=sign(area(e,t,n)),o=sign(area(e,t,i)),a=sign(area(n,i,e)),s=sign(area(n,i,t));return r!==o&&a!==s||(!(0!==r||!onSegment(e,n,t))||(!(0!==o||!onSegment(e,i,t))||(!(0!==a||!onSegment(n,e,i))||!(0!==s||!onSegment(n,t,i)))))}function onSegment(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function sign(e){return e>0?1:e<0?-1:0}function intersectsPolygon(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&intersects$1(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function locallyInside(e,t){return area(e.prev,e,e.next)<0?area(e,t,e.next)>=0&&area(e,e.prev,t)>=0:area(e,t,e.prev)<0||area(e,e.next,t)<0}function middleInside(e,t){var n=e,i=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==e);return i}function splitPolygon(e,t){var n=new Node$5(e.i,e.x,e.y),i=new Node$5(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function insertNode(e,t,n,i){var r=new Node$5(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function removeNode(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Node$5(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function signedArea(e,t,n,i){for(var r=0,o=t,a=n-i;o0&&(i+=e[r-1].length,n.holes.push(i))}return n},earcut_1.default=_default;const WindingOrder={CLOCKWISE:WebGLConstants$1.CW,COUNTER_CLOCKWISE:WebGLConstants$1.CCW,validate:function(e){return e===WindingOrder.CLOCKWISE||e===WindingOrder.COUNTER_CLOCKWISE}};var WindingOrder$1=Object.freeze(WindingOrder);const scaleToGeodeticHeightN=new Cartesian3,scaleToGeodeticHeightP=new Cartesian3,PolygonPipeline={computeArea2D:function(e){const t=e.length;let n=0;for(let i=t-1,r=0;r0?WindingOrder$1.COUNTER_CLOCKWISE:WindingOrder$1.CLOCKWISE},triangulate:function(e,t){const n=Cartesian2.packArray(e);return earcut_1(n,t,2)}},subdivisionV0Scratch=new Cartesian3,subdivisionV1Scratch=new Cartesian3,subdivisionV2Scratch=new Cartesian3,subdivisionS0Scratch=new Cartesian3,subdivisionS1Scratch=new Cartesian3,subdivisionS2Scratch=new Cartesian3,subdivisionMidScratch=new Cartesian3;PolygonPipeline.computeSubdivision=function(e,t,n,i){i=defaultValue(i,CesiumMath.RADIANS_PER_DEGREE);const r=n.slice(0);let o;const a=t.length,s=new Array(3*a);let c=0;for(o=0;o0;){const e=r.pop(),t=r.pop(),n=r.pop(),i=Cartesian3.fromArray(s,3*n,subdivisionV0Scratch),a=Cartesian3.fromArray(s,3*t,subdivisionV1Scratch),c=Cartesian3.fromArray(s,3*e,subdivisionV2Scratch),h=Cartesian3.multiplyByScalar(Cartesian3.normalize(i,subdivisionS0Scratch),d,subdivisionS0Scratch),f=Cartesian3.multiplyByScalar(Cartesian3.normalize(a,subdivisionS1Scratch),d,subdivisionS1Scratch),m=Cartesian3.multiplyByScalar(Cartesian3.normalize(c,subdivisionS2Scratch),d,subdivisionS2Scratch),g=Cartesian3.magnitudeSquared(Cartesian3.subtract(h,f,subdivisionMidScratch)),_=Cartesian3.magnitudeSquared(Cartesian3.subtract(f,m,subdivisionMidScratch)),y=Cartesian3.magnitudeSquared(Cartesian3.subtract(m,h,subdivisionMidScratch)),C=Math.max(g,_,y);let T,S;C>p?g===C?(T=Math.min(n,t)+" "+Math.max(n,t),o=u[T],defined(o)||(S=Cartesian3.add(i,a,subdivisionMidScratch),Cartesian3.multiplyByScalar(S,.5,S),s.push(S.x,S.y,S.z),o=s.length/3-1,u[T]=o),r.push(n,o,e),r.push(o,t,e)):_===C?(T=Math.min(t,e)+" "+Math.max(t,e),o=u[T],defined(o)||(S=Cartesian3.add(a,c,subdivisionMidScratch),Cartesian3.multiplyByScalar(S,.5,S),s.push(S.x,S.y,S.z),o=s.length/3-1,u[T]=o),r.push(t,o,n),r.push(o,e,n)):y===C&&(T=Math.min(e,n)+" "+Math.max(e,n),o=u[T],defined(o)||(S=Cartesian3.add(c,i,subdivisionMidScratch),Cartesian3.multiplyByScalar(S,.5,S),s.push(S.x,S.y,S.z),o=s.length/3-1,u[T]=o),r.push(e,o,t),r.push(o,n,t)):(l.push(n),l.push(t),l.push(e))}return new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:s})},indices:l,primitiveType:PrimitiveType$1.TRIANGLES})};const subdivisionC0Scratch=new Cartographic,subdivisionC1Scratch=new Cartographic,subdivisionC2Scratch=new Cartographic,subdivisionCartographicScratch=new Cartographic;function Queue(){this._array=[],this._offset=0,this._length=0}PolygonPipeline.computeRhumbLineSubdivision=function(e,t,n,i){i=defaultValue(i,CesiumMath.RADIANS_PER_DEGREE);const r=n.slice(0);let o;const a=t.length,s=new Array(3*a);let c=0;for(o=0;o0;){const t=r.pop(),n=r.pop(),i=r.pop(),a=Cartesian3.fromArray(s,3*i,subdivisionV0Scratch),c=Cartesian3.fromArray(s,3*n,subdivisionV1Scratch),d=Cartesian3.fromArray(s,3*t,subdivisionV2Scratch),g=e.cartesianToCartographic(a,subdivisionC0Scratch),_=e.cartesianToCartographic(c,subdivisionC1Scratch),y=e.cartesianToCartographic(d,subdivisionC2Scratch);p.setEndPoints(g,_);const C=p.surfaceDistance;f.setEndPoints(_,y);const T=f.surfaceDistance;m.setEndPoints(y,g);const S=m.surfaceDistance,A=Math.max(C,T,S);let v,E,b,x;A>h?C===A?(v=Math.min(i,n)+" "+Math.max(i,n),o=u[v],defined(o)||(E=p.interpolateUsingFraction(.5,subdivisionCartographicScratch),b=.5*(g.height+_.height),x=Cartesian3.fromRadians(E.longitude,E.latitude,b,e,subdivisionMidScratch),s.push(x.x,x.y,x.z),o=s.length/3-1,u[v]=o),r.push(i,o,t),r.push(o,n,t)):T===A?(v=Math.min(n,t)+" "+Math.max(n,t),o=u[v],defined(o)||(E=f.interpolateUsingFraction(.5,subdivisionCartographicScratch),b=.5*(_.height+y.height),x=Cartesian3.fromRadians(E.longitude,E.latitude,b,e,subdivisionMidScratch),s.push(x.x,x.y,x.z),o=s.length/3-1,u[v]=o),r.push(n,o,i),r.push(o,t,i)):S===A&&(v=Math.min(t,i)+" "+Math.max(t,i),o=u[v],defined(o)||(E=m.interpolateUsingFraction(.5,subdivisionCartographicScratch),b=.5*(y.height+g.height),x=Cartesian3.fromRadians(E.longitude,E.latitude,b,e,subdivisionMidScratch),s.push(x.x,x.y,x.z),o=s.length/3-1,u[v]=o),r.push(t,o,n),r.push(o,i,n)):(l.push(i),l.push(n),l.push(t))}return new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:s})},indices:l,primitiveType:PrimitiveType$1.TRIANGLES})},PolygonPipeline.scaleToGeodeticHeight=function(e,t,n,i){n=defaultValue(n,Ellipsoid.WGS84);let r=scaleToGeodeticHeightN,o=scaleToGeodeticHeightP;if(t=defaultValue(t,0),i=defaultValue(i,!0),defined(e)){const a=e.length;for(let s=0;s10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n},Queue.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},Queue.prototype.contains=function(e){return-1!==this._array.indexOf(e)},Queue.prototype.clear=function(){this._array.length=this._offset=this._length=0},Queue.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};const PolygonGeometryLibrary={computeHierarchyPackedLength:function(e){let t=0;const n=[e];for(;n.length>0;){const e=n.pop();if(!defined(e))continue;t+=2;const i=e.positions,r=e.holes;if(defined(i)&&(t+=i.length*Cartesian3.packedLength),defined(r)){const e=r.length;for(let t=0;t0;){const e=i.pop();if(!defined(e))continue;const r=e.positions,o=e.holes;if(t[n++]=defined(r)?r.length:0,t[n++]=defined(o)?o.length:0,defined(r)){const e=r.length;for(let i=0;i0?new Array(i):void 0;for(let i=0;iCesiumMath.EPSILON12);const D=A*(t*t-n*n)/(n*n),w=D*(256+D*(D*(74-47*D)-128))/1024,M=v*v,I=n*(1+D*(4096+D*(D*(320-175*D)-768))/16384)*(C-w*S*(v+w*(T*(2*M-1)-w*v*(4*S*S-3)*(4*M-3)/6)/4)),R=Math.atan2(p*P,g-y*x),O=Math.atan2(d*P,g*x-y);e._distance=I,e._startHeading=R,e._endHeading=O,e._uSquared=D}const scratchCart1=new Cartesian3,scratchCart2$1=new Cartesian3;function computeProperties(e,t,n,i){Cartesian3.normalize(i.cartographicToCartesian(t,scratchCart2$1),scratchCart1),Cartesian3.normalize(i.cartographicToCartesian(n,scratchCart2$1),scratchCart2$1),vincentyInverseFormula(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=Cartographic.clone(t,e._start),e._end=Cartographic.clone(n,e._end),e._start.height=0,e._end.height=0,setConstants(e)}function EllipsoidGeodesic(e,t,n){const i=defaultValue(n,Ellipsoid.WGS84);this._ellipsoid=i,this._start=new Cartographic,this._end=new Cartographic,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,defined(e)&&defined(t)&&computeProperties(this,e,t,i)}Object.defineProperties(EllipsoidGeodesic.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}}),EllipsoidGeodesic.prototype.setEndPoints=function(e,t){computeProperties(this,e,t,this._ellipsoid)},EllipsoidGeodesic.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance=function(e,t){const n=this._constants,i=n.distanceRatio+e/n.b,r=Math.cos(2*i),o=Math.cos(4*i),a=Math.cos(6*i),s=Math.sin(2*i),c=Math.sin(4*i),l=Math.sin(6*i),u=Math.sin(8*i),d=i*i,h=i*d,p=n.u8Over256,f=n.u2Over4,m=n.u6Over64,g=n.u4Over16;let _=2*h*p*r/3+i*(1-f+7*g/4-15*m/4+579*p/64-(g-15*m/4+187*p/16)*r-(5*m/4-115*p/16)*o-29*p*a/16)+(f/2-g+71*m/32-85*p/16)*s+(5*g/16-5*m/4+383*p/96)*c-d*((m-11*p/2)*s+5*p*c/2)+(29*m/96-29*p/16)*l+539*p*u/1536;const y=Math.asin(Math.sin(_)*n.cosineAlpha),C=Math.atan(n.a/n.b*Math.tan(y));_-=n.sigma;const T=Math.cos(2*n.sigma+_),S=Math.sin(_),A=Math.cos(_),v=n.cosineU*A,E=n.sineU*S,b=Math.atan2(S*n.sineHeading,v-E*n.cosineHeading)-computeDeltaLambda(n.f,n.sineAlpha,n.cosineSquaredAlpha,_,S,A,T);return defined(t)?(t.longitude=this._start.longitude+b,t.latitude=C,t.height=0,t):new Cartographic(this._start.longitude+b,C,0)};const PolylinePipeline={numberOfPoints:function(e,t,n){const i=Cartesian3.distance(e,t);return Math.ceil(i/n)},numberOfPointsRhumbLine:function(e,t,n){const i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))}},cartoScratch$2=new Cartographic;PolylinePipeline.extractHeights=function(e,t){const n=e.length,i=new Array(n);for(let r=0;r0){t=defaultValue(t,Matrix4.IDENTITY);const r=Matrix4.inverseTransformation(t,wrapLongitudeInversMatrix),o=Matrix4.multiplyByPoint(r,Cartesian3.ZERO,wrapLongitudeOrigin),a=Cartesian3.normalize(Matrix4.multiplyByPointAsVector(r,Cartesian3.UNIT_Y,wrapLongitudeXZNormal),wrapLongitudeXZNormal),s=Plane.fromPointNormal(o,a,wrapLongitudeXZPlane),c=Cartesian3.normalize(Matrix4.multiplyByPointAsVector(r,Cartesian3.UNIT_X,wrapLongitudeYZNormal),wrapLongitudeYZNormal),l=Plane.fromPointNormal(o,c,wrapLongitudeYZPlane);let u=1;n.push(Cartesian3.clone(e[0]));let d=n[0];const h=e.length;for(let t=1;t=0?-s:s}const negativeX=new Cartesian3(-1,0,0);let transform$2=new Matrix4;const translation$1=new Matrix4;let rotationZ=new Matrix3;const scaleMatrix=Matrix3.IDENTITY.clone(),westScratch=new Cartesian3,finalPosScratch=new Cartesian4,heightCartesian=new Cartesian3;function addPosition(e,t,n,i,r,o,a,s){let c=westScratch,l=finalPosScratch;transform$2=Transforms.eastNorthUpToFixedFrame(e,r,transform$2),c=Matrix4.multiplyByPointAsVector(transform$2,negativeX,c),c=Cartesian3.normalize(c,c);const u=computeRotationAngle(c,t,e,r);rotationZ=Matrix3.fromRotationZ(u,rotationZ),heightCartesian.z=o,transform$2=Matrix4.multiplyTransformation(transform$2,Matrix4.fromRotationTranslation(rotationZ,heightCartesian,translation$1),transform$2);const d=scaleMatrix;d[0]=a;for(let e=0;e0){const n=l?2:1;for(let i=0;i=0};const scratchForwardProjection$1=new Cartesian3,scratchBackwardProjection$1=new Cartesian3;PolylineVolumeGeometryLibrary.computePositions=function(e,t,n,i,r){const o=i._ellipsoid,a=scaleToSurface$2(e,o),s=i._granularity,c=i._cornerType,l=r?convertShapeTo3DDuplicate(t,n):convertShapeTo3D(t,n),u=r?convertShapeTo3D(t,n):void 0,d=n.height/2,h=n.width/2;let p=e.length,f=[],m=r?[]:void 0,g=scratchCartesian1$3,_=scratchCartesian2$6,y=scratchCartesian3$7,C=scratchCartesian4$4,T=scratchCartesian5$1,S=scratchCartesian6,A=scratchCartesian7,v=scratchCartesian8,E=scratchCartesian9,b=e[0],x=e[1];C=o.geodeticSurfaceNormal(b,C),g=Cartesian3.subtract(x,b,g),g=Cartesian3.normalize(g,g),v=Cartesian3.cross(C,g,v),v=Cartesian3.normalize(v,v);let P,D,w=a[0],M=a[1];r&&(m=addPosition(b,v,u,m,o,w+d,1,1)),E=Cartesian3.clone(b,E),b=x,_=Cartesian3.negate(g,_);for(let t=1;ta;u--)o=CesiumMath.PI_OVER_TWO-u*r,e[i++]=1-t*(1+Math.cos(o)),e[i++]=.5*(1+Math.sin(o));for(u=a;u>0;u--)o=CesiumMath.PI_OVER_TWO-r*u,e[i++]=1-n*(1+Math.cos(o)),e[i++]=.5*(1+Math.sin(o));for(u=h-g;u>0;u--)e[i++]=u*n,e[i++]=1;for(u=1;u0;u--)e[i++]=(u-1)*n,e[i++]=1}c.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:e})}return t.normal&&(c.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:C.normals})),t.tangent&&(c.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:C.tangents})),t.bitangent&&(c.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:C.bitangents})),{attributes:c,indices:I}}function extrudedAttributes(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;const n=e.position.values;let i,r;(t.normal||t.bitangent)&&(i=e.normal.values,r=e.bitangent.values);const o=e.position.values.length/18,a=3*o,s=2*o,c=2*a;let l;if(t.normal||t.bitangent||t.tangent){const o=t.normal?new Float32Array(6*a):void 0,s=t.tangent?new Float32Array(6*a):void 0,u=t.bitangent?new Float32Array(6*a):void 0;let d=cartesian1$1,h=cartesian2$1,p=cartesian3$1,f=cartesian4,m=cartesian5,g=cartesian6,_=c;for(l=0;l This application is using Cesium\'s default ion access token. Please assign Cesium.Ion.defaultAccessToken with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at https://cesium.com.