define(["exports","./when-cbf8cd21","./Check-35e1a91d","./Math-6a1814d8","./Cartesian2-c451a606","./RuntimeError-f4c64df1"],function(e,I,i,X,P,H){"use strict";function t(e){this._ellipsoid=I.defaultValue(e,P.Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(t.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),t.prototype.project=function(e,t){var n=this._semimajorAxis,r=e.longitude*n,a=e.latitude*n,i=e.height;return I.defined(t)?(t.x=r,t.y=a,t.z=i,t):new P.Cartesian3(r,a,i)},t.prototype.unproject=function(e,t){var n=this._oneOverSemimajorAxis,r=e.x*n,a=e.y*n,i=e.z;return I.defined(t)?(t.longitude=r,t.latitude=a,t.height=i,t):new P.Cartographic(r,a,i)};var s=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});function o(e,t){this.start=I.defaultValue(e,0),this.stop=I.defaultValue(t,0)}function J(e,t,n,r,a,i,s,o,u){this[0]=I.defaultValue(e,0),this[1]=I.defaultValue(r,0),this[2]=I.defaultValue(s,0),this[3]=I.defaultValue(t,0),this[4]=I.defaultValue(a,0),this[5]=I.defaultValue(o,0),this[6]=I.defaultValue(n,0),this[7]=I.defaultValue(i,0),this[8]=I.defaultValue(u,0)}J.packedLength=9,J.pack=function(e,t,n){return n=I.defaultValue(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t},J.unpack=function(e,t,n){return t=I.defaultValue(t,0),I.defined(n)||(n=new J),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n},J.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new J(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},J.fromArray=function(e,t,n){return t=I.defaultValue(t,0),I.defined(n)||(n=new J),n[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n[4]=e[t+4],n[5]=e[t+5],n[6]=e[t+6],n[7]=e[t+7],n[8]=e[t+8],n},J.fromColumnMajorArray=function(e,t){return J.clone(e,t)},J.fromRowMajorArray=function(e,t){return I.defined(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new J(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},J.fromQuaternion=function(e,t){var n=e.x*e.x,r=e.x*e.y,a=e.x*e.z,i=e.x*e.w,s=e.y*e.y,o=e.y*e.z,u=e.y*e.w,l=e.z*e.z,c=e.z*e.w,d=e.w*e.w,f=n-s-l+d,h=2*(r-c),p=2*(a+u),m=2*(r+c),y=s-n-l+d,v=2*(o-i),w=2*(a-u),C=2*(o+i),g=-n-s+l+d;return I.defined(t)?(t[0]=f,t[1]=m,t[2]=w,t[3]=h,t[4]=y,t[5]=C,t[6]=p,t[7]=v,t[8]=g,t):new J(f,h,p,m,y,v,w,C,g)},J.fromHeadingPitchRoll=function(e,t){var n=Math.cos(-e.pitch),r=Math.cos(-e.heading),a=Math.cos(e.roll),i=Math.sin(-e.pitch),s=Math.sin(-e.heading),o=Math.sin(e.roll),u=n*r,l=-a*s+o*i*r,c=o*s+a*i*r,d=n*s,f=a*r+o*i*s,h=-o*r+a*i*s,p=-i,m=o*n,y=a*n;return I.defined(t)?(t[0]=u,t[1]=d,t[2]=p,t[3]=l,t[4]=f,t[5]=m,t[6]=c,t[7]=h,t[8]=y,t):new J(u,l,c,d,f,h,p,m,y)},J.fromScale=function(e,t){return I.defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new J(e.x,0,0,0,e.y,0,0,0,e.z)},J.fromUniformScale=function(e,t){return I.defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new J(e,0,0,0,e,0,0,0,e)},J.fromCrossProduct=function(e,t){return I.defined(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new J(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},J.fromRotationX=function(e,t){var n=Math.cos(e),r=Math.sin(e);return I.defined(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=r,t[6]=0,t[7]=-r,t[8]=n,t):new J(1,0,0,0,n,-r,0,r,n)},J.fromRotationY=function(e,t){var n=Math.cos(e),r=Math.sin(e);return I.defined(t)?(t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=1,t[5]=0,t[6]=r,t[7]=0,t[8]=n,t):new J(n,0,r,0,1,0,-r,0,n)},J.fromRotationZ=function(e,t){var n=Math.cos(e),r=Math.sin(e);return I.defined(t)?(t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new J(n,-r,0,r,n,0,0,0,1)},J.toArray=function(e,t){return I.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},J.getElementIndex=function(e,t){return 3*e+t},J.getColumn=function(e,t,n){var r=3*t,a=e[r],i=e[1+r],s=e[2+r];return n.x=a,n.y=i,n.z=s,n},J.setColumn=function(e,t,n,r){var a=3*t;return(r=J.clone(e,r))[a]=n.x,r[1+a]=n.y,r[2+a]=n.z,r},J.getRow=function(e,t,n){var r=e[t],a=e[t+3],i=e[t+6];return n.x=r,n.y=a,n.z=i,n},J.setRow=function(e,t,n,r){return(r=J.clone(e,r))[t]=n.x,r[t+3]=n.y,r[t+6]=n.z,r};var n=new P.Cartesian3;J.getScale=function(e,t){return t.x=P.Cartesian3.magnitude(P.Cartesian3.fromElements(e[0],e[1],e[2],n)),t.y=P.Cartesian3.magnitude(P.Cartesian3.fromElements(e[3],e[4],e[5],n)),t.z=P.Cartesian3.magnitude(P.Cartesian3.fromElements(e[6],e[7],e[8],n)),t};var r=new P.Cartesian3;J.getMaximumScale=function(e){return J.getScale(e,r),P.Cartesian3.maximumComponent(r)},J.multiply=function(e,t,n){var r=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],a=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],i=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],s=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],o=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],u=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],l=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],c=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],d=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=r,n[1]=a,n[2]=i,n[3]=s,n[4]=o,n[5]=u,n[6]=l,n[7]=c,n[8]=d,n},J.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n},J.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n},J.multiplyByVector=function(e,t,n){var r=t.x,a=t.y,i=t.z,s=e[0]*r+e[3]*a+e[6]*i,o=e[1]*r+e[4]*a+e[7]*i,u=e[2]*r+e[5]*a+e[8]*i;return n.x=s,n.y=o,n.z=u,n},J.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},J.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n},J.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},J.transpose=function(e,t){var n=e[0],r=e[3],a=e[6],i=e[1],s=e[4],o=e[7],u=e[2],l=e[5],c=e[8];return t[0]=n,t[1]=r,t[2]=a,t[3]=i,t[4]=s,t[5]=o,t[6]=u,t[7]=l,t[8]=c,t};var a=new P.Cartesian3(1,1,1);J.getRotation=function(e,t){var n=P.Cartesian3.divideComponents(a,J.getScale(e,r),r);return t=J.multiplyByScale(e,n,t)};var h=[1,0,0],p=[2,2,1];function u(e){for(var t=0,n=0;n<3;++n){var r=e[J.getElementIndex(p[n],h[n])];t+=2*r*r}return Math.sqrt(t)}function l(e,t){for(var n=X.CesiumMath.EPSILON15,r=0,a=1,i=0;i<3;++i){var s=Math.abs(e[J.getElementIndex(p[i],h[i])]);rn){var d,f=(e[J.getElementIndex(c,c)]-e[J.getElementIndex(l,l)])/2/e[J.getElementIndex(c,l)];u=(d=f<0?-1/(-f+Math.sqrt(1+f*f)):1/(f+Math.sqrt(1+f*f)))*(o=1/Math.sqrt(1+d*d))}return(t=J.clone(J.IDENTITY,t))[J.getElementIndex(l,l)]=t[J.getElementIndex(c,c)]=o,t[J.getElementIndex(c,l)]=u,t[J.getElementIndex(l,c)]=-u,t}var c=new J,d=new J;J.computeEigenDecomposition=function(e,t){var n=X.CesiumMath.EPSILON20,r=0,a=0;I.defined(t)||(t={});for(var i=t.unitary=J.clone(J.IDENTITY,t.unitary),s=t.diagonal=J.clone(e,t.diagonal),o=n*function(e){for(var t=0,n=0;n<9;++n){var r=e[n];t+=r*r}return Math.sqrt(t)}(s);a<10&&u(s)>o;)l(s,c),J.transpose(c,d),J.multiply(s,c,s),J.multiply(d,s,s),J.multiply(i,c,i),2<++r&&(++a,r=0);return t},J.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},J.determinant=function(e){var t=e[0],n=e[3],r=e[6],a=e[1],i=e[4],s=e[7],o=e[2],u=e[5],l=e[8];return t*(i*l-u*s)+a*(u*r-n*l)+o*(n*s-i*r)},J.inverse=function(e,t){var n=e[0],r=e[1],a=e[2],i=e[3],s=e[4],o=e[5],u=e[6],l=e[7],c=e[8],d=J.determinant(e);return t[0]=s*c-l*o,t[1]=l*a-r*c,t[2]=r*o-s*a,t[3]=u*o-i*c,t[4]=n*c-u*a,t[5]=i*a-n*o,t[6]=i*l-u*s,t[7]=u*r-n*l,t[8]=n*s-i*r,J.multiplyByScalar(t,1/d,t)};var f=new J;function G(e,t,n,r){this.x=I.defaultValue(e,0),this.y=I.defaultValue(t,0),this.z=I.defaultValue(n,0),this.w=I.defaultValue(r,0)}J.inverseTranspose=function(e,t){return J.inverse(J.transpose(e,f),t)},J.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},J.equalsEpsilon=function(e,t,n){return n=I.defaultValue(n,0),e===t||I.defined(e)&&I.defined(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n},J.IDENTITY=Object.freeze(new J(1,0,0,0,1,0,0,0,1)),J.ZERO=Object.freeze(new J(0,0,0,0,0,0,0,0,0)),J.COLUMN0ROW0=0,J.COLUMN0ROW1=1,J.COLUMN0ROW2=2,J.COLUMN1ROW0=3,J.COLUMN1ROW1=4,J.COLUMN1ROW2=5,J.COLUMN2ROW0=6,J.COLUMN2ROW1=7,J.COLUMN2ROW2=8,Object.defineProperties(J.prototype,{length:{get:function(){return J.packedLength}}}),J.prototype.clone=function(e){return J.clone(this,e)},J.prototype.equals=function(e){return J.equals(this,e)},J.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]},J.prototype.equalsEpsilon=function(e,t){return J.equalsEpsilon(this,e,t)},J.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},G.fromElements=function(e,t,n,r,a){return I.defined(a)?(a.x=e,a.y=t,a.z=n,a.w=r,a):new G(e,t,n,r)},G.fromColor=function(e,t){return I.defined(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new G(e.red,e.green,e.blue,e.alpha)},G.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new G(e.x,e.y,e.z,e.w)},G.packedLength=4,G.pack=function(e,t,n){return n=I.defaultValue(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},G.unpack=function(e,t,n){return t=I.defaultValue(t,0),I.defined(n)||(n=new G),n.x=e[t++],n.y=e[t++],n.z=e[t++],n.w=e[t],n},G.packArray=function(e,t){var n=e.length,r=4*n;if(I.defined(t)){if(!Array.isArray(t)&&t.length!==r)throw new i.DeveloperError("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(var a=0;ao.x&&P.Cartesian3.clone(r,o),fu.y&&P.Cartesian3.clone(r,u),hl.z&&P.Cartesian3.clone(r,l)}var p=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(o,a,j)),m=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(u,i,j)),y=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(l,s,j)),v=a,w=o,C=p;Cl.x&&P.Cartesian3.clone(a,l),pc.y&&P.Cartesian3.clone(a,c),md.z&&P.Cartesian3.clone(a,d)}var y=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(l,s,j)),v=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(c,o,j)),w=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(d,u,j)),C=s,g=l,x=y;xu.x&&P.Cartesian3.clone(r,u),hl.y&&P.Cartesian3.clone(r,l),pc.z&&P.Cartesian3.clone(r,c)}var m=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(u,i,j)),y=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(l,s,j)),v=P.Cartesian3.magnitudeSquared(P.Cartesian3.subtract(c,o,j)),w=i,C=u,g=m;gn.radius&&(n.radius=r),n},D.intersectPlane=function(e,t){var n=e.center,r=e.radius,a=t.normal,i=P.Cartesian3.dot(a,n)+t.distance;return i<-r?s.OUTSIDE:i=t?"":Array(1+t-e.length>>>0).join(n);return r?e+a:a+e}function g(e,t,n,r,a,i){var s=r-e.length;return 0>>0;return e=(n=n&&o&&{2:"0b",8:"0",16:"0x"}[t]||"")+C(o.toString(t),i||0,"0",!1),g(e,n,r,a,s)}function E(e,t,n,r,a,i){return null!=r&&(e=e.slice(0,r)),g(e,"",t,n,a,i)}var O=arguments,_=0,e=O[_++];return e.replace(/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,function(e,t,n,r,a,i,s){var o,u,l,c,d;if("%%"==e)return"%";for(var f=!1,h="",p=!1,m=!1,y=" ",v=n.length,w=0;n&&w=t.length&&(n=t.length-1);var r=t[n].offset;0=n.length)return rn.addSeconds(e,-n[r-1].offset,t);var a=rn.secondsDifference(n[r].julianDate,e);return 0===a?rn.addSeconds(e,-n[r].offset,t):a<=1?void 0:rn.addSeconds(e,-n[--r].offset,t)}function Zt(e,t,n){var r=t/Ft.SECONDS_PER_DAY|0;return e+=r,(t-=Ft.SECONDS_PER_DAY*r)<0&&(e--,t+=Ft.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function Xt(e,t,n,r,a,i,s){var o=(t-14)/12|0,u=e+4800+o,l=(1461*u/4|0)+(367*(t-2-12*o)/12|0)-(3*((u+100)/100|0)/4|0)+n-32075;(r-=12)<0&&(r+=24);var c=i+(r*Ft.SECONDS_PER_HOUR+a*Ft.SECONDS_PER_MINUTE+s*Ft.SECONDS_PER_MILLISECOND);return 43200<=c&&(l-=1),[l,c]}var Ht=/^(\d{4})$/,Jt=/^(\d{4})-(\d{2})$/,Gt=/^(\d{4})-?(\d{3})$/,Qt=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,Kt=/^(\d{4})-?(\d{2})-?(\d{2})$/,$t=/([Z+\-])?(\d{2})?:?(\d{2})?$/,en=/^(\d{2})(\.\d+)?/.source+$t.source,tn=/^(\d{2}):?(\d{2})(\.\d+)?/.source+$t.source,nn=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+$t.source;function rn(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=I.defaultValue(e,0),t=I.defaultValue(t,0),n=I.defaultValue(n,Vt.UTC);var r=0|e;Zt(r,t+=(e-r)*Ft.SECONDS_PER_DAY,this),n===Vt.UTC&&kt(this)}rn.fromGregorianDate=function(e,t){var n=Xt(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return I.defined(t)?(Zt(n[0],n[1],t),kt(t),t):new rn(n[0],n[1],Vt.UTC)},rn.fromDate=function(e,t){var n=Xt(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return I.defined(t)?(Zt(n[0],n[1],t),kt(t),t):new rn(n[0],n[1],Vt.UTC)},rn.fromIso8601=function(e,t){var n,r,a,i,s=(e=e.replace(",",".")).split("T"),o=1,u=1,l=0,c=0,d=0,f=0,h=s[0],p=s[1];if(null!==(s=h.match(Kt)))n=+s[1],o=+s[2],u=+s[3];else if(null!==(s=h.match(Jt)))n=+s[1],o=+s[2];else if(null!==(s=h.match(Ht)))n=+s[1];else{var m;if(null!==(s=h.match(Gt)))n=+s[1],m=+s[2],a=Ut(n);else if(null!==(s=h.match(Qt)))n=+s[1],m=7*+s[2]+(+s[3]||0)-new Date(Date.UTC(n,0,4)).getUTCDay()-3;(r=new Date(Date.UTC(n,0,1))).setUTCDate(m),o=r.getUTCMonth()+1,u=r.getUTCDate()}if(a=Ut(n),I.defined(p)){null!==(s=p.match(nn))?(l=+s[1],c=+s[2],d=+s[3],f=1e3*+(s[4]||0),i=5):null!==(s=p.match(tn))?(l=+s[1],c=+s[2],d=60*+(s[3]||0),i=4):null!==(s=p.match(en))&&(l=+s[1],c=60*+(s[2]||0),i=3);var y=s[i],v=+s[i+1],w=+(s[i+2]||0);switch(y){case"+":l-=v,c-=w;break;case"-":l+=v,c+=w;break;case"Z":break;default:c+=new Date(Date.UTC(n,o-1,u,l,c)).getTimezoneOffset()}}var C=60===d;for(C&&d--;60<=c;)c-=60,l++;for(;24<=l;)l-=24,u++;for(r=a&&2===o?29:Bt[o-1];ra&&(t=n[a],this._length=a),t},Mn.prototype.pop=function(e){if(e=I.defaultValue(e,0),0!==this._length){var t=this._array,n=t[e];return An(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n}};var Rn={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},Tn=20,qn=new Mn({comparator:function(e,t){return e.priority-t.priority}});qn.maximumLength=Tn,qn.reserve(Tn);var zn=[],In={},Pn="undefined"!=typeof document?new sn(document.location.href):new sn,Dn=new Sn;function Un(){}function Nn(e){I.defined(e.priorityFunction)&&(e.priority=e.priorityFunction())}function Fn(e){var t=I.defaultValue(Un.requestsByServer[e],Un.maximumRequestsPerServer);return In[e]e;){Bn(qn.pop())}Tn=e,qn.maximumLength=e,qn.reserve(e)}}}),Un.update=function(){var e,t,n=0,r=zn.length;for(e=0;e=Un.maximumRequests)){Nn(e);var t=qn.insert(e);if(I.defined(t)){if(t===e)return;Bn(t)}return Vn(e)}}},Un.clearForSpecs=function(){for(;0=this.retryAttempts)return I.when(!1);var n=this;return I.when(t(this,e)).then(function(e){return++n._retryCount,e})},Qn.prototype.clone=function(e){return I.defined(e)||(e=new Qn({url:this._url})),e._url=this._url,e._queryParameters=hn(this._queryParameters),e._templateValues=hn(this._templateValues),e.headers=hn(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},Qn.prototype.getBaseUri=function(e){return function(e,t){var n="",r=e.lastIndexOf("/");return-1!==r&&(n=e.substring(0,r+1)),t&&(e=new sn(e),I.defined(e.query)&&(n+="?"+e.query),I.defined(e.fragment)&&(n+="#"+e.fragment)),n}(this.getUrlComponent(e),e)},Qn.prototype.appendForwardSlash=function(){this._url=function(e){return 0!==e.length&&"/"===e[e.length-1]||(e+="/"),e}(this._url)},Qn.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},Qn.fetchArrayBuffer=function(e){return new Qn(e).fetchArrayBuffer()},Qn.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},Qn.fetchBlob=function(e){return new Qn(e).fetchBlob()},Qn.prototype.fetchImage=function(e){e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT);var t=I.defaultValue(e.preferImageBitmap,!1),n=I.defaultValue(e.preferBlob,!1),r=I.defaultValue(e.flipY,!1);if(Jn(this.request),!Yn||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return Kn({resource:this,flipY:r,preferImageBitmap:t});var a,i,s,o=this.fetchBlob();return I.defined(o)?Qn.supportsImageBitmapOptions().then(function(e){return a=e&&t,o}).then(function(e){if(I.defined(e)){if(s=e,a)return Qn.createImageBitmapFromBlob(e,{flipY:r,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return Kn({resource:i=new Qn({url:t}),flipY:r,preferImageBitmap:!1})}}).then(function(e){if(I.defined(e))return e.blob=s,a||window.URL.revokeObjectURL(i.url),e}).otherwise(function(e){return I.defined(i)&&window.URL.revokeObjectURL(i.url),e.blob=s,I.when.reject(e)}):void 0},Qn.fetchImage=function(e){return new Qn(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},Qn.prototype.fetchText=function(){return this.fetch({responseType:"text"})},Qn.fetchText=function(e){return new Qn(e).fetchText()},Qn.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(I.defined(e))return e.then(function(e){if(I.defined(e))return JSON.parse(e)})},Qn.fetchJson=function(e){return new Qn(e).fetchJson()},Qn.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},Qn.fetchXML=function(e){return new Qn(e).fetchXML()},Qn.prototype.fetchJsonp=function(e){var t;for(e=I.defaultValue(e,"callback"),Jn(this.request);t="loadJsonp"+Math.random().toString().substring(2,8),I.defined(window[t]););return function n(r,a,i){var e={};e[a]=i;r.setQueryParameters(e);var s=r.request;s.url=r.url;s.requestFunction=function(){var t=I.when.defer();return window[i]=function(e){t.resolve(e);try{delete window[i]}catch(e){window[i]=void 0}},Qn._Implementations.loadAndExecuteScript(r.url,i,t),t.promise};var t=Un.request(s);if(!I.defined(t))return;return t.otherwise(function(t){return s.state!==xn.FAILED?I.when.reject(t):r.retryOnError(t).then(function(e){return e?(s.state=xn.UNISSUED,s.deferred=void 0,n(r,a,i)):I.when.reject(t)})})}(this,e,t)},Qn.fetchJsonp=function(e){return new Qn(e).fetchJsonp(e.callbackParameterName)},Qn.prototype._makeRequest=function(o){var u=this;Jn(u.request);var l=u.request;l.url=u.url,l.requestFunction=function(){var e=o.responseType,t=pn(o.headers,u.headers),n=o.overrideMimeType,r=o.method,a=o.data,i=I.when.defer(),s=Qn._Implementations.loadWithXhr(u.url,e,r,a,t,i,n);return I.defined(s)&&I.defined(s.abort)&&(l.cancelFunction=function(){s.abort()}),i.promise};var e=Un.request(l);if(I.defined(e))return e.then(function(e){return l.cancelFunction=void 0,e}).otherwise(function(t){return l.cancelFunction=void 0,l.state!==xn.FAILED?I.when.reject(t):u.retryOnError(t).then(function(e){return e?(l.state=xn.UNISSUED,l.deferred=void 0,u.fetch(o)):I.when.reject(t)})})};var $n=/^data:(.*?)(;base64)?,(.*)$/;function er(e,t){var n=decodeURIComponent(t);return e?atob(n):n}function tr(e,t){for(var n=er(e,t),r=new ArrayBuffer(n.length),a=new Uint8Array(r),i=0;it.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;var u=t[a],l=t[i];if(u.equals(l)||r.equals(u))return or(e,n,a,o,s),s;if(r.equals(l))return or(e,n,i,o,s),s;var c=rn.secondsDifference(r,u)/rn.secondsDifference(l,u),d=a*o,f=i*o,h=n[d+e._ut1MinusUtcSecondsColumn],p=n[f+e._ut1MinusUtcSecondsColumn],m=p-h;if(.5=this._totalSamples&&(o=this._totalSamples-1);for(var u=s/this._samplesPerXysFile|0,l=o/this._samplesPerXysFile|0,c=[],d=u;d<=l;++d)c.push(_r(this,d));return I.when.all(c)},xr.prototype.computeXysRadians=function(e,t,n){var r=Or(this,e,t);if(!(r<0)){var a=r/this._stepSizeDays|0;if(!(a>=this._totalSamples)){var i=this._interpolationOrder,s=a-(i/2|0);s<0&&(s=0);var o=s+i;o>=this._totalSamples&&(s=(o=this._totalSamples-1)-i)<0&&(s=0);var u=!1,l=this._samples;if(I.defined(l[3*s])||(_r(this,s/this._samplesPerXysFile|0),u=!0),I.defined(l[3*o])||(_r(this,o/this._samplesPerXysFile|0),u=!0),!u){I.defined(n)?(n.x=0,n.y=0,n.s=0):n=new gr(0,0,0);var c,d,f=r-s*this._stepSizeDays,h=this._work,p=this._denominators,m=this._coef,y=this._xTable;for(c=0;c<=i;++c)h[c]=f-y[c];for(c=0;c<=i;++c){for(m[c]=1,d=0;d<=i;++d)d!==c&&(m[c]*=h[d]);m[c]*=p[c];var v=3*(s+c);n.x+=m[c]*l[v++],n.y+=m[c]*l[v++],n.s+=m[c]*l[v]}return n}}}};var Sr={},br={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Mr={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Ar={},Rr={east:new P.Cartesian3,north:new P.Cartesian3,up:new P.Cartesian3,west:new P.Cartesian3,south:new P.Cartesian3,down:new P.Cartesian3},Tr=new P.Cartesian3,qr=new P.Cartesian3,zr=new P.Cartesian3;Sr.localFrameToFixedFrameGenerator=function(s,o){if(!br.hasOwnProperty(s)||!br[s].hasOwnProperty(o))throw new i.DeveloperError("firstAxis and secondAxis must be east, north, up, west, south or down.");var e,u=br[s][o],t=s+o;return I.defined(Ar[t])?e=Ar[t]:(e=function(e,t,n){if(I.defined(n)||(n=new Q),P.Cartesian3.equalsEpsilon(e,P.Cartesian3.ZERO,X.CesiumMath.EPSILON14))P.Cartesian3.unpack(Mr[s],0,Tr),P.Cartesian3.unpack(Mr[o],0,qr),P.Cartesian3.unpack(Mr[u],0,zr);else if(X.CesiumMath.equalsEpsilon(e.x,0,X.CesiumMath.EPSILON14)&&X.CesiumMath.equalsEpsilon(e.y,0,X.CesiumMath.EPSILON14)){var r=X.CesiumMath.sign(e.z);P.Cartesian3.unpack(Mr[s],0,Tr),"east"!==s&&"west"!==s&&P.Cartesian3.multiplyByScalar(Tr,r,Tr),P.Cartesian3.unpack(Mr[o],0,qr),"east"!==o&&"west"!==o&&P.Cartesian3.multiplyByScalar(qr,r,qr),P.Cartesian3.unpack(Mr[u],0,zr),"east"!==u&&"west"!==u&&P.Cartesian3.multiplyByScalar(zr,r,zr)}else{(t=I.defaultValue(t,P.Ellipsoid.WGS84)).geodeticSurfaceNormal(e,Rr.up);var a=Rr.up,i=Rr.east;i.x=-e.y,i.y=e.x,i.z=0,P.Cartesian3.normalize(i,Rr.east),P.Cartesian3.cross(a,i,Rr.north),P.Cartesian3.multiplyByScalar(Rr.up,-1,Rr.down),P.Cartesian3.multiplyByScalar(Rr.east,-1,Rr.west),P.Cartesian3.multiplyByScalar(Rr.north,-1,Rr.south),Tr=Rr[s],qr=Rr[o],zr=Rr[u]}return n[0]=Tr.x,n[1]=Tr.y,n[2]=Tr.z,n[3]=0,n[4]=qr.x,n[5]=qr.y,n[6]=qr.z,n[7]=0,n[8]=zr.x,n[9]=zr.y,n[10]=zr.z,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n},Ar[t]=e),e},Sr.eastNorthUpToFixedFrame=Sr.localFrameToFixedFrameGenerator("east","north"),Sr.northEastDownToFixedFrame=Sr.localFrameToFixedFrameGenerator("north","east"),Sr.northUpEastToFixedFrame=Sr.localFrameToFixedFrameGenerator("north","up"),Sr.northWestUpToFixedFrame=Sr.localFrameToFixedFrameGenerator("north","west");var Ir=new nt,Pr=new P.Cartesian3(1,1,1),Dr=new Q;Sr.headingPitchRollToFixedFrame=function(e,t,n,r,a){r=I.defaultValue(r,Sr.eastNorthUpToFixedFrame);var i=nt.fromHeadingPitchRoll(t,Ir),s=Q.fromTranslationQuaternionRotationScale(P.Cartesian3.ZERO,i,Pr,Dr);return a=r(e,n,a),Q.multiply(a,s,a)};var Ur=new Q,Nr=new J;Sr.headingPitchRollQuaternion=function(e,t,n,r,a){var i=Sr.headingPitchRollToFixedFrame(e,t,n,r,Ur),s=Q.getMatrix3(i,Nr);return nt.fromRotationMatrix(s,a)};var Fr=new P.Cartesian3(1,1,1),Vr=new P.Cartesian3,Lr=new Q,Br=new Q,Wr=new J,jr=new nt;Sr.fixedFrameToHeadingPitchRoll=function(e,t,n,r){t=I.defaultValue(t,P.Ellipsoid.WGS84),n=I.defaultValue(n,Sr.eastNorthUpToFixedFrame),I.defined(r)||(r=new cr);var a=Q.getTranslation(e,Vr);if(P.Cartesian3.equals(a,P.Cartesian3.ZERO))return r.heading=0,r.pitch=0,r.roll=0,r;var i=Q.inverseTransformation(n(a,t,Lr),Lr),s=Q.setScale(e,Fr,Br);s=Q.setTranslation(s,P.Cartesian3.ZERO,s),i=Q.multiply(i,s,i);var o=nt.fromRotationMatrix(Q.getMatrix3(i,Wr),jr);return o=nt.normalize(o,o),cr.fromQuaternion(o,r)};var kr=X.CesiumMath.TWO_PI/86400,Yr=new rn;Sr.computeTemeToPseudoFixedMatrix=function(e,t){var n,r=(Yr=rn.addSeconds(e,-rn.computeTaiMinusUtc(e),Yr)).dayNumber,a=Yr.secondsOfDay,i=r-2451545,s=(24110.54841+(n=43200<=a?(.5+i)/Ft.DAYS_PER_JULIAN_CENTURY:(i-.5)/Ft.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+n*(.093104+-62e-7*n)))*kr%X.CesiumMath.TWO_PI+(72921158553e-15+11772758384668e-32*(r-2451545.5))*((a+.5*Ft.SECONDS_PER_DAY)%Ft.SECONDS_PER_DAY),o=Math.cos(s),u=Math.sin(s);return I.defined(t)?(t[0]=o,t[1]=-u,t[2]=0,t[3]=u,t[4]=o,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new J(o,u,0,-u,o,0,0,0,1)},Sr.iau2006XysData=new xr,Sr.earthOrientationParameters=ar.NONE;var Zr=32.184;Sr.preloadIcrfFixed=function(e){var t=e.start.dayNumber,n=e.start.secondsOfDay+Zr,r=e.stop.dayNumber,a=e.stop.secondsOfDay+Zr,i=Sr.iau2006XysData.preload(t,n,r,a),s=Sr.earthOrientationParameters.getPromiseToLoad();return I.when.all([i,s])},Sr.computeIcrfToFixedMatrix=function(e,t){I.defined(t)||(t=new J);var n=Sr.computeFixedToIcrfMatrix(e,t);if(I.defined(n))return J.transpose(n,t)};var Xr=new gr(0,0,0),Hr=new It(0,0,0,0,0,0),Jr=new J,Gr=new J;Sr.computeFixedToIcrfMatrix=function(e,t){I.defined(t)||(t=new J);var n=Sr.earthOrientationParameters.compute(e,Hr);if(I.defined(n)){var r=e.dayNumber,a=e.secondsOfDay+Zr,i=Sr.iau2006XysData.computeXysRadians(r,a,Xr);if(I.defined(i)){var s=i.x+n.xPoleOffset,o=i.y+n.yPoleOffset,u=1/(1+Math.sqrt(1-s*s-o*o)),l=Jr;l[0]=1-u*s*s,l[3]=-u*s*o,l[6]=s,l[1]=-u*s*o,l[4]=1-u*o*o,l[7]=o,l[2]=-s,l[5]=-o,l[8]=1-u*(s*s+o*o);var c=J.fromRotationZ(-i.s,Gr),d=J.multiply(l,c,Jr),f=e.dayNumber-2451545,h=(e.secondsOfDay-rn.computeTaiMinusUtc(e)+n.ut1MinusUtc)/Ft.SECONDS_PER_DAY,p=.779057273264+h+.00273781191135448*(f+h);p=p%1*X.CesiumMath.TWO_PI;var m=J.fromRotationZ(p,Gr),y=J.multiply(d,m,Jr),v=Math.cos(n.xPoleWander),w=Math.cos(n.yPoleWander),C=Math.sin(n.xPoleWander),g=Math.sin(n.yPoleWander),x=r-2451545+a/Ft.SECONDS_PER_DAY,E=-47e-6*(x/=36525)*X.CesiumMath.RADIANS_PER_DEGREE/3600,O=Math.cos(E),_=Math.sin(E),S=Gr;return S[0]=v*O,S[1]=v*_,S[2]=C,S[3]=-w*_+g*C*O,S[4]=w*O+g*C*_,S[5]=-g*v,S[6]=-g*_-w*C*O,S[7]=g*O-w*C*_,S[8]=w*v,J.multiply(y,S,t)}}};var Qr=new G;Sr.pointToWindowCoordinates=function(e,t,n,r){return(r=Sr.pointToGLWindowCoordinates(e,t,n,r)).y=2*t[5]-r.y,r},Sr.pointToGLWindowCoordinates=function(e,t,n,r){I.defined(r)||(r=new P.Cartesian2);var a=Qr;return Q.multiplyByVector(e,G.fromElements(n.x,n.y,n.z,1,a),a),G.multiplyByScalar(a,1/a.w,a),Q.multiplyByVector(t,a,a),P.Cartesian2.fromCartesian4(a,r)};var Kr=new P.Cartesian3,$r=new P.Cartesian3,ea=new P.Cartesian3;Sr.rotationMatrixFromPositionVelocity=function(e,t,n,r){var a=I.defaultValue(n,P.Ellipsoid.WGS84).geodeticSurfaceNormal(e,Kr),i=P.Cartesian3.cross(t,a,$r);P.Cartesian3.equalsEpsilon(i,P.Cartesian3.ZERO,X.CesiumMath.EPSILON6)&&(i=P.Cartesian3.clone(P.Cartesian3.UNIT_X,i));var s=P.Cartesian3.cross(i,t,ea);return P.Cartesian3.normalize(s,s),P.Cartesian3.cross(t,s,i),P.Cartesian3.negate(i,i),P.Cartesian3.normalize(i,i),I.defined(r)||(r=new J),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=i.x,r[4]=i.y,r[5]=i.z,r[6]=s.x,r[7]=s.y,r[8]=s.z,r};var ta=new Q(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),na=new P.Cartographic,ra=new P.Cartesian3,aa=new P.Cartesian3,ia=new J,sa=new Q,oa=new Q;Sr.basisTo2D=function(e,t,n){var r=Q.getTranslation(t,aa),a=e.ellipsoid,i=a.cartesianToCartographic(r,na),s=e.project(i,ra);P.Cartesian3.fromElements(s.z,s.x,s.y,s);var o=Sr.eastNorthUpToFixedFrame(r,a,sa),u=Q.inverseTransformation(o,oa),l=Q.getMatrix3(t,ia),c=Q.multiplyByMatrix3(u,l,n);return Q.multiply(ta,c,n),Q.setTranslation(n,s,n),n},Sr.wgs84To2DModelMatrix=function(e,t,n){var r=e.ellipsoid,a=Sr.eastNorthUpToFixedFrame(t,r,sa),i=Q.inverseTransformation(a,oa),s=r.cartesianToCartographic(t,na),o=e.project(s,ra);P.Cartesian3.fromElements(o.z,o.x,o.y,o);var u=Q.fromTranslation(o,sa);return Q.multiply(ta,i,n),Q.multiply(u,n,n),n},e.BoundingSphere=D,e.Cartesian4=G,e.FeatureDetection=tt,e.GeographicProjection=t,e.Intersect=s,e.Interval=o,e.Matrix3=J,e.Matrix4=Q,e.Quaternion=nt,e.Resource=Qn,e.Transforms=Sr,e.buildModuleUrl=Cr});