/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.96.6 * * Copyright 2011-2022 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ define(["exports","./Matrix2-4706dd70","./RuntimeError-a977b8e0","./defaultValue-028a8a27","./ComponentDatatype-438cad2a","./_commonjsHelpers-3aae1032-f55dc0c4","./combine-13bb426d"],(function(e,t,r,n,o,i,s){"use strict";function a(e){this._ellipsoid=n.defaultValue(e,t.Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(a.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),a.prototype.project=function(e,r){const o=this._semimajorAxis,i=e.longitude*o,s=e.latitude*o,a=e.height;return n.defined(r)?(r.x=i,r.y=s,r.z=a,r):new t.Cartesian3(i,s,a)},a.prototype.unproject=function(e,o){if(!n.defined(e))throw new r.DeveloperError("cartesian is required");const i=this._oneOverSemimajorAxis,s=e.x*i,a=e.y*i,u=e.z;return n.defined(o)?(o.longitude=s,o.latitude=a,o.height=u,o):new t.Cartographic(s,a,u)};var u=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});function c(e,t){this.start=n.defaultValue(e,0),this.stop=n.defaultValue(t,0)}function l(e,r){this.center=t.Cartesian3.clone(n.defaultValue(e,t.Cartesian3.ZERO)),this.radius=n.defaultValue(r,0)}const d=new t.Cartesian3,f=new t.Cartesian3,p=new t.Cartesian3,h=new t.Cartesian3,m=new t.Cartesian3,g=new t.Cartesian3,y=new t.Cartesian3,v=new t.Cartesian3,w=new t.Cartesian3,C=new t.Cartesian3,b=new t.Cartesian3,_=new t.Cartesian3,x=4/3*o.CesiumMath.PI;l.fromPoints=function(e,r){if(n.defined(r)||(r=new l),!n.defined(e)||0===e.length)return r.center=t.Cartesian3.clone(t.Cartesian3.ZERO,r.center),r.radius=0,r;const o=t.Cartesian3.clone(e[0],y),i=t.Cartesian3.clone(o,d),s=t.Cartesian3.clone(o,f),a=t.Cartesian3.clone(o,p),u=t.Cartesian3.clone(o,h),c=t.Cartesian3.clone(o,m),x=t.Cartesian3.clone(o,g),E=e.length;let O;for(O=1;O<E;O++){t.Cartesian3.clone(e[O],o);const r=o.x,n=o.y,l=o.z;r<i.x&&t.Cartesian3.clone(o,i),r>u.x&&t.Cartesian3.clone(o,u),n<s.y&&t.Cartesian3.clone(o,s),n>c.y&&t.Cartesian3.clone(o,c),l<a.z&&t.Cartesian3.clone(o,a),l>x.z&&t.Cartesian3.clone(o,x)}const S=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(u,i,v)),A=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(c,s,v)),q=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(x,a,v));let D=i,k=u,I=S;A>I&&(I=A,D=s,k=c),q>I&&(I=q,D=a,k=x);const P=w;P.x=.5*(D.x+k.x),P.y=.5*(D.y+k.y),P.z=.5*(D.z+k.z);let R=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(k,P,v)),T=Math.sqrt(R);const z=C;z.x=i.x,z.y=s.y,z.z=a.z;const M=b;M.x=u.x,M.y=c.y,M.z=x.z;const U=t.Cartesian3.midpoint(z,M,_);let j=0;for(O=0;O<E;O++){t.Cartesian3.clone(e[O],o);const r=t.Cartesian3.magnitude(t.Cartesian3.subtract(o,U,v));r>j&&(j=r);const n=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(o,P,v));if(n>R){const e=Math.sqrt(n);T=.5*(T+e),R=T*T;const t=e-T;P.x=(T*P.x+t*o.x)/e,P.y=(T*P.y+t*o.y)/e,P.z=(T*P.z+t*o.z)/e}}return T<j?(t.Cartesian3.clone(P,r.center),r.radius=T):(t.Cartesian3.clone(U,r.center),r.radius=j),r};const E=new a,O=new t.Cartesian3,S=new t.Cartesian3,A=new t.Cartographic,q=new t.Cartographic;l.fromRectangle2D=function(e,t,r){return l.fromRectangleWithHeights2D(e,t,0,0,r)},l.fromRectangleWithHeights2D=function(e,r,o,i,s){if(n.defined(s)||(s=new l),!n.defined(e))return s.center=t.Cartesian3.clone(t.Cartesian3.ZERO,s.center),s.radius=0,s;r=n.defaultValue(r,E),t.Rectangle.southwest(e,A),A.height=o,t.Rectangle.northeast(e,q),q.height=i;const a=r.project(A,O),u=r.project(q,S),c=u.x-a.x,d=u.y-a.y,f=u.z-a.z;s.radius=.5*Math.sqrt(c*c+d*d+f*f);const p=s.center;return p.x=a.x+.5*c,p.y=a.y+.5*d,p.z=a.z+.5*f,s};const D=[];l.fromRectangle3D=function(e,r,o,i){if(r=n.defaultValue(r,t.Ellipsoid.WGS84),o=n.defaultValue(o,0),n.defined(i)||(i=new l),!n.defined(e))return i.center=t.Cartesian3.clone(t.Cartesian3.ZERO,i.center),i.radius=0,i;const s=t.Rectangle.subsample(e,r,o,D);return l.fromPoints(s,i)},l.fromVertices=function(e,o,i,s){if(n.defined(s)||(s=new l),!n.defined(e)||0===e.length)return s.center=t.Cartesian3.clone(t.Cartesian3.ZERO,s.center),s.radius=0,s;o=n.defaultValue(o,t.Cartesian3.ZERO),i=n.defaultValue(i,3),r.Check.typeOf.number.greaterThanOrEquals("stride",i,3);const a=y;a.x=e[0]+o.x,a.y=e[1]+o.y,a.z=e[2]+o.z;const u=t.Cartesian3.clone(a,d),c=t.Cartesian3.clone(a,f),x=t.Cartesian3.clone(a,p),E=t.Cartesian3.clone(a,h),O=t.Cartesian3.clone(a,m),S=t.Cartesian3.clone(a,g),A=e.length;let q;for(q=0;q<A;q+=i){const r=e[q]+o.x,n=e[q+1]+o.y,i=e[q+2]+o.z;a.x=r,a.y=n,a.z=i,r<u.x&&t.Cartesian3.clone(a,u),r>E.x&&t.Cartesian3.clone(a,E),n<c.y&&t.Cartesian3.clone(a,c),n>O.y&&t.Cartesian3.clone(a,O),i<x.z&&t.Cartesian3.clone(a,x),i>S.z&&t.Cartesian3.clone(a,S)}const D=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(E,u,v)),k=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(O,c,v)),I=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(S,x,v));let P=u,R=E,T=D;k>T&&(T=k,P=c,R=O),I>T&&(T=I,P=x,R=S);const z=w;z.x=.5*(P.x+R.x),z.y=.5*(P.y+R.y),z.z=.5*(P.z+R.z);let M=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(R,z,v)),U=Math.sqrt(M);const j=C;j.x=u.x,j.y=c.y,j.z=x.z;const F=b;F.x=E.x,F.y=O.y,F.z=S.z;const N=t.Cartesian3.midpoint(j,F,_);let B=0;for(q=0;q<A;q+=i){a.x=e[q]+o.x,a.y=e[q+1]+o.y,a.z=e[q+2]+o.z;const r=t.Cartesian3.magnitude(t.Cartesian3.subtract(a,N,v));r>B&&(B=r);const n=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(a,z,v));if(n>M){const e=Math.sqrt(n);U=.5*(U+e),M=U*U;const t=e-U;z.x=(U*z.x+t*a.x)/e,z.y=(U*z.y+t*a.y)/e,z.z=(U*z.z+t*a.z)/e}}return U<B?(t.Cartesian3.clone(z,s.center),s.radius=U):(t.Cartesian3.clone(N,s.center),s.radius=B),s},l.fromEncodedCartesianVertices=function(e,r,o){if(n.defined(o)||(o=new l),!n.defined(e)||!n.defined(r)||e.length!==r.length||0===e.length)return o.center=t.Cartesian3.clone(t.Cartesian3.ZERO,o.center),o.radius=0,o;const i=y;i.x=e[0]+r[0],i.y=e[1]+r[1],i.z=e[2]+r[2];const s=t.Cartesian3.clone(i,d),a=t.Cartesian3.clone(i,f),u=t.Cartesian3.clone(i,p),c=t.Cartesian3.clone(i,h),x=t.Cartesian3.clone(i,m),E=t.Cartesian3.clone(i,g),O=e.length;let S;for(S=0;S<O;S+=3){const n=e[S]+r[S],o=e[S+1]+r[S+1],l=e[S+2]+r[S+2];i.x=n,i.y=o,i.z=l,n<s.x&&t.Cartesian3.clone(i,s),n>c.x&&t.Cartesian3.clone(i,c),o<a.y&&t.Cartesian3.clone(i,a),o>x.y&&t.Cartesian3.clone(i,x),l<u.z&&t.Cartesian3.clone(i,u),l>E.z&&t.Cartesian3.clone(i,E)}const A=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(c,s,v)),q=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(x,a,v)),D=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(E,u,v));let k=s,I=c,P=A;q>P&&(P=q,k=a,I=x),D>P&&(P=D,k=u,I=E);const R=w;R.x=.5*(k.x+I.x),R.y=.5*(k.y+I.y),R.z=.5*(k.z+I.z);let T=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(I,R,v)),z=Math.sqrt(T);const M=C;M.x=s.x,M.y=a.y,M.z=u.z;const U=b;U.x=c.x,U.y=x.y,U.z=E.z;const j=t.Cartesian3.midpoint(M,U,_);let F=0;for(S=0;S<O;S+=3){i.x=e[S]+r[S],i.y=e[S+1]+r[S+1],i.z=e[S+2]+r[S+2];const n=t.Cartesian3.magnitude(t.Cartesian3.subtract(i,j,v));n>F&&(F=n);const o=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(i,R,v));if(o>T){const e=Math.sqrt(o);z=.5*(z+e),T=z*z;const t=e-z;R.x=(z*R.x+t*i.x)/e,R.y=(z*R.y+t*i.y)/e,R.z=(z*R.z+t*i.z)/e}}return z<F?(t.Cartesian3.clone(R,o.center),o.radius=z):(t.Cartesian3.clone(j,o.center),o.radius=F),o},l.fromCornerPoints=function(e,o,i){r.Check.typeOf.object("corner",e),r.Check.typeOf.object("oppositeCorner",o),n.defined(i)||(i=new l);const s=t.Cartesian3.midpoint(e,o,i.center);return i.radius=t.Cartesian3.distance(s,o),i},l.fromEllipsoid=function(e,o){return r.Check.typeOf.object("ellipsoid",e),n.defined(o)||(o=new l),t.Cartesian3.clone(t.Cartesian3.ZERO,o.center),o.radius=e.maximumRadius,o};const k=new t.Cartesian3;l.fromBoundingSpheres=function(e,r){if(n.defined(r)||(r=new l),!n.defined(e)||0===e.length)return r.center=t.Cartesian3.clone(t.Cartesian3.ZERO,r.center),r.radius=0,r;const o=e.length;if(1===o)return l.clone(e[0],r);if(2===o)return l.union(e[0],e[1],r);const i=[];let s;for(s=0;s<o;s++)i.push(e[s].center);r=l.fromPoints(i,r);const a=r.center;let u=r.radius;for(s=0;s<o;s++){const r=e[s];u=Math.max(u,t.Cartesian3.distance(a,r.center,k)+r.radius)}return r.radius=u,r};const I=new t.Cartesian3,P=new t.Cartesian3,R=new t.Cartesian3;l.fromOrientedBoundingBox=function(e,o){r.Check.defined("orientedBoundingBox",e),n.defined(o)||(o=new l);const i=e.halfAxes,s=t.Matrix3.getColumn(i,0,I),a=t.Matrix3.getColumn(i,1,P),u=t.Matrix3.getColumn(i,2,R);return t.Cartesian3.add(s,a,s),t.Cartesian3.add(s,u,s),o.center=t.Cartesian3.clone(e.center,o.center),o.radius=t.Cartesian3.magnitude(s),o};const T=new t.Cartesian3,z=new t.Cartesian3;l.fromTransformation=function(e,o){r.Check.typeOf.object("transformation",e),n.defined(o)||(o=new l);const i=t.Matrix4.getTranslation(e,T),s=t.Matrix4.getScale(e,z),a=.5*t.Cartesian3.magnitude(s);return o.center=t.Cartesian3.clone(i,o.center),o.radius=a,o},l.clone=function(e,r){if(n.defined(e))return n.defined(r)?(r.center=t.Cartesian3.clone(e.center,r.center),r.radius=e.radius,r):new l(e.center,e.radius)},l.packedLength=4,l.pack=function(e,t,o){r.Check.typeOf.object("value",e),r.Check.defined("array",t),o=n.defaultValue(o,0);const i=e.center;return t[o++]=i.x,t[o++]=i.y,t[o++]=i.z,t[o]=e.radius,t},l.unpack=function(e,t,o){r.Check.defined("array",e),t=n.defaultValue(t,0),n.defined(o)||(o=new l);const i=o.center;return i.x=e[t++],i.y=e[t++],i.z=e[t++],o.radius=e[t],o};const M=new t.Cartesian3,U=new t.Cartesian3;l.union=function(e,o,i){r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",o),n.defined(i)||(i=new l);const s=e.center,a=e.radius,u=o.center,c=o.radius,d=t.Cartesian3.subtract(u,s,M),f=t.Cartesian3.magnitude(d);if(a>=f+c)return e.clone(i),i;if(c>=f+a)return o.clone(i),i;const p=.5*(a+f+c),h=t.Cartesian3.multiplyByScalar(d,(-a+p)/f,U);return t.Cartesian3.add(h,s,h),t.Cartesian3.clone(h,i.center),i.radius=p,i};const j=new t.Cartesian3;l.expand=function(e,n,o){r.Check.typeOf.object("sphere",e),r.Check.typeOf.object("point",n),o=l.clone(e,o);const i=t.Cartesian3.magnitude(t.Cartesian3.subtract(n,o.center,j));return i>o.radius&&(o.radius=i),o},l.intersectPlane=function(e,n){r.Check.typeOf.object("sphere",e),r.Check.typeOf.object("plane",n);const o=e.center,i=e.radius,s=n.normal,a=t.Cartesian3.dot(s,o)+n.distance;return a<-i?u.OUTSIDE:a<i?u.INTERSECTING:u.INSIDE},l.transform=function(e,o,i){return r.Check.typeOf.object("sphere",e),r.Check.typeOf.object("transform",o),n.defined(i)||(i=new l),i.center=t.Matrix4.multiplyByPoint(o,e.center,i.center),i.radius=t.Matrix4.getMaximumScale(o)*e.radius,i};const F=new t.Cartesian3;l.distanceSquaredTo=function(e,n){r.Check.typeOf.object("sphere",e),r.Check.typeOf.object("cartesian",n);const o=t.Cartesian3.subtract(e.center,n,F),i=t.Cartesian3.magnitude(o)-e.radius;return i<=0?0:i*i},l.transformWithoutScale=function(e,o,i){return r.Check.typeOf.object("sphere",e),r.Check.typeOf.object("transform",o),n.defined(i)||(i=new l),i.center=t.Matrix4.multiplyByPoint(o,e.center,i.center),i.radius=e.radius,i};const N=new t.Cartesian3;l.computePlaneDistances=function(e,o,i,s){r.Check.typeOf.object("sphere",e),r.Check.typeOf.object("position",o),r.Check.typeOf.object("direction",i),n.defined(s)||(s=new c);const a=t.Cartesian3.subtract(e.center,o,N),u=t.Cartesian3.dot(i,a);return s.start=u-e.radius,s.stop=u+e.radius,s};const B=new t.Cartesian3,V=new t.Cartesian3,L=new t.Cartesian3,Q=new t.Cartesian3,$=new t.Cartesian3,W=new t.Cartographic,H=new Array(8);for(let co=0;co<8;++co)H[co]=new t.Cartesian3;const Y=new a;function Z(){let e,t;const r=new Promise((function(r,n){e=r,t=n}));return{resolve:e,reject:t,promise:r}}let G;l.projectTo2D=function(e,o,i){r.Check.typeOf.object("sphere",e),o=n.defaultValue(o,Y);const s=o.ellipsoid;let a=e.center;const u=e.radius;let c;c=t.Cartesian3.equals(a,t.Cartesian3.ZERO)?t.Cartesian3.clone(t.Cartesian3.UNIT_X,B):s.geodeticSurfaceNormal(a,B);const d=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,c,V);t.Cartesian3.normalize(d,d);const f=t.Cartesian3.cross(c,d,L);t.Cartesian3.normalize(f,f),t.Cartesian3.multiplyByScalar(c,u,c),t.Cartesian3.multiplyByScalar(f,u,f),t.Cartesian3.multiplyByScalar(d,u,d);const p=t.Cartesian3.negate(f,$),h=t.Cartesian3.negate(d,Q),m=H;let g=m[0];t.Cartesian3.add(c,f,g),t.Cartesian3.add(g,d,g),g=m[1],t.Cartesian3.add(c,f,g),t.Cartesian3.add(g,h,g),g=m[2],t.Cartesian3.add(c,p,g),t.Cartesian3.add(g,h,g),g=m[3],t.Cartesian3.add(c,p,g),t.Cartesian3.add(g,d,g),t.Cartesian3.negate(c,c),g=m[4],t.Cartesian3.add(c,f,g),t.Cartesian3.add(g,d,g),g=m[5],t.Cartesian3.add(c,f,g),t.Cartesian3.add(g,h,g),g=m[6],t.Cartesian3.add(c,p,g),t.Cartesian3.add(g,h,g),g=m[7],t.Cartesian3.add(c,p,g),t.Cartesian3.add(g,d,g);const y=m.length;for(let r=0;r<y;++r){const e=m[r];t.Cartesian3.add(a,e,e);const n=s.cartesianToCartographic(e,W);o.project(n,e)}i=l.fromPoints(m,i),a=i.center;const v=a.x,w=a.y,C=a.z;return a.x=C,a.y=v,a.z=w,i},l.isOccluded=function(e,t){return r.Check.typeOf.object("sphere",e),r.Check.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)},l.equals=function(e,r){return e===r||n.defined(e)&&n.defined(r)&&t.Cartesian3.equals(e.center,r.center)&&e.radius===r.radius},l.prototype.intersectPlane=function(e){return l.intersectPlane(this,e)},l.prototype.distanceSquaredTo=function(e){return l.distanceSquaredTo(this,e)},l.prototype.computePlaneDistances=function(e,t,r){return l.computePlaneDistances(this,e,t,r)},l.prototype.isOccluded=function(e){return l.isOccluded(this,e)},l.prototype.equals=function(e){return l.equals(this,e)},l.prototype.clone=function(e){return l.clone(this,e)},l.prototype.volume=function(){const e=this.radius;return x*e*e*e};const J={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},X={};let K,ee,te,re,ne,oe,ie,se,ae,ue,ce,le,de,fe,pe,he,me,ge;function ye(e){const t=e.split(".");for(let r=0,n=t.length;r<n;++r)t[r]=parseInt(t[r],10);return t}function ve(){if(!n.defined(ee)&&(ee=!1,!Se())){const e=/ Chrome\/([\.0-9]+)/.exec(K.userAgent);null!==e&&(ee=!0,te=ye(e[1]))}return ee}function we(){return ve()&&te}function Ce(){if(!n.defined(re)&&(re=!1,!ve()&&!Se()&&/ Safari\/[\.0-9]+/.test(K.userAgent))){const e=/ Version\/([\.0-9]+)/.exec(K.userAgent);null!==e&&(re=!0,ne=ye(e[1]))}return re}function be(){return Ce()&&ne}function _e(){if(!n.defined(oe)){oe=!1;const e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(K.userAgent);null!==e&&(oe=!0,ie=ye(e[1]),ie.isNightly=!!e[2])}return oe}function xe(){return _e()&&ie}function Ee(){if(!n.defined(se)){let e;se=!1,"Microsoft Internet Explorer"===K.appName?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(K.userAgent),null!==e&&(se=!0,ae=ye(e[1]))):"Netscape"===K.appName&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(K.userAgent),null!==e&&(se=!0,ae=ye(e[1])))}return se}function Oe(){return Ee()&&ae}function Se(){if(!n.defined(ue)){ue=!1;const e=/ Edg\/([\.0-9]+)/.exec(K.userAgent);null!==e&&(ue=!0,ce=ye(e[1]))}return ue}function Ae(){return Se()&&ce}function qe(){if(!n.defined(le)){le=!1;const e=/Firefox\/([\.0-9]+)/.exec(K.userAgent);null!==e&&(le=!0,de=ye(e[1]))}return le}function De(){return n.defined(fe)||(fe=/Windows/i.test(K.appVersion)),fe}function ke(){return n.defined(pe)||(pe="iPhone"===navigator.platform||"iPod"===navigator.platform||"iPad"===navigator.platform),pe}function Ie(){return qe()&&de}function Pe(){return n.defined(he)||(he=!qe()&&typeof PointerEvent<"u"&&(!n.defined(K.pointerEnabled)||K.pointerEnabled)),he}function Re(){if(!n.defined(ge)){const e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");const t=e.style.imageRendering;ge=n.defined(t)&&""!==t,ge&&(me=t)}return ge}function Te(){return Re()?me:void 0}function ze(){if(!ze.initialized)throw new r.DeveloperError("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return ze._result}Object.defineProperties(X,{element:{get:function(){if(X.supportsFullscreen())return document[J.fullscreenElement]}},changeEventName:{get:function(){if(X.supportsFullscreen())return J.fullscreenchange}},errorEventName:{get:function(){if(X.supportsFullscreen())return J.fullscreenerror}},enabled:{get:function(){if(X.supportsFullscreen())return document[J.fullscreenEnabled]}},fullscreen:{get:function(){if(X.supportsFullscreen())return null!==X.element}}}),X.supportsFullscreen=function(){if(n.defined(G))return G;G=!1;const e=document.body;if("function"==typeof e.requestFullscreen)return J.requestFullscreen="requestFullscreen",J.exitFullscreen="exitFullscreen",J.fullscreenEnabled="fullscreenEnabled",J.fullscreenElement="fullscreenElement",J.fullscreenchange="fullscreenchange",J.fullscreenerror="fullscreenerror",G=!0,G;const t=["webkit","moz","o","ms","khtml"];let r;for(let n=0,o=t.length;n<o;++n){const o=t[n];r=`${o}RequestFullscreen`,"function"==typeof e[r]?(J.requestFullscreen=r,G=!0):(r=`${o}RequestFullScreen`,"function"==typeof e[r]&&(J.requestFullscreen=r,G=!0)),r=`${o}ExitFullscreen`,"function"==typeof document[r]?J.exitFullscreen=r:(r=`${o}CancelFullScreen`,"function"==typeof document[r]&&(J.exitFullscreen=r)),r=`${o}FullscreenEnabled`,void 0!==document[r]?J.fullscreenEnabled=r:(r=`${o}FullScreenEnabled`,void 0!==document[r]&&(J.fullscreenEnabled=r)),r=`${o}FullscreenElement`,void 0!==document[r]?J.fullscreenElement=r:(r=`${o}FullScreenElement`,void 0!==document[r]&&(J.fullscreenElement=r)),r=`${o}fullscreenchange`,void 0!==document[`on${r}`]&&("ms"===o&&(r="MSFullscreenChange"),J.fullscreenchange=r),r=`${o}fullscreenerror`,void 0!==document[`on${r}`]&&("ms"===o&&(r="MSFullscreenError"),J.fullscreenerror=r)}return G},X.requestFullscreen=function(e,t){!X.supportsFullscreen()||e[J.requestFullscreen]({vrDisplay:t})},X.exitFullscreen=function(){!X.supportsFullscreen()||document[J.exitFullscreen]()},X._names=J,K=typeof navigator<"u"?navigator:{},ze._promise=void 0,ze._result=void 0,ze.initialize=function(){if(n.defined(ze._promise))return ze._promise;const e=Z();if(ze._promise=e.promise,Se())return ze._result=!1,e.resolve(ze._result),e.promise;const t=new Image;return t.onload=function(){ze._result=t.width>0&&t.height>0,e.resolve(ze._result)},t.onerror=function(){ze._result=!1,e.resolve(ze._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.promise},Object.defineProperties(ze,{initialized:{get:function(){return n.defined(ze._result)}}});const Me=[];typeof ArrayBuffer<"u"&&(Me.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&Me.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&Me.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&Me.push(BigInt64Array),typeof BigUint64Array<"u"&&Me.push(BigUint64Array));const Ue={isChrome:ve,chromeVersion:we,isSafari:Ce,safariVersion:be,isWebkit:_e,webkitVersion:xe,isInternetExplorer:Ee,internetExplorerVersion:Oe,isEdge:Se,edgeVersion:Ae,isFirefox:qe,firefoxVersion:Ie,isWindows:De,isIPadOrIOS:ke,hardwareConcurrency:n.defaultValue(K.hardwareConcurrency,3),supportsPointerEvents:Pe,supportsImageRenderingPixelated:Re,supportsWebP:ze,imageRenderingValue:Te,typedArrayTypes:Me};function je(e,t,r,o){this.x=n.defaultValue(e,0),this.y=n.defaultValue(t,0),this.z=n.defaultValue(r,0),this.w=n.defaultValue(o,0)}Ue.supportsBasis=function(e){return Ue.supportsWebAssembly()&&e.context.supportsBasis},Ue.supportsFullscreen=function(){return X.supportsFullscreen()},Ue.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},Ue.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"},Ue.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"},Ue.supportsBigInt=function(){return typeof BigInt<"u"},Ue.supportsWebWorkers=function(){return typeof Worker<"u"},Ue.supportsWebAssembly=function(){return typeof WebAssembly<"u"};let Fe=new t.Cartesian3;je.fromAxisAngle=function(e,o,i){r.Check.typeOf.object("axis",e),r.Check.typeOf.number("angle",o);const s=o/2,a=Math.sin(s);Fe=t.Cartesian3.normalize(e,Fe);const u=Fe.x*a,c=Fe.y*a,l=Fe.z*a,d=Math.cos(s);return n.defined(i)?(i.x=u,i.y=c,i.z=l,i.w=d,i):new je(u,c,l,d)};const Ne=[1,2,0],Be=new Array(3);je.fromRotationMatrix=function(e,o){let i,s,a,u,c;r.Check.typeOf.object("matrix",e);const l=e[t.Matrix3.COLUMN0ROW0],d=e[t.Matrix3.COLUMN1ROW1],f=e[t.Matrix3.COLUMN2ROW2],p=l+d+f;if(p>0)i=Math.sqrt(p+1),c=.5*i,i=.5/i,s=(e[t.Matrix3.COLUMN1ROW2]-e[t.Matrix3.COLUMN2ROW1])*i,a=(e[t.Matrix3.COLUMN2ROW0]-e[t.Matrix3.COLUMN0ROW2])*i,u=(e[t.Matrix3.COLUMN0ROW1]-e[t.Matrix3.COLUMN1ROW0])*i;else{const r=Ne;let n=0;d>l&&(n=1),f>l&&f>d&&(n=2);const o=r[n],p=r[o];i=Math.sqrt(e[t.Matrix3.getElementIndex(n,n)]-e[t.Matrix3.getElementIndex(o,o)]-e[t.Matrix3.getElementIndex(p,p)]+1);const h=Be;h[n]=.5*i,i=.5/i,c=(e[t.Matrix3.getElementIndex(p,o)]-e[t.Matrix3.getElementIndex(o,p)])*i,h[o]=(e[t.Matrix3.getElementIndex(o,n)]+e[t.Matrix3.getElementIndex(n,o)])*i,h[p]=(e[t.Matrix3.getElementIndex(p,n)]+e[t.Matrix3.getElementIndex(n,p)])*i,s=-h[0],a=-h[1],u=-h[2]}return n.defined(o)?(o.x=s,o.y=a,o.z=u,o.w=c,o):new je(s,a,u,c)};const Ve=new je;let Le=new je,Qe=new je,$e=new je;je.fromHeadingPitchRoll=function(e,n){return r.Check.typeOf.object("headingPitchRoll",e),$e=je.fromAxisAngle(t.Cartesian3.UNIT_X,e.roll,Ve),Qe=je.fromAxisAngle(t.Cartesian3.UNIT_Y,-e.pitch,n),n=je.multiply(Qe,$e,Qe),Le=je.fromAxisAngle(t.Cartesian3.UNIT_Z,-e.heading,Ve),je.multiply(Le,n,n)};const We=new t.Cartesian3,He=new t.Cartesian3,Ye=new je,Ze=new je,Ge=new je;je.packedLength=4,je.pack=function(e,t,o){return r.Check.typeOf.object("value",e),r.Check.defined("array",t),o=n.defaultValue(o,0),t[o++]=e.x,t[o++]=e.y,t[o++]=e.z,t[o]=e.w,t},je.unpack=function(e,t,o){return r.Check.defined("array",e),t=n.defaultValue(t,0),n.defined(o)||(o=new je),o.x=e[t],o.y=e[t+1],o.z=e[t+2],o.w=e[t+3],o},je.packedInterpolationLength=3,je.convertPackedArrayForInterpolation=function(e,t,r,o){je.unpack(e,4*r,Ge),je.conjugate(Ge,Ge);for(let i=0,s=r-t+1;i<s;i++){const r=3*i;je.unpack(e,4*(t+i),Ye),je.multiply(Ye,Ge,Ye),Ye.w<0&&je.negate(Ye,Ye),je.computeAxis(Ye,We);const s=je.computeAngle(Ye);n.defined(o)||(o=[]),o[r]=We.x*s,o[r+1]=We.y*s,o[r+2]=We.z*s}},je.unpackInterpolationResult=function(e,r,o,i,s){n.defined(s)||(s=new je),t.Cartesian3.fromArray(e,0,He);const a=t.Cartesian3.magnitude(He);return je.unpack(r,4*i,Ze),0===a?je.clone(je.IDENTITY,Ye):je.fromAxisAngle(He,a,Ye),je.multiply(Ye,Ze,s)},je.clone=function(e,t){if(n.defined(e))return n.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new je(e.x,e.y,e.z,e.w)},je.conjugate=function(e,t){return r.Check.typeOf.object("quaternion",e),r.Check.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},je.magnitudeSquared=function(e){return r.Check.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},je.magnitude=function(e){return Math.sqrt(je.magnitudeSquared(e))},je.normalize=function(e,t){r.Check.typeOf.object("result",t);const n=1/je.magnitude(e),o=e.x*n,i=e.y*n,s=e.z*n,a=e.w*n;return t.x=o,t.y=i,t.z=s,t.w=a,t},je.inverse=function(e,t){r.Check.typeOf.object("result",t);const n=je.magnitudeSquared(e);return t=je.conjugate(e,t),je.multiplyByScalar(t,1/n,t)},je.add=function(e,t,n){return r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",t),r.Check.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n},je.subtract=function(e,t,n){return r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",t),r.Check.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n},je.negate=function(e,t){return r.Check.typeOf.object("quaternion",e),r.Check.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},je.dot=function(e,t){return r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},je.multiply=function(e,t,n){r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",t),r.Check.typeOf.object("result",n);const o=e.x,i=e.y,s=e.z,a=e.w,u=t.x,c=t.y,l=t.z,d=t.w,f=a*u+o*d+i*l-s*c,p=a*c-o*l+i*d+s*u,h=a*l+o*c-i*u+s*d,m=a*d-o*u-i*c-s*l;return n.x=f,n.y=p,n.z=h,n.w=m,n},je.multiplyByScalar=function(e,t,n){return r.Check.typeOf.object("quaternion",e),r.Check.typeOf.number("scalar",t),r.Check.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n},je.divideByScalar=function(e,t,n){return r.Check.typeOf.object("quaternion",e),r.Check.typeOf.number("scalar",t),r.Check.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n},je.computeAxis=function(e,t){r.Check.typeOf.object("quaternion",e),r.Check.typeOf.object("result",t);const n=e.w;if(Math.abs(n-1)<o.CesiumMath.EPSILON6)return t.x=t.y=t.z=0,t;const i=1/Math.sqrt(1-n*n);return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t},je.computeAngle=function(e){return r.Check.typeOf.object("quaternion",e),Math.abs(e.w-1)<o.CesiumMath.EPSILON6?0:2*Math.acos(e.w)};let Je=new je;je.lerp=function(e,t,n,o){return r.Check.typeOf.object("start",e),r.Check.typeOf.object("end",t),r.Check.typeOf.number("t",n),r.Check.typeOf.object("result",o),Je=je.multiplyByScalar(t,n,Je),o=je.multiplyByScalar(e,1-n,o),je.add(Je,o,o)};let Xe=new je,Ke=new je,et=new je;je.slerp=function(e,t,n,i){r.Check.typeOf.object("start",e),r.Check.typeOf.object("end",t),r.Check.typeOf.number("t",n),r.Check.typeOf.object("result",i);let s=je.dot(e,t),a=t;if(s<0&&(s=-s,a=Xe=je.negate(t,Xe)),1-s<o.CesiumMath.EPSILON6)return je.lerp(e,a,n,i);const u=Math.acos(s);return Ke=je.multiplyByScalar(e,Math.sin((1-n)*u),Ke),et=je.multiplyByScalar(a,Math.sin(n*u),et),i=je.add(Ke,et,i),je.multiplyByScalar(i,1/Math.sin(u),i)},je.log=function(e,n){r.Check.typeOf.object("quaternion",e),r.Check.typeOf.object("result",n);const i=o.CesiumMath.acosClamped(e.w);let s=0;return 0!==i&&(s=i/Math.sin(i)),t.Cartesian3.multiplyByScalar(e,s,n)},je.exp=function(e,n){r.Check.typeOf.object("cartesian",e),r.Check.typeOf.object("result",n);const o=t.Cartesian3.magnitude(e);let i=0;return 0!==o&&(i=Math.sin(o)/o),n.x=e.x*i,n.y=e.y*i,n.z=e.z*i,n.w=Math.cos(o),n};const tt=new t.Cartesian3,rt=new t.Cartesian3,nt=new je,ot=new je;je.computeInnerQuadrangle=function(e,n,o,i){r.Check.typeOf.object("q0",e),r.Check.typeOf.object("q1",n),r.Check.typeOf.object("q2",o),r.Check.typeOf.object("result",i);const s=je.conjugate(n,nt);je.multiply(s,o,ot);const a=je.log(ot,tt);je.multiply(s,e,ot);const u=je.log(ot,rt);return t.Cartesian3.add(a,u,a),t.Cartesian3.multiplyByScalar(a,.25,a),t.Cartesian3.negate(a,a),je.exp(a,nt),je.multiply(n,nt,i)},je.squad=function(e,t,n,o,i,s){r.Check.typeOf.object("q0",e),r.Check.typeOf.object("q1",t),r.Check.typeOf.object("s0",n),r.Check.typeOf.object("s1",o),r.Check.typeOf.number("t",i),r.Check.typeOf.object("result",s);const a=je.slerp(e,t,i,nt),u=je.slerp(n,o,i,ot);return je.slerp(a,u,2*i*(1-i),s)};const it=new je,st=1.9011074535173003,at=Ue.supportsTypedArrays()?new Float32Array(8):[],ut=Ue.supportsTypedArrays()?new Float32Array(8):[],ct=Ue.supportsTypedArrays()?new Float32Array(8):[],lt=Ue.supportsTypedArrays()?new Float32Array(8):[];for(let co=0;co<7;++co){const e=co+1,t=2*e+1;at[co]=1/(e*t),ut[co]=e/t}function dt(e,t,n){r.Check.defined("array",e),r.Check.defined("itemToFind",t),r.Check.defined("comparator",n);let o,i,s=0,a=e.length-1;for(;s<=a;)if(o=~~((s+a)/2),i=n(e[o],t),i<0)s=o+1;else{if(!(i>0))return o;a=o-1}return~(a+1)}function ft(e,t,r,n,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=r,this.yPoleOffset=n,this.ut1MinusUtc=o}function pt(e,t,r,n,o,i,s,a){this.year=e,this.month=t,this.day=r,this.hour=n,this.minute=o,this.second=i,this.millisecond=s,this.isLeapSecond=a}function ht(e){if(null===e||isNaN(e))throw new r.DeveloperError("year is required and must be a number.");return e%4===0&&e%100!==0||e%400===0}function mt(e,t){this.julianDate=e,this.offset=t}at[7]=st/136,ut[7]=8*st/17,je.fastSlerp=function(e,t,n,o){r.Check.typeOf.object("start",e),r.Check.typeOf.object("end",t),r.Check.typeOf.number("t",n),r.Check.typeOf.object("result",o);let i,s=je.dot(e,t);s>=0?i=1:(i=-1,s=-s);const a=s-1,u=1-n,c=n*n,l=u*u;for(let r=7;r>=0;--r)ct[r]=(at[r]*c-ut[r])*a,lt[r]=(at[r]*l-ut[r])*a;const d=i*n*(1+ct[0]*(1+ct[1]*(1+ct[2]*(1+ct[3]*(1+ct[4]*(1+ct[5]*(1+ct[6]*(1+ct[7])))))))),f=u*(1+lt[0]*(1+lt[1]*(1+lt[2]*(1+lt[3]*(1+lt[4]*(1+lt[5]*(1+lt[6]*(1+lt[7])))))))),p=je.multiplyByScalar(e,f,it);return je.multiplyByScalar(t,d,o),je.add(p,o,o)},je.fastSquad=function(e,t,n,o,i,s){r.Check.typeOf.object("q0",e),r.Check.typeOf.object("q1",t),r.Check.typeOf.object("s0",n),r.Check.typeOf.object("s1",o),r.Check.typeOf.number("t",i),r.Check.typeOf.object("result",s);const a=je.fastSlerp(e,t,i,nt),u=je.fastSlerp(n,o,i,ot);return je.fastSlerp(a,u,2*i*(1-i),s)},je.equals=function(e,t){return e===t||n.defined(e)&&n.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},je.equalsEpsilon=function(e,t,r){return r=n.defaultValue(r,0),e===t||n.defined(e)&&n.defined(t)&&Math.abs(e.x-t.x)<=r&&Math.abs(e.y-t.y)<=r&&Math.abs(e.z-t.z)<=r&&Math.abs(e.w-t.w)<=r},je.ZERO=Object.freeze(new je(0,0,0,0)),je.IDENTITY=Object.freeze(new je(0,0,0,1)),je.prototype.clone=function(e){return je.clone(this,e)},je.prototype.equals=function(e){return je.equals(this,e)},je.prototype.equalsEpsilon=function(e,t){return je.equalsEpsilon(this,e,t)},je.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var gt=Object.freeze({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:2400000.5}),yt=Object.freeze({UTC:0,TAI:1});const vt=new pt,wt=[31,28,31,30,31,30,31,31,30,31,30,31],Ct=29;function bt(e,t){return Ut.compare(e.julianDate,t.julianDate)}const _t=new mt;function xt(e){_t.julianDate=e;const t=Ut.leapSeconds;let r=dt(t,_t,bt);r<0&&(r=~r),r>=t.length&&(r=t.length-1);let n=t[r].offset;r>0&&Ut.secondsDifference(t[r].julianDate,e)>n&&(r--,n=t[r].offset),Ut.addSeconds(e,n,e)}function Et(e,t){_t.julianDate=e;const r=Ut.leapSeconds;let n=dt(r,_t,bt);if(n<0&&(n=~n),0===n)return Ut.addSeconds(e,-r[0].offset,t);if(n>=r.length)return Ut.addSeconds(e,-r[n-1].offset,t);const o=Ut.secondsDifference(r[n].julianDate,e);return 0===o?Ut.addSeconds(e,-r[n].offset,t):o<=1?void 0:Ut.addSeconds(e,-r[--n].offset,t)}function Ot(e,t,r){const n=t/gt.SECONDS_PER_DAY|0;return e+=n,t-=gt.SECONDS_PER_DAY*n,t<0&&(e--,t+=gt.SECONDS_PER_DAY),r.dayNumber=e,r.secondsOfDay=t,r}function St(e,t,r,n,o,i,s){const a=(t-14)/12|0,u=e+4800+a;let c=(1461*u/4|0)+(367*(t-2-12*a)/12|0)-(3*((u+100)/100|0)/4|0)+r-32075;n-=12,n<0&&(n+=24);const l=i+(n*gt.SECONDS_PER_HOUR+o*gt.SECONDS_PER_MINUTE+s*gt.SECONDS_PER_MILLISECOND);return l>=43200&&(c-=1),[c,l]}const At=/^(\d{4})$/,qt=/^(\d{4})-(\d{2})$/,Dt=/^(\d{4})-?(\d{3})$/,kt=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,It=/^(\d{4})-?(\d{2})-?(\d{2})$/,Pt=/([Z+\-])?(\d{2})?:?(\d{2})?$/,Rt=/^(\d{2})(\.\d+)?/.source+Pt.source,Tt=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Pt.source,zt=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Pt.source,Mt="Invalid ISO 8601 date.";function Ut(e,t,r){this.dayNumber=void 0,this.secondsOfDay=void 0,e=n.defaultValue(e,0),t=n.defaultValue(t,0),r=n.defaultValue(r,yt.UTC);const o=0|e;t+=(e-o)*gt.SECONDS_PER_DAY,Ot(o,t,this),r===yt.UTC&&xt(this)}Ut.fromGregorianDate=function(e,t){if(!(e instanceof pt))throw new r.DeveloperError("date must be a valid GregorianDate.");const o=St(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return n.defined(t)?(Ot(o[0],o[1],t),xt(t),t):new Ut(o[0],o[1],yt.UTC)},Ut.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new r.DeveloperError("date must be a valid JavaScript Date.");const o=St(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return n.defined(t)?(Ot(o[0],o[1],t),xt(t),t):new Ut(o[0],o[1],yt.UTC)},Ut.fromIso8601=function(e,t){if("string"!=typeof e)throw new r.DeveloperError(Mt);e=e.replace(",",".");let o,i=e.split("T"),s=1,a=1,u=0,c=0,l=0,d=0;const f=i[0],p=i[1];let h,m,g,y;if(!n.defined(f))throw new r.DeveloperError(Mt);if(i=f.match(It),null!==i){if(g=f.split("-").length-1,g>0&&2!==g)throw new r.DeveloperError(Mt);o=+i[1],s=+i[2],a=+i[3]}else if(i=f.match(qt),null!==i)o=+i[1],s=+i[2];else if(i=f.match(At),null!==i)o=+i[1];else{let e;if(i=f.match(Dt),null!==i){if(o=+i[1],e=+i[2],m=ht(o),e<1||m&&e>366||!m&&e>365)throw new r.DeveloperError(Mt)}else{if(i=f.match(kt),null===i)throw new r.DeveloperError(Mt);{o=+i[1];const t=+i[2],s=+i[3]||0;if(g=f.split("-").length-1,g>0&&(!n.defined(i[3])&&1!==g||n.defined(i[3])&&2!==g))throw new r.DeveloperError(Mt);const a=new Date(Date.UTC(o,0,4));e=7*t+s-a.getUTCDay()-3}}h=new Date(Date.UTC(o,0,1)),h.setUTCDate(e),s=h.getUTCMonth()+1,a=h.getUTCDate()}if(m=ht(o),s<1||s>12||a<1||(2!==s||!m)&&a>wt[s-1]||m&&2===s&&a>Ct)throw new r.DeveloperError(Mt);if(n.defined(p)){if(i=p.match(zt),null!==i){if(g=p.split(":").length-1,g>0&&2!==g&&3!==g)throw new r.DeveloperError(Mt);u=+i[1],c=+i[2],l=+i[3],d=1e3*+(i[4]||0),y=5}else if(i=p.match(Tt),null!==i){if(g=p.split(":").length-1,g>2)throw new r.DeveloperError(Mt);u=+i[1],c=+i[2],l=60*+(i[3]||0),y=4}else{if(i=p.match(Rt),null===i)throw new r.DeveloperError(Mt);u=+i[1],c=60*+(i[2]||0),y=3}if(c>=60||l>=61||u>24||24===u&&(c>0||l>0||d>0))throw new r.DeveloperError(Mt);const e=i[y],t=+i[y+1],n=+(i[y+2]||0);switch(e){case"+":u-=t,c-=n;break;case"-":u+=t,c+=n;break;case"Z":break;default:c+=new Date(Date.UTC(o,s-1,a,u,c)).getTimezoneOffset();break}}const v=60===l;for(v&&l--;c>=60;)c-=60,u++;for(;u>=24;)u-=24,a++;for(h=m&&2===s?Ct:wt[s-1];a>h;)a-=h,s++,s>12&&(s-=12,o++),h=m&&2===s?Ct:wt[s-1];for(;c<0;)c+=60,u--;for(;u<0;)u+=24,a--;for(;a<1;)s--,s<1&&(s+=12,o--),h=m&&2===s?Ct:wt[s-1],a+=h;const w=St(o,s,a,u,c,l,d);return n.defined(t)?(Ot(w[0],w[1],t),xt(t)):t=new Ut(w[0],w[1],yt.UTC),v&&Ut.addSeconds(t,1,t),t},Ut.now=function(e){return Ut.fromDate(new Date,e)};const jt=new Ut(0,0,yt.TAI);Ut.toGregorianDate=function(e,t){if(!n.defined(e))throw new r.DeveloperError("julianDate is required.");let o=!1,i=Et(e,jt);n.defined(i)||(Ut.addSeconds(e,-1,jt),i=Et(jt,jt),o=!0);let s=i.dayNumber;const a=i.secondsOfDay;a>=43200&&(s+=1);let u=s+68569|0;const c=4*u/146097|0;u=u-((146097*c+3)/4|0)|0;const l=4e3*(u+1)/1461001|0;u=u-(1461*l/4|0)+31|0;const d=80*u/2447|0,f=u-(2447*d/80|0)|0;u=d/11|0;const p=d+2-12*u|0,h=100*(c-49)+l+u|0;let m=a/gt.SECONDS_PER_HOUR|0,g=a-m*gt.SECONDS_PER_HOUR;const y=g/gt.SECONDS_PER_MINUTE|0;g-=y*gt.SECONDS_PER_MINUTE;let v=0|g;const w=(g-v)/gt.SECONDS_PER_MILLISECOND;return m+=12,m>23&&(m-=24),o&&(v+=1),n.defined(t)?(t.year=h,t.month=p,t.day=f,t.hour=m,t.minute=y,t.second=v,t.millisecond=w,t.isLeapSecond=o,t):new pt(h,p,f,m,y,v,w,o)},Ut.toDate=function(e){if(!n.defined(e))throw new r.DeveloperError("julianDate is required.");const t=Ut.toGregorianDate(e,vt);let o=t.second;return t.isLeapSecond&&(o-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,o,t.millisecond))},Ut.toIso8601=function(e,t){if(!n.defined(e))throw new r.DeveloperError("julianDate is required.");const o=Ut.toGregorianDate(e,vt);let i=o.year,s=o.month,a=o.day,u=o.hour;const c=o.minute,l=o.second,d=o.millisecond;let f;return 1e4===i&&1===s&&1===a&&0===u&&0===c&&0===l&&0===d&&(i=9999,s=12,a=31,u=24),n.defined(t)||0===d?n.defined(t)&&0!==t?(f=(.01*d).toFixed(t).replace(".","").slice(0,t),`${i.toString().padStart(4,"0")}-${s.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}T${u.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${f}Z`):`${i.toString().padStart(4,"0")}-${s.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}T${u.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}Z`:(f=(.01*d).toString().replace(".",""),`${i.toString().padStart(4,"0")}-${s.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}T${u.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${f}Z`)},Ut.clone=function(e,t){if(n.defined(e))return n.defined(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new Ut(e.dayNumber,e.secondsOfDay,yt.TAI)},Ut.compare=function(e,t){if(!n.defined(e))throw new r.DeveloperError("left is required.");if(!n.defined(t))throw new r.DeveloperError("right is required.");const o=e.dayNumber-t.dayNumber;return 0!==o?o:e.secondsOfDay-t.secondsOfDay},Ut.equals=function(e,t){return e===t||n.defined(e)&&n.defined(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},Ut.equalsEpsilon=function(e,t,r){return r=n.defaultValue(r,0),e===t||n.defined(e)&&n.defined(t)&&Math.abs(Ut.secondsDifference(e,t))<=r},Ut.totalDays=function(e){if(!n.defined(e))throw new r.DeveloperError("julianDate is required.");return e.dayNumber+e.secondsOfDay/gt.SECONDS_PER_DAY},Ut.secondsDifference=function(e,t){if(!n.defined(e))throw new r.DeveloperError("left is required.");if(!n.defined(t))throw new r.DeveloperError("right is required.");return(e.dayNumber-t.dayNumber)*gt.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},Ut.daysDifference=function(e,t){if(!n.defined(e))throw new r.DeveloperError("left is required.");if(!n.defined(t))throw new r.DeveloperError("right is required.");const o=e.dayNumber-t.dayNumber,i=(e.secondsOfDay-t.secondsOfDay)/gt.SECONDS_PER_DAY;return o+i},Ut.computeTaiMinusUtc=function(e){_t.julianDate=e;const t=Ut.leapSeconds;let r=dt(t,_t,bt);return r<0&&(r=~r,--r,r<0&&(r=0)),t[r].offset},Ut.addSeconds=function(e,t,o){if(!n.defined(e))throw new r.DeveloperError("julianDate is required.");if(!n.defined(t))throw new r.DeveloperError("seconds is required.");if(!n.defined(o))throw new r.DeveloperError("result is required.");return Ot(e.dayNumber,e.secondsOfDay+t,o)},Ut.addMinutes=function(e,t,o){if(!n.defined(e))throw new r.DeveloperError("julianDate is required.");if(!n.defined(t))throw new r.DeveloperError("minutes is required.");if(!n.defined(o))throw new r.DeveloperError("result is required.");const i=e.secondsOfDay+t*gt.SECONDS_PER_MINUTE;return Ot(e.dayNumber,i,o)},Ut.addHours=function(e,t,o){if(!n.defined(e))throw new r.DeveloperError("julianDate is required.");if(!n.defined(t))throw new r.DeveloperError("hours is required.");if(!n.defined(o))throw new r.DeveloperError("result is required.");const i=e.secondsOfDay+t*gt.SECONDS_PER_HOUR;return Ot(e.dayNumber,i,o)},Ut.addDays=function(e,t,o){if(!n.defined(e))throw new r.DeveloperError("julianDate is required.");if(!n.defined(t))throw new r.DeveloperError("days is required.");if(!n.defined(o))throw new r.DeveloperError("result is required.");const i=e.dayNumber+t;return Ot(i,e.secondsOfDay,o)},Ut.lessThan=function(e,t){return Ut.compare(e,t)<0},Ut.lessThanOrEquals=function(e,t){return Ut.compare(e,t)<=0},Ut.greaterThan=function(e,t){return Ut.compare(e,t)>0},Ut.greaterThanOrEquals=function(e,t){return Ut.compare(e,t)>=0},Ut.prototype.clone=function(e){return Ut.clone(this,e)},Ut.prototype.equals=function(e){return Ut.equals(this,e)},Ut.prototype.equalsEpsilon=function(e,t){return Ut.equalsEpsilon(this,e,t)},Ut.prototype.toString=function(){return Ut.toIso8601(this)},Ut.leapSeconds=[new mt(new Ut(2441317,43210,yt.TAI),10),new mt(new Ut(2441499,43211,yt.TAI),11),new mt(new Ut(2441683,43212,yt.TAI),12),new mt(new Ut(2442048,43213,yt.TAI),13),new mt(new Ut(2442413,43214,yt.TAI),14),new mt(new Ut(2442778,43215,yt.TAI),15),new mt(new Ut(2443144,43216,yt.TAI),16),new mt(new Ut(2443509,43217,yt.TAI),17),new mt(new Ut(2443874,43218,yt.TAI),18),new mt(new Ut(2444239,43219,yt.TAI),19),new mt(new Ut(2444786,43220,yt.TAI),20),new mt(new Ut(2445151,43221,yt.TAI),21),new mt(new Ut(2445516,43222,yt.TAI),22),new mt(new Ut(2446247,43223,yt.TAI),23),new mt(new Ut(2447161,43224,yt.TAI),24),new mt(new Ut(2447892,43225,yt.TAI),25),new mt(new Ut(2448257,43226,yt.TAI),26),new mt(new Ut(2448804,43227,yt.TAI),27),new mt(new Ut(2449169,43228,yt.TAI),28),new mt(new Ut(2449534,43229,yt.TAI),29),new mt(new Ut(2450083,43230,yt.TAI),30),new mt(new Ut(2450630,43231,yt.TAI),31),new mt(new Ut(2451179,43232,yt.TAI),32),new mt(new Ut(2453736,43233,yt.TAI),33),new mt(new Ut(2454832,43234,yt.TAI),34),new mt(new Ut(2456109,43235,yt.TAI),35),new mt(new Ut(2457204,43236,yt.TAI),36),new mt(new Ut(2457754,43237,yt.TAI),37)];var Ft=i.createCommonjsModule((function(e,t){(function(r){var n=t&&!t.nodeType&&t,o=e&&!e.nodeType&&e,s="object"==typeof i.commonjsGlobal&&i.commonjsGlobal;(s.global===s||s.window===s||s.self===s)&&(r=s);var a,u,c=2147483647,l=36,d=1,f=26,p=38,h=700,m=72,g=128,y="-",v=/^xn--/,w=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=l-d,x=Math.floor,E=String.fromCharCode;function O(e){throw new RangeError(b[e])}function S(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function A(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(C,".");var o=e.split("."),i=S(o,t).join(".");return n+i}function q(e){for(var t,r,n=[],o=0,i=e.length;o<i;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<i?(r=e.charCodeAt(o++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--)):n.push(t);return n}function D(e){return S(e,(function(e){var t="";return e>65535&&(e-=65536,t+=E(e>>>10&1023|55296),e=56320|1023&e),t+=E(e),t})).join("")}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:l}function I(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function P(e,t,r){var n=0;for(e=r?x(e/h):e>>1,e+=x(e/t);e>_*f>>1;n+=l)e=x(e/_);return x(n+(_+1)*e/(e+p))}function R(e){var t,r,n,o,i,s,a,u,p,h,v=[],w=e.length,C=0,b=g,_=m;for(r=e.lastIndexOf(y),r<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&O("not-basic"),v.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<w;){for(i=C,s=1,a=l;o>=w&&O("invalid-input"),u=k(e.charCodeAt(o++)),(u>=l||u>x((c-C)/s))&&O("overflow"),C+=u*s,p=a<=_?d:a>=_+f?f:a-_,!(u<p);a+=l)h=l-p,s>x(c/h)&&O("overflow"),s*=h;t=v.length+1,_=P(C-i,t,0==i),x(C/t)>c-b&&O("overflow"),b+=x(C/t),C%=t,v.splice(C++,0,b)}return D(v)}function T(e){var t,r,n,o,i,s,a,u,p,h,v,w,C,b,_,S=[];for(e=q(e),w=e.length,t=g,r=0,i=m,s=0;s<w;++s)v=e[s],v<128&&S.push(E(v));for(n=o=S.length,o&&S.push(y);n<w;){for(a=c,s=0;s<w;++s)v=e[s],v>=t&&v<a&&(a=v);for(C=n+1,a-t>x((c-r)/C)&&O("overflow"),r+=(a-t)*C,t=a,s=0;s<w;++s)if(v=e[s],v<t&&++r>c&&O("overflow"),v==t){for(u=r,p=l;h=p<=i?d:p>=i+f?f:p-i,!(u<h);p+=l)_=u-h,b=l-h,S.push(E(I(h+_%b,0))),u=x(_/b);S.push(E(I(u,0))),i=P(r,C,n==o),r=0,++n}++r,++t}return S.join("")}function z(e){return A(e,(function(e){return v.test(e)?R(e.slice(4).toLowerCase()):e}))}function M(e){return A(e,(function(e){return w.test(e)?"xn--"+T(e):e}))}if(a={version:"1.3.2",ucs2:{decode:q,encode:D},decode:R,encode:T,toASCII:M,toUnicode:z},n&&o)if(e.exports==n)o.exports=a;else for(u in a)a.hasOwnProperty(u)&&(n[u]=a[u]);else r.punycode=a})(i.commonjsGlobal)})),Nt=i.createCommonjsModule((function(e){ /*! * URI.js - Mutating URLs * IPv6 Support * * Version: 1.19.10 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ (function(t,r){e.exports?e.exports=r():t.IPv6=r(t)})(i.commonjsGlobal,(function(e){var t=e&&e.IPv6;function r(e){var t,r=e.toLowerCase(),n=r.split(":"),o=n.length,i=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),o=n.length,-1!==n[o-1].indexOf(".")&&(i=7),t=0;t<o&&""!==n[t];t++);if(t<i)for(n.splice(t,1,"0000");n.length<i;)n.splice(t,0,"0000");for(var s,a=0;a<i;a++){s=n[a].split("");for(var u=0;u<3&&"0"===s[0]&&s.length>1;u++)s.splice(0,1);n[a]=s.join("")}var c=-1,l=0,d=0,f=-1,p=!1;for(a=0;a<i;a++)p?"0"===n[a]?d+=1:(p=!1,d>l&&(c=f,l=d)):"0"===n[a]&&(p=!0,f=a,d=1);d>l&&(c=f,l=d),l>1&&n.splice(c,l,""),o=n.length;var h="";for(""===n[0]&&(h=":"),a=0;a<o&&(h+=n[a],a!==o-1);a++)h+=":";return""===n[o-1]&&(h+=":"),h}function n(){return e.IPv6===this&&(e.IPv6=t),this}return{best:r,noConflict:n}}))})),Bt=i.createCommonjsModule((function(e){ /*! * URI.js - Mutating URLs * Second Level Domain (SLD) Support * * Version: 1.19.10 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ (function(t,r){e.exports?e.exports=r():t.SecondLevelDomains=r(t)})(i.commonjsGlobal,(function(e){var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n>=0)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return!o||o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))})),Vt=i.createCommonjsModule((function(e){ /*! * URI.js - Mutating URLs * * Version: 1.19.10 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ (function(t,r){e.exports?e.exports=r(Ft,Nt,Bt):t.URI=r(t.punycode,t.IPv6,t.SecondLevelDomains,t)})(i.commonjsGlobal,(function(e,t,r,n){var o=n&&n.URI;function i(e,t){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof i))return r?n?new i(e,t):new i(e):new i;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e=typeof location<"u"?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}function s(e){return/^[0-9]+$/.test(e)}i.version="1.19.10";var a=i.prototype,u=Object.prototype.hasOwnProperty;function c(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function d(e){return"Array"===l(e)}function f(e,t){var r,n,o={};if("RegExp"===l(t))o=null;else if(d(t))for(r=0,n=t.length;r<n;r++)o[t[r]]=!0;else o[t]=!0;for(r=0,n=e.length;r<n;r++){var i=o&&void 0!==o[e[r]]||!o&&t.test(e[r]);i&&(e.splice(r,1),n--,r--)}return e}function p(e,t){var r,n;if(d(t)){for(r=0,n=t.length;r<n;r++)if(!p(e,t[r]))return!1;return!0}var o=l(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===o){if("string"==typeof e[r]&&e[r].match(t))return!0}else if(e[r]===t)return!0;return!1}function h(e,t){if(!d(e)||!d(t)||e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function m(e){var t=/^\/+|\/+$/g;return e.replace(t,"")}function g(e){return escape(e)}function y(e){return encodeURIComponent(e).replace(/[!'()*]/g,g).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=y,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=y,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var r=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch{return e}};var v,w={encode:"encode",decode:"decode"},C=function(e,t){return function(r){try{return i[t](r+"").replace(i.characters[e][t].expression,(function(r){return i.characters[e][t].map[r]}))}catch{return r}}};for(v in w)i[v+"PathSegment"]=C("pathname",w[v]),i[v+"UrnPathSegment"]=C("urnpath",w[v]);var b=function(e,t,r){return function(n){var o;o=r?function(e){return i[t](i[r](e))}:i[t];for(var s=(n+"").split(e),a=0,u=s.length;a<u;a++)s[a]=o(s[a]);return s.join(e)}};function _(e){return function(t,r){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!r),this)}}function x(e,t){return function(r,n){return void 0===r?this._parts[e]||"":(null!==r&&(r+="",r.charAt(0)===t&&(r=r.substring(1))),this._parts[e]=r,this.build(!n),this)}}i.decodePath=b("/","decodePathSegment"),i.decodeUrnPath=b(":","decodeUrnPathSegment"),i.recodePath=b("/","encodePathSegment","decode"),i.recodeUrnPath=b(":","encodeUrnPathSegment","decode"),i.encodeReserved=C("reserved","encode"),i.parse=function(e,t){var r;return t||(t={preventInvalidHostname:i.preventInvalidHostname}),e=e.replace(i.leading_whitespace_expression,""),r=e.indexOf("#"),r>-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),r=e.indexOf("?"),r>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"),r>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0))),t.path=e,t},i.parseHost=function(e,t){e||(e=""),e=e.replace(/\\/g,"/");var r,n,o=e.indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),u=e.indexOf(":",s+1);-1!==u&&(-1===a||u<a)?(t.hostname=e.substring(0,o)||null,t.port=null):(n=e.substring(0,o).split(":"),t.hostname=n[0]||null,t.port=n[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&i.ensureValidHostname(t.hostname,t.protocol),t.port&&i.ensureValidPort(t.port),e.substring(o)||"/"},i.parseAuthority=function(e,t){return e=i.parseUserinfo(e,t),i.parseHost(e,t)},i.parseUserinfo=function(e,t){var r=e,n=e.indexOf("\\");-1!==n&&(e=e.replace(/\\/g,"/"));var o,s=e.indexOf("/"),a=e.lastIndexOf("@",s>-1?s:e.length-1);return a>-1&&(-1===s||a<s)?(o=e.substring(0,a).split(":"),t.username=o[0]?i.decode(o[0]):null,o.shift(),t.password=o[0]?i.decode(o.join(":")):null,e=r.substring(a+1)):(t.username=null,t.password=null),e},i.parseQuery=function(e,t){if(!e)return{};if(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!e)return{};for(var r,n,o,s={},a=e.split("&"),c=a.length,l=0;l<c;l++)r=a[l].split("="),n=i.decodeQuery(r.shift(),t),o=r.length?i.decodeQuery(r.join("="),t):null,"__proto__"!==n&&(u.call(s,n)?(("string"==typeof s[n]||null===s[n])&&(s[n]=[s[n]]),s[n].push(o)):s[n]=o);return s},i.build=function(e){var t="",r=!1;return e.protocol&&(t+=e.protocol+":"),!e.urn&&(t||e.hostname)&&(t+="//",r=!0),t+=i.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},i.buildHost=function(e){var t="";return e.hostname?(i.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},i.buildAuthority=function(e){return i.buildUserinfo(e)+i.buildHost(e)},i.buildUserinfo=function(e){var t="";return e.username&&(t+=i.encode(e.username)),e.password&&(t+=":"+i.encode(e.password)),t&&(t+="@"),t},i.buildQuery=function(e,t,r){var n,o,s,a,c="";for(o in e)if("__proto__"!==o&&u.call(e,o))if(d(e[o]))for(n={},s=0,a=e[o].length;s<a;s++)void 0!==e[o][s]&&void 0===n[e[o][s]+""]&&(c+="&"+i.buildQueryParameter(o,e[o][s],r),!0!==t&&(n[e[o][s]+""]=!0));else void 0!==e[o]&&(c+="&"+i.buildQueryParameter(o,e[o],r));return c.substring(1)},i.buildQueryParameter=function(e,t,r){return i.encodeQuery(e,r)+(null!==t?"="+i.encodeQuery(t,r):"")},i.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)u.call(t,n)&&i.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=r);"string"==typeof e[t]&&(e[t]=[e[t]]),d(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},i.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)u.call(t,n)&&i.setQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},i.removeQuery=function(e,t,r){var n,o,s;if(d(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===l(t))for(s in e)t.test(s)&&(e[s]=void 0);else if("object"==typeof t)for(s in t)u.call(t,s)&&i.removeQuery(e,s,t[s]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===l(r)?!d(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=f(e[t],r):e[t]!==String(r)||d(r)&&1!==r.length?d(e[t])&&(e[t]=f(e[t],r)):e[t]=void 0:e[t]=void 0}},i.hasQuery=function(e,t,r,n){switch(l(t)){case"String":break;case"RegExp":for(var o in e)if(u.call(e,o)&&t.test(o)&&(void 0===r||i.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var s in t)if(u.call(t,s)&&!i.hasQuery(e,s,t[s]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(r)){case"Undefined":return t in e;case"Boolean":var a=Boolean(d(e[t])?e[t].length:e[t]);return r===a;case"Function":return!!r(e[t],t,e);case"Array":if(!d(e[t]))return!1;var c=n?p:h;return c(e[t],r);case"RegExp":return d(e[t])?!!n&&p(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return d(e[t])?!!n&&p(e[t],r):e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var o=new i(arguments[n]);e.push(o);for(var s=o.segment(),a=0;a<s.length;a++)"string"==typeof s[a]&&t.push(s[a]),s[a]&&r++}if(!t.length||!r)return new i("");var u=new i("").segment(t);return(""===e[0].path()||"/"===e[0].path().slice(0,1))&&u.path("/"+u.path()),u.normalize()},i.commonPath=function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}return r<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":(("/"!==e.charAt(r)||"/"!==t.charAt(r))&&(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},i.withinString=function(e,t,r){r||(r={});var n=r.start||i.findUri.start,o=r.end||i.findUri.end,s=r.trim||i.findUri.trim,a=r.parens||i.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var c=n.exec(e);if(!c)break;var l=c.index;if(r.ignoreHtml){var d=e.slice(Math.max(l-3,0),l);if(d&&u.test(d))continue}for(var f=l+e.slice(l).search(o),p=e.slice(l,f),h=-1;;){var m=a.exec(p);if(!m)break;var g=m.index+m[0].length;h=Math.max(h,g)}if(p=h>-1?p.slice(0,h)+p.slice(h).replace(s,""):p.replace(s,""),!(p.length<=c[0].length)&&(!r.ignore||!r.ignore.test(p))){f=l+p.length;var y=t(p,l,f,e);if(void 0===y){n.lastIndex=f;continue}y=String(y),e=e.slice(0,l)+y+e.slice(f),n.lastIndex=l+y.length}}return n.lastIndex=0,e},i.ensureValidHostname=function(t,r){var n=!!t,o=!!r,s=!1;if(o&&(s=p(i.hostProtocols,r)),s&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(s(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},a.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new i(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=_("protocol"),a.username=_("username"),a.password=_("password"),a.hostname=_("hostname"),a.port=_("port"),a.query=x("query","?"),a.fragment=x("fragment","#"),a.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},a.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},a.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},a.path=a.pathname,a.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var n=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName){var s=i.getDomAttribute(e);e=e[s]||"",o=!1}if(!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var a=n?e._parts:e;for(r in a)"query"!==r&&u.call(this._parts,r)&&(this._parts[r]=a[r]);a.query&&this.query(a.query,!1)}return this.build(!t),this},a.is=function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),t=n||o,s=!t,a=s&&r&&r.has(this._parts.hostname),u=s&&i.idn_expression.test(this._parts.hostname),c=s&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var E=a.protocol,O=a.port,S=a.hostname;a.protocol=function(e,t){if(e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(i.protocol_expression)))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},a.scheme=a.protocol,a.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),O.call(this,e,t))},a.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname},n=i.parseHost(e,r);if("/"!==n)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return S.call(this,e,t)},a.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol(),n=this.authority();return n?(r?r+"://":"")+this.authority():""}var o=i(e);return this.protocol(o.protocol()).authority(o.authority()).build(!t),this},a.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";var r=i.parseHost(e,this._parts);if("/"!==r)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";var r=i.parseAuthority(e,this._parts);if("/"!==r)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=i.buildUserinfo(this._parts);return r&&r.substring(0,r.length-1)}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},a.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},a.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),s=new RegExp("^"+c(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},a.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},a.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},a.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),a=new RegExp("^"+c(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},a.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?i.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var s=new RegExp(c(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),o?this.normalizePath(t):this.build(!t),this},a.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(r=o.substring(s+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,u=this.suffix();if(u)a=e?new RegExp(c(u)+"$"):new RegExp(c("."+u)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return a&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},a.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),s=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(d(t)){s=[];for(var a=0,u=t.length;a<u;a++)!t[a].length&&(!s.length||!s[s.length-1].length)||(s.length&&!s[s.length-1].length&&s.pop(),s.push(m(t[a])))}else(t||"string"==typeof t)&&(t=m(t),""===s[s.length-1]?s[s.length-1]=t:s.push(t));else t?s[e]=m(t):s.splice(e,1);return i&&s.unshift(""),this.path(s.join(n),r)},a.segmentCoded=function(e,t,r){var n,o,s;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(n=this.segment(e,t,r),d(n))for(o=0,s=n.length;o<s;o++)n[o]=i.decode(n[o]);else n=void 0!==n?i.decode(n):void 0;return n}if(d(t))for(o=0,s=t.length;o<s;o++)t[o]=i.encode(t[o]);else t="string"==typeof t||t instanceof String?i.encode(t):t;return this.segment(e,t,r)};var A=a.query;return a.query=function(e,t){if(!0===e)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);return this._parts.query=i.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=i.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):A.call(this,e,t)},a.setQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)u.call(e,o)&&(n[o]=e[o])}return this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.addQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(n,e,void 0===t?null:t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.removeQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(n,e,t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.hasQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(n,e,t,r)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},a.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},a.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},a.normalizePath=function(e){var t=this._parts.path;if(!t)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;t=i.recodePath(t);var r,n,o,s="";for("/"!==t.charAt(0)&&(r=!0,t="/"+t),("/.."===t.slice(-3)||"/."===t.slice(-2))&&(t+="/"),t=t.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),r&&(s=t.substring(1).match(/^(\.\.\/)+/)||"",s&&(s=s[0]));n=t.search(/\/\.\.(\/|$)/),-1!==n;)0!==n?(o=t.substring(0,n).lastIndexOf("/"),-1===o&&(o=n),t=t.substring(0,o)+t.substring(n+3)):t=t.substring(3);return r&&this.is("relative")&&(t=s+t.substring(1)),this._parts.path=t,this.build(!e),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},a.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var e=i.encode,t=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},a.unicode=function(){var e=i.encode,t=i.decode;i.encode=y,i.decode=unescape;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},a.readable=function(){var t=this.clone();t.username("").password("").normalize();var r="";if(t._parts.protocol&&(r+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(r+=e.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(r+="/"),r+=t.path(!0),t._parts.query){for(var n="",o=0,s=t._parts.query.split("&"),a=s.length;o<a;o++){var u=(s[o]||"").split("=");n+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(n+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=i.decodeQuery(t.hash(),!0),r},a.absoluteTo=function(e){var t,r,n,o=this.clone(),s=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof i||(e=new i(e)),o._parts.protocol||(o._parts.protocol=e._parts.protocol,this._parts.hostname))return o;for(r=0;n=s[r];r++)o._parts[n]=e._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=e.directory(),t=t||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},a.relativeTo=function(e){var t,r,n,o,s,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new i(e).normalize(),t=a._parts,r=e._parts,o=a.path(),s=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==s.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password||null!==t.protocol||null!==t.username||null!==t.password)return a.build();if(t.hostname!==r.hostname||t.port!==r.port)return a.build();if(t.hostname=null,t.port=null,o===s)return t.path="",a.build();if(n=i.commonPath(o,s),!n)return a.build();var u=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=u+t.path.substring(n.length)||"./",a.build()},a.equals=function(e){var t,r,n,o=this.clone(),s=new i(e),a={},c={},l={};if(o.normalize(),s.normalize(),o.toString()===s.toString())return!0;if(t=o.query(),r=s.query(),o.query(""),s.query(""),o.toString()!==s.toString()||t.length!==r.length)return!1;for(n in a=i.parseQuery(t,this._parts.escapeQuerySpace),c=i.parseQuery(r,this._parts.escapeQuerySpace),a)if(u.call(a,n)){if(d(a[n])){if(!h(a[n],c[n]))return!1}else if(a[n]!==c[n])return!1;l[n]=!0}for(n in c)if(u.call(c,n)&&!l[n])return!1;return!0},a.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},a.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},a.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},i}))}));function Lt(e){return(0===e.length||"/"!==e[e.length-1])&&(e=`${e}/`),e}function Qt(e,t){if(null===e||"object"!=typeof e)return e;t=n.defaultValue(t,!1);const r=new e.constructor;for(const n in e)if(e.hasOwnProperty(n)){let o=e[n];t&&(o=Qt(o,t)),r[n]=o}return r}function $t(e,t){let r;return typeof document<"u"&&(r=document),$t._implementation(e,t,r)}function Wt(e,t){if(!n.defined(e))throw new r.DeveloperError("uri is required.");let o="";const i=e.lastIndexOf("/");return-1!==i&&(o=e.substring(0,i+1)),t&&(e=new Vt(e),0!==e.query().length&&(o+=`?${e.query()}`),0!==e.fragment().length&&(o+=`#${e.fragment()}`)),o}function Ht(e){if(!n.defined(e))throw new r.DeveloperError("uri is required.");const t=new Vt(e);t.normalize();let o=t.path(),i=o.lastIndexOf("/");return-1!==i&&(o=o.substr(i+1)),i=o.lastIndexOf("."),o=-1===i?"":o.substr(i+1),o}$t._implementation=function(e,t,o){if(!n.defined(e))throw new r.DeveloperError("relative uri is required.");if(!n.defined(t)){if(typeof o>"u")return e;t=n.defaultValue(o.baseURI,o.location.href)}const i=new Vt(e);return""!==i.scheme()?i.toString():i.absoluteTo(t).toString()};const Yt={};function Zt(e,t,r){n.defined(t)||(t=e.width),n.defined(r)||(r=e.height);let o=Yt[t];n.defined(o)||(o={},Yt[t]=o);let i=o[r];if(!n.defined(i)){const e=document.createElement("canvas");e.width=t,e.height=r,i=e.getContext("2d"),i.globalCompositeOperation="copy",o[r]=i}return i.drawImage(e,0,0,t,r),i.getImageData(0,0,t,r).data}const Gt=/^blob:/i;function Jt(e){return r.Check.typeOf.string("uri",e),Gt.test(e)}let Xt;function Kt(e){n.defined(Xt)||(Xt=document.createElement("a")),Xt.href=window.location.href;const t=Xt.host,r=Xt.protocol;return Xt.href=e,Xt.href=Xt.href,r!==Xt.protocol||t!==Xt.host}const er=/^data:/i;function tr(e){return r.Check.typeOf.string("uri",e),er.test(e)}function rr(e){const t=Z(),r=document.createElement("script");r.async=!0,r.src=e;const n=document.getElementsByTagName("head")[0];return r.onload=function(){r.onload=void 0,n.removeChild(r),t.resolve()},r.onerror=function(e){t.reject(e)},n.appendChild(r),t.promise}function nr(e){if(!n.defined(e))throw new r.DeveloperError("obj is required.");let t="";for(const r in e)if(e.hasOwnProperty(r)){const n=e[r],o=`${encodeURIComponent(r)}=`;if(Array.isArray(n))for(let e=0,r=n.length;e<r;++e)t+=`${o+encodeURIComponent(n[e])}&`;else t+=`${o+encodeURIComponent(n)}&`}return t=t.slice(0,-1),t}function or(e){if(!n.defined(e))throw new r.DeveloperError("queryString is required.");const t={};if(""===e)return t;const o=e.replace(/\+/g,"%20").split(/[&;]/);for(let r=0,i=o.length;r<i;++r){const e=o[r].split("="),i=decodeURIComponent(e[0]);let s=e[1];s=n.defined(s)?decodeURIComponent(s):"";const a=t[i];"string"==typeof a?t[i]=[a,s]:Array.isArray(a)?a.push(s):t[i]=s}return t}var ir=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5}),sr=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3});function ar(e){e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT);const t=n.defaultValue(e.throttleByServer,!1),r=n.defaultValue(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=n.defaultValue(e.priority,0),this.throttle=r,this.throttleByServer=t,this.type=n.defaultValue(e.type,sr.OTHER),this.serverKey=void 0,this.state=ir.UNISSUED,this.deferred=void 0,this.cancelled=!1}function ur(e){const t={};if(!e)return t;const r=e.split("\r\n");for(let n=0;n<r.length;++n){const e=r[n],o=e.indexOf(": ");if(o>0){const r=e.substring(0,o),n=e.substring(o+2);t[r]=n}}return t}function cr(e,t,r){this.statusCode=e,this.response=t,this.responseHeaders=r,"string"==typeof this.responseHeaders&&(this.responseHeaders=ur(this.responseHeaders))}function lr(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function dr(e,t){return t-e}function fr(e){r.Check.typeOf.object("options",e),r.Check.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function pr(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function hr(e,t){return e.priority-t.priority}ar.prototype.cancel=function(){this.cancelled=!0},ar.prototype.clone=function(e){return n.defined(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 ar(this)},cr.prototype.toString=function(){let e="Request has failed.";return n.defined(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e},Object.defineProperties(lr.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),lr.prototype.addEventListener=function(e,t){r.Check.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);const n=this;return function(){n.removeEventListener(e,t)}},lr.prototype.removeEventListener=function(e,t){r.Check.typeOf.func("listener",e);const n=this._listeners,o=this._scopes;let i=-1;for(let r=0;r<n.length;r++)if(n[r]===e&&o[r]===t){i=r;break}return-1!==i&&(this._insideRaiseEvent?(this._toRemove.push(i),n[i]=void 0,o[i]=void 0):(n.splice(i,1),o.splice(i,1)),!0)},lr.prototype.raiseEvent=function(){let e;this._insideRaiseEvent=!0;const t=this._listeners,r=this._scopes;let o=t.length;for(e=0;e<o;e++){const o=t[e];n.defined(o)&&t[e].apply(r[e],arguments)}const i=this._toRemove;if(o=i.length,o>0){for(i.sort(dr),e=0;e<o;e++){const n=i[e];t.splice(n,1),r.splice(n,1)}i.length=0}this._insideRaiseEvent=!1},Object.defineProperties(fr.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){r.Check.typeOf.number.greaterThanOrEquals("maximumLength",e,0);const t=this._length;if(e<t){const r=this._array;for(let n=e;n<t;++n)r[n]=void 0;this._length=e,r.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}}),fr.prototype.reserve=function(e){e=n.defaultValue(e,this._length),this._array.length=e},fr.prototype.heapify=function(e){e=n.defaultValue(e,0);const t=this._length,r=this._comparator,o=this._array;let i=-1,s=!0;for(;s;){const n=2*(e+1),a=n-1;i=a<t&&r(o[a],o[e])<0?a:e,n<t&&r(o[n],o[i])<0&&(i=n),i!==e?(pr(o,i,e),e=i):s=!1}},fr.prototype.resort=function(){const e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},fr.prototype.insert=function(e){r.Check.defined("element",e);const t=this._array,o=this._comparator,i=this._maximumLength;let s,a=this._length++;for(a<t.length?t[a]=e:t.push(e);0!==a;){const e=Math.floor((a-1)/2);if(!(o(t[a],t[e])<0))break;pr(t,a,e),a=e}return n.defined(i)&&this._length>i&&(s=t[i],this._length=i),s},fr.prototype.pop=function(e){if(e=n.defaultValue(e,0),0===this._length)return;r.Check.typeOf.number.lessThan("index",e,this._length);const t=this._array,o=t[e];return pr(t,e,--this._length),this.heapify(e),t[this._length]=void 0,o};const mr={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0};let gr=20;const yr=new fr({comparator:hr});yr.maximumLength=gr,yr.reserve(gr);const vr=[];let wr={};const Cr=typeof document<"u"?new Vt(document.location.href):new Vt,br=new lr;function _r(){}function xr(e){n.defined(e.priorityFunction)&&(e.priority=e.priorityFunction())}function Er(e){return e.state===ir.UNISSUED&&(e.state=ir.ISSUED,e.deferred=Z()),e.deferred.promise}function Or(e){return function(t){if(e.state===ir.CANCELLED)return;const r=e.deferred;--mr.numberOfActiveRequests,--wr[e.serverKey],br.raiseEvent(),e.state=ir.RECEIVED,e.deferred=void 0,r.resolve(t)}}function Sr(e){return function(t){e.state!==ir.CANCELLED&&(++mr.numberOfFailedRequests,--mr.numberOfActiveRequests,--wr[e.serverKey],br.raiseEvent(t),e.state=ir.FAILED,e.deferred.reject(t))}}function Ar(e){const t=Er(e);return e.state=ir.ACTIVE,vr.push(e),++mr.numberOfActiveRequests,++mr.numberOfActiveRequestsEver,++wr[e.serverKey],e.requestFunction().then(Or(e)).catch(Sr(e)),t}function qr(e){const t=e.state===ir.ACTIVE;if(e.state=ir.CANCELLED,++mr.numberOfCancelledRequests,n.defined(e.deferred)){const t=e.deferred;e.deferred=void 0,t.reject()}t&&(--mr.numberOfActiveRequests,--wr[e.serverKey],++mr.numberOfCancelledActiveRequests),n.defined(e.cancelFunction)&&e.cancelFunction()}function Dr(){!_r.debugShowStatistics||(0===mr.numberOfActiveRequests&&mr.lastNumberOfActiveRequests>0&&(mr.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${mr.numberOfAttemptedRequests}`),mr.numberOfAttemptedRequests=0),mr.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${mr.numberOfCancelledRequests}`),mr.numberOfCancelledRequests=0),mr.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${mr.numberOfCancelledActiveRequests}`),mr.numberOfCancelledActiveRequests=0),mr.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${mr.numberOfFailedRequests}`),mr.numberOfFailedRequests=0)),mr.lastNumberOfActiveRequests=mr.numberOfActiveRequests)}_r.maximumRequests=50,_r.maximumRequestsPerServer=6,_r.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},_r.throttleRequests=!0,_r.debugShowStatistics=!1,_r.requestCompletedEvent=br,Object.defineProperties(_r,{statistics:{get:function(){return mr}},priorityHeapLength:{get:function(){return gr},set:function(e){if(e<gr)for(;yr.length>e;){const e=yr.pop();qr(e)}gr=e,yr.maximumLength=e,yr.reserve(e)}}}),_r.serverHasOpenSlots=function(e,t){t=n.defaultValue(t,1);const r=n.defaultValue(_r.requestsByServer[e],_r.maximumRequestsPerServer);return wr[e]+t<=r},_r.heapHasOpenSlots=function(e){return yr.length+e<=gr},_r.update=function(){let e,t,r=0;const n=vr.length;for(e=0;e<n;++e)t=vr[e],t.cancelled&&qr(t),t.state===ir.ACTIVE?r>0&&(vr[e-r]=t):++r;vr.length-=r;const o=yr.internalArray,i=yr.length;for(e=0;e<i;++e)xr(o[e]);yr.resort();const s=Math.max(_r.maximumRequests-vr.length,0);let a=0;for(;a<s&&yr.length>0;)t=yr.pop(),t.cancelled?qr(t):!t.throttleByServer||_r.serverHasOpenSlots(t.serverKey)?(Ar(t),++a):qr(t);Dr()},_r.getServerKey=function(e){r.Check.typeOf.string("url",e);let t=new Vt(e);""===t.scheme()&&(t=new Vt(e).absoluteTo(Cr),t.normalize());let o=t.authority();/:/.test(o)||(o=`${o}:${"https"===t.scheme()?"443":"80"}`);const i=wr[o];return n.defined(i)||(wr[o]=0),o},_r.request=function(e){if(r.Check.typeOf.object("request",e),r.Check.typeOf.string("request.url",e.url),r.Check.typeOf.func("request.requestFunction",e.requestFunction),tr(e.url)||Jt(e.url))return br.raiseEvent(),e.state=ir.RECEIVED,e.requestFunction();if(++mr.numberOfAttemptedRequests,n.defined(e.serverKey)||(e.serverKey=_r.getServerKey(e.url)),_r.throttleRequests&&e.throttleByServer&&!_r.serverHasOpenSlots(e.serverKey))return;if(!_r.throttleRequests||!e.throttle)return Ar(e);if(vr.length>=_r.maximumRequests)return;xr(e);const t=yr.insert(e);if(n.defined(t)){if(t===e)return;qr(t)}return Er(e)},_r.clearForSpecs=function(){for(;yr.length>0;){const e=yr.pop();qr(e)}const e=vr.length;for(let t=0;t<e;++t)qr(vr[t]);vr.length=0,wr={},mr.numberOfAttemptedRequests=0,mr.numberOfActiveRequests=0,mr.numberOfCancelledRequests=0,mr.numberOfCancelledActiveRequests=0,mr.numberOfFailedRequests=0,mr.numberOfActiveRequestsEver=0,mr.lastNumberOfActiveRequests=0},_r.numberOfActiveRequestsByServer=function(e){return wr[e]},_r.requestHeap=yr;const kr={};let Ir={};function Pr(e){const t=new Vt(e);t.normalize();let r=t.authority();if(0!==r.length){if(t.authority(r),-1!==r.indexOf("@")&&(r=r.split("@")[1]),-1===r.indexOf(":")){let e=t.scheme();if(0===e.length&&(e=window.location.protocol,e=e.substring(0,e.length-1)),"http"===e)r+=":80";else{if("https"!==e)return;r+=":443"}}return r}}kr.add=function(e,t){if(!n.defined(e))throw new r.DeveloperError("host is required.");if(!n.defined(t)||t<=0)throw new r.DeveloperError("port is required to be greater than 0.");const o=`${e.toLowerCase()}:${t}`;n.defined(Ir[o])||(Ir[o]=!0)},kr.remove=function(e,t){if(!n.defined(e))throw new r.DeveloperError("host is required.");if(!n.defined(t)||t<=0)throw new r.DeveloperError("port is required to be greater than 0.");const o=`${e.toLowerCase()}:${t}`;n.defined(Ir[o])&&delete Ir[o]},kr.contains=function(e){if(!n.defined(e))throw new r.DeveloperError("url is required.");const t=Pr(e);return!(!n.defined(t)||!n.defined(Ir[t]))},kr.clear=function(){Ir={}};const Rr=function(){try{const e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}();function Tr(e,t,r,n){const o=e.query();if(0===o.length)return{};let i;if(-1===o.indexOf("=")){const e={};e[o]=void 0,i=e}else i=or(o);t._queryParameters=r?jr(i,t._queryParameters,n):i,e.search("")}function zr(e,t){const r=t._queryParameters,o=Object.keys(r);1!==o.length||n.defined(r[o[0]])?e.search(nr(r)):e.search(o[0])}function Mr(e,t){return n.defined(e)?n.defined(e.clone)?e.clone():Qt(e):t}function Ur(e){if(e.state===ir.ISSUED||e.state===ir.ACTIVE)throw new r.RuntimeError("The Resource is already being fetched.");e.state=ir.UNISSUED,e.deferred=void 0}function jr(e,t,r){if(!r)return s.combine(e,t);const o=Qt(e,!0);for(const i in t)if(t.hasOwnProperty(i)){let e=o[i];const r=t[i];n.defined(e)?(Array.isArray(e)||(e=o[i]=[e]),o[i]=e.concat(r)):o[i]=Array.isArray(r)?r.slice():r}return o}function Fr(e){e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT),"string"==typeof e&&(e={url:e}),r.Check.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=Mr(e.templateValues,{}),this._queryParameters=Mr(e.queryParameters,{}),this.headers=Mr(e.headers,{}),this.request=n.defaultValue(e.request,new ar),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=n.defaultValue(e.retryAttempts,0),this._retryCount=0;const t=new Vt(e.url);Tr(t,this,!0,!0),t.fragment(""),this._url=t.toString()}let Nr;function Br(e){const t=e.resource,r=e.flipY,o=e.skipColorSpaceConversion,i=e.preferImageBitmap,s=t.request;s.url=t.url,s.requestFunction=function(){let e=!1;!t.isDataUri&&!t.isBlobUri&&(e=t.isCrossOriginUrl);const n=Z();return Fr._Implementations.createImage(s,e,n,r,o,i),n.promise};const a=_r.request(s);if(n.defined(a))return a.catch((function(e){return s.state!==ir.FAILED?Promise.reject(e):t.retryOnError(e).then((function(n){return n?(s.state=ir.UNISSUED,s.deferred=void 0,Br({resource:t,flipY:r,skipColorSpaceConversion:o,preferImageBitmap:i})):Promise.reject(e)}))}))}function Vr(e,t,r){const o={};o[t]=r,e.setQueryParameters(o);const i=e.request;i.url=e.url,i.requestFunction=function(){const t=Z();return window[r]=function(e){t.resolve(e);try{delete window[r]}catch{window[r]=void 0}},Fr._Implementations.loadAndExecuteScript(e.url,r,t),t.promise};const s=_r.request(i);if(n.defined(s))return s.catch((function(n){return i.state!==ir.FAILED?Promise.reject(n):e.retryOnError(n).then((function(o){return o?(i.state=ir.UNISSUED,i.deferred=void 0,Vr(e,t,r)):Promise.reject(n)}))}))}Fr.createIfNeeded=function(e){return e instanceof Fr?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new Fr({url:e})},Fr.supportsImageBitmapOptions=function(){if(n.defined(Nr))return Nr;if("function"!=typeof createImageBitmap)return Nr=Promise.resolve(!1),Nr;const e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC";return Nr=Fr.fetchBlob({url:e}).then((function(e){const t={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(e,t),createImageBitmap(e)])})).then((function(e){const t=Zt(e[0]),r=Zt(e[1]);return t[1]!==r[1]})).catch((function(){return!1})),Nr},Object.defineProperties(Fr,{isBlobSupported:{get:function(){return Rr}}}),Object.defineProperties(Fr.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){const t=new Vt(e);Tr(t,this,!1),t.fragment(""),this._url=t.toString()}},extension:{get:function(){return Ht(this._url)}},isDataUri:{get:function(){return tr(this._url)}},isBlobUri:{get:function(){return Jt(this._url)}},isCrossOriginUrl:{get:function(){return Kt(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),Fr.prototype.toString=function(){return this.getUrlComponent(!0,!0)},Fr.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;const r=new Vt(this._url);e&&zr(r,this);let o=r.toString().replace(/%7B/g,"{").replace(/%7D/g,"}");const i=this._templateValues;return o=o.replace(/{(.*?)}/g,(function(e,t){const r=i[t];return n.defined(r)?encodeURIComponent(r):e})),t&&n.defined(this.proxy)&&(o=this.proxy.getURL(o)),o},Fr.prototype.setQueryParameters=function(e,t){this._queryParameters=t?jr(this._queryParameters,e,!1):jr(e,this._queryParameters,!1)},Fr.prototype.appendQueryParameters=function(e){this._queryParameters=jr(e,this._queryParameters,!0)},Fr.prototype.setTemplateValues=function(e,t){this._templateValues=t?s.combine(this._templateValues,e):s.combine(e,this._templateValues)},Fr.prototype.getDerivedResource=function(e){const t=this.clone();if(t._retryCount=0,n.defined(e.url)){const r=new Vt(e.url),o=n.defaultValue(e.preserveQueryParameters,!1);Tr(r,t,!0,o),r.fragment(""),""!==r.scheme()?t._url=r.toString():t._url=r.absoluteTo(new Vt($t(this._url))).toString()}return n.defined(e.queryParameters)&&(t._queryParameters=s.combine(e.queryParameters,t._queryParameters)),n.defined(e.templateValues)&&(t._templateValues=s.combine(e.templateValues,t.templateValues)),n.defined(e.headers)&&(t.headers=s.combine(e.headers,t.headers)),n.defined(e.proxy)&&(t.proxy=e.proxy),n.defined(e.request)&&(t.request=e.request),n.defined(e.retryCallback)&&(t.retryCallback=e.retryCallback),n.defined(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},Fr.prototype.retryOnError=function(e){const t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);const r=this;return Promise.resolve(t(this,e)).then((function(e){return++r._retryCount,e}))},Fr.prototype.clone=function(e){return n.defined(e)||(e=new Fr({url:this._url})),e._url=this._url,e._queryParameters=Qt(this._queryParameters),e._templateValues=Qt(this._templateValues),e.headers=Qt(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},Fr.prototype.getBaseUri=function(e){return Wt(this.getUrlComponent(e),e)},Fr.prototype.appendForwardSlash=function(){this._url=Lt(this._url)},Fr.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},Fr.fetchArrayBuffer=function(e){return new Fr(e).fetchArrayBuffer()},Fr.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},Fr.fetchBlob=function(e){return new Fr(e).fetchBlob()},Fr.prototype.fetchImage=function(e){e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT);const t=n.defaultValue(e.preferImageBitmap,!1),r=n.defaultValue(e.preferBlob,!1),o=n.defaultValue(e.flipY,!1),i=n.defaultValue(e.skipColorSpaceConversion,!1);if(Ur(this.request),!Rr||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!r)return Br({resource:this,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:t});const s=this.fetchBlob();if(!n.defined(s))return;let a,u,c,l;return Fr.supportsImageBitmapOptions().then((function(e){return a=e,u=a&&t,s})).then((function(e){if(!n.defined(e))return;if(l=e,u)return Fr.createImageBitmapFromBlob(e,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i});const t=window.URL.createObjectURL(e);return c=new Fr({url:t}),Br({resource:c,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:!1})})).then((function(e){if(n.defined(e))return e.blob=l,u||window.URL.revokeObjectURL(c.url),e})).catch((function(e){return n.defined(c)&&window.URL.revokeObjectURL(c.url),e.blob=l,Promise.reject(e)}))},Fr.fetchImage=function(e){return new Fr(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},Fr.prototype.fetchText=function(){return this.fetch({responseType:"text"})},Fr.fetchText=function(e){return new Fr(e).fetchText()},Fr.prototype.fetchJson=function(){const e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(n.defined(e))return e.then((function(e){if(n.defined(e))return JSON.parse(e)}))},Fr.fetchJson=function(e){return new Fr(e).fetchJson()},Fr.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},Fr.fetchXML=function(e){return new Fr(e).fetchXML()},Fr.prototype.fetchJsonp=function(e){let t;e=n.defaultValue(e,"callback"),Ur(this.request);do{t=`loadJsonp${o.CesiumMath.nextRandomNumber().toString().substring(2,8)}`}while(n.defined(window[t]));return Vr(this,e,t)},Fr.fetchJsonp=function(e){return new Fr(e).fetchJsonp(e.callbackParameterName)},Fr.prototype._makeRequest=function(e){const t=this;Ur(t.request);const r=t.request;r.url=t.url,r.requestFunction=function(){const o=e.responseType,i=s.combine(e.headers,t.headers),a=e.overrideMimeType,u=e.method,c=e.data,l=Z(),d=Fr._Implementations.loadWithXhr(t.url,o,u,c,i,l,a);return n.defined(d)&&n.defined(d.abort)&&(r.cancelFunction=function(){d.abort()}),l.promise};const o=_r.request(r);if(n.defined(o))return o.then((function(e){return r.cancelFunction=void 0,e})).catch((function(n){return r.cancelFunction=void 0,r.state!==ir.FAILED?Promise.reject(n):t.retryOnError(n).then((function(o){return o?(r.state=ir.UNISSUED,r.deferred=void 0,t.fetch(e)):Promise.reject(n)}))}))};const Lr=/^data:(.*?)(;base64)?,(.*)$/;function Qr(e,t){const r=decodeURIComponent(t);return e?atob(r):r}function $r(e,t){const r=Qr(e,t),n=new ArrayBuffer(r.length),o=new Uint8Array(n);for(let i=0;i<r.length;i++)o[i]=r.charCodeAt(i);return n}function Wr(e,t){t=n.defaultValue(t,"");const o=e[1],i=!!e[2],s=e[3];let a,u;switch(t){case"":case"text":return Qr(i,s);case"arraybuffer":return $r(i,s);case"blob":return a=$r(i,s),new Blob([a],{type:o});case"document":return u=new DOMParser,u.parseFromString(Qr(i,s),o);case"json":return JSON.parse(Qr(i,s));default:throw new r.DeveloperError(`Unhandled responseType: ${t}`)}}function Hr(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}function Yr(e,t,n,o,i,s,a){const u=require("url").parse(e),c="https:"===u.protocol?require("https"):require("http"),l=require("zlib"),d={protocol:u.protocol,hostname:u.hostname,port:u.port,path:u.path,query:u.query,method:n,headers:i};c.request(d).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)return void s.reject(new cr(e.statusCode,e,e.headers));const n=[];e.on("data",(function(e){n.push(e)})),e.on("end",(function(){const o=Buffer.concat(n);"gzip"===e.headers["content-encoding"]?l.gunzip(o,(function(e,n){e?s.reject(new r.RuntimeError("Error decompressing response.")):s.resolve(Hr(n,t))})):s.resolve(Hr(o,t))}))})).on("error",(function(e){s.reject(new cr)})).end()}Fr.prototype.fetch=function(e){return e=Mr(e,{}),e.method="GET",this._makeRequest(e)},Fr.fetch=function(e){return new Fr(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Fr.prototype.delete=function(e){return e=Mr(e,{}),e.method="DELETE",this._makeRequest(e)},Fr.delete=function(e){return new Fr(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},Fr.prototype.head=function(e){return e=Mr(e,{}),e.method="HEAD",this._makeRequest(e)},Fr.head=function(e){return new Fr(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Fr.prototype.options=function(e){return e=Mr(e,{}),e.method="OPTIONS",this._makeRequest(e)},Fr.options=function(e){return new Fr(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Fr.prototype.post=function(e,t){return r.Check.defined("data",e),t=Mr(t,{}),t.method="POST",t.data=e,this._makeRequest(t)},Fr.post=function(e){return new Fr(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Fr.prototype.put=function(e,t){return r.Check.defined("data",e),t=Mr(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)},Fr.put=function(e){return new Fr(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Fr.prototype.patch=function(e,t){return r.Check.defined("data",e),t=Mr(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)},Fr.patch=function(e){return new Fr(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Fr._Implementations={},Fr._Implementations.loadImageElement=function(e,t,r){const n=new Image;n.onload=function(){0===n.naturalWidth&&0===n.naturalHeight&&0===n.width&&0===n.height&&(n.width=300,n.height=150),r.resolve(n)},n.onerror=function(e){r.reject(e)},t&&(kr.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e},Fr._Implementations.createImage=function(e,t,o,i,s,a){const u=e.url;Fr.supportsImageBitmapOptions().then((function(c){if(!c||!a)return void Fr._Implementations.loadImageElement(u,t,o);const l="blob",d="GET",f=Z(),p=Fr._Implementations.loadWithXhr(u,l,d,void 0,void 0,f,void 0,void 0,void 0);return n.defined(p)&&n.defined(p.abort)&&(e.cancelFunction=function(){p.abort()}),f.promise.then((function(e){if(n.defined(e))return Fr.createImageBitmapFromBlob(e,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:s});o.reject(new r.RuntimeError(`Successfully retrieved ${u} but it contained no content.`))})).then((function(e){o.resolve(e)}))})).catch((function(e){o.reject(e)}))},Fr.createImageBitmapFromBlob=function(e,t){return r.Check.defined("options",t),r.Check.typeOf.bool("options.flipY",t.flipY),r.Check.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),r.Check.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};const Zr=typeof XMLHttpRequest>"u";function Gr(e){if(e=n.defaultValue(e,n.defaultValue.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=n.defaultValue(e.addNewLeapSeconds,!0),n.defined(e.data))Xr(this,e.data);else if(n.defined(e.url)){const t=Fr.createIfNeeded(e.url),r=this;this._downloadPromise=t.fetchJson().then((function(e){Xr(r,e)})).catch((function(){r._dataError=`An error occurred while retrieving the EOP data from the URL ${t.url}.`}))}else Xr(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function Jr(e,t){return Ut.compare(e.julianDate,t)}function Xr(e,t){if(!n.defined(t.columnNames))return void(e._dataError="Error in loaded EOP data: The columnNames property is required.");if(!n.defined(t.samples))return void(e._dataError="Error in loaded EOP data: The samples property is required.");const r=t.columnNames.indexOf("modifiedJulianDateUtc"),o=t.columnNames.indexOf("xPoleWanderRadians"),i=t.columnNames.indexOf("yPoleWanderRadians"),s=t.columnNames.indexOf("ut1MinusUtcSeconds"),a=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),c=t.columnNames.indexOf("taiMinusUtcSeconds");if(r<0||o<0||i<0||s<0||a<0||u<0||c<0)return void(e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");const l=e._samples=t.samples,d=e._dates=[];let f;e._dateColumn=r,e._xPoleWanderRadiansColumn=o,e._yPoleWanderRadiansColumn=i,e._ut1MinusUtcSecondsColumn=s,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=c,e._columnCount=t.columnNames.length,e._lastIndex=void 0;const p=e._addNewLeapSeconds;for(let h=0,m=l.length;h<m;h+=e._columnCount){const e=l[h+r],t=l[h+c],o=e+gt.MODIFIED_JULIAN_DATE_DIFFERENCE,i=new Ut(o,t,yt.TAI);if(d.push(i),p){if(t!==f&&n.defined(f)){const e=Ut.leapSeconds,r=dt(e,i,Jr);if(r<0){const n=new mt(i,t);e.splice(~r,0,n)}}f=t}}}function Kr(e,t,r,n,o){const i=r*n;o.xPoleWander=t[i+e._xPoleWanderRadiansColumn],o.yPoleWander=t[i+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[i+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[i+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[i+e._ut1MinusUtcSecondsColumn]}function en(e,t,r){return t+e*(r-t)}function tn(e,t,r,n,o,i,s){const a=e._columnCount;if(i>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;const u=t[o],c=t[i];if(u.equals(c)||n.equals(u))return Kr(e,r,o,a,s),s;if(n.equals(c))return Kr(e,r,i,a,s),s;const l=Ut.secondsDifference(n,u)/Ut.secondsDifference(c,u),d=o*a,f=i*a;let p=r[d+e._ut1MinusUtcSecondsColumn],h=r[f+e._ut1MinusUtcSecondsColumn];const m=h-p;if(m>.5||m<-.5){const t=r[d+e._taiMinusUtcSecondsColumn],o=r[f+e._taiMinusUtcSecondsColumn];t!==o&&(c.equals(n)?p=h:h-=o-t)}return s.xPoleWander=en(l,r[d+e._xPoleWanderRadiansColumn],r[f+e._xPoleWanderRadiansColumn]),s.yPoleWander=en(l,r[d+e._yPoleWanderRadiansColumn],r[f+e._yPoleWanderRadiansColumn]),s.xPoleOffset=en(l,r[d+e._xCelestialPoleOffsetRadiansColumn],r[f+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=en(l,r[d+e._yCelestialPoleOffsetRadiansColumn],r[f+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=en(l,p,h),s}function rn(e,t,r){this.heading=n.defaultValue(e,0),this.pitch=n.defaultValue(t,0),this.roll=n.defaultValue(r,0)}Fr._Implementations.loadWithXhr=function(e,t,o,i,s,a,u){const c=Lr.exec(e);if(null!==c)return void a.resolve(Wr(c,t));if(Zr)return void Yr(e,t,o,i,s,a);const l=new XMLHttpRequest;if(kr.contains(e)&&(l.withCredentials=!0),l.open(o,e,!0),n.defined(u)&&n.defined(l.overrideMimeType)&&l.overrideMimeType(u),n.defined(s))for(const r in s)s.hasOwnProperty(r)&&l.setRequestHeader(r,s[r]);n.defined(t)&&(l.responseType=t);let d=!1;return"string"==typeof e&&(d=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),l.onload=function(){if((l.status<200||l.status>=300)&&(!d||0!==l.status))return void a.reject(new cr(l.status,l.response,l.getAllResponseHeaders()));const e=l.response,i=l.responseType;if("HEAD"===o||"OPTIONS"===o){const e=l.getAllResponseHeaders().trim().split(/[\r\n]+/),t={};return e.forEach((function(e){const r=e.split(": "),n=r.shift();t[n]=r.join(": ")})),void a.resolve(t)}if(204===l.status)a.resolve();else if(!n.defined(e)||n.defined(t)&&i!==t)if("json"===t&&"string"==typeof e)try{a.resolve(JSON.parse(e))}catch(s){a.reject(s)}else(""===i||"document"===i)&&n.defined(l.responseXML)&&l.responseXML.hasChildNodes()?a.resolve(l.responseXML):""!==i&&"text"!==i||!n.defined(l.responseText)?a.reject(new r.RuntimeError("Invalid XMLHttpRequest response type.")):a.resolve(l.responseText);else a.resolve(e)},l.onerror=function(e){a.reject(new cr)},l.send(i),l},Fr._Implementations.loadAndExecuteScript=function(e,t,r){return rr(e).catch((function(e){r.reject(e)}))},Fr._DefaultImplementations={},Fr._DefaultImplementations.createImage=Fr._Implementations.createImage,Fr._DefaultImplementations.loadWithXhr=Fr._Implementations.loadWithXhr,Fr._DefaultImplementations.loadAndExecuteScript=Fr._Implementations.loadAndExecuteScript,Fr.DEFAULT=Object.freeze(new Fr({url:typeof document>"u"?"":document.location.href.split("?")[0]})),Gr.NONE=Object.freeze({getPromiseToLoad:function(){return Promise.resolve()},compute:function(e,t){return n.defined(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new ft(0,0,0,0,0),t}}),Gr.prototype.getPromiseToLoad=function(){return Promise.resolve(this._downloadPromise)},Gr.prototype.compute=function(e,t){if(!n.defined(this._samples)){if(n.defined(this._dataError))throw new r.RuntimeError(this._dataError);return}if(n.defined(t)||(t=new ft(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;const o=this._dates,i=this._lastIndex;let s=0,a=0;if(n.defined(i)){const r=o[i],u=o[i+1],c=Ut.lessThanOrEquals(r,e),l=!n.defined(u),d=l||Ut.greaterThanOrEquals(u,e);if(c&&d)return s=i,!l&&u.equals(e)&&++s,a=s+1,tn(this,o,this._samples,e,s,a,t),t}let u=dt(o,e,Ut.compare,this._dateColumn);return u>=0?(u<o.length-1&&o[u+1].equals(e)&&++u,s=u,a=u):(a=~u,s=a-1,s<0&&(s=0)),this._lastIndex=s,tn(this,o,this._samples,e,s,a,t),t},rn.fromQuaternion=function(e,t){if(!n.defined(e))throw new r.DeveloperError("quaternion is required");n.defined(t)||(t=new rn);const i=2*(e.w*e.y-e.z*e.x),s=1-2*(e.x*e.x+e.y*e.y),a=2*(e.w*e.x+e.y*e.z),u=1-2*(e.y*e.y+e.z*e.z),c=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(c,u),t.roll=Math.atan2(a,s),t.pitch=-o.CesiumMath.asinClamped(i),t},rn.fromDegrees=function(e,t,i,s){if(!n.defined(e))throw new r.DeveloperError("heading is required");if(!n.defined(t))throw new r.DeveloperError("pitch is required");if(!n.defined(i))throw new r.DeveloperError("roll is required");return n.defined(s)||(s=new rn),s.heading=e*o.CesiumMath.RADIANS_PER_DEGREE,s.pitch=t*o.CesiumMath.RADIANS_PER_DEGREE,s.roll=i*o.CesiumMath.RADIANS_PER_DEGREE,s},rn.clone=function(e,t){if(n.defined(e))return n.defined(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new rn(e.heading,e.pitch,e.roll)},rn.equals=function(e,t){return e===t||n.defined(e)&&n.defined(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},rn.equalsEpsilon=function(e,t,r,i){return e===t||n.defined(e)&&n.defined(t)&&o.CesiumMath.equalsEpsilon(e.heading,t.heading,r,i)&&o.CesiumMath.equalsEpsilon(e.pitch,t.pitch,r,i)&&o.CesiumMath.equalsEpsilon(e.roll,t.roll,r,i)},rn.prototype.clone=function(e){return rn.clone(this,e)},rn.prototype.equals=function(e){return rn.equals(this,e)},rn.prototype.equalsEpsilon=function(e,t,r){return rn.equalsEpsilon(this,e,t,r)},rn.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};const nn=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function on(){const e=document.getElementsByTagName("script");for(let t=0,r=e.length;t<r;++t){const r=e[t].getAttribute("src"),n=nn.exec(r);if(null!==n)return n[1]}}let sn,an,un;function cn(e){return typeof document>"u"?e:(n.defined(sn)||(sn=document.createElement("a")),sn.href=e,sn.href=sn.href,sn.href)}function ln(){if(n.defined(an))return an;let e;if(e=typeof CESIUM_BASE_URL<"u"?CESIUM_BASE_URL:"object"==typeof define&&n.defined(define.amd)&&!define.amd.toUrlUndefined&&n.defined(require.toUrl)?$t("..",pn("Core/buildModuleUrl.js")):on(),!n.defined(e))throw new r.DeveloperError("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return an=new Fr({url:cn(e)}),an.appendForwardSlash(),an}function dn(e){return cn(require.toUrl(`../${e}`))}function fn(e){return ln().getDerivedResource({url:e}).url}function pn(e){return n.defined(un)||(un="object"==typeof define&&n.defined(define.amd)&&!define.amd.toUrlUndefined&&n.defined(require.toUrl)?dn:fn),un(e)}function hn(e,t,r){this.x=e,this.y=t,this.s=r}function mn(e){e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT),this._xysFileUrlTemplate=Fr.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=n.defaultValue(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=n.defaultValue(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new Ut(this._sampleZeroJulianEphemerisDate,0,yt.TAI),this._stepSizeDays=n.defaultValue(e.stepSizeDays,1),this._samplesPerXysFile=n.defaultValue(e.samplesPerXysFile,1e3),this._totalSamples=n.defaultValue(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];const t=this._interpolationOrder,r=this._denominators=new Array(t+1),o=this._xTable=new Array(t+1),i=Math.pow(this._stepSizeDays,t);for(let n=0;n<=t;++n){r[n]=i,o[n]=n*this._stepSizeDays;for(let e=0;e<=t;++e)e!==n&&(r[n]*=n-e);r[n]=1/r[n]}this._work=new Array(t+1),this._coef=new Array(t+1)}pn._cesiumScriptRegex=nn,pn._buildModuleUrlFromBaseUrl=fn,pn._clearBaseResource=function(){an=void 0},pn.setBaseUrl=function(e){an=Fr.DEFAULT.getDerivedResource({url:e})},pn.getCesiumBaseUrl=ln;const gn=new Ut(0,0,yt.TAI);function yn(e,t,r){const n=gn;return n.dayNumber=t,n.secondsOfDay=r,Ut.daysDifference(n,e._sampleZeroDateTT)}function vn(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];const r=Z();let o;e._chunkDownloadsInProgress[t]=r;const i=e._xysFileUrlTemplate;return o=n.defined(i)?i.getDerivedResource({templateValues:{0:t}}):new Fr({url:pn(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)}),o.fetchJson().then((function(n){e._chunkDownloadsInProgress[t]=!1;const o=e._samples,i=n.samples,s=t*e._samplesPerXysFile*3;for(let e=0,t=i.length;e<t;++e)o[s+e]=i[e];r.resolve()})),r.promise}mn.prototype.preload=function(e,t,r,n){const o=yn(this,e,t),i=yn(this,r,n);let s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=i/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);const u=s/this._samplesPerXysFile|0,c=a/this._samplesPerXysFile|0,l=[];for(let d=u;d<=c;++d)l.push(vn(this,d));return Promise.all(l)},mn.prototype.computeXysRadians=function(e,t,r){const o=yn(this,e,t);if(o<0)return;const i=o/this._stepSizeDays|0;if(i>=this._totalSamples)return;const s=this._interpolationOrder;let a=i-(s/2|0);a<0&&(a=0);let u=a+s;u>=this._totalSamples&&(u=this._totalSamples-1,a=u-s,a<0&&(a=0));let c=!1;const l=this._samples;if(n.defined(l[3*a])||(vn(this,a/this._samplesPerXysFile|0),c=!0),n.defined(l[3*u])||(vn(this,u/this._samplesPerXysFile|0),c=!0),c)return;n.defined(r)?(r.x=0,r.y=0,r.s=0):r=new hn(0,0,0);const d=o-a*this._stepSizeDays,f=this._work,p=this._denominators,h=this._coef,m=this._xTable;let g,y;for(g=0;g<=s;++g)f[g]=d-m[g];for(g=0;g<=s;++g){for(h[g]=1,y=0;y<=s;++y)y!==g&&(h[g]*=f[y]);h[g]*=p[g];let e=3*(a+g);r.x+=h[g]*l[e++],r.y+=h[g]*l[e++],r.s+=h[g]*l[e]}return r};const wn={},Cn={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"}},bn={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},_n={},xn={east:new t.Cartesian3,north:new t.Cartesian3,up:new t.Cartesian3,west:new t.Cartesian3,south:new t.Cartesian3,down:new t.Cartesian3};let En=new t.Cartesian3,On=new t.Cartesian3,Sn=new t.Cartesian3;wn.localFrameToFixedFrameGenerator=function(e,i){if(!Cn.hasOwnProperty(e)||!Cn[e].hasOwnProperty(i))throw new r.DeveloperError("firstAxis and secondAxis must be east, north, up, west, south or down.");const s=Cn[e][i];let a;const u=e+i;return n.defined(_n[u])?a=_n[u]:(a=function(a,u,c){if(!n.defined(a))throw new r.DeveloperError("origin is required.");if(n.defined(c)||(c=new t.Matrix4),t.Cartesian3.equalsEpsilon(a,t.Cartesian3.ZERO,o.CesiumMath.EPSILON14))t.Cartesian3.unpack(bn[e],0,En),t.Cartesian3.unpack(bn[i],0,On),t.Cartesian3.unpack(bn[s],0,Sn);else if(o.CesiumMath.equalsEpsilon(a.x,0,o.CesiumMath.EPSILON14)&&o.CesiumMath.equalsEpsilon(a.y,0,o.CesiumMath.EPSILON14)){const r=o.CesiumMath.sign(a.z);t.Cartesian3.unpack(bn[e],0,En),"east"!==e&&"west"!==e&&t.Cartesian3.multiplyByScalar(En,r,En),t.Cartesian3.unpack(bn[i],0,On),"east"!==i&&"west"!==i&&t.Cartesian3.multiplyByScalar(On,r,On),t.Cartesian3.unpack(bn[s],0,Sn),"east"!==s&&"west"!==s&&t.Cartesian3.multiplyByScalar(Sn,r,Sn)}else{u=n.defaultValue(u,t.Ellipsoid.WGS84),u.geodeticSurfaceNormal(a,xn.up);const r=xn.up,o=xn.east;o.x=-a.y,o.y=a.x,o.z=0,t.Cartesian3.normalize(o,xn.east),t.Cartesian3.cross(r,o,xn.north),t.Cartesian3.multiplyByScalar(xn.up,-1,xn.down),t.Cartesian3.multiplyByScalar(xn.east,-1,xn.west),t.Cartesian3.multiplyByScalar(xn.north,-1,xn.south),En=xn[e],On=xn[i],Sn=xn[s]}return c[0]=En.x,c[1]=En.y,c[2]=En.z,c[3]=0,c[4]=On.x,c[5]=On.y,c[6]=On.z,c[7]=0,c[8]=Sn.x,c[9]=Sn.y,c[10]=Sn.z,c[11]=0,c[12]=a.x,c[13]=a.y,c[14]=a.z,c[15]=1,c},_n[u]=a),a},wn.eastNorthUpToFixedFrame=wn.localFrameToFixedFrameGenerator("east","north"),wn.northEastDownToFixedFrame=wn.localFrameToFixedFrameGenerator("north","east"),wn.northUpEastToFixedFrame=wn.localFrameToFixedFrameGenerator("north","up"),wn.northWestUpToFixedFrame=wn.localFrameToFixedFrameGenerator("north","west");const An=new je,qn=new t.Cartesian3(1,1,1),Dn=new t.Matrix4;wn.headingPitchRollToFixedFrame=function(e,o,i,s,a){r.Check.typeOf.object("HeadingPitchRoll",o),s=n.defaultValue(s,wn.eastNorthUpToFixedFrame);const u=je.fromHeadingPitchRoll(o,An),c=t.Matrix4.fromTranslationQuaternionRotationScale(t.Cartesian3.ZERO,u,qn,Dn);return a=s(e,i,a),t.Matrix4.multiply(a,c,a)};const kn=new t.Matrix4,In=new t.Matrix3;wn.headingPitchRollQuaternion=function(e,n,o,i,s){r.Check.typeOf.object("HeadingPitchRoll",n);const a=wn.headingPitchRollToFixedFrame(e,n,o,i,kn),u=t.Matrix4.getMatrix3(a,In);return je.fromRotationMatrix(u,s)};const Pn=new t.Cartesian3(1,1,1),Rn=new t.Cartesian3,Tn=new t.Matrix4,zn=new t.Matrix4,Mn=new t.Matrix3,Un=new je;wn.fixedFrameToHeadingPitchRoll=function(e,o,i,s){r.Check.defined("transform",e),o=n.defaultValue(o,t.Ellipsoid.WGS84),i=n.defaultValue(i,wn.eastNorthUpToFixedFrame),n.defined(s)||(s=new rn);const a=t.Matrix4.getTranslation(e,Rn);if(t.Cartesian3.equals(a,t.Cartesian3.ZERO))return s.heading=0,s.pitch=0,s.roll=0,s;let u=t.Matrix4.inverseTransformation(i(a,o,Tn),Tn),c=t.Matrix4.setScale(e,Pn,zn);c=t.Matrix4.setTranslation(c,t.Cartesian3.ZERO,c),u=t.Matrix4.multiply(u,c,u);let l=je.fromRotationMatrix(t.Matrix4.getMatrix3(u,Mn),Un);return l=je.normalize(l,l),rn.fromQuaternion(l,s)};const jn=24110.54841,Fn=8640184.812866,Nn=.093104,Bn=-62e-7,Vn=11772758384668e-32,Ln=72921158553e-15,Qn=o.CesiumMath.TWO_PI/86400;let $n=new Ut;wn.computeTemeToPseudoFixedMatrix=function(e,i){if(!n.defined(e))throw new r.DeveloperError("date is required.");$n=Ut.addSeconds(e,-Ut.computeTaiMinusUtc(e),$n);const s=$n.dayNumber,a=$n.secondsOfDay;let u;const c=s-2451545;u=a>=43200?(c+.5)/gt.DAYS_PER_JULIAN_CENTURY:(c-.5)/gt.DAYS_PER_JULIAN_CENTURY;const l=(jn+u*(Fn+u*(Nn+u*Bn)))*Qn%o.CesiumMath.TWO_PI,d=Ln+Vn*(s-2451545.5),f=(a+.5*gt.SECONDS_PER_DAY)%gt.SECONDS_PER_DAY,p=l+d*f,h=Math.cos(p),m=Math.sin(p);return n.defined(i)?(i[0]=h,i[1]=-m,i[2]=0,i[3]=m,i[4]=h,i[5]=0,i[6]=0,i[7]=0,i[8]=1,i):new t.Matrix3(h,m,0,-m,h,0,0,0,1)},wn.iau2006XysData=new mn,wn.earthOrientationParameters=Gr.NONE;const Wn=32.184,Hn=2451545;wn.preloadIcrfFixed=function(e){const t=e.start.dayNumber,r=e.start.secondsOfDay+Wn,n=e.stop.dayNumber,o=e.stop.secondsOfDay+Wn,i=wn.iau2006XysData.preload(t,r,n,o),s=wn.earthOrientationParameters.getPromiseToLoad();return Promise.all([i,s])},wn.computeIcrfToFixedMatrix=function(e,o){if(!n.defined(e))throw new r.DeveloperError("date is required.");n.defined(o)||(o=new t.Matrix3);const i=wn.computeFixedToIcrfMatrix(e,o);if(n.defined(i))return t.Matrix3.transpose(i,o)};const Yn=new hn(0,0,0),Zn=new ft(0,0,0,0,0,0),Gn=new t.Matrix3,Jn=new t.Matrix3;wn.computeFixedToIcrfMatrix=function(e,i){if(!n.defined(e))throw new r.DeveloperError("date is required.");n.defined(i)||(i=new t.Matrix3);const s=wn.earthOrientationParameters.compute(e,Zn);if(!n.defined(s))return;const a=e.dayNumber,u=e.secondsOfDay+Wn,c=wn.iau2006XysData.computeXysRadians(a,u,Yn);if(!n.defined(c))return;const l=c.x+s.xPoleOffset,d=c.y+s.yPoleOffset,f=1/(1+Math.sqrt(1-l*l-d*d)),p=Gn;p[0]=1-f*l*l,p[3]=-f*l*d,p[6]=l,p[1]=-f*l*d,p[4]=1-f*d*d,p[7]=d,p[2]=-l,p[5]=-d,p[8]=1-f*(l*l+d*d);const h=t.Matrix3.fromRotationZ(-c.s,Jn),m=t.Matrix3.multiply(p,h,Gn),g=e.dayNumber,y=e.secondsOfDay-Ut.computeTaiMinusUtc(e)+s.ut1MinusUtc,v=g-2451545,w=y/gt.SECONDS_PER_DAY;let C=.779057273264+w+.00273781191135448*(v+w);C=C%1*o.CesiumMath.TWO_PI;const b=t.Matrix3.fromRotationZ(C,Jn),_=t.Matrix3.multiply(m,b,Gn),x=Math.cos(s.xPoleWander),E=Math.cos(s.yPoleWander),O=Math.sin(s.xPoleWander),S=Math.sin(s.yPoleWander);let A=a-Hn+u/gt.SECONDS_PER_DAY;A/=36525;const q=-47e-6*A*o.CesiumMath.RADIANS_PER_DEGREE/3600,D=Math.cos(q),k=Math.sin(q),I=Jn;return I[0]=x*D,I[1]=x*k,I[2]=O,I[3]=-E*k+S*O*D,I[4]=E*D+S*O*k,I[5]=-S*x,I[6]=-S*k-E*O*D,I[7]=S*D-E*O*k,I[8]=E*x,t.Matrix3.multiply(_,I,i)};const Xn=new t.Cartesian4;wn.pointToWindowCoordinates=function(e,t,r,n){return n=wn.pointToGLWindowCoordinates(e,t,r,n),n.y=2*t[5]-n.y,n},wn.pointToGLWindowCoordinates=function(e,o,i,s){if(!n.defined(e))throw new r.DeveloperError("modelViewProjectionMatrix is required.");if(!n.defined(o))throw new r.DeveloperError("viewportTransformation is required.");if(!n.defined(i))throw new r.DeveloperError("point is required.");n.defined(s)||(s=new t.Cartesian2);const a=Xn;return t.Matrix4.multiplyByVector(e,t.Cartesian4.fromElements(i.x,i.y,i.z,1,a),a),t.Cartesian4.multiplyByScalar(a,1/a.w,a),t.Matrix4.multiplyByVector(o,a,a),t.Cartesian2.fromCartesian4(a,s)};const Kn=new t.Cartesian3,eo=new t.Cartesian3,to=new t.Cartesian3;wn.rotationMatrixFromPositionVelocity=function(e,i,s,a){if(!n.defined(e))throw new r.DeveloperError("position is required.");if(!n.defined(i))throw new r.DeveloperError("velocity is required.");const u=n.defaultValue(s,t.Ellipsoid.WGS84).geodeticSurfaceNormal(e,Kn);let c=t.Cartesian3.cross(i,u,eo);t.Cartesian3.equalsEpsilon(c,t.Cartesian3.ZERO,o.CesiumMath.EPSILON6)&&(c=t.Cartesian3.clone(t.Cartesian3.UNIT_X,c));const l=t.Cartesian3.cross(c,i,to);return t.Cartesian3.normalize(l,l),t.Cartesian3.cross(i,l,c),t.Cartesian3.negate(c,c),t.Cartesian3.normalize(c,c),n.defined(a)||(a=new t.Matrix3),a[0]=i.x,a[1]=i.y,a[2]=i.z,a[3]=c.x,a[4]=c.y,a[5]=c.z,a[6]=l.x,a[7]=l.y,a[8]=l.z,a};const ro=new t.Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),no=new t.Cartographic,oo=new t.Cartesian3,io=new t.Cartesian3,so=new t.Matrix3,ao=new t.Matrix4,uo=new t.Matrix4;wn.basisTo2D=function(e,o,i){if(!n.defined(e))throw new r.DeveloperError("projection is required.");if(!n.defined(o))throw new r.DeveloperError("matrix is required.");if(!n.defined(i))throw new r.DeveloperError("result is required.");const s=t.Matrix4.getTranslation(o,io),a=e.ellipsoid,u=a.cartesianToCartographic(s,no),c=e.project(u,oo);t.Cartesian3.fromElements(c.z,c.x,c.y,c);const l=wn.eastNorthUpToFixedFrame(s,a,ao),d=t.Matrix4.inverseTransformation(l,uo),f=t.Matrix4.getMatrix3(o,so),p=t.Matrix4.multiplyByMatrix3(d,f,i);return t.Matrix4.multiply(ro,p,i),t.Matrix4.setTranslation(i,c,i),i},wn.wgs84To2DModelMatrix=function(e,o,i){if(!n.defined(e))throw new r.DeveloperError("projection is required.");if(!n.defined(o))throw new r.DeveloperError("center is required.");if(!n.defined(i))throw new r.DeveloperError("result is required.");const s=e.ellipsoid,a=wn.eastNorthUpToFixedFrame(o,s,ao),u=t.Matrix4.inverseTransformation(a,uo),c=s.cartesianToCartographic(o,no),l=e.project(c,oo);t.Cartesian3.fromElements(l.z,l.x,l.y,l);const d=t.Matrix4.fromTranslation(l,ao);return t.Matrix4.multiply(ro,u,i),t.Matrix4.multiply(d,i,i),i},e.BoundingSphere=l,e.FeatureDetection=Ue,e.GeographicProjection=a,e.Intersect=u,e.Interval=c,e.Quaternion=je,e.Resource=Fr,e.Transforms=wn,e.buildModuleUrl=pn}));