| 123 |
- import{a as Rt}from"./chunk-NPAFDOYL.js";import{a as U,b as q,c as Ye}from"./chunk-45OWWDV7.js";import{a as Ie}from"./chunk-6S43R6PL.js";import{a as k}from"./chunk-TW5GUTQO.js";import{a as Oe}from"./chunk-ZRLECQ27.js";import{a as X}from"./chunk-FEOWMVRK.js";import{a as we,b as Ue}from"./chunk-CUQT2UK5.js";import{a as $e}from"./chunk-CB3KB2D3.js";import{a as f,c as ee}from"./chunk-I46SWINN.js";import{a as L}from"./chunk-LNIYJJXS.js";import{a as y}from"./chunk-4D2ERGZX.js";import{a as s}from"./chunk-EDZQSM3T.js";import{a as w}from"./chunk-PJGSCWXZ.js";import{a as c}from"./chunk-NUC3LT2W.js";import{a as Ze}from"./chunk-SFC4FDPW.js";function er(e){this._ellipsoid=y(e,we.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(er.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});er.prototype.project=function(e,r){var t=this._semimajorAxis,n=e.longitude*t,a=e.latitude*t,o=e.height;return c(r)?(r.x=n,r.y=a,r.z=o,r):new f(n,a,o)};er.prototype.unproject=function(e,r){if(!c(e))throw new w("cartesian is required");var t=this._oneOverSemimajorAxis,n=e.x*t,a=e.y*t,o=e.z;return c(r)?(r.longitude=n,r.latitude=a,r.height=o,r):new ee(n,a,o)};var Me=er;var En={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},rr=Object.freeze(En);function Rn(e,r){this.start=y(e,0),this.stop=y(r,0)}var xt=Rn;function T(e,r){this.center=f.clone(y(e,f.ZERO)),this.radius=y(r,0)}var Ur=new f,Mr=new f,qr=new f,Nr=new f,jr=new f,zr=new f,Br=new f,Z=new f,Fr=new f,Lr=new f,kr=new f,Vr=new f,xn=4/3*L.PI;T.fromPoints=function(e,r){if(c(r)||(r=new T),!c(e)||e.length===0)return r.center=f.clone(f.ZERO,r.center),r.radius=0,r;var t=f.clone(e[0],Br),n=f.clone(t,Ur),a=f.clone(t,Mr),o=f.clone(t,qr),i=f.clone(t,Nr),u=f.clone(t,jr),m=f.clone(t,zr),d=e.length,h;for(h=1;h<d;h++){f.clone(e[h],t);var l=t.x,p=t.y,E=t.z;l<n.x&&f.clone(t,n),l>i.x&&f.clone(t,i),p<a.y&&f.clone(t,a),p>u.y&&f.clone(t,u),E<o.z&&f.clone(t,o),E>m.z&&f.clone(t,m)}var S=f.magnitudeSquared(f.subtract(i,n,Z)),g=f.magnitudeSquared(f.subtract(u,a,Z)),_=f.magnitudeSquared(f.subtract(m,o,Z)),A=n,F=i,N=S;g>N&&(N=g,A=a,F=u),_>N&&(N=_,A=o,F=m);var x=Fr;x.x=(A.x+F.x)*.5,x.y=(A.y+F.y)*.5,x.z=(A.z+F.z)*.5;var P=f.magnitudeSquared(f.subtract(F,x,Z)),D=Math.sqrt(P),z=Lr;z.x=n.x,z.y=a.y,z.z=o.z;var I=kr;I.x=i.x,I.y=u.y,I.z=m.z;var G=f.midpoint(z,I,Vr),K=0;for(h=0;h<d;h++){f.clone(e[h],t);var Y=f.magnitude(f.subtract(t,G,Z));Y>K&&(K=Y);var te=f.magnitudeSquared(f.subtract(t,x,Z));if(te>P){var fe=Math.sqrt(te);D=(D+fe)*.5,P=D*D;var oe=fe-D;x.x=(D*x.x+oe*t.x)/fe,x.y=(D*x.y+oe*t.y)/fe,x.z=(D*x.z+oe*t.z)/fe}}return D<K?(f.clone(x,r.center),r.radius=D):(f.clone(G,r.center),r.radius=K),r};var Tn=new Me,Cn=new f,_n=new f,Dr=new ee,Ir=new ee;T.fromRectangle2D=function(e,r,t){return T.fromRectangleWithHeights2D(e,r,0,0,t)};T.fromRectangleWithHeights2D=function(e,r,t,n,a){if(c(a)||(a=new T),!c(e))return a.center=f.clone(f.ZERO,a.center),a.radius=0,a;r=y(r,Tn),Ue.southwest(e,Dr),Dr.height=t,Ue.northeast(e,Ir),Ir.height=n;var o=r.project(Dr,Cn),i=r.project(Ir,_n),u=i.x-o.x,m=i.y-o.y,d=i.z-o.z;a.radius=Math.sqrt(u*u+m*m+d*d)*.5;var h=a.center;return h.x=o.x+u*.5,h.y=o.y+m*.5,h.z=o.z+d*.5,a};var Pn=[];T.fromRectangle3D=function(e,r,t,n){if(r=y(r,we.WGS84),t=y(t,0),c(n)||(n=new T),!c(e))return n.center=f.clone(f.ZERO,n.center),n.radius=0,n;var a=Ue.subsample(e,r,t,Pn);return T.fromPoints(a,n)};T.fromVertices=function(e,r,t,n){if(c(n)||(n=new T),!c(e)||e.length===0)return n.center=f.clone(f.ZERO,n.center),n.radius=0,n;r=y(r,f.ZERO),t=y(t,3),s.typeOf.number.greaterThanOrEquals("stride",t,3);var a=Br;a.x=e[0]+r.x,a.y=e[1]+r.y,a.z=e[2]+r.z;var o=f.clone(a,Ur),i=f.clone(a,Mr),u=f.clone(a,qr),m=f.clone(a,Nr),d=f.clone(a,jr),h=f.clone(a,zr),l=e.length,p;for(p=0;p<l;p+=t){var E=e[p]+r.x,S=e[p+1]+r.y,g=e[p+2]+r.z;a.x=E,a.y=S,a.z=g,E<o.x&&f.clone(a,o),E>m.x&&f.clone(a,m),S<i.y&&f.clone(a,i),S>d.y&&f.clone(a,d),g<u.z&&f.clone(a,u),g>h.z&&f.clone(a,h)}var _=f.magnitudeSquared(f.subtract(m,o,Z)),A=f.magnitudeSquared(f.subtract(d,i,Z)),F=f.magnitudeSquared(f.subtract(h,u,Z)),N=o,x=m,P=_;A>P&&(P=A,N=i,x=d),F>P&&(P=F,N=u,x=h);var D=Fr;D.x=(N.x+x.x)*.5,D.y=(N.y+x.y)*.5,D.z=(N.z+x.z)*.5;var z=f.magnitudeSquared(f.subtract(x,D,Z)),I=Math.sqrt(z),G=Lr;G.x=o.x,G.y=i.y,G.z=u.z;var K=kr;K.x=m.x,K.y=d.y,K.z=h.z;var Y=f.midpoint(G,K,Vr),te=0;for(p=0;p<l;p+=t){a.x=e[p]+r.x,a.y=e[p+1]+r.y,a.z=e[p+2]+r.z;var fe=f.magnitude(f.subtract(a,Y,Z));fe>te&&(te=fe);var oe=f.magnitudeSquared(f.subtract(a,D,Z));if(oe>z){var he=Math.sqrt(oe);I=(I+he)*.5,z=I*I;var Ar=he-I;D.x=(I*D.x+Ar*a.x)/he,D.y=(I*D.y+Ar*a.y)/he,D.z=(I*D.z+Ar*a.z)/he}}return I<te?(f.clone(D,n.center),n.radius=I):(f.clone(Y,n.center),n.radius=te),n};T.fromEncodedCartesianVertices=function(e,r,t){if(c(t)||(t=new T),!c(e)||!c(r)||e.length!==r.length||e.length===0)return t.center=f.clone(f.ZERO,t.center),t.radius=0,t;var n=Br;n.x=e[0]+r[0],n.y=e[1]+r[1],n.z=e[2]+r[2];var a=f.clone(n,Ur),o=f.clone(n,Mr),i=f.clone(n,qr),u=f.clone(n,Nr),m=f.clone(n,jr),d=f.clone(n,zr),h=e.length,l;for(l=0;l<h;l+=3){var p=e[l]+r[l],E=e[l+1]+r[l+1],S=e[l+2]+r[l+2];n.x=p,n.y=E,n.z=S,p<a.x&&f.clone(n,a),p>u.x&&f.clone(n,u),E<o.y&&f.clone(n,o),E>m.y&&f.clone(n,m),S<i.z&&f.clone(n,i),S>d.z&&f.clone(n,d)}var g=f.magnitudeSquared(f.subtract(u,a,Z)),_=f.magnitudeSquared(f.subtract(m,o,Z)),A=f.magnitudeSquared(f.subtract(d,i,Z)),F=a,N=u,x=g;_>x&&(x=_,F=o,N=m),A>x&&(x=A,F=i,N=d);var P=Fr;P.x=(F.x+N.x)*.5,P.y=(F.y+N.y)*.5,P.z=(F.z+N.z)*.5;var D=f.magnitudeSquared(f.subtract(N,P,Z)),z=Math.sqrt(D),I=Lr;I.x=a.x,I.y=o.y,I.z=i.z;var G=kr;G.x=u.x,G.y=m.y,G.z=d.z;var K=f.midpoint(I,G,Vr),Y=0;for(l=0;l<h;l+=3){n.x=e[l]+r[l],n.y=e[l+1]+r[l+1],n.z=e[l+2]+r[l+2];var te=f.magnitude(f.subtract(n,K,Z));te>Y&&(Y=te);var fe=f.magnitudeSquared(f.subtract(n,P,Z));if(fe>D){var oe=Math.sqrt(fe);z=(z+oe)*.5,D=z*z;var he=oe-z;P.x=(z*P.x+he*n.x)/oe,P.y=(z*P.y+he*n.y)/oe,P.z=(z*P.z+he*n.z)/oe}}return z<Y?(f.clone(P,t.center),t.radius=z):(f.clone(K,t.center),t.radius=Y),t};T.fromCornerPoints=function(e,r,t){s.typeOf.object("corner",e),s.typeOf.object("oppositeCorner",r),c(t)||(t=new T);var n=f.midpoint(e,r,t.center);return t.radius=f.distance(n,r),t};T.fromEllipsoid=function(e,r){return s.typeOf.object("ellipsoid",e),c(r)||(r=new T),f.clone(f.ZERO,r.center),r.radius=e.maximumRadius,r};var An=new f;T.fromBoundingSpheres=function(e,r){if(c(r)||(r=new T),!c(e)||e.length===0)return r.center=f.clone(f.ZERO,r.center),r.radius=0,r;var t=e.length;if(t===1)return T.clone(e[0],r);if(t===2)return T.union(e[0],e[1],r);var n=[],a;for(a=0;a<t;a++)n.push(e[a].center);r=T.fromPoints(n,r);var o=r.center,i=r.radius;for(a=0;a<t;a++){var u=e[a];i=Math.max(i,f.distance(o,u.center,An)+u.radius)}return r.radius=i,r};var Dn=new f,In=new f,Un=new f;T.fromOrientedBoundingBox=function(e,r){s.defined("orientedBoundingBox",e),c(r)||(r=new T);var t=e.halfAxes,n=U.getColumn(t,0,Dn),a=U.getColumn(t,1,In),o=U.getColumn(t,2,Un);return f.add(n,a,n),f.add(n,o,n),r.center=f.clone(e.center,r.center),r.radius=f.magnitude(n),r};T.clone=function(e,r){if(!!c(e))return c(r)?(r.center=f.clone(e.center,r.center),r.radius=e.radius,r):new T(e.center,e.radius)};T.packedLength=4;T.pack=function(e,r,t){s.typeOf.object("value",e),s.defined("array",r),t=y(t,0);var n=e.center;return r[t++]=n.x,r[t++]=n.y,r[t++]=n.z,r[t]=e.radius,r};T.unpack=function(e,r,t){s.defined("array",e),r=y(r,0),c(t)||(t=new T);var n=t.center;return n.x=e[r++],n.y=e[r++],n.z=e[r++],t.radius=e[r],t};var Mn=new f,qn=new f;T.union=function(e,r,t){s.typeOf.object("left",e),s.typeOf.object("right",r),c(t)||(t=new T);var n=e.center,a=e.radius,o=r.center,i=r.radius,u=f.subtract(o,n,Mn),m=f.magnitude(u);if(a>=m+i)return e.clone(t),t;if(i>=m+a)return r.clone(t),t;var d=(a+m+i)*.5,h=f.multiplyByScalar(u,(-a+d)/m,qn);return f.add(h,n,h),f.clone(h,t.center),t.radius=d,t};var Nn=new f;T.expand=function(e,r,t){s.typeOf.object("sphere",e),s.typeOf.object("point",r),t=T.clone(e,t);var n=f.magnitude(f.subtract(r,t.center,Nn));return n>t.radius&&(t.radius=n),t};T.intersectPlane=function(e,r){s.typeOf.object("sphere",e),s.typeOf.object("plane",r);var t=e.center,n=e.radius,a=r.normal,o=f.dot(a,t)+r.distance;return o<-n?rr.OUTSIDE:o<n?rr.INTERSECTING:rr.INSIDE};T.transform=function(e,r,t){return s.typeOf.object("sphere",e),s.typeOf.object("transform",r),c(t)||(t=new T),t.center=q.multiplyByPoint(r,e.center,t.center),t.radius=q.getMaximumScale(r)*e.radius,t};var jn=new f;T.distanceSquaredTo=function(e,r){s.typeOf.object("sphere",e),s.typeOf.object("cartesian",r);var t=f.subtract(e.center,r,jn);return f.magnitudeSquared(t)-e.radius*e.radius};T.transformWithoutScale=function(e,r,t){return s.typeOf.object("sphere",e),s.typeOf.object("transform",r),c(t)||(t=new T),t.center=q.multiplyByPoint(r,e.center,t.center),t.radius=e.radius,t};var zn=new f;T.computePlaneDistances=function(e,r,t,n){s.typeOf.object("sphere",e),s.typeOf.object("position",r),s.typeOf.object("direction",t),c(n)||(n=new xt);var a=f.subtract(e.center,r,zn),o=f.dot(t,a);return n.start=o-e.radius,n.stop=o+e.radius,n};var Tt=new f,Bn=new f,Fn=new f,Ln=new f,kn=new f,Vn=new ee,Ct=new Array(8);for(tr=0;tr<8;++tr)Ct[tr]=new f;var tr,Yn=new Me;T.projectTo2D=function(e,r,t){s.typeOf.object("sphere",e),r=y(r,Yn);var n=r.ellipsoid,a=e.center,o=e.radius,i;f.equals(a,f.ZERO)?i=f.clone(f.UNIT_X,Tt):i=n.geodeticSurfaceNormal(a,Tt);var u=f.cross(f.UNIT_Z,i,Bn);f.normalize(u,u);var m=f.cross(i,u,Fn);f.normalize(m,m),f.multiplyByScalar(i,o,i),f.multiplyByScalar(m,o,m),f.multiplyByScalar(u,o,u);var d=f.negate(m,kn),h=f.negate(u,Ln),l=Ct,p=l[0];f.add(i,m,p),f.add(p,u,p),p=l[1],f.add(i,m,p),f.add(p,h,p),p=l[2],f.add(i,d,p),f.add(p,h,p),p=l[3],f.add(i,d,p),f.add(p,u,p),f.negate(i,i),p=l[4],f.add(i,m,p),f.add(p,u,p),p=l[5],f.add(i,m,p),f.add(p,h,p),p=l[6],f.add(i,d,p),f.add(p,h,p),p=l[7],f.add(i,d,p),f.add(p,u,p);for(var E=l.length,S=0;S<E;++S){var g=l[S];f.add(a,g,g);var _=n.cartesianToCartographic(g,Vn);r.project(_,g)}t=T.fromPoints(l,t),a=t.center;var A=a.x,F=a.y,N=a.z;return a.x=N,a.y=A,a.z=F,t};T.isOccluded=function(e,r){return s.typeOf.object("sphere",e),s.typeOf.object("occluder",r),!r.isBoundingSphereVisible(e)};T.equals=function(e,r){return e===r||c(e)&&c(r)&&f.equals(e.center,r.center)&&e.radius===r.radius};T.prototype.intersectPlane=function(e){return T.intersectPlane(this,e)};T.prototype.distanceSquaredTo=function(e){return T.distanceSquaredTo(this,e)};T.prototype.computePlaneDistances=function(e,r,t){return T.computePlaneDistances(this,e,r,t)};T.prototype.isOccluded=function(e){return T.isOccluded(this,e)};T.prototype.equals=function(e){return T.equals(this,e)};T.prototype.clone=function(e){return T.clone(this,e)};T.prototype.volume=function(){var e=this.radius;return xn*e*e*e};var mi=T;function Wn(e,r,t){s.defined("array",e),s.defined("itemToFind",r),s.defined("comparator",t);for(var n=0,a=e.length-1,o,i;n<=a;){if(o=~~((n+a)/2),i=t(e[o],r),i<0){n=o+1;continue}if(i>0){a=o-1;continue}return o}return~(a+1)}var _e=Wn;function Hn(e,r,t,n,a){this.xPoleWander=e,this.yPoleWander=r,this.xPoleOffset=t,this.yPoleOffset=n,this.ut1MinusUtc=a}var We=Hn;function Gn(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,r=arguments,t=0,n=r[t++],a=function(d,h,l,p){l||(l=" ");var E=d.length>=h?"":Array(1+h-d.length>>>0).join(l);return p?d+E:E+d},o=function(d,h,l,p,E,S){var g=p-d.length;return g>0&&(l||!E?d=a(d,p,S,l):d=d.slice(0,h.length)+a("",g,"0",!0)+d.slice(h.length)),d},i=function(d,h,l,p,E,S,g){var _=d>>>0;return l=l&&_&&{2:"0b",8:"0",16:"0x"}[h]||"",d=l+a(_.toString(h),S||0,"0",!1),o(d,l,p,E,g)},u=function(d,h,l,p,E,S){return p!=null&&(d=d.slice(0,p)),o(d,"",h,l,E,S)},m=function(d,h,l,p,E,S,g){var _,A,F,N,x;if(d=="%%")return"%";for(var P=!1,D="",z=!1,I=!1,G=" ",K=l.length,Y=0;l&&Y<K;Y++)switch(l.charAt(Y)){case" ":D=" ";break;case"+":D="+";break;case"-":P=!0;break;case"'":G=l.charAt(Y+1);break;case"0":z=!0;break;case"#":I=!0;break}if(p?p=="*"?p=+r[t++]:p.charAt(0)=="*"?p=+r[p.slice(1,-1)]:p=+p:p=0,p<0&&(p=-p,P=!0),!isFinite(p))throw new Error("sprintf: (minimum-)width must be finite");switch(S?S=="*"?S=+r[t++]:S.charAt(0)=="*"?S=+r[S.slice(1,-1)]:S=+S:S="fFeE".indexOf(g)>-1?6:g=="d"?0:void 0,x=h?r[h.slice(0,-1)]:r[t++],g){case"s":return u(String(x),P,p,S,z,G);case"c":return u(String.fromCharCode(+x),P,p,S,z);case"b":return i(x,2,I,P,p,S,z);case"o":return i(x,8,I,P,p,S,z);case"x":return i(x,16,I,P,p,S,z);case"X":return i(x,16,I,P,p,S,z).toUpperCase();case"u":return i(x,10,I,P,p,S,z);case"i":case"d":return _=+x||0,_=Math.round(_-_%1),A=_<0?"-":D,x=A+a(String(Math.abs(_)),S,"0",!1),o(x,A,P,p,z);case"e":case"E":case"f":case"F":case"g":case"G":return _=+x,A=_<0?"-":D,F=["toExponential","toFixed","toPrecision"]["efg".indexOf(g.toLowerCase())],N=["toString","toUpperCase"]["eEfFgG".indexOf(g)%2],x=A+Math.abs(_)[F](S),o(x,A,P,p,z)[N]();default:return d}};return n.replace(e,m)}var nr=Gn;function Kn(e,r,t,n,a,o,i,u){this.year=e,this.month=r,this.day=t,this.hour=n,this.minute=a,this.second=o,this.millisecond=i,this.isLeapSecond=u}var ar=Kn;function Xn(e){if(e===null||isNaN(e))throw new w("year is required and must be a number.");return e%4===0&&e%100!==0||e%400===0}var Yr=Xn;function Qn(e,r){this.julianDate=e,this.offset=r}var V=Qn;var Jn={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},W=Object.freeze(Jn);var Zn={UTC:0,TAI:1},M=Object.freeze(Zn);var Pt=new ar,or=[31,28,31,30,31,30,31,31,30,31,30,31],ir=29;function Wr(e,r){return O.compare(e.julianDate,r.julianDate)}var qe=new V;function cr(e){qe.julianDate=e;var r=O.leapSeconds,t=_e(r,qe,Wr);t<0&&(t=~t),t>=r.length&&(t=r.length-1);var n=r[t].offset;if(t>0){var a=O.secondsDifference(r[t].julianDate,e);a>n&&(t--,n=r[t].offset)}O.addSeconds(e,n,e)}function _t(e,r){qe.julianDate=e;var t=O.leapSeconds,n=_e(t,qe,Wr);if(n<0&&(n=~n),n===0)return O.addSeconds(e,-t[0].offset,r);if(n>=t.length)return O.addSeconds(e,-t[n-1].offset,r);var a=O.secondsDifference(t[n].julianDate,e);if(a===0)return O.addSeconds(e,-t[n].offset,r);if(!(a<=1))return O.addSeconds(e,-t[--n].offset,r)}function be(e,r,t){var n=r/W.SECONDS_PER_DAY|0;return e+=n,r-=W.SECONDS_PER_DAY*n,r<0&&(e--,r+=W.SECONDS_PER_DAY),t.dayNumber=e,t.secondsOfDay=r,t}function Hr(e,r,t,n,a,o,i){var u=(r-14)/12|0,m=e+4800+u,d=(1461*m/4|0)+(367*(r-2-12*u)/12|0)-(3*((m+100)/100|0)/4|0)+t-32075;n=n-12,n<0&&(n+=24);var h=o+(n*W.SECONDS_PER_HOUR+a*W.SECONDS_PER_MINUTE+i*W.SECONDS_PER_MILLISECOND);return h>=43200&&(d-=1),[d,h]}var $n=/^(\d{4})$/,ea=/^(\d{4})-(\d{2})$/,ra=/^(\d{4})-?(\d{3})$/,ta=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,na=/^(\d{4})-?(\d{2})-?(\d{2})$/,Gr=/([Z+\-])?(\d{2})?:?(\d{2})?$/,aa=/^(\d{2})(\.\d+)?/.source+Gr.source,oa=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Gr.source,ia=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Gr.source,ce="Invalid ISO 8601 date.";function O(e,r,t){this.dayNumber=void 0,this.secondsOfDay=void 0,e=y(e,0),r=y(r,0),t=y(t,M.UTC);var n=e|0;r=r+(e-n)*W.SECONDS_PER_DAY,be(n,r,this),t===M.UTC&&cr(this)}O.fromGregorianDate=function(e,r){if(!(e instanceof ar))throw new w("date must be a valid GregorianDate.");var t=Hr(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return c(r)?(be(t[0],t[1],r),cr(r),r):new O(t[0],t[1],M.UTC)};O.fromDate=function(e,r){if(!(e instanceof Date)||isNaN(e.getTime()))throw new w("date must be a valid JavaScript Date.");var t=Hr(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return c(r)?(be(t[0],t[1],r),cr(r),r):new O(t[0],t[1],M.UTC)};O.fromIso8601=function(e,r){if(typeof e!="string")throw new w(ce);e=e.replace(",",".");var t=e.split("T"),n,a=1,o=1,i=0,u=0,m=0,d=0,h=t[0],l=t[1],p,E;if(!c(h))throw new w(ce);var S;if(t=h.match(na),t!==null){if(S=h.split("-").length-1,S>0&&S!==2)throw new w(ce);n=+t[1],a=+t[2],o=+t[3]}else if(t=h.match(ea),t!==null)n=+t[1],a=+t[2];else if(t=h.match($n),t!==null)n=+t[1];else{var g;if(t=h.match(ra),t!==null){if(n=+t[1],g=+t[2],E=Yr(n),g<1||E&&g>366||!E&&g>365)throw new w(ce)}else if(t=h.match(ta),t!==null){n=+t[1];var _=+t[2],A=+t[3]||0;if(S=h.split("-").length-1,S>0&&(!c(t[3])&&S!==1||c(t[3])&&S!==2))throw new w(ce);var F=new Date(Date.UTC(n,0,4));g=_*7+A-F.getUTCDay()-3}else throw new w(ce);p=new Date(Date.UTC(n,0,1)),p.setUTCDate(g),a=p.getUTCMonth()+1,o=p.getUTCDate()}if(E=Yr(n),a<1||a>12||o<1||(a!==2||!E)&&o>or[a-1]||E&&a===2&&o>ir)throw new w(ce);var N;if(c(l)){if(t=l.match(ia),t!==null){if(S=l.split(":").length-1,S>0&&S!==2&&S!==3)throw new w(ce);i=+t[1],u=+t[2],m=+t[3],d=+(t[4]||0)*1e3,N=5}else if(t=l.match(oa),t!==null){if(S=l.split(":").length-1,S>2)throw new w(ce);i=+t[1],u=+t[2],m=+(t[3]||0)*60,N=4}else if(t=l.match(aa),t!==null)i=+t[1],u=+(t[2]||0)*60,N=3;else throw new w(ce);if(u>=60||m>=61||i>24||i===24&&(u>0||m>0||d>0))throw new w(ce);var x=t[N],P=+t[N+1],D=+(t[N+2]||0);switch(x){case"+":i=i-P,u=u-D;break;case"-":i=i+P,u=u+D;break;case"Z":break;default:u=u+new Date(Date.UTC(n,a-1,o,i,u)).getTimezoneOffset();break}}var z=m===60;for(z&&m--;u>=60;)u-=60,i++;for(;i>=24;)i-=24,o++;for(p=E&&a===2?ir:or[a-1];o>p;)o-=p,a++,a>12&&(a-=12,n++),p=E&&a===2?ir:or[a-1];for(;u<0;)u+=60,i--;for(;i<0;)i+=24,o--;for(;o<1;)a--,a<1&&(a+=12,n--),p=E&&a===2?ir:or[a-1],o+=p;var I=Hr(n,a,o,i,u,m,d);return c(r)?(be(I[0],I[1],r),cr(r)):r=new O(I[0],I[1],M.UTC),z&&O.addSeconds(r,1,r),r};O.now=function(e){return O.fromDate(new Date,e)};var fr=new O(0,0,M.TAI);O.toGregorianDate=function(e,r){if(!c(e))throw new w("julianDate is required.");var t=!1,n=_t(e,fr);c(n)||(O.addSeconds(e,-1,fr),n=_t(fr,fr),t=!0);var a=n.dayNumber,o=n.secondsOfDay;o>=43200&&(a+=1);var i=a+68569|0,u=4*i/146097|0;i=i-((146097*u+3)/4|0)|0;var m=4e3*(i+1)/1461001|0;i=i-(1461*m/4|0)+31|0;var d=80*i/2447|0,h=i-(2447*d/80|0)|0;i=d/11|0;var l=d+2-12*i|0,p=100*(u-49)+m+i|0,E=o/W.SECONDS_PER_HOUR|0,S=o-E*W.SECONDS_PER_HOUR,g=S/W.SECONDS_PER_MINUTE|0;S=S-g*W.SECONDS_PER_MINUTE;var _=S|0,A=(S-_)/W.SECONDS_PER_MILLISECOND;return E+=12,E>23&&(E-=24),t&&(_+=1),c(r)?(r.year=p,r.month=l,r.day=h,r.hour=E,r.minute=g,r.second=_,r.millisecond=A,r.isLeapSecond=t,r):new ar(p,l,h,E,g,_,A,t)};O.toDate=function(e){if(!c(e))throw new w("julianDate is required.");var r=O.toGregorianDate(e,Pt),t=r.second;return r.isLeapSecond&&(t-=1),new Date(Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,t,r.millisecond))};O.toIso8601=function(e,r){if(!c(e))throw new w("julianDate is required.");var t=O.toGregorianDate(e,Pt),n=t.year,a=t.month,o=t.day,i=t.hour,u=t.minute,m=t.second,d=t.millisecond;n===1e4&&a===1&&o===1&&i===0&&u===0&&m===0&&d===0&&(n=9999,a=12,o=31,i=24);var h;return!c(r)&&d!==0?(h=(d*.01).toString().replace(".",""),nr("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,a,o,i,u,m,h)):!c(r)||r===0?nr("%04d-%02d-%02dT%02d:%02d:%02dZ",n,a,o,i,u,m):(h=(d*.01).toFixed(r).replace(".","").slice(0,r),nr("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,a,o,i,u,m,h))};O.clone=function(e,r){if(!!c(e))return c(r)?(r.dayNumber=e.dayNumber,r.secondsOfDay=e.secondsOfDay,r):new O(e.dayNumber,e.secondsOfDay,M.TAI)};O.compare=function(e,r){if(!c(e))throw new w("left is required.");if(!c(r))throw new w("right is required.");var t=e.dayNumber-r.dayNumber;return t!==0?t:e.secondsOfDay-r.secondsOfDay};O.equals=function(e,r){return e===r||c(e)&&c(r)&&e.dayNumber===r.dayNumber&&e.secondsOfDay===r.secondsOfDay};O.equalsEpsilon=function(e,r,t){if(!c(t))throw new w("epsilon is required.");return e===r||c(e)&&c(r)&&Math.abs(O.secondsDifference(e,r))<=t};O.totalDays=function(e){if(!c(e))throw new w("julianDate is required.");return e.dayNumber+e.secondsOfDay/W.SECONDS_PER_DAY};O.secondsDifference=function(e,r){if(!c(e))throw new w("left is required.");if(!c(r))throw new w("right is required.");var t=(e.dayNumber-r.dayNumber)*W.SECONDS_PER_DAY;return t+(e.secondsOfDay-r.secondsOfDay)};O.daysDifference=function(e,r){if(!c(e))throw new w("left is required.");if(!c(r))throw new w("right is required.");var t=e.dayNumber-r.dayNumber,n=(e.secondsOfDay-r.secondsOfDay)/W.SECONDS_PER_DAY;return t+n};O.computeTaiMinusUtc=function(e){qe.julianDate=e;var r=O.leapSeconds,t=_e(r,qe,Wr);return t<0&&(t=~t,--t,t<0&&(t=0)),r[t].offset};O.addSeconds=function(e,r,t){if(!c(e))throw new w("julianDate is required.");if(!c(r))throw new w("seconds is required.");if(!c(t))throw new w("result is required.");return be(e.dayNumber,e.secondsOfDay+r,t)};O.addMinutes=function(e,r,t){if(!c(e))throw new w("julianDate is required.");if(!c(r))throw new w("minutes is required.");if(!c(t))throw new w("result is required.");var n=e.secondsOfDay+r*W.SECONDS_PER_MINUTE;return be(e.dayNumber,n,t)};O.addHours=function(e,r,t){if(!c(e))throw new w("julianDate is required.");if(!c(r))throw new w("hours is required.");if(!c(t))throw new w("result is required.");var n=e.secondsOfDay+r*W.SECONDS_PER_HOUR;return be(e.dayNumber,n,t)};O.addDays=function(e,r,t){if(!c(e))throw new w("julianDate is required.");if(!c(r))throw new w("days is required.");if(!c(t))throw new w("result is required.");var n=e.dayNumber+r;return be(n,e.secondsOfDay,t)};O.lessThan=function(e,r){return O.compare(e,r)<0};O.lessThanOrEquals=function(e,r){return O.compare(e,r)<=0};O.greaterThan=function(e,r){return O.compare(e,r)>0};O.greaterThanOrEquals=function(e,r){return O.compare(e,r)>=0};O.prototype.clone=function(e){return O.clone(this,e)};O.prototype.equals=function(e){return O.equals(this,e)};O.prototype.equalsEpsilon=function(e,r){return O.equalsEpsilon(this,e,r)};O.prototype.toString=function(){return O.toIso8601(this)};O.leapSeconds=[new V(new O(2441317,43210,M.TAI),10),new V(new O(2441499,43211,M.TAI),11),new V(new O(2441683,43212,M.TAI),12),new V(new O(2442048,43213,M.TAI),13),new V(new O(2442413,43214,M.TAI),14),new V(new O(2442778,43215,M.TAI),15),new V(new O(2443144,43216,M.TAI),16),new V(new O(2443509,43217,M.TAI),17),new V(new O(2443874,43218,M.TAI),18),new V(new O(2444239,43219,M.TAI),19),new V(new O(2444786,43220,M.TAI),20),new V(new O(2445151,43221,M.TAI),21),new V(new O(2445516,43222,M.TAI),22),new V(new O(2446247,43223,M.TAI),23),new V(new O(2447161,43224,M.TAI),24),new V(new O(2447892,43225,M.TAI),25),new V(new O(2448257,43226,M.TAI),26),new V(new O(2448804,43227,M.TAI),27),new V(new O(2449169,43228,M.TAI),28),new V(new O(2449534,43229,M.TAI),29),new V(new O(2450083,43230,M.TAI),30),new V(new O(2450630,43231,M.TAI),31),new V(new O(2451179,43232,M.TAI),32),new V(new O(2453736,43233,M.TAI),33),new V(new O(2454832,43234,M.TAI),34),new V(new O(2456109,43235,M.TAI),35),new V(new O(2457204,43236,M.TAI),36),new V(new O(2457754,43237,M.TAI),37)];var $=O;function Q(e){if(e instanceof Q)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var r=fa.exec(e);this.scheme=r[1],this.authority=r[2],this.path=r[3],this.query=r[4],this.fragment=r[5]}}Q.prototype.scheme=null;Q.prototype.authority=null;Q.prototype.path="";Q.prototype.query=null;Q.prototype.fragment=null;var fa=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");Q.prototype.getScheme=function(){return this.scheme};Q.prototype.getAuthority=function(){return this.authority};Q.prototype.getPath=function(){return this.path};Q.prototype.getQuery=function(){return this.query};Q.prototype.getFragment=function(){return this.fragment};Q.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment};Q.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query};Q.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment};Q.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(ua,sa).replace(ur,sr)),this.path&&(this.path=this.path.replace(ur,sr)),this.query&&(this.query=this.query.replace(ur,sr)),this.fragment&&(this.fragment=this.fragment.replace(ur,sr))};var ur=/%[0-9a-z]{2}/gi,ca=/[a-zA-Z0-9\-\._~]/,ua=/(.*@)?([^@:]*)(:.*)?/;function sr(e){var r=unescape(e);return ca.test(r)?r:e.toUpperCase()}function sa(e,r,t,n){return(r||"")+t.toLowerCase()+(n||"")}Q.prototype.resolve=function(e){var r=new Q;return this.scheme?(r.scheme=this.scheme,r.authority=this.authority,r.path=this.path,r.query=this.query):(r.scheme=e.scheme,this.authority?(r.authority=this.authority,r.path=this.path,r.query=this.query):(r.authority=e.authority,this.path==""?(r.path=e.path,r.query=this.query||e.query):(this.path.charAt(0)=="/"?(r.path=this.path,r.removeDotSegments()):(e.authority&&e.path==""?r.path="/"+this.path:r.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,r.removeDotSegments()),r.query=this.query))),r.fragment=this.fragment,r};Q.prototype.removeDotSegments=function(){var e=this.path.split("/"),r=[],t,n=e[0]=="";n&&e.shift();for(var a=e[0]==""?e.shift():null;e.length;)t=e.shift(),t==".."?r.pop():t!="."&&r.push(t);(t=="."||t=="..")&&r.push(""),n&&r.unshift(""),this.path=r.join("/")};Q.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e};var J=Q;function ma(e){return(e.length===0||e[e.length-1]!=="/")&&(e=e+"/"),e}var At=ma;function Dt(e,r){if(e===null||typeof e!="object")return e;r=y(r,!1);var t=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];r&&(a=Dt(a,r)),t[n]=a}return t}var Ne=Dt;function It(e,r,t){t=y(t,!1);var n={},a=c(e),o=c(r),i,u,m;if(a)for(i in e)e.hasOwnProperty(i)&&(u=e[i],o&&t&&typeof u=="object"&&r.hasOwnProperty(i)?(m=r[i],typeof m=="object"?n[i]=It(u,m,t):n[i]=u):n[i]=u);if(o)for(i in r)r.hasOwnProperty(i)&&!n.hasOwnProperty(i)&&(m=r[i],n[i]=m);return n}var Se=It;function Kr(e,r){var t;return typeof document<"u"&&(t=document),Kr._implementation(e,r,t)}Kr._implementation=function(e,r,t){if(!c(e))throw new w("relative uri is required.");if(!c(r)){if(typeof t>"u")return e;r=y(t.baseURI,t.location.href)}var n=new J(r),a=new J(e);return a.resolve(n).toString()};var mr=Kr;function da(e,r){if(!c(e))throw new w("uri is required.");var t="",n=e.lastIndexOf("/");return n!==-1&&(t=e.substring(0,n+1)),r&&(e=new J(e),c(e.query)&&(t+="?"+e.query),c(e.fragment)&&(t+="#"+e.fragment)),t}var Ut=da;function pa(e){if(!c(e))throw new w("uri is required.");var r=new J(e);r.normalize();var t=r.path,n=t.lastIndexOf("/");return n!==-1&&(t=t.substr(n+1)),n=t.lastIndexOf("."),n===-1?t="":t=t.substr(n+1),t}var Mt=pa;var ha=/^blob:/i;function la(e){return s.typeOf.string("uri",e),ha.test(e)}var dr=la;var me;function va(e){c(me)||(me=document.createElement("a")),me.href=window.location.href;var r=me.host,t=me.protocol;return me.href=e,me.href=me.href,t!==me.protocol||r!==me.host}var qt=va;var ya=/^data:/i;function wa(e){return s.typeOf.string("uri",e),ya.test(e)}var pr=wa;function Oa(e){var r=k.defer(),t=document.createElement("script");t.async=!0,t.src=e;var n=document.getElementsByTagName("head")[0];return t.onload=function(){t.onload=void 0,n.removeChild(t),r.resolve()},t.onerror=function(a){r.reject(a)},n.appendChild(t),r.promise}var Nt=Oa;function ba(e,r){if(!c(e))throw new w("obj is required.");var t="";for(var n in e)if(e.hasOwnProperty(n)){var a=e[n],o=encodeURIComponent(n)+"=";if(Array.isArray(a))for(var i=0,u=a.length;i<u;++i)r===!0?t+=o+encodeURI(a[i])+"&":t+=o+encodeURIComponent(a[i])+"&";else r===!0?t+=o+encodeURI(a)+"&":t+=o+encodeURIComponent(a)+"&"}return t=t.slice(0,-1),t}var jt=ba;function Sa(e){if(!c(e))throw new w("queryString is required.");var r={};if(e==="")return r;for(var t=e.replace(/\+/g,"%20").split(/[&;]/),n=0,a=t.length;n<a;++n){var o=t[n].split("=");if(o.length>2){var i=t[n].indexOf("="),u=t[n].substring(0,i),m=t[n].substring(i+1,t[n].length);o=[u,m]}var d=decodeURIComponent(o[0]),h=o[1];c(h)?h=decodeURIComponent(h):h="";var l=r[d];typeof l=="string"?r[d]=[l,h]:Array.isArray(l)?l.push(h):r[d]=h}return r}var zt=Sa;var ga={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},H=Object.freeze(ga);var Ea={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3,PACK:4,BLOCK:5,BLOCKPACK:6},ie=Object.freeze(Ea);function hr(e){e=y(e,y.EMPTY_OBJECT);var r=y(e.throttleByServer,!1),t=y(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=y(e.priority,0),this.throttle=t,this.throttleByServer=r,this.type=y(e.type,ie.OTHER),this.serverKey=void 0,this.state=H.UNISSUED,this.deferred=void 0,this.cancelled=!1}hr.prototype.cancel=function(){this.cancelled=!0};hr.prototype.clone=function(e){return c(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new hr(this)};var Bt=hr;function Ra(e){var r={};if(!e)return r;for(var t=e.split(`\r
- `),n=0;n<t.length;++n){var a=t[n],o=a.indexOf(": ");if(o>0){var i=a.substring(0,o),u=a.substring(o+2);r[i]=u}}return r}var Ft=Ra;function Lt(e,r,t){this.statusCode=e,this.response=r,this.responseHeaders=t,typeof this.responseHeaders=="string"&&(this.responseHeaders=Ft(this.responseHeaders))}Lt.prototype.toString=function(){var e="Request has failed.";return c(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e};var He=Lt;function Pe(e){s.typeOf.object("options",e),s.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(Pe.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){this._maximumLength=e,this._length>e&&e>0&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}});function Xr(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}Pe.prototype.reserve=function(e){e=y(e,this._length),this._array.length=e};Pe.prototype.heapify=function(e){e=y(e,0);for(var r=this._length,t=this._comparator,n=this._array,a=-1,o=!0;o;){var i=2*(e+1),u=i-1;u<r&&t(n[u],n[e])<0?a=u:a=e,i<r&&t(n[i],n[a])<0&&(a=i),a!==e?(Xr(n,a,e),e=a):o=!1}};Pe.prototype.resort=function(){for(var e=this._length,r=Math.ceil(e/2);r>=0;--r)this.heapify(r)};Pe.prototype.insert=function(e){s.defined("element",e);var r=this._array,t=this._comparator,n=this._maximumLength,a=this._length++;for(a<r.length?r[a]=e:r.push(e);a!==0;){var o=Math.floor((a-1)/2);if(t(r[a],r[o])<0)Xr(r,a,o),a=o;else break}var i;return c(n)&&this._length>n&&(i=r[n],r.pop(),this._length=n),i};Pe.prototype.pop=function(e){if(e=y(e,0),this._length!==0){s.typeOf.number.lessThan("index",e,this._length);var r=this._array,t=r[e];return Xr(r,e,--this._length),r[this._length]=void 0,this.heapify(e),t}};var Qr=Pe;var Jr;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?Jr=function(){return performance.now()}:Jr=function(){return Date.now()};var Zr=Jr;function kt(e,r){return e.priority-r.priority}var B={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0,totalRequestTime:0},je=20,ne=new Qr({comparator:kt});ne.maximumLength=je;ne.reserve(je);var ue=[],le={},xa=typeof document<"u"?new J(document.location.href):new J,lr=new Rt;function R(){}R.TIMEOUT=5e3;R.CANCLE_COUNT=3;R.statisticRequestTime=-1;R.maximumRequests=50;R.maximumRequestsPerServer=6;R.perPacketCount=20;R.requestsByServer={};R.throttleRequests=!0;R.debugShowStatistics=!1;R.requestCompletedEvent=lr;Object.defineProperties(R,{activeRequestLength:{get:function(){return ue.length}},statistics:{get:function(){return B}},priorityHeapLength:{get:function(){return je},set:function(e){if(e<je)for(;ne.length>e;){var r=ne.pop();ge(r)}je=e,ne.maximumLength=e,ne.reserve(e)}}});function $r(e){c(e.priorityFunction)&&(e.priority=e.priorityFunction())}function et(e){var r=y(R.requestsByServer[e],R.maximumRequestsPerServer);return le[e]<r}R.packRequestGroup={};R.packRequestPromise={};R.packRequestQuadKey={};R.quadKeyIndex={};R.packRequestHeap={};R.blockDefer={};R.blockRequest={};function rt(e){return c(e.packKey)||(e.packKey=e.serverKey+"_"+e.providerName),e.packKey}function Vt(e){return c(e.blockKey)||(e.blockKey=e.serverKey+"_"+e.providerName+"_"+e.quadKey+e.url.substring(e.url.indexOf("dataVersion"))),e.blockKey}function Ta(e){var r=rt(e);return c(R.packRequestGroup[r])||(R.packRequestGroup[r]=[]),c(R.packRequestQuadKey[r])||(R.packRequestQuadKey[r]=""),c(R.packRequestPromise[r])||(R.packRequestPromise[r]=k.defer()),c(R.quadKeyIndex[r])||(R.quadKeyIndex[r]=0),e.quadKeyIndex=R.quadKeyIndex[r]++,e.deferred=R.packRequestPromise[r],e.state=H.ISSUED,R.packRequestGroup[r].push(e),e.deferred.promise}function Ca(e){var r=Vt(e),t=R.blockDefer[r];return c(t)||(t=R.blockDefer[r]=k.defer(),R.blockRequest[r]=e),e.deferred=t,e.state=H.ISSUED,e.deferred.promise}function _a(){R.packRequestGroup={},R.packRequestPromise={},R.packRequestQuadKey={},R.quadKeyIndex={}}function Pa(){R.blockRequest={}}function Aa(e){for(var r=0,t=e.length;r<t;r++){var n=e[r];n.state=H.CANCELLED}}function Da(e){for(var r=[],t={},n=0,a=e.length;n<a;n++){var o=e[n];if(!o.cancelled){var i=o.quadKey;t[i]||(t[i]=!0,r.push(i))}}return r}function Ia(){var e=R.packRequestGroup;for(var r in e)if(e.hasOwnProperty(r)){var t=e[r];if(t.length<1)continue;var n=t[0].clone(),a=n.url.indexOf("rest/maps")!==-1;n.serverKey=t[0].serverKey,n.state=t[0].state;var o=n.url,i=Da(t);if(i.length<1)continue;a?R.packRequestQuadKey[r]=i.join(","):R.packRequestQuadKey[r]=i.join(";");var u=R.packRequestQuadKey[r];if(n.throttleByServer&&!et(n.serverKey)){Aa(t),R.packRequestPromise[r].reject();continue}n.deferred=R.packRequestPromise[r];var m=new J(o);a?m.query=c(m.query)?m.query+"&tiles="+u:"tiles="+u:m.query=c(m.query)?m.query+"&extratiles="+u:"extratiles="+u,n.url=m.toString(),vr(n,n.url)}_a()}function Ua(){var e=R.blockRequest;for(var r in e)if(e.hasOwnProperty(r)){var t=e[r];vr(t)}Pa()}function Yt(e){if(e.state===H.UNISSUED)if(e.state=H.ISSUED,e.type===ie.PACK||e.type===ie.BLOCKPACK){var r=rt(e);c(R.packRequestPromise[r])||(R.packRequestPromise[r]=k.defer()),e.deferred=R.packRequestPromise[r]}else e.deferred=k.defer();return e.deferred.promise}function Ma(e){return function(r){if(e.state!==H.CANCELLED&&(--B.numberOfActiveRequests,--le[e.serverKey],lr.raiseEvent(),e.state=H.RECEIVED,e.deferred.resolve(r),e.endTime=Zr(),(R.statisticRequestTime>0||e.type!==ie.OTHER)&&(B.totalRequestTime+=e.endTime-e.startTime),e.type===ie.BLOCK||e.type===ie.BLOCKPACK)){var t=Vt(e);c(R.blockDefer[t])&&(R.blockDefer[t]=void 0,delete R.blockDefer[t])}}}function qa(e){return function(r){e.state!==H.CANCELLED&&(++B.numberOfFailedRequests,--B.numberOfActiveRequests,--le[e.serverKey],lr.raiseEvent(r),e.state=H.FAILED,e.deferred.reject(r))}}function vr(e,r){var t=Yt(e);return e.state=H.ACTIVE,ue.push(e),++B.numberOfActiveRequests,++B.numberOfActiveRequestsEver,++le[e.serverKey],e.startTime=Zr(),e.requestFunction(r).then(Ma(e)).otherwise(qa(e)),t}function ge(e){var r=e.state===H.ACTIVE;e.state=H.CANCELLED,++B.numberOfCancelledRequests,e.deferred.reject(),r&&(--B.numberOfActiveRequests,--le[e.serverKey],++B.numberOfCancelledActiveRequests),c(e.cancelFunction)&&e.cancelFunction()}function Na(){for(var e in R.packRequestHeap)if(R.packRequestHeap.hasOwnProperty(e)){for(var r=R.packRequestHeap[e],t=r.internalArray,n=r.length,a=0;a<n;++a)$r(t[a]);r.resort()}}function ja(){for(var e in R.packRequestHeap)if(R.packRequestHeap.hasOwnProperty(e))for(var r=R.packRequestHeap[e];r.length>0;){var t=r.pop();if(t.cancelled){ge(t);continue}Ta(t)}Ia()}R.update=function(){var e,r,t=0,n=ue.length;for(e=0;e<n;++e){if(r=ue[e],r.cancelled&&ge(r),r.state!==H.ACTIVE){++t;continue}t>0&&(ue[e-t]=r)}ue.length-=t;var a=ne.internalArray,o=ne.length;for(e=0;e<o;++e)$r(a[e]);ne.resort(),Na(),Ua(),ja();for(var i=Math.max(R.maximumRequests-ue.length,0),u=0;u<i&&ne.length>0;){if(r=ne.pop(),r.cancelled){ge(r);continue}if(r.throttleByServer&&!et(r.serverKey)){ge(r);continue}vr(r),++u}Ba()};R.getServerKey=function(e){s.typeOf.string("url",e);var r=new J(e).resolve(xa);r.normalize();var t=r.authority;/:/.test(t)||(t=t+":"+(r.scheme==="https"?"443":"80"));var n=le[t];return c(n)||(le[t]=0),t};function za(e){var r=rt(e),t=R.packRequestHeap[r];return c(t)||(t=R.packRequestHeap[r]=new Qr({comparator:kt}),t.maximumLength=R.perPacketCount,t.reserve(je)),t}R.request=function(e){if(s.typeOf.object("request",e),s.typeOf.string("request.url",e.url),s.typeOf.func("request.requestFunction",e.requestFunction),pr(e.url)||dr(e.url))return lr.raiseEvent(),e.state=H.RECEIVED,e.requestFunction();if(++B.numberOfAttemptedRequests,c(e.serverKey)||(e.serverKey=R.getServerKey(e.url)),e.type===ie.BLOCK)return Ca(e);if(!(e.throttleByServer&&!et(e.serverKey))){if(!R.throttleRequests||!e.throttle)return vr(e);if(!(ue.length>=R.maximumRequests)){$r(e);var r;if(e.type===ie.PACK||e.type===ie.BLOCKPACK){var t=za(e),n=!0;if(e.type===ie.BLOCKPACK){for(var a=0;a<t.length;a++)if(t._array[a].quadKey===e.quadKey){e.blockRequest=t._array[a],n=!1;break}}n&&(r=t.insert(e))}else r=ne.insert(e);if(c(r)){if(r===e)return;ge(r)}return Yt(e)}}};function Ba(){!R.debugShowStatistics||(B.numberOfActiveRequests===0&&B.lastNumberOfActiveRequests>0&&(B.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+B.numberOfAttemptedRequests),B.numberOfAttemptedRequests=0),B.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+B.numberOfCancelledRequests),B.numberOfCancelledRequests=0),B.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+B.numberOfCancelledActiveRequests),B.numberOfCancelledActiveRequests=0),B.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+B.numberOfFailedRequests),B.numberOfFailedRequests=0)),B.lastNumberOfActiveRequests=B.numberOfActiveRequests)}R.clearForSpecs=function(){for(;ne.length>0;){var e=ne.pop();ge(e)}for(var r=ue.length,t=0;t<r;++t)ge(ue[t]);ue.length=0,le={},B.numberOfAttemptedRequests=0,B.numberOfActiveRequests=0,B.numberOfCancelledRequests=0,B.numberOfCancelledActiveRequests=0,B.numberOfFailedRequests=0,B.numberOfActiveRequestsEver=0,B.lastNumberOfActiveRequests=0,B.totalRequestTime=0};R.numberOfActiveRequestsByServer=function(e){return le[e]};R.requestHeap=ne;var yr=R;var Ge={},ze={};Ge.add=function(e,r){if(!c(e))throw new w("host is required.");if(!c(r)||r<=0)throw new w("port is required to be greater than 0.");var t=e.toLowerCase()+":"+r;c(ze[t])||(ze[t]=!0)};Ge.remove=function(e,r){if(!c(e))throw new w("host is required.");if(!c(r)||r<=0)throw new w("port is required to be greater than 0.");var t=e.toLowerCase()+":"+r;c(ze[t])&&delete ze[t]};function Fa(e){var r=new J(e);r.normalize();var t=r.getAuthority();if(!!c(t)){if(t.indexOf("@")!==-1){var n=t.split("@");t=n[1]}if(t.indexOf(":")===-1){var a=r.getScheme();if(c(a)||(a=window.location.protocol,a=a.substring(0,a.length-1)),a==="http")t+=":80";else if(a==="https")t+=":443";else return}return t}}Ge.contains=function(e){if(!c(e))throw new w("url is required.");var r=Fa(e);return!!(c(r)&&c(ze[r]))};Ge.clear=function(){ze={}};var tt=Ge;var Wt={};function Ke(e,r){if(!c(e))throw new w("identifier is required.");c(Wt[e])||(Wt[e]=!0,console.warn(y(r,e)))}Ke.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";Ke.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";Ke.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";Ke.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var Ht=Ke;function La(e,r){if(!c(e)||!c(r))throw new w("identifier and message are required.");Ht(e,r)}var rc=La;var Kt=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}}();function at(e,r,t,n){var a=e.query;if(!c(a)||a.length===0)return{};var o;if(a.indexOf("=")===-1){var i={};i[a]=void 0,o=i}else o=zt(a);t?r._queryParameters=Or(o,r._queryParameters,n):r._queryParameters=o,e.query=void 0}function ka(e,r){var t=r._queryParameters,n=Object.keys(t);n.length===1&&!c(t[n[0]])?e.query=n[0]:e.query=jt(t)}function de(e,r){return c(e)?c(e.clone)?e.clone():Ne(e):r}function ot(e){if(e.state===H.ISSUED||e.state===H.ACTIVE)throw new Ie("The Resource is already being fetched.");e.state=H.UNISSUED,e.deferred=void 0}function Or(e,r,t){if(!t)return Se(e,r);var n=Ne(e,!0);for(var a in r)if(r.hasOwnProperty(a)){var o=n[a],i=r[a];c(o)?(Array.isArray(o)||(o=n[a]=[o]),n[a]=o.concat(i)):n[a]=Array.isArray(i)?i.slice():i}return n}function b(e){e=y(e,y.EMPTY_OBJECT),typeof e=="string"&&(e={url:e}),s.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=de(e.templateValues,{}),this._queryParameters=de(e.queryParameters,{}),this.headers=de(e.headers,{}),this.request=y(e.request,new Bt),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=y(e.retryAttempts,0),this._retryCount=0;var r=new J(e.url);at(r,this,!0,!0),r.fragment=void 0,this._url=r.toString()}b.createIfNeeded=function(e){return e instanceof b?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new b({url:e})};var Be;b.supportsImageBitmapOptions=function(){if(c(Be))return Be;if(typeof createImageBitmap!="function")return Be=k.resolve(!1),Be;var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg==";return Be=b.fetchBlob({url:e}).then(function(r){return createImageBitmap(r,{imageOrientation:"flipY",premultiplyAlpha:"none"})}).then(function(r){return!0}).otherwise(function(){return!1}),Be};Object.defineProperties(b,{isBlobSupported:{get:function(){return Kt}}});Object.defineProperties(b.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){var r=new J(e);at(r,this,!1),r.fragment=void 0,this._url=r.toString()}},extension:{get:function(){return Mt(this._url)}},isDataUri:{get:function(){return pr(this._url)}},isBlobUri:{get:function(){return dr(this._url)}},isCrossOriginUrl:{get:function(){return qt(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}});b.prototype.getUrlComponent=function(e,r){if(this.isDataUri)return this._url;var t=new J(this._url);e&&ka(t,this);var n=t.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),a=this._templateValues;return n=n.replace(/{(.*?)}/g,function(o,i){var u=a[i];return c(u)&&i=="s"?encodeURI(u):c(u)?encodeURIComponent(u):o}),r&&c(this.proxy)&&(n=this.proxy.getURL(n)),n};b.prototype.setQueryParameters=function(e,r){r?this._queryParameters=Or(this._queryParameters,e,!1):this._queryParameters=Or(e,this._queryParameters,!1)};b.prototype.appendQueryParameters=function(e){this._queryParameters=Or(e,this._queryParameters,!0)};b.prototype.setTemplateValues=function(e,r){r?this._templateValues=Se(this._templateValues,e):this._templateValues=Se(e,this._templateValues)};b.prototype.getDerivedResource=function(e){var r=this.clone();if(r._retryCount=0,c(e.url)){var t=new J(e.url),n=y(e.preserveQueryParameters,!1);at(t,r,!0,n),t.fragment=void 0,r._url=t.resolve(new J(mr(this._url))).toString()}return c(e.queryParameters)&&(r._queryParameters=Se(e.queryParameters,r._queryParameters)),c(e.templateValues)&&(r._templateValues=Se(e.templateValues,r.templateValues)),c(e.headers)&&(r.headers=Se(e.headers,r.headers)),c(e.proxy)&&(r.proxy=e.proxy),c(e.request)&&(r.request=e.request),c(e.retryCallback)&&(r.retryCallback=e.retryCallback),c(e.retryAttempts)&&(r.retryAttempts=e.retryAttempts),r};b.prototype.retryOnError=function(e){var r=this.retryCallback;if(typeof r!="function"||this._retryCount>=this.retryAttempts)return k(!1);var t=this;return k(r(this,e)).then(function(n){return++t._retryCount,n})};b.prototype.clone=function(e){return c(e)||(e=new b({url:this._url})),e._url=this._url,e._queryParameters=Ne(this._queryParameters),e._templateValues=Ne(this._templateValues),e.headers=Ne(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e};b.prototype.getBaseUri=function(e){return Ut(this.getUrlComponent(e),e)};b.prototype.appendForwardSlash=function(){this._url=At(this._url)};b.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};b.fetchArrayBuffer=function(e){var r=new b(e);return r.fetchArrayBuffer()};b.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};b.fetchBlob=function(e){var r=new b(e);return r.fetchBlob()};b.prototype.fetchImage=function(e){e=y(e,y.EMPTY_OBJECT);var r=y(e.preferImageBitmap,!1),t=y(e.preferBlob,!1),n=y(e.flipY,!1);if(ot(this.request),!Kt||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!t)return nt({resource:this,flipY:n,preferImageBitmap:r});var a=this.fetchBlob();if(!!c(a)){var o,i,u,m;return b.supportsImageBitmapOptions().then(function(d){return o=d,i=o&&r,a}).then(function(d){if(!!c(d)){if(m=d,i)return b.createImageBitmapFromBlob(d,{flipY:n,premultiplyAlpha:!1});var h=window.URL.createObjectURL(d);return u=new b({url:h}),nt({resource:u,flipY:n,preferImageBitmap:!1})}}).then(function(d){if(!!c(d))return d.blob=m,i||window.URL.revokeObjectURL(u.url),d}).otherwise(function(d){return c(u)&&window.URL.revokeObjectURL(u.url),d.blob=m,k.reject(d)})}};function nt(e){var r=e.resource,t=e.flipY,n=e.preferImageBitmap,a=r.request;a.url=r.url,a.requestFunction=function(){var i=!1;!r.isDataUri&&!r.isBlobUri&&(i=r.isCrossOriginUrl);var u=k.defer();return b._Implementations.createImage(a,i,u,t,n),u.promise};var o=yr.request(a);if(!!c(o))return o.otherwise(function(i){return a.state!==H.FAILED?k.reject(i):r.retryOnError(i).then(function(u){return u?(a.state=H.UNISSUED,a.deferred=void 0,nt({resource:r,flipY:t,preferImageBitmap:n})):k.reject(i)})})}b.fetchImage=function(e){var r=new b(e);return r.fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};b.prototype.fetchText=function(){return this.fetch({responseType:"text"})};b.fetchText=function(e){var r=new b(e);return r.fetchText()};b.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(!!c(e))return e.then(function(r){if(!!c(r))return JSON.parse(r)})};b.fetchJson=function(e){var r=new b(e);return r.fetchJson()};b.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};b.fetchXML=function(e){var r=new b(e);return r.fetchXML()};b.prototype.fetchJsonp=function(e){e=y(e,"callback"),ot(this.request);var r;do r="loadJsonp"+Math.random().toString().substring(2,8);while(c(window[r]));return Xt(this,e,r)};function Xt(e,r,t){var n={};n[r]=t,e.setQueryParameters(n);var a=e.request;a.url=e.url,a.requestFunction=function(){var i=k.defer();return window[t]=function(u){i.resolve(u);try{delete window[t]}catch{window[t]=void 0}},b._Implementations.loadAndExecuteScript(e.url,t,i),i.promise};var o=yr.request(a);if(!!c(o))return o.otherwise(function(i){return a.state!==H.FAILED?k.reject(i):e.retryOnError(i).then(function(u){return u?(a.state=H.UNISSUED,a.deferred=void 0,Xt(e,r,t)):k.reject(i)})})}b.fetchJsonp=function(e){var r=new b(e);return r.fetchJsonp(e.callbackParameterName)};b.prototype._makeRequest=function(e){var r=this;ot(r.request);var t=r.request;t.url=r.url,t.requestFunction=function(a){var o=e.responseType,i=Se(e.headers,r.headers),u=e.overrideMimeType,m=e.method,d=e.data,h=k.defer(),l=c(a)?a:r.url,p=b._Implementations.loadWithXhr(l,o,m,d,i,h,u);return c(p)&&c(p.abort)&&(t.cancelFunction=function(){p.abort()}),h.promise};var n=yr.request(t);if(!!c(n))return n.then(function(a){return a}).otherwise(function(a){return t.state!==H.FAILED?k.reject(a):r.retryOnError(a).then(function(o){return o?(t.state=H.UNISSUED,t.deferred=void 0,r.fetch(e)):k.reject(a)})})};var Va=/^data:(.*?)(;base64)?,(.*)$/;function wr(e,r){var t=decodeURIComponent(r);return e?atob(t):t}function Gt(e,r){for(var t=wr(e,r),n=new ArrayBuffer(t.length),a=new Uint8Array(n),o=0;o<t.length;o++)a[o]=t.charCodeAt(o);return n}function Ya(e,r){r=y(r,"");var t=e[1],n=!!e[2],a=e[3];switch(r){case"":case"text":return wr(n,a);case"arraybuffer":return Gt(n,a);case"blob":var o=Gt(n,a);return new Blob([o],{type:t});case"document":var i=new DOMParser;return i.parseFromString(wr(n,a),t);case"json":return JSON.parse(wr(n,a));default:throw new w("Unhandled responseType: "+r)}}b.prototype.fetch=function(e){return e=de(e,{}),e.method="GET",this._makeRequest(e)};b.fetch=function(e){var r=new b(e);return r.fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};b.prototype.delete=function(e){return e=de(e,{}),e.method="DELETE",this._makeRequest(e)};b.delete=function(e){var r=new b(e);return r.delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};b.prototype.head=function(e){return e=de(e,{}),e.method="HEAD",this._makeRequest(e)};b.head=function(e){var r=new b(e);return r.head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};b.prototype.options=function(e){return e=de(e,{}),e.method="OPTIONS",this._makeRequest(e)};b.options=function(e){var r=new b(e);return r.options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};b.prototype.post=function(e,r){return s.defined("data",e),r=de(r,{}),r.method="POST",r.data=e,this._makeRequest(r)};b.post=function(e){var r=new b(e);return r.post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};b.prototype.put=function(e,r){return s.defined("data",e),r=de(r,{}),r.method="PUT",r.data=e,this._makeRequest(r)};b.put=function(e){var r=new b(e);return r.put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};b.prototype.patch=function(e,r){return s.defined("data",e),r=de(r,{}),r.method="PATCH",r.data=e,this._makeRequest(r)};b.patch=function(e){var r=new b(e);return r.patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};b._Implementations={};function Wa(e,r,t){var n=new Image;n.crossOrigin="",n.onload=function(){t.resolve(n)},n.onerror=function(a){t.reject(a)},r&&(tt.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e}b._Implementations.createImage=function(e,r,t,n,a){var o=e.url;b.supportsImageBitmapOptions().then(function(i){if(!(i&&a)){Wa(o,r,t);return}var u="blob",m="GET",d=k.defer(),h=b._Implementations.loadWithXhr(o,u,m,void 0,void 0,d,void 0,void 0,void 0);return c(h)&&c(h.abort)&&(e.cancelFunction=function(){h.abort()}),d.promise.then(function(l){if(!c(l)){t.reject(new Ie("Successfully retrieved "+o+" but it contained no content."));return}return b.createImageBitmapFromBlob(l,{flipY:n,premultiplyAlpha:!1})}).then(t.resolve)}).otherwise(t.reject)};b.createImageBitmapFromBlob=function(e,r){return s.defined("options",r),s.typeOf.bool("options.flipY",r.flipY),s.typeOf.bool("options.premultiplyAlpha",r.premultiplyAlpha),createImageBitmap(e,{imageOrientation:r.flipY?"flipY":"none",premultiplyAlpha:r.premultiplyAlpha?"premultiply":"none"})};function Ha(e,r,t,n,a,o,i){fetch(e,{method:t,headers:a}).then(async u=>{if(!u.ok){let m={};u.headers.forEach((d,h)=>{m[h]=d}),o.reject(new He(u.status,u,m));return}switch(r){case"text":o.resolve(u.text());break;case"json":o.resolve(u.json());break;default:o.resolve(new Uint8Array(await u.arrayBuffer()).buffer);break}}).catch(()=>{o.reject(new He)})}var Ga=typeof XMLHttpRequest>"u";b._Implementations.loadWithXhr=function(e,r,t,n,a,o,i){var u=Va.exec(e);if(u!==null){o.resolve(Ya(u,r));return}if(Ga){Ha(e,r,t,n,a,o,i);return}var m=new XMLHttpRequest;if(tt.contains(e)&&(m.withCredentials=!0),e=e.replace(/{/g,"%7B").replace(/}/g,"%7D"),m.open(t,e,!0),c(i)&&c(m.overrideMimeType)&&m.overrideMimeType(i),c(a))for(var d in a)a.hasOwnProperty(d)&&m.setRequestHeader(d,a[d]);c(r)&&(m.responseType=r);var h=!1;return typeof e=="string"&&(h=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),m.onload=function(){if((m.status<200||m.status>=300)&&!(h&&m.status===0)){o.reject(new He(m.status,m.response,m.getAllResponseHeaders()));return}var l=m.response,p=m.responseType;if(t==="HEAD"||t==="OPTIONS"){var E=m.getAllResponseHeaders(),S=E.trim().split(/[\r\n]+/),g={};S.forEach(function(_){var A=_.split(": "),F=A.shift();g[F]=A.join(": ")}),o.resolve(g);return}if(m.status===204)o.resolve();else if(c(l)&&(!c(r)||p===r))o.resolve(l);else if(r==="json"&&typeof l=="string")try{o.resolve(JSON.parse(l))}catch(_){o.reject(_)}else(p===""||p==="document")&&c(m.responseXML)&&m.responseXML.hasChildNodes()?o.resolve(m.responseXML):(p===""||p==="text")&&c(m.responseText)?o.resolve(m.responseText):o.reject(new Ie("Invalid XMLHttpRequest response type."))},m.onerror=function(l){o.reject(new He)},m.send(n),m};b._Implementations.loadAndExecuteScript=function(e,r,t){return Nt(e,r).otherwise(t.reject)};b._DefaultImplementations={};b._DefaultImplementations.createImage=b._Implementations.createImage;b._DefaultImplementations.loadWithXhr=b._Implementations.loadWithXhr;b._DefaultImplementations.loadAndExecuteScript=b._Implementations.loadAndExecuteScript;b.DEFAULT=Object.freeze(new b({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var Ee=b;function br(e){if(e=y(e,y.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=y(e.addNewLeapSeconds,!0),c(e.data))it(this,e.data);else if(c(e.url)){var r=Ee.createIfNeeded(e.url),t=this;this._downloadPromise=k(r.fetchJson(),function(n){it(t,n)},function(){t._dataError="An error occurred while retrieving the EOP data from the URL "+r.url+"."})}else it(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}br.NONE=Object.freeze({getPromiseToLoad:function(){return k()},compute:function(e,r){return c(r)?(r.xPoleWander=0,r.yPoleWander=0,r.xPoleOffset=0,r.yPoleOffset=0,r.ut1MinusUtc=0):r=new We(0,0,0,0,0),r}});br.prototype.getPromiseToLoad=function(){return k(this._downloadPromise)};br.prototype.compute=function(e,r){if(!c(this._samples)){if(c(this._dataError))throw new Ie(this._dataError);return}if(c(r)||(r=new We(0,0,0,0,0)),this._samples.length===0)return r.xPoleWander=0,r.yPoleWander=0,r.xPoleOffset=0,r.yPoleOffset=0,r.ut1MinusUtc=0,r;var t=this._dates,n=this._lastIndex,a=0,o=0;if(c(n)){var i=t[n],u=t[n+1],m=$.lessThanOrEquals(i,e),d=!c(u),h=d||$.greaterThanOrEquals(u,e);if(m&&h)return a=n,!d&&u.equals(e)&&++a,o=a+1,Jt(this,t,this._samples,e,a,o,r),r}var l=_e(t,e,$.compare,this._dateColumn);return l>=0?(l<t.length-1&&t[l+1].equals(e)&&++l,a=l,o=l):(o=~l,a=o-1,a<0&&(a=0)),this._lastIndex=a,Jt(this,t,this._samples,e,a,o,r),r};function Ka(e,r){return $.compare(e.julianDate,r)}function it(e,r){if(!c(r.columnNames)){e._dataError="Error in loaded EOP data: The columnNames property is required.";return}if(!c(r.samples)){e._dataError="Error in loaded EOP data: The samples property is required.";return}var t=r.columnNames.indexOf("modifiedJulianDateUtc"),n=r.columnNames.indexOf("xPoleWanderRadians"),a=r.columnNames.indexOf("yPoleWanderRadians"),o=r.columnNames.indexOf("ut1MinusUtcSeconds"),i=r.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=r.columnNames.indexOf("yCelestialPoleOffsetRadians"),m=r.columnNames.indexOf("taiMinusUtcSeconds");if(t<0||n<0||a<0||o<0||i<0||u<0||m<0){e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";return}var d=e._samples=r.samples,h=e._dates=[];e._dateColumn=t,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=a,e._ut1MinusUtcSecondsColumn=o,e._xCelestialPoleOffsetRadiansColumn=i,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=m,e._columnCount=r.columnNames.length,e._lastIndex=void 0;for(var l,p=e._addNewLeapSeconds,E=0,S=d.length;E<S;E+=e._columnCount){var g=d[E+t],_=d[E+m],A=g+W.MODIFIED_JULIAN_DATE_DIFFERENCE,F=new $(A,_,M.TAI);if(h.push(F),p){if(_!==l&&c(l)){var N=$.leapSeconds,x=_e(N,F,Ka);if(x<0){var P=new V(F,_);N.splice(~x,0,P)}}l=_}}}function Qt(e,r,t,n,a){var o=t*n;a.xPoleWander=r[o+e._xPoleWanderRadiansColumn],a.yPoleWander=r[o+e._yPoleWanderRadiansColumn],a.xPoleOffset=r[o+e._xCelestialPoleOffsetRadiansColumn],a.yPoleOffset=r[o+e._yCelestialPoleOffsetRadiansColumn],a.ut1MinusUtc=r[o+e._ut1MinusUtcSecondsColumn]}function Xe(e,r,t){return r+e*(t-r)}function Jt(e,r,t,n,a,o,i){var u=e._columnCount;if(o>r.length-1)return i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0,i;var m=r[a],d=r[o];if(m.equals(d)||n.equals(m))return Qt(e,t,a,u,i),i;if(n.equals(d))return Qt(e,t,o,u,i),i;var h=$.secondsDifference(n,m)/$.secondsDifference(d,m),l=a*u,p=o*u,E=t[l+e._ut1MinusUtcSecondsColumn],S=t[p+e._ut1MinusUtcSecondsColumn],g=S-E;if(g>.5||g<-.5){var _=t[l+e._taiMinusUtcSecondsColumn],A=t[p+e._taiMinusUtcSecondsColumn];_!==A&&(d.equals(n)?E=S:S-=A-_)}return i.xPoleWander=Xe(h,t[l+e._xPoleWanderRadiansColumn],t[p+e._xPoleWanderRadiansColumn]),i.yPoleWander=Xe(h,t[l+e._yPoleWanderRadiansColumn],t[p+e._yPoleWanderRadiansColumn]),i.xPoleOffset=Xe(h,t[l+e._xCelestialPoleOffsetRadiansColumn],t[p+e._xCelestialPoleOffsetRadiansColumn]),i.yPoleOffset=Xe(h,t[l+e._yCelestialPoleOffsetRadiansColumn],t[p+e._yCelestialPoleOffsetRadiansColumn]),i.ut1MinusUtc=Xe(h,E,S),i}var Zt=br;function re(e,r,t){this.heading=y(e,0),this.pitch=y(r,0),this.roll=y(t,0)}re.fromQuaternion=function(e,r){if(!c(e))throw new w("quaternion is required");c(r)||(r=new re);var t=2*(e.w*e.y-e.z*e.x),n=1-2*(e.x*e.x+e.y*e.y),a=2*(e.w*e.x+e.y*e.z),o=1-2*(e.y*e.y+e.z*e.z),i=2*(e.w*e.z+e.x*e.y);return r.heading=-Math.atan2(i,o),r.roll=Math.atan2(a,n),r.pitch=-L.asinClamped(t),r};re.fromDegrees=function(e,r,t,n){if(!c(e))throw new w("heading is required");if(!c(r))throw new w("pitch is required");if(!c(t))throw new w("roll is required");return c(n)||(n=new re),n.heading=e*L.RADIANS_PER_DEGREE,n.pitch=r*L.RADIANS_PER_DEGREE,n.roll=t*L.RADIANS_PER_DEGREE,n};re.clone=function(e,r){if(!!c(e))return c(r)?(r.heading=e.heading,r.pitch=e.pitch,r.roll=e.roll,r):new re(e.heading,e.pitch,e.roll)};re.equals=function(e,r){return e===r||c(e)&&c(r)&&e.heading===r.heading&&e.pitch===r.pitch&&e.roll===r.roll};re.equalsEpsilon=function(e,r,t,n){return e===r||c(e)&&c(r)&&L.equalsEpsilon(e.heading,r.heading,t,n)&&L.equalsEpsilon(e.pitch,r.pitch,t,n)&&L.equalsEpsilon(e.roll,r.roll,t,n)};re.prototype.clone=function(e){return re.clone(this,e)};re.prototype.equals=function(e){return re.equals(this,e)};re.prototype.equalsEpsilon=function(e,r,t){return re.equalsEpsilon(this,e,r,t)};re.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var ft=re;var $t=/((?:.*\/)|^)Cesium\.js$/;function Xa(){for(var e=document.getElementsByTagName("script"),r=0,t=e.length;r<t;++r){var n=e[r].getAttribute("src"),a=$t.exec(n);if(a!==null)return a[1]}}var Fe;function en(e){return typeof document>"u"?e:(c(Fe)||(Fe=document.createElement("a")),Fe.href=e,Fe.href=Fe.href,Fe.href)}var Ae;function rn(){if(c(Ae))return Ae;var e;if(typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:typeof define=="object"&&c(define.amd)&&!define.amd.toUrlUndefined&&c(Ze.toUrl)?e=mr("..",De("Core/buildModuleUrl.js")):e=Xa(),!c(e))throw new w("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return Ae=new Ee({url:en(e)}),Ae.appendForwardSlash(),Ae}function Qa(e){return en(Ze.toUrl("../"+e))}function tn(e){var r=rn().getDerivedResource({url:e});return r.url}var Sr;function De(e){c(Sr)||(typeof define=="object"&&c(define.amd)&&!define.amd.toUrlUndefined&&c(Ze.toUrl)?Sr=Qa:Sr=tn);var r=Sr(e);return r}De._cesiumScriptRegex=$t;De._buildModuleUrlFromBaseUrl=tn;De._clearBaseResource=function(){Ae=void 0};De.setBaseUrl=function(e){Ae=Ee.DEFAULT.getDerivedResource({url:e})};De.getCesiumBaseUrl=rn;var nn=De;function Ja(e,r,t){this.x=e,this.y=r,this.s=t}var gr=Ja;function st(e){e=y(e,y.EMPTY_OBJECT),this._xysFileUrlTemplate=Ee.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=y(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=y(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new $(this._sampleZeroJulianEphemerisDate,0,M.TAI),this._stepSizeDays=y(e.stepSizeDays,1),this._samplesPerXysFile=y(e.samplesPerXysFile,1e3),this._totalSamples=y(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];for(var r=this._interpolationOrder,t=this._denominators=new Array(r+1),n=this._xTable=new Array(r+1),a=Math.pow(this._stepSizeDays,r),o=0;o<=r;++o){t[o]=a,n[o]=o*this._stepSizeDays;for(var i=0;i<=r;++i)i!==o&&(t[o]*=o-i);t[o]=1/t[o]}this._work=new Array(r+1),this._coef=new Array(r+1)}var Za=new $(0,0,M.TAI);function ct(e,r,t){var n=Za;return n.dayNumber=r,n.secondsOfDay=t,$.daysDifference(n,e._sampleZeroDateTT)}st.prototype.preload=function(e,r,t,n){var a=ct(this,e,r),o=ct(this,t,n),i=a/this._stepSizeDays-this._interpolationOrder/2|0;i<0&&(i=0);var u=o/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);for(var m=i/this._samplesPerXysFile|0,d=u/this._samplesPerXysFile|0,h=[],l=m;l<=d;++l)h.push(ut(this,l));return k.all(h)};st.prototype.computeXysRadians=function(e,r,t){var n=ct(this,e,r);if(!(n<0)){var a=n/this._stepSizeDays|0;if(!(a>=this._totalSamples)){var o=this._interpolationOrder,i=a-(o/2|0);i<0&&(i=0);var u=i+o;u>=this._totalSamples&&(u=this._totalSamples-1,i=u-o,i<0&&(i=0));var m=!1,d=this._samples;if(c(d[i*3])||(ut(this,i/this._samplesPerXysFile|0),m=!0),c(d[u*3])||(ut(this,u/this._samplesPerXysFile|0),m=!0),!m){c(t)?(t.x=0,t.y=0,t.s=0):t=new gr(0,0,0);var h=n-i*this._stepSizeDays,l=this._work,p=this._denominators,E=this._coef,S=this._xTable,g,_;for(g=0;g<=o;++g)l[g]=h-S[g];for(g=0;g<=o;++g){for(E[g]=1,_=0;_<=o;++_)_!==g&&(E[g]*=l[_]);E[g]*=p[g];var A=(i+g)*3;t.x+=E[g]*d[A++],t.y+=E[g]*d[A++],t.s+=E[g]*d[A]}return t}}}};function ut(e,r){if(e._chunkDownloadsInProgress[r])return e._chunkDownloadsInProgress[r];var t=k.defer();e._chunkDownloadsInProgress[r]=t;var n,a=e._xysFileUrlTemplate;return c(a)?n=a.getDerivedResource({templateValues:{0:r}}):n=new Ee({url:nn("Assets/IAU2006_XYS/IAU2006_XYS_"+r+".json")}),k(n.fetchJson(),function(o){e._chunkDownloadsInProgress[r]=!1;for(var i=e._samples,u=o.samples,m=r*e._samplesPerXysFile*3,d=0,h=u.length;d<h;++d)i[m+d]=u[d];t.resolve()}),t.promise}var an=st;function v(e,r,t,n){this.x=y(e,0),this.y=y(r,0),this.z=y(t,0),this.w=y(n,0)}var Qe=new f;v.fromAxisAngle=function(e,r,t){s.typeOf.object("axis",e),s.typeOf.number("angle",r);var n=r/2,a=Math.sin(n);Qe=f.normalize(e,Qe);var o=Qe.x*a,i=Qe.y*a,u=Qe.z*a,m=Math.cos(n);return c(t)?(t.x=o,t.y=i,t.z=u,t.w=m,t):new v(o,i,u,m)};var $a=[1,2,0],eo=new Array(3);v.fromRotationMatrix=function(e,r){s.typeOf.object("matrix",e);var t,n,a,o,i,u=e[U.COLUMN0ROW0],m=e[U.COLUMN1ROW1],d=e[U.COLUMN2ROW2],h=u+m+d;if(h>0)t=Math.sqrt(h+1),i=.5*t,t=.5/t,n=(e[U.COLUMN1ROW2]-e[U.COLUMN2ROW1])*t,a=(e[U.COLUMN2ROW0]-e[U.COLUMN0ROW2])*t,o=(e[U.COLUMN0ROW1]-e[U.COLUMN1ROW0])*t;else{var l=$a,p=0;m>u&&(p=1),d>u&&d>m&&(p=2);var E=l[p],S=l[E];t=Math.sqrt(e[U.getElementIndex(p,p)]-e[U.getElementIndex(E,E)]-e[U.getElementIndex(S,S)]+1);var g=eo;g[p]=.5*t,t=.5/t,i=(e[U.getElementIndex(S,E)]-e[U.getElementIndex(E,S)])*t,g[E]=(e[U.getElementIndex(E,p)]+e[U.getElementIndex(p,E)])*t,g[S]=(e[U.getElementIndex(S,p)]+e[U.getElementIndex(p,S)])*t,n=-g[0],a=-g[1],o=-g[2]}return c(r)?(r.x=n,r.y=a,r.z=o,r.w=i,r):new v(n,a,o,i)};var on=new v,fn=new v,mt=new v,cn=new v;v.fromHeadingPitchRoll=function(e,r){return s.typeOf.object("headingPitchRoll",e),cn=v.fromAxisAngle(f.UNIT_X,e.roll,on),mt=v.fromAxisAngle(f.UNIT_Y,-e.pitch,r),r=v.multiply(mt,cn,mt),fn=v.fromAxisAngle(f.UNIT_Z,-e.heading,on),v.multiply(fn,r,r)};var Er=new f,dt=new f,se=new v,un=new v,Rr=new v;v.packedLength=4;v.pack=function(e,r,t){return s.typeOf.object("value",e),s.defined("array",r),t=y(t,0),r[t++]=e.x,r[t++]=e.y,r[t++]=e.z,r[t]=e.w,r};v.unpack=function(e,r,t){return s.defined("array",e),r=y(r,0),c(t)||(t=new v),t.x=e[r],t.y=e[r+1],t.z=e[r+2],t.w=e[r+3],t};v.packedInterpolationLength=3;v.convertPackedArrayForInterpolation=function(e,r,t,n){v.unpack(e,t*4,Rr),v.conjugate(Rr,Rr);for(var a=0,o=t-r+1;a<o;a++){var i=a*3;v.unpack(e,(r+a)*4,se),v.multiply(se,Rr,se),se.w<0&&v.negate(se,se),v.computeAxis(se,Er);var u=v.computeAngle(se);n[i]=Er.x*u,n[i+1]=Er.y*u,n[i+2]=Er.z*u}};v.unpackInterpolationResult=function(e,r,t,n,a){c(a)||(a=new v),f.fromArray(e,0,dt);var o=f.magnitude(dt);return v.unpack(r,n*4,un),o===0?v.clone(v.IDENTITY,se):v.fromAxisAngle(dt,o,se),v.multiply(se,un,a)};v.clone=function(e,r){if(!!c(e))return c(r)?(r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r):new v(e.x,e.y,e.z,e.w)};v.conjugate=function(e,r){return s.typeOf.object("quaternion",e),s.typeOf.object("result",r),r.x=-e.x,r.y=-e.y,r.z=-e.z,r.w=e.w,r};v.magnitudeSquared=function(e){return s.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};v.magnitude=function(e){return Math.sqrt(v.magnitudeSquared(e))};v.normalize=function(e,r){s.typeOf.object("result",r);var t=1/v.magnitude(e),n=e.x*t,a=e.y*t,o=e.z*t,i=e.w*t;return r.x=n,r.y=a,r.z=o,r.w=i,r};v.inverse=function(e,r){s.typeOf.object("result",r);var t=v.magnitudeSquared(e);return r=v.conjugate(e,r),v.multiplyByScalar(r,1/t,r)};v.add=function(e,r,t){return s.typeOf.object("left",e),s.typeOf.object("right",r),s.typeOf.object("result",t),t.x=e.x+r.x,t.y=e.y+r.y,t.z=e.z+r.z,t.w=e.w+r.w,t};v.subtract=function(e,r,t){return s.typeOf.object("left",e),s.typeOf.object("right",r),s.typeOf.object("result",t),t.x=e.x-r.x,t.y=e.y-r.y,t.z=e.z-r.z,t.w=e.w-r.w,t};v.negate=function(e,r){return s.typeOf.object("quaternion",e),s.typeOf.object("result",r),r.x=-e.x,r.y=-e.y,r.z=-e.z,r.w=-e.w,r};v.dot=function(e,r){return s.typeOf.object("left",e),s.typeOf.object("right",r),e.x*r.x+e.y*r.y+e.z*r.z+e.w*r.w};v.multiply=function(e,r,t){s.typeOf.object("left",e),s.typeOf.object("right",r),s.typeOf.object("result",t);var n=e.x,a=e.y,o=e.z,i=e.w,u=r.x,m=r.y,d=r.z,h=r.w,l=i*u+n*h+a*d-o*m,p=i*m-n*d+a*h+o*u,E=i*d+n*m-a*u+o*h,S=i*h-n*u-a*m-o*d;return t.x=l,t.y=p,t.z=E,t.w=S,t};v.multiplyByVec=function(e,r,t){var n=new f,a=new f,o=new f(e.x,e.y,e.z);n=f.cross(o,r,n),a=f.cross(o,n,a);var i=new f;i=f.multiplyByScalar(n,2*e.w,i);var u=new f;return u=f.multiplyByScalar(n,2,u),t=f.add(r,i,t),t=f.add(t,u,t),t};v.multiplyByScalar=function(e,r,t){return s.typeOf.object("quaternion",e),s.typeOf.number("scalar",r),s.typeOf.object("result",t),t.x=e.x*r,t.y=e.y*r,t.z=e.z*r,t.w=e.w*r,t};v.divideByScalar=function(e,r,t){return s.typeOf.object("quaternion",e),s.typeOf.number("scalar",r),s.typeOf.object("result",t),t.x=e.x/r,t.y=e.y/r,t.z=e.z/r,t.w=e.w/r,t};v.computeAxis=function(e,r){s.typeOf.object("quaternion",e),s.typeOf.object("result",r);var t=e.w;if(Math.abs(t-1)<L.EPSILON6)return r.x=r.y=r.z=0,r;var n=1/Math.sqrt(1-t*t);return r.x=e.x*n,r.y=e.y*n,r.z=e.z*n,r};v.computeAngle=function(e){return s.typeOf.object("quaternion",e),Math.abs(e.w-1)<L.EPSILON6?0:2*Math.acos(e.w)};var pt=new v;v.lerp=function(e,r,t,n){return s.typeOf.object("start",e),s.typeOf.object("end",r),s.typeOf.number("t",t),s.typeOf.object("result",n),pt=v.multiplyByScalar(r,t,pt),n=v.multiplyByScalar(e,1-t,n),v.add(pt,n,n)};var sn=new v,ht=new v,lt=new v;v.slerp=function(e,r,t,n){s.typeOf.object("start",e),s.typeOf.object("end",r),s.typeOf.number("t",t),s.typeOf.object("result",n);var a=v.dot(e,r),o=r;if(a<0&&(a=-a,o=sn=v.negate(r,sn)),1-a<L.EPSILON6)return v.lerp(e,o,t,n);var i=Math.acos(a);return ht=v.multiplyByScalar(e,Math.sin((1-t)*i),ht),lt=v.multiplyByScalar(o,Math.sin(t*i),lt),n=v.add(ht,lt,n),v.multiplyByScalar(n,1/Math.sin(i),n)};v.log=function(e,r){s.typeOf.object("quaternion",e),s.typeOf.object("result",r);var t=L.acosClamped(e.w),n=0;return t!==0&&(n=t/Math.sin(t)),f.multiplyByScalar(e,n,r)};v.exp=function(e,r){s.typeOf.object("cartesian",e),s.typeOf.object("result",r);var t=f.magnitude(e),n=0;return t!==0&&(n=Math.sin(t)/t),r.x=e.x*n,r.y=e.y*n,r.z=e.z*n,r.w=Math.cos(t),r};var ro=new f,to=new f,Je=new v,ke=new v;v.computeInnerQuadrangle=function(e,r,t,n){s.typeOf.object("q0",e),s.typeOf.object("q1",r),s.typeOf.object("q2",t),s.typeOf.object("result",n);var a=v.conjugate(r,Je);v.multiply(a,t,ke);var o=v.log(ke,ro);v.multiply(a,e,ke);var i=v.log(ke,to);return f.add(o,i,o),f.multiplyByScalar(o,.25,o),f.negate(o,o),v.exp(o,Je),v.multiply(r,Je,n)};v.squad=function(e,r,t,n,a,o){s.typeOf.object("q0",e),s.typeOf.object("q1",r),s.typeOf.object("s0",t),s.typeOf.object("s1",n),s.typeOf.number("t",a),s.typeOf.object("result",o);var i=v.slerp(e,r,a,Je),u=v.slerp(t,n,a,ke);return v.slerp(i,u,2*a*(1-a),o)};var no=new v,mn=1.9011074535173003,Tr=Ye.supportsTypedArrays()?new Float32Array(8):[],Cr=Ye.supportsTypedArrays()?new Float32Array(8):[],ve=Ye.supportsTypedArrays()?new Float32Array(8):[],ye=Ye.supportsTypedArrays()?new Float32Array(8):[];for(Le=0;Le<7;++Le)xr=Le+1,vt=2*xr+1,Tr[Le]=1/(xr*vt),Cr[Le]=xr/vt;var xr,vt,Le;Tr[7]=mn/(8*17);Cr[7]=mn*8/17;v.fastSlerp=function(e,r,t,n){s.typeOf.object("start",e),s.typeOf.object("end",r),s.typeOf.number("t",t),s.typeOf.object("result",n);var a=v.dot(e,r),o;a>=0?o=1:(o=-1,a=-a);for(var i=a-1,u=1-t,m=t*t,d=u*u,h=7;h>=0;--h)ve[h]=(Tr[h]*m-Cr[h])*i,ye[h]=(Tr[h]*d-Cr[h])*i;var l=o*t*(1+ve[0]*(1+ve[1]*(1+ve[2]*(1+ve[3]*(1+ve[4]*(1+ve[5]*(1+ve[6]*(1+ve[7])))))))),p=u*(1+ye[0]*(1+ye[1]*(1+ye[2]*(1+ye[3]*(1+ye[4]*(1+ye[5]*(1+ye[6]*(1+ye[7])))))))),E=v.multiplyByScalar(e,p,no);return v.multiplyByScalar(r,l,n),v.add(E,n,n)};v.fastSquad=function(e,r,t,n,a,o){s.typeOf.object("q0",e),s.typeOf.object("q1",r),s.typeOf.object("s0",t),s.typeOf.object("s1",n),s.typeOf.number("t",a),s.typeOf.object("result",o);var i=v.fastSlerp(e,r,a,Je),u=v.fastSlerp(t,n,a,ke);return v.fastSlerp(i,u,2*a*(1-a),o)};v.equals=function(e,r){return e===r||c(e)&&c(r)&&e.x===r.x&&e.y===r.y&&e.z===r.z&&e.w===r.w};v.equalsEpsilon=function(e,r,t){return s.typeOf.number("epsilon",t),e===r||c(e)&&c(r)&&Math.abs(e.x-r.x)<=t&&Math.abs(e.y-r.y)<=t&&Math.abs(e.z-r.z)<=t&&Math.abs(e.w-r.w)<=t};v.ZERO=Object.freeze(new v(0,0,0,0));v.IDENTITY=Object.freeze(new v(0,0,0,1));v.prototype.clone=function(e){return v.clone(this,e)};v.prototype.equals=function(e){return v.equals(this,e)};v.prototype.equalsEpsilon=function(e,r){return v.equalsEpsilon(this,e,r)};v.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var pe=v;var j={},yt={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"}},Ve={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},wt={},ae={east:new f,north:new f,up:new f,west:new f,south:new f,down:new f},Re=new f,xe=new f,Te=new f;j.localFrameToFixedFrameGenerator=function(e,r){if(!yt.hasOwnProperty(e)||!yt[e].hasOwnProperty(r))throw new w("firstAxis and secondAxis must be east, north, up, west, south or down.");var t=yt[e][r],n,a=e+r;return c(wt[a])?n=wt[a]:(n=function(o,i,u){if(!c(o))throw new w("origin is required.");if(c(u)||(u=new q),f.equalsEpsilon(o,f.ZERO,L.EPSILON14))f.unpack(Ve[e],0,Re),f.unpack(Ve[r],0,xe),f.unpack(Ve[t],0,Te);else if(L.equalsEpsilon(o.x,0,L.EPSILON14)&&L.equalsEpsilon(o.y,0,L.EPSILON14)){var m=L.sign(o.z);f.unpack(Ve[e],0,Re),e!=="east"&&e!=="west"&&f.multiplyByScalar(Re,m,Re),f.unpack(Ve[r],0,xe),r!=="east"&&r!=="west"&&f.multiplyByScalar(xe,m,xe),f.unpack(Ve[t],0,Te),t!=="east"&&t!=="west"&&f.multiplyByScalar(Te,m,Te)}else{i=y(i,we.WGS84),i.geodeticSurfaceNormal(o,ae.up);var d=ae.up,h=ae.east;h.x=-o.y,h.y=o.x,h.z=0,f.normalize(h,ae.east),f.cross(d,h,ae.north),f.multiplyByScalar(ae.up,-1,ae.down),f.multiplyByScalar(ae.east,-1,ae.west),f.multiplyByScalar(ae.north,-1,ae.south),Re=ae[e],xe=ae[r],Te=ae[t]}return u[0]=Re.x,u[1]=Re.y,u[2]=Re.z,u[3]=0,u[4]=xe.x,u[5]=xe.y,u[6]=xe.z,u[7]=0,u[8]=Te.x,u[9]=Te.y,u[10]=Te.z,u[11]=0,u[12]=o.x,u[13]=o.y,u[14]=o.z,u[15]=1,u},wt[a]=n),n};j.eastNorthUpToFixedFrame=j.localFrameToFixedFrameGenerator("east","north");j.northEastDownToFixedFrame=j.localFrameToFixedFrameGenerator("north","east");j.northUpEastToFixedFrame=j.localFrameToFixedFrameGenerator("north","up");j.northWestUpToFixedFrame=j.localFrameToFixedFrameGenerator("north","west");var ao=new pe,oo=new f(1,1,1),io=new q;j.headingPitchRollToFixedFrame=function(e,r,t,n,a){s.typeOf.object("HeadingPitchRoll",r),n=y(n,j.eastNorthUpToFixedFrame);var o=pe.fromHeadingPitchRoll(r,ao),i=q.fromTranslationQuaternionRotationScale(f.ZERO,o,oo,io);return a=n(e,t,a),q.multiply(a,i,a)};var fo=new q,co=new U;j.headingPitchRollQuaternion=function(e,r,t,n,a){s.typeOf.object("HeadingPitchRoll",r);var o=j.headingPitchRollToFixedFrame(e,r,t,n,fo),i=q.getMatrix3(o,co);return pe.fromRotationMatrix(i,a)};var uo=new f(1,1,1),so=new f,dn=new q,mo=new q,po=new U,ho=new pe;j.fixedFrameToHeadingPitchRoll=function(e,r,t,n){s.defined("transform",e),r=y(r,we.WGS84),t=y(t,j.eastNorthUpToFixedFrame),c(n)||(n=new ft);var a=q.getTranslation(e,so);if(f.equals(a,f.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;var o=q.inverseTransformation(t(a,r,dn),dn),i=q.setScale(e,uo,mo);i=q.setTranslation(i,f.ZERO,i),o=q.multiply(o,i,o);var u=pe.fromRotationMatrix(q.getMatrix3(o,po),ho);return u=pe.normalize(u,u),ft.fromQuaternion(u,n)};var lo=6*3600+41*60+50.54841,vo=8640184812866e-6,yo=.093104,wo=-62e-7,Oo=11772758384668e-32,bo=72921158553e-15,So=L.TWO_PI/86400,_r=new $;j.computeTemeToPseudoFixedMatrix=function(e,r){if(!c(e))throw new w("date is required.");_r=$.addSeconds(e,-$.computeTaiMinusUtc(e),_r);var t=_r.dayNumber,n=_r.secondsOfDay,a,o=t-2451545;n>=43200?a=(o+.5)/W.DAYS_PER_JULIAN_CENTURY:a=(o-.5)/W.DAYS_PER_JULIAN_CENTURY;var i=lo+a*(vo+a*(yo+a*wo)),u=i*So%L.TWO_PI,m=bo+Oo*(t-24515455e-1),d=(n+W.SECONDS_PER_DAY*.5)%W.SECONDS_PER_DAY,h=u+m*d,l=Math.cos(h),p=Math.sin(h);return c(r)?(r[0]=l,r[1]=-p,r[2]=0,r[3]=p,r[4]=l,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r):new U(l,p,0,-p,l,0,0,0,1)};j.iau2006XysData=new an;j.earthOrientationParameters=Zt.NONE;var St=32.184,go=2451545;j.preloadIcrfFixed=function(e){var r=e.start.dayNumber,t=e.start.secondsOfDay+St,n=e.stop.dayNumber,a=e.stop.secondsOfDay+St,o=j.iau2006XysData.preload(r,t,n,a),i=j.earthOrientationParameters.getPromiseToLoad();return k.all([o,i])};j.computeIcrfToFixedMatrix=function(e,r){if(!c(e))throw new w("date is required.");c(r)||(r=new U);var t=j.computeFixedToIcrfMatrix(e,r);if(!!c(t))return U.transpose(t,r)};var Eo=new gr(0,0,0),Ro=new We(0,0,0,0,0,0),Ot=new U,bt=new U;j.computeFixedToIcrfMatrix=function(e,r){if(!c(e))throw new w("date is required.");c(r)||(r=new U);var t=j.earthOrientationParameters.compute(e,Ro);if(!!c(t)){var n=e.dayNumber,a=e.secondsOfDay+St,o=j.iau2006XysData.computeXysRadians(n,a,Eo);if(!!c(o)){var i=o.x+t.xPoleOffset,u=o.y+t.yPoleOffset,m=1/(1+Math.sqrt(1-i*i-u*u)),d=Ot;d[0]=1-m*i*i,d[3]=-m*i*u,d[6]=i,d[1]=-m*i*u,d[4]=1-m*u*u,d[7]=u,d[2]=-i,d[5]=-u,d[8]=1-m*(i*i+u*u);var h=U.fromRotationZ(-o.s,bt),l=U.multiply(d,h,Ot),p=e.dayNumber,E=e.secondsOfDay-$.computeTaiMinusUtc(e)+t.ut1MinusUtc,S=p-2451545,g=E/W.SECONDS_PER_DAY,_=.779057273264+g+.00273781191135448*(S+g);_=_%1*L.TWO_PI;var A=U.fromRotationZ(_,bt),F=U.multiply(l,A,Ot),N=Math.cos(t.xPoleWander),x=Math.cos(t.yPoleWander),P=Math.sin(t.xPoleWander),D=Math.sin(t.yPoleWander),z=n-go+a/W.SECONDS_PER_DAY;z/=36525;var I=-47e-6*z*L.RADIANS_PER_DEGREE/3600,G=Math.cos(I),K=Math.sin(I),Y=bt;return Y[0]=N*G,Y[1]=N*K,Y[2]=P,Y[3]=-x*K+D*P*G,Y[4]=x*G+D*P*K,Y[5]=-D*N,Y[6]=-D*K-x*P*G,Y[7]=D*G-x*P*K,Y[8]=x*N,U.multiply(F,Y,r)}}};var xo=new $e;j.pointToWindowCoordinates=function(e,r,t,n){return n=j.pointToGLWindowCoordinates(e,r,t,n),n.y=2*r[5]-n.y,n};j.pointToGLWindowCoordinates=function(e,r,t,n){if(!c(e))throw new w("modelViewProjectionMatrix is required.");if(!c(r))throw new w("viewportTransformation is required.");if(!c(t))throw new w("point is required.");c(n)||(n=new X);var a=xo;return q.multiplyByVector(e,$e.fromElements(t.x,t.y,t.z,1,a),a),$e.multiplyByScalar(a,1/a.w,a),q.multiplyByVector(r,a,a),X.fromCartesian4(a,n)};var To=new f,Co=new f,_o=new f;j.rotationMatrixFromPositionVelocity=function(e,r,t,n){if(!c(e))throw new w("position is required.");if(!c(r))throw new w("velocity is required.");var a=y(t,we.WGS84).geodeticSurfaceNormal(e,To),o=f.cross(r,a,Co);f.equalsEpsilon(o,f.ZERO,L.EPSILON6)&&(o=f.clone(f.UNIT_X,o));var i=f.cross(o,r,_o);return f.normalize(i,i),f.cross(r,i,o),f.negate(o,o),f.normalize(o,o),c(n)||(n=new U),n[0]=r.x,n[1]=r.y,n[2]=r.z,n[3]=o.x,n[4]=o.y,n[5]=o.z,n[6]=i.x,n[7]=i.y,n[8]=i.z,n};var pn=new q(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),hn=new ee,ln=new f,Po=new f,Ao=new U,gt=new q,vn=new q;j.basisTo2D=function(e,r,t){if(!c(e))throw new w("projection is required.");if(!c(r))throw new w("matrix is required.");if(!c(t))throw new w("result is required.");var n=q.getTranslation(r,Po),a=e.ellipsoid,o=a.cartesianToCartographic(n,hn),i=e.project(o,ln);f.fromElements(i.z,i.x,i.y,i);var u=j.eastNorthUpToFixedFrame(n,a,gt),m=q.inverseTransformation(u,vn),d=q.getMatrix3(r,Ao),h=q.multiplyByMatrix3(m,d,t);return q.multiply(pn,h,t),q.setTranslation(t,i,t),t};j.wgs84To2DModelMatrix=function(e,r,t){if(!c(e))throw new w("projection is required.");if(!c(r))throw new w("center is required.");if(!c(t))throw new w("result is required.");var n=e.ellipsoid,a=j.eastNorthUpToFixedFrame(r,n,gt),o=q.inverseTransformation(a,vn),i=n.cartesianToCartographic(r,hn),u=e.project(i,ln);f.fromElements(u.z,u.x,u.y,u);var m=q.fromTranslation(u,gt);return q.multiply(pn,o,t),q.multiply(m,t,t),t};j.buildUp=function(e,r){var t=r.clone(),n=e.clone();n=f.normalize(n,n),Math.abs(f.dot(n,t))>=1&&(Math.abs(f.dot(t,f.UNIT_Y))<1?n=f.clone(f.UNIT_Y,n):n=f.clone(f.UNIT_Z,n));var a=new f;return f.cross(n,t,a),a=f.normalize(a,a),f.cross(t,a,n),n=f.normalize(n,n),n};j.getHeading=function(e,r){var t;return L.equalsEpsilon(Math.abs(e.z),1,L.EPSILON3)?t=Math.atan2(r.y,r.x)-L.PI_OVER_TWO:t=Math.atan2(e.y,e.x)-L.PI_OVER_TWO,L.TWO_PI-L.zeroToTwoPi(t)};j.convertToColumbusCartesian=function(e){var r=new Me,t=r.ellipsoid,n=new f,a=new ee;return t.cartesianToCartographic(e,a),r.project(a,n),f.fromElements(n.z,n.x,n.y)};j.convertTo3DCartesian=function(e){var r=new Me,t=r.ellipsoid,n=new f,a=new ee;return n=f.fromElements(e.y,e.z,e.x),r.unproject(n,a),t.cartographicToCartesian(a,n)};var yn=j;var Do={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},wn=Object.freeze(Do);function C(e,r,t,n){this[0]=y(e,0),this[1]=y(t,0),this[2]=y(r,0),this[3]=y(n,0)}C.packedLength=4;C.pack=function(e,r,t){return s.typeOf.object("value",e),s.defined("array",r),t=y(t,0),r[t++]=e[0],r[t++]=e[1],r[t++]=e[2],r[t++]=e[3],r};C.unpack=function(e,r,t){return s.defined("array",e),r=y(r,0),c(t)||(t=new C),t[0]=e[r++],t[1]=e[r++],t[2]=e[r++],t[3]=e[r++],t};C.clone=function(e,r){if(!!c(e))return c(r)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r):new C(e[0],e[2],e[1],e[3])};C.fromArray=function(e,r,t){return s.defined("array",e),r=y(r,0),c(t)||(t=new C),t[0]=e[r],t[1]=e[r+1],t[2]=e[r+2],t[3]=e[r+3],t};C.fromColumnMajorArray=function(e,r){return s.defined("values",e),C.clone(e,r)};C.fromRowMajorArray=function(e,r){return s.defined("values",e),c(r)?(r[0]=e[0],r[1]=e[2],r[2]=e[1],r[3]=e[3],r):new C(e[0],e[1],e[2],e[3])};C.fromScale=function(e,r){return s.typeOf.object("scale",e),c(r)?(r[0]=e.x,r[1]=0,r[2]=0,r[3]=e.y,r):new C(e.x,0,0,e.y)};C.fromUniformScale=function(e,r){return s.typeOf.number("scale",e),c(r)?(r[0]=e,r[1]=0,r[2]=0,r[3]=e,r):new C(e,0,0,e)};C.fromRotation=function(e,r){s.typeOf.number("angle",e);var t=Math.cos(e),n=Math.sin(e);return c(r)?(r[0]=t,r[1]=n,r[2]=-n,r[3]=t,r):new C(t,-n,n,t)};C.toArray=function(e,r){return s.typeOf.object("matrix",e),c(r)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r):[e[0],e[1],e[2],e[3]]};C.getElementIndex=function(e,r){return s.typeOf.number.greaterThanOrEquals("row",r,0),s.typeOf.number.lessThanOrEquals("row",r,1),s.typeOf.number.greaterThanOrEquals("column",e,0),s.typeOf.number.lessThanOrEquals("column",e,1),e*2+r};C.getColumn=function(e,r,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",r,0),s.typeOf.number.lessThanOrEquals("index",r,1),s.typeOf.object("result",t);var n=r*2,a=e[n],o=e[n+1];return t.x=a,t.y=o,t};C.setColumn=function(e,r,t,n){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",r,0),s.typeOf.number.lessThanOrEquals("index",r,1),s.typeOf.object("cartesian",t),s.typeOf.object("result",n),n=C.clone(e,n);var a=r*2;return n[a]=t.x,n[a+1]=t.y,n};C.getRow=function(e,r,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",r,0),s.typeOf.number.lessThanOrEquals("index",r,1),s.typeOf.object("result",t);var n=e[r],a=e[r+2];return t.x=n,t.y=a,t};C.setRow=function(e,r,t,n){return s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",r,0),s.typeOf.number.lessThanOrEquals("index",r,1),s.typeOf.object("cartesian",t),s.typeOf.object("result",n),n=C.clone(e,n),n[r]=t.x,n[r+2]=t.y,n};var On=new X;C.getScale=function(e,r){return s.typeOf.object("matrix",e),s.typeOf.object("result",r),r.x=X.magnitude(X.fromElements(e[0],e[1],On)),r.y=X.magnitude(X.fromElements(e[2],e[3],On)),r};var bn=new X;C.getMaximumScale=function(e){return C.getScale(e,bn),X.maximumComponent(bn)};C.multiply=function(e,r,t){s.typeOf.object("left",e),s.typeOf.object("right",r),s.typeOf.object("result",t);var n=e[0]*r[0]+e[2]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[0]+e[3]*r[1],i=e[1]*r[2]+e[3]*r[3];return t[0]=n,t[1]=o,t[2]=a,t[3]=i,t};C.add=function(e,r,t){return s.typeOf.object("left",e),s.typeOf.object("right",r),s.typeOf.object("result",t),t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t};C.subtract=function(e,r,t){return s.typeOf.object("left",e),s.typeOf.object("right",r),s.typeOf.object("result",t),t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t};C.multiplyByVector=function(e,r,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",r),s.typeOf.object("result",t);var n=e[0]*r.x+e[2]*r.y,a=e[1]*r.x+e[3]*r.y;return t.x=n,t.y=a,t};C.multiplyByScalar=function(e,r,t){return s.typeOf.object("matrix",e),s.typeOf.number("scalar",r),s.typeOf.object("result",t),t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t};C.multiplyByScale=function(e,r,t){return s.typeOf.object("matrix",e),s.typeOf.object("scale",r),s.typeOf.object("result",t),t[0]=e[0]*r.x,t[1]=e[1]*r.x,t[2]=e[2]*r.y,t[3]=e[3]*r.y,t};C.negate=function(e,r){return s.typeOf.object("matrix",e),s.typeOf.object("result",r),r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r[3]=-e[3],r};C.transpose=function(e,r){s.typeOf.object("matrix",e),s.typeOf.object("result",r);var t=e[0],n=e[2],a=e[1],o=e[3];return r[0]=t,r[1]=n,r[2]=a,r[3]=o,r};C.abs=function(e,r){return s.typeOf.object("matrix",e),s.typeOf.object("result",r),r[0]=Math.abs(e[0]),r[1]=Math.abs(e[1]),r[2]=Math.abs(e[2]),r[3]=Math.abs(e[3]),r};C.equals=function(e,r){return e===r||c(e)&&c(r)&&e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]};C.equalsArray=function(e,r,t){return e[0]===r[t]&&e[1]===r[t+1]&&e[2]===r[t+2]&&e[3]===r[t+3]};C.equalsEpsilon=function(e,r,t){return s.typeOf.number("epsilon",t),e===r||c(e)&&c(r)&&Math.abs(e[0]-r[0])<=t&&Math.abs(e[1]-r[1])<=t&&Math.abs(e[2]-r[2])<=t&&Math.abs(e[3]-r[3])<=t};C.IDENTITY=Object.freeze(new C(1,0,0,1));C.ZERO=Object.freeze(new C(0,0,0,0));C.COLUMN0ROW0=0;C.COLUMN0ROW1=1;C.COLUMN1ROW0=2;C.COLUMN1ROW1=3;Object.defineProperties(C.prototype,{length:{get:function(){return C.packedLength}}});C.prototype.clone=function(e){return C.clone(this,e)};C.prototype.equals=function(e){return C.equals(this,e)};C.prototype.equalsEpsilon=function(e,r){return C.equalsEpsilon(this,e,r)};C.prototype.toString=function(){return"("+this[0]+", "+this[2]+`)
- (`+this[1]+", "+this[3]+")"};var Pr=C;var Ce={POINTS:Oe.POINTS,LINES:Oe.LINES,LINE_LOOP:Oe.LINE_LOOP,LINE_STRIP:Oe.LINE_STRIP,TRIANGLES:Oe.TRIANGLES,TRIANGLE_STRIP:Oe.TRIANGLE_STRIP,TRIANGLE_FAN:Oe.TRIANGLE_FAN,validate:function(e){return e===Ce.POINTS||e===Ce.LINES||e===Ce.LINE_LOOP||e===Ce.LINE_STRIP||e===Ce.TRIANGLES||e===Ce.TRIANGLE_STRIP||e===Ce.TRIANGLE_FAN}},Sn=Object.freeze(Ce);function Et(e){e=y(e,y.EMPTY_OBJECT),s.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=y(e.primitiveType,Sn.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=y(e.geometryType,wn.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}Et.computeNumberOfVertices=function(e){s.typeOf.object("geometry",e);var r=-1;for(var t in e.attributes)if(e.attributes.hasOwnProperty(t)&&c(e.attributes[t])&&c(e.attributes[t].values)){var n=e.attributes[t];if(n.isInstanceAttribute)continue;var a=n.values.length/n.componentsPerAttribute;if(r!==a&&r!==-1)throw new w("All attribute lists must have the same number of attributes.");r=a}return r};var Io=new ee,Uo=new f,gn=new q,Mo=[new ee,new ee,new ee],qo=[new X,new X,new X],No=[new X,new X,new X],jo=new f,zo=new pe,Bo=new q,Fo=new Pr;Et._textureCoordinateRotationPoints=function(e,r,t,n){var a,o=Ue.center(n,Io),i=ee.toCartesian(o,t,Uo),u=yn.eastNorthUpToFixedFrame(i,t,gn),m=q.inverse(u,gn),d=qo,h=Mo;h[0].longitude=n.west,h[0].latitude=n.south,h[1].longitude=n.west,h[1].latitude=n.north,h[2].longitude=n.east,h[2].latitude=n.south;var l=jo;for(a=0;a<3;a++)ee.toCartesian(h[a],t,l),l=q.multiplyByPointAsVector(m,l,l),d[a].x=l.x,d[a].y=l.y;var p=pe.fromAxisAngle(f.UNIT_Z,-r,zo),E=U.fromQuaternion(p,Bo),S=e.length,g=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,F=Number.NEGATIVE_INFINITY;for(a=0;a<S;a++)l=q.multiplyByPointAsVector(m,e[a],l),l=U.multiplyByVector(E,l,l),g=Math.min(g,l.x),_=Math.min(_,l.y),A=Math.max(A,l.x),F=Math.max(F,l.y);var N=Pr.fromRotation(r,Fo),x=No;x[0].x=g,x[0].y=_,x[1].x=g,x[1].y=F,x[2].x=A,x[2].y=_;var P=d[0],D=d[2].x-P.x,z=d[1].y-P.y;for(a=0;a<3;a++){var I=x[a];Pr.multiplyByVector(N,I,I),I.x=(I.x-P.x)/D,I.y=(I.y-P.y)/z}var G=x[0],K=x[1],Y=x[2],te=new Array(6);return X.pack(G,te),X.pack(K,te,2),X.pack(Y,te,4),te};var us=Et;function Lo(e){if(e=y(e,y.EMPTY_OBJECT),!c(e.componentDatatype))throw new w("options.componentDatatype is required.");if(!c(e.componentsPerAttribute))throw new w("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new w("options.componentsPerAttribute must be between 1 and 4.");if(!c(e.values))throw new w("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=y(e.normalize,!1),this.values=e.values}var hs=Lo;export{Me as a,rr as b,xt as c,mi as d,wn as e,Pr as f,Sn as g,pe as h,Ht as i,rc as j,Ee as k,nn as l,yn as m,us as n,hs as o};
|