2 lines
44 KiB
JavaScript
2 lines
44 KiB
JavaScript
define(["exports","./Cartesian2-2b41fabe","./Cartographic-1d953166","./Check-2514d21d","./when-d186add7","./FeatureDetection-4281d393","./Math-7f5f2992","./Rectangle-f841217d","./Cartesian4-3408960c","./buildModuleUrl-d920237a","./RuntimeError-4a74cd1a"],(function(e,t,n,r,o,a,i,s,u,l,c){"use strict";var f=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function d(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)}d.packedLength=4,d.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},d.unpack=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new d),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},d.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 d(e[0],e[2],e[1],e[3])},d.fromArray=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new d),n[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},d.fromColumnMajorArray=function(e,t){return r.o.defined("values",e),d.clone(e,t)},d.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 d(e[0],e[1],e[2],e[3])},d.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 d(e.x,0,0,e.y)},d.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 d(e,0,0,e)},d.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 d(n,-a,a,n)},d.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]]},d.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},d.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},d.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=d.clone(e,o))[a]=n.x,o[a+1]=n.y,o},d.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},d.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=d.clone(e,o))[t]=n.x,o[t+2]=n.y,o};var p=new t.o;d.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],p)),n.y=t.o.magnitude(t.o.fromElements(e[2],e[3],p)),n};var y=new t.o;function h(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)}d.getMaximumScale=function(e){return d.getScale(e,y),t.o.maximumComponent(y)},d.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},d.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},d.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},d.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},d.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},d.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},d.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},d.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},d.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},d.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]},d.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]},d.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},d.IDENTITY=Object.freeze(new d(1,0,0,1)),d.ZERO=Object.freeze(new d(0,0,0,0)),d.COLUMN0ROW0=0,d.COLUMN0ROW1=1,d.COLUMN1ROW0=2,d.COLUMN1ROW1=3,Object.defineProperties(d.prototype,{length:{get:function(){return d.packedLength}}}),d.prototype.clone=function(e){return d.clone(this,e)},d.prototype.equals=function(e){return d.equals(this,e)},d.prototype.equalsEpsilon=function(e,t){return d.equalsEpsilon(this,e,t)},d.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var m=new n.t;h.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=(m=n.t.normalize(e,m)).x*s,l=m.y*s,c=m.z*s,f=Math.cos(i);return o.e(a)?(a.x=u,a.y=l,a.z=c,a.w=f,a):new h(u,l,c,f)};var w=[1,2,0],O=new Array(3);h.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 m=w[y],b=w[m];n=Math.sqrt(e[a.p.getElementIndex(y,y)]-e[a.p.getElementIndex(m,m)]-e[a.p.getElementIndex(b,b)]+1);var x=O;x[y]=.5*n,n=.5/n,l=(e[a.p.getElementIndex(b,m)]-e[a.p.getElementIndex(m,b)])*n,x[m]=(e[a.p.getElementIndex(m,y)]+e[a.p.getElementIndex(y,m)])*n,x[b]=(e[a.p.getElementIndex(b,y)]+e[a.p.getElementIndex(y,b)])*n,i=-x[0],s=-x[1],u=-x[2]}return o.e(t)?(t.x=i,t.y=s,t.z=u,t.w=l,t):new h(i,s,u,l)};var b=new h,x=new h,E=new h,_=new h;h.fromHeadingPitchRoll=function(e,t){return r.o.typeOf.object("headingPitchRoll",e),_=h.fromAxisAngle(n.t.UNIT_X,e.roll,b),E=h.fromAxisAngle(n.t.UNIT_Y,-e.pitch,t),t=h.multiply(E,_,E),x=h.fromAxisAngle(n.t.UNIT_Z,-e.heading,b),h.multiply(x,t,t)};var v=new n.t,T=new n.t,S=new h,g=new h,D=new h;h.packedLength=4,h.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},h.unpack=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new h),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},h.packedInterpolationLength=3,h.convertPackedArrayForInterpolation=function(e,t,n,r){h.unpack(e,4*n,D),h.conjugate(D,D);for(var o=0,a=n-t+1;o<a;o++){var i=3*o;h.unpack(e,4*(t+o),S),h.multiply(S,D,S),S.w<0&&h.negate(S,S),h.computeAxis(S,v);var s=h.computeAngle(S);r[i]=v.x*s,r[i+1]=v.y*s,r[i+2]=v.z*s}},h.unpackInterpolationResult=function(e,t,r,a,i){o.e(i)||(i=new h),n.t.fromArray(e,0,T);var s=n.t.magnitude(T);return h.unpack(t,4*a,g),0===s?h.clone(h.IDENTITY,S):h.fromAxisAngle(T,s,S),h.multiply(S,g,i)},h.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 h(e.x,e.y,e.z,e.w)},h.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},h.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},h.magnitude=function(e){return Math.sqrt(h.magnitudeSquared(e))},h.normalize=function(e,t){r.o.typeOf.object("result",t);var n=1/h.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},h.inverse=function(e,t){r.o.typeOf.object("result",t);var n=h.magnitudeSquared(e);return t=h.conjugate(e,t),h.multiplyByScalar(t,1/n,t)},h.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},h.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},h.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},h.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},h.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},h.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)},h.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},h.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},h.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)<i.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},h.computeAngle=function(e){return r.o.typeOf.object("quaternion",e),Math.abs(e.w-1)<i.e.EPSILON6?0:2*Math.acos(e.w)};var P=new h;h.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),P=h.multiplyByScalar(t,n,P),o=h.multiplyByScalar(e,1-n,o),h.add(P,o,o)};var N=new h,C=new h,I=new h;h.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=h.dot(e,t),s=t;if(a<0&&(a=-a,s=N=h.negate(t,N)),1-a<i.e.EPSILON6)return h.lerp(e,s,n,o);var u=Math.acos(a);return C=h.multiplyByScalar(e,Math.sin((1-n)*u),C),I=h.multiplyByScalar(s,Math.sin(n*u),I),o=h.add(C,I,o),h.multiplyByScalar(o,1/Math.sin(u),o)},h.log=function(e,t){r.o.typeOf.object("quaternion",e),r.o.typeOf.object("result",t);var o=i.e.acosClamped(e.w),a=0;return 0!==o&&(a=o/Math.sin(o)),n.t.multiplyByScalar(e,a,t)},h.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 j=new n.t,R=new n.t,M=new h,A=new h;h.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=h.conjugate(t,M);h.multiply(i,o,A);var s=h.log(A,j);h.multiply(i,e,A);var u=h.log(A,R);return n.t.add(s,u,s),n.t.multiplyByScalar(s,.25,s),n.t.negate(s,s),h.exp(s,M),h.multiply(t,M,a)},h.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=h.slerp(e,t,a,M),u=h.slerp(n,o,a,A);return h.slerp(s,u,2*a*(1-a),i)};for(var q=new h,U=1.9011074535173003,z=a.s.supportsTypedArrays()?new Float32Array(8):[],F=a.s.supportsTypedArrays()?new Float32Array(8):[],W=a.s.supportsTypedArrays()?new Float32Array(8):[],L=a.s.supportsTypedArrays()?new Float32Array(8):[],k=0;k<7;++k){var Y=k+1,B=2*Y+1;z[k]=1/(Y*B),F[k]=Y/B}function G(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 Z(e,t,n,r,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=r,this.ut1MinusUtc=o}function V(){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 J(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 X(e,t){this.julianDate=e,this.offset=t}z[7]=U/136,F[7]=8*U/17,h.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=h.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)W[f]=(z[f]*l-F[f])*s,L[f]=(z[f]*c-F[f])*s;var d=a*n*(1+W[0]*(1+W[1]*(1+W[2]*(1+W[3]*(1+W[4]*(1+W[5]*(1+W[6]*(1+W[7])))))))),p=u*(1+L[0]*(1+L[1]*(1+L[2]*(1+L[3]*(1+L[4]*(1+L[5]*(1+L[6]*(1+L[7])))))))),y=h.multiplyByScalar(e,p,q);return h.multiplyByScalar(t,d,o),h.add(y,o,o)},h.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=h.fastSlerp(e,t,a,M),u=h.fastSlerp(n,o,a,A);return h.fastSlerp(s,u,2*a*(1-a),i)},h.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},h.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},h.ZERO=Object.freeze(new h(0,0,0,0)),h.IDENTITY=Object.freeze(new h(0,0,0,1)),h.prototype.clone=function(e){return h.clone(this,e)},h.prototype.equals=function(e){return h.equals(this,e)},h.prototype.equalsEpsilon=function(e,t){return h.equalsEpsilon(this,e,t)},h.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var H=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}),Q=Object.freeze({UTC:0,TAI:1}),K=new $,ee=[31,28,31,30,31,30,31,31,30,31,30,31];function te(e,t){return we.compare(e.julianDate,t.julianDate)}var ne=new X;function re(e){ne.julianDate=e;var t=we.leapSeconds,n=G(t,ne,te);n<0&&(n=~n),n>=t.length&&(n=t.length-1);var r=t[n].offset;n>0&&(we.secondsDifference(t[n].julianDate,e)>r&&(r=t[--n].offset));we.addSeconds(e,r,e)}function oe(e,t){ne.julianDate=e;var n=we.leapSeconds,r=G(n,ne,te);if(r<0&&(r=~r),0===r)return we.addSeconds(e,-n[0].offset,t);if(r>=n.length)return we.addSeconds(e,-n[r-1].offset,t);var o=we.secondsDifference(n[r].julianDate,e);return 0===o?we.addSeconds(e,-n[r].offset,t):o<=1?void 0:we.addSeconds(e,-n[--r].offset,t)}function ae(e,t,n){var r=t/H.SECONDS_PER_DAY|0;return e+=r,(t-=H.SECONDS_PER_DAY*r)<0&&(e--,t+=H.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function ie(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*H.SECONDS_PER_HOUR+o*H.SECONDS_PER_MINUTE+i*H.SECONDS_PER_MILLISECOND);return c>=43200&&(l-=1),[l,c]}var se=/^(\d{4})$/,ue=/^(\d{4})-(\d{2})$/,le=/^(\d{4})-?(\d{3})$/,ce=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,fe=/^(\d{4})-?(\d{2})-?(\d{2})$/,de=/([Z+\-])?(\d{2})?:?(\d{2})?$/,pe=/^(\d{2})(\.\d+)?/.source+de.source,ye=/^(\d{2}):?(\d{2})(\.\d+)?/.source+de.source,he=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+de.source,me="Invalid ISO 8601 date.";function we(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,Q.UTC);var r=0|e;ae(r,t+=(e-r)*H.SECONDS_PER_DAY,this),n===Q.UTC&&re(this)}we.fromGregorianDate=function(e,t){if(!(e instanceof $))throw new r.t("date must be a valid GregorianDate.");var n=ie(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return o.e(t)?(ae(n[0],n[1],t),re(t),t):new we(n[0],n[1],Q.UTC)},we.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new r.t("date must be a valid JavaScript Date.");var n=ie(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return o.e(t)?(ae(n[0],n[1],t),re(t),t):new we(n[0],n[1],Q.UTC)},we.fromIso8601=function(e,t){if("string"!=typeof e)throw new r.t(me);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(me);if(null!==(l=m.match(fe))){if((s=m.split("-").length-1)>0&&2!==s)throw new r.t(me);n=+l[1],c=+l[2],f=+l[3]}else if(null!==(l=m.match(ue)))n=+l[1],c=+l[2];else if(null!==(l=m.match(se)))n=+l[1];else{var O;if(null!==(l=m.match(le))){if(n=+l[1],O=+l[2],i=J(n),O<1||i&&O>366||!i&&O>365)throw new r.t(me)}else{if(null===(l=m.match(ce)))throw new r.t(me);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(me);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=J(n),c<1||c>12||f<1||(2!==c||!i)&&f>ee[c-1]||i&&2===c&&f>29)throw new r.t(me);if(o.e(w)){if(null!==(l=w.match(he))){if((s=w.split(":").length-1)>0&&2!==s&&3!==s)throw new r.t(me);d=+l[1],p=+l[2],y=+l[3],h=1e3*+(l[4]||0),u=5}else if(null!==(l=w.match(ye))){if((s=w.split(":").length-1)>2)throw new r.t(me);d=+l[1],p=+l[2],y=60*+(l[3]||0),u=4}else{if(null===(l=w.match(pe)))throw new r.t(me);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(me);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:ee[c-1];f>a;)f-=a,++c>12&&(c-=12,n++),a=i&&2===c?29:ee[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:ee[c-1];var S=ie(n,c,f,d,p,y,h);return o.e(t)?(ae(S[0],S[1],t),re(t)):t=new we(S[0],S[1],Q.UTC),T&&we.addSeconds(t,1,t),t},we.now=function(e){return we.fromDate(new Date,e)};var Oe=new we(0,0,Q.TAI);function be(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))Ee(this,e.data);else if(o.e(e.url)){var t=l.t.createIfNeeded(e.url),n=this;this._downloadPromise=o.o(t.fetchJson(),(function(e){Ee(n,e)}),(function(){n._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else Ee(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function xe(e,t){return we.compare(e.julianDate,t)}function Ee(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 we(m+H.MODIFIED_JULIAN_DATE_DIFFERENCE,w,Q.TAI);if(f.push(O),p){if(w!==d&&o.e(d)){var b=we.leapSeconds,x=G(b,O,xe);if(x<0){var E=new X(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 _e(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 ve(e,t,n){return t+e*(n-t)}function Te(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 _e(e,n,o,s,i),i;if(r.equals(l))return _e(e,n,a,s,i),i;var c=we.secondsDifference(r,u)/we.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=ve(c,n[f+e._xPoleWanderRadiansColumn],n[d+e._xPoleWanderRadiansColumn]),i.yPoleWander=ve(c,n[f+e._yPoleWanderRadiansColumn],n[d+e._yPoleWanderRadiansColumn]),i.xPoleOffset=ve(c,n[f+e._xCelestialPoleOffsetRadiansColumn],n[d+e._xCelestialPoleOffsetRadiansColumn]),i.yPoleOffset=ve(c,n[f+e._yCelestialPoleOffsetRadiansColumn],n[d+e._yCelestialPoleOffsetRadiansColumn]),i.ut1MinusUtc=ve(c,p,y),i}function Se(e,t,n){this.heading=o.u(e,0),this.pitch=o.u(t,0),this.roll=o.u(n,0)}function ge(e,t,n){this.x=e,this.y=t,this.s=n}function De(e){e=o.u(e,o.u.EMPTY_OBJECT),this._xysFileUrlTemplate=l.t.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=o.u(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=o.u(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new we(this._sampleZeroJulianEphemerisDate,0,Q.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)}we.toGregorianDate=function(e,t){if(!o.e(e))throw new r.t("julianDate is required.");var n=!1,a=oe(e,Oe);o.e(a)||(we.addSeconds(e,-1,Oe),a=oe(Oe,Oe),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/H.SECONDS_PER_HOUR|0,m=s-h*H.SECONDS_PER_HOUR,w=m/H.SECONDS_PER_MINUTE|0,O=0|(m-=w*H.SECONDS_PER_MINUTE),b=(m-O)/H.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)},we.toDate=function(e){if(!o.e(e))throw new r.t("julianDate is required.");var t=we.toGregorianDate(e,K),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))},we.toIso8601=function(e,t){if(!o.e(e))throw new r.t("julianDate is required.");var n=we.toGregorianDate(e,K),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?V("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",a,i,s,u,l,c,(.01*f).toFixed(t).replace(".","").slice(0,t)):V("%04d-%02d-%02dT%02d:%02d:%02dZ",a,i,s,u,l,c):V("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",a,i,s,u,l,c,(.01*f).toString().replace(".",""))},we.clone=function(e,t){if(o.e(e))return o.e(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new we(e.dayNumber,e.secondsOfDay,Q.TAI)},we.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},we.equals=function(e,t){return e===t||o.e(e)&&o.e(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},we.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(we.secondsDifference(e,t))<=n},we.totalDays=function(e){if(!o.e(e))throw new r.t("julianDate is required.");return e.dayNumber+e.secondsOfDay/H.SECONDS_PER_DAY},we.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)*H.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},we.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)/H.SECONDS_PER_DAY},we.computeTaiMinusUtc=function(e){ne.julianDate=e;var t=we.leapSeconds,n=G(t,ne,te);return n<0&&(n=~n,--n<0&&(n=0)),t[n].offset},we.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 ae(e.dayNumber,e.secondsOfDay+t,n)},we.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*H.SECONDS_PER_MINUTE;return ae(e.dayNumber,a,n)},we.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*H.SECONDS_PER_HOUR;return ae(e.dayNumber,a,n)},we.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 ae(e.dayNumber+t,e.secondsOfDay,n)},we.lessThan=function(e,t){return we.compare(e,t)<0},we.lessThanOrEquals=function(e,t){return we.compare(e,t)<=0},we.greaterThan=function(e,t){return we.compare(e,t)>0},we.greaterThanOrEquals=function(e,t){return we.compare(e,t)>=0},we.prototype.clone=function(e){return we.clone(this,e)},we.prototype.equals=function(e){return we.equals(this,e)},we.prototype.equalsEpsilon=function(e,t){return we.equalsEpsilon(this,e,t)},we.prototype.toString=function(){return we.toIso8601(this)},we.leapSeconds=[new X(new we(2441317,43210,Q.TAI),10),new X(new we(2441499,43211,Q.TAI),11),new X(new we(2441683,43212,Q.TAI),12),new X(new we(2442048,43213,Q.TAI),13),new X(new we(2442413,43214,Q.TAI),14),new X(new we(2442778,43215,Q.TAI),15),new X(new we(2443144,43216,Q.TAI),16),new X(new we(2443509,43217,Q.TAI),17),new X(new we(2443874,43218,Q.TAI),18),new X(new we(2444239,43219,Q.TAI),19),new X(new we(2444786,43220,Q.TAI),20),new X(new we(2445151,43221,Q.TAI),21),new X(new we(2445516,43222,Q.TAI),22),new X(new we(2446247,43223,Q.TAI),23),new X(new we(2447161,43224,Q.TAI),24),new X(new we(2447892,43225,Q.TAI),25),new X(new we(2448257,43226,Q.TAI),26),new X(new we(2448804,43227,Q.TAI),27),new X(new we(2449169,43228,Q.TAI),28),new X(new we(2449534,43229,Q.TAI),29),new X(new we(2450083,43230,Q.TAI),30),new X(new we(2450630,43231,Q.TAI),31),new X(new we(2451179,43232,Q.TAI),32),new X(new we(2453736,43233,Q.TAI),33),new X(new we(2454832,43234,Q.TAI),34),new X(new we(2456109,43235,Q.TAI),35),new X(new we(2457204,43236,Q.TAI),36),new X(new we(2457754,43237,Q.TAI),37)],be.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 Z(0,0,0,0,0),t}}),be.prototype.getPromiseToLoad=function(){return o.o(this._downloadPromise)},be.prototype.compute=function(e,t){if(o.e(this._samples)){if(o.e(t)||(t=new Z(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=we.lessThanOrEquals(s,e),f=!o.e(u),d=f||we.greaterThanOrEquals(u,e);if(l&&d)return a=r,!f&&u.equals(e)&&++a,i=a+1,Te(this,n,this._samples,e,a,i,t),t}var p=G(n,e,we.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,Te(this,n,this._samples,e,a,i,t),t}if(o.e(this._dataError))throw new c.t(this._dataError)},Se.fromQuaternion=function(e,t){if(!o.e(e))throw new r.t("quaternion is required");o.e(t)||(t=new Se);var n=2*(e.w*e.y-e.z*e.x),a=1-2*(e.x*e.x+e.y*e.y),s=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(s,a),t.pitch=-i.e.asinClamped(n),t},Se.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 Se),a.heading=e*i.e.RADIANS_PER_DEGREE,a.pitch=t*i.e.RADIANS_PER_DEGREE,a.roll=n*i.e.RADIANS_PER_DEGREE,a},Se.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 Se(e.heading,e.pitch,e.roll)},Se.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},Se.equalsEpsilon=function(e,t,n,r){return e===t||o.e(e)&&o.e(t)&&i.e.equalsEpsilon(e.heading,t.heading,n,r)&&i.e.equalsEpsilon(e.pitch,t.pitch,n,r)&&i.e.equalsEpsilon(e.roll,t.roll,n,r)},Se.prototype.clone=function(e){return Se.clone(this,e)},Se.prototype.equals=function(e){return Se.equals(this,e)},Se.prototype.equalsEpsilon=function(e,t,n){return Se.equalsEpsilon(this,e,t,n)},Se.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var Pe=new we(0,0,Q.TAI);function Ne(e,t,n){var r=Pe;return r.dayNumber=t,r.secondsOfDay=n,we.daysDifference(r,e._sampleZeroDateTT)}function Ce(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 l.t({url:l.n$1("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}De.prototype.preload=function(e,t,n,r){var a=Ne(this,e,t),i=Ne(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(Ce(this,d));return o.o.all(f)},De.prototype.computeXysRadians=function(e,t,n){var r=Ne(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])||(Ce(this,s/this._samplesPerXysFile|0),l=!0),o.e(c[3*u])||(Ce(this,u/this._samplesPerXysFile|0),l=!0),!l){o.e(n)?(n.x=0,n.y=0,n.s=0):n=new ge(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 Ie={},je={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"}},Re={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Me={},Ae={east:new n.t,north:new n.t,up:new n.t,west:new n.t,south:new n.t,down:new n.t},qe=new n.t,Ue=new n.t,ze=new n.t;Ie.localFrameToFixedFrameGenerator=function(e,t){if(!je.hasOwnProperty(e)||!je[e].hasOwnProperty(t))throw new r.t("firstAxis and secondAxis must be east, north, up, west, south or down.");var u,l=je[e][t],c=e+t;return o.e(Me[c])?u=Me[c]:(u=function(u,c,f){if(!o.e(u))throw new r.t("origin is required.");if(o.e(f)||(f=new a.y),n.t.equalsEpsilon(u,n.t.ZERO,i.e.EPSILON14))n.t.unpack(Re[e],0,qe),n.t.unpack(Re[t],0,Ue),n.t.unpack(Re[l],0,ze);else if(i.e.equalsEpsilon(u.x,0,i.e.EPSILON14)&&i.e.equalsEpsilon(u.y,0,i.e.EPSILON14)){var d=i.e.sign(u.z);n.t.unpack(Re[e],0,qe),"east"!==e&&"west"!==e&&n.t.multiplyByScalar(qe,d,qe),n.t.unpack(Re[t],0,Ue),"east"!==t&&"west"!==t&&n.t.multiplyByScalar(Ue,d,Ue),n.t.unpack(Re[l],0,ze),"east"!==l&&"west"!==l&&n.t.multiplyByScalar(ze,d,ze)}else{(c=o.u(c,s.t.WGS84)).geodeticSurfaceNormal(u,Ae.up);var p=Ae.up,y=Ae.east;y.x=-u.y,y.y=u.x,y.z=0,n.t.normalize(y,Ae.east),n.t.cross(p,y,Ae.north),n.t.multiplyByScalar(Ae.up,-1,Ae.down),n.t.multiplyByScalar(Ae.east,-1,Ae.west),n.t.multiplyByScalar(Ae.north,-1,Ae.south),qe=Ae[e],Ue=Ae[t],ze=Ae[l]}return f[0]=qe.x,f[1]=qe.y,f[2]=qe.z,f[3]=0,f[4]=Ue.x,f[5]=Ue.y,f[6]=Ue.z,f[7]=0,f[8]=ze.x,f[9]=ze.y,f[10]=ze.z,f[11]=0,f[12]=u.x,f[13]=u.y,f[14]=u.z,f[15]=1,f},Me[c]=u),u},Ie.eastNorthUpToFixedFrame=Ie.localFrameToFixedFrameGenerator("east","north"),Ie.northEastDownToFixedFrame=Ie.localFrameToFixedFrameGenerator("north","east"),Ie.northUpEastToFixedFrame=Ie.localFrameToFixedFrameGenerator("north","up"),Ie.northWestUpToFixedFrame=Ie.localFrameToFixedFrameGenerator("north","west");var Fe=new h,We=new n.t(1,1,1),Le=new a.y;Ie.headingPitchRollToFixedFrame=function(e,t,i,s,u){r.o.typeOf.object("HeadingPitchRoll",t),s=o.u(s,Ie.eastNorthUpToFixedFrame);var l=h.fromHeadingPitchRoll(t,Fe),c=a.y.fromTranslationQuaternionRotationScale(n.t.ZERO,l,We,Le);return u=s(e,i,u),a.y.multiply(u,c,u)};var ke=new a.y,Ye=new a.p;Ie.headingPitchRollQuaternion=function(e,t,n,o,i){r.o.typeOf.object("HeadingPitchRoll",t);var s=Ie.headingPitchRollToFixedFrame(e,t,n,o,ke),u=a.y.getMatrix3(s,Ye);return h.fromRotationMatrix(u,i)};var Be=new n.t(1,1,1),Ge=new n.t,Ze=new a.y,Ve=new a.y,$e=new a.p,Je=new h;Ie.fixedFrameToHeadingPitchRoll=function(e,t,i,u){r.o.defined("transform",e),t=o.u(t,s.t.WGS84),i=o.u(i,Ie.eastNorthUpToFixedFrame),o.e(u)||(u=new Se);var l=a.y.getTranslation(e,Ge);if(n.t.equals(l,n.t.ZERO))return u.heading=0,u.pitch=0,u.roll=0,u;var c=a.y.inverseTransformation(i(l,t,Ze),Ze),f=a.y.setScale(e,Be,Ve);f=a.y.setTranslation(f,n.t.ZERO,f),c=a.y.multiply(c,f,c);var d=h.fromRotationMatrix(a.y.getMatrix3(c,$e),Je);return d=h.normalize(d,d),Se.fromQuaternion(d,u)};var Xe=i.e.TWO_PI/86400,He=new we;Ie.computeTemeToPseudoFixedMatrix=function(e,t){if(!o.e(e))throw new r.t("date is required.");var n,s=(He=we.addSeconds(e,-we.computeTaiMinusUtc(e),He)).dayNumber,u=He.secondsOfDay,l=s-2451545,c=(24110.54841+(n=u>=43200?(l+.5)/H.DAYS_PER_JULIAN_CENTURY:(l-.5)/H.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+n*(.093104+-62e-7*n)))*Xe%i.e.TWO_PI+(72921158553e-15+11772758384668e-32*(s-2451545.5))*((u+.5*H.SECONDS_PER_DAY)%H.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)},Ie.iau2006XysData=new De,Ie.earthOrientationParameters=be.NONE;var Qe=32.184;Ie.preloadIcrfFixed=function(e){var t=e.start.dayNumber,n=e.start.secondsOfDay+Qe,r=e.stop.dayNumber,a=e.stop.secondsOfDay+Qe,i=Ie.iau2006XysData.preload(t,n,r,a),s=Ie.earthOrientationParameters.getPromiseToLoad();return o.o.all([i,s])},Ie.computeIcrfToFixedMatrix=function(e,t){if(!o.e(e))throw new r.t("date is required.");o.e(t)||(t=new a.p);var n=Ie.computeFixedToIcrfMatrix(e,t);if(o.e(n))return a.p.transpose(n,t)};var Ke=new ge(0,0,0),et=new Z(0,0,0,0,0,0),tt=new a.p,nt=new a.p;Ie.computeFixedToIcrfMatrix=function(e,t){if(!o.e(e))throw new r.t("date is required.");o.e(t)||(t=new a.p);var n=Ie.earthOrientationParameters.compute(e,et);if(o.e(n)){var s=e.dayNumber,u=e.secondsOfDay+Qe,l=Ie.iau2006XysData.computeXysRadians(s,u,Ke);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=tt;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,nt),h=a.p.multiply(p,y,tt),m=e.dayNumber-2451545,w=(e.secondsOfDay-we.computeTaiMinusUtc(e)+n.ut1MinusUtc)/H.SECONDS_PER_DAY,O=.779057273264+w+.00273781191135448*(m+w);O=O%1*i.e.TWO_PI;var b=a.p.fromRotationZ(O,nt),x=a.p.multiply(h,b,tt),E=Math.cos(n.xPoleWander),_=Math.cos(n.yPoleWander),v=Math.sin(n.xPoleWander),T=Math.sin(n.yPoleWander),S=s-2451545+u/H.SECONDS_PER_DAY,g=-47e-6*(S/=36525)*i.e.RADIANS_PER_DEGREE/3600,D=Math.cos(g),P=Math.sin(g),N=nt;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 rt=new u.e;Ie.pointToWindowCoordinates=function(e,t,n,r){return(r=Ie.pointToGLWindowCoordinates(e,t,n,r)).y=2*t[5]-r.y,r},Ie.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 l=rt;return a.y.multiplyByVector(e,u.e.fromElements(i.x,i.y,i.z,1,l),l),u.e.multiplyByScalar(l,1/l.w,l),a.y.multiplyByVector(n,l,l),t.o.fromCartesian4(l,s)};var ot=new n.t,at=new n.t,it=new n.t;Ie.rotationMatrixFromPositionVelocity=function(e,t,u,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(u,s.t.WGS84).geodeticSurfaceNormal(e,ot),f=n.t.cross(t,c,at);n.t.equalsEpsilon(f,n.t.ZERO,i.e.EPSILON6)&&(f=n.t.clone(n.t.UNIT_X,f));var d=n.t.cross(f,t,it);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 st=new a.y(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),ut=new n.t$1,lt=new n.t,ct=new n.t,ft=new a.p,dt=new a.y,pt=new a.y;function yt(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._0x12cc5d.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=o.u(e.geometryType,f.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}Ie.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,ct),u=e.ellipsoid,l=u.cartesianToCartographic(s,ut),c=e.project(l,lt);n.t.fromElements(c.z,c.x,c.y,c);var f=Ie.eastNorthUpToFixedFrame(s,u,dt),d=a.y.inverseTransformation(f,pt),p=a.y.getMatrix3(t,ft),y=a.y.multiplyByMatrix3(d,p,i);return a.y.multiply(st,y,i),a.y.setTranslation(i,c,i),i},Ie.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=Ie.eastNorthUpToFixedFrame(t,s,dt),l=a.y.inverseTransformation(u,pt),c=s.cartesianToCartographic(t,ut),f=e.project(c,lt);n.t.fromElements(f.z,f.x,f.y,f);var d=a.y.fromTranslation(f,dt);return a.y.multiply(st,l,i),a.y.multiply(d,i,i),i},Ie.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)},Ie.getHeading=function(e,t){var n;return n=i.e.equalsEpsilon(Math.abs(e.z),1,i.e.EPSILON3)?Math.atan2(t.y,t.x)-i.e.PI_OVER_TWO:Math.atan2(e.y,e.x)-i.e.PI_OVER_TWO,i.e.TWO_PI-i.e.zeroToTwoPi(n)},Ie.convertToColumbusCartesian=function(e){var t=new l.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)},Ie.convertTo3DCartesian=function(e){var t=new l.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)},yt.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 ht=new n.t$1,mt=new n.t,wt=new a.y,Ot=[new n.t$1,new n.t$1,new n.t$1],bt=[new t.o,new t.o,new t.o],xt=[new t.o,new t.o,new t.o],Et=new n.t,_t=new h,vt=new a.y,Tt=new d;yt._textureCoordinateRotationPoints=function(e,r,o,i){var u,l=s.h.center(i,ht),c=n.t$1.toCartesian(l,o,mt),f=Ie.eastNorthUpToFixedFrame(c,o,wt),p=a.y.inverse(f,wt),y=bt,m=Ot;m[0].longitude=i.west,m[0].latitude=i.south,m[1].longitude=i.west,m[1].latitude=i.north,m[2].longitude=i.east,m[2].latitude=i.south;var w=Et;for(u=0;u<3;u++)n.t$1.toCartesian(m[u],o,w),w=a.y.multiplyByPointAsVector(p,w,w),y[u].x=w.x,y[u].y=w.y;var O=h.fromAxisAngle(n.t.UNIT_Z,-r,_t),b=a.p.fromQuaternion(O,vt),x=e.length,E=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,T=Number.NEGATIVE_INFINITY;for(u=0;u<x;u++)w=a.y.multiplyByPointAsVector(p,e[u],w),w=a.p.multiplyByVector(b,w,w),E=Math.min(E,w.x),_=Math.min(_,w.y),v=Math.max(v,w.x),T=Math.max(T,w.y);var S=d.fromRotation(r,Tt),g=xt;g[0].x=E,g[0].y=_,g[1].x=E,g[1].y=T,g[2].x=v,g[2].y=_;var D=y[0],P=y[2].x-D.x,N=y[1].y-D.y;for(u=0;u<3;u++){var C=g[u];d.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=yt,e.Me=f,e.f=d,e.m=Ie,e.n=h,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}}));
|