1 |
- define(["exports","./Cartesian2-6033fa5d","./Cartographic-67e73ef9","./Check-52a7d806","./when-92c6cf3c","./PrimitiveType-cdfe443e","./FeatureDetection-067cb23c","./Math-92c3b5f7","./Rectangle-bab7abf0","./Cartesian4-ad128b5d","./buildModuleUrl-3d15f25c","./RuntimeError-c6a62a80","./Intersect-b97e930a"],(function(e,t,n,r,o,a,i,s,u,l,c,f,d){"use strict";var p=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function y(e,t,n,r){this[0]=o.u(e,0),this[1]=o.u(n,0),this[2]=o.u(t,0),this[3]=o.u(r,0)}y.packedLength=4,y.pack=function(e,t,n){return r.o.typeOf.object("value",e),r.o.defined("array",t),n=o.u(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},y.unpack=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new y),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},y.clone=function(e,t){if(o.e(e))return o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new y(e[0],e[2],e[1],e[3])},y.fromArray=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new y),n[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},y.fromColumnMajorArray=function(e,t){return r.o.defined("values",e),y.clone(e,t)},y.fromRowMajorArray=function(e,t){return r.o.defined("values",e),o.e(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new y(e[0],e[1],e[2],e[3])},y.fromScale=function(e,t){return r.o.typeOf.object("scale",e),o.e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new y(e.x,0,0,e.y)},y.fromUniformScale=function(e,t){return r.o.typeOf.number("scale",e),o.e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new y(e,0,0,e)},y.fromRotation=function(e,t){r.o.typeOf.number("angle",e);var n=Math.cos(e),a=Math.sin(e);return o.e(t)?(t[0]=n,t[1]=a,t[2]=-a,t[3]=n,t):new y(n,-a,a,n)},y.toArray=function(e,t){return r.o.typeOf.object("matrix",e),o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},y.getElementIndex=function(e,t){return r.o.typeOf.number.greaterThanOrEquals("row",t,0),r.o.typeOf.number.lessThanOrEquals("row",t,1),r.o.typeOf.number.greaterThanOrEquals("column",e,0),r.o.typeOf.number.lessThanOrEquals("column",e,1),2*e+t},y.getColumn=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,1),r.o.typeOf.object("result",n);var o=2*t,a=e[o],i=e[o+1];return n.x=a,n.y=i,n},y.setColumn=function(e,t,n,o){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,1),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o);var a=2*t;return(o=y.clone(e,o))[a]=n.x,o[a+1]=n.y,o},y.getRow=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,1),r.o.typeOf.object("result",n);var o=e[t],a=e[t+2];return n.x=o,n.y=a,n},y.setRow=function(e,t,n,o){return r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,1),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o),(o=y.clone(e,o))[t]=n.x,o[t+2]=n.y,o};var h=new t.o;y.getScale=function(e,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",n),n.x=t.o.magnitude(t.o.fromElements(e[0],e[1],h)),n.y=t.o.magnitude(t.o.fromElements(e[2],e[3],h)),n};var m=new t.o;function w(e,t,n,r){this.x=o.u(e,0),this.y=o.u(t,0),this.z=o.u(n,0),this.w=o.u(r,0)}y.getMaximumScale=function(e){return y.getScale(e,m),t.o.maximumComponent(m)},y.multiply=function(e,t,n){r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n);var o=e[0]*t[0]+e[2]*t[1],a=e[0]*t[2]+e[2]*t[3],i=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=o,n[1]=i,n[2]=a,n[3]=s,n},y.add=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},y.subtract=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},y.multiplyByVector=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=e[0]*t.x+e[2]*t.y,a=e[1]*t.x+e[3]*t.y;return n.x=o,n.y=a,n},y.multiplyByScalar=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.number("scalar",t),r.o.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},y.multiplyByScale=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("scale",t),r.o.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n},y.negate=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},y.transpose=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var n=e[0],o=e[2],a=e[1],i=e[3];return t[0]=n,t[1]=o,t[2]=a,t[3]=i,t},y.abs=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},y.equals=function(e,t){return e===t||o.e(e)&&o.e(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},y.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]},y.equalsEpsilon=function(e,t,n){return r.o.typeOf.number("epsilon",n),e===t||o.e(e)&&o.e(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},y.IDENTITY=Object.freeze(new y(1,0,0,1)),y.ZERO=Object.freeze(new y(0,0,0,0)),y.COLUMN0ROW0=0,y.COLUMN0ROW1=1,y.COLUMN1ROW0=2,y.COLUMN1ROW1=3,Object.defineProperties(y.prototype,{length:{get:function(){return y.packedLength}}}),y.prototype.clone=function(e){return y.clone(this,e)},y.prototype.equals=function(e){return y.equals(this,e)},y.prototype.equalsEpsilon=function(e,t){return y.equalsEpsilon(this,e,t)},y.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var O=new n.t;w.fromAxisAngle=function(e,t,a){r.o.typeOf.object("axis",e),r.o.typeOf.number("angle",t);var i=t/2,s=Math.sin(i),u=(O=n.t.normalize(e,O)).x*s,l=O.y*s,c=O.z*s,f=Math.cos(i);return o.e(a)?(a.x=u,a.y=l,a.z=c,a.w=f,a):new w(u,l,c,f)};var b=[1,2,0],x=new Array(3);w.fromRotationMatrix=function(e,t){r.o.typeOf.object("matrix",e);var n,i,s,u,l,c=e[a.p.COLUMN0ROW0],f=e[a.p.COLUMN1ROW1],d=e[a.p.COLUMN2ROW2],p=c+f+d;if(p>0)l=.5*(n=Math.sqrt(p+1)),n=.5/n,i=(e[a.p.COLUMN1ROW2]-e[a.p.COLUMN2ROW1])*n,s=(e[a.p.COLUMN2ROW0]-e[a.p.COLUMN0ROW2])*n,u=(e[a.p.COLUMN0ROW1]-e[a.p.COLUMN1ROW0])*n;else{var y=0;f>c&&(y=1),d>c&&d>f&&(y=2);var h=b[y],m=b[h];n=Math.sqrt(e[a.p.getElementIndex(y,y)]-e[a.p.getElementIndex(h,h)]-e[a.p.getElementIndex(m,m)]+1);var O=x;O[y]=.5*n,n=.5/n,l=(e[a.p.getElementIndex(m,h)]-e[a.p.getElementIndex(h,m)])*n,O[h]=(e[a.p.getElementIndex(h,y)]+e[a.p.getElementIndex(y,h)])*n,O[m]=(e[a.p.getElementIndex(m,y)]+e[a.p.getElementIndex(y,m)])*n,i=-O[0],s=-O[1],u=-O[2]}return o.e(t)?(t.x=i,t.y=s,t.z=u,t.w=l,t):new w(i,s,u,l)};var E=new w,_=new w,v=new w,T=new w;w.fromHeadingPitchRoll=function(e,t){return r.o.typeOf.object("headingPitchRoll",e),T=w.fromAxisAngle(n.t.UNIT_X,e.roll,E),v=w.fromAxisAngle(n.t.UNIT_Y,-e.pitch,t),t=w.multiply(v,T,v),_=w.fromAxisAngle(n.t.UNIT_Z,-e.heading,E),w.multiply(_,t,t)};var S=new n.t,g=new n.t,D=new w,P=new w,N=new w;w.packedLength=4,w.pack=function(e,t,n){return r.o.typeOf.object("value",e),r.o.defined("array",t),n=o.u(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},w.unpack=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new w),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},w.packedInterpolationLength=3,w.convertPackedArrayForInterpolation=function(e,t,n,r){w.unpack(e,4*n,N),w.conjugate(N,N);for(var o=0,a=n-t+1;o<a;o++){var i=3*o;w.unpack(e,4*(t+o),D),w.multiply(D,N,D),D.w<0&&w.negate(D,D),w.computeAxis(D,S);var s=w.computeAngle(D);r[i]=S.x*s,r[i+1]=S.y*s,r[i+2]=S.z*s}},w.unpackInterpolationResult=function(e,t,r,a,i){o.e(i)||(i=new w),n.t.fromArray(e,0,g);var s=n.t.magnitude(g);return w.unpack(t,4*a,P),0===s?w.clone(w.IDENTITY,D):w.fromAxisAngle(g,s,D),w.multiply(D,P,i)},w.clone=function(e,t){if(o.e(e))return o.e(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new w(e.x,e.y,e.z,e.w)},w.conjugate=function(e,t){return r.o.typeOf.object("quaternion",e),r.o.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},w.magnitudeSquared=function(e){return r.o.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},w.magnitude=function(e){return Math.sqrt(w.magnitudeSquared(e))},w.normalize=function(e,t){r.o.typeOf.object("result",t);var n=1/w.magnitude(e),o=e.x*n,a=e.y*n,i=e.z*n,s=e.w*n;return t.x=o,t.y=a,t.z=i,t.w=s,t},w.inverse=function(e,t){r.o.typeOf.object("result",t);var n=w.magnitudeSquared(e);return t=w.conjugate(e,t),w.multiplyByScalar(t,1/n,t)},w.add=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.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},w.subtract=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.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},w.negate=function(e,t){return r.o.typeOf.object("quaternion",e),r.o.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},w.dot=function(e,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},w.multiply=function(e,t,n){r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n);var o=e.x,a=e.y,i=e.z,s=e.w,u=t.x,l=t.y,c=t.z,f=t.w,d=s*u+o*f+a*c-i*l,p=s*l-o*c+a*f+i*u,y=s*c+o*l-a*u+i*f,h=s*f-o*u-a*l-i*c;return n.x=d,n.y=p,n.z=y,n.w=h,n},w.multiplyByVec=function(e,t,r){var o=new n.t,a=new n.t,i=new n.t(e.x,e.y,e.z);o=n.t.cross(i,t,o),a=n.t.cross(i,o,a);var s=new n.t;s=n.t.multiplyByScalar(o,2*e.w,s);var u=new n.t;return u=n.t.multiplyByScalar(o,2,u),r=n.t.add(t,s,r),r=n.t.add(r,u,r)},w.multiplyByScalar=function(e,t,n){return r.o.typeOf.object("quaternion",e),r.o.typeOf.number("scalar",t),r.o.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},w.divideByScalar=function(e,t,n){return r.o.typeOf.object("quaternion",e),r.o.typeOf.number("scalar",t),r.o.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},w.computeAxis=function(e,t){r.o.typeOf.object("quaternion",e),r.o.typeOf.object("result",t);var n=e.w;if(Math.abs(n-1)<s.e.EPSILON6)return t.x=t.y=t.z=0,t;var o=1/Math.sqrt(1-n*n);return t.x=e.x*o,t.y=e.y*o,t.z=e.z*o,t},w.computeAngle=function(e){return r.o.typeOf.object("quaternion",e),Math.abs(e.w-1)<s.e.EPSILON6?0:2*Math.acos(e.w)};var C=new w;w.lerp=function(e,t,n,o){return r.o.typeOf.object("start",e),r.o.typeOf.object("end",t),r.o.typeOf.number("t",n),r.o.typeOf.object("result",o),C=w.multiplyByScalar(t,n,C),o=w.multiplyByScalar(e,1-n,o),w.add(C,o,o)};var I=new w,j=new w,R=new w;w.slerp=function(e,t,n,o){r.o.typeOf.object("start",e),r.o.typeOf.object("end",t),r.o.typeOf.number("t",n),r.o.typeOf.object("result",o);var a=w.dot(e,t),i=t;if(a<0&&(a=-a,i=I=w.negate(t,I)),1-a<s.e.EPSILON6)return w.lerp(e,i,n,o);var u=Math.acos(a);return j=w.multiplyByScalar(e,Math.sin((1-n)*u),j),R=w.multiplyByScalar(i,Math.sin(n*u),R),o=w.add(j,R,o),w.multiplyByScalar(o,1/Math.sin(u),o)},w.log=function(e,t){r.o.typeOf.object("quaternion",e),r.o.typeOf.object("result",t);var o=s.e.acosClamped(e.w),a=0;return 0!==o&&(a=o/Math.sin(o)),n.t.multiplyByScalar(e,a,t)},w.exp=function(e,t){r.o.typeOf.object("cartesian",e),r.o.typeOf.object("result",t);var o=n.t.magnitude(e),a=0;return 0!==o&&(a=Math.sin(o)/o),t.x=e.x*a,t.y=e.y*a,t.z=e.z*a,t.w=Math.cos(o),t};var M=new n.t,A=new n.t,q=new w,U=new w;w.computeInnerQuadrangle=function(e,t,o,a){r.o.typeOf.object("q0",e),r.o.typeOf.object("q1",t),r.o.typeOf.object("q2",o),r.o.typeOf.object("result",a);var i=w.conjugate(t,q);w.multiply(i,o,U);var s=w.log(U,M);w.multiply(i,e,U);var u=w.log(U,A);return n.t.add(s,u,s),n.t.multiplyByScalar(s,.25,s),n.t.negate(s,s),w.exp(s,q),w.multiply(t,q,a)},w.squad=function(e,t,n,o,a,i){r.o.typeOf.object("q0",e),r.o.typeOf.object("q1",t),r.o.typeOf.object("s0",n),r.o.typeOf.object("s1",o),r.o.typeOf.number("t",a),r.o.typeOf.object("result",i);var s=w.slerp(e,t,a,q),u=w.slerp(n,o,a,U);return w.slerp(s,u,2*a*(1-a),i)};for(var z=new w,F=1.9011074535173003,W=i.s.supportsTypedArrays()?new Float32Array(8):[],L=i.s.supportsTypedArrays()?new Float32Array(8):[],k=i.s.supportsTypedArrays()?new Float32Array(8):[],Y=i.s.supportsTypedArrays()?new Float32Array(8):[],B=0;B<7;++B){var G=B+1,Z=2*G+1;W[B]=1/(G*Z),L[B]=G/Z}function V(e,t,n){r.o.defined("array",e),r.o.defined("itemToFind",t),r.o.defined("comparator",n);for(var o,a,i=0,s=e.length-1;i<=s;)if((a=n(e[o=~~((i+s)/2)],t))<0)i=o+1;else{if(!(a>0))return o;s=o-1}return~(s+1)}function J(e,t,n,r,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=r,this.ut1MinusUtc=o}function X(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,n=0,r=t[n++],o=function(e,t,n,r){n||(n=" ");var o=e.length>=t?"":Array(1+t-e.length>>>0).join(n);return r?e+o:o+e},a=function(e,t,n,r,a,i){var s=r-e.length;return s>0&&(e=n||!a?o(e,r,i,n):e.slice(0,t.length)+o("",s,"0",!0)+e.slice(t.length)),e},i=function(e,t,n,r,i,s,u){var l=e>>>0;return e=(n=n&&l&&{2:"0b",8:"0",16:"0x"}[t]||"")+o(l.toString(t),s||0,"0",!1),a(e,n,r,i,u)},s=function(e,t,n,r,o,i){return null!=r&&(e=e.slice(0,r)),a(e,"",t,n,o,i)},u=function(e,r,u,l,c,f,d){var p,y,h,m,w;if("%%"==e)return"%";for(var O=!1,b="",x=!1,E=!1,_=" ",v=u.length,T=0;u&&T<v;T++)switch(u.charAt(T)){case" ":b=" ";break;case"+":b="+";break;case"-":O=!0;break;case"'":_=u.charAt(T+1);break;case"0":x=!0;break;case"#":E=!0}if((l=l?"*"==l?+t[n++]:"*"==l.charAt(0)?+t[l.slice(1,-1)]:+l:0)<0&&(l=-l,O=!0),!isFinite(l))throw new Error("sprintf: (minimum-)width must be finite");switch(f=f?"*"==f?+t[n++]:"*"==f.charAt(0)?+t[f.slice(1,-1)]:+f:"fFeE".indexOf(d)>-1?6:"d"==d?0:void 0,w=r?t[r.slice(0,-1)]:t[n++],d){case"s":return s(String(w),O,l,f,x,_);case"c":return s(String.fromCharCode(+w),O,l,f,x);case"b":return i(w,2,E,O,l,f,x);case"o":return i(w,8,E,O,l,f,x);case"x":return i(w,16,E,O,l,f,x);case"X":return i(w,16,E,O,l,f,x).toUpperCase();case"u":return i(w,10,E,O,l,f,x);case"i":case"d":return p=+w||0,w=(y=(p=Math.round(p-p%1))<0?"-":b)+o(String(Math.abs(p)),f,"0",!1),a(w,y,O,l,x);case"e":case"E":case"f":case"F":case"g":case"G":return y=(p=+w)<0?"-":b,h=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],w=y+Math.abs(p)[h](f),a(w,y,O,l,x)[m]();default:return e}};return r.replace(e,u)}function $(e,t,n,r,o,a,i,s){this.year=e,this.month=t,this.day=n,this.hour=r,this.minute=o,this.second=a,this.millisecond=i,this.isLeapSecond=s}function H(e){if(null===e||isNaN(e))throw new r.t("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}function Q(e,t){this.julianDate=e,this.offset=t}W[7]=F/136,L[7]=8*F/17,w.fastSlerp=function(e,t,n,o){r.o.typeOf.object("start",e),r.o.typeOf.object("end",t),r.o.typeOf.number("t",n),r.o.typeOf.object("result",o);var a,i=w.dot(e,t);i>=0?a=1:(a=-1,i=-i);for(var s=i-1,u=1-n,l=n*n,c=u*u,f=7;f>=0;--f)k[f]=(W[f]*l-L[f])*s,Y[f]=(W[f]*c-L[f])*s;var d=a*n*(1+k[0]*(1+k[1]*(1+k[2]*(1+k[3]*(1+k[4]*(1+k[5]*(1+k[6]*(1+k[7])))))))),p=u*(1+Y[0]*(1+Y[1]*(1+Y[2]*(1+Y[3]*(1+Y[4]*(1+Y[5]*(1+Y[6]*(1+Y[7])))))))),y=w.multiplyByScalar(e,p,z);return w.multiplyByScalar(t,d,o),w.add(y,o,o)},w.fastSquad=function(e,t,n,o,a,i){r.o.typeOf.object("q0",e),r.o.typeOf.object("q1",t),r.o.typeOf.object("s0",n),r.o.typeOf.object("s1",o),r.o.typeOf.number("t",a),r.o.typeOf.object("result",i);var s=w.fastSlerp(e,t,a,q),u=w.fastSlerp(n,o,a,U);return w.fastSlerp(s,u,2*a*(1-a),i)},w.equals=function(e,t){return e===t||o.e(e)&&o.e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},w.equalsEpsilon=function(e,t,n){return r.o.typeOf.number("epsilon",n),e===t||o.e(e)&&o.e(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n},w.ZERO=Object.freeze(new w(0,0,0,0)),w.IDENTITY=Object.freeze(new w(0,0,0,1)),w.prototype.clone=function(e){return w.clone(this,e)},w.prototype.equals=function(e){return w.equals(this,e)},w.prototype.equalsEpsilon=function(e,t){return w.equalsEpsilon(this,e,t)},w.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var K=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}),ee=Object.freeze({UTC:0,TAI:1}),te=new $,ne=[31,28,31,30,31,30,31,31,30,31,30,31];function re(e,t){return be.compare(e.julianDate,t.julianDate)}var oe=new Q;function ae(e){oe.julianDate=e;var t=be.leapSeconds,n=V(t,oe,re);n<0&&(n=~n),n>=t.length&&(n=t.length-1);var r=t[n].offset;n>0&&(be.secondsDifference(t[n].julianDate,e)>r&&(r=t[--n].offset));be.addSeconds(e,r,e)}function ie(e,t){oe.julianDate=e;var n=be.leapSeconds,r=V(n,oe,re);if(r<0&&(r=~r),0===r)return be.addSeconds(e,-n[0].offset,t);if(r>=n.length)return be.addSeconds(e,-n[r-1].offset,t);var o=be.secondsDifference(n[r].julianDate,e);return 0===o?be.addSeconds(e,-n[r].offset,t):o<=1?void 0:be.addSeconds(e,-n[--r].offset,t)}function se(e,t,n){var r=t/K.SECONDS_PER_DAY|0;return e+=r,(t-=K.SECONDS_PER_DAY*r)<0&&(e--,t+=K.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function ue(e,t,n,r,o,a,i){var s=(t-14)/12|0,u=e+4800+s,l=(1461*u/4|0)+(367*(t-2-12*s)/12|0)-(3*((u+100)/100|0)/4|0)+n-32075;(r-=12)<0&&(r+=24);var c=a+(r*K.SECONDS_PER_HOUR+o*K.SECONDS_PER_MINUTE+i*K.SECONDS_PER_MILLISECOND);return c>=43200&&(l-=1),[l,c]}var le=/^(\d{4})$/,ce=/^(\d{4})-(\d{2})$/,fe=/^(\d{4})-?(\d{3})$/,de=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,pe=/^(\d{4})-?(\d{2})-?(\d{2})$/,ye=/([Z+\-])?(\d{2})?:?(\d{2})?$/,he=/^(\d{2})(\.\d+)?/.source+ye.source,me=/^(\d{2}):?(\d{2})(\.\d+)?/.source+ye.source,we=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+ye.source,Oe="Invalid ISO 8601 date.";function be(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=o.u(e,0),t=o.u(t,0),n=o.u(n,ee.UTC);var r=0|e;se(r,t+=(e-r)*K.SECONDS_PER_DAY,this),n===ee.UTC&&ae(this)}be.fromGregorianDate=function(e,t){if(!(e instanceof $))throw new r.t("date must be a valid GregorianDate.");var n=ue(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return o.e(t)?(se(n[0],n[1],t),ae(t),t):new be(n[0],n[1],ee.UTC)},be.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new r.t("date must be a valid JavaScript Date.");var n=ue(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return o.e(t)?(se(n[0],n[1],t),ae(t),t):new be(n[0],n[1],ee.UTC)},be.fromIso8601=function(e,t){if("string"!=typeof e)throw new r.t(Oe);var n,a,i,s,u,l=(e=e.replace(",",".")).split("T"),c=1,f=1,d=0,p=0,y=0,h=0,m=l[0],w=l[1];if(!o.e(m))throw new r.t(Oe);if(null!==(l=m.match(pe))){if((s=m.split("-").length-1)>0&&2!==s)throw new r.t(Oe);n=+l[1],c=+l[2],f=+l[3]}else if(null!==(l=m.match(ce)))n=+l[1],c=+l[2];else if(null!==(l=m.match(le)))n=+l[1];else{var O;if(null!==(l=m.match(fe))){if(n=+l[1],O=+l[2],i=H(n),O<1||i&&O>366||!i&&O>365)throw new r.t(Oe)}else{if(null===(l=m.match(de)))throw new r.t(Oe);n=+l[1];var b=+l[2],x=+l[3]||0;if((s=m.split("-").length-1)>0&&(!o.e(l[3])&&1!==s||o.e(l[3])&&2!==s))throw new r.t(Oe);O=7*b+x-new Date(Date.UTC(n,0,4)).getUTCDay()-3}(a=new Date(Date.UTC(n,0,1))).setUTCDate(O),c=a.getUTCMonth()+1,f=a.getUTCDate()}if(i=H(n),c<1||c>12||f<1||(2!==c||!i)&&f>ne[c-1]||i&&2===c&&f>29)throw new r.t(Oe);if(o.e(w)){if(null!==(l=w.match(we))){if((s=w.split(":").length-1)>0&&2!==s&&3!==s)throw new r.t(Oe);d=+l[1],p=+l[2],y=+l[3],h=1e3*+(l[4]||0),u=5}else if(null!==(l=w.match(me))){if((s=w.split(":").length-1)>2)throw new r.t(Oe);d=+l[1],p=+l[2],y=60*+(l[3]||0),u=4}else{if(null===(l=w.match(he)))throw new r.t(Oe);d=+l[1],p=60*+(l[2]||0),u=3}if(p>=60||y>=61||d>24||24===d&&(p>0||y>0||h>0))throw new r.t(Oe);var E=l[u],_=+l[u+1],v=+(l[u+2]||0);switch(E){case"+":d-=_,p-=v;break;case"-":d+=_,p+=v;break;case"Z":break;default:p+=new Date(Date.UTC(n,c-1,f,d,p)).getTimezoneOffset()}}var T=60===y;for(T&&y--;p>=60;)p-=60,d++;for(;d>=24;)d-=24,f++;for(a=i&&2===c?29:ne[c-1];f>a;)f-=a,++c>12&&(c-=12,n++),a=i&&2===c?29:ne[c-1];for(;p<0;)p+=60,d--;for(;d<0;)d+=24,f--;for(;f<1;)--c<1&&(c+=12,n--),f+=a=i&&2===c?29:ne[c-1];var S=ue(n,c,f,d,p,y,h);return o.e(t)?(se(S[0],S[1],t),ae(t)):t=new be(S[0],S[1],ee.UTC),T&&be.addSeconds(t,1,t),t},be.now=function(e){return be.fromDate(new Date,e)};var xe=new be(0,0,ee.TAI);function Ee(e){if(e=o.u(e,o.u.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=o.u(e.addNewLeapSeconds,!0),o.e(e.data))ve(this,e.data);else if(o.e(e.url)){var t=c.t.createIfNeeded(e.url),n=this;this._downloadPromise=o.o(t.fetchJson(),(function(e){ve(n,e)}),(function(){n._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else ve(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function _e(e,t){return be.compare(e.julianDate,t)}function ve(e,t){if(o.e(t.columnNames))if(o.e(t.samples)){var n=t.columnNames.indexOf("modifiedJulianDateUtc"),r=t.columnNames.indexOf("xPoleWanderRadians"),a=t.columnNames.indexOf("yPoleWanderRadians"),i=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||r<0||a<0||i<0||s<0||u<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var c=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=r,e._yPoleWanderRadiansColumn=a,e._ut1MinusUtcSecondsColumn=i,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var d,p=e._addNewLeapSeconds,y=0,h=c.length;y<h;y+=e._columnCount){var m=c[y+n],w=c[y+l],O=new be(m+K.MODIFIED_JULIAN_DATE_DIFFERENCE,w,ee.TAI);if(f.push(O),p){if(w!==d&&o.e(d)){var b=be.leapSeconds,x=V(b,O,_e);if(x<0){var E=new Q(O,w);b.splice(~x,0,E)}}d=w}}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function Te(e,t,n,r,o){var a=n*r;o.xPoleWander=t[a+e._xPoleWanderRadiansColumn],o.yPoleWander=t[a+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[a+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[a+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[a+e._ut1MinusUtcSecondsColumn]}function Se(e,t,n){return t+e*(n-t)}function ge(e,t,n,r,o,a,i){var s=e._columnCount;if(a>t.length-1)return i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0,i;var u=t[o],l=t[a];if(u.equals(l)||r.equals(u))return Te(e,n,o,s,i),i;if(r.equals(l))return Te(e,n,a,s,i),i;var c=be.secondsDifference(r,u)/be.secondsDifference(l,u),f=o*s,d=a*s,p=n[f+e._ut1MinusUtcSecondsColumn],y=n[d+e._ut1MinusUtcSecondsColumn],h=y-p;if(h>.5||h<-.5){var m=n[f+e._taiMinusUtcSecondsColumn],w=n[d+e._taiMinusUtcSecondsColumn];m!==w&&(l.equals(r)?p=y:y-=w-m)}return i.xPoleWander=Se(c,n[f+e._xPoleWanderRadiansColumn],n[d+e._xPoleWanderRadiansColumn]),i.yPoleWander=Se(c,n[f+e._yPoleWanderRadiansColumn],n[d+e._yPoleWanderRadiansColumn]),i.xPoleOffset=Se(c,n[f+e._xCelestialPoleOffsetRadiansColumn],n[d+e._xCelestialPoleOffsetRadiansColumn]),i.yPoleOffset=Se(c,n[f+e._yCelestialPoleOffsetRadiansColumn],n[d+e._yCelestialPoleOffsetRadiansColumn]),i.ut1MinusUtc=Se(c,p,y),i}function De(e,t,n){this.heading=o.u(e,0),this.pitch=o.u(t,0),this.roll=o.u(n,0)}function Pe(e,t,n){this.x=e,this.y=t,this.s=n}function Ne(e){e=o.u(e,o.u.EMPTY_OBJECT),this._xysFileUrlTemplate=c.t.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=o.u(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=o.u(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new be(this._sampleZeroJulianEphemerisDate,0,ee.TAI),this._stepSizeDays=o.u(e.stepSizeDays,1),this._samplesPerXysFile=o.u(e.samplesPerXysFile,1e3),this._totalSamples=o.u(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,n=this._denominators=new Array(t+1),r=this._xTable=new Array(t+1),a=Math.pow(this._stepSizeDays,t),i=0;i<=t;++i){n[i]=a,r[i]=i*this._stepSizeDays;for(var s=0;s<=t;++s)s!==i&&(n[i]*=i-s);n[i]=1/n[i]}this._work=new Array(t+1),this._coef=new Array(t+1)}be.toGregorianDate=function(e,t){if(!o.e(e))throw new r.t("julianDate is required.");var n=!1,a=ie(e,xe);o.e(a)||(be.addSeconds(e,-1,xe),a=ie(xe,xe),n=!0);var i=a.dayNumber,s=a.secondsOfDay;s>=43200&&(i+=1);var u=i+68569|0,l=4*u/146097|0,c=4e3*((u=u-((146097*l+3)/4|0)|0)+1)/1461001|0,f=80*(u=u-(1461*c/4|0)+31|0)/2447|0,d=u-(2447*f/80|0)|0,p=f+2-12*(u=f/11|0)|0,y=100*(l-49)+c+u|0,h=s/K.SECONDS_PER_HOUR|0,m=s-h*K.SECONDS_PER_HOUR,w=m/K.SECONDS_PER_MINUTE|0,O=0|(m-=w*K.SECONDS_PER_MINUTE),b=(m-O)/K.SECONDS_PER_MILLISECOND;return(h+=12)>23&&(h-=24),n&&(O+=1),o.e(t)?(t.year=y,t.month=p,t.day=d,t.hour=h,t.minute=w,t.second=O,t.millisecond=b,t.isLeapSecond=n,t):new $(y,p,d,h,w,O,b,n)},be.toDate=function(e){if(!o.e(e))throw new r.t("julianDate is required.");var t=be.toGregorianDate(e,te),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))},be.toIso8601=function(e,t){if(!o.e(e))throw new r.t("julianDate is required.");var n=be.toGregorianDate(e,te),a=n.year,i=n.month,s=n.day,u=n.hour,l=n.minute,c=n.second,f=n.millisecond;return 1e4===a&&1===i&&1===s&&0===u&&0===l&&0===c&&0===f&&(a=9999,i=12,s=31,u=24),o.e(t)||0===f?o.e(t)&&0!==t?X("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",a,i,s,u,l,c,(.01*f).toFixed(t).replace(".","").slice(0,t)):X("%04d-%02d-%02dT%02d:%02d:%02dZ",a,i,s,u,l,c):X("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",a,i,s,u,l,c,(.01*f).toString().replace(".",""))},be.clone=function(e,t){if(o.e(e))return o.e(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new be(e.dayNumber,e.secondsOfDay,ee.TAI)},be.compare=function(e,t){if(!o.e(e))throw new r.t("left is required.");if(!o.e(t))throw new r.t("right is required.");var n=e.dayNumber-t.dayNumber;return 0!==n?n:e.secondsOfDay-t.secondsOfDay},be.equals=function(e,t){return e===t||o.e(e)&&o.e(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},be.equalsEpsilon=function(e,t,n){if(!o.e(n))throw new r.t("epsilon is required.");return e===t||o.e(e)&&o.e(t)&&Math.abs(be.secondsDifference(e,t))<=n},be.totalDays=function(e){if(!o.e(e))throw new r.t("julianDate is required.");return e.dayNumber+e.secondsOfDay/K.SECONDS_PER_DAY},be.secondsDifference=function(e,t){if(!o.e(e))throw new r.t("left is required.");if(!o.e(t))throw new r.t("right is required.");return(e.dayNumber-t.dayNumber)*K.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},be.daysDifference=function(e,t){if(!o.e(e))throw new r.t("left is required.");if(!o.e(t))throw new r.t("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/K.SECONDS_PER_DAY},be.computeTaiMinusUtc=function(e){oe.julianDate=e;var t=be.leapSeconds,n=V(t,oe,re);return n<0&&(n=~n,--n<0&&(n=0)),t[n].offset},be.addSeconds=function(e,t,n){if(!o.e(e))throw new r.t("julianDate is required.");if(!o.e(t))throw new r.t("seconds is required.");if(!o.e(n))throw new r.t("result is required.");return se(e.dayNumber,e.secondsOfDay+t,n)},be.addMinutes=function(e,t,n){if(!o.e(e))throw new r.t("julianDate is required.");if(!o.e(t))throw new r.t("minutes is required.");if(!o.e(n))throw new r.t("result is required.");var a=e.secondsOfDay+t*K.SECONDS_PER_MINUTE;return se(e.dayNumber,a,n)},be.addHours=function(e,t,n){if(!o.e(e))throw new r.t("julianDate is required.");if(!o.e(t))throw new r.t("hours is required.");if(!o.e(n))throw new r.t("result is required.");var a=e.secondsOfDay+t*K.SECONDS_PER_HOUR;return se(e.dayNumber,a,n)},be.addDays=function(e,t,n){if(!o.e(e))throw new r.t("julianDate is required.");if(!o.e(t))throw new r.t("days is required.");if(!o.e(n))throw new r.t("result is required.");return se(e.dayNumber+t,e.secondsOfDay,n)},be.lessThan=function(e,t){return be.compare(e,t)<0},be.lessThanOrEquals=function(e,t){return be.compare(e,t)<=0},be.greaterThan=function(e,t){return be.compare(e,t)>0},be.greaterThanOrEquals=function(e,t){return be.compare(e,t)>=0},be.prototype.clone=function(e){return be.clone(this,e)},be.prototype.equals=function(e){return be.equals(this,e)},be.prototype.equalsEpsilon=function(e,t){return be.equalsEpsilon(this,e,t)},be.prototype.toString=function(){return be.toIso8601(this)},be.leapSeconds=[new Q(new be(2441317,43210,ee.TAI),10),new Q(new be(2441499,43211,ee.TAI),11),new Q(new be(2441683,43212,ee.TAI),12),new Q(new be(2442048,43213,ee.TAI),13),new Q(new be(2442413,43214,ee.TAI),14),new Q(new be(2442778,43215,ee.TAI),15),new Q(new be(2443144,43216,ee.TAI),16),new Q(new be(2443509,43217,ee.TAI),17),new Q(new be(2443874,43218,ee.TAI),18),new Q(new be(2444239,43219,ee.TAI),19),new Q(new be(2444786,43220,ee.TAI),20),new Q(new be(2445151,43221,ee.TAI),21),new Q(new be(2445516,43222,ee.TAI),22),new Q(new be(2446247,43223,ee.TAI),23),new Q(new be(2447161,43224,ee.TAI),24),new Q(new be(2447892,43225,ee.TAI),25),new Q(new be(2448257,43226,ee.TAI),26),new Q(new be(2448804,43227,ee.TAI),27),new Q(new be(2449169,43228,ee.TAI),28),new Q(new be(2449534,43229,ee.TAI),29),new Q(new be(2450083,43230,ee.TAI),30),new Q(new be(2450630,43231,ee.TAI),31),new Q(new be(2451179,43232,ee.TAI),32),new Q(new be(2453736,43233,ee.TAI),33),new Q(new be(2454832,43234,ee.TAI),34),new Q(new be(2456109,43235,ee.TAI),35),new Q(new be(2457204,43236,ee.TAI),36),new Q(new be(2457754,43237,ee.TAI),37)],Ee.NONE=Object.freeze({getPromiseToLoad:function(){return o.o()},compute:function(e,t){return o.e(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new J(0,0,0,0,0),t}}),Ee.prototype.getPromiseToLoad=function(){return o.o(this._downloadPromise)},Ee.prototype.compute=function(e,t){if(o.e(this._samples)){if(o.e(t)||(t=new J(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;var n=this._dates,r=this._lastIndex,a=0,i=0;if(o.e(r)){var s=n[r],u=n[r+1],l=be.lessThanOrEquals(s,e),c=!o.e(u),d=c||be.greaterThanOrEquals(u,e);if(l&&d)return a=r,!c&&u.equals(e)&&++a,i=a+1,ge(this,n,this._samples,e,a,i,t),t}var p=V(n,e,be.compare,this._dateColumn);return p>=0?(p<n.length-1&&n[p+1].equals(e)&&++p,a=p,i=p):(a=(i=~p)-1)<0&&(a=0),this._lastIndex=a,ge(this,n,this._samples,e,a,i,t),t}if(o.e(this._dataError))throw new f.t(this._dataError)},De.fromQuaternion=function(e,t){if(!o.e(e))throw new r.t("quaternion is required");o.e(t)||(t=new De);var n=2*(e.w*e.y-e.z*e.x),a=1-2*(e.x*e.x+e.y*e.y),i=2*(e.w*e.x+e.y*e.z),u=1-2*(e.y*e.y+e.z*e.z),l=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(l,u),t.roll=Math.atan2(i,a),t.pitch=-s.e.asinClamped(n),t},De.fromDegrees=function(e,t,n,a){if(!o.e(e))throw new r.t("heading is required");if(!o.e(t))throw new r.t("pitch is required");if(!o.e(n))throw new r.t("roll is required");return o.e(a)||(a=new De),a.heading=e*s.e.RADIANS_PER_DEGREE,a.pitch=t*s.e.RADIANS_PER_DEGREE,a.roll=n*s.e.RADIANS_PER_DEGREE,a},De.clone=function(e,t){if(o.e(e))return o.e(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new De(e.heading,e.pitch,e.roll)},De.equals=function(e,t){return e===t||o.e(e)&&o.e(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},De.equalsEpsilon=function(e,t,n,r){return e===t||o.e(e)&&o.e(t)&&s.e.equalsEpsilon(e.heading,t.heading,n,r)&&s.e.equalsEpsilon(e.pitch,t.pitch,n,r)&&s.e.equalsEpsilon(e.roll,t.roll,n,r)},De.prototype.clone=function(e){return De.clone(this,e)},De.prototype.equals=function(e){return De.equals(this,e)},De.prototype.equalsEpsilon=function(e,t,n){return De.equalsEpsilon(this,e,t,n)},De.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var Ce=new be(0,0,ee.TAI);function Ie(e,t,n){var r=Ce;return r.dayNumber=t,r.secondsOfDay=n,be.daysDifference(r,e._sampleZeroDateTT)}function je(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var n=o.o.defer();e._chunkDownloadsInProgress[t]=n;var r,a=e._xysFileUrlTemplate;return r=o.e(a)?a.getDerivedResource({templateValues:{0:t}}):new c.t({url:c.n("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")}),o.o(r.fetchJson(),(function(r){e._chunkDownloadsInProgress[t]=!1;for(var o=e._samples,a=r.samples,i=t*e._samplesPerXysFile*3,s=0,u=a.length;s<u;++s)o[i+s]=a[s];n.resolve()})),n.promise}Ne.prototype.preload=function(e,t,n,r){var a=Ie(this,e,t),i=Ie(this,n,r),s=a/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);var u=i/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);for(var l=s/this._samplesPerXysFile|0,c=u/this._samplesPerXysFile|0,f=[],d=l;d<=c;++d)f.push(je(this,d));return o.o.all(f)},Ne.prototype.computeXysRadians=function(e,t,n){var r=Ie(this,e,t);if(!(r<0)){var a=r/this._stepSizeDays|0;if(!(a>=this._totalSamples)){var i=this._interpolationOrder,s=a-(i/2|0);s<0&&(s=0);var u=s+i;u>=this._totalSamples&&((s=(u=this._totalSamples-1)-i)<0&&(s=0));var l=!1,c=this._samples;if(o.e(c[3*s])||(je(this,s/this._samplesPerXysFile|0),l=!0),o.e(c[3*u])||(je(this,u/this._samplesPerXysFile|0),l=!0),!l){o.e(n)?(n.x=0,n.y=0,n.s=0):n=new Pe(0,0,0);var f,d,p=r-s*this._stepSizeDays,y=this._work,h=this._denominators,m=this._coef,w=this._xTable;for(f=0;f<=i;++f)y[f]=p-w[f];for(f=0;f<=i;++f){for(m[f]=1,d=0;d<=i;++d)d!==f&&(m[f]*=y[d]);m[f]*=h[f];var O=3*(s+f);n.x+=m[f]*c[O++],n.y+=m[f]*c[O++],n.s+=m[f]*c[O]}return n}}}};var Re={},Me={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"}},Ae={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},qe={},Ue={east:new n.t,north:new n.t,up:new n.t,west:new n.t,south:new n.t,down:new n.t},ze=new n.t,Fe=new n.t,We=new n.t;Re.localFrameToFixedFrameGenerator=function(e,t){if(!Me.hasOwnProperty(e)||!Me[e].hasOwnProperty(t))throw new r.t("firstAxis and secondAxis must be east, north, up, west, south or down.");var i,l=Me[e][t],c=e+t;return o.e(qe[c])?i=qe[c]:(i=function(i,c,f){if(!o.e(i))throw new r.t("origin is required.");if(o.e(f)||(f=new a.y),n.t.equalsEpsilon(i,n.t.ZERO,s.e.EPSILON14))n.t.unpack(Ae[e],0,ze),n.t.unpack(Ae[t],0,Fe),n.t.unpack(Ae[l],0,We);else if(s.e.equalsEpsilon(i.x,0,s.e.EPSILON14)&&s.e.equalsEpsilon(i.y,0,s.e.EPSILON14)){var d=s.e.sign(i.z);n.t.unpack(Ae[e],0,ze),"east"!==e&&"west"!==e&&n.t.multiplyByScalar(ze,d,ze),n.t.unpack(Ae[t],0,Fe),"east"!==t&&"west"!==t&&n.t.multiplyByScalar(Fe,d,Fe),n.t.unpack(Ae[l],0,We),"east"!==l&&"west"!==l&&n.t.multiplyByScalar(We,d,We)}else{(c=o.u(c,u.t.WGS84)).geodeticSurfaceNormal(i,Ue.up);var p=Ue.up,y=Ue.east;y.x=-i.y,y.y=i.x,y.z=0,n.t.normalize(y,Ue.east),n.t.cross(p,y,Ue.north),n.t.multiplyByScalar(Ue.up,-1,Ue.down),n.t.multiplyByScalar(Ue.east,-1,Ue.west),n.t.multiplyByScalar(Ue.north,-1,Ue.south),ze=Ue[e],Fe=Ue[t],We=Ue[l]}return f[0]=ze.x,f[1]=ze.y,f[2]=ze.z,f[3]=0,f[4]=Fe.x,f[5]=Fe.y,f[6]=Fe.z,f[7]=0,f[8]=We.x,f[9]=We.y,f[10]=We.z,f[11]=0,f[12]=i.x,f[13]=i.y,f[14]=i.z,f[15]=1,f},qe[c]=i),i},Re.eastNorthUpToFixedFrame=Re.localFrameToFixedFrameGenerator("east","north"),Re.northEastDownToFixedFrame=Re.localFrameToFixedFrameGenerator("north","east"),Re.northUpEastToFixedFrame=Re.localFrameToFixedFrameGenerator("north","up"),Re.northWestUpToFixedFrame=Re.localFrameToFixedFrameGenerator("north","west");var Le=new w,ke=new n.t(1,1,1),Ye=new a.y;Re.headingPitchRollToFixedFrame=function(e,t,i,s,u){r.o.typeOf.object("HeadingPitchRoll",t),s=o.u(s,Re.eastNorthUpToFixedFrame);var l=w.fromHeadingPitchRoll(t,Le),c=a.y.fromTranslationQuaternionRotationScale(n.t.ZERO,l,ke,Ye);return u=s(e,i,u),a.y.multiply(u,c,u)};var Be=new a.y,Ge=new a.p;Re.headingPitchRollQuaternion=function(e,t,n,o,i){r.o.typeOf.object("HeadingPitchRoll",t);var s=Re.headingPitchRollToFixedFrame(e,t,n,o,Be),u=a.y.getMatrix3(s,Ge);return w.fromRotationMatrix(u,i)};var Ze=new n.t(1,1,1),Ve=new n.t,Je=new a.y,Xe=new a.y,$e=new a.p,He=new w;Re.fixedFrameToHeadingPitchRoll=function(e,t,i,s){r.o.defined("transform",e),t=o.u(t,u.t.WGS84),i=o.u(i,Re.eastNorthUpToFixedFrame),o.e(s)||(s=new De);var l=a.y.getTranslation(e,Ve);if(n.t.equals(l,n.t.ZERO))return s.heading=0,s.pitch=0,s.roll=0,s;var c=a.y.inverseTransformation(i(l,t,Je),Je),f=a.y.setScale(e,Ze,Xe);f=a.y.setTranslation(f,n.t.ZERO,f),c=a.y.multiply(c,f,c);var d=w.fromRotationMatrix(a.y.getMatrix3(c,$e),He);return d=w.normalize(d,d),De.fromQuaternion(d,s)};var Qe=s.e.TWO_PI/86400,Ke=new be;Re.computeTemeToPseudoFixedMatrix=function(e,t){if(!o.e(e))throw new r.t("date is required.");var n,i=(Ke=be.addSeconds(e,-be.computeTaiMinusUtc(e),Ke)).dayNumber,u=Ke.secondsOfDay,l=i-2451545,c=(24110.54841+(n=u>=43200?(l+.5)/K.DAYS_PER_JULIAN_CENTURY:(l-.5)/K.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+n*(.093104+-62e-7*n)))*Qe%s.e.TWO_PI+(72921158553e-15+11772758384668e-32*(i-2451545.5))*((u+.5*K.SECONDS_PER_DAY)%K.SECONDS_PER_DAY),f=Math.cos(c),d=Math.sin(c);return o.e(t)?(t[0]=f,t[1]=-d,t[2]=0,t[3]=d,t[4]=f,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new a.p(f,d,0,-d,f,0,0,0,1)},Re.iau2006XysData=new Ne,Re.earthOrientationParameters=Ee.NONE;var et=32.184;Re.preloadIcrfFixed=function(e){var t=e.start.dayNumber,n=e.start.secondsOfDay+et,r=e.stop.dayNumber,a=e.stop.secondsOfDay+et,i=Re.iau2006XysData.preload(t,n,r,a),s=Re.earthOrientationParameters.getPromiseToLoad();return o.o.all([i,s])},Re.computeIcrfToFixedMatrix=function(e,t){if(!o.e(e))throw new r.t("date is required.");o.e(t)||(t=new a.p);var n=Re.computeFixedToIcrfMatrix(e,t);if(o.e(n))return a.p.transpose(n,t)};var tt=new Pe(0,0,0),nt=new J(0,0,0,0,0,0),rt=new a.p,ot=new a.p;Re.computeFixedToIcrfMatrix=function(e,t){if(!o.e(e))throw new r.t("date is required.");o.e(t)||(t=new a.p);var n=Re.earthOrientationParameters.compute(e,nt);if(o.e(n)){var i=e.dayNumber,u=e.secondsOfDay+et,l=Re.iau2006XysData.computeXysRadians(i,u,tt);if(o.e(l)){var c=l.x+n.xPoleOffset,f=l.y+n.yPoleOffset,d=1/(1+Math.sqrt(1-c*c-f*f)),p=rt;p[0]=1-d*c*c,p[3]=-d*c*f,p[6]=c,p[1]=-d*c*f,p[4]=1-d*f*f,p[7]=f,p[2]=-c,p[5]=-f,p[8]=1-d*(c*c+f*f);var y=a.p.fromRotationZ(-l.s,ot),h=a.p.multiply(p,y,rt),m=e.dayNumber-2451545,w=(e.secondsOfDay-be.computeTaiMinusUtc(e)+n.ut1MinusUtc)/K.SECONDS_PER_DAY,O=.779057273264+w+.00273781191135448*(m+w);O=O%1*s.e.TWO_PI;var b=a.p.fromRotationZ(O,ot),x=a.p.multiply(h,b,rt),E=Math.cos(n.xPoleWander),_=Math.cos(n.yPoleWander),v=Math.sin(n.xPoleWander),T=Math.sin(n.yPoleWander),S=i-2451545+u/K.SECONDS_PER_DAY,g=-47e-6*(S/=36525)*s.e.RADIANS_PER_DEGREE/3600,D=Math.cos(g),P=Math.sin(g),N=ot;return N[0]=E*D,N[1]=E*P,N[2]=v,N[3]=-_*P+T*v*D,N[4]=_*D+T*v*P,N[5]=-T*E,N[6]=-T*P-_*v*D,N[7]=T*D-_*v*P,N[8]=_*E,a.p.multiply(x,N,t)}}};var at=new l.e;Re.pointToWindowCoordinates=function(e,t,n,r){return(r=Re.pointToGLWindowCoordinates(e,t,n,r)).y=2*t[5]-r.y,r},Re.pointToGLWindowCoordinates=function(e,n,i,s){if(!o.e(e))throw new r.t("modelViewProjectionMatrix is required.");if(!o.e(n))throw new r.t("viewportTransformation is required.");if(!o.e(i))throw new r.t("point is required.");o.e(s)||(s=new t.o);var u=at;return a.y.multiplyByVector(e,l.e.fromElements(i.x,i.y,i.z,1,u),u),l.e.multiplyByScalar(u,1/u.w,u),a.y.multiplyByVector(n,u,u),t.o.fromCartesian4(u,s)};var it=new n.t,st=new n.t,ut=new n.t;Re.rotationMatrixFromPositionVelocity=function(e,t,i,l){if(!o.e(e))throw new r.t("position is required.");if(!o.e(t))throw new r.t("velocity is required.");var c=o.u(i,u.t.WGS84).geodeticSurfaceNormal(e,it),f=n.t.cross(t,c,st);n.t.equalsEpsilon(f,n.t.ZERO,s.e.EPSILON6)&&(f=n.t.clone(n.t.UNIT_X,f));var d=n.t.cross(f,t,ut);return n.t.normalize(d,d),n.t.cross(t,d,f),n.t.negate(f,f),n.t.normalize(f,f),o.e(l)||(l=new a.p),l[0]=t.x,l[1]=t.y,l[2]=t.z,l[3]=f.x,l[4]=f.y,l[5]=f.z,l[6]=d.x,l[7]=d.y,l[8]=d.z,l};var lt=new a.y(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),ct=new n.t$1,ft=new n.t,dt=new n.t,pt=new a.p,yt=new a.y,ht=new a.y;function mt(e){e=o.u(e,o.u.EMPTY_OBJECT),r.o.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=o.u(e.primitiveType,a._0x29ba75.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=o.u(e.geometryType,p.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}Re.basisTo2D=function(e,t,i){if(!o.e(e))throw new r.t("projection is required.");if(!o.e(t))throw new r.t("matrix is required.");if(!o.e(i))throw new r.t("result is required.");var s=a.y.getTranslation(t,dt),u=e.ellipsoid,l=u.cartesianToCartographic(s,ct),c=e.project(l,ft);n.t.fromElements(c.z,c.x,c.y,c);var f=Re.eastNorthUpToFixedFrame(s,u,yt),d=a.y.inverseTransformation(f,ht),p=a.y.getMatrix3(t,pt),y=a.y.multiplyByMatrix3(d,p,i);return a.y.multiply(lt,y,i),a.y.setTranslation(i,c,i),i},Re.wgs84To2DModelMatrix=function(e,t,i){if(!o.e(e))throw new r.t("projection is required.");if(!o.e(t))throw new r.t("center is required.");if(!o.e(i))throw new r.t("result is required.");var s=e.ellipsoid,u=Re.eastNorthUpToFixedFrame(t,s,yt),l=a.y.inverseTransformation(u,ht),c=s.cartesianToCartographic(t,ct),f=e.project(c,ft);n.t.fromElements(f.z,f.x,f.y,f);var d=a.y.fromTranslation(f,yt);return a.y.multiply(lt,l,i),a.y.multiply(d,i,i),i},Re.buildUp=function(e,t){var r=t.clone(),o=e.clone();o=n.t.normalize(o,o),Math.abs(n.t.dot(o,r))>=1&&(o=Math.abs(n.t.dot(r,n.t.UNIT_Y))<1?n.t.clone(n.t.UNIT_Y,o):n.t.clone(n.t.UNIT_Z,o));var a=new n.t;return n.t.cross(o,r,a),a=n.t.normalize(a,a),n.t.cross(r,a,o),o=n.t.normalize(o,o)},Re.getHeading=function(e,t){var n;return n=s.e.equalsEpsilon(Math.abs(e.z),1,s.e.EPSILON3)?Math.atan2(t.y,t.x)-s.e.PI_OVER_TWO:Math.atan2(e.y,e.x)-s.e.PI_OVER_TWO,s.e.TWO_PI-s.e.zeroToTwoPi(n)},Re.convertToColumbusCartesian=function(e){var t=new d.n,r=t.ellipsoid,o=new n.t,a=new n.t$1;return r.cartesianToCartographic(e,a),t.project(a,o),n.t.fromElements(o.z,o.x,o.y)},Re.convertTo3DCartesian=function(e){var t=new d.n,r=t.ellipsoid,o=new n.t,a=new n.t$1;return o=n.t.fromElements(e.y,e.z,e.x),t.unproject(o,a),r.cartographicToCartesian(a,o)},mt.computeNumberOfVertices=function(e){r.o.typeOf.object("geometry",e);var t=-1;for(var n in e.attributes)if(e.attributes.hasOwnProperty(n)&&o.e(e.attributes[n])&&o.e(e.attributes[n].values)){var a=e.attributes[n];if(a.isInstanceAttribute)continue;var i=a.values.length/a.componentsPerAttribute;if(t!==i&&-1!==t)throw new r.t("All attribute lists must have the same number of attributes.");t=i}return t};var wt=new n.t$1,Ot=new n.t,bt=new a.y,xt=[new n.t$1,new n.t$1,new n.t$1],Et=[new t.o,new t.o,new t.o],_t=[new t.o,new t.o,new t.o],vt=new n.t,Tt=new w,St=new a.y,gt=new y;mt._textureCoordinateRotationPoints=function(e,r,o,i){var s,l=u.h.center(i,wt),c=n.t$1.toCartesian(l,o,Ot),f=Re.eastNorthUpToFixedFrame(c,o,bt),d=a.y.inverse(f,bt),p=Et,h=xt;h[0].longitude=i.west,h[0].latitude=i.south,h[1].longitude=i.west,h[1].latitude=i.north,h[2].longitude=i.east,h[2].latitude=i.south;var m=vt;for(s=0;s<3;s++)n.t$1.toCartesian(h[s],o,m),m=a.y.multiplyByPointAsVector(d,m,m),p[s].x=m.x,p[s].y=m.y;var O=w.fromAxisAngle(n.t.UNIT_Z,-r,Tt),b=a.p.fromQuaternion(O,St),x=e.length,E=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,T=Number.NEGATIVE_INFINITY;for(s=0;s<x;s++)m=a.y.multiplyByPointAsVector(d,e[s],m),m=a.p.multiplyByVector(b,m,m),E=Math.min(E,m.x),_=Math.min(_,m.y),v=Math.max(v,m.x),T=Math.max(T,m.y);var S=y.fromRotation(r,gt),g=_t;g[0].x=E,g[0].y=_,g[1].x=E,g[1].y=T,g[2].x=v,g[2].y=_;var D=p[0],P=p[2].x-D.x,N=p[1].y-D.y;for(s=0;s<3;s++){var C=g[s];y.multiplyByVector(S,C,C),C.x=(C.x-D.x)/P,C.y=(C.y-D.y)/N}var I=g[0],j=g[1],R=g[2],M=new Array(6);return t.o.pack(I,M),t.o.pack(j,M,2),t.o.pack(R,M,4),M},e.I=mt,e.Me=p,e.f=y,e.m=Re,e.n=w,e.o=function(e){if(e=o.u(e,o.u.EMPTY_OBJECT),!o.e(e.componentDatatype))throw new r.t("options.componentDatatype is required.");if(!o.e(e.componentsPerAttribute))throw new r.t("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new r.t("options.componentsPerAttribute must be between 1 and 4.");if(!o.e(e.values))throw new r.t("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=o.u(e.normalize,!1),this.values=e.values}}));
|